From: Chad Dupuis <cdupuis@redhat.com> Date: Tue, 19 Oct 2010 19:31:17 -0400 Subject: [scsi] qla2xxx: fix zero test on array in ql_fc_loopback Message-id: <20101019193117.2324.73746.sendpatchset@localhost.localdomain> Patchwork-id: 28875 O-Subject: [RHEL 5.6 PATCH] qla2xxx: Fixed the incorrect zero test on array new_config[] in ql_fc_loopback(). Bugzilla: 644136 RH-Acked-by: Rob Evers <revers@redhat.com> RH-Acked-by: Tomas Henzl <thenzl@redhat.com> Bugzilla -------- Bug 644136 (https://bugzilla.redhat.com/show_bug.cgi?id=644136) Upstream Status --------------- RHEL 5 specific Brew Build ---------- 2833889 Testing ------- This patch was test built against the 2.6.18-228.el5 kernel and was functionallty tested internally at QLogic. Description ----------- This patch adds a check for zero in ql_fc_loopback() to eliminate the possibility that loopback test results are incorrectly interpreted. >From c40caf5373686888f16e2dd33c72c3b8e5f19806 Mon Sep 17 00:00:00 2001 From: Joe Carnuccio <joe.carnuccio@qlogic.com> Date: Mon, 11 Oct 2010 12:22:12 +0530 Subject: [PATCH] qla2xxx: Fixed the incorrect zero test on array new_config[] in ql_fc_loopback(). Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> diff --git a/drivers/scsi/qla2xxx/qla_nlnk.c b/drivers/scsi/qla2xxx/qla_nlnk.c index b25e8e8..b46e84c 100644 --- a/drivers/scsi/qla2xxx/qla_nlnk.c +++ b/drivers/scsi/qla2xxx/qla_nlnk.c @@ -509,7 +509,7 @@ static int ql_fc_loopback(struct scsi_qla_host *ha, struct sk_buff *skb, loopback->cmd_sent = INT_DEF_LB_LOOPBACK_CMD; if (IS_QLA81XX(ha)) { - if (new_config) { + if (new_config[0] != 0) { /* Revert back to original port config * Also clear internal loopback */