]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/netxen/netxen_nic_main.c
netxen_nic: Fix the tx queue manipulation bug in netxen_nic_probe
[net-next-2.6.git] / drivers / net / netxen / netxen_nic_main.c
index 6f111691aca44ba8d7078c3bd9ae3f65cdbac72e..a75ba9517404d94ca7c3da59472cfb80a57025c6 100644 (file)
@@ -95,6 +95,8 @@ static irqreturn_t netxen_msi_intr(int irq, void *data);
 static irqreturn_t netxen_msix_intr(int irq, void *data);
 
 static void netxen_config_indev_addr(struct net_device *dev, unsigned long);
+static struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev);
+static int netxen_nic_set_mac(struct net_device *netdev, void *p);
 
 /*  PCI Device ID Table  */
 #define ENTRY(device) \
@@ -455,7 +457,7 @@ netxen_read_mac_addr(struct netxen_adapter *adapter)
        return 0;
 }
 
-int netxen_nic_set_mac(struct net_device *netdev, void *p)
+static int netxen_nic_set_mac(struct net_device *netdev, void *p)
 {
        struct netxen_adapter *adapter = netdev_priv(netdev);
        struct sockaddr *addr = p;
@@ -1238,7 +1240,6 @@ netxen_setup_netdev(struct netxen_adapter *adapter,
                dev_warn(&pdev->dev, "failed to read mac addr\n");
 
        netif_carrier_off(netdev);
-       netif_stop_queue(netdev);
 
        err = register_netdev(netdev);
        if (err) {
@@ -1354,6 +1355,13 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                break;
        }
 
+       if (reset_devices) {
+               if (adapter->portnum == 0) {
+                       NXWR32(adapter, NX_CRB_DEV_REF_COUNT, 0);
+                       adapter->need_fw_reset = 1;
+               }
+       }
+
        err = netxen_start_firmware(adapter);
        if (err)
                goto err_out_decr_ref;
@@ -2052,7 +2060,7 @@ request_reset:
        clear_bit(__NX_RESETTING, &adapter->state);
 }
 
-struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
+static struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
 {
        struct netxen_adapter *adapter = netdev_priv(netdev);
        struct net_device_stats *stats = &netdev->stats;