On Sunday 16 March 2008, Linus Torvalds wrote:OK, lets try it. From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Subject: [PATCH] ide: correctly handle DRQ bit set on error also for special requests commit 4d977e43d8ae758434e603cf2455d955f71c77c4 ("ide: check BUSY and ERROR status bits before reading data in drive_cmd_intr()") changed DRQ handling logic (as pointed out by Linus). Fix it by flushing leftover data for commands using PIO-in protocol and special requests (rq->cmd_type == REQ_TYPE_ATA_TASKFILE). Cc: Anders Eriksson <aeriksson@fastmail.fm> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> --- against 2.6.25-rc5, untested drivers/ide/ide-io.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) Index: b/drivers/ide/ide-io.c =================================================================== --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -540,12 +540,19 @@ EXPORT_SYMBOL_GPL(__ide_error); ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, u8 stat) { - struct request *rq; + ide_hwif_t *hwif = drive->hwif; + struct request *rq = hwif->hwgroup->rq; u8 err; + if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { + if (hwif->data_phase == TASKFILE_IN && (stat & DRQ_STAT) && + (hwif->host_flags & IDE_HFLAG_ERROR_STOPS_FIFO) == 0) + try_to_flush_leftover_data(drive); + } + err = ide_dump_status(drive, msg, stat); - if ((rq = HWGROUP(drive)->rq) == NULL) + if (rq == NULL) return ide_stopped; /* retry only "normal" I/O: */ --
| Alan Cox | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 007/196] Chinese: add translation of stable_kernel_rules.txt |
| Eric W. Biederman | Re: [net-2.6.24][patch 2/2] Dynamically allocate the loopback device |
| Rafael J. Wysocki | Re: -mm merge plans for 2.6.23 |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
