From patchwork Fri Aug 20 14:13:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Lord X-Patchwork-Id: 62281 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2DDBDB70DF for ; Sat, 21 Aug 2010 00:13:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752480Ab0HTONR (ORCPT ); Fri, 20 Aug 2010 10:13:17 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183]:54154 "EHLO ironport2-out.pppoe.ca" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752428Ab0HTONR (ORCPT ); Fri, 20 Aug 2010 10:13:17 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqgBAM0qbkxLd/sX/2dsb2JhbAAHgxGQI7c2kg6ERHME X-IronPort-AV: E=Sophos;i="4.56,239,1280721600"; d="scan'208";a="73064110" Received: from rtr.ca (HELO [10.0.0.6]) ([75.119.251.23]) by ironport2-out.pppoe.ca with ESMTP/TLS/DHE-RSA-CAMELLIA256-SHA; 20 Aug 2010 10:13:16 -0400 Subject: [PATCH] libata-sff: remove harmful BUG_ON from ata_bmdma_qc_issue From: Mark Lord To: linux-ide@vger.kernel.org Cc: tj@kernel.org, jeff@garzik.org In-Reply-To: <4C6E89A8.2000600@teksavvy.com> References: <1282267195.8909.6.camel@corey> <1282268444.9628.4.camel@corey> <4C6E89A8.2000600@teksavvy.com> Date: Fri, 20 Aug 2010 10:13:16 -0400 Message-ID: <1282313596.1634.0.camel@corey> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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 Acked-by: Tejun Heo 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 --- 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);