b43legacy: Remove deprecated 'qual' from returned RX status
[safe/jmp/linux-2.6] / drivers / net / sc92031.c
index 00dfddb..b7e0eb4 100644 (file)
@@ -13,6 +13,9 @@
  *  Both are almost identical and seem to be based on pci-skeleton.c
  *
  *  Rewritten for 2.6 by Cesar Eduardo Barros
+ *
+ *  A datasheet for this chip can be found at
+ *  http://www.silan.com.cn/english/products/pdf/SC92031AY.pdf
  */
 
 /* Note about set_mac_address: I don't know how to change the hardware
@@ -790,7 +793,7 @@ static void _sc92031_rx_tasklet(struct net_device *dev)
 
                rx_len -= rx_size_align + 4;
 
-               skb = netdev_alloc_skb(dev, pkt_size + NET_IP_ALIGN);
+               skb = netdev_alloc_skb_ip_align(dev, pkt_size);
                if (unlikely(!skb)) {
                        if (printk_ratelimit())
                                printk(KERN_ERR "%s: Couldn't allocate a skb_buff for a packet of size %u\n",
@@ -798,8 +801,6 @@ static void _sc92031_rx_tasklet(struct net_device *dev)
                        goto next;
                }
 
-               skb_reserve(skb, NET_IP_ALIGN);
-
                if ((rx_ring_offset + pkt_size) > RX_BUF_LEN) {
                        memcpy(skb_put(skb, RX_BUF_LEN - rx_ring_offset),
                                rx_ring + rx_ring_offset, RX_BUF_LEN - rx_ring_offset);
@@ -938,7 +939,8 @@ static struct net_device_stats *sc92031_get_stats(struct net_device *dev)
        return &dev->stats;
 }
 
-static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t sc92031_start_xmit(struct sk_buff *skb,
+                                     struct net_device *dev)
 {
        struct sc92031_priv *priv = netdev_priv(dev);
        void __iomem *port_base = priv->port_base;
@@ -1424,11 +1426,11 @@ static int __devinit sc92031_probe(struct pci_dev *pdev,
 
        pci_set_master(pdev);
 
-       err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (unlikely(err < 0))
                goto out_set_dma_mask;
 
-       err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (unlikely(err < 0))
                goto out_set_dma_mask;
 
@@ -1590,6 +1592,7 @@ out:
 static struct pci_device_id sc92031_pci_device_id_table[] __devinitdata = {
        { PCI_DEVICE(PCI_VENDOR_ID_SILAN, 0x2031) },
        { PCI_DEVICE(PCI_VENDOR_ID_SILAN, 0x8139) },
+       { PCI_DEVICE(0x1088, 0x2031) },
        { 0, }
 };
 MODULE_DEVICE_TABLE(pci, sc92031_pci_device_id_table);