Skip to contentSkip to conversation

pata_sil680: implement sff_irq_check() method

PATCH In review Sergei Shtylyov 3 participants 3 messages Oct 8, 2010 – Oct 9, 2010 libata

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 pata_sil680: implement sff_irq_check() method

---
The patch is against the recent Linus' tree.

 drivers/ata/pata_sil680.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/ata/pata_sil680.c +12 -0
Index: linux-2.6/drivers/ata/pata_sil680.c
===================================================================
@@ -210,6 +210,17 @@ static void sil680_sff_exec_command(stru
 	ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
 }
 
+static bool sil680_sff_irq_check(struct ata_port *ap)
+{
+	struct pci_dev *pdev	= to_pci_dev(ap->host->dev);
+	unsigned long addr	= sil680_selreg(ap, 1);
+	u8 val;
+
+	pci_read_config_byte(pdev, addr, &val);
+
+	return val & 0x08;
+}
+
 static struct scsi_host_template sil680_sht = {
 	ATA_BMDMA_SHT(DRV_NAME),
 };
@@ -218,6 +229,7 @@ static struct scsi_host_template sil680_
 static struct ata_port_operations sil680_port_ops = {
 	.inherits		= &ata_bmdma32_port_ops,
 	.sff_exec_command	= sil680_sff_exec_command,
+	.sff_irq_check		= sil680_sff_irq_check,
 	.cable_detect		= sil680_cable_detect,
 	.set_piomode		= sil680_set_piomode,
 	.set_dmamode		= sil680_set_dmamode,
#2 lore raw

Hello.

Quoted 7 lines · Alan Cox
Quoted 4 lines

---
The patch is against the recent Linus' tree.

Same question again for these other two - test environment, results, reason it is needed ?

Answered under the pata_cmd640 patch thread.

MBR, Sergei