aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>2011-10-07 20:31:08 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-16 12:01:06 -0400
commite528586079a20c3d28a490ec8e3271bb4348fc3e (patch)
tree7ee278d0f6578e9d6c0e954d539513b77bdea960 /drivers/scsi
parent528c04ee6dcdb4591aab94a003e77e41cd7d2d23 (diff)
[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 Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/be2iscsi/be_cmds.c19
-rw-r--r--drivers/scsi/be2iscsi/be_cmds.h2
-rw-r--r--drivers/scsi/be2iscsi/be_main.c2
3 files changed, 22 insertions, 1 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
index b8a82f2c62c8..67fd831e79c2 100644
--- a/drivers/scsi/be2iscsi/be_cmds.c
+++ b/drivers/scsi/be2iscsi/be_cmds.c
@@ -868,3 +868,22 @@ error:
868 beiscsi_cmd_q_destroy(ctrl, NULL, QTYPE_SGL); 868 beiscsi_cmd_q_destroy(ctrl, NULL, QTYPE_SGL);
869 return status; 869 return status;
870} 870}
871
872int beiscsi_cmd_reset_function(struct beiscsi_hba *phba)
873{
874 struct be_ctrl_info *ctrl = &phba->ctrl;
875 struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem);
876 struct be_post_sgl_pages_req *req = embedded_payload(wrb);
877 int status;
878
879 spin_lock(&ctrl->mbox_lock);
880
881 req = embedded_payload(wrb);
882 be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0);
883 be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
884 OPCODE_COMMON_FUNCTION_RESET, sizeof(*req));
885 status = be_mbox_notify_wait(phba);
886
887 spin_unlock(&ctrl->mbox_lock);
888 return status;
889}
diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h
index 497eb29e5c9e..8b40a5b4366c 100644
--- a/drivers/scsi/be2iscsi/be_cmds.h
+++ b/drivers/scsi/be2iscsi/be_cmds.h
@@ -561,6 +561,8 @@ int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,
561 struct be_dma_mem *q_mem, u32 page_offset, 561 struct be_dma_mem *q_mem, u32 page_offset,
562 u32 num_pages); 562 u32 num_pages);
563 563
564int beiscsi_cmd_reset_function(struct beiscsi_hba *phba);
565
564int be_cmd_wrbq_create(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem, 566int be_cmd_wrbq_create(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem,
565 struct be_queue_info *wrbq); 567 struct be_queue_info *wrbq);
566 568
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 57fea3848b69..804c46e280ae 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4276,7 +4276,7 @@ static int __devinit beiscsi_dev_probe(struct pci_dev *pcidev,
4276 gcrashmode++; 4276 gcrashmode++;
4277 shost_printk(KERN_ERR, phba->shost, 4277 shost_printk(KERN_ERR, phba->shost,
4278 "Loading Driver in crashdump mode\n"); 4278 "Loading Driver in crashdump mode\n");
4279 ret = beiscsi_pci_soft_reset(phba); 4279 ret = beiscsi_cmd_reset_function(phba);
4280 if (ret) { 4280 if (ret) {
4281 shost_printk(KERN_ERR, phba->shost, 4281 shost_printk(KERN_ERR, phba->shost,
4282 "Reset Failed. Aborting Crashdump\n"); 4282 "Reset Failed. Aborting Crashdump\n");