Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Thu, 3 Dec 1998 12:21:05 +0100 (CET) | From | Andrea Arcangeli <> | Subject | Re: scsi code and jiffy wraps |
| |
On Wed, 2 Dec 1998, Andrea Arcangeli wrote:
>>What exactly are you trying to achieve here Andrea?, reset the drive (that is >>easy) or get the mid-level driver to ask for a reset. How about a /proc entry > >The second.
I used the strighforward way, I use a flip flop toggle that I change via ALTGR+SHIF_SCROLL_LOCK and if it' s set the midleve driver call scsi_reset unconditionally and unset the flip flop ;)
But I noticed that at the first reset ppa generate an Oops because the reset handler is not set ;)).
This patch fix the bug (nobody noticed that because ppa rocks ;) and fixes some jiffy wrap bug...
Patch against 2.1.130, these should go in 131 I think.
Index: linux/drivers/scsi/ppa.h diff -u linux/drivers/scsi/ppa.h:1.1.1.1 linux/drivers/scsi/ppa.h:1.1.1.1.2.1 --- linux/drivers/scsi/ppa.h:1.1.1.1 Fri Nov 20 00:02:48 1998 +++ linux/drivers/scsi/ppa.h Thu Dec 3 12:15:56 1998 @@ -159,10 +159,8 @@ release: ppa_release, \ command: ppa_command, \ queuecommand: ppa_queuecommand, \ - eh_abort_handler: ppa_abort, \ - eh_device_reset_handler: NULL, \ - eh_bus_reset_handler: ppa_reset, \ - eh_host_reset_handler: ppa_reset, \ + abort: ppa_abort, \ + reset: ppa_reset, \ bios_param: ppa_biosparam, \ this_id: -1, \ sg_tablesize: SG_ALL, \ Index: linux/drivers/scsi/ppa.c diff -u linux/drivers/scsi/ppa.c:1.1.1.1 linux/drivers/scsi/ppa.c:1.1.1.1.2.1 --- linux/drivers/scsi/ppa.c:1.1.1.1 Fri Nov 20 00:02:45 1998 +++ linux/drivers/scsi/ppa.c Fri Nov 20 00:15:31 1998 @@ -147,7 +147,7 @@ while (ppa_hosts[i].p_busy) { schedule(); /* We are safe to schedule here */ - if (jiffies > now + 3*HZ) + if (time_after(jiffies,now + 3*HZ)) { printk(KERN_ERR "ppa%d: failed to claim parport because a " "pardevice is owning the port for too longtime!\n", @@ -867,7 +867,7 @@ * If we have been running for more than a full timer tick * then take a rest. */ - if (jiffies > start_jiffies + 1) + if (time_after(jiffies,start_jiffies + 1)) return 0; if (((r & 0xc0) != 0xc0) || (cmd->SCp.this_residual <= 0)) { Index: linux/drivers/scsi/imm.c diff -u linux/drivers/scsi/imm.c:1.1.1.1 linux/drivers/scsi/imm.c:1.1.1.1.2.1 --- linux/drivers/scsi/imm.c:1.1.1.1 Fri Nov 20 00:02:56 1998 +++ linux/drivers/scsi/imm.c Fri Nov 20 00:15:30 1998 @@ -186,7 +186,7 @@ while (imm_hosts[i].p_busy) { schedule(); /* We are safe to schedule here */ - if (jiffies > now + 3*HZ) + if (time_after(jiffies,now + 3*HZ)) { printk(KERN_ERR "imm%d: failed to claim parport because a " "pardevice is owning the port for too longtime!\n", @@ -831,7 +831,7 @@ * If we have been running for more than a full timer tick * then take a rest. */ - if (jiffies > start_jiffies + 1) + if (time_after(jiffies,start_jiffies + 1)) return 0; /*
Andrea Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |