Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=18a056feccabdfa9764016a615121b194828bc72 Commit: 18a056feccabdfa9764016a615121b194828bc72 Parent: 852738f39258deafb3d89c187cb1a4050820d555 Author: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> AuthorDate: Sat Jan 26 20:13:12 2008 +0100 Committer: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> CommitDate: Sat Jan 26 20:13:12 2008 +0100
ide: don't enable local IRQs for PIO-in in driver_cmd_intr() (take 2) Don't enable local IRQs for PIO-in protocol in driver_cmd_intr(). While at it: * Remove redundant rq->cmd_type check. * Read status register after enabling local IRQs for no-data protocol. v2: * Re-add DRQ=1 check lost in v1 (noticed by Sergei). Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]> Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> --- drivers/ide/ide-io.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 8c98904..dc6af24 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -638,19 +638,22 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive) { struct request *rq = HWGROUP(drive)->rq; ide_hwif_t *hwif = HWIF(drive); - u8 *args = (u8 *) rq->buffer; - u8 stat = hwif->INB(IDE_STATUS_REG); + u8 *args = (u8 *)rq->buffer, pio_in = (args && args[3]) ? 1 : 0, stat; - local_irq_enable_in_hardirq(); - if (rq->cmd_type == REQ_TYPE_ATA_CMD && - (stat & DRQ_STAT) && args && args[3]) { + if (pio_in) { u8 io_32bit = drive->io_32bit; + stat = hwif->INB(IDE_STATUS_REG); + if ((stat & DRQ_STAT) == 0) + goto out; drive->io_32bit = 0; hwif->ata_input_data(drive, &args[4], args[3] * SECTOR_WORDS); drive->io_32bit = io_32bit; stat = wait_drive_not_busy(drive); + } else { + local_irq_enable_in_hardirq(); + stat = hwif->INB(IDE_STATUS_REG); } - +out: if (!OK_STAT(stat, READY_STAT, BAD_STAT)) return ide_error(drive, "drive_cmd", stat); /* calls ide_end_drive_cmd */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html