diff mbox

libata-sff: remove harmful BUG_ON from ata_bmdma_qc_issue

Message ID 1282313596.1634.0.camel@corey
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Mark Lord Aug. 20, 2010, 2:13 p.m. UTC
Remove harmful BUG_ON() from ata_bmdma_qc_issue(),
as it casts too wide of a net and breaks sata_mv.
It also crashes the kernel while doing the BUG_ON().

There's already a WARN_ON_ONCE() further down to catch
the case of POLLING for a BMDMA operation.

Signed-off-by: Mark Lord <mlord@pobox.com>

Comments

Tejun Heo Aug. 23, 2010, 8:17 a.m. UTC | #1
On 08/20/2010 04:13 PM, Mark Lord wrote:
> Remove harmful BUG_ON() from ata_bmdma_qc_issue(),
> as it casts too wide of a net and breaks sata_mv.
> It also crashes the kernel while doing the BUG_ON().
> 
> There's already a WARN_ON_ONCE() further down to catch
> the case of POLLING for a BMDMA operation.
> 
> Signed-off-by: Mark Lord <mlord@pobox.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.
diff mbox

Patch

Remove harmful BUG_ON() from ata_bmdma_qc_issue(),
as it casts too wide of a net and breaks sata_mv.
It also crashes the kernel while doing the BUG_ON().

There's already a WARN_ON_ONCE() further down to catch
the case of POLLING for a BMDMA operation.

Signed-off-by: Mark Lord <mlord@pobox.com>

--- 2.6.35.3-rc1/drivers/ata/libata-sff.c	2010-08-01 18:11:14.000000000 -0400
+++ linux/drivers/ata/libata-sff.c	2010-08-20 10:06:36.531914889 -0400
@@ -2735,10 +2735,6 @@ 
 {
 	struct ata_port *ap = qc->ap;
 
-	/* see ata_dma_blacklisted() */
-	BUG_ON((ap->flags & ATA_FLAG_PIO_POLLING) &&
-	       qc->tf.protocol == ATAPI_PROT_DMA);
-
 	/* defer PIO handling to sff_qc_issue */
 	if (!ata_is_dma(qc->tf.protocol))
 		return ata_sff_qc_issue(qc);