From: David Milburn <dmilburn@redhat.com> Date: Wed, 18 Aug 2010 23:59:41 -0400 Subject: [ata] sata_mv: safer logic for limit warnings Message-id: <1282175987-21696-4-git-send-email-dmilburn@redhat.com> Patchwork-id: 27694 O-Subject: [RHEL5.6 PATCH 3/9] BZ 554872 sata_mv: safer logic for limit warnings Bugzilla: 554872 RH-Acked-by: Jeff Garzik <jgarzik@redhat.com> commit c7843e8f565f624b0cff7cad1370fad4cb84dfbc Author: Mark Lord <liml@rtr.ca> Date: Wed Jun 18 21:57:42 2008 -0400 sata_mv: safer logic for limit_warnings BZ 554872 diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index f806333..8de88ad 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -1606,7 +1606,7 @@ static unsigned int mv_qc_issue(struct ata_queued_cmd *qc) * 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) { + if (limit_warnings > 0 && (qc->nbytes / qc->sect_size) > 1) { --limit_warnings; ata_link_printk(qc->dev->link, KERN_WARNING, DRV_NAME ": attempting PIO w/multiple DRQ: "