]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - drivers/net/tulip/de2104x.c
Merge branches 'release', 'ejd', 'sony' and 'wmi' into release
[mirror_ubuntu-kernels.git] / drivers / net / tulip / de2104x.c
index 861729806dc19cb3a0c6a9a6ad0480fe20dc22ef..567c62757e9d154ec39b5083d1f0f4b28bcf18ad 100644 (file)
@@ -264,10 +264,10 @@ struct de_srom_info_leaf {
 } __attribute__((packed));
 
 struct de_desc {
-       u32                     opts1;
-       u32                     opts2;
-       u32                     addr1;
-       u32                     addr2;
+       __le32                  opts1;
+       __le32                  opts2;
+       __le32                  addr1;
+       __le32                  addr2;
 };
 
 struct media_info {
@@ -785,7 +785,6 @@ static void __de_set_rx_mode (struct net_device *dev)
 
        de->tx_head = NEXT_TX(entry);
 
-       BUG_ON(TX_BUFFS_AVAIL(de) < 0);
        if (TX_BUFFS_AVAIL(de) == 0)
                netif_stop_queue(dev);
 
@@ -911,7 +910,8 @@ static void de_set_media (struct de_private *de)
        unsigned media = de->media_type;
        u32 macmode = dr32(MacMode);
 
-       BUG_ON(de_is_running(de));
+       if (de_is_running(de))
+               printk(KERN_WARNING "%s: chip is running while changing media!\n", de->dev->name);
 
        if (de->de21040)
                dw32(CSR11, FULL_DUPLEX_MAGIC);
@@ -1671,8 +1671,6 @@ static void de_get_regs(struct net_device *dev, struct ethtool_regs *regs,
 
 static const struct ethtool_ops de_ethtool_ops = {
        .get_link               = ethtool_op_get_link,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
-       .get_sg                 = ethtool_op_get_sg,
        .get_drvinfo            = de_get_drvinfo,
        .get_regs_len           = de_get_regs_len,
        .get_settings           = de_get_settings,
@@ -1774,8 +1772,8 @@ static void __devinit de21041_get_srom_info (struct de_private *de)
 
        /* download entire eeprom */
        for (i = 0; i < DE_EEPROM_WORDS; i++)
-               ((u16 *)ee_data)[i] =
-                       le16_to_cpu(tulip_read_eeprom(de->regs, i, ee_addr_size));
+               ((__le16 *)ee_data)[i] =
+                       cpu_to_le16(tulip_read_eeprom(de->regs, i, ee_addr_size));
 
        /* DEC now has a specification but early board makers
           just put the address in the first EEPROM locations. */
@@ -1932,6 +1930,7 @@ static int __devinit de_init_one (struct pci_dev *pdev,
        void __iomem *regs;
        unsigned long pciaddr;
        static int board_idx = -1;
+       DECLARE_MAC_BUF(mac);
 
        board_idx++;
 
@@ -1945,7 +1944,6 @@ static int __devinit de_init_one (struct pci_dev *pdev,
        if (!dev)
                return -ENOMEM;
 
-       SET_MODULE_OWNER(dev);
        SET_NETDEV_DEV(dev, &pdev->dev);
        dev->open = de_open;
        dev->stop = de_close;
@@ -2046,15 +2044,11 @@ static int __devinit de_init_one (struct pci_dev *pdev,
                goto err_out_iomap;
 
        /* print info about board and interface just registered */
-       printk (KERN_INFO "%s: %s at 0x%lx, "
-               "%02x:%02x:%02x:%02x:%02x:%02x, "
-               "IRQ %d\n",
+       printk (KERN_INFO "%s: %s at 0x%lx, %s, IRQ %d\n",
                dev->name,
                de->de21040 ? "21040" : "21041",
                dev->base_addr,
-               dev->dev_addr[0], dev->dev_addr[1],
-               dev->dev_addr[2], dev->dev_addr[3],
-               dev->dev_addr[4], dev->dev_addr[5],
+               print_mac(mac, dev->dev_addr),
                dev->irq);
 
        pci_set_drvdata(pdev, dev);