From: David Milburn <dmilburn@redhat.com> Date: Wed, 18 Aug 2010 23:59:40 -0400 Subject: [ata] sata_mv: warn on PIO with multiple DRQs Message-id: <1282175987-21696-3-git-send-email-dmilburn@redhat.com> Patchwork-id: 27689 O-Subject: [RHEL5.6 PATCH 2/9] BZ 554872 sata_mv: warn on PIO with multiple DRQs Bugzilla: 554872 RH-Acked-by: Jeff Garzik <jgarzik@redhat.com> commit c6112bd86bc8f727bb732a47f2133e0ff12beda9 Author: Mark Lord <liml@rtr.ca> Date: Wed Jun 18 12:13:02 2008 -0400 sata_mv: warn on PIO with multiple DRQs BZ 554872 diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index fe71321..f806333 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -1594,6 +1594,24 @@ static unsigned int mv_qc_issue(struct ata_queued_cmd *qc) if ((qc->tf.protocol != ATA_PROT_DMA) && (qc->tf.protocol != ATA_PROT_NCQ)) { + static int limit_warnings = 10; + /* + * Errata SATA#16, SATA#24: warn if multiple DRQs expected. + * + * Someday, we might implement special polling workarounds + * for these, but it all seems rather unnecessary since we + * normally use only DMA for commands which transfer more + * than a single block of data. + * + * Much of the time, this could just work regardless. + * So for now, just log the incident, and allow the attempt. + */ + if (limit_warnings && (qc->nbytes / qc->sect_size) > 1) { + --limit_warnings; + ata_link_printk(qc->dev->link, KERN_WARNING, DRV_NAME + ": attempting PIO w/multiple DRQ: " + "this may fail due to h/w errata\n"); + } /* * We're about to send a non-EDMA capable command to the * port. Turn off EDMA so there won't be problems accessing