lkml.org 
[lkml]   [2000]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From

Against test8pre1

Every one that doesn't check interrupts has just been made UNINTERRUPTIBLE.
This is not clearly right for some of these, but maintainers need to fix these up ... ?

sorry for the mass mailing

thanks
john

--- drivers/net/wan/comx-hw-comx.c Mon Jul 10 03:15:29 2000
+++ drivers/net/wan/comx-hw-comx.c.new Fri Sep 1 02:46:44 2000
@@ -487,6 +487,7 @@
COMX_CMD(dev, COMX_CMD_INIT);
jiffs = jiffies;
while (COMX_readw(dev, OFF_A_L2_LINKUP) != 1 && jiffies < jiffs + HZ) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
}

--- drivers/sound/es1371.c Sat Aug 26 16:26:49 2000
+++ drivers/sound/es1371.c.new Fri Sep 1 02:52:30 2000
@@ -2812,6 +2812,7 @@
tmo2 = tmo - jiffies;
if (tmo2 <= 0)
break;
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(tmo2);
}
}
--- drivers/isdn/icn/icn.c Sat Aug 26 16:26:34 2000
+++ drivers/isdn/icn/icn.c.new Fri Sep 1 02:55:13 2000
@@ -1491,8 +1491,10 @@
if (!card->leased) {
card->leased = 1;
while (card->ptype == ISDN_PTYPE_UNKNOWN) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(ICN_BOOT_TIMEOUT1);
}
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(ICN_BOOT_TIMEOUT1);
sprintf(cbuf, "00;FV2ON\n01;EAZ%c\n02;EAZ%c\n",
(a & 1)?'1':'C', (a & 2)?'2':'C');
--- drivers/usb/ov511.c Fri Sep 1 03:00:57 2000
+++ drivers/usb/ov511.c.new Fri Sep 1 03:01:23 2000
@@ -2674,6 +2674,7 @@

#if 1 /* Maybe this will fix detection problems? MM */
/* Wait for it to initialize */
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout (1 + 150 * HZ / 1000);
#endif

@@ -2687,6 +2688,7 @@
/* Reset the 76xx */
if (ov511_i2c_write(dev, 0x12, 0x80) < 0) return -1;
/* Wait for it to initialize */
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout (1 + 150 * HZ / 1000);
/* Dummy read to sync I2C */
if (ov511_i2c_read(dev, 0x00) < 0) return -1;
--- drivers/usb/microtek.c Fri Aug 11 00:21:38 2000
+++ drivers/usb/microtek.c.new Fri Sep 1 03:03:38 2000
@@ -313,6 +313,7 @@

while( !atomic_read(&desc->lock.count) ) {
/* Is there a function to check if the semaphore is locked? */
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout( MTS_ABORT_TIMEOUT );
MTS_DEBUG_GOT_HERE();
mts_urb_abort(desc);
--- drivers/usb/uhci.c Fri Aug 11 00:21:40 2000
+++ drivers/usb/uhci.c.new Fri Sep 1 03:05:27 2000
@@ -1553,8 +1553,10 @@
if (errorcount--)
dbg("uhci_unlink_urb called from interrupt for urb %p", urb);
udelay(1000);
- } else
+ } else {
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1+1*HZ/1000);
+ }

if (urb->complete)
urb->complete(urb);
--- drivers/usb/dabusb.c Fri Aug 11 00:21:37 2000
+++ drivers/usb/dabusb.c.new Fri Sep 1 03:08:20 2000
@@ -594,6 +594,7 @@
if (file->f_flags & O_NONBLOCK) {
return -EBUSY;
}
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout (HZ / 2);

if (signal_pending (current)) {
--- drivers/usb/storage/transport.c Wed Aug 30 18:46:53 2000
+++ drivers/usb/storage/transport.c.new Fri Sep 1 03:14:07 2000
@@ -1168,6 +1170,7 @@
0, us->ifnum, cmd, sizeof(cmd), HZ*5);

/* long wait for reset */
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ*6);

