Browse Source

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
master
wanghongmei 14 years ago
parent
commit
644bebd57f
  1. 9
      sys/dev/usb/usb-ohci.c

9
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;
}

Loading…
Cancel
Save