On Thu, Feb 17, 2005 at 11:56:58AM -0800, Phil Dibowitz wrote:
Oops - I realize I forgot one change Alan had requested. Here's an updated patch.
I get the following error when applying this patch:
drivers/usb/storage/transport.c 1.160: 1214 lines patching file drivers/usb/storage/transport.c drivers/usb/storage/usb.h 1.70: 186 lines patching file drivers/usb/storage/usb.h Hunk #1 FAILED at 75. 1 out of 1 hunk FAILED -- saving rejects to file drivers/usb/storage/usb.h.rej drivers/usb/storage/unusual_devs.h 1.183: 933 lines patching file drivers/usb/storage/unusual_devs.h Hunk #1 succeeded at 516 (offset 4 lines). Hunk #2 succeeded at 563 (offset 4 lines). Hunk #3 succeeded at 943 with fuzz 2 (offset 7 lines). drivers/usb/storage/usb.c 1.135: 1083 lines patching file drivers/usb/storage/usb.c Hunk #1 succeeded at 479 (offset -4 lines).
Care to try it again?
So I decided to try to take a leap into BK.
It took some fiddling to get it to make a patch, so this *should* work, but I make no promises.
I haven't figured out how to test this since I haven't figured out how to "get" the whole thing. I.e., it's all checked in, and 'bk get' doesn't seem to be recursive. Without the whole thing, I can't copy a .config in there and compile. But it's based on the latest greg-kh tree.
I did test this patch on my other tree... but the changes were put in by hand based on the previous patch.
-- Phil Dibowitz [EMAIL PROTECTED] Freeware and Technical Pages Insanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin, 1759
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/02/17 21:56:12-08:00 [EMAIL PROTECTED]
# Add the US_FL_GO_SLOW flag and associated unusual_dev entries
#
# drivers/usb/storage/usb.h
# 2005/02/17 21:55:44-08:00 [EMAIL PROTECTED] +1 -0
# Add the US_FL_GO_SLOW flag and associated unusual_dev entries
#
# drivers/usb/storage/usb.c
# 2005/02/17 21:55:44-08:00 [EMAIL PROTECTED] +7 -0
# Add the US_FL_GO_SLOW flag and associated unusual_dev entries
#
# drivers/usb/storage/unusual_devs.h
# 2005/02/17 21:55:44-08:00 [EMAIL PROTECTED] +31 -5
# Add the US_FL_GO_SLOW flag and associated unusual_dev entries
#
# drivers/usb/storage/transport.c
# 2005/02/17 21:55:44-08:00 [EMAIL PROTECTED] +2 -2
# Add the US_FL_GO_SLOW flag and associated unusual_dev entries
#
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c 2005-02-17 22:06:51 -08:00
+++ b/drivers/usb/storage/transport.c 2005-02-17 22:06:51 -08:00
@@ -991,10 +991,10 @@
/* DATA STAGE */
/* send/receive data payload, if there is any */
- /* Genesys Logic interface chips need a 100us delay between the
+ /* Some USB-IDE converter chips need a 100us delay between the
* command phase and the data phase. Some devices need a little
* more than that, probably because of clock rate inaccuracies. */
- if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) ==
USB_VENDOR_ID_GENESYS)
+ if (unlikely(us->flags & US_FL_GO_SLOW))
udelay(110);
if (transfer_length) {
diff -Nru a/drivers/usb/storage/unusual_devs.h
b/drivers/usb/storage/unusual_devs.h
--- a/drivers/usb/storage/unusual_devs.h 2005-02-17 22:06:51 -08:00
+++ b/drivers/usb/storage/unusual_devs.h 2005-02-17 22:06:51 -08:00
@@ -516,6 +516,25 @@
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_INQUIRY ),
+/* The following two entries are for a Genesys USB to IDE
+ * converter chip, but it changes its ProductId depending
+ * on whether or not a disk or an optical device is enclosed
+ * They were originally reported by Alexander Oltu
+ * <[EMAIL PROTECTED]> and Peter Marks <[EMAIL PROTECTED]>
+ * respectively.
+ */
+UNUSUAL_DEV( 0x05e3, 0x0701, 0x0000, 0xffff,
+ "Genesys Logic",
+ "USB to IDE Optical",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_GO_SLOW ),
+
+UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0xffff,
+ "Genesys Logic",
+ "USB to IDE Disk",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_GO_SLOW ),
+
/* Reported by Hanno Boeck <[EMAIL PROTECTED]>
* Taken from the Lycoris Kernel */
UNUSUAL_DEV( 0x0636, 0x0003, 0x0000, 0x9999,
@@ -544,19 +563,19 @@
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),
-/* Reported by Alex Butcher <[EMAIL PROTECTED]> */
-UNUSUAL_DEV( 0x067b, 0x3507, 0x0001, 0x0001,
+/* Reported by Richard -=[]=- <[EMAIL PROTECTED]> */
+UNUSUAL_DEV( 0x067b, 0x2507, 0x0100, 0x0100,
"Prolific Technology Inc.",
- "ATAPI-6 Bridge Controller",
+ "Mass Storage Device",
US_SC_DEVICE, US_PR_DEVICE, NULL,
- US_FL_FIX_CAPACITY ),
+ US_FL_FIX_CAPACITY | US_FL_GO_SLOW ),
/* Reported by Alex Butcher <[EMAIL PROTECTED]> */
UNUSUAL_DEV( 0x067b, 0x3507, 0x0001, 0x0001,
"Prolific Technology Inc.",
"ATAPI-6 Bridge Controller",
US_SC_DEVICE, US_PR_DEVICE, NULL,
- US_FL_FIX_CAPACITY ),
+ US_FL_FIX_CAPACITY | US_FL_GO_SLOW ),
/* Submitted by Benny Sjostrand <[EMAIL PROTECTED]> */
UNUSUAL_DEV( 0x0686, 0x4011, 0x0001, 0x0001,
@@ -923,6 +942,13 @@
"Black Silver",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_IGNORE_RESIDUE ),
+
+/* Reported by Radovan Garabik <[EMAIL PROTECTED]> */
+UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999,
+ "MPIO",
+ "HS200",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_GO_SLOW ),
#ifdef CONFIG_USB_STORAGE_SDDR55
UNUSUAL_DEV( 0x55aa, 0xa103, 0x0000, 0x9999,
diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
--- a/drivers/usb/storage/usb.c 2005-02-17 22:06:51 -08:00
+++ b/drivers/usb/storage/usb.c 2005-02-17 22:06:51 -08:00
@@ -479,6 +479,13 @@
unusual_dev->useTransport;
us->flags = unusual_dev->flags;
+ /*
+ * This flag is only needed when we're in high-speed, so let's
+ * disable it if we're in full-speed
+ */
+ if (dev->speed != USB_SPEED_HIGH)
+ us->flags &= ~US_FL_GO_SLOW;
+
/* Log a message if a non-generic unusual_dev entry contains an
* unnecessary subclass or protocol override. This may stimulate
* reports from users that will help us remove unneeded entries
diff -Nru a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
--- a/drivers/usb/storage/usb.h 2005-02-17 22:06:51 -08:00
+++ b/drivers/usb/storage/usb.h 2005-02-17 22:06:51 -08:00
@@ -76,6 +76,7 @@
#define US_FL_IGNORE_RESIDUE 0x00000100 /* reported residue is wrong */
#define US_FL_BULK32 0x00000200 /* Uses 32-byte CBW length */
#define US_FL_NOT_LOCKABLE 0x00000400 /* PREVENT/ALLOW not supported */
+#define US_FL_GO_SLOW 0x00000800 /* Need delay after Command phase */
/* Dynamic flag definitions: used in set_bit() etc. */
#define US_FLIDX_URB_ACTIVE 18 /* 0x00040000 current_urb is in use */
signature.asc
Description: OpenPGP digital signature
