From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: jgarzik@pobox.com
Cc: linux-ide@vger.kernel.org
Subject: [PATCH 1/4] pata_cmd640: implement sff_irq_check() method
Date: Fri, 8 Oct 2010 18:56:39 +0400 [thread overview]
Message-ID: <201010081856.39644.sshtylyov@ru.mvista.com> (raw)
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
---
The patch is against the recent Linus' tree.
drivers/ata/pata_cmd640.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
Index: linux-2.6/drivers/ata/pata_cmd640.c
===================================================================
--- linux-2.6.orig/drivers/ata/pata_cmd640.c
+++ linux-2.6/drivers/ata/pata_cmd640.c
@@ -161,6 +161,17 @@ static int cmd640_port_start(struct ata_
return 0;
}
+static bool cmd640_sff_irq_check(struct ata_port *ap)
+{
+ struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+ int irq_reg = ap->port_no ? ARTIM23 : CFR;
+ u8 irq_stat, irq_mask = ap->port_no ? 0x10 : 0x04;
+
+ pci_read_config_byte(pdev, irq_reg, &irq_stat);
+
+ return irq_stat & irq_mask;
+}
+
static struct scsi_host_template cmd640_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -169,6 +180,7 @@ static struct ata_port_operations cmd640
.inherits = &ata_sff_port_ops,
/* In theory xfer_noirq is not needed once we kill the prefetcher */
.sff_data_xfer = ata_sff_data_xfer_noirq,
+ .sff_irq_check = cmd640_sff_irq_check,
.qc_issue = cmd640_qc_issue,
.cable_detect = ata_cable_40wire,
.set_piomode = cmd640_set_piomode,
next reply other threads:[~2010-10-08 14:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-08 14:56 Sergei Shtylyov [this message]
2010-10-08 16:34 ` [PATCH 1/4] pata_cmd640: implement sff_irq_check() method Alan Cox
2010-10-09 12:10 ` Sergei Shtylyov
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=201010081856.39644.sshtylyov@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.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).