rt2x00: Remove unused variable frame_control from rt2x00mac_tx.
[safe/jmp/linux-2.6] / drivers / net / skge.c
index 2bb21ff..34b4e7d 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/crc32.h>
 #include <linux/dma-mapping.h>
 #include <linux/debugfs.h>
+#include <linux/sched.h>
 #include <linux/seq_file.h>
 #include <linux/mii.h>
 #include <asm/irq.h>
@@ -3070,11 +3071,10 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
                goto error;
 
        if (len < RX_COPY_THRESHOLD) {
-               skb = netdev_alloc_skb(dev, len + 2);
+               skb = netdev_alloc_skb_ip_align(dev, len);
                if (!skb)
                        goto resubmit;
 
-               skb_reserve(skb, 2);
                pci_dma_sync_single_for_cpu(skge->hw->pdev,
                                            pci_unmap_addr(e, mapaddr),
                                            len, PCI_DMA_FROMDEVICE);
@@ -3085,11 +3085,11 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
                skge_rx_reuse(e, skge->rx_buf_size);
        } else {
                struct sk_buff *nskb;
-               nskb = netdev_alloc_skb(dev, skge->rx_buf_size + NET_IP_ALIGN);
+
+               nskb = netdev_alloc_skb_ip_align(dev, skge->rx_buf_size);
                if (!nskb)
                        goto resubmit;
 
-               skb_reserve(nskb, NET_IP_ALIGN);
                pci_unmap_single(skge->hw->pdev,
                                 pci_unmap_addr(e, mapaddr),
                                 pci_unmap_len(e, maplen),
@@ -3935,16 +3935,19 @@ static int __devinit skge_probe(struct pci_dev *pdev,
 #endif
 
        err = -ENOMEM;
-       hw = kzalloc(sizeof(*hw), GFP_KERNEL);
+       /* space for skge@pci:0000:04:00.0 */
+       hw = kzalloc(sizeof(*hw) + strlen(DRV_NAME "@pci:" )
+                    + strlen(pci_name(pdev)) + 1, GFP_KERNEL);
        if (!hw) {
                dev_err(&pdev->dev, "cannot allocate hardware struct\n");
                goto err_out_free_regions;
        }
+       sprintf(hw->irq_name, DRV_NAME "@pci:%s", pci_name(pdev));
 
        hw->pdev = pdev;
        spin_lock_init(&hw->hw_lock);
        spin_lock_init(&hw->phy_lock);
-       tasklet_init(&hw->phy_task, &skge_extirq, (unsigned long) hw);
+       tasklet_init(&hw->phy_task, skge_extirq, (unsigned long) hw);
 
        hw->regs = ioremap_nocache(pci_resource_start(pdev, 0), 0x4000);
        if (!hw->regs) {
@@ -3974,7 +3977,7 @@ static int __devinit skge_probe(struct pci_dev *pdev,
                goto err_out_free_netdev;
        }
 
-       err = request_irq(pdev->irq, skge_intr, IRQF_SHARED, dev->name, hw);
+       err = request_irq(pdev->irq, skge_intr, IRQF_SHARED, hw->irq_name, hw);
        if (err) {
                dev_err(&pdev->dev, "%s: cannot assign irq %d\n",
                       dev->name, pdev->irq);