linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH #upstream-fixes] libata: set NODEV_HINT for 0x7f status
@ 2009-01-25  1:26 Tejun Heo
  2009-01-26 11:39 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2009-01-25  1:26 UTC (permalink / raw)
  To: Jeff Garzik, IDE/ATA development list, Alan Cox, bugsbuggy

Asus Pundit-R with atiixp controller has the second port missing and,
very unusually, its status is stuck at 0x7f and all others at 0.  This
meanst that it fails TF access test but gets detected as a disk due to
classification code check and then evades polling IDENTIFY presence
detection thanks to the missing BSY in the status value causing
excessive delays during boot.

This patch makes libata-sff HSM set NODEV_HINT if the status is 0x7f
to make polling IDENTIFY presence detection work for these machines.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
 drivers/ata/libata-sff.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 5a4aad1..c2e42a9 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1358,6 +1358,16 @@ fsm_start:
 					qc->err_mask |= AC_ERR_HSM;
 				}
 
+				/* There are oddball controllers with
+				 * status register stuck at 0x7f and
+				 * lbal/m/h at zero which makes it
+				 * pass all other presence detection
+				 * mechanisms we have.  Set NODEV_HINT
+				 * for it.  Kernel bz#7241.
+				 */
+				if (status == 0x7f)
+					qc->err_mask |= AC_ERR_NODEV_HINT;
+
 				/* ata_pio_sectors() might change the
 				 * state to HSM_ST_LAST. so, the state
 				 * is changed after ata_pio_sectors().


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH #upstream-fixes] libata: set NODEV_HINT for 0x7f status
  2009-01-25  1:26 [PATCH #upstream-fixes] libata: set NODEV_HINT for 0x7f status Tejun Heo
@ 2009-01-26 11:39 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2009-01-26 11:39 UTC (permalink / raw)
  To: Tejun Heo; +Cc: IDE/ATA development list, Alan Cox, bugsbuggy

Tejun Heo wrote:
> Asus Pundit-R with atiixp controller has the second port missing and,
> very unusually, its status is stuck at 0x7f and all others at 0.  This
> meanst that it fails TF access test but gets detected as a disk due to
> classification code check and then evades polling IDENTIFY presence
> detection thanks to the missing BSY in the status value causing
> excessive delays during boot.
> 
> This patch makes libata-sff HSM set NODEV_HINT if the status is 0x7f
> to make polling IDENTIFY presence detection work for these machines.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
>  drivers/ata/libata-sff.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)

applied



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-26 11:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-25  1:26 [PATCH #upstream-fixes] libata: set NODEV_HINT for 0x7f status Tejun Heo
2009-01-26 11:39 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).