lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1336472506.1933.56.camel@x61.thuisdomein>
Date:	Tue, 08 May 2012 12:21:46 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	Matthew Dharm <mdharm-usb@...-eyed-alien.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	usb-storage@...ts.one-eyed-alien.net, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] usb-storage: use NO_WP_DETECT for three devices

Three USB memory sticks will generate two errors when inserted
    [...] No Caching mode page present
    [...] Assuming drive cache: write through

These errors are generated by the SCSI stack (and printed thrice). The
first error can be avoided by adding the NO_WP_DETECT quirk for these
devices: it will set the skip_ms_page_3f flag which will make the SCSI
code skip MODE SENSE with page=0x3f (and assume these devices are write
enabled).

(The second error can be avoided by downgrading it to a notice, which is
done in a separate commit.)

Signed-off-by: Paul Bolle <pebolle@...cali.nl>
---
Note: I used the coding style of this file, which checkpatch doesn't
like.

 drivers/usb/storage/unusual_devs.h |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 2a7b87f..b581c31 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -673,12 +673,18 @@ UNUSUAL_DEV(  0x057b, 0x0022, 0x0000, 0x9999,
 		"Silicon Media R/W",
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0),
 
+UNUSUAL_DEV(  0x058f, 0x6387, 0x0103, 0x0103,
+		"Generic",
+		"Flash Disk",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_NO_WP_DETECT ),
+
 /* Reported by RTE <raszilki@...dex.ru> */
 UNUSUAL_DEV(  0x058f, 0x6387, 0x0141, 0x0141,
 		"JetFlash",
 		"TS1GJF2A/120",
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
-		US_FL_MAX_SECTORS_64 ),
+		US_FL_NO_WP_DETECT | US_FL_MAX_SECTORS_64 ),
 
 /* Fabrizio Fellini <fello@...ero.it> */
 UNUSUAL_DEV(  0x0595, 0x4343, 0x0000, 0x2210,
@@ -1860,6 +1866,12 @@ UNUSUAL_DEV(  0x1370, 0x6828, 0x0110, 0x0110,
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_IGNORE_RESIDUE ),
 
+UNUSUAL_DEV(  0x13fe, 0x1f00, 0x0110, 0x0110,
+		"Walletex",
+		"WalletFlash",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_NO_WP_DETECT ),
+
 /* Reported by Qinglin Ye <yestyle@...il.com> */
 UNUSUAL_DEV(  0x13fe, 0x3600, 0x0100, 0x0100,
 		"Kingston",
-- 
1.7.7.6



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