qla2xxx: ISP27xx add tests for incomplete template.
authorJoe Carnuccio <joe.carnuccio@qlogic.com>
Thu, 25 Sep 2014 09:16:32 +0000 (05:16 -0400)
committerChristoph Hellwig <hch@lst.de>
Thu, 25 Sep 2014 12:25:01 +0000 (14:25 +0200)
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/qla2xxx/qla_dbg.c
drivers/scsi/qla2xxx/qla_tmpl.c

index 41117b3a50f087cf11ae3c538d2244be33c5320a..55edaa2a0f3f6eccf2f28be4bf6cf275b3b55f1c 100644 (file)
@@ -64,7 +64,7 @@
  * |                              |                    | 0xb13c-0xb140  |
  * |                              |                    | 0xb149                |
  * | MultiQ                       |       0xc00c       |               |
- * | Misc                         |       0xd212       | 0xd017-0xd019 |
+ * | Misc                         |       0xd212       | 0xd017                |
  * |                              |                    | 0xd020                |
  * |                              |                    | 0xd030-0xd0ff |
  * |                              |                    | 0xd101-0xd1fe |
index cb9a0c4bc4190adbf5e0f5b6b43e2efb3cfc6125..252de5d7bff6c74a6fda571d0008226ddcea5d21 100644 (file)
@@ -792,6 +792,15 @@ qla27xx_walk_template(struct scsi_qla_host *vha,
                        break;
                ent = qla27xx_next_entry(ent);
        }
+
+       if (count)
+               ql_dbg(ql_dbg_misc, vha, 0xd018,
+                   "%s: residual count (%lx)\n", __func__, count);
+
+       if (ent->hdr.entry_type != ENTRY_TYPE_TMP_END)
+               ql_dbg(ql_dbg_misc, vha, 0xd019,
+                   "%s: missing end (%lx)\n", __func__, count);
+
        ql_dbg(ql_dbg_misc, vha, 0xd01b,
            "%s: len=%lx\n", __func__, *len);
 }