| .. | .. |
|---|
| 52 | 52 | #endif |
|---|
| 53 | 53 | #include <linux/uaccess.h> |
|---|
| 54 | 54 | |
|---|
| 55 | | -#include <asm/pgtable.h> |
|---|
| 56 | 55 | #include <asm/irq.h> |
|---|
| 57 | 56 | |
|---|
| 58 | 57 | #ifdef CONFIG_PCI |
|---|
| .. | .. |
|---|
| 1962 | 1961 | this = &txbase[elem]; |
|---|
| 1963 | 1962 | } |
|---|
| 1964 | 1963 | |
|---|
| 1965 | | - dev_kfree_skb_irq(skb); |
|---|
| 1964 | + dev_consume_skb_irq(skb); |
|---|
| 1966 | 1965 | dev->stats.tx_packets++; |
|---|
| 1967 | 1966 | } |
|---|
| 1968 | 1967 | hp->tx_old = elem; |
|---|
| .. | .. |
|---|
| 2064 | 2063 | |
|---|
| 2065 | 2064 | skb_reserve(copy_skb, 2); |
|---|
| 2066 | 2065 | skb_put(copy_skb, len); |
|---|
| 2067 | | - dma_sync_single_for_cpu(hp->dma_dev, dma_addr, len, DMA_FROM_DEVICE); |
|---|
| 2066 | + dma_sync_single_for_cpu(hp->dma_dev, dma_addr, len + 2, DMA_FROM_DEVICE); |
|---|
| 2068 | 2067 | skb_copy_from_linear_data(skb, copy_skb->data, len); |
|---|
| 2069 | | - dma_sync_single_for_device(hp->dma_dev, dma_addr, len, DMA_FROM_DEVICE); |
|---|
| 2068 | + dma_sync_single_for_device(hp->dma_dev, dma_addr, len + 2, DMA_FROM_DEVICE); |
|---|
| 2070 | 2069 | /* Reuse original ring buffer. */ |
|---|
| 2071 | 2070 | hme_write_rxd(hp, this, |
|---|
| 2072 | 2071 | (RXFLAG_OWN|((RX_BUF_ALLOC_SIZE-RX_OFFSET)<<16)), |
|---|
| .. | .. |
|---|
| 2246 | 2245 | #define SXD(x) |
|---|
| 2247 | 2246 | #endif |
|---|
| 2248 | 2247 | |
|---|
| 2249 | | -static void happy_meal_tx_timeout(struct net_device *dev) |
|---|
| 2248 | +static void happy_meal_tx_timeout(struct net_device *dev, unsigned int txqueue) |
|---|
| 2250 | 2249 | { |
|---|
| 2251 | 2250 | struct happy_meal *hp = netdev_priv(dev); |
|---|
| 2252 | 2251 | |
|---|
| .. | .. |
|---|
| 2691 | 2690 | sbus_dp = op->dev.parent->of_node; |
|---|
| 2692 | 2691 | |
|---|
| 2693 | 2692 | /* We can match PCI devices too, do not accept those here. */ |
|---|
| 2694 | | - if (strcmp(sbus_dp->name, "sbus") && strcmp(sbus_dp->name, "sbi")) |
|---|
| 2693 | + if (!of_node_name_eq(sbus_dp, "sbus") && !of_node_name_eq(sbus_dp, "sbi")) |
|---|
| 2695 | 2694 | return err; |
|---|
| 2696 | 2695 | |
|---|
| 2697 | 2696 | if (is_qfe) { |
|---|
| .. | .. |
|---|
| 2999 | 2998 | /* Now make sure pci_dev cookie is there. */ |
|---|
| 3000 | 2999 | #ifdef CONFIG_SPARC |
|---|
| 3001 | 3000 | dp = pci_device_to_OF_node(pdev); |
|---|
| 3002 | | - strcpy(prom_name, dp->name); |
|---|
| 3001 | + snprintf(prom_name, sizeof(prom_name), "%pOFn", dp); |
|---|
| 3003 | 3002 | #else |
|---|
| 3004 | 3003 | if (is_quattro_p(pdev)) |
|---|
| 3005 | 3004 | strcpy(prom_name, "SUNW,qfe"); |
|---|
| .. | .. |
|---|
| 3164 | 3163 | if (err) { |
|---|
| 3165 | 3164 | printk(KERN_ERR "happymeal(PCI): Cannot register net device, " |
|---|
| 3166 | 3165 | "aborting.\n"); |
|---|
| 3167 | | - goto err_out_iounmap; |
|---|
| 3166 | + goto err_out_free_coherent; |
|---|
| 3168 | 3167 | } |
|---|
| 3169 | 3168 | |
|---|
| 3170 | 3169 | pci_set_drvdata(pdev, hp); |
|---|
| .. | .. |
|---|
| 3197 | 3196 | |
|---|
| 3198 | 3197 | return 0; |
|---|
| 3199 | 3198 | |
|---|
| 3199 | +err_out_free_coherent: |
|---|
| 3200 | + dma_free_coherent(hp->dma_dev, PAGE_SIZE, |
|---|
| 3201 | + hp->happy_block, hp->hblock_dvma); |
|---|
| 3202 | + |
|---|
| 3200 | 3203 | err_out_iounmap: |
|---|
| 3201 | 3204 | iounmap(hp->gregs); |
|---|
| 3202 | 3205 | |
|---|