linux/drivers/usb/storage
Akinobu Mita aa519be34f usb: storage: fix module reference for scsi host
While accessing a unusual usb storage (ums-alauda, ums-cypress, ...),
the module reference count is not incremented.  Because these drivers
allocate scsi hosts with usb_stor_host_template defined in usb-storage
module.  So these drivers always can be unloaded.

This fixes it by preparing scsi host template which is initialized
at module_init() for each ums-* driver.  In order to minimize the
difference in ums-* drivers, introduce module_usb_stor_driver() helper
macro which is same as module_usb_driver() except that it also
initializes scsi host template.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Vinayak Holikatti <vinholikatti@gmail.com>
Cc: Dolev Raviv <draviv@codeaurora.org>
Cc: Sujit Reddy Thumma <sthumma@codeaurora.org>
Cc: Subhash Jadavani <subhashj@codeaurora.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Hannes Reinecke <hare@suse.de>
Cc: linux-usb@vger.kernel.org
Cc: usb-storage@lists.one-eyed-alien.net
Cc: linux-scsi@vger.kernel.org
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-10 16:03:50 +02:00
..
alauda.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
cypress_atacb.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
datafab.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
debug.c USB patches for 3.19-rc1 2014-12-14 14:57:16 -08:00
debug.h usb: storage: Convert usb_stor_dbg to return void 2014-11-03 15:38:17 -08:00
ene_ub6250.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
freecom.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
initializers.c storage: Enable multi-target mode as vendor driver does for SCM eUSCSI bridge 2014-11-24 17:22:38 -08:00
initializers.h
isd200.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
jumpshot.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
karma.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
Kconfig PM / Kconfig: Replace PM_RUNTIME with PM in dependencies 2014-12-13 00:44:04 +01:00
Makefile
onetouch.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
option_ms.c
option_ms.h
protocol.c
protocol.h
realtek_cr.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
scsiglue.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
scsiglue.h usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
sddr09.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
sddr55.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
shuttle_usbat.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
sierra_ms.c
sierra_ms.h
transport.c Merge 3.18-rc4 into usb-next. 2014-11-10 12:10:24 +09:00
transport.h
uas-detect.h uas: Set max_sectors_240 quirk for ASM1053 devices 2015-04-28 12:48:57 +02:00
uas.c uas: Add US_FL_MAX_SECTORS_240 flag 2015-04-28 12:48:57 +02:00
unusual_alauda.h
unusual_cypress.h
unusual_datafab.h
unusual_devs.h usb-storage/SCSI: blacklist FUA on JMicron 152d:2566 USB-SATA controller 2015-01-25 21:20:42 +08:00
unusual_ene_ub6250.h
unusual_freecom.h
unusual_isd200.h
unusual_jumpshot.h
unusual_karma.h
unusual_onetouch.h
unusual_realtek.h
unusual_sddr09.h
unusual_sddr55.h
unusual_uas.h uas: Add US_FL_NO_ATA_1X for Initio Corporation controllers / devices 2015-03-18 16:15:14 +01:00
unusual_usbat.h
usb.c usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
usb.h usb: storage: fix module reference for scsi host 2015-05-10 16:03:50 +02:00
usual-tables.c