Skip to contentSkip to conversation

libata: set NODEV_HINT for 0x7f status

PATCH Applied Tejun Heo 2 participants 2 messages Jan 25, 2009 – Jan 26, 2009 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 libata: set NODEV_HINT for 0x7f status

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.

---
 drivers/ata/libata-sff.c |   10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/ata/libata-sff.c +10 -0
index 5a4aad1..c2e42a9 100644
@@ -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().
Applied
#1 lore raw
Quoted 7 lines · Tejun Heo

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.

Quoted 7 lines

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

---
 drivers/ata/libata-sff.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

applied