VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / net / pcmcia / axnet_cs.c
index ea5a88c..0d9a06f 100644 (file)
@@ -231,6 +231,9 @@ static void axnet_detach(dev_link_t *link)
     if (*linkp == NULL)
        return;
 
+    if (link->dev)
+       unregister_netdev(dev);
+
     if (link->state & DEV_CONFIG)
        axnet_release(link);
 
@@ -239,8 +242,6 @@ static void axnet_detach(dev_link_t *link)
 
     /* Unlink device structure, free bits */
     *linkp = link->next;
-    if (link->dev)
-       unregister_netdev(dev);
     free_netdev(dev);
 } /* axnet_detach */
 
@@ -525,10 +526,8 @@ static int axnet_event(event_t event, int priority,
     switch (event) {
     case CS_EVENT_CARD_REMOVAL:
        link->state &= ~DEV_PRESENT;
-       if (link->state & DEV_CONFIG) {
+       if (link->state & DEV_CONFIG)
            netif_device_detach(dev);
-           axnet_release(link);
-       }
        break;
     case CS_EVENT_CARD_INSERTION:
        link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
@@ -1179,7 +1178,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
        }
        else if (ei_local->tx2 == 0) 
        {
-               output_page = ei_local->tx_start_page + TX_1X_PAGES;
+               output_page = ei_local->tx_start_page + TX_PAGES/2;
                ei_local->tx2 = send_length;
                if (ei_debug  &&  ei_local->tx1 > 0)
                        printk(KERN_DEBUG "%s: idle transmitter, tx1=%d, lasttx=%d, txing=%d.\n",