Commit aed97b8b authored by XinHong Zhu's avatar XinHong Zhu Committed by James Bottomley

[SCSI] pm80xx: fix problem of pm8001_work_fn reseting incorrect phy device

If a phy device is removed, the device can get error of I/O and HBA maybe
receieve IO_OPEN_CNX_ERROR_IT_NEXUS_LOSS of event which causes pm8001_work_fn
to reset the phy device but in pm8001_task_exec we don't assign a value for
the device field of the ccb and in other case a ccb used have device field
set, when ccb is freed the field device of the ccb don't be set NULL.So there
is possibility of getting another device reset in function mpi_ssp_completion.
Signed-off-by: default avatarzhuxh <zxh3737@163.com>
Acked-by: default avatarLindar Liu <lindar_liu@usish.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 09f942bd
......@@ -434,6 +434,7 @@ static int pm8001_task_exec(struct sas_task *task, const int num,
ccb->n_elem = n_elem;
ccb->ccb_tag = tag;
ccb->task = t;
ccb->device = pm8001_dev;
switch (t->task_proto) {
case SAS_PROTOCOL_SMP:
rc = pm8001_task_prep_smp(pm8001_ha, ccb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment