aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2010-05-05 05:25:58 -0400
committerJeff Garzik <jgarzik@redhat.com>2010-05-14 22:34:30 -0400
commitc4acf99bdebb84b21cf2d12521f990bbfe5d5500 (patch)
treead086bb1e6419cd81c4d270b3457c5cdeb98912d /drivers/ata
parent978c066691a49a205673672a55685305663a2554 (diff)
pata_sil680: Do our own exec_command posting
Use our own mmio area to avoid PCI posting. This avoids the rather slow paranoid implementation in the default handler. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_sil680.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index c6c589c23ffc..43faf106f647 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -190,15 +190,37 @@ static void sil680_set_dmamode(struct ata_port *ap, struct ata_device *adev)
190 pci_write_config_word(pdev, ua, ultra); 190 pci_write_config_word(pdev, ua, ultra);
191} 191}
192 192
193/**
194 * sil680_sff_exec_command - issue ATA command to host controller
195 * @ap: port to which command is being issued
196 * @tf: ATA taskfile register set
197 *
198 * Issues ATA command, with proper synchronization with interrupt
199 * handler / other threads. Use our MMIO space for PCI posting to avoid
200 * a hideously slow cycle all the way to the device.
201 *
202 * LOCKING:
203 * spin_lock_irqsave(host lock)
204 */
205void sil680_sff_exec_command(struct ata_port *ap,
206 const struct ata_taskfile *tf)
207{
208 DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command);
209 iowrite8(tf->command, ap->ioaddr.command_addr);
210 ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
211}
212
193static struct scsi_host_template sil680_sht = { 213static struct scsi_host_template sil680_sht = {
194 ATA_BMDMA_SHT(DRV_NAME), 214 ATA_BMDMA_SHT(DRV_NAME),
195}; 215};
196 216
217
197static struct ata_port_operations sil680_port_ops = { 218static struct ata_port_operations sil680_port_ops = {
198 .inherits = &ata_bmdma32_port_ops, 219 .inherits = &ata_bmdma32_port_ops,
199 .cable_detect = sil680_cable_detect, 220 .sff_exec_command = sil680_sff_exec_command,
200 .set_piomode = sil680_set_piomode, 221 .cable_detect = sil680_cable_detect,
201 .set_dmamode = sil680_set_dmamode, 222 .set_piomode = sil680_set_piomode,
223 .set_dmamode = sil680_set_dmamode,
202}; 224};
203 225
204/** 226/**