Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173612
b: refs/heads/master
c: d37322a
h: refs/heads/master
v: v3
  • Loading branch information
Yi Zou authored and James Bottomley committed Dec 4, 2009
1 parent 9b66a21 commit c984531
Show file tree
Hide file tree
Showing 3 changed files with 6 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: 7221d7e59d1c675828b6de50b757cd8282011a5d
refs/heads/master: d37322a43ebac79eef417149f5696390cf8872db
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 @@ -574,7 +574,8 @@ static int fc_fcp_send_data(struct fc_fcp_pkt *fsp, struct fc_seq *seq,
tlen -= sg_bytes;
remaining -= sg_bytes;

if (tlen)
if ((skb_shinfo(fp_skb(fp))->nr_frags < FC_FRAME_SG_LEN) &&
(tlen))
continue;

/*
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/scsi/fc_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#define FC_FRAME_HEADROOM 32 /* headroom for VLAN + FCoE headers */
#define FC_FRAME_TAILROOM 8 /* trailer space for FCoE */

/* Max number of skb frags allowed, reserving one for fcoe_crc_eof page */
#define FC_FRAME_SG_LEN (MAX_SKB_FRAGS - 1)

#define fp_skb(fp) (&((fp)->skb))
#define fr_hdr(fp) ((fp)->skb.data)
#define fr_len(fp) ((fp)->skb.len)
Expand Down

0 comments on commit c984531

Please sign in to comment.