Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4acf99b authored by Alan Cox's avatar Alan Cox Committed by Jeff Garzik
Browse files

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: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 978c0666
Loading
Loading
Loading
Loading
+26 −4
Original line number Diff line number Diff line
@@ -190,12 +190,34 @@ static void sil680_set_dmamode(struct ata_port *ap, struct ata_device *adev)
	pci_write_config_word(pdev, ua, ultra);
}

/**
 *	sil680_sff_exec_command - issue ATA command to host controller
 *	@ap: port to which command is being issued
 *	@tf: ATA taskfile register set
 *
 *	Issues ATA command, with proper synchronization with interrupt
 *	handler / other threads. Use our MMIO space for PCI posting to avoid
 *	a hideously slow cycle all the way to the device.
 *
 *	LOCKING:
 *	spin_lock_irqsave(host lock)
 */
void sil680_sff_exec_command(struct ata_port *ap,
					const struct ata_taskfile *tf)
{
	DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command);
	iowrite8(tf->command, ap->ioaddr.command_addr);
	ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
}

static struct scsi_host_template sil680_sht = {
	ATA_BMDMA_SHT(DRV_NAME),
};


static struct ata_port_operations sil680_port_ops = {
	.inherits		= &ata_bmdma32_port_ops,
	.sff_exec_command	= sil680_sff_exec_command,
	.cable_detect		= sil680_cable_detect,
	.set_piomode		= sil680_set_piomode,
	.set_dmamode		= sil680_set_dmamode,