This adds a module parameter that, when set, will prevent ipr from attaching any SATA devices, and only attach SAS devices.
Signed-off-by: Brian King <brk...@linux.vnet.ibm.com> --- drivers/scsi/ipr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff -puN drivers/scsi/ipr.c~ipr_disable_sata_param drivers/scsi/ipr.c --- linux-2.6.git/drivers/scsi/ipr.c~ipr_disable_sata_param 2016-08-30 20:57:08.611856631 -0500 +++ linux-2.6.git-bjking1/drivers/scsi/ipr.c 2016-08-30 20:57:08.618856526 -0500 @@ -101,6 +101,7 @@ static unsigned int ipr_max_devs = IPR_D static unsigned int ipr_dual_ioa_raid = 1; static unsigned int ipr_number_of_msix = 16; static unsigned int ipr_fast_reboot; +static unsigned int ipr_sata_disable = 1; static DEFINE_SPINLOCK(ipr_driver_lock); /* This table describes the differences between DMA controller chips */ @@ -226,6 +227,8 @@ module_param_named(number_of_msix, ipr_n MODULE_PARM_DESC(number_of_msix, "Specify the number of MSIX interrupts to use on capable adapters (1 - 16). (default:16)"); module_param_named(fast_reboot, ipr_fast_reboot, int, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(fast_reboot, "Skip adapter shutdown during reboot. Set to 1 to enable. (default: 0)"); +module_param_named(sata_disable, ipr_sata_disable, int, S_IRUGO); +MODULE_PARM_DESC(sata_disable, "Disable attaching SATA devices. Set to 1 to enable. (default: 0)"); MODULE_LICENSE("GPL"); MODULE_VERSION(IPR_DRIVER_VERSION); @@ -3438,6 +3441,10 @@ restart: list_for_each_entry(res, &ioa_cfg->used_res_q, queue) { if (res->add_to_ml && ipr_is_gata(res) && !res->sata_port) { + if (ipr_sata_disable) { + res->add_to_ml = 0; + goto restart; + } spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); sata_port = kzalloc(sizeof(*sata_port), GFP_KERNEL); ap = ata_sas_port_alloc(&ioa_cfg->ata_host, &sata_port_info, ioa_cfg->host); _ ------------------------------------------------------------------------------ _______________________________________________ Iprdd-devel mailing list Iprdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iprdd-devel