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: */ --
| David Miller | Slow DOWN, please!!! |
| Valdis.Kletnieks | Re: [RFC/PATCH] Documentation of kernel messages |
| Alan Cox | Re: Is it time for remove (crap) ALSA from kernel tree ? |
| Jiri Kosina | HID merge plans for 2.6.28 |
git: | |
| Peter Stahlir | Git as a filesystem |
| Elijah Newren | Trying to use git-filter-branch to compress history by removing large, obsolete bi... |
| Martin Langhoff | Re: parsecvs tool now creates git repositories |
| Steffen Prohaska | merge vs rebase: Is visualization in gitk the only problem? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Jerome Santos | sshd.config and AllowUsers |
| Richard Stallman | Real men don't attack straw men |
| Chris Tankersley | Dell PERC 3/Di - No Disks Found |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| John Heffner | Re: setsockopt() |
| Valdis.Kletnieks | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Jarek Poplawski | [PATCH] net_sched: Add qdisc __NET_XMIT_BYPASS flag |
| high memory | 32 minutes ago | Linux kernel |
| semaphore access speed | 3 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 4 hours ago | Linux kernel |
| Easter Eggs in windows XP | 6 hours ago | Windows |
| Shared swap partition | 7 hours ago | Linux general |
| Root password | 8 hours ago | Linux general |
| Where/when DNOTIFY is used? | 9 hours ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 12 hours ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 12 hours ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 18 hours ago | Linux general |
