Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334113
b: refs/heads/master
c: 3b64b18
h: refs/heads/master
i:
  334111: 0544733
v: v3
  • Loading branch information
Yi Zou authored and James Bottomley committed Oct 7, 2012
1 parent 84b67c2 commit bcd0db8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31c37a6f21d86e6bca095b71d603ed543ae070ad
refs/heads/master: 3b64b1881143ce9e461c211cc81acc72d0cdc476
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/libfc/fc_fcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,8 @@ static void fc_fcp_resp(struct fc_fcp_pkt *fsp, struct fc_frame *fp)
fc_rp_info = (struct fcp_resp_rsp_info *)(rp_ex + 1);
if (flags & FCP_RSP_LEN_VAL) {
respl = ntohl(rp_ex->fr_rsp_len);
if (respl != sizeof(*fc_rp_info))
if ((respl != FCP_RESP_RSP_INFO_LEN4) &&
(respl != FCP_RESP_RSP_INFO_LEN8))
goto len_err;
if (fsp->wait_for_comp) {
/* Abuse cdb_status for rsp code */
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/scsi/fc/fc_fcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ struct fcp_txrdy {
*
* All response frames will always contain the fcp_resp template. Some
* will also include the fcp_resp_len template.
*
* From Table 23, the FCP_RSP_INFO can either be 4 bytes or 8 bytes, both
* are valid length.
*/
struct fcp_resp {
__u8 _fr_resvd[8]; /* reserved */
Expand Down Expand Up @@ -156,6 +159,9 @@ struct fcp_resp_rsp_info {
__u8 _fr_resvd2[4]; /* reserved */
};

#define FCP_RESP_RSP_INFO_LEN4 4 /* without reserved field */
#define FCP_RESP_RSP_INFO_LEN8 8 /* with reserved field */

struct fcp_resp_with_ext {
struct fcp_resp resp;
struct fcp_resp_ext ext;
Expand Down

0 comments on commit bcd0db8

Please sign in to comment.