]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/via-rhine.c
virtio: explicit advertisement of driver features
[linux-2.6-omap-h63xx.git] / drivers / net / via-rhine.c
index d55c4fdff48906f6a0abc98f3854ddb07909e83b..8c9d6ae2bb31dae8eab737ae1105649aecde7336 100644 (file)
@@ -335,16 +335,16 @@ enum wol_bits {
 
 /* The Rx and Tx buffer descriptors. */
 struct rx_desc {
-       s32 rx_status;
-       u32 desc_length; /* Chain flag, Buffer/frame length */
-       u32 addr;
-       u32 next_desc;
+       __le32 rx_status;
+       __le32 desc_length; /* Chain flag, Buffer/frame length */
+       __le32 addr;
+       __le32 next_desc;
 };
 struct tx_desc {
-       s32 tx_status;
-       u32 desc_length; /* Chain flag, Tx Config, Frame length */
-       u32 addr;
-       u32 next_desc;
+       __le32 tx_status;
+       __le32 desc_length; /* Chain flag, Tx Config, Frame length */
+       __le32 addr;
+       __le32 next_desc;
 };
 
 /* Initial value for tx_desc.desc_length, Buffer size goes to bits 0-10 */
@@ -606,7 +606,7 @@ static int rhine_napipoll(struct napi_struct *napi, int budget)
 }
 #endif
 
-static void rhine_hw_init(struct net_device *dev, long pioaddr)
+static void __devinit rhine_hw_init(struct net_device *dev, long pioaddr)
 {
        struct rhine_private *rp = netdev_priv(dev);
 
@@ -638,6 +638,7 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
 #else
        int bar = 0;
 #endif
+       DECLARE_MAC_BUF(mac);
 
 /* when built into the kernel, we only print version if device is found */
 #ifndef MODULE
@@ -794,18 +795,14 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
        if (rc)
                goto err_out_unmap;
 
-       printk(KERN_INFO "%s: VIA %s at 0x%lx, ",
+       printk(KERN_INFO "%s: VIA %s at 0x%lx, %s, IRQ %d.\n",
               dev->name, name,
 #ifdef USE_MMIO
-               memaddr
+              memaddr,
 #else
-               (long)ioaddr
+              (long)ioaddr,
 #endif
-                );
-
-       for (i = 0; i < 5; i++)
-               printk("%2.2x:", dev->dev_addr[i]);
-       printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], pdev->irq);
+              print_mac(mac, dev->dev_addr), pdev->irq);
 
        pci_set_drvdata(pdev, dev);
 
@@ -1341,7 +1338,7 @@ static irqreturn_t rhine_interrupt(int irq, void *dev_instance)
                                if (debug > 2 &&
                                    ioread8(ioaddr+ChipCmd) & CmdTxOn)
                                        printk(KERN_WARNING "%s: "
-                                              "rhine_interrupt() Tx engine"
+                                              "rhine_interrupt() Tx engine "
                                               "still on.\n", dev->name);
                        }
                        rhine_tx(dev);
@@ -1896,7 +1893,7 @@ static void rhine_shutdown (struct pci_dev *pdev)
 
        /* Make sure we use pattern 0, 1 and not 4, 5 */
        if (rp->quirks & rq6patterns)
-               iowrite8(0x04, ioaddr + 0xA7);
+               iowrite8(0x04, ioaddr + WOLcgClr);
 
        if (rp->wolopts & WAKE_MAGIC) {
                iowrite8(WOLmagic, ioaddr + WOLcrSet);