From patchwork Fri Oct 8 15:02:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 67233 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 30BABB70A9 for ; Sat, 9 Oct 2010 02:02:54 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758320Ab0JHPCx (ORCPT ); Fri, 8 Oct 2010 11:02:53 -0400 Received: from mail.dev.rtsoft.ru ([213.79.90.226]:51795 "HELO mail.dev.rtsoft.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1758289Ab0JHPCx (ORCPT ); Fri, 8 Oct 2010 11:02:53 -0400 Received: (qmail 12330 invoked from network); 8 Oct 2010 15:03:01 -0000 Received: from unknown (HELO wasted.dev.rtsoft.ru) (192.168.1.70) by 0 with SMTP; 8 Oct 2010 15:03:01 -0000 To: jgarzik@pobox.com Subject: [PATCH 4/4] pata_sl82c105: implement sff_irq_check() method Cc: linux-ide@vger.kernel.org Content-Disposition: inline From: Sergei Shtylyov Organization: MontaVista Software Inc. Date: Fri, 8 Oct 2010 19:02:13 +0400 MIME-Version: 1.0 Message-Id: <201010081902.13183.sshtylyov@ru.mvista.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Signed-off-by: Sergei Shtylyov --- The patch is against the recent Linus' tree. drivers/ata/pata_sl82c105.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 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/pata_sl82c105.c =================================================================== --- linux-2.6.orig/drivers/ata/pata_sl82c105.c +++ linux-2.6/drivers/ata/pata_sl82c105.c @@ -227,6 +227,16 @@ static int sl82c105_qc_defer(struct ata_ return 0; } +static bool sl82c105_sff_irq_check(struct ata_port *ap) +{ + struct pci_dev *pdev = to_pci_dev(ap->host->dev); + u32 val, mask = ap->port_no ? CTRL_IDE_IRQB : CTRL_IDE_IRQA; + + pci_read_config_dword(pdev, 0x40, &val); + + return val & mask; +} + static struct scsi_host_template sl82c105_sht = { ATA_BMDMA_SHT(DRV_NAME), }; @@ -239,6 +249,7 @@ static struct ata_port_operations sl82c1 .cable_detect = ata_cable_40wire, .set_piomode = sl82c105_set_piomode, .prereset = sl82c105_pre_reset, + .sff_irq_check = sl82c105_sff_irq_check, }; /**