/* * All hosts that use the 80c ribbon must use! * The name is derived from upper byte of word 93 and the 80c ribbon. */ u8 eighty_ninty_three(ide_drive_t *drive) { ide_hwif_t *hwif = drive->hwif; u16 *id = drive->id; int ivb = ide_in_drive_list(id, ivb_list); if (hwif->cbl == ATA_CBL_SATA || hwif->cbl == ATA_CBL_PATA40_SHORT) return 1; if (ivb) printk(KERN_DEBUG "%s: skipping word 93 validity check\n", drive->name); if (ata_id_is_sata(id) && !ivb) return 1; if (hwif->cbl != ATA_CBL_PATA80 && !ivb) goto no_80w; /* * FIXME: * - change master/slave IDENTIFY order * - force bit13 (80c cable present) check also for !ivb devices * (unless the slave device is pre-ATA3) */ if (id[ATA_ID_HW_CONFIG] & 0x4000) return 1; if (ivb) { const char *model = (char *)&id[ATA_ID_PROD]; if (strstr(model, "TSSTcorp CDDVDW SH-S202")) { /* * These ATAPI devices always report 80c cable * so we have to depend on the host in this case. */ if (hwif->cbl == ATA_CBL_PATA80) return 1; } else { /* Depend on the device side cable detection. */ if (id[ATA_ID_HW_CONFIG] & 0x2000) return 1; } } no_80w: if (drive->dev_flags & IDE_DFLAG_UDMA33_WARNED) return 0; printk(KERN_WARNING "%s: %s side 80-wire cable detection failed, " "limiting max speed to UDMA33\n", drive->name, hwif->cbl == ATA_CBL_PATA80 ? "drive" : "host"); drive->dev_flags |= IDE_DFLAG_UDMA33_WARNED; return 0; }
u8 eighty_ninty_three(ide_drive_t *drive) { ide_hwif_t *hwif = drive->hwif; u16 *id = drive->id; int ivb = ide_in_drive_list(id, ivb_list); if (hwif->cbl == ATA_CBL_SATA || hwif->cbl == ATA_CBL_PATA40_SHORT) return 1; if (ivb) printk(KERN_DEBUG "%s: skipping word 93 validity check\n", drive->name); if (ata_id_is_sata(id) && !ivb) return 1; if (hwif->cbl != ATA_CBL_PATA80 && !ivb) goto no_80w; if (id[ATA_ID_HW_CONFIG] & 0x4000) return 1; if (ivb) { const char *model = (char *)&id[ATA_ID_PROD]; if (strstr(model, "TSSTcorp CDDVDW SH-S202")) { if (hwif->cbl == ATA_CBL_PATA80) return 1; } else { if (id[ATA_ID_HW_CONFIG] & 0x2000) return 1; } } no_80w: if (drive->dev_flags & IDE_DFLAG_UDMA33_WARNED) return 0; printk(KERN_WARNING "%s: %s side 80-wire cable detection failed, " "limiting max speed to UDMA33\n", drive->name, hwif->cbl == ATA_CBL_PATA80 ? "drive" : "host"); drive->dev_flags |= IDE_DFLAG_UDMA33_WARNED; return 0; }