From patchwork Wed Apr 14 15:52:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 50167 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 9D9A9B7D2D for ; Thu, 15 Apr 2010 01:53:50 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755783Ab0DNPxt (ORCPT ); Wed, 14 Apr 2010 11:53:49 -0400 Received: from mail.dev.rtsoft.ru ([213.79.90.226]:47312 "HELO mail.dev.rtsoft.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755653Ab0DNPxt (ORCPT ); Wed, 14 Apr 2010 11:53:49 -0400 Received: (qmail 23397 invoked from network); 14 Apr 2010 15:53:55 -0000 Received: from unknown (HELO wasted.dev.rtsoft.ru) (192.168.1.70) by 0 with SMTP; 14 Apr 2010 15:53:55 -0000 To: davem@davemloft.net, linux-ide@vger.kernel.org Subject: [PATCH 2/2] pdc202xx_old: ignore "FIFO empty" bit in test_irq() method Cc: rmk@arm.linux.org.uk Content-Disposition: inline From: Sergei Shtylyov Organization: MontaVista Software Inc. Date: Wed, 14 Apr 2010 19:52:59 +0400 MIME-Version: 1.0 Message-Id: <201004141952.59445.sshtylyov@ru.mvista.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org The driver takes into account not only the interrupt status bit but also "FIFO empty" bit in its test_irq() method. This actually is a superfluous check since for the DMA commands calling the dma_test_irq() method further in the interrupt handler makes sure FIFO is emptied. Signed-off-by: Sergei Shtylyov --- The patch is atop of ide-2.6.git tree... Russell, would you mind giving this patch a test? drivers/ide/pdc202xx_old.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: ide-2.6/drivers/ide/pdc202xx_old.c =================================================================== --- ide-2.6.orig/drivers/ide/pdc202xx_old.c +++ ide-2.6/drivers/ide/pdc202xx_old.c @@ -93,13 +93,13 @@ static int pdc202xx_test_irq(ide_hwif_t * bit 7: error, bit 6: interrupting, * bit 5: FIFO full, bit 4: FIFO empty */ - return ((sc1d & 0x50) == 0x50) ? 1 : 0; + return (sc1d & 0x40) ? 1 : 0; } else { /* * bit 3: error, bit 2: interrupting, * bit 1: FIFO full, bit 0: FIFO empty */ - return ((sc1d & 0x05) == 0x05) ? 1 : 0; + return (sc1d & 0x04) ? 1 : 0; } }