From 644bebd57f9e0a26c0282c584a98716ae7846555 Mon Sep 17 00:00:00 2001 From: wanghongmei Date: Fri, 10 Jun 2011 16:38:44 +0800 Subject: [PATCH] Fixup bug for some kind usb disk which can't be initialized during BIOS booting process Time out error occurs during initializing some kind usb disk, and PMON will stop here. This patch is used to fix the problem. It passed test with foure Netac usb diskes attached at the same time. by xiaqichao@ict.ac.cn --- sys/dev/usb/usb-ohci.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/usb-ohci.c b/sys/dev/usb/usb-ohci.c index df23f4c3..9fe75ff6 100644 --- a/sys/dev/usb/usb-ohci.c +++ b/sys/dev/usb/usb-ohci.c @@ -2498,13 +2498,14 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer, } /* allow more time for a BULK device to react - some are slow */ -#define BULK_TO 1000 /* timeout in milliseconds */ +#define BULK_TO 500 /* timeout in milliseconds */ +//#define BULK_TO 1000 /* timeout in milliseconds */ if (usb_pipetype (pipe) == PIPE_BULK) timeout = BULK_TO; else timeout = 2000; - timeout *= 10; + timeout *= 40; /* wait for it to complete */ #if 0 @@ -2779,8 +2780,8 @@ static int hc_reset (ohci_t *ohci) err("USB HC reset timed out!"); return -1; } - udelay (500); // changed for test liujl -// udelay (1); +// udelay (500); // changed for test liujl + udelay (1); // by xqch } return 0; }