X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Flibata.h;h=4a92fbafce9d40ba1476b559539467ae55931022;hb=13c48c490208d9e70d8d66d56f96c5054db69af7;hp=7e206da1fbfb4e88807b0609bdb814b38d247ebe;hpb=a8f43ee7e108cecf68cac652d0a3aeedb8131220;p=linux-2.6 diff --git a/include/linux/libata.h b/include/linux/libata.h index 7e206da1fb..4a92fbafce 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -341,7 +341,7 @@ enum { ATA_EH_PMP_TRIES = 5, ATA_EH_PMP_LINK_TRIES = 3, - SATA_PMP_SCR_TIMEOUT = 250, + SATA_PMP_RW_TIMEOUT = 3000, /* PMP read/write timeout */ /* Horkage types. May be set by libata or controller on drives (some horkage may be drive/controller pair dependant */ @@ -351,7 +351,7 @@ enum { ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ - ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ + ATA_HORKAGE_DISABLE = (1 << 5), /* Disable it */ ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ @@ -821,8 +821,6 @@ struct ata_timing { unsigned short udma; /* t2CYCTYP/2 */ }; -#define FIT(v, vmin, vmax) max_t(short, min_t(short, v, vmax), vmin) - /* * Core layer - drivers/ata/libata-core.c */ @@ -1384,17 +1382,14 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) static inline int ata_check_ready(u8 status) { - /* Some controllers report 0x77 or 0x7f during intermediate - * not-ready stages. - */ - if (status == 0x77 || status == 0x7f) - return 0; + if (!(status & ATA_BUSY)) + return 1; /* 0xff indicates either no device or device not ready */ if (status == 0xff) return -ENODEV; - return !(status & ATA_BUSY); + return 0; }