diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-05-09 16:27:58 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-05-09 16:27:58 -0700 |
commit | fbbd5ef9fa373ca30e5a302a432e5482aafff7fd (patch) | |
tree | 457e8c2580133c9204095f3fbbe079e05accf8c0 /usb | |
parent | f628fa265a01b8223d60715906b86cffdc72d5f4 (diff) | |
download | patches-fbbd5ef9fa373ca30e5a302a432e5482aafff7fd.tar.gz |
more patches
Diffstat (limited to 'usb')
-rw-r--r-- | usb/usb-emagic-usb-firmware-loading-fixes.patch | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/usb/usb-emagic-usb-firmware-loading-fixes.patch b/usb/usb-emagic-usb-firmware-loading-fixes.patch new file mode 100644 index 0000000000000..f35e23e061e28 --- /dev/null +++ b/usb/usb-emagic-usb-firmware-loading-fixes.patch @@ -0,0 +1,96 @@ +From akpm@osdl.org Tue May 9 12:34:49 2006 +Message-Id: <200605091934.k49JYfq8019359@shell0.pdx.osdl.net> +Subject: USB: Emagic USB firmware loading fixes +To: xiphmont@xiph.org, greg@kroah.com, mm-commits@vger.kernel.org +From: akpm@osdl.org +Date: Tue, 9 May 2006 12:37:22 -0700 + +From: Monty <xiphmont@xiph.org> + +It's become apparent as machines get faster that the emagic kernel firmware +loaders (based on the ezusb loader) have a reset race. a 400MHz TiBook +never tripped it, but a 2GHz Pentium M seems to hit it about 30% of the +time. The bug is seen as a hung USB box and the kernel error: + +drivers/usb/misc/emi62.c: emi62_load_firmware - error loading firmware: +error = -110 + +The patch below inserts a delay after deasserting reset to allow the box to +settle before a new command is issued. This affects only device startup. + +Signed-off-by: Andrew Morton <akpm@osdl.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/misc/emi26.c | 4 ++++ + drivers/usb/misc/emi62.c | 4 ++++ + 2 files changed, 8 insertions(+) + +--- gregkh-2.6.orig/drivers/usb/misc/emi26.c ++++ gregkh-2.6/drivers/usb/misc/emi26.c +@@ -15,6 +15,7 @@ + #include <linux/module.h> + #include <linux/init.h> + #include <linux/usb.h> ++#include <linux/delay.h> + + #define MAX_INTEL_HEX_RECORD_LENGTH 16 + typedef struct _INTEL_HEX_RECORD +@@ -114,6 +115,7 @@ static int emi26_load_firmware (struct u + + /* De-assert reset (let the CPU run) */ + err = emi26_set_reset(dev,0); ++ msleep(250); /* let device settle */ + + /* 2. We upload the FPGA firmware into the EMI + * Note: collect up to 1023 (yes!) bytes and send them with +@@ -150,6 +152,7 @@ static int emi26_load_firmware (struct u + goto wraperr; + } + } ++ msleep(250); /* let device settle */ + + /* De-assert reset (let the CPU run) */ + err = emi26_set_reset(dev,0); +@@ -192,6 +195,7 @@ static int emi26_load_firmware (struct u + err("%s - error loading firmware: error = %d", __FUNCTION__, err); + goto wraperr; + } ++ msleep(250); /* let device settle */ + + /* return 1 to fail the driver inialization + * and give real driver change to load */ +--- gregkh-2.6.orig/drivers/usb/misc/emi62.c ++++ gregkh-2.6/drivers/usb/misc/emi62.c +@@ -15,6 +15,7 @@ + #include <linux/init.h> + #include <linux/module.h> + #include <linux/usb.h> ++#include <linux/delay.h> + + #define MAX_INTEL_HEX_RECORD_LENGTH 16 + typedef struct _INTEL_HEX_RECORD +@@ -123,6 +124,7 @@ static int emi62_load_firmware (struct u + + /* De-assert reset (let the CPU run) */ + err = emi62_set_reset(dev,0); ++ msleep(250); /* let device settle */ + + /* 2. We upload the FPGA firmware into the EMI + * Note: collect up to 1023 (yes!) bytes and send them with +@@ -166,6 +168,7 @@ static int emi62_load_firmware (struct u + err("%s - error loading firmware: error = %d", __FUNCTION__, err); + goto wraperr; + } ++ msleep(250); /* let device settle */ + + /* 4. We put the part of the firmware that lies in the external RAM into the EZ-USB */ + +@@ -228,6 +231,7 @@ static int emi62_load_firmware (struct u + err("%s - error loading firmware: error = %d", __FUNCTION__, err); + goto wraperr; + } ++ msleep(250); /* let device settle */ + + kfree(buf); + |