]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
be2iscsi 4.1.239.0 [PATCH 05/10] Fix for kdump failure
authorChuck Anderson <chuck.anderson@oracle.com>
Sat, 17 Dec 2011 04:05:53 +0000 (20:05 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 17 Dec 2011 04:05:53 +0000 (20:05 -0800)
Dec. 16, 2011
Oracle bugzilla 13257
Oracle bug 13465921
be2iscsi HBA driver v4.1.239.0 patch set for UEK R2(2.6.39)
jayamohan.kallickal@emulex.com

Ported driver version 4.1.239.0 to UEK2 2.6.39-100.0.17 (was 2.103.298.0)

Comments from the patch headers:

 Commit ID : e528586079a20c3d28a490ec8e3271bb4348fc3e
 [SCSI] be2iscsi: Fix for kdump failure

 This patch fixes the Kdump failure reported by Redhat wich was caused by
 be2iscsi resetting the Chip when be2iscsi detects it is in crashdump mode. If
 be2net was loaded before be2iscsi then this leaves be2net driver hanging on to
 resources that the chip stopped recognising after the reset.

 This patch replaces  chip reset with Function reset so that only the
 particular function and not the whole chip is affected
---
 be_cmds.c |   19 +++++++++++++++++++
 be_cmds.h |    2 ++
 be_main.c |    2 +-
 3 files changed, 22 insertions(+), 1 deletions(-)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
drivers/scsi/be2iscsi/be_cmds.c
drivers/scsi/be2iscsi/be_cmds.h
drivers/scsi/be2iscsi/be_main.c

index b8a82f2c62c82306e67ec47e45154077f7324978..67fd831e79c27a425d0bb0cc1ca8a05311a8d308 100644 (file)
@@ -868,3 +868,22 @@ error:
                beiscsi_cmd_q_destroy(ctrl, NULL, QTYPE_SGL);
        return status;
 }
+
+int beiscsi_cmd_reset_function(struct beiscsi_hba  *phba)
+{
+       struct be_ctrl_info *ctrl = &phba->ctrl;
+       struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem);
+       struct be_post_sgl_pages_req *req = embedded_payload(wrb);
+       int status;
+
+       spin_lock(&ctrl->mbox_lock);
+
+       req = embedded_payload(wrb);
+       be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0);
+       be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
+                          OPCODE_COMMON_FUNCTION_RESET, sizeof(*req));
+       status = be_mbox_notify_wait(phba);
+
+       spin_unlock(&ctrl->mbox_lock);
+       return status;
+}
index 497eb29e5c9e1634a388c6be4902fbdc4c177471..8b40a5b4366c21cd2afd271e541f90bc81dea218 100644 (file)
@@ -561,6 +561,8 @@ int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,
                                struct be_dma_mem *q_mem, u32 page_offset,
                                u32 num_pages);
 
+int beiscsi_cmd_reset_function(struct beiscsi_hba *phba);
+
 int be_cmd_wrbq_create(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem,
                       struct be_queue_info *wrbq);
 
index 3d50121ebd504de70ce38be821eef684c24537c6..90b83fe551f8cf42bbe9a1d7a31b5cb3729d9161 100644 (file)
@@ -4275,7 +4275,7 @@ static int __devinit beiscsi_dev_probe(struct pci_dev *pcidev,
                        gcrashmode++;
                        shost_printk(KERN_ERR, phba->shost,
                                "Loading Driver in crashdump mode\n");
-                       ret = beiscsi_pci_soft_reset(phba);
+                       ret = beiscsi_cmd_reset_function(phba);
                        if (ret) {
                                shost_printk(KERN_ERR, phba->shost,
                                        "Reset Failed. Aborting Crashdump\n");