US_DEBUGP("CB_reset: clearing endpoint halt\n");
@@ -1204,6 +1207,7 @@
usb_sndbulkpipe(us->pusb_dev, us->ep_out));

/* long wait for reset */
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ*6);

return result;
--- drivers/i2c/i2c-algo-pcf.c Wed Aug 2 20:38:26 2000
+++ drivers/i2c/i2c-algo-pcf.c.new Fri Sep 1 03:21:47 2000
@@ -124,12 +124,6 @@
}


-static inline void pcf_sleep(unsigned long timeout)
-{
- schedule_timeout( timeout * HZ);
-}
-
-
static int wait_for_pin(struct i2c_algo_pcf_data *adap, int *status) {

int timeout = DEF_TIMEOUT;
--- drivers/i2c/i2c-elektor.c Fri Sep 1 03:24:14 2000
+++ drivers/i2c/i2c-elektor.c.new Fri Sep 1 03:24:48 2000
@@ -119,15 +119,6 @@
}


-
-#if 0
-static void pcf_isa_sleep(unsigned long timeout)
-{
- schedule_timeout( timeout * HZ);
-}
-#endif
-
-
static void pcf_isa_waitforpin(void) {

int timeout = 2;
--- drivers/mtd/cfi_cmdset_0001.c Sat Jul 15 21:11:51 2000
+++ drivers/mtd/cfi_cmdset_0001.c.new Fri Sep 1 03:31:07 2000
@@ -624,7 +624,13 @@

timeo = jiffies + (HZ*2);
spin_unlock_bh(chip->mutex);
+
+ set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ);
+
+ if (signal_pending(current))
+ return -EINTR;
+
spin_lock_bh(chip->mutex);

/* FIXME. Use a timer to check this, and return immediately. */
--- drivers/mtd/jedec.c Tue Jul 11 19:33:59 2000
+++ drivers/mtd/jedec.c.new Fri Sep 1 03:34:51 2000
@@ -601,8 +601,11 @@
todo_left--;
}

-/* if (NoTime == 0)
- Time += HZ/10 - schedule_timeout(HZ/10);*/
+/* if (NoTime == 0) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ Time += HZ/10 - schedule_timeout(HZ/10);
+ } */
+
NoTime = 0;

Last[Count % 4] = map->read32(map,(chip->base >> chip->addrshift) + chip->start + off);
--- drivers/mtd/mapped.c Tue Jul 11 19:33:59 2000
+++ drivers/mtd/mapped.c.new Fri Sep 1 03:36:04 2000
@@ -418,8 +418,10 @@
for (Count = 3; (Last[(Count - 1) % 4] & (1 << 7)) == 0 &&
Last[(Count - 1) % 4] != Last[(Count - 2) % 4]; Count++)
{
- if (NoTime == 0)
+ if (NoTime == 0) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
Time += HZ/10 - schedule_timeout(HZ/10);
+ }
NoTime = 0;

Last[Count % 4] = readb(base);
--- drivers/mtd/cfi_cmdset_0002.c Sat Jul 15 21:11:51 2000
+++ drivers/mtd/cfi_cmdset_0002.c.new Fri Sep 1 03:37:58 2000
@@ -357,7 +357,12 @@
timeo = jiffies + (HZ*20);

spin_unlock_bh(chip->mutex);
+ set_current_state(TASK_INTERRUPTBLE);
schedule_timeout(HZ);
+
+ if (signal_pending(current))
+ return -EINTR;
+
spin_lock_bh(chip->mutex);

/* FIXME. Use a timer to check this, and return immediately. */
--- drivers/media/video/buz.c Sat Aug 26 16:26:36 2000
+++ drivers/media/video/buz.c.new Fri Sep 1 03:39:45 2000
@@ -2925,6 +2925,7 @@

/* sleep 1 second */

+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ);

