linux-ide@xxxxxxxxxxxxxxxxx wrote: > There's no error in dmesg output. But when I boot with a disk in the > drive, I get the following errors in the boot screen: > * Loading hardware devices > [23.927373] end_request: I/O error, dev sr0, sector 1431744 > [23.927373] Buffer I/O error on device sr0, logical block 178968 > and then several more with just a different number in the square > brackets. However, that does not seem to affect the operation of the > drive. Does the attached patch fix the problem? Please do some data integrity checks as it skips setxfermode on the drive. If it's native SATA, it probably should be okay but still it's way out of the spec. Thanks. -- tejun
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index c71f3ac..d89817a 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3303,14 +3303,17 @@ static int ata_dev_set_mode(struct ata_device *dev) struct ata_eh_context *ehc = &dev->link->eh_context; const char *dev_err_whine = ""; int ign_dev_err = 0; - unsigned int err_mask; + unsigned int err_mask = 0; int rc; dev->flags &= ~ATA_DFLAG_PIO; if (dev->xfer_shift == ATA_SHIFT_PIO) dev->flags |= ATA_DFLAG_PIO; - err_mask = ata_dev_set_xfermode(dev); + if (!(dev->horkage & ATA_HORKAGE_NOSETXFER)) + err_mask = ata_dev_set_xfermode(dev); + else + dev_err_whine = " (SET_XFERMODE skipped)"; if (err_mask & ~AC_ERR_DEV) goto fail; @@ -4132,6 +4135,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { /* Devices that do not need bridging limits applied */ { "MTRON MSP-SATA*", NULL, ATA_HORKAGE_BRIDGE_OK, }, + { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER }, + /* End Marker */ { } }; diff --git a/include/linux/libata.h b/include/linux/libata.h index b79c319..f647d26 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -376,6 +376,7 @@ enum { ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */ ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands not multiple of 16 bytes */ + ATA_HORKAGE_NOSETXFER = (1 << 12), /* DMA mask for user DMA control: User visible values; DO NOT renumber */