Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192599
b: refs/heads/master
c: b48d58f
h: refs/heads/master
i:
  192597: c079e8a
  192595: e6e5f58
  192591: 70960b1
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed May 14, 2010
1 parent ceb6468 commit 99595c8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 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: 294440887b32c58d220fb54b73b7a58079b78f20
refs/heads/master: b48d58f55aa1d2d0d12378e45663842d4021916e
18 changes: 12 additions & 6 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3631,9 +3631,15 @@ int ata_wait_ready(struct ata_link *link, unsigned long deadline,
int (*check_ready)(struct ata_link *link))
{
unsigned long start = jiffies;
unsigned long nodev_deadline = ata_deadline(start, ATA_TMOUT_FF_WAIT);
unsigned long nodev_deadline;
int warned = 0;

/* choose which 0xff timeout to use, read comment in libata.h */
if (link->ap->host->flags & ATA_HOST_PARALLEL_SCAN)
nodev_deadline = ata_deadline(start, ATA_TMOUT_FF_WAIT_LONG);
else
nodev_deadline = ata_deadline(start, ATA_TMOUT_FF_WAIT);

/* Slave readiness can't be tested separately from master. On
* M/S emulation configuration, this function should be called
* only on the master and it will handle both master and slave.
Expand All @@ -3651,12 +3657,12 @@ int ata_wait_ready(struct ata_link *link, unsigned long deadline,
if (ready > 0)
return 0;

/* -ENODEV could be transient. Ignore -ENODEV if link
/*
* -ENODEV could be transient. Ignore -ENODEV if link
* is online. Also, some SATA devices take a long
* time to clear 0xff after reset. For example,
* HHD424020F7SV00 iVDR needs >= 800ms while Quantum
* GoVault needs even more than that. Wait for
* ATA_TMOUT_FF_WAIT on -ENODEV if link isn't offline.
* time to clear 0xff after reset. Wait for
* ATA_TMOUT_FF_WAIT[_LONG] on -ENODEV if link isn't
* offline.
*
* Note that some PATA controllers (pata_ali) explode
* if status register is read more than once when
Expand Down
11 changes: 6 additions & 5 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,13 @@ enum {
ATA_TMOUT_INTERNAL_QUICK = 5000,
ATA_TMOUT_MAX_PARK = 30000,

/* FIXME: GoVault needs 2s but we can't afford that without
* parallel probing. 800ms is enough for iVDR disk
* HHD424020F7SV00. Increase to 2secs when parallel probing
* is in place.
/*
* GoVault needs 2s and iVDR disk HHD424020F7SV00 800ms. 2s
* is too much without parallel probing. Use 2s if parallel
* probing is available, 800ms otherwise.
*/
ATA_TMOUT_FF_WAIT = 800,
ATA_TMOUT_FF_WAIT_LONG = 2000,
ATA_TMOUT_FF_WAIT = 800,

/* Spec mandates to wait for ">= 2ms" before checking status
* after reset. We wait 150ms, because that was the magic
Expand Down

0 comments on commit 99595c8

Please sign in to comment.