Re: [PATCH 00/25] mpt3sas: Mergering mpt2sas & mpt3sas driver code

2015-11-13 Thread Martin K. Petersen
> "Yinghai" == Yinghai Lu  writes:

Yinghai,

Yinghai> error: inlining failed in call to always_inline

James already queued the following fix from sfr: 0a5149ba02bd.

But thanks for the heads-up!

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/25] mpt3sas: Mergering mpt2sas & mpt3sas driver code

2015-11-12 Thread Yinghai Lu
On Wed, Nov 11, 2015 at 5:09 PM, Martin K. Petersen
 wrote:
>> "Sreekanth" == Sreekanth Reddy  writes:
>
> The patches in the single-module portion of the series did not compile
> individually and I gave up untangling them. They were fundamentally too
> intertwined and I squashed them into one commit. Since it's mostly
> boilerplate stuff it should not matter too much from a bisection
> perspective.

on opensuse 13.1 gcc
gcc --version
gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]

got:

In file included from drivers/scsi/mpt3sas/mpt3sas_scsih.c:59:0:
drivers/scsi/mpt3sas/mpt3sas_scsih.c: In function ‘_scsih_io_done’:
drivers/scsi/mpt3sas/mpt3sas_base.h:1414:1: error: inlining failed in
call to always_inline ‘mpt3sas_scsi_direct_io_get’: function body not
available
 mpt3sas_scsi_direct_io_get(struct MPT3SAS_ADAPTER *ioc, u16 smid);
 ^
drivers/scsi/mpt3sas/mpt3sas_scsih.c:4448:32: error: called from here
  if (mpt3sas_scsi_direct_io_get(ioc, smid) &&
^
In file included from drivers/scsi/mpt3sas/mpt3sas_scsih.c:59:0:
drivers/scsi/mpt3sas/mpt3sas_base.h:1416:1: error: inlining failed in
call to always_inline ‘mpt3sas_scsi_direct_io_set’: function body not
available
 mpt3sas_scsi_direct_io_set(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8
direct_io);
 ^
drivers/scsi/mpt3sas/mpt3sas_scsih.c:4454:29: error: called from here
   mpt3sas_scsi_direct_io_set(ioc, smid, 0);
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 00/25] mpt3sas: Mergering mpt2sas & mpt3sas driver code

