Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / net / pcmcia / xirc2ps_cs.c
index 4122bb4..71f4505 100644 (file)
@@ -345,7 +345,6 @@ typedef struct local_info_t {
     void __iomem *dingo_ccr; /* only used for CEM56 cards */
     unsigned last_ptr_value; /* last packets transmitted value */
     const char *manf_str;
-    struct work_struct tx_timeout_task;
 } local_info_t;
 
 /****************
@@ -353,7 +352,6 @@ typedef struct local_info_t {
  */
 static int do_start_xmit(struct sk_buff *skb, struct net_device *dev);
 static void do_tx_timeout(struct net_device *dev);
-static void xirc2ps_tx_timeout_task(void *data);
 static struct net_device_stats *do_get_stats(struct net_device *dev);
 static void set_addresses(struct net_device *dev);
 static void set_multicast_list(struct net_device *dev);
@@ -591,7 +589,6 @@ xirc2ps_probe(struct pcmcia_device *link)
 #ifdef HAVE_TX_TIMEOUT
     dev->tx_timeout = do_tx_timeout;
     dev->watchdog_timeo = TX_TIMEOUT;
-    INIT_WORK(&local->tx_timeout_task, xirc2ps_tx_timeout_task, dev);
 #endif
 
     return xirc2ps_config(link);
@@ -1344,24 +1341,17 @@ xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 /*====================================================================*/
 
 static void
-xirc2ps_tx_timeout_task(void *data)
+do_tx_timeout(struct net_device *dev)
 {
-    struct net_device *dev = data;
+    local_info_t *lp = netdev_priv(dev);
+    printk(KERN_NOTICE "%s: transmit timed out\n", dev->name);
+    lp->stats.tx_errors++;
     /* reset the card */
     do_reset(dev,1);
     dev->trans_start = jiffies;
     netif_wake_queue(dev);
 }
 
-static void
-do_tx_timeout(struct net_device *dev)
-{
-    local_info_t *lp = netdev_priv(dev);
-    lp->stats.tx_errors++;
-    printk(KERN_NOTICE "%s: transmit timed out\n", dev->name);
-    schedule_work(&lp->tx_timeout_task);
-}
-
 static int
 do_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
@@ -1369,7 +1359,7 @@ do_start_xmit(struct sk_buff *skb, struct net_device *dev)
     kio_addr_t ioaddr = dev->base_addr;
     int okay;
     unsigned freespace;
-    unsigned pktlen = skb->len;
+    unsigned pktlen = skb? skb->len : 0;
 
     DEBUG(1, "do_start_xmit(skb=%p, dev=%p) len=%u\n",
          skb, dev, pktlen);
@@ -1384,7 +1374,8 @@ do_start_xmit(struct sk_buff *skb, struct net_device *dev)
      */
     if (pktlen < ETH_ZLEN)
     {
-        if (skb_padto(skb, ETH_ZLEN))
+        skb = skb_padto(skb, ETH_ZLEN);
+        if (skb == NULL)
                return 0;
        pktlen = ETH_ZLEN;
     }