summaryrefslogtreecommitdiff
path: root/common/usb_storage.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-03-02 14:05:39 +0000
committerwdenk <wdenk>2004-03-02 14:05:39 +0000
commitf8d813e34f03823ddfeb3b9f44a9807d3ffb847e (patch)
tree8aa8c3521520f576591d184c858d6ed3eb7a180e /common/usb_storage.c
parente7c85689bbf2f6aaeb68d5976da642ae80fa06b2 (diff)
* Fix SDRAM timings for LITE5200 / IceCube board
* Handle Auti-MDIX / connection status for INCA-IP * Fix USB problems when attempting to read 0 bytes
Diffstat (limited to 'common/usb_storage.c')
-rw-r--r--common/usb_storage.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c
index dbe9cd9b8e7..fd116be86ac 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -899,8 +899,12 @@ unsigned long usb_stor_read(int device, unsigned long blknr, unsigned long blkcn
unsigned short smallblks;
struct usb_device *dev;
int retry,i;
- ccb *srb=&usb_ccb;
- device&=0xff;
+ ccb *srb = &usb_ccb;
+
+ if (blkcnt == 0)
+ return 0;
+
+ device &= 0xff;
/* Setup device
*/
USB_STOR_PRINTF("\nusb_read: dev %d \n",device);