[SCSI] pm8001: fix lockup on phy_control hard reset.
authorMark Salyzyn <mark_salyzyn@xyratex.com>
Tue, 17 Jan 2012 17:56:45 +0000 (12:56 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Sun, 19 Feb 2012 14:08:51 +0000 (08:08 -0600)
pm8001_phy_control PHY_FUNC_HARD_RESET locks up on second try via
smp_phy_control because response HW_EVENT_PHY_START_STATUS fails to complete
previous command. The PM8001F_RUN_TIME flag is not treated as a bit, but a
state in all readers, yet once we are operational or in the run time state,
the flags use a bit-set operation.

Signed-off-by: Mark Salyzyn <mark_salyzyn@xyratex.com>
Acked-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/pm8001/pm8001_sas.c

index fb3dc9978861284e575945331487122a56ddd6c3..7ae22a67bd3140a5f28c2b7c9919bc62ed4b48bf 100644 (file)
@@ -615,7 +615,7 @@ static int pm8001_dev_found_notify(struct domain_device *dev)
        wait_for_completion(&completion);
        if (dev->dev_type == SAS_END_DEV)
                msleep(50);
-       pm8001_ha->flags |= PM8001F_RUN_TIME ;
+       pm8001_ha->flags = PM8001F_RUN_TIME;
        return 0;
 found_out:
        spin_unlock_irqrestore(&pm8001_ha->lock, flags);