Skip to contentSkip to conversation

libata-sff: kill spurious WARN_ON() in ata_hsm_move()

PATCH Applied Tejun Heo 2 participants 2 messages Aug 29, 2008 – Sep 8, 2008 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 libata-sff: kill spurious WARN_ON() in ata_hsm_move()

On HSM_ST_ERR, ata_hsm_move() triggers WARN_ON() if AC_ERR_DEV or AC_ERR_HSM is not set. PHY events may trigger HSM_ST_ERR with other error codes and, with or without it, there just isn't much reason to do WARN_ON() on it. Even if error code is not set there, core EH logic won't have any problem dealing with the error condition.

OSDL bz#11065 reports this problem.

---
 drivers/ata/libata-sff.c |    5 -----
 1 file changed, 5 deletions(-)
drivers/ata/libata-sff.c +0 -5
index 304fdc6..2a4c516 100644
@@ -1315,11 +1315,6 @@ fsm_start:
 		break;
 
 	case HSM_ST_ERR:
-		/* make sure qc->err_mask is available to
-		 * know what's wrong and recover
-		 */
-		WARN_ON(!(qc->err_mask & (AC_ERR_DEV | AC_ERR_HSM)));
-
 		ap->hsm_task_state = HSM_ST_IDLE;
 
 		/* complete taskfile transaction */
Applied
#1 lore raw
Quoted 18 lines · Tejun Heo

On HSM_ST_ERR, ata_hsm_move() triggers WARN_ON() if AC_ERR_DEV or AC_ERR_HSM is not set. PHY events may trigger HSM_ST_ERR with other error codes and, with or without it, there just isn't much reason to do WARN_ON() on it. Even if error code is not set there, core EH logic won't have any problem dealing with the error condition.

OSDL bz#11065 reports this problem.

---
 drivers/ata/libata-sff.c |    5 -----
 1 file changed, 5 deletions(-)
drivers/ata/libata-sff.c +0 -0
index 304fdc6..2a4c516 100644

drivers/ata/libata-sff.c fsm_start: · line 1319

Quoted 10 lines
drivers/ata/libata-sff.c +0 -5
@@ -1315,11 +1315,6 @@ fsm_start:
 		break;
 
 	case HSM_ST_ERR:
-		/* make sure qc->err_mask is available to
-		 * know what's wrong and recover
-		 */
-		WARN_ON(!(qc->err_mask & (AC_ERR_DEV | AC_ERR_HSM)));
-
 		ap->hsm_task_state = HSM_ST_IDLE;
 

applied