linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / net / chelsio / sge.c
index 61b3754..30ff8ea 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "common.h"
 
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/pci.h>
@@ -1092,7 +1093,8 @@ static int process_responses(struct adapter *adapter, int budget)
                if (likely(e->DataValid)) {
                        struct freelQ *fl = &sge->freelQ[e->FreelistQid];
 
-                       BUG_ON(!e->Sop || !e->Eop);
+                       if (unlikely(!e->Sop || !e->Eop))
+                               BUG();
                        if (unlikely(e->Offload))
                                unexpected_offload(adapter, fl);
                        else
@@ -1417,7 +1419,7 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
        struct cpl_tx_pkt *cpl;
 
 #ifdef NETIF_F_TSO
-       if (skb_is_gso(skb)) {
+       if (skb_shinfo(skb)->tso_size) {
                int eth_type;
                struct cpl_tx_pkt_lso *hdr;
 
@@ -1432,7 +1434,7 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
                hdr->ip_hdr_words = skb->nh.iph->ihl;
                hdr->tcp_hdr_words = skb->h.th->doff;
                hdr->eth_type_mss = htons(MK_ETH_TYPE_MSS(eth_type,
-                                               skb_shinfo(skb)->gso_size));
+                                               skb_shinfo(skb)->tso_size));
                hdr->len = htonl(skb->len - sizeof(*hdr));
                cpl = (struct cpl_tx_pkt *)hdr;
                sge->stats.tx_lso_pkts++;