Commit ad72bf4f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: clean up usages of wait_ms() now that we have msleep()

parent a715632e
...@@ -297,7 +297,7 @@ static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap) ...@@ -297,7 +297,7 @@ static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap)
/* and wait a while for it to happen */ /* and wait a while for it to happen */
do { do {
wait_ms (10); msleep(10);
msec -= 10; msec -= 10;
pci_read_config_dword (to_pci_dev(ehci->hcd.self.controller), where, &cap); pci_read_config_dword (to_pci_dev(ehci->hcd.self.controller), where, &cap);
} while ((cap & (1 << 16)) && msec); } while ((cap & (1 << 16)) && msec);
......
...@@ -118,7 +118,7 @@ static int ehci_hub_resume (struct usb_hcd *hcd) ...@@ -118,7 +118,7 @@ static int ehci_hub_resume (struct usb_hcd *hcd)
writel (temp, &ehci->regs->port_status [i]); writel (temp, &ehci->regs->port_status [i]);
} }
i = HCS_N_PORTS (ehci->hcs_params); i = HCS_N_PORTS (ehci->hcs_params);
wait_ms (20); msleep (20);
while (i--) { while (i--) {
temp = readl (&ehci->regs->port_status [i]); temp = readl (&ehci->regs->port_status [i]);
if ((temp & PORT_SUSPEND) == 0) if ((temp & PORT_SUSPEND) == 0)
......
...@@ -922,7 +922,7 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data) ...@@ -922,7 +922,7 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data)
kfree(buf); kfree(buf);
return -EIO; return -EIO;
} }
wait_ms(aiptek->curSetting.programmableDelay); msleep(aiptek->curSetting.programmableDelay);
if ((ret = if ((ret =
aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) {
......
...@@ -1073,7 +1073,7 @@ static int unlink1 (struct usbtest_dev *dev, int pipe, int size, int async) ...@@ -1073,7 +1073,7 @@ static int unlink1 (struct usbtest_dev *dev, int pipe, int size, int async)
/* unlinking that should always work. variable delay tests more /* unlinking that should always work. variable delay tests more
* hcd states and code paths, even with little other system load. * hcd states and code paths, even with little other system load.
*/ */
wait_ms (jiffies % (2 * INTERRUPT_RATE)); msleep (jiffies % (2 * INTERRUPT_RATE));
retry: retry:
retval = usb_unlink_urb (urb); retval = usb_unlink_urb (urb);
if (retval == -EBUSY || retval == -EIDRM) { if (retval == -EBUSY || retval == -EIDRM) {
......
...@@ -720,7 +720,7 @@ static int ax8817x_bind(struct usbnet *dev, struct usb_interface *intf) ...@@ -720,7 +720,7 @@ static int ax8817x_bind(struct usbnet *dev, struct usb_interface *intf)
(gpio_bits >> (i * 8)) & 0xff, 0, 0, (gpio_bits >> (i * 8)) & 0xff, 0, 0,
buf)) < 0) buf)) < 0)
return ret; return ret;
wait_ms(5); msleep(5);
} }
if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_RX_CTL, 0x80, 0, 0, buf)) < 0) { if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_RX_CTL, 0x80, 0, 0, buf)) < 0) {
......
...@@ -552,7 +552,7 @@ static void TIChasePort(struct edgeport_port *port) ...@@ -552,7 +552,7 @@ static void TIChasePort(struct edgeport_port *port)
break; break;
/* Block the thread for 10ms */ /* Block the thread for 10ms */
wait_ms (10); msleep(10);
if (last_count == port->tx.count) { if (last_count == port->tx.count) {
/* No activity.. count down. */ /* No activity.. count down. */
...@@ -581,7 +581,7 @@ static void TIChasePort(struct edgeport_port *port) ...@@ -581,7 +581,7 @@ static void TIChasePort(struct edgeport_port *port)
/* This function takes 4 ms; */ /* This function takes 4 ms; */
if (!TIIsTxActive (port)) { if (!TIIsTxActive (port)) {
/* Delay a few char times */ /* Delay a few char times */
wait_ms (50); msleep(50);
dbg ("%s - Empty", __FUNCTION__); dbg ("%s - Empty", __FUNCTION__);
return; return;
} }
......
...@@ -321,7 +321,7 @@ static int datafab_determine_lun(struct us_data *us, ...@@ -321,7 +321,7 @@ static int datafab_determine_lun(struct us_data *us,
goto leave; goto leave;
} }
wait_ms(20); msleep(20);
} }
rc = USB_STOR_TRANSPORT_ERROR; rc = USB_STOR_TRANSPORT_ERROR;
......
...@@ -806,7 +806,7 @@ static int isd200_srst( struct us_data *us ) ...@@ -806,7 +806,7 @@ static int isd200_srst( struct us_data *us )
retStatus = ISD200_ERROR; retStatus = ISD200_ERROR;
} else { } else {
/* delay 10ms to give the drive a chance to see it */ /* delay 10ms to give the drive a chance to see it */
wait_ms(10); msleep(10);
transferStatus = isd200_action( us, ACTION_REENABLE, NULL, 0 ); transferStatus = isd200_action( us, ACTION_REENABLE, NULL, 0 );
if (transferStatus != ISD200_TRANSPORT_GOOD) { if (transferStatus != ISD200_TRANSPORT_GOOD) {
...@@ -814,7 +814,7 @@ static int isd200_srst( struct us_data *us ) ...@@ -814,7 +814,7 @@ static int isd200_srst( struct us_data *us )
retStatus = ISD200_ERROR; retStatus = ISD200_ERROR;
} else { } else {
/* delay 50ms to give the drive a chance to recover after SRST */ /* delay 50ms to give the drive a chance to recover after SRST */
wait_ms(50); msleep(50);
} }
} }
......
...@@ -253,7 +253,7 @@ static int jumpshot_write_data(struct us_data *us, ...@@ -253,7 +253,7 @@ static int jumpshot_write_data(struct us_data *us,
if (result != USB_STOR_TRANSPORT_GOOD) { if (result != USB_STOR_TRANSPORT_GOOD) {
// I have not experimented to find the smallest value. // I have not experimented to find the smallest value.
// //
wait_ms(50); msleep(50);
} }
} while ((result != USB_STOR_TRANSPORT_GOOD) && (waitcount < 10)); } while ((result != USB_STOR_TRANSPORT_GOOD) && (waitcount < 10));
......
...@@ -202,13 +202,13 @@ static int usbat_wait_not_busy(struct us_data *us, int minutes) ...@@ -202,13 +202,13 @@ static int usbat_wait_not_busy(struct us_data *us, int minutes)
} }
if (i<500) if (i<500)
wait_ms(10); // 5 seconds msleep(10); // 5 seconds
else if (i<700) else if (i<700)
wait_ms(50); // 10 seconds msleep(50); // 10 seconds
else if (i<1200) else if (i<1200)
wait_ms(100); // 50 seconds msleep(100); // 50 seconds
else else
wait_ms(1000); // X minutes msleep(1000); // X minutes
} }
US_DEBUGP("Waited not busy for %d minutes, timing out.\n", US_DEBUGP("Waited not busy for %d minutes, timing out.\n",
...@@ -691,7 +691,7 @@ int init_8200e(struct us_data *us) ...@@ -691,7 +691,7 @@ int init_8200e(struct us_data *us)
US_DEBUGP("INIT 1\n"); US_DEBUGP("INIT 1\n");
wait_ms(2000); msleep(2000);
if (usbat_read_user_io(us, status) != if (usbat_read_user_io(us, status) !=
USB_STOR_XFER_GOOD) USB_STOR_XFER_GOOD)
...@@ -725,7 +725,7 @@ int init_8200e(struct us_data *us) ...@@ -725,7 +725,7 @@ int init_8200e(struct us_data *us)
US_DEBUGP("INIT 5\n"); US_DEBUGP("INIT 5\n");
wait_ms(250); msleep(250);
// Write 0x80 to ISA port 0x3F // Write 0x80 to ISA port 0x3F
...@@ -776,7 +776,7 @@ int init_8200e(struct us_data *us) ...@@ -776,7 +776,7 @@ int init_8200e(struct us_data *us)
US_DEBUGP("INIT 12\n"); US_DEBUGP("INIT 12\n");
wait_ms(1400); msleep(1400);
if (usbat_read_user_io(us, status) != if (usbat_read_user_io(us, status) !=
USB_STOR_XFER_GOOD) USB_STOR_XFER_GOOD)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment