linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <kernel@teksavvy.com>
To: linux-ide@vger.kernel.org
Cc: tj@kernel.org, jeff@garzik.org
Subject: [PATCH] libata-sff: remove harmful BUG_ON from ata_bmdma_qc_issue
Date: Fri, 20 Aug 2010 10:13:16 -0400	[thread overview]
Message-ID: <1282313596.1634.0.camel@corey> (raw)
In-Reply-To: <4C6E89A8.2000600@teksavvy.com>

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

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);


[-- Attachment #2: 02_libata_sff_remove_bug.patch --]
[-- Type: text/x-patch, Size: 746 bytes --]

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);

  reply	other threads:[~2010-08-20 14:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20  1:19 [PATCH] sata_mv: fix broken DSM/TRIM support Mark Lord
2010-08-20  1:40 ` [PATCH] sata_mv: fix broken DSM/TRIM support (v2) Mark Lord
2010-08-20 13:56   ` Mark Lord
2010-08-20 14:13     ` Mark Lord [this message]
2010-08-23  8:17       ` [PATCH] libata-sff: remove harmful BUG_ON from ata_bmdma_qc_issue Tejun Heo
2010-08-23  8:22   ` [PATCH] sata_mv: fix broken DSM/TRIM support (v2) Tejun Heo
2010-08-23 13:41     ` Mark Lord
2010-08-23 13:47       ` Tejun Heo
2010-08-23 13:54         ` Mark Lord
2010-08-23 13:59           ` Tejun Heo
2010-08-23 13:50     ` Mark Lord

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1282313596.1634.0.camel@corey \
    --to=kernel@teksavvy.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).