aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_mgmt.c
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>2014-05-05 21:41:26 -0400
committerChristoph Hellwig <hch@lst.de>2014-05-28 12:13:15 -0400
commit73af08e11c6638e2abd6b1fa13cdab58c2bbdbf8 (patch)
treef0e8c962e78abbe22c5fe034022368dc8453d2ea /drivers/scsi/be2iscsi/be_mgmt.c
parent0598b8afd65d6b0893d217f7cf77ea315cdfcb5b (diff)
be2iscsi: Fix interrupt Coalescing mechanism.
Signed-off-by: Minh Tran <minhduc.tran@emulex.com> Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_mgmt.c')
-rw-r--r--drivers/scsi/be2iscsi/be_mgmt.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index 712911fba075..52a36fba1e2b 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -155,6 +155,43 @@ void beiscsi_ue_detect(struct beiscsi_hba *phba)
155 } 155 }
156} 156}
157 157
158int be_cmd_modify_eq_delay(struct beiscsi_hba *phba,
159 struct be_set_eqd *set_eqd, int num)
160{
161 struct be_ctrl_info *ctrl = &phba->ctrl;
162 struct be_mcc_wrb *wrb;
163 struct be_cmd_req_modify_eq_delay *req;
164 unsigned int tag = 0;
165 int i;
166
167 spin_lock(&ctrl->mbox_lock);
168 tag = alloc_mcc_tag(phba);
169 if (!tag) {
170 spin_unlock(&ctrl->mbox_lock);
171 return tag;
172 }
173
174 wrb = wrb_from_mccq(phba);
175 req = embedded_payload(wrb);
176
177 wrb->tag0 |= tag;
178 be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0);
179 be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
180 OPCODE_COMMON_MODIFY_EQ_DELAY, sizeof(*req));
181
182 req->num_eq = cpu_to_le32(num);
183 for (i = 0; i < num; i++) {
184 req->delay[i].eq_id = cpu_to_le32(set_eqd[i].eq_id);
185 req->delay[i].phase = 0;
186 req->delay[i].delay_multiplier =
187 cpu_to_le32(set_eqd[i].delay_multiplier);
188 }
189
190 be_mcc_notify(phba);
191 spin_unlock(&ctrl->mbox_lock);
192 return tag;
193}
194
158/** 195/**
159 * mgmt_reopen_session()- Reopen a session based on reopen_type 196 * mgmt_reopen_session()- Reopen a session based on reopen_type
160 * @phba: Device priv structure instance 197 * @phba: Device priv structure instance