/* Perform cable detection on the UDMA66, UDMA100 and early UDMA133 SiS IDE controllers.  */
static int sis_66_cable_detect(struct ata_port *ap)
/* Perform cable detection on the UDMA66, UDMA100 and early UDMA133 SiS IDE controllers.  */
static int sis_66_cable_detect(struct ata_port *ap)
{
	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
	u8 tmp;
	pci_read_config_byte(pdev, 0x48, &tmp);
	tmp >>= ap->port_no;
	if ((tmp & 0x10) && !sis_short_ata40(pdev))
		return ATA_CBL_PATA40;
	return ATA_CBL_PATA80;
}