scsi: smartpqi: add module param to hide vsep
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com> Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com> Signed-off-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
8bdb3b9c67
commit
522bc026f0
|
@ -822,6 +822,7 @@ union pqi_reset_register {
|
||||||
#define PQI_HBA_BUS 2
|
#define PQI_HBA_BUS 2
|
||||||
#define PQI_EXTERNAL_RAID_VOLUME_BUS 3
|
#define PQI_EXTERNAL_RAID_VOLUME_BUS 3
|
||||||
#define PQI_MAX_BUS PQI_EXTERNAL_RAID_VOLUME_BUS
|
#define PQI_MAX_BUS PQI_EXTERNAL_RAID_VOLUME_BUS
|
||||||
|
#define PQI_VSEP_CISS_BTL 379
|
||||||
|
|
||||||
struct report_lun_header {
|
struct report_lun_header {
|
||||||
__be32 list_length;
|
__be32 list_length;
|
||||||
|
|
|
@ -151,6 +151,12 @@ module_param_named(expose_ld_first,
|
||||||
MODULE_PARM_DESC(expose_ld_first,
|
MODULE_PARM_DESC(expose_ld_first,
|
||||||
"Expose logical drives before physical drives.");
|
"Expose logical drives before physical drives.");
|
||||||
|
|
||||||
|
static int pqi_hide_vsep;
|
||||||
|
module_param_named(hide_vsep,
|
||||||
|
pqi_hide_vsep, int, 0644);
|
||||||
|
MODULE_PARM_DESC(hide_vsep,
|
||||||
|
"Hide the virtual SEP for direct attached drives.");
|
||||||
|
|
||||||
static char *raid_levels[] = {
|
static char *raid_levels[] = {
|
||||||
"RAID-0",
|
"RAID-0",
|
||||||
"RAID-4",
|
"RAID-4",
|
||||||
|
@ -1951,6 +1957,11 @@ static inline bool pqi_skip_device(u8 *scsi3addr)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void pqi_mask_device(u8 *scsi3addr)
|
||||||
|
{
|
||||||
|
scsi3addr[3] |= 0xc0;
|
||||||
|
}
|
||||||
|
|
||||||
static inline bool pqi_is_device_with_sas_address(struct pqi_scsi_dev *device)
|
static inline bool pqi_is_device_with_sas_address(struct pqi_scsi_dev *device)
|
||||||
{
|
{
|
||||||
if (!device->is_physical_device)
|
if (!device->is_physical_device)
|
||||||
|
@ -2031,6 +2042,21 @@ static int pqi_update_scsi_devices(struct pqi_ctrl_info *ctrl_info)
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
if (pqi_hide_vsep) {
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = num_physicals - 1; i >= 0; i--) {
|
||||||
|
phys_lun_ext_entry =
|
||||||
|
&physdev_list->lun_entries[i];
|
||||||
|
if (CISS_GET_DRIVE_NUMBER(
|
||||||
|
phys_lun_ext_entry->lunid) ==
|
||||||
|
PQI_VSEP_CISS_BTL) {
|
||||||
|
pqi_mask_device(
|
||||||
|
phys_lun_ext_entry->lunid);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
num_new_devices = num_physicals + num_logicals;
|
num_new_devices = num_physicals + num_logicals;
|
||||||
|
|
Loading…
Reference in New Issue