]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/atlx/atl1.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / drivers / net / atlx / atl1.c
index 9c2394d49428615aac14eff78cf42969dcb0672d..919ffb9bfa4ed01e6c4b692d0a9d21c99a1389c2 100644 (file)
@@ -636,22 +636,6 @@ static s32 atl1_phy_leave_power_saving(struct atl1_hw *hw)
        return atl1_write_phy_reg(hw, 30, 0);
 }
 
-/*
- * Force the PHY into power saving mode using vendor magic.
- */
-#ifdef CONFIG_PM
-static void atl1_phy_enter_power_saving(struct atl1_hw *hw)
-{
-       atl1_write_phy_reg(hw, MII_DBG_ADDR, 0);
-       atl1_write_phy_reg(hw, MII_DBG_DATA, 0x124E);
-       atl1_write_phy_reg(hw, MII_DBG_ADDR, 2);
-       atl1_write_phy_reg(hw, MII_DBG_DATA, 0x3000);
-       atl1_write_phy_reg(hw, MII_DBG_ADDR, 3);
-       atl1_write_phy_reg(hw, MII_DBG_DATA, 0);
-
-}
-#endif
-
 /*
  * Resets the PHY and make all config validate
  * hw - Struct containing variables accessed by shared code
@@ -1876,7 +1860,8 @@ static u16 atl1_alloc_rx_buffers(struct atl1_adapter *adapter)
 
                rfd_desc = ATL1_RFD_DESC(rfd_ring, rfd_next_to_use);
 
-               skb = dev_alloc_skb(adapter->rx_buffer_len + NET_IP_ALIGN);
+               skb = netdev_alloc_skb(adapter->netdev,
+                                      adapter->rx_buffer_len + NET_IP_ALIGN);
                if (unlikely(!skb)) {
                        /* Better luck next round */
                        adapter->net_stats.rx_dropped++;
@@ -2023,6 +2008,7 @@ rrd_ok:
                /* Good Receive */
                pci_unmap_page(adapter->pdev, buffer_info->dma,
                               buffer_info->length, PCI_DMA_FROMDEVICE);
+               buffer_info->dma = 0;
                skb = buffer_info->skb;
                length = le16_to_cpu(rrd->xsz.xsum_sz.pkt_size);
 
@@ -2135,7 +2121,7 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
                                return -1;
                }
 
-               if (skb->protocol == ntohs(ETH_P_IP)) {
+               if (skb->protocol == htons(ETH_P_IP)) {
                        struct iphdr *iph = ip_hdr(skb);
 
                        real_len = (((unsigned char *)iph - skb->data) +
@@ -2859,7 +2845,6 @@ disable_wol:
        ctrl |= PCIE_PHYMISC_FORCE_RCV_DET;
        iowrite32(ctrl, hw->hw_addr + REG_PCIE_PHYMISC);
        ioread32(hw->hw_addr + REG_PCIE_PHYMISC);
-       atl1_phy_enter_power_saving(hw);
        hw->phy_configured = false;
        pci_enable_wake(pdev, pci_choose_state(pdev, state), 0);
 exit: