/* Enable or disable the FIFO on a given device. Because of the way the ALi FIFO works it provides a boost on ATA disk but can be confused by ATAPI and we must therefore manage it.  */
static void ali_fifo_control(struct ata_port *ap, struct ata_device *adev, int on)
/* Enable or disable the FIFO on a given device. Because of the way the ALi FIFO works it provides a boost on ATA disk but can be confused by ATAPI and we must therefore manage it.  */
static void ali_fifo_control(struct ata_port *ap, struct ata_device *adev, int on)
{
	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
	int pio_fifo = 0x54 + ap->port_no;
	u8 fifo;
	int shift = 4 * adev->devno;
	pci_read_config_byte(pdev, pio_fifo, &fifo);
	fifo &= ~(0x0F << shift);
	fifo |= (on << shift);
	pci_write_config_byte(pdev, pio_fifo, fifo);
}