From b1bc4973177035bce5a5e0483abbbe12e6f9005b Mon Sep 17 00:00:00 2001 From: John Garry Date: Tue, 15 Aug 2023 11:51:47 +0000 Subject: scsi: libsas: Delete sas_ha_struct.lldd_module Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new driver"), sas_ha_struct.lldd_module has only ever been set, so remove it. Struct scsi_host_template already has a reference to the LLD driver module as to stop the driver being removed unexpectedly. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230815115156.343535-2-john.g.garry@oracle.com Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen --- include/scsi/libsas.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/scsi') diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 159823e0afbf..ccaf8f6b1055 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -376,7 +376,6 @@ struct sas_ha_struct { /* public: */ char *sas_ha_name; struct device *dev; /* should be set */ - struct module *lldd_module; /* should be set */ struct workqueue_struct *event_q; struct workqueue_struct *disco_q; -- cgit From c46a91709335ef8fccec082201e758531aee1c8f Mon Sep 17 00:00:00 2001 From: John Garry Date: Tue, 15 Aug 2023 11:51:48 +0000 Subject: scsi: libsas: Delete enum sas_class enum sas_class prob would have been useful if function sas_show_class() was ever implemented, which it wasn't. enum sas_class is used as asd_sas_port.class and asd_sas_phy.class, which are only ever set, so delete these members and the enum. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230815115156.343535-3-john.g.garry@oracle.com Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen --- include/scsi/libsas.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include/scsi') diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index ccaf8f6b1055..3048660ff107 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -23,11 +23,6 @@ struct block_device; -enum sas_class { - SAS, - EXPANDER -}; - enum sas_phy_role { PHY_ROLE_NONE = 0, PHY_ROLE_TARGET = 0x40, @@ -258,7 +253,6 @@ struct asd_sas_port { /* public: */ int id; - enum sas_class class; u8 sas_addr[SAS_ADDR_SIZE]; u8 attached_sas_addr[SAS_ADDR_SIZE]; enum sas_protocol iproto; @@ -319,7 +313,6 @@ struct asd_sas_phy { int enabled; /* must be set */ int id; /* must be set */ - enum sas_class class; enum sas_protocol iproto; enum sas_protocol tproto; -- cgit From 2f4e20cd6ef8083f911e4f8bba3c0a99815b44f4 Mon Sep 17 00:00:00 2001 From: John Garry Date: Tue, 15 Aug 2023 11:51:49 +0000 Subject: scsi: libsas: Delete enum sas_phy_type enum sas_phy_type is used for asd_sas_phy.type, which is only ever set, so delete this member and the enum. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230815115156.343535-4-john.g.garry@oracle.com Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen --- include/scsi/libsas.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include/scsi') diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 3048660ff107..e54bcdc1ecd1 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -29,11 +29,6 @@ enum sas_phy_role { PHY_ROLE_INITIATOR = 0x80, }; -enum sas_phy_type { - PHY_TYPE_PHYSICAL, - PHY_TYPE_VIRTUAL -}; - /* The events are mnemonically described in sas_dump.c * so when updating/adding events here, please also * update the other file too. @@ -316,7 +311,6 @@ struct asd_sas_phy { enum sas_protocol iproto; enum sas_protocol tproto; - enum sas_phy_type type; enum sas_phy_role role; enum sas_oob_mode oob_mode; enum sas_linkrate linkrate; -- cgit From 1136a0225d0582c4464fa37e3a91ed4b19b8745e Mon Sep 17 00:00:00 2001 From: John Garry Date: Tue, 15 Aug 2023 11:51:50 +0000 Subject: scsi: libsas: Delete struct scsi_core Since commit 79855d178557 ("libsas: remove task_collector mode"), struct scsi_core only contains a reference to the shost. struct scsi_core is only used in sas_ha_struct.core, so delete scsi_core and replace with a reference to the shost there. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230815115156.343535-5-john.g.garry@oracle.com Reviewed-by: Jason Yan Reviewed-by: Damien Le Moal Signed-off-by: Martin K. Petersen --- include/scsi/libsas.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'include/scsi') diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index e54bcdc1ecd1..d42bfdff7812 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -333,11 +333,6 @@ struct asd_sas_phy { void *lldd_phy; /* not touched by the sas_class_code */ }; -struct scsi_core { - struct Scsi_Host *shost; - -}; - enum sas_ha_state { SAS_HA_REGISTERED, SAS_HA_DRAINING, @@ -358,7 +353,7 @@ struct sas_ha_struct { struct mutex disco_mutex; - struct scsi_core core; + struct Scsi_Host *shost; /* public: */ char *sas_ha_name; -- cgit From 31d9061b475c0b05b69126e6c2c063c98fa7bd8e Mon Sep 17 00:00:00 2001 From: John Garry Date: Tue, 15 Aug 2023 11:51:51 +0000 Subject: scsi: libsas: Delete sas_ssp_task.retry_count Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new driver"), sas_ssp_task.retry_count is only ever set, so delete it. The aic94xx driver also had its own retry_count definition in struct scb sub-structs, which may have caused a mix-up. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230815115156.343535-6-john.g.garry@oracle.com Reviewed-by: Jason Yan Reviewed-by: Damien Le Moal Signed-off-by: Martin K. Petersen --- include/scsi/libsas.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/scsi') diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index d42bfdff7812..d8222c442640 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -563,8 +563,6 @@ enum task_attribute { }; struct sas_ssp_task { - u8 retry_count; /* hardware retry, should be > 0 */ - u8 LUN[8]; u8 enable_first_burst:1; enum task_attribute task_attr; -- cgit From ebf26e93cfece20765bc2a562f7adc4340b2e4cc Mon Sep 17 00:00:00 2001 From: John Garry Date: Tue, 15 Aug 2023 11:51:52 +0000 Subject: scsi: libsas: Delete sas_ssp_task.enable_first_burst Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new driver"), sas_ssp_task.enable_first_burst is never set, so delete it and any references. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230815115156.343535-7-john.g.garry@oracle.com Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen --- include/scsi/libsas.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/scsi') diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index d8222c442640..d77db53cbd8d 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -564,7 +564,6 @@ enum task_attribute { struct sas_ssp_task { u8 LUN[8]; - u8 enable_first_burst:1; enum task_attribute task_attr; u8 task_prio; struct scsi_cmnd *cmd; -- cgit From 4dc051eb0c6b6c4580e5fc61f409bf711013bc35 Mon Sep 17 00:00:00 2001 From: John Garry Date: Tue, 15 Aug 2023 11:51:53 +0000 Subject: scsi: libsas: Delete sas_ssp_task.task_prio Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new driver"), sas_ssp_task.task_prio is never set, so delete it and any references which depend on it being set (all of them). Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230815115156.343535-8-john.g.garry@oracle.com Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen --- include/scsi/libsas.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/scsi') diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index d77db53cbd8d..5b2e6932c564 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -565,7 +565,6 @@ enum task_attribute { struct sas_ssp_task { u8 LUN[8]; enum task_attribute task_attr; - u8 task_prio; struct scsi_cmnd *cmd; }; -- cgit From 7b964c4022852c02c0b586e786252b470e4bc479 Mon Sep 17 00:00:00 2001 From: John Garry Date: Tue, 15 Aug 2023 11:51:54 +0000 Subject: scsi: libsas: Delete sas_ata_task.set_affil_pol Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new driver"), sas_ata_task.set_affil_pol is never set, so delete it and the reference in asd_build_ata_ascb(). Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230815115156.343535-9-john.g.garry@oracle.com Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen --- include/scsi/libsas.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/scsi') diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 5b2e6932c564..3a52094090a1 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -529,7 +529,6 @@ struct sas_ata_task { u8 dma_xfer:1; /* PIO:0 or DMA:1 */ u8 use_ncq:1; - u8 set_affil_pol:1; u8 stp_affil_pol:1; u8 device_control_reg_update:1; -- cgit From 44862dc2d2e7b26f6bf30da6bbed8586b48d4400 Mon Sep 17 00:00:00 2001 From: John Garry Date: Tue, 15 Aug 2023 11:51:55 +0000 Subject: scsi: libsas: Delete sas_ata_task.stp_affil_pol Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new driver"), sas_ata_task.stp_affil_pol is never set, so delete it and the reference in asd_build_ata_ascb(). Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230815115156.343535-10-john.g.garry@oracle.com Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen --- include/scsi/libsas.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/scsi') diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 3a52094090a1..a65c16643315 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -529,7 +529,6 @@ struct sas_ata_task { u8 dma_xfer:1; /* PIO:0 or DMA:1 */ u8 use_ncq:1; - u8 stp_affil_pol:1; u8 device_control_reg_update:1; -- cgit From 86344494e3649a487650fb9ea535e29fc891ab95 Mon Sep 17 00:00:00 2001 From: John Garry Date: Tue, 15 Aug 2023 11:51:56 +0000 Subject: scsi: libsas: Delete sas_ata_task.retry_count Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new driver"), sas_ata_task.retry_count is never set, so delete it and the reference in asd_build_ata_ascb(). Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230815115156.343535-11-john.g.garry@oracle.com Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen --- include/scsi/libsas.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/scsi') diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index a65c16643315..2601f5775a99 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -525,8 +525,6 @@ struct sas_ata_task { struct host_to_dev_fis fis; u8 atapi_packet[16]; /* 0 if not ATAPI task */ - u8 retry_count; /* hardware retry, should be > 0 */ - u8 dma_xfer:1; /* PIO:0 or DMA:1 */ u8 use_ncq:1; -- cgit