/* Set our PIO requirements. This is fairly simple on the HPT3x3 as all we have to do is clear the MWDMA and UDMA bits then load the mode number.  */
static void hpt3x3_set_piomode(struct ata_port *ap, struct ata_device *adev)
/* Set our PIO requirements. This is fairly simple on the HPT3x3 as all we have to do is clear the MWDMA and UDMA bits then load the mode number.  */
static void hpt3x3_set_piomode(struct ata_port *ap, struct ata_device *adev)
{
	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
	u32 r1, r2;
	int dn = 2 * ap->port_no + adev->devno;
	pci_read_config_dword(pdev, 0x44, &r1);
	pci_read_config_dword(pdev, 0x48, &r2);
	r1 &= ~(7 << (3 * dn));
	r1 |= (adev->pio_mode - XFER_PIO_0) << (3 * dn);
	r2 &= ~(0x11 << dn);
	pci_write_config_dword(pdev, 0x44, r1);
	pci_write_config_dword(pdev, 0x48, r2);
}