The patch titled Fix broken PIO with libata has been added to the -mm tree. Its filename is fix-broken-pio-with-libata.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> The revaldiation in 2.6.17-rc has broken support for PIO only devices. This is fairly unusual in the SATA world but showed up rather more promptly with the added PATA drivers. The patch fixes two specific problem cases 1: If you issue a DMA command via pass through the libata core blindly issues a DMA command and calls DMA methods that are not present on PIO only controllers causing an Oops. The patch does a simple check and reject of a DMA command in PIO only cases. 2: The core sets ATA_DFLAG_PIO to indicate PIO commands should be used on this channel. This same information is available in dev->dma_mode but for some reason we get two sources of the info. The ATA_DFLAG_PIO is set once during setup and then cleared but not re-computed by the revalidate function. This causes DMA commands to be issued when PIO would be and usually an Oops or hang Also contains a related bracketing fix. Signed-off-by: Alan Cox <alan@xxxxxxxxxx> Cc: Jeff Garzik <jeff@xxxxxxxxxx> Cc: Tejun Heo <htejun@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/scsi/libata-core.c | 4 ++++ drivers/scsi/libata-scsi.c | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff -puN drivers/scsi/libata-core.c~fix-broken-pio-with-libata drivers/scsi/libata-core.c --- devel/drivers/scsi/libata-core.c~fix-broken-pio-with-libata 2006-05-17 22:59:22.000000000 -0700 +++ devel-akpm/drivers/scsi/libata-core.c 2006-05-17 22:59:22.000000000 -0700 @@ -2041,6 +2041,10 @@ static int ata_dev_set_mode(struct ata_d if (rc) return rc; + /* This is cleared by the revalidation */ + if (dev->xfer_shift == ATA_SHIFT_PIO) + dev->flags |= ATA_DFLAG_PIO; + DPRINTK("xfer_shift=%u, xfer_mode=0x%x\n", dev->xfer_shift, (int)dev->xfer_mode); diff -puN drivers/scsi/libata-scsi.c~fix-broken-pio-with-libata drivers/scsi/libata-scsi.c --- devel/drivers/scsi/libata-scsi.c~fix-broken-pio-with-libata 2006-05-17 22:59:22.000000000 -0700 +++ devel-akpm/drivers/scsi/libata-scsi.c 2006-05-17 22:59:22.000000000 -0700 @@ -1921,7 +1921,7 @@ unsigned int ata_scsiop_mode_sense(struc return 0; dpofua = 0; - if (ata_dev_supports_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 && + if (ata_dev_supports_fua(args->id) && (dev->flags & ATA_DFLAG_LBA48) && (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count)) dpofua = 1 << 4; @@ -2408,10 +2408,16 @@ ata_scsi_pass_thru(struct ata_queued_cmd { struct ata_taskfile *tf = &(qc->tf); struct scsi_cmnd *cmd = qc->scsicmd; + struct ata_device *dev = qc->dev; + struct ata_port *ap = qc->ap; if ((tf->protocol = ata_scsi_map_proto(scsicmd[1])) == ATA_PROT_UNKNOWN) goto invalid_fld; + /* We may not issue DMA commands if no DMA mode is set */ + if (tf->protocol == ATA_PROT_DMA && dev->dma_mode == 0) + goto invalid_fld; + if (scsicmd[1] & 0xe0) /* PIO multi not supported yet */ goto invalid_fld; _ Patches currently in -mm which might be from alan@xxxxxxxxxxxxxxxxxxx are origin.patch powerpc-fix-ide-pmac-sysfs-entry.patch fix-broken-pio-with-libata.patch git-libata-all.patch megaraid-gcc-41-warning-fix.patch more-bug_on-conversion.patch ide-pdc202xx_oldc-remove-unneeded-tuneproc-call.patch ide-claim-extra-dma-ports-regardless-of-channel.patch ide-remove-dma_base2-field-form-ide_hwif_t.patch ide-always-release-dma-engine.patch ide-error-handling-fixes.patch ide-hpt3xxn-clocking-fixes.patch ide-io-increase-timeout-value-to-allow-for-slave-wakeup.patch ide-actually-honor-drives-minimum-pio-dma-cycle-times.patch ide-fix-hpt37x-timing-tables.patch ide-optimize-hpt37x-timing-tables.patch ide-fix-hpt3xx-hotswap-support.patch ide-fix-the-case-of-multiple-hpt3xx-chips-present.patch ide-hpt3xx-fix-pci-clock-detection.patch ide-pdc202xx_old-remove-the-obsolete-busproc.patch piix-fix-82371mx-enablebits.patch piix-remove-check-for-broken-mw-dma-mode-0.patch piix-slc90e66-pio-mode-fallback-fix.patch make-number-of-ide-interfaces-configurable.patch ide_dma_speed-fixes.patch ide_dma_speed-fixes-warning-fix.patch ide_dma_speed-fixes-tidy.patch revert-tty-buffering-comment-out-debug-code.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html