Commit a39e9f71 authored by Jitendra Bhivare's avatar Jitendra Bhivare Committed by Martin K. Petersen

scsi: be2iscsi: Fix _modify_eq_delay buffer overflow

beiscsi_modify_eq_delay is using embedded command to send request of 788
bytes in 236 bytes buffer. Non-embedded command needs to be used in such
cases.

Use mgmt_alloc_cmd_data fn modified to allow passing of subsystem.  Use
mgmt_exec_nonemb_cmd fn modified to allow setting of callback.
Signed-off-by: default avatarJitendra Bhivare <jitendra.bhivare@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 45371aa3
...@@ -675,8 +675,8 @@ static int be_mbox_notify(struct be_ctrl_info *ctrl) ...@@ -675,8 +675,8 @@ static int be_mbox_notify(struct be_ctrl_info *ctrl)
return status; return status;
} }
void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, u32 payload_len,
bool embedded, u8 sge_cnt) bool embedded, u8 sge_cnt)
{ {
if (embedded) if (embedded)
wrb->emb_sgecnt_special |= MCC_WRB_EMBEDDED_MASK; wrb->emb_sgecnt_special |= MCC_WRB_EMBEDDED_MASK;
...@@ -688,7 +688,7 @@ void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, ...@@ -688,7 +688,7 @@ void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len,
} }
void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr, void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr,
u8 subsystem, u8 opcode, int cmd_len) u8 subsystem, u8 opcode, u32 cmd_len)
{ {
req_hdr->opcode = opcode; req_hdr->opcode = opcode;
req_hdr->subsystem = subsystem; req_hdr->subsystem = subsystem;
......
...@@ -1444,9 +1444,9 @@ struct be_cmd_get_port_name { ...@@ -1444,9 +1444,9 @@ struct be_cmd_get_port_name {
* the cxn * the cxn
*/ */
void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, u32 payload_len,
bool embedded, u8 sge_cnt); bool embedded, u8 sge_cnt);
void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr, void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr,
u8 subsystem, u8 opcode, int cmd_len); u8 subsystem, u8 opcode, u32 cmd_len);
#endif /* !BEISCSI_CMDS_H */ #endif /* !BEISCSI_CMDS_H */
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment