/* Perform cable detection for the 8213 ATA interface. This is different to the PIIX arrangement  */
static int it8213_cable_detect(struct ata_port *ap)
/* Perform cable detection for the 8213 ATA interface. This is different to the PIIX arrangement  */
static int it8213_cable_detect(struct ata_port *ap)
{
	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
	u8 tmp;
	pci_read_config_byte(pdev, 0x42, &tmp);
	if (tmp & 2)
		return ATA_CBL_PATA40;
	return ATA_CBL_PATA80;
}