* [PATCH] libata: make WARN_ON conditions in ata_sff_hsm_move() more strict
@ 2008-04-23 11:48 Tejun Heo
2008-04-25 4:47 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2008-04-23 11:48 UTC (permalink / raw)
To: Jeff Garzik, Mark Lord, IDE/ATA development list, Albert Lee
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>
---
drivers/ata/libata-sff.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 1549952..2ec65a8 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1208,7 +1208,7 @@ fsm_start:
DPRINTK("ata%u: dev %u command complete, drv_stat 0x%x\n",
ap->print_id, qc->dev->devno, status);
- WARN_ON(qc->err_mask);
+ WARN_ON(qc->err_mask & (AC_ERR_DEV | AC_ERR_HSM));
ap->hsm_task_state = HSM_ST_IDLE;
@@ -1222,7 +1222,7 @@ fsm_start:
/* make sure qc->err_mask is available to
* know what's wrong and recover
*/
- WARN_ON(qc->err_mask == 0);
+ WARN_ON(!(qc->err_mask & (AC_ERR_DEV | AC_ERR_HSM)));
ap->hsm_task_state = HSM_ST_IDLE;
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] libata: make WARN_ON conditions in ata_sff_hsm_move() more strict
2008-04-23 11:48 [PATCH] libata: make WARN_ON conditions in ata_sff_hsm_move() more strict Tejun Heo
@ 2008-04-25 4:47 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-04-25 4:47 UTC (permalink / raw)
To: Tejun Heo; +Cc: Mark Lord, IDE/ATA development list, Albert Lee
Tejun Heo wrote:
> 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>
> ---
> drivers/ata/libata-sff.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
> index 1549952..2ec65a8 100644
> --- a/drivers/ata/libata-sff.c
> +++ b/drivers/ata/libata-sff.c
> @@ -1208,7 +1208,7 @@ fsm_start:
> DPRINTK("ata%u: dev %u command complete, drv_stat 0x%x\n",
> ap->print_id, qc->dev->devno, status);
>
> - WARN_ON(qc->err_mask);
> + WARN_ON(qc->err_mask & (AC_ERR_DEV | AC_ERR_HSM));
>
> ap->hsm_task_state = HSM_ST_IDLE;
>
> @@ -1222,7 +1222,7 @@ fsm_start:
> /* make sure qc->err_mask is available to
> * know what's wrong and recover
> */
> - WARN_ON(qc->err_mask == 0);
> + WARN_ON(!(qc->err_mask & (AC_ERR_DEV | AC_ERR_HSM)));
>
> ap->hsm_task_state = HSM_ST_IDLE;
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-25 4:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 11:48 [PATCH] libata: make WARN_ON conditions in ata_sff_hsm_move() more strict Tejun Heo
2008-04-25 4:47 ` 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).