While accessing a scsi_device, the use count of the underlying LLDD
module is incremented. The module reference is retrieved through
.module field of struct scsi_host_template.
This mapping between scsi_device and underlying LLDD module works well
except some drivers which consist with the core driver and the actual
LLDDs and scsi_host_template is defined in the core driver. In these
cases, the actual LLDDs can be unloaded even if the scsi_device is
being accessed.
This patch series fixes the module reference mismatch problem for
ufs, usb-storage, esp_scsi, ahci_platform, and pata_platform drivers
by moving owner module reference field from struct scsi_host_template
to struct Scsi_Host and allowing the LLDDs to set their correct module
reference.
* v4:
- Patch series is almost rewritten as module reference field in
struct scsi_host_template has been unused anymore. So Acked-by: and
Reviewed-by: tags that have been received are deleted.
* v3:
- Add fix for ESP SCSI drivers
* v2:
- Pass correct module reference to usb_stor_probe1() instead of touching
all ums-* drivers, suggested by Alan Stern
Akinobu Mita (11):
ata: prepare to move module reference from scsi_host_template to
Scsi_Host
iscsi: prepare to move module reference from scsi_host_template to
Scsi_Host
cxgbi: prepare to move module reference from scsi_host_template to
Scsi_Host
libfc: prepare to move module reference from scsi_host_template to
Scsi_Host
53c700: prepare move module reference from scsi_host_template to
Scsi_Host
scsi: legacy: prepare to move module reference from scsi_host_template
to Scsi_Host
scsi: move module reference from scsi_host_template to Scsi_Host
scsi: ufs: adjust module reference for scsi host
usb: storage: adjust module reference for scsi host
ata: ahci_platform: adjust module reference for scsi host
ata: pata_of_platform: adjust module reference for scsi host
drivers/ata/libahci_platform.c | 14 +++++-----
drivers/ata/libata-core.c | 22 ++++++++-------
drivers/ata/libata-scsi.c | 2 +-
drivers/ata/libata-sff.c | 61 +++++++++++++++++++++++-------------------
drivers/ata/pata_platform.c | 18 +++++++------
drivers/scsi/53c700.c | 9 ++++---
drivers/scsi/53c700.h | 7 +++--
drivers/scsi/cxgbi/libcxgbi.c | 8 +++---
drivers/scsi/cxgbi/libcxgbi.h | 6 +++--
drivers/scsi/hosts.c | 16 ++++++-----
drivers/scsi/libfc/fc_lport.c | 26 ++++++++++++++++++
drivers/scsi/libfc/fc_npiv.c | 2 +-
drivers/scsi/libiscsi.c | 12 +++++----
drivers/scsi/scsi.c | 4 +--
drivers/scsi/ufs/ufshcd.c | 13 ++++-----
drivers/scsi/ufs/ufshcd.h | 5 +++-
drivers/usb/storage/scsiglue.c | 3 ---
drivers/usb/storage/usb.c | 9 ++++---
drivers/usb/storage/usb.h | 7 +++--
include/linux/ahci_platform.h | 9 ++++---
include/linux/ata_platform.h | 16 ++++++-----
include/linux/libata.h | 52 ++++++++++++++++++++++++-----------
include/scsi/libfc.h | 27 +++----------------
include/scsi/libiscsi.h | 9 ++++---
include/scsi/scsi_host.h | 13 +++++++--
25 files changed, 224 insertions(+), 146 deletions(-)
Cc: Vinayak Holikatti <[email protected]>
Cc: Dolev Raviv <[email protected]>
Cc: Sujit Reddy Thumma <[email protected]>
Cc: Subhash Jadavani <[email protected]>
Cc: Matthew Dharm <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Mike Christie <[email protected]>
Cc: Karen Xie <[email protected]>
Cc: Robert Love <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html