Skip to content

Commit

Permalink
pata_sl82c105: implement sff_irq_check() method
Browse files Browse the repository at this point in the history
Signed-off-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
  • Loading branch information
Sergei Shtylyov authored and Jeff Garzik committed Oct 22, 2010
1 parent 9b980e1 commit f7a437d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/ata/pata_sl82c105.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,16 @@ static int sl82c105_qc_defer(struct ata_queued_cmd *qc)
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),
};
Expand All @@ -239,6 +249,7 @@ static struct ata_port_operations sl82c105_port_ops = {
.cable_detect = ata_cable_40wire,
.set_piomode = sl82c105_set_piomode,
.prereset = sl82c105_pre_reset,
.sff_irq_check = sl82c105_sff_irq_check,
};

/**
Expand Down

0 comments on commit f7a437d

Please sign in to comment.