/* Get status of video decoder */
--- drivers/sound/ac97_codec.c Mon Jul 10 03:21:28 2000
+++ drivers/sound/ac97_codec.c.new Fri Sep 1 04:01:44 2000
@@ -561,8 +561,10 @@
/* also according to spec, we wait for codec-ready state */
if (codec->codec_wait)
codec->codec_wait(codec);
- else
+ else {
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(5);
+ }

if ((audio = codec->codec_read(codec, AC97_RESET)) & 0x8000) {
printk(KERN_ERR "ac97_codec: %s ac97 codec not present\n",
--- drivers/atm/ambassador.c Tue Jul 11 19:33:27 2000
+++ drivers/atm/ambassador.c.new Fri Sep 1 04:51:49 2000
@@ -613,19 +613,21 @@
while (timeout) {
// go to sleep
// PRINTD (DBG_CMD, "wait: sleeping %lu for command", timeout);
+ set_current_state(TASK_UNINTERRUPTIBLE);
timeout = schedule_timeout (timeout);
- // woken up by timeout or signal
}

// wait for my slot to be reached (all waiters are here or above, until...)
while (ptrs->out != my_slot) {
PRINTD (DBG_CMD, "wait: command slot (now at %p)", ptrs->out);
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule();
}

// wait on my slot (... one gets to its slot, and... )
while (ptrs->out->request != cpu_to_be32 (SRB_COMPLETE)) {
PRINTD (DBG_CMD, "wait: command slot completion");
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule();
}

@@ -1991,6 +1993,7 @@

while (!lb->result || lb->result == cpu_to_be32 (COMMAND_IN_PROGRESS))
if (timeout) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
timeout = schedule_timeout (timeout);
} else {
PRINTD (DBG_LOAD|DBG_ERR, "command %d timed out", cmd);
@@ -2004,6 +2007,7 @@
timeout = HZ/10;
while (rd_plain (dev, offsetof(amb_mem, doorbell)))
if (timeout) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
timeout = schedule_timeout (timeout);
} else {
PRINTD (DBG_LOAD|DBG_ERR, "start command did not clear doorbell, res=%08x",
@@ -2116,11 +2120,13 @@
// 4.2 second wait
timeout = HZ*42/10;
while (timeout)
+ set_current_state(TASK_UNINTERRUPTIBLE);
timeout = schedule_timeout (timeout);
// half second time-out
timeout = HZ/2;
while (!rd_plain (dev, offsetof(amb_mem, mb.loader.ready)))
if (timeout) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
timeout = schedule_timeout (timeout);
} else {
PRINTD (DBG_LOAD|DBG_ERR, "reset timed out");
@@ -2240,11 +2246,13 @@
// 2.2 second wait (must not touch doorbell during 2 second DMA test)
timeout = HZ*22/10;
while (timeout)
+ set_current_state(TASK_UNINTERRUPTIBLE);
timeout = schedule_timeout (timeout);
// give the adapter another half second?
timeout = HZ/2;
while (rd_plain (dev, offsetof(amb_mem, doorbell)))
if (timeout) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
timeout = schedule_timeout (timeout);
} else {
PRINTD (DBG_INIT|DBG_ERR, "adapter init timed out");
@@ -2260,8 +2268,10 @@
u32 minor;
command cmd;
cmd.request = cpu_to_be32 (SRB_GET_VERSION);
- while (command_do (dev, &cmd))
+ while (command_do (dev, &cmd)) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule();
+ }
major = be32_to_cpu (cmd.args.version.major);
minor = be32_to_cpu (cmd.args.version.minor);
PRINTK (KERN_INFO, "microcode version is %u.%u", major, minor);
@@ -2285,8 +2295,10 @@
}

cmd.request = cpu_to_be32 (SRB_GET_BIA);
- while (command_do (dev, &cmd))
+ while (command_do (dev, &cmd)) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule();
+ }
lower4 = be32_to_cpu (cmd.args.bia.lower4);
upper2 = be32_to_cpu (cmd.args.bia.upper2);
PRINTD (DBG_LOAD, "BIA: lower4: %08x, upper2 %04x", lower4, upper2);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.024 / U:3.096 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site