Messages in this thread Patch in this message | | | Date | Sat, 18 Dec 1999 20:20:47 -0500 | From | Mark Lord <> | Subject | Re: More on the IDE multiwrite problem |
| |
Alan Cox wrote: > > > Then I would suggest to have the low level drivers register a function > > that does the chipset specific stuff. The generic IDE code really > > shouldn't know anything about disable_irq()/enable_irq() nor try to > > use them. > > Not all chipsets have such a facility. That makes handling the early IRQ > case really nasty. But doable - suppose instead of multwrite_intr a seperate > multwrite_maybe_early_intr is registered , then we kick stuff off. > > the maybe_early_intr can handle the quirk case
I'm still not sure there's an issue with it.
But.. what I did find was that somewhere along the way the nr_sectors field became an "unsigned long" so the test for "if ((rq->nr_sectors -= nsect) <= 0)" doesn't work anymore. A patch to fix it is attached, which a couple of folks out there are now testing.
That explains a lot, and the code really ought to be fine with just this patch.. we need to hear back from everyone who saw problems, though.
Cheers -- Mark Lord Real-Time Remedies Inc. mlord@pobox.com--- linux/drivers/block/ide-disk.c.orig Sat Dec 18 16:03:17 1999 +++ linux/drivers/block/ide-disk.c Sat Dec 18 17:20:30 1999 @@ -161,7 +161,7 @@ rq->buffer += nsect<<9; rq->errors = 0; i = (rq->nr_sectors -= nsect); - if ((rq->current_nr_sectors -= nsect) <= 0) + if (((long)(rq->current_nr_sectors -= nsect)) <= 0) ide_end_request(1, HWGROUP(drive)); if (i > 0) { if (msect) @@ -196,7 +196,7 @@ rq->errors = 0; i = --rq->nr_sectors; --rq->current_nr_sectors; - if (rq->current_nr_sectors <= 0) + if (((long)rq->current_nr_sectors) <= 0) ide_end_request(1, hwgroup); if (i > 0) { idedisk_output_data (drive, rq->buffer, SECTOR_WORDS); @@ -251,7 +251,7 @@ * Completed ? */ - if ((rq->nr_sectors -= nsect) <= 0) + if (((long)(rq->nr_sectors -= nsect)) <= 0) { spin_unlock_irqrestore(&io_request_lock, flags); break; | |