Hi,
this eliminates sleep_on() from the speedtouch driver.
Greg, could you consider rejecting drivers that use sleep_on()
unless there's a big fat comment explaining why it's safe?
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], 2002-12-17 17:19:51+01:00, [EMAIL PROTECTED]
- eliminate sleep_on
speedtouch.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletion(-)
diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c
--- a/drivers/usb/misc/speedtouch.c Tue Dec 17 17:22:05 2002
+++ b/drivers/usb/misc/speedtouch.c Tue Dec 17 17:22:05 2002
@@ -432,17 +432,32 @@
strcpy (current->comm, "kSpeedSARd");
add_wait_queue (&udsl_wqh, &wait);
+ set_current_state(TASK_INTERRUPTIBLE);
for (;;) {
- interruptible_sleep_on (&udsl_wqh);
+ schedule();
if (signal_pending (current))
break;
PDEBUG ("SpeedSARd awoke\n");
+retry:
for (i = 0; i < MAX_UDSL; i++)
if (minor_data[i])
udsl_atm_processqueue (minor_data[i]);
+ set_current_state(TASK_INTERRUPTIBLE);
+ /* we must check for data recieved and restart processing if there's
+any */
+ for (i = 0; i < MAX_UDSL; i++) {
+ spin_lock_irq(&minor_data[i]->recvqlock);
+ if (!skb_queue_empty(&minor_data[i]->recvqueue)) {
+ spin_unlock_irq(&minor_data[i]->recvqlock);
+ set_current_state(TASK_RUNNING);
+ goto retry;
+ } else {
+ spin_unlock_irq(&minor_data[i]->recvqlock);
+ }
+ }
};
+ set_current_state(TASK_RUNNING);
remove_wait_queue (&udsl_wqh, &wait);
PDEBUG ("SpeedSARd is exiting\n");
complete_and_exit(&thread_grave, 0);
===================================================================
This BitKeeper patch contains the following changesets:
1.1117
## Wrapped with gzip_uu ##
begin 664 bkpatch13314
M'XL(`"Y/_ST``[55;6O;,!#^;/V*&X4M;4@L^2UQNHR^TH5V64@;&(QA'/N2
MF"16*LGMPMS_/LDI+8,N9-UF9.33W3W/Z>X![\%(HNA8?)'=H2![\)%+I4W,
M>8[-&5_B(LN+[TTNIMHYY%P[;7-L;S+L\;RA!**TI\+QB8X9Q"J9@7;)CL6:
M[M.)6J^P8PW/+T97QT-"NETXG<7Y%*]10;=+QO.CM,!%<RYX/#-TY9.[="AE
MC#D^=?V`^:73=EVO9`$=I_HS=5KA9!R$9%/0T4NE_XKE,(>U&[EMAIL PROTECTED]
M,V!-S=`"ZMA,KQ:P5H>%'9_5*>M0"ENPH<Z@0<D)_/T-3DD"#=#0RRR/%8)<
M(*XBGI-+T'7ZE`R>>T8:?_@00F-*/L!4X/1H4V/"EV4JS,VD7<BQO<QD8LL5
M8JIXD6A_U2W:=EIF=]HE]?Q64)JB)RST0J\=4C^=;.O.#OC5-`(6^DQ/PP^\
M2AM;TXQ>_OTUM@IHQVML1$4#)W`VHG)>*:D`&NS_:\IT^S,TQ'VUM$8&VQO_
M"M'U/-<#1BR)*DH*(3!7D52ZDMK-\?5EU.O?G`^'H\%-[^3J?/^0G'FN[I3)
M,IMER62&:;'`FO;U/(_J0X%*K#O&<H$Y)F8W:,NR#^`>85E(!1HVF<.$"TAC
M%8/`),,[3"'.4VUH%*%@)7B"4F;Y%+()J!D*?"=UQ!H.;(UFDFL9=($>0@;O
MX=/QEVAT=GVEK7I]'W[H$$NNLCQ:\&0>9>*V]E;/@(O(,'[-OC4^:-:[6^.M
MJK,T2>V-G(^CVP(+C'"Y4NN7<XQ__Y%BPU'DN[+\KEW#4;_?ZU\\!DVYXE!U
KNK(?M((DOH[P@9A7C\O?HH-G]J<?1C4B62R[L9]2]&(D/P&<"?*5K08`````
`
end
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel