/* Perform cable detection for ATA66 capable cable. Return a libata cable type.  */
static int cs5535_cable_detect(struct ata_port *ap)
/* Perform cable detection for ATA66 capable cable. Return a libata cable type.  */
static int cs5535_cable_detect(struct ata_port *ap)
{
	u8 cable;
	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
	pci_read_config_byte(pdev, CS5535_CABLE_DETECT, &cable);
	if (cable & 1)
		return ATA_CBL_PATA80;
	else
		return ATA_CBL_PATA40;
}