]> git.karo-electronics.de Git - linux-beck.git/commitdiff
qla2xxx: Fail adapter initialization on load ram failure.
authorChad Dupuis <chad.dupuis@qlogic.com>
Thu, 25 Sep 2014 09:17:03 +0000 (05:17 -0400)
committerChristoph Hellwig <hch@lst.de>
Thu, 25 Sep 2014 12:25:05 +0000 (14:25 +0200)
If we fail to load one of the segments of firmware fail the operation
instead of trying to continue which will lead to a system crash since
the pointers to the next segment will not be updated correctly.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/qla2xxx/qla_init.c

index 23f12dddcb4a859dc4e917b63ae963265f557fb0..1d66f2fae88183c6e99c52bfea2f650ba317a980 100644 (file)
@@ -5236,7 +5236,7 @@ qla24xx_load_risc_flash(scsi_qla_host_t *vha, uint32_t *srisc_addr,
                                ql_log(ql_log_fatal, vha, 0x008f,
                                    "Failed to load segment %d of firmware.\n",
                                    fragment);
-                               break;
+                               return QLA_FUNCTION_FAILED;
                        }
 
                        faddr += dlen;
@@ -5539,7 +5539,7 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr)
                                ql_log(ql_log_fatal, vha, 0x0098,
                                    "Failed to load segment %d of firmware.\n",
                                    fragment);
-                               break;
+                               return QLA_FUNCTION_FAILED;
                        }
 
                        fwcode += dlen;