Hi,
this is a new waiting helper safe even if we are left on a waitqueue.
This version addresses Alan's concerns about ifdefs. Please apply.
Regards
Oliver
You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.
===================================================================
[EMAIL PROTECTED], 2004-05-17 22:54:16+02:00, [EMAIL PROTECTED]
- add delay helper that is safe even if we are still on another waitqueue
drivers/usb/core/usb.c | 11 +++++++++++
include/linux/usb.h | 2 ++
2 files changed, 13 insertions(+)
diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.c Mon May 17 22:58:26 2004
+++ b/drivers/usb/core/usb.c Mon May 17 22:58:26 2004
@@ -1483,6 +1483,16 @@
return 0;
}
+void usb_uninterruptible_sleep_ms(int msecs)
+{
+ long timeout = msecs_to_jiffies(msecs);
+
+ while(timeout) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ timeout = schedule_timeout(timeout);
+ }
+}
+
struct bus_type usb_bus_type = {
.name = "usb",
.match = usb_device_match,
@@ -1600,6 +1610,7 @@
EXPORT_SYMBOL(usb_disconnect);
EXPORT_SYMBOL(__usb_get_extra_descriptor);
+EXPORT_SYMBOL(usb_uninterruptible_sleep_ms);
EXPORT_SYMBOL(usb_find_device);
EXPORT_SYMBOL(usb_get_current_frame_number);
diff -Nru a/include/linux/usb.h b/include/linux/usb.h
--- a/include/linux/usb.h Mon May 17 22:58:26 2004
+++ b/include/linux/usb.h Mon May 17 22:58:26 2004
@@ -31,6 +31,8 @@
mdelay(ms);
}
+void usb_uninterruptible_sleep_ms(int msecs);
+
struct usb_device;
struct usb_driver;
===================================================================
This BitKeeper patch contains the following changesets:
1.1725
## Wrapped with gzip_uu ##
M'XL( '(GJ4 [5576_;.!!\-G_% GUQ440F*>K#+GQ(TPNN0=/&<[EMAIL PROTECTED]
MH*FUI:[EMAIL PROTECTED])35J7"4]<9?#G>7,[EMAIL PROTECTED]<632CGJ[*:S3D";S2
MUHUZ*ZGFZ([EMAIL PROTECTED]&L?&[EMAIL PROTECTED]&\HCXG(ETJ@ ?
MLJ,>"\+;%?=YC:/>]/2/J_,74T+&8WA9R'J)E^A@/"9.FVM9Y?98NJ+2=>",
MK.T*G0R47K6WJ2VGE/LW8DE(H[AE,15)JUC.F!0,<\I%&HL[M/5:#1,::)M7
M'[EMAIL PROTECTED]'XW<D4=B&42A"\CNP@"4\ BH&[EMAIL PROTECTED]>4CRB%'>OC_W8'
MGG$XHN0$_E\B+XF"(Y!Y#CE6\C,46*W1@"[EMAIL PROTECTED]"E0L$O,8:[EMAIL PROTECTED]
M*M UR%J[PB=O9.D^-M@@>0VA2$-&)G>])T<_^1!")26_[>%9UJIJ<MP*X].@
[EMAIL PROTECTED],]X*'C+* ]Y&^;#89BH4"4L2E.Z>+S#CV%N;]'#"IJVU/=RN+>XW'1'
MV YB"Z/NE28H2UH1\6':[EMAIL PROTECTED]&<[EMAIL PROTECTED](RIM\ [V?G4BH4QLI?]P
M_GX?'[EMAIL PROTECTED])U'A32GV'R //[EMAIL PROTECTED]><,<%9RR/!XYU'8O&]
M16BZWR*,_5J/U+C96>(;LRR:6KE2UU[^NQNX@".SV7Y>SI-'+N, 8YPQD4;
M*+G690X>)6OJLO:M-\W:E?,*,ULAKK.5[?ME6%E4]BGY0GJ^!TMPY0IUXX?A
M+I YG?U3+A8EVOXN\SGID=ZF*"OLW^0^!;^Y9]%EJC$&:Y=9)QWV9R\N7V=7
M;\_>SDZGTZO)[.SD_+3;WKL[PZK"7[\OZ6;I%M*G?25?R7O/)J8<&#G]<W(Q
MG667?[TYN3CO_XB5W]N)^P&?[E?VP0.#J*!JE+3'Y<(#*NS0;E3]^,"@G:1C
M3MM8>$GM)$W30R3]"Z?^VFBGN]\F++39:GLKZVZ*=U/N.Q4_0/80"8<A\)_2
=[W,OE=N?O!>5^F";U=CS3),HRLF_02RN:%\(
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel