Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68064
b: refs/heads/master
c: 0bc2a79
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Oct 12, 2007
1 parent dbf26bf commit ade6433
Show file tree
Hide file tree
Showing 3 changed files with 7 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: e3667ebf857ba744b5211c90d46f6a17dd9a2479
refs/heads/master: 0bc2a79a2002e3cc1b514c100b6c576983da6a90
6 changes: 5 additions & 1 deletion trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2759,7 +2759,11 @@ static int ata_dev_set_mode(struct ata_device *dev)
/* Old CFA may refuse this command, which is just fine */
if (dev->xfer_shift == ATA_SHIFT_PIO && ata_id_is_cfa(dev->id))
err_mask &= ~AC_ERR_DEV;

/* Some very old devices and some bad newer ones fail any kind of
SET_XFERMODE request but support PIO0-2 timings and no IORDY */
if (dev->xfer_shift == ATA_SHIFT_PIO && !ata_id_has_iordy(dev->id) &&
dev->pio_mode <= XFER_PIO_2)
err_mask &= ~AC_ERR_DEV;
if (err_mask) {
ata_dev_printk(dev, KERN_ERR, "failed to set xfermode "
"(err_mask=0x%x)\n", err_mask);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/ata.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ struct ata_taskfile {
#define ata_id_removeable(id) ((id)[0] & (1 << 7))
#define ata_id_has_dword_io(id) ((id)[50] & (1 << 0))
#define ata_id_iordy_disable(id) ((id)[49] & (1 << 10))
#define ata_id_has_iordy(id) ((id)[49] & (1 << 9))
#define ata_id_has_iordy(id) ((id)[49] & (1 << 11))
#define ata_id_u32(id,n) \
(((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
#define ata_id_u64(id,n) \
Expand Down

0 comments on commit ade6433

Please sign in to comment.