diff options
author | Sreekanth Reddy <sreekanth.reddy@avagotech.com> | 2015-11-11 13:00:35 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2015-11-12 01:50:11 +0100 |
commit | c84b06a48c4d8ac8270624453132f3fa1a4a0f9d (patch) | |
tree | 9f6a8af42a578cfe74bff8e65dfb5861a585d47b /drivers/scsi/mpt3sas/mpt3sas_config.c | |
parent | mpt2sas, mpt3sas: Update the driver versions (diff) | |
download | linux-c84b06a48c4d8ac8270624453132f3fa1a4a0f9d.tar.xz linux-c84b06a48c4d8ac8270624453132f3fa1a4a0f9d.zip |
mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs
Modified the mpt3sas driver to have a single driver module which
supports both SAS 2.0 & SAS 3.0 HBA devices.
* Added SAS 2.0 HBA device IDs to the mpt3sas_pci_table pci table.
* Created two separate SCSI host templates for SAS2 and SAS3 HBAs so
that, during the driver load time driver can use corresponding host
template(based the pci device ID) while registering a scsi host
adapter instance for that pci device.
* Registered two IOCTL devices, mpt2ctl is for SAS2 HBAs & mpt3ctl for
SAS3 HBAs. Also updated the code to make sure that mpt2ctl device
processes only those ioctl cmds issued for the SAS2 HBAs and mpt3ctl
device processes only those ioctl cmds issued for the SAS3 HBAs.
* Added separate indexing for SAS2 and SAS3 HBAs.
* Replaced compile time check 'MPT2SAS_SCSI' to run time check
'hba_mpi_version_belonged' whereever needed.
* Aliased this merged driver to mpt2sas using MODULE_ALIAS.
* Moved global varaible 'driver_name' to per adapter instance variable.
* Created two raid function template and used corresponding raid
function templates based on the run time check
'hba_mpi_version_belonged'.
* Moved mpt2sas_warpdrive.c file from mpt2sas to mpt3sas folder and
renamed it as mpt3sas_warpdrive.c.
* Also renamed the functions in mpt3sas_warpdrive.c file to follow
current driver function name convention.
* Updated the Makefile to build mpt3sas_warpdrive.o file for these
WarpDrive-specific functions.
* Also in function mpt3sas_setup_direct_io(), used sector_div() API
instead of division operator (which gives compilation errors on 32 bit
machines).
* Removed mpt2sas files, mpt2sas directory & mpt3sas_module.c file.
* Added module parameter 'hbas_to_enumerate' which permits using this
merged driver as a legacy mpt2sas driver or as a legacy mpt3sas
driver.
Here are the available options for this module parameter:
0 - Merged driver which enumerates both SAS 2.0 & SAS 3.0 HBAs
1 - Acts as legacy mpt2sas driver, which enumerates only SAS 2.0 HBAs
2 - Acts as legacy mpt3sas driver, which enumerates only SAS 3.0 HBAs
* Removed mpt2sas entries from SCSI's Kconfig and Makefile files.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpt3sas/mpt3sas_config.c')
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_config.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_config.c b/drivers/scsi/mpt3sas/mpt3sas_config.c index 2bbb0346b462..a6914ec99cc0 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_config.c +++ b/drivers/scsi/mpt3sas/mpt3sas_config.c @@ -865,7 +865,6 @@ mpt3sas_config_set_iounit_pg1(struct MPT3SAS_ADAPTER *ioc, return r; } -#ifdef SCSI_MPT2SAS /** * mpt3sas_config_get_iounit_pg3 - obtain iounit page 3 * @ioc: per adapter object @@ -901,7 +900,6 @@ mpt3sas_config_get_iounit_pg3(struct MPT3SAS_ADAPTER *ioc, out: return r; } -#endif /** * mpt3sas_config_get_iounit_pg8 - obtain iounit page 8 |