aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2010-05-04 18:01:22 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-05-16 18:21:31 -0400
commit62542f4b05a4515ff75320600ffeb2e7447d25fe (patch)
tree8870109f7a76588ecd184a4789d28c258c779131 /drivers
parent0b9dae6aeb0e5397b426e135509046b323740fd5 (diff)
[SCSI] qla2xxx: Display proper link state for disconnected ports.
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index d416c3599e38..5c98b097cfda 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -987,7 +987,8 @@ qla2x00_link_state_show(struct device *dev, struct device_attribute *attr,
987 int len = 0; 987 int len = 0;
988 988
989 if (atomic_read(&vha->loop_state) == LOOP_DOWN || 989 if (atomic_read(&vha->loop_state) == LOOP_DOWN ||
990 atomic_read(&vha->loop_state) == LOOP_DEAD) 990 atomic_read(&vha->loop_state) == LOOP_DEAD ||
991 vha->device_flags & DFLG_NO_CABLE)
991 len = snprintf(buf, PAGE_SIZE, "Link Down\n"); 992 len = snprintf(buf, PAGE_SIZE, "Link Down\n");
992 else if (atomic_read(&vha->loop_state) != LOOP_READY || 993 else if (atomic_read(&vha->loop_state) != LOOP_READY ||
993 test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || 994 test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||