All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] scsi: ufs & ums-* & esp_scsi: fix module reference counting
@ 2015-01-11 13:50 Akinobu Mita
       [not found] ` <1420984206-22341-1-git-send-email-akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Akinobu Mita @ 2015-01-11 13:50 UTC (permalink / raw)
  To: linux-scsi-u79uwXL29TY76Z2rM5mHXA
  Cc: Akinobu Mita, Vinayak Holikatti, Dolev Raviv, Sujit Reddy Thumma,
	Subhash Jadavani, Christoph Hellwig, James E.J. Bottomley,
	Matthew Dharm, Greg Kroah-Hartman, Alan Stern, David S. Miller,
	Hannes Reinecke, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	usb-storage-ijkIwGHArpdIPJnuZ7Njw4oP9KaGy4wf

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 ufs, unusual usb storage drivers, and sub drivers for esp_scsi.
These drivers consist with core driver and actual LLDDs, and
scsi_host_template is defined in the core driver.  So the actual LLDDs can
be unloaded even if the scsi_device is being accessed.

This patch series first adds ability to adjust module reference for
scsi host by LLDDs and then fixes actual LLDDs by adjusting module
reference after scsi host allocation.

* 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 (4):
  scsi: add ability to adjust module reference for scsi host
  scsi: ufs: adjust module reference for scsi host
  usb: storage: adjust module reference for scsi host
  scsi: esp_scsi: adjust module reference for scsi host

 drivers/scsi/am53c974.c          |  3 +--
 drivers/scsi/esp_scsi.c          | 16 +++++++++++++---
 drivers/scsi/esp_scsi.h          | 11 +++++++----
 drivers/scsi/hosts.c             |  1 +
 drivers/scsi/jazz_esp.c          |  3 +--
 drivers/scsi/mac_esp.c           |  3 +--
 drivers/scsi/scsi.c              |  4 ++--
 drivers/scsi/sun3x_esp.c         |  3 +--
 drivers/scsi/sun_esp.c           |  3 +--
 drivers/scsi/ufs/ufshcd-pci.c    |  1 +
 drivers/scsi/ufs/ufshcd-pltfrm.c |  1 +
 drivers/scsi/ufs/ufshcd.c        |  1 -
 drivers/usb/storage/usb.c        |  8 +++++---
 drivers/usb/storage/usb.h        |  7 +++++--
 include/scsi/scsi_host.h         |  1 +
 15 files changed, 41 insertions(+), 25 deletions(-)

Cc: Vinayak Holikatti <vinholikatti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Dolev Raviv <draviv-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: Sujit Reddy Thumma <sthumma-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: Subhash Jadavani <subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Cc: "James E.J. Bottomley" <JBottomley-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Cc: Matthew Dharm <mdharm-usb-JGfshJpz5UybPZpvUQj5UqxOck334EZe@public.gmane.org>
Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
Cc: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
Cc: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: usb-storage-ijkIwGHArpdIPJnuZ7Njw4oP9KaGy4wf@public.gmane.org
Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-01-13 13:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-11 13:50 [PATCH v3 0/4] scsi: ufs & ums-* & esp_scsi: fix module reference counting Akinobu Mita
     [not found] ` <1420984206-22341-1-git-send-email-akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-11 13:50   ` [PATCH v3 1/4] scsi: add ability to adjust module reference for scsi host Akinobu Mita
     [not found]     ` <1420984206-22341-2-git-send-email-akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-12  9:17       ` Hannes Reinecke
2015-01-11 13:50 ` [PATCH v3 2/4] scsi: ufs: " Akinobu Mita
2015-01-11 13:50 ` [PATCH v3 3/4] usb: storage: " Akinobu Mita
2015-01-11 13:50 ` [PATCH v3 4/4] scsi: esp_scsi: " Akinobu Mita
2015-01-11 17:55   ` David Miller
2015-01-12  9:18   ` Hannes Reinecke
2015-01-12  9:36 ` [PATCH v3 0/4] scsi: ufs & ums-* & esp_scsi: fix module reference counting Christoph Hellwig
     [not found]   ` <20150112093610.GA25942-jcswGhMUV9g@public.gmane.org>
2015-01-13 13:57     ` Akinobu Mita

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.