/* Perform cable detection for the later UDMA133 capable SiS chipset.  */
static int sis_133_cable_detect(struct ata_port *ap)
/* Perform cable detection for the later UDMA133 capable SiS chipset.  */
static int sis_133_cable_detect(struct ata_port *ap)
{
	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
	u16 tmp;
	pci_read_config_word(pdev, 0x50 + 2 * ap->port_no, &tmp);
	if ((tmp & 0x8000) && !sis_short_ata40(pdev))
		return ATA_CBL_PATA40;
	return ATA_CBL_PATA80;
}