]> err.no Git - linux-2.6/blobdiff - drivers/net/skge.c
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-2.6] / drivers / net / skge.c
index f377c259a39846b5e7646be90f6b22b152c4567d..1608efab4e3de39c914dfb964dfbd767a2ccea4b 100644 (file)
@@ -44,7 +44,7 @@
 #include "skge.h"
 
 #define DRV_NAME               "skge"
-#define DRV_VERSION            "1.5"
+#define DRV_VERSION            "1.6"
 #define PFX                    DRV_NAME " "
 
 #define DEFAULT_TX_RING_SIZE   128
@@ -2310,8 +2310,7 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev)
        u64 map;
        unsigned long flags;
 
-       skb = skb_padto(skb, ETH_ZLEN);
-       if (!skb)
+       if (skb_padto(skb, ETH_ZLEN))
                return NETDEV_TX_OK;
 
        if (!spin_trylock_irqsave(&skge->tx_lock, flags))
@@ -3355,13 +3354,21 @@ static int __devinit skge_probe(struct pci_dev *pdev,
        if (err)
                goto err_out_free_irq;
 
-       printk(KERN_INFO PFX DRV_VERSION " addr 0x%lx irq %d chip %s rev %d\n",
-              pci_resource_start(pdev, 0), pdev->irq,
+       printk(KERN_INFO PFX DRV_VERSION " addr 0x%llx irq %d chip %s rev %d\n",
+              (unsigned long long)pci_resource_start(pdev, 0), pdev->irq,
               skge_board_name(hw), hw->chip_rev);
 
        if ((dev = skge_devinit(hw, 0, using_dac)) == NULL)
                goto err_out_led_off;
 
+       if (!is_valid_ether_addr(dev->dev_addr)) {
+               printk(KERN_ERR PFX "%s: bad (zero?) ethernet address in rom\n",
+                      pci_name(pdev));
+               err = -EIO;
+               goto err_out_free_netdev;
+       }
+
+
        err = register_netdev(dev);
        if (err) {
                printk(KERN_ERR PFX "%s: cannot register net device\n",