2015-11-11 Thread Sreekanth Reddy
Last time we have posted a set of patches which combine the mpt2sas
and mpt3sas driver code. and we are generating two driver modules
(i.e. two separate .ko's) from this Combined driver source.

Now we have modified above Combined driver source (i.e. single driver
source with two .ko's) to a Merged driver source (i.e. sing source with
single .ko) which supports both LSI MPT Fusion SAS 2.0 and SAS 3.0
generation HBAs.

Here I am once again posting first 18 patches of Combined driver source
along with last 7 patches which converts this Combined driver source to
Merged driver source.

Here is the change list from Combined driver src to Merged driver src
* 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 to
  process only those ioctl cmds issued for the SAS2 HBAs and mpt3ctl
  device to process only those ioctl cmds issued for the SAS3 HBAs.
* Added two separate ioc number indexing for SAS2 and SAS3 HBAs.
* Replaced compile time check 'MPT2SAS_SCSI' to run time check
  'hba_mpi_version_belonged' wherever needed.
* Aliased this merged driver to mpt2sas using MODULE_ALIAS.so that
  still user can load this merged driver with 'modprobe mpt2sas'.
* Moved global variable 'driver_name' to per adapter instance variable.
* Created two raid function templates 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.
* Updated the Makefile to built as a mpt3sas_warpdrive.o file.
* Added module parameter 'hbas_to_enumarate', which user can use this
  merged driver as legacy mpt2sas driver or as a
  legacy mpt3sas driver if needed.

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

* Added SCSI_MPT3SAS_MERGED config option, This Kconfig option is only
  used for legacy mpt2sas/mpt3sas interoperability.

In patch 5 (ie. mpt2sas: Removed .c and .h files from mpt2sas driver)
we are just removing mpt2sas driver files. so one can just provide below
command if this patch is not reached to linux-scsi community mail list,

"git rm drivers/scsi/mpt2sas/mpt2sas_base.*
drivers/scsi/mpt2sas/mpt2sas_config.c
drivers/scsi/mpt2sas/mpt2sas_ctl.*
drivers/scsi/mpt2sas/mpt2sas_scsih.c
drivers/scsi/mpt2sas/mpt2sas_transport.c
drivers/scsi/mpt2sas/mpt2sas_debug.h"

Thanks,
Sreekanth

Sreekanth Reddy (25):
  mpt2sas: Use mpi headers from mpt3sas
  mpt3sas: Added mpt2sas driver definitions
  mpt3sas: Move Gen3 HBA's device registration with PCI, SML and IOCTL
related API's to a separate file
  mpt2sas: Created mpt2sas_module.c file in which Gen2 HBA's are
registers with PCI, SML and IOCTLs
  mpt2sas: Removed .c and .h files from mpt2sas driver
  mpt3sas: Define 'hba_mpi_version_belonged' IOC variable
  mpt2sas, mpt3sas : Removed SCSI_MPTXSAS_LOGGING entry from Kconfig
  mpt3sas: For an IO, build MPI SGL LIST on GEN2 HBA's and build IEEE
SGL LIST on GEN3 HBA's
  mpt3sas: Don't send PHYDISK_HIDDEN Raid Action request on SAS2 HBA's
  mpt3sas: Manage MSIX vectors according to HBA device type
  mpt3sas: fix for driver fails EEH, recovery from injected pci bus
error
  mpt3sas: Ported WarpDrive product SSS6200 support
  mpt3sas: Ported the providing sysfs attribute to report Backup Rail
Monitor Status
  mpt3sas: Refcount sas_device objects and fix unsafe list usage
  mpt3sas: Refcount fw_events and fix unsafe list usage
  mpt3sas: Added OEMs Gen2 PnP ID Branding names
  mpt3sas: setpci reset kernel oops fix
  mpt2sas, mpt3sas: Update the driver versions
  mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0
HBA's
  mpt3sas: Moved Warpdriver specific functions to mpt3sas_warpdrive.c
  mpt2sas: Removed mpt2sas folder
  mpt3sas: Added a module parameter hbas_to_enumerate
  mpt2sas: Removed mpt2sas entries from SCSI's Kconfig and Makefile
  mpt3sas: Added SCSI_MPT3SAS_MERGED config option
  mpt3sas: Bump mpt3sas driver version to 09.102.00.00

 drivers/scsi/Kconfig |1 -
 drivers/scsi/Makefile|1 -
 drivers/scsi/mpt2sas/Kconfig |   67 -
 drivers/scsi/mpt2sas/Makefile|7 -
 drivers/scsi/mpt2sas/mpi/mpi2.h  | 1170 
 drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h | 3068 ---
 drivers/scsi/mpt2sas/mpi/mpi2_init.h |  461 --
 

Re: [PATCH 00/25] mpt3sas: Mergering mpt2sas & mpt3sas driver code

2015-11-11 Thread Hannes Reinecke
On 11/11/2015 01:00 PM, Sreekanth Reddy wrote:
> Last time we have posted a set of patches which combine the mpt2sas
> and mpt3sas driver code. and we are generating two driver modules
> (i.e. two separate .ko's) from this Combined driver source.
> 
> Now we have modified above Combined driver source (i.e. single driver
> source with two .ko's) to a Merged driver source (i.e. sing source with
> single .ko) which supports both LSI MPT Fusion SAS 2.0 and SAS 3.0
> generation HBAs.
> 
> Here I am once again posting first 18 patches of Combined driver source
> along with last 7 patches which converts this Combined driver source to
> Merged driver source.
> 
> Here is the change list from Combined driver src to Merged driver src
> * 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 to
>   process only those ioctl cmds issued for the SAS2 HBAs and mpt3ctl
>   device to process only those ioctl cmds issued for the SAS3 HBAs.
> * Added two separate ioc number indexing for SAS2 and SAS3 HBAs.
> * Replaced compile time check 'MPT2SAS_SCSI' to run time check
>   'hba_mpi_version_belonged' wherever needed.
> * Aliased this merged driver to mpt2sas using MODULE_ALIAS.so that
>   still user can load this merged driver with 'modprobe mpt2sas'.
> * Moved global variable 'driver_name' to per adapter instance variable.
> * Created two raid function templates 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.
> * Updated the Makefile to built as a mpt3sas_warpdrive.o file.
> * Added module parameter 'hbas_to_enumarate', which user can use this
>   merged driver as legacy mpt2sas driver or as a
>   legacy mpt3sas driver if needed.
> 
> 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
> 
> * Added SCSI_MPT3SAS_MERGED config option, This Kconfig option is only
>   used for legacy mpt2sas/mpt3sas interoperability.
> 
> In patch 5 (ie. mpt2sas: Removed .c and .h files from mpt2sas driver)
> we are just removing mpt2sas driver files. so one can just provide below
> command if this patch is not reached to linux-scsi community mail list,
> 
> "git rm drivers/scsi/mpt2sas/mpt2sas_base.*
> drivers/scsi/mpt2sas/mpt2sas_config.c
> drivers/scsi/mpt2sas/mpt2sas_ctl.*
> drivers/scsi/mpt2sas/mpt2sas_scsih.c
> drivers/scsi/mpt2sas/mpt2sas_transport.c
> drivers/scsi/mpt2sas/mpt2sas_debug.h"
> 
> Thanks,
> Sreekanth
> 
> Sreekanth Reddy (25):
>   mpt2sas: Use mpi headers from mpt3sas
>   mpt3sas: Added mpt2sas driver definitions
>   mpt3sas: Move Gen3 HBA's device registration with PCI, SML and IOCTL
> related API's to a separate file
>   mpt2sas: Created mpt2sas_module.c file in which Gen2 HBA's are
> registers with PCI, SML and IOCTLs
>   mpt2sas: Removed .c and .h files from mpt2sas driver
>   mpt3sas: Define 'hba_mpi_version_belonged' IOC variable
>   mpt2sas, mpt3sas : Removed SCSI_MPTXSAS_LOGGING entry from Kconfig
>   mpt3sas: For an IO, build MPI SGL LIST on GEN2 HBA's and build IEEE
> SGL LIST on GEN3 HBA's
>   mpt3sas: Don't send PHYDISK_HIDDEN Raid Action request on SAS2 HBA's
>   mpt3sas: Manage MSIX vectors according to HBA device type
>   mpt3sas: fix for driver fails EEH, recovery from injected pci bus
> error
>   mpt3sas: Ported WarpDrive product SSS6200 support
>   mpt3sas: Ported the providing sysfs attribute to report Backup Rail
> Monitor Status
>   mpt3sas: Refcount sas_device objects and fix unsafe list usage
>   mpt3sas: Refcount fw_events and fix unsafe list usage
>   mpt3sas: Added OEMs Gen2 PnP ID Branding names
>   mpt3sas: setpci reset kernel oops fix
>   mpt2sas, mpt3sas: Update the driver versions
>   mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0
> HBA's
>   mpt3sas: Moved Warpdriver specific functions to mpt3sas_warpdrive.c
>   mpt2sas: Removed mpt2sas folder
>   mpt3sas: Added a module parameter hbas_to_enumerate
>   mpt2sas: Removed mpt2sas entries from SCSI's Kconfig and Makefile
>   mpt3sas: Added SCSI_MPT3SAS_MERGED config option
>   mpt3sas: Bump mpt3sas driver version to 09.102.00.00
> 
>  drivers/scsi/Kconfig |1 -
>  drivers/scsi/Makefile|1 -
>  drivers/scsi/mpt2sas/Kconfig 

Re: [PATCH 00/25] mpt3sas: Mergering mpt2sas & mpt3sas driver code

2015-11-11 Thread Martin K. Petersen
> "Sreekanth" == Sreekanth Reddy  writes:

Sreekanth,

Sreekanth> Last time we have posted a set of patches which combine the
Sreekanth> mpt2sas and mpt3sas driver code. and we are generating two
Sreekanth> driver modules (i.e. two separate .ko's) from this Combined
Sreekanth> driver source.

I have merged your combined driver.

The patches in the single-module portion of the series did not compile
individually and I gave up untangling them. They were fundamentally too
intertwined and I squashed them into one commit. Since it's mostly
boilerplate stuff it should not matter too much from a bisection
perspective.

Thanks for doing this work! This will make things much easier going
forward.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html