From patchwork Fri Dec 2 15:39:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 128877 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 50CF1B6F76 for ; Sat, 3 Dec 2011 01:40:59 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756788Ab1LBOk5 (ORCPT ); Fri, 2 Dec 2011 09:40:57 -0500 Received: from mail.dev.rtsoft.ru ([213.79.90.226]:47314 "HELO mail.dev.rtsoft.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756761Ab1LBOky (ORCPT ); Fri, 2 Dec 2011 09:40:54 -0500 Received: (qmail 25607 invoked from network); 2 Dec 2011 14:40:52 -0000 Received: from unknown (HELO wasted.dev.rtsoft.ru) (192.168.1.70) by 0 with SMTP; 2 Dec 2011 14:40:52 -0000 From: Sergei Shtylyov Organization: MontaVista Software Inc. To: linux-ide@vger.kernel.org, jgarzik@pobox.com Subject: [PATCH v2] libata-sff: use ATAPI_{COD|IO} Date: Fri, 2 Dec 2011 18:39:53 +0300 User-Agent: KMail/1.9.10 References: <201112011853.28829.sshtylyov@ru.mvista.com> In-Reply-To: <201112011853.28829.sshtylyov@ru.mvista.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201112021839.53516.sshtylyov@ru.mvista.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org atapi_pio_bytes() uses bare numbers for the ATAPI interrupt reason bits despite these are #define'd in . Signed-off-by: Sergei Shtylyov --- This patch is against the recent Linus' tree. Changes in v2: corrected typo in the patch description. drivers/ata/libata-sff.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: linux-2.6/drivers/ata/libata-sff.c =================================================================== --- linux-2.6.orig/drivers/ata/libata-sff.c +++ linux-2.6/drivers/ata/libata-sff.c @@ -929,11 +929,11 @@ static void atapi_pio_bytes(struct ata_q bytes = (bc_hi << 8) | bc_lo; /* shall be cleared to zero, indicating xfer of data */ - if (unlikely(ireason & (1 << 0))) + if (unlikely(ireason & ATAPI_COD)) goto atapi_check; /* make sure transfer direction matches expected */ - i_write = ((ireason & (1 << 1)) == 0) ? 1 : 0; + i_write = ((ireason & ATAPI_IO) == 0) ? 1 : 0; if (unlikely(do_write != i_write)) goto atapi_check;