Skip to content

Commit

Permalink
[SCSI] qla2xxx: Display proper link state for disconnected ports.
Browse files Browse the repository at this point in the history
With qla2xxx using mid-layer async-scsi-scanning, the link state for
disconnected port is displayed wrong. Additional check for cable presence
is considered to display proper link state.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed May 16, 2010
1 parent 0b9dae6 commit 62542f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,8 @@ qla2x00_link_state_show(struct device *dev, struct device_attribute *attr,
int len = 0;

if (atomic_read(&vha->loop_state) == LOOP_DOWN ||
atomic_read(&vha->loop_state) == LOOP_DEAD)
atomic_read(&vha->loop_state) == LOOP_DEAD ||
vha->device_flags & DFLG_NO_CABLE)
len = snprintf(buf, PAGE_SIZE, "Link Down\n");
else if (atomic_read(&vha->loop_state) != LOOP_READY ||
test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
Expand Down

0 comments on commit 62542f4

Please sign in to comment.