Add possibility of bulk reading with short timeout

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-07-18 21:35:22 +02:00
parent aa86530e38
commit d556277751
4 changed files with 26 additions and 10 deletions

View file

@ -654,7 +654,7 @@ grub_ohci_transaction (grub_ohci_td_t td,
static grub_usb_err_t
grub_ohci_transfer (grub_usb_controller_t dev,
grub_usb_transfer_t transfer)
grub_usb_transfer_t transfer, int timeout)
{
struct grub_ohci *o = (struct grub_ohci *) dev->data;
grub_ohci_ed_t ed_virt;
@ -832,7 +832,7 @@ grub_ohci_transfer (grub_usb_controller_t dev,
}
/* Safety measure to avoid a hang. */
maxtime = grub_get_time_ms () + 1000;
maxtime = grub_get_time_ms () + timeout;
/* Wait until the transfer is completed or STALLs. */
do