diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-23 07:48:36 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-25 00:45:09 -0400 |
commit | 411cb3869afd91ed40e8f12df64cd9e315356305 (patch) | |
tree | dde48c3147d784d6ecfee093a1e6575291d6a177 /drivers | |
parent | 458622fcdc5b316de8d74efd7e610803f0308c14 (diff) |
libata: make WARN_ON conditions in ata_sff_hsm_move() more strict
WARN_ON()'s in ata_hsm_move() was too liberal and got triggerred when
it shouldn't (e.g. hotplug events at the right moment). As the HSM
only deals with device errors and state machine violations, make it
check only against them.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Mark Lord <liml@rtr.ca>
Cc: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-sff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 15499522e642..2ec65a8fda79 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -1208,7 +1208,7 @@ fsm_start: | |||
1208 | DPRINTK("ata%u: dev %u command complete, drv_stat 0x%x\n", | 1208 | DPRINTK("ata%u: dev %u command complete, drv_stat 0x%x\n", |
1209 | ap->print_id, qc->dev->devno, status); | 1209 | ap->print_id, qc->dev->devno, status); |
1210 | 1210 | ||
1211 | WARN_ON(qc->err_mask); | 1211 | WARN_ON(qc->err_mask & (AC_ERR_DEV | AC_ERR_HSM)); |
1212 | 1212 | ||
1213 | ap->hsm_task_state = HSM_ST_IDLE; | 1213 | ap->hsm_task_state = HSM_ST_IDLE; |
1214 | 1214 | ||
@@ -1222,7 +1222,7 @@ fsm_start: | |||
1222 | /* make sure qc->err_mask is available to | 1222 | /* make sure qc->err_mask is available to |
1223 | * know what's wrong and recover | 1223 | * know what's wrong and recover |
1224 | */ | 1224 | */ |
1225 | WARN_ON(qc->err_mask == 0); | 1225 | WARN_ON(!(qc->err_mask & (AC_ERR_DEV | AC_ERR_HSM))); |
1226 | 1226 | ||
1227 | ap->hsm_task_state = HSM_ST_IDLE; | 1227 | ap->hsm_task_state = HSM_ST_IDLE; |
1228 | 1228 | ||