2.5.44 cciss 20 second timeout
PATCH 6/10 2.5.44 cciss 20 second timeout
patch 6 of 10
The whole set can be grabbed via anonymous cvs (empty password):
cvs -d:pserver:[email protected]:/cvsroot/cciss login cvs -z3 -d:pserver:[email protected]:/cvsroot/cciss co 2.5.44
* Remove udelay in command polling routine
* extend timeout to 20 seconds (need for certain multiport storage box)
* Remove unneeded init time code in cciss_scsi.c (thus allowing removal of udelay in command polling code.)
drivers/block/cciss.c | 29 +++++---- drivers/block/cciss_scsi.c | 134 +++++---------------------------------------- 2 files changed, 30 insertions, 133 deletions
drivers/block/cciss.c renamed from drivers/block/cciss.c~20_sec_timeout +15 -14
@@ -1242,24 +1242,25 @@ static int register_new_disk(int ctlr)/* * Wait polling for a command to complete. * The memory mapped FIFO is polled for the completion. -* Used only at init time, interrupts disabled. +* Used only at init time, interrupts from the HBA are disabled. */ static unsigned long pollcomplete (int ctlr) { -unsigned long done; -int i; +unsigned long done; +int i; -/* Wait (up to 2 seconds) for a command to complete */ +/* Wait (up to 20 seconds) for a command to complete */ -for (i =200000 ; i >0 ; i--) { - done = hba[ctlr]->access.command_completed (hba[ctlr]); -if (done ==FIFO_EMPTY ) { -udelay (10 );/* a short fixed delay */ - }else -return (done); - } -/* Invalid address to tell caller we ran out of time */ -return 1 ; +for (i =20 *HZ ; i >0 ; i--) { + done = hba[ctlr]->access.command_completed (hba[ctlr]); +if (done ==FIFO_EMPTY ) { +set_current_state (TASK_UNINTERRUPTIBLE ); +schedule_timeout (1 ); + }else +return (done); + } +/* Invalid address to tell caller we ran out of time */ +return 1 ; }/* * Send a command to the controller, and wait for it to complete.
@@ -2408,7 +2409,7 @@ static int __init cciss_init_one(structcciss_getgeometry (i); -cciss_find_non_disk_devices (i);/* find our tape drives, if any */ +cciss_scsi_setup (i);/* Turn the interrupts on so we can service requests */ hba[i]->access.set_intr_mask (hba[i],CCISS_INTR_ON );
drivers/block/cciss_scsi.c renamed from drivers/block/cciss_scsi.c~20_sec_timeout +15 -119
162 lines not on this page · raw message
.