mbox series

[v2,0/6] Add LIBSAS_SHT_BASE for libsas

Message ID 20240308114339.1340549-1-john.g.garry@oracle.com (mailing list archive)
Headers show
Series Add LIBSAS_SHT_BASE for libsas | expand

Message

John Garry March 8, 2024, 11:43 a.m. UTC
There is much duplication in the scsi_host_template structure for the
drivers which use libsas.

Similar to how a standard template is used in libata with __ATA_BASE_SHT,
create a standard template in LIBSAS_SHT_BASE.

Based on following:
b914227e4215 (tag: mkp-scsi-staging, mkp-scsi/staging, mkp-scsi/for-next, mkp-scsi/6.9/scsi-staging) Merge patch series "Pass data lifetime information to SCSI disk devices"

Differences to v1:
- tidy libsas.h change (Jason)
- Don't set eh_abort_handler in LIBSAS_SHT_BASE (Jason)
- Remove sg_tablesize in LIBSAS_SHT_BASE, as W=1 build dislikes it
- Add some RB tags (Thanks)

John Garry (6):
  scsi: libsas: Add LIBSAS_SHT_BASE
  scsi: pm8001: Use LIBSAS_SHT_BASE
  scsi: hisi_sas: Use LIBSAS_SHT_BASE_NO_SLAVE_INIT
  scsi: aic94xx: Use LIBSAS_SHT_BASE
  scsi: mvsas: Use LIBSAS_SHT_BASE
  scsi: isci: Use LIBSAS_SHT_BASE

 drivers/scsi/aic94xx/aic94xx_init.c    | 21 ++-----------------
 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 18 +---------------
 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 18 +---------------
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 18 +---------------
 drivers/scsi/isci/init.c               | 23 ++------------------
 drivers/scsi/mvsas/mv_init.c           | 19 +----------------
 drivers/scsi/pm8001/pm8001_init.c      | 20 +-----------------
 include/scsi/libsas.h                  | 29 ++++++++++++++++++++++++++
 8 files changed, 38 insertions(+), 128 deletions(-)

Comments

Jason Yan March 11, 2024, 1:46 a.m. UTC | #1
Hi John,

On 2024/3/8 19:43, John Garry wrote:
> There is much duplication in the scsi_host_template structure for the
> drivers which use libsas.
> 
> Similar to how a standard template is used in libata with __ATA_BASE_SHT,
> create a standard template in LIBSAS_SHT_BASE.
> 
> Based on following:
> b914227e4215 (tag: mkp-scsi-staging, mkp-scsi/staging, mkp-scsi/for-next, mkp-scsi/6.9/scsi-staging) Merge patch series "Pass data lifetime information to SCSI disk devices"
> 
> Differences to v1:
> - tidy libsas.h change (Jason)
> - Don't set eh_abort_handler in LIBSAS_SHT_BASE (Jason)
> - Remove sg_tablesize in LIBSAS_SHT_BASE, as W=1 build dislikes it

I cannot find sg_tablesize in LIBSAS_SHT_BASE in v1, did I misssed anything?

Thanks,
Jason

> - Add some RB tags (Thanks)
> 
> John Garry (6):
>    scsi: libsas: Add LIBSAS_SHT_BASE
>    scsi: pm8001: Use LIBSAS_SHT_BASE
>    scsi: hisi_sas: Use LIBSAS_SHT_BASE_NO_SLAVE_INIT
>    scsi: aic94xx: Use LIBSAS_SHT_BASE
>    scsi: mvsas: Use LIBSAS_SHT_BASE
>    scsi: isci: Use LIBSAS_SHT_BASE
> 
>   drivers/scsi/aic94xx/aic94xx_init.c    | 21 ++-----------------
>   drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 18 +---------------
>   drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 18 +---------------
>   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 18 +---------------
>   drivers/scsi/isci/init.c               | 23 ++------------------
>   drivers/scsi/mvsas/mv_init.c           | 19 +----------------
>   drivers/scsi/pm8001/pm8001_init.c      | 20 +-----------------
>   include/scsi/libsas.h                  | 29 ++++++++++++++++++++++++++
>   8 files changed, 38 insertions(+), 128 deletions(-)
>
John Garry March 11, 2024, 7:41 a.m. UTC | #2
On 11/03/2024 01:46, Jason Yan wrote:
>> - Remove sg_tablesize in LIBSAS_SHT_BASE, as W=1 build dislikes it
> 
> I cannot find sg_tablesize in LIBSAS_SHT_BASE in v1, did I misssed 
> anything?

Ah, I think that I just had that change local but then decided to drop 
it due to W=1 build issue.

Thanks for your eagle eye checking.

John
Martin K. Petersen March 25, 2024, 8:11 p.m. UTC | #3
John,

> There is much duplication in the scsi_host_template structure for the
> drivers which use libsas.
>
> Similar to how a standard template is used in libata with
> __ATA_BASE_SHT, create a standard template in LIBSAS_SHT_BASE.

Applied to 6.10/scsi-staging, thanks!