Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ad72bf4f
Commit
ad72bf4f
authored
May 18, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: clean up usages of wait_ms() now that we have msleep()
parent
a715632e
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
18 additions
and
18 deletions
+18
-18
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hcd.c
+1
-1
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci-hub.c
+1
-1
drivers/usb/input/aiptek.c
drivers/usb/input/aiptek.c
+1
-1
drivers/usb/misc/usbtest.c
drivers/usb/misc/usbtest.c
+1
-1
drivers/usb/net/usbnet.c
drivers/usb/net/usbnet.c
+1
-1
drivers/usb/serial/io_ti.c
drivers/usb/serial/io_ti.c
+2
-2
drivers/usb/storage/datafab.c
drivers/usb/storage/datafab.c
+1
-1
drivers/usb/storage/isd200.c
drivers/usb/storage/isd200.c
+2
-2
drivers/usb/storage/jumpshot.c
drivers/usb/storage/jumpshot.c
+1
-1
drivers/usb/storage/shuttle_usbat.c
drivers/usb/storage/shuttle_usbat.c
+7
-7
No files found.
drivers/usb/host/ehci-hcd.c
View file @
ad72bf4f
...
@@ -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
);
...
...
drivers/usb/host/ehci-hub.c
View file @
ad72bf4f
...
@@ -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
)
...
...
drivers/usb/input/aiptek.c
View file @
ad72bf4f
...
@@ -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
)
{
...
...
drivers/usb/misc/usbtest.c
View file @
ad72bf4f
...
@@ -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
)
{
...
...
drivers/usb/net/usbnet.c
View file @
ad72bf4f
...
@@ -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
)
{
...
...
drivers/usb/serial/io_ti.c
View file @
ad72bf4f
...
@@ -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
;
}
}
...
...
drivers/usb/storage/datafab.c
View file @
ad72bf4f
...
@@ -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
;
...
...
drivers/usb/storage/isd200.c
View file @
ad72bf4f
...
@@ -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
);
}
}
}
}
...
...
drivers/usb/storage/jumpshot.c
View file @
ad72bf4f
...
@@ -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
));
...
...
drivers/usb/storage/shuttle_usbat.c
View file @
ad72bf4f
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment