From: "O.Sezer" <sezeroz@ttnet.net.tr>
To: linux-kernel@vger.kernel.org
Cc: marcelo.tosatti@cyclades.com, mdharm-usb@one-eyed-alien.net
Subject: [PATCH 2.4] blacklist a device in usb-storage
Date: Sat, 14 Aug 2004 21:22:20 +0300 [thread overview]
Message-ID: <411E585C.7010400@ttnet.net.tr> (raw)
[-- Attachment #1: Type: text/plain, Size: 2142 bytes --]
The disk in question is VID/PID=0b86:5110 32mb JMTek/eXputer disk.
http://www.qbik.ch/usb/devices/showdev.php?id=1092 says it can
never be supported through usb-storage because it claims to be
usb storage compliant but is not.
I accidentally plugged this beast not remembering what a royal PITA
it is; here's the output from dmesg:
USB Mass Storage support registered.
sr0: mmc-3 profile: 0h
sr0: mmc-3 profile: 0h
usb.c: deregistering driver usb-storage
usb.c: USB disconnect on device 00:0e.1-2 address 9
sr0: mmc-3 profile: 0h
sr0: mmc-3 profile: 0h
hub.c: new USB device 00:0e.1-2, assigned address 10
usb.c: USB device 10 (vend/prod 0xb86/0x5110) is not claimed by any
active driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
usb.c: USB disconnect on device 00:0e.1-2 address 10
sr0: mmc-3 profile: 0h
sr0: mmc-3 profile: 0h
usb-uhci.c: interrupt, status 3, frame# 999
hub.c: new USB device 00:0e.1-2, assigned address 11
scsi: device set offline - not ready or command retry failed after bus
reset: host 1 channel 0 id 0 lun 0
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 10
USB Mass Storage support registered.
scsi2 : SCSI emulation for USB Mass Storage devices
sr0: mmc-3 profile: 0h
sr0: mmc-3 profile: 0h
usb-uhci.c: interrupt, status 3, frame# 1912
usb-uhci.c: interrupt, status 3, frame# 775
usb-uhci.c: interrupt, status 3, frame# 1689
usb-uhci.c: interrupt, status 3, frame# 555
usb-uhci.c: interrupt, status 3, frame# 1470
usb-uhci.c: interrupt, status 3, frame# 335
usb-uhci.c: interrupt, status 3, frame# 1248
usb-uhci.c: interrupt, status 3, frame# 115
usb-uhci.c: interrupt, status 3, frame# 1029
usb-uhci.c: interrupt, status 3, frame# 1941
Unplug the device and try /sbin/rmmod usb-sotrage == panic ;(
So I decided to find a way of blacklisting this disk (and
maybe similar others). Please review the attached patch.
If there's any other way of preventing usb-storage to take-
over this disk, then tell me and despise my ignorance,
Otherwise, Marcelo please apply ;)
Ozkan Sezer
[-- Attachment #2: 27_blacklist_usb-storage.diff --]
[-- Type: text/plain, Size: 1840 bytes --]
--- 27/drivers/usb/storage/unusual_devs.h~ 2004-08-08 02:26:05.000000000 +0300
+++ 27/drivers/usb/storage/unusual_devs.h 2004-08-14 20:57:36.000000000 +0300
@@ -708,7 +708,14 @@
"Optio S/S4",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_INQUIRY ),
-
+
+/* eXputer Model: Zippy Drive, lies about being USB mass storage compliant.
+ Ref.: http://www.qbik.ch/usb/devices/showdev.php?id=1092 */
+UNUSUAL_DEV( 0x0b86, 0x5110, 0x0000, 0xffff,
+ "eXputer",
+ "Zippy Drive 5000",
+ 0, 0, NULL, US_BLACKLISTED_DEV ),
+
#ifdef CONFIG_USB_STORAGE_ISD200
UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110,
"ATI",
--- 27/drivers/usb/storage/usb.h~ 2004-08-08 02:26:05.000000000 +0300
+++ 27/drivers/usb/storage/usb.h 2004-08-14 20:58:33.000000000 +0300
@@ -103,6 +103,7 @@
#define US_FL_SCM_MULT_TARG 0x00000020 /* supports multiple targets */
#define US_FL_FIX_INQUIRY 0x00000040 /* INQUIRY response needs fixing */
#define US_FL_FIX_CAPACITY 0x00000080 /* READ_CAPACITY response too big */
+#define US_BLACKLISTED_DEV 0x00000200 /* Device blacklisted */
#define USB_STOR_STRING_LEN 32
--- 27/drivers/usb/storage/usb.c~ 2004-08-08 02:26:05.000000000 +0300
+++ 27/drivers/usb/storage/usb.c 2004-08-14 20:57:36.000000000 +0300
@@ -595,6 +595,14 @@
if (id_index <
sizeof(us_unusual_dev_list) / sizeof(us_unusual_dev_list[0])) {
unusual_dev = &us_unusual_dev_list[id_index];
+ /* Is this thing blacklisted? */
+ if (unusual_dev->flags & US_BLACKLISTED_DEV) {
+ warn("Device (vend/prod 0x%x/0x%x) is Blacklisted and not supported by usb-storage.\n",
+ dev->descriptor.idVendor,
+ dev->descriptor.idProduct);
+ return NULL;
+ }
+
if (unusual_dev->vendorName)
US_DEBUGP("Vendor: %s\n", unusual_dev->vendorName);
if (unusual_dev->productName)
next reply other threads:[~2004-08-14 18:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-14 18:22 O.Sezer [this message]
[not found] <mailman.1092508141.32379.linux-kernel2news@redhat.com>
2004-08-16 6:52 ` [PATCH 2.4] blacklist a device in usb-storage Pete Zaitcev
2004-08-16 7:48 ` O.Sezer
2004-08-16 15:07 ` Pete Zaitcev
2004-08-16 15:54 ` O.Sezer
2004-08-16 22:32 ` Pete Zaitcev
2004-08-17 11:12 ` O.Sezer
2004-08-16 16:12 ` O.Sezer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=411E585C.7010400@ttnet.net.tr \
--to=sezeroz@ttnet.net.tr \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=mdharm-usb@one-eyed-alien.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox