Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35427
b: refs/heads/master
c: 9359085
h: refs/heads/master
i:
  35425: 220a1f5
  35423: 0ece247
v: v3
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Sep 19, 2006
1 parent 66d9cd2 commit ab071da
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a3381feb823e06c8e2da7e283c17b0b6fdbddcf
refs/heads/master: 93590859884784520a1850767f86296abc2cdc6d
19 changes: 17 additions & 2 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,11 @@ ata_dev_try_classify(struct ata_port *ap, unsigned int device, u8 *r_err)
if (r_err)
*r_err = err;

/* see if device passed diags */
if (err == 1)
/* see if device passed diags: if master then continue and warn later */
if (err == 0 && device == 0)
/* diagnostic fail : do nothing _YET_ */
ap->device[device].horkage |= ATA_HORKAGE_DIAGNOSTIC;
else if (err == 1)
/* do nothing */ ;
else if ((device == 0) && (err == 0x81))
/* do nothing */ ;
Expand Down Expand Up @@ -1523,6 +1526,18 @@ int ata_dev_configure(struct ata_device *dev, int print_info)
cdb_intr_string);
}

if (dev->horkage & ATA_HORKAGE_DIAGNOSTIC) {
/* Let the user know. We don't want to disallow opens for
rescue purposes, or in case the vendor is just a blithering
idiot */
if (print_info) {
ata_dev_printk(dev, KERN_WARNING,
"Drive reports diagnostics failure. This may indicate a drive\n");
ata_dev_printk(dev, KERN_WARNING,
"fault or invalid emulation. Contact drive vendor for information.\n");
}
}

ata_set_port_max_cmd_len(ap);

/* limit bridge transfers to udma5, 200 sectors */
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ enum {
* most devices.
*/
ATA_SPINUP_WAIT = 8000,

/* Horkage types. May be set by libata or controller on drives
(some horkage may be drive/controller pair dependant */

ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */
};

enum hsm_task_states {
Expand Down Expand Up @@ -476,6 +481,7 @@ struct ata_device {

/* error history */
struct ata_ering ering;
unsigned int horkage; /* List of broken features */
};

/* Offset into struct ata_device. Fields above it are maintained
Expand Down

0 comments on commit ab071da

Please sign in to comment.