On 01/11/2015 02:50 PM, Akinobu Mita wrote: > 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 adds .module field in struct Scsi_Host and let the module reference > be retrieved though it instead of struct scsi_host_template. This allows > the actual LLDDs adjust module reference. > > Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> > Cc: Vinayak Holikatti <vinholika...@gmail.com> > Cc: Dolev Raviv <dra...@codeaurora.org> > Cc: Sujit Reddy Thumma <sthu...@codeaurora.org> > Cc: Subhash Jadavani <subha...@codeaurora.org> > Cc: Christoph Hellwig <h...@lst.de> > Cc: "James E.J. Bottomley" <jbottom...@parallels.com> > Cc: Matthew Dharm <mdharm-...@one-eyed-alien.net> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Cc: Alan Stern <st...@rowland.harvard.edu> > Cc: linux-...@vger.kernel.org > Cc: usb-stor...@lists.one-eyed-alien.net > Cc: linux-scsi@vger.kernel.org
Reviewed-by: Hannes Reinecke <h...@suse.de> Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) -- 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