[SCSI] cxgb3i: Outgoing pdus need to observe skb's MAX_SKB_FRAGS

Need to make sure the outgoing pdu can fit into a single skb.  When
calulating the max. outgoing pdu payload size, take into consideration
of
- data can be held in the skb's fragment list, assume 512 bytes per
  fragment, and
- data can be held in the headroom.

Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
Karen Xie 2009-02-13 21:38:54 -08:00 • committed by James Bottomley
commit f62d0896e6
6 changed files with 205 additions and 112 deletions