diff options
Diffstat (limited to 'drivers/net/atlx')
-rw-r--r-- | drivers/net/atlx/atl1.c | 146 | ||||
-rw-r--r-- | drivers/net/atlx/atl1.h | 9 | ||||
-rw-r--r-- | drivers/net/atlx/atl2.c | 60 | ||||
-rw-r--r-- | drivers/net/atlx/atlx.c | 4 |
4 files changed, 102 insertions, 117 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index c73be2848319..cd5789ff3726 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c | |||
@@ -83,14 +83,17 @@ | |||
83 | #include "atl1.h" | 83 | #include "atl1.h" |
84 | 84 | ||
85 | #define ATLX_DRIVER_VERSION "2.1.3" | 85 | #define ATLX_DRIVER_VERSION "2.1.3" |
86 | MODULE_AUTHOR("Xiong Huang <xiong.huang@atheros.com>, \ | 86 | MODULE_AUTHOR("Xiong Huang <xiong.huang@atheros.com>, " |
87 | Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>"); | 87 | "Chris Snook <csnook@redhat.com>, " |
88 | "Jay Cliburn <jcliburn@gmail.com>"); | ||
88 | MODULE_LICENSE("GPL"); | 89 | MODULE_LICENSE("GPL"); |
89 | MODULE_VERSION(ATLX_DRIVER_VERSION); | 90 | MODULE_VERSION(ATLX_DRIVER_VERSION); |
90 | 91 | ||
91 | /* Temporary hack for merging atl1 and atl2 */ | 92 | /* Temporary hack for merging atl1 and atl2 */ |
92 | #include "atlx.c" | 93 | #include "atlx.c" |
93 | 94 | ||
95 | static const struct ethtool_ops atl1_ethtool_ops; | ||
96 | |||
94 | /* | 97 | /* |
95 | * This is the only thing that needs to be changed to adjust the | 98 | * This is the only thing that needs to be changed to adjust the |
96 | * maximum number of ports that the driver can manage. | 99 | * maximum number of ports that the driver can manage. |
@@ -353,7 +356,7 @@ static bool atl1_read_eeprom(struct atl1_hw *hw, u32 offset, u32 *p_value) | |||
353 | * hw - Struct containing variables accessed by shared code | 356 | * hw - Struct containing variables accessed by shared code |
354 | * reg_addr - address of the PHY register to read | 357 | * reg_addr - address of the PHY register to read |
355 | */ | 358 | */ |
356 | s32 atl1_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data) | 359 | static s32 atl1_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data) |
357 | { | 360 | { |
358 | u32 val; | 361 | u32 val; |
359 | int i; | 362 | int i; |
@@ -553,7 +556,7 @@ static s32 atl1_read_mac_addr(struct atl1_hw *hw) | |||
553 | * 1. calcu 32bit CRC for multicast address | 556 | * 1. calcu 32bit CRC for multicast address |
554 | * 2. reverse crc with MSB to LSB | 557 | * 2. reverse crc with MSB to LSB |
555 | */ | 558 | */ |
556 | u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr) | 559 | static u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr) |
557 | { | 560 | { |
558 | u32 crc32, value = 0; | 561 | u32 crc32, value = 0; |
559 | int i; | 562 | int i; |
@@ -570,7 +573,7 @@ u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr) | |||
570 | * hw - Struct containing variables accessed by shared code | 573 | * hw - Struct containing variables accessed by shared code |
571 | * hash_value - Multicast address hash value | 574 | * hash_value - Multicast address hash value |
572 | */ | 575 | */ |
573 | void atl1_hash_set(struct atl1_hw *hw, u32 hash_value) | 576 | static void atl1_hash_set(struct atl1_hw *hw, u32 hash_value) |
574 | { | 577 | { |
575 | u32 hash_bit, hash_reg; | 578 | u32 hash_bit, hash_reg; |
576 | u32 mta; | 579 | u32 mta; |
@@ -914,7 +917,7 @@ static s32 atl1_get_speed_and_duplex(struct atl1_hw *hw, u16 *speed, u16 *duplex | |||
914 | return 0; | 917 | return 0; |
915 | } | 918 | } |
916 | 919 | ||
917 | void atl1_set_mac_addr(struct atl1_hw *hw) | 920 | static void atl1_set_mac_addr(struct atl1_hw *hw) |
918 | { | 921 | { |
919 | u32 value; | 922 | u32 value; |
920 | /* | 923 | /* |
@@ -948,6 +951,7 @@ static int __devinit atl1_sw_init(struct atl1_adapter *adapter) | |||
948 | hw->min_frame_size = ETH_ZLEN + ETH_FCS_LEN; | 951 | hw->min_frame_size = ETH_ZLEN + ETH_FCS_LEN; |
949 | 952 | ||
950 | adapter->wol = 0; | 953 | adapter->wol = 0; |
954 | device_set_wakeup_enable(&adapter->pdev->dev, false); | ||
951 | adapter->rx_buffer_len = (hw->max_frame_size + 7) & ~7; | 955 | adapter->rx_buffer_len = (hw->max_frame_size + 7) & ~7; |
952 | adapter->ict = 50000; /* 100ms */ | 956 | adapter->ict = 50000; /* 100ms */ |
953 | adapter->link_speed = SPEED_0; /* hardware init */ | 957 | adapter->link_speed = SPEED_0; /* hardware init */ |
@@ -1811,7 +1815,7 @@ static void atl1_rx_checksum(struct atl1_adapter *adapter, | |||
1811 | * the higher layers and let it be sorted out there. | 1815 | * the higher layers and let it be sorted out there. |
1812 | */ | 1816 | */ |
1813 | 1817 | ||
1814 | skb->ip_summed = CHECKSUM_NONE; | 1818 | skb_checksum_none_assert(skb); |
1815 | 1819 | ||
1816 | if (unlikely(rrd->pkt_flg & PACKET_FLAG_ERR)) { | 1820 | if (unlikely(rrd->pkt_flg & PACKET_FLAG_ERR)) { |
1817 | if (rrd->err_flg & (ERR_FLAG_CRC | ERR_FLAG_TRUNC | | 1821 | if (rrd->err_flg & (ERR_FLAG_CRC | ERR_FLAG_TRUNC | |
@@ -2071,9 +2075,6 @@ static void atl1_intr_tx(struct atl1_adapter *adapter) | |||
2071 | cmb_tpd_next_to_clean = le16_to_cpu(adapter->cmb.cmb->tpd_cons_idx); | 2075 | cmb_tpd_next_to_clean = le16_to_cpu(adapter->cmb.cmb->tpd_cons_idx); |
2072 | 2076 | ||
2073 | while (cmb_tpd_next_to_clean != sw_tpd_next_to_clean) { | 2077 | while (cmb_tpd_next_to_clean != sw_tpd_next_to_clean) { |
2074 | struct tx_packet_desc *tpd; | ||
2075 | |||
2076 | tpd = ATL1_TPD_DESC(tpd_ring, sw_tpd_next_to_clean); | ||
2077 | buffer_info = &tpd_ring->buffer_info[sw_tpd_next_to_clean]; | 2078 | buffer_info = &tpd_ring->buffer_info[sw_tpd_next_to_clean]; |
2078 | if (buffer_info->dma) { | 2079 | if (buffer_info->dma) { |
2079 | pci_unmap_page(adapter->pdev, buffer_info->dma, | 2080 | pci_unmap_page(adapter->pdev, buffer_info->dma, |
@@ -2100,9 +2101,9 @@ static u16 atl1_tpd_avail(struct atl1_tpd_ring *tpd_ring) | |||
2100 | { | 2101 | { |
2101 | u16 next_to_clean = atomic_read(&tpd_ring->next_to_clean); | 2102 | u16 next_to_clean = atomic_read(&tpd_ring->next_to_clean); |
2102 | u16 next_to_use = atomic_read(&tpd_ring->next_to_use); | 2103 | u16 next_to_use = atomic_read(&tpd_ring->next_to_use); |
2103 | return ((next_to_clean > next_to_use) ? | 2104 | return (next_to_clean > next_to_use) ? |
2104 | next_to_clean - next_to_use - 1 : | 2105 | next_to_clean - next_to_use - 1 : |
2105 | tpd_ring->count + next_to_clean - next_to_use - 1); | 2106 | tpd_ring->count + next_to_clean - next_to_use - 1; |
2106 | } | 2107 | } |
2107 | 2108 | ||
2108 | static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, | 2109 | static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, |
@@ -2172,7 +2173,7 @@ static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb, | |||
2172 | u8 css, cso; | 2173 | u8 css, cso; |
2173 | 2174 | ||
2174 | if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) { | 2175 | if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) { |
2175 | css = (u8) (skb->csum_start - skb_headroom(skb)); | 2176 | css = skb_checksum_start_offset(skb); |
2176 | cso = css + (u8) skb->csum_offset; | 2177 | cso = css + (u8) skb->csum_offset; |
2177 | if (unlikely(css & 0x1)) { | 2178 | if (unlikely(css & 0x1)) { |
2178 | /* L1 hardware requires an even number here */ | 2179 | /* L1 hardware requires an even number here */ |
@@ -2408,7 +2409,7 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb, | |||
2408 | (u16) atomic_read(&tpd_ring->next_to_use)); | 2409 | (u16) atomic_read(&tpd_ring->next_to_use)); |
2409 | memset(ptpd, 0, sizeof(struct tx_packet_desc)); | 2410 | memset(ptpd, 0, sizeof(struct tx_packet_desc)); |
2410 | 2411 | ||
2411 | if (adapter->vlgrp && vlan_tx_tag_present(skb)) { | 2412 | if (vlan_tx_tag_present(skb)) { |
2412 | vlan_tag = vlan_tx_tag_get(skb); | 2413 | vlan_tag = vlan_tx_tag_get(skb); |
2413 | vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) | | 2414 | vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) | |
2414 | ((vlan_tag >> 9) & 0x8); | 2415 | ((vlan_tag >> 9) & 0x8); |
@@ -2569,7 +2570,7 @@ static s32 atl1_up(struct atl1_adapter *adapter) | |||
2569 | { | 2570 | { |
2570 | struct net_device *netdev = adapter->netdev; | 2571 | struct net_device *netdev = adapter->netdev; |
2571 | int err; | 2572 | int err; |
2572 | int irq_flags = IRQF_SAMPLE_RANDOM; | 2573 | int irq_flags = 0; |
2573 | 2574 | ||
2574 | /* hardware has been reset, we need to reload some things */ | 2575 | /* hardware has been reset, we need to reload some things */ |
2575 | atlx_set_multi(netdev); | 2576 | atlx_set_multi(netdev); |
@@ -2733,15 +2734,15 @@ static int atl1_close(struct net_device *netdev) | |||
2733 | } | 2734 | } |
2734 | 2735 | ||
2735 | #ifdef CONFIG_PM | 2736 | #ifdef CONFIG_PM |
2736 | static int atl1_suspend(struct pci_dev *pdev, pm_message_t state) | 2737 | static int atl1_suspend(struct device *dev) |
2737 | { | 2738 | { |
2739 | struct pci_dev *pdev = to_pci_dev(dev); | ||
2738 | struct net_device *netdev = pci_get_drvdata(pdev); | 2740 | struct net_device *netdev = pci_get_drvdata(pdev); |
2739 | struct atl1_adapter *adapter = netdev_priv(netdev); | 2741 | struct atl1_adapter *adapter = netdev_priv(netdev); |
2740 | struct atl1_hw *hw = &adapter->hw; | 2742 | struct atl1_hw *hw = &adapter->hw; |
2741 | u32 ctrl = 0; | 2743 | u32 ctrl = 0; |
2742 | u32 wufc = adapter->wol; | 2744 | u32 wufc = adapter->wol; |
2743 | u32 val; | 2745 | u32 val; |
2744 | int retval; | ||
2745 | u16 speed; | 2746 | u16 speed; |
2746 | u16 duplex; | 2747 | u16 duplex; |
2747 | 2748 | ||
@@ -2749,17 +2750,15 @@ static int atl1_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2749 | if (netif_running(netdev)) | 2750 | if (netif_running(netdev)) |
2750 | atl1_down(adapter); | 2751 | atl1_down(adapter); |
2751 | 2752 | ||
2752 | retval = pci_save_state(pdev); | ||
2753 | if (retval) | ||
2754 | return retval; | ||
2755 | |||
2756 | atl1_read_phy_reg(hw, MII_BMSR, (u16 *) & ctrl); | 2753 | atl1_read_phy_reg(hw, MII_BMSR, (u16 *) & ctrl); |
2757 | atl1_read_phy_reg(hw, MII_BMSR, (u16 *) & ctrl); | 2754 | atl1_read_phy_reg(hw, MII_BMSR, (u16 *) & ctrl); |
2758 | val = ctrl & BMSR_LSTATUS; | 2755 | val = ctrl & BMSR_LSTATUS; |
2759 | if (val) | 2756 | if (val) |
2760 | wufc &= ~ATLX_WUFC_LNKC; | 2757 | wufc &= ~ATLX_WUFC_LNKC; |
2758 | if (!wufc) | ||
2759 | goto disable_wol; | ||
2761 | 2760 | ||
2762 | if (val && wufc) { | 2761 | if (val) { |
2763 | val = atl1_get_speed_and_duplex(hw, &speed, &duplex); | 2762 | val = atl1_get_speed_and_duplex(hw, &speed, &duplex); |
2764 | if (val) { | 2763 | if (val) { |
2765 | if (netif_msg_ifdown(adapter)) | 2764 | if (netif_msg_ifdown(adapter)) |
@@ -2796,23 +2795,18 @@ static int atl1_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2796 | ctrl |= PCIE_PHYMISC_FORCE_RCV_DET; | 2795 | ctrl |= PCIE_PHYMISC_FORCE_RCV_DET; |
2797 | iowrite32(ctrl, hw->hw_addr + REG_PCIE_PHYMISC); | 2796 | iowrite32(ctrl, hw->hw_addr + REG_PCIE_PHYMISC); |
2798 | ioread32(hw->hw_addr + REG_PCIE_PHYMISC); | 2797 | ioread32(hw->hw_addr + REG_PCIE_PHYMISC); |
2799 | 2798 | } else { | |
2800 | pci_enable_wake(pdev, pci_choose_state(pdev, state), 1); | ||
2801 | goto exit; | ||
2802 | } | ||
2803 | |||
2804 | if (!val && wufc) { | ||
2805 | ctrl |= (WOL_LINK_CHG_EN | WOL_LINK_CHG_PME_EN); | 2799 | ctrl |= (WOL_LINK_CHG_EN | WOL_LINK_CHG_PME_EN); |
2806 | iowrite32(ctrl, hw->hw_addr + REG_WOL_CTRL); | 2800 | iowrite32(ctrl, hw->hw_addr + REG_WOL_CTRL); |
2807 | ioread32(hw->hw_addr + REG_WOL_CTRL); | 2801 | ioread32(hw->hw_addr + REG_WOL_CTRL); |
2808 | iowrite32(0, hw->hw_addr + REG_MAC_CTRL); | 2802 | iowrite32(0, hw->hw_addr + REG_MAC_CTRL); |
2809 | ioread32(hw->hw_addr + REG_MAC_CTRL); | 2803 | ioread32(hw->hw_addr + REG_MAC_CTRL); |
2810 | hw->phy_configured = false; | 2804 | hw->phy_configured = false; |
2811 | pci_enable_wake(pdev, pci_choose_state(pdev, state), 1); | ||
2812 | goto exit; | ||
2813 | } | 2805 | } |
2814 | 2806 | ||
2815 | disable_wol: | 2807 | return 0; |
2808 | |||
2809 | disable_wol: | ||
2816 | iowrite32(0, hw->hw_addr + REG_WOL_CTRL); | 2810 | iowrite32(0, hw->hw_addr + REG_WOL_CTRL); |
2817 | ioread32(hw->hw_addr + REG_WOL_CTRL); | 2811 | ioread32(hw->hw_addr + REG_WOL_CTRL); |
2818 | ctrl = ioread32(hw->hw_addr + REG_PCIE_PHYMISC); | 2812 | ctrl = ioread32(hw->hw_addr + REG_PCIE_PHYMISC); |
@@ -2820,37 +2814,17 @@ disable_wol: | |||
2820 | iowrite32(ctrl, hw->hw_addr + REG_PCIE_PHYMISC); | 2814 | iowrite32(ctrl, hw->hw_addr + REG_PCIE_PHYMISC); |
2821 | ioread32(hw->hw_addr + REG_PCIE_PHYMISC); | 2815 | ioread32(hw->hw_addr + REG_PCIE_PHYMISC); |
2822 | hw->phy_configured = false; | 2816 | hw->phy_configured = false; |
2823 | pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); | ||
2824 | exit: | ||
2825 | if (netif_running(netdev)) | ||
2826 | pci_disable_msi(adapter->pdev); | ||
2827 | pci_disable_device(pdev); | ||
2828 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | ||
2829 | 2817 | ||
2830 | return 0; | 2818 | return 0; |
2831 | } | 2819 | } |
2832 | 2820 | ||
2833 | static int atl1_resume(struct pci_dev *pdev) | 2821 | static int atl1_resume(struct device *dev) |
2834 | { | 2822 | { |
2823 | struct pci_dev *pdev = to_pci_dev(dev); | ||
2835 | struct net_device *netdev = pci_get_drvdata(pdev); | 2824 | struct net_device *netdev = pci_get_drvdata(pdev); |
2836 | struct atl1_adapter *adapter = netdev_priv(netdev); | 2825 | struct atl1_adapter *adapter = netdev_priv(netdev); |
2837 | u32 err; | ||
2838 | |||
2839 | pci_set_power_state(pdev, PCI_D0); | ||
2840 | pci_restore_state(pdev); | ||
2841 | |||
2842 | err = pci_enable_device(pdev); | ||
2843 | if (err) { | ||
2844 | if (netif_msg_ifup(adapter)) | ||
2845 | dev_printk(KERN_DEBUG, &pdev->dev, | ||
2846 | "error enabling pci device\n"); | ||
2847 | return err; | ||
2848 | } | ||
2849 | 2826 | ||
2850 | pci_set_master(pdev); | ||
2851 | iowrite32(0, adapter->hw.hw_addr + REG_WOL_CTRL); | 2827 | iowrite32(0, adapter->hw.hw_addr + REG_WOL_CTRL); |
2852 | pci_enable_wake(pdev, PCI_D3hot, 0); | ||
2853 | pci_enable_wake(pdev, PCI_D3cold, 0); | ||
2854 | 2828 | ||
2855 | atl1_reset_hw(&adapter->hw); | 2829 | atl1_reset_hw(&adapter->hw); |
2856 | 2830 | ||
@@ -2862,16 +2836,25 @@ static int atl1_resume(struct pci_dev *pdev) | |||
2862 | 2836 | ||
2863 | return 0; | 2837 | return 0; |
2864 | } | 2838 | } |
2839 | |||
2840 | static SIMPLE_DEV_PM_OPS(atl1_pm_ops, atl1_suspend, atl1_resume); | ||
2841 | #define ATL1_PM_OPS (&atl1_pm_ops) | ||
2842 | |||
2865 | #else | 2843 | #else |
2866 | #define atl1_suspend NULL | 2844 | |
2867 | #define atl1_resume NULL | 2845 | static int atl1_suspend(struct device *dev) { return 0; } |
2846 | |||
2847 | #define ATL1_PM_OPS NULL | ||
2868 | #endif | 2848 | #endif |
2869 | 2849 | ||
2870 | static void atl1_shutdown(struct pci_dev *pdev) | 2850 | static void atl1_shutdown(struct pci_dev *pdev) |
2871 | { | 2851 | { |
2872 | #ifdef CONFIG_PM | 2852 | struct net_device *netdev = pci_get_drvdata(pdev); |
2873 | atl1_suspend(pdev, PMSG_SUSPEND); | 2853 | struct atl1_adapter *adapter = netdev_priv(netdev); |
2874 | #endif | 2854 | |
2855 | atl1_suspend(&pdev->dev); | ||
2856 | pci_wake_from_d3(pdev, adapter->wol); | ||
2857 | pci_set_power_state(pdev, PCI_D3hot); | ||
2875 | } | 2858 | } |
2876 | 2859 | ||
2877 | #ifdef CONFIG_NET_POLL_CONTROLLER | 2860 | #ifdef CONFIG_NET_POLL_CONTROLLER |
@@ -3001,6 +2984,11 @@ static int __devinit atl1_probe(struct pci_dev *pdev, | |||
3001 | netdev->features |= NETIF_F_SG; | 2984 | netdev->features |= NETIF_F_SG; |
3002 | netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); | 2985 | netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); |
3003 | 2986 | ||
2987 | netdev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_TSO; | ||
2988 | |||
2989 | /* is this valid? see atl1_setup_mac_ctrl() */ | ||
2990 | netdev->features |= NETIF_F_RXCSUM; | ||
2991 | |||
3004 | /* | 2992 | /* |
3005 | * patch for some L1 of old version, | 2993 | * patch for some L1 of old version, |
3006 | * the final version of L1 may not need these | 2994 | * the final version of L1 may not need these |
@@ -3041,9 +3029,8 @@ static int __devinit atl1_probe(struct pci_dev *pdev, | |||
3041 | atl1_pcie_patch(adapter); | 3029 | atl1_pcie_patch(adapter); |
3042 | /* assume we have no link for now */ | 3030 | /* assume we have no link for now */ |
3043 | netif_carrier_off(netdev); | 3031 | netif_carrier_off(netdev); |
3044 | netif_stop_queue(netdev); | ||
3045 | 3032 | ||
3046 | setup_timer(&adapter->phy_config_timer, &atl1_phy_config, | 3033 | setup_timer(&adapter->phy_config_timer, atl1_phy_config, |
3047 | (unsigned long)adapter); | 3034 | (unsigned long)adapter); |
3048 | adapter->phy_timer_pending = false; | 3035 | adapter->phy_timer_pending = false; |
3049 | 3036 | ||
@@ -3116,9 +3103,8 @@ static struct pci_driver atl1_driver = { | |||
3116 | .id_table = atl1_pci_tbl, | 3103 | .id_table = atl1_pci_tbl, |
3117 | .probe = atl1_probe, | 3104 | .probe = atl1_probe, |
3118 | .remove = __devexit_p(atl1_remove), | 3105 | .remove = __devexit_p(atl1_remove), |
3119 | .suspend = atl1_suspend, | 3106 | .shutdown = atl1_shutdown, |
3120 | .resume = atl1_resume, | 3107 | .driver.pm = ATL1_PM_OPS, |
3121 | .shutdown = atl1_shutdown | ||
3122 | }; | 3108 | }; |
3123 | 3109 | ||
3124 | /* | 3110 | /* |
@@ -3246,13 +3232,13 @@ static int atl1_get_settings(struct net_device *netdev, | |||
3246 | if (netif_carrier_ok(adapter->netdev)) { | 3232 | if (netif_carrier_ok(adapter->netdev)) { |
3247 | u16 link_speed, link_duplex; | 3233 | u16 link_speed, link_duplex; |
3248 | atl1_get_speed_and_duplex(hw, &link_speed, &link_duplex); | 3234 | atl1_get_speed_and_duplex(hw, &link_speed, &link_duplex); |
3249 | ecmd->speed = link_speed; | 3235 | ethtool_cmd_speed_set(ecmd, link_speed); |
3250 | if (link_duplex == FULL_DUPLEX) | 3236 | if (link_duplex == FULL_DUPLEX) |
3251 | ecmd->duplex = DUPLEX_FULL; | 3237 | ecmd->duplex = DUPLEX_FULL; |
3252 | else | 3238 | else |
3253 | ecmd->duplex = DUPLEX_HALF; | 3239 | ecmd->duplex = DUPLEX_HALF; |
3254 | } else { | 3240 | } else { |
3255 | ecmd->speed = -1; | 3241 | ethtool_cmd_speed_set(ecmd, -1); |
3256 | ecmd->duplex = -1; | 3242 | ecmd->duplex = -1; |
3257 | } | 3243 | } |
3258 | if (hw->media_type == MEDIA_TYPE_AUTO_SENSOR || | 3244 | if (hw->media_type == MEDIA_TYPE_AUTO_SENSOR || |
@@ -3283,7 +3269,8 @@ static int atl1_set_settings(struct net_device *netdev, | |||
3283 | if (ecmd->autoneg == AUTONEG_ENABLE) | 3269 | if (ecmd->autoneg == AUTONEG_ENABLE) |
3284 | hw->media_type = MEDIA_TYPE_AUTO_SENSOR; | 3270 | hw->media_type = MEDIA_TYPE_AUTO_SENSOR; |
3285 | else { | 3271 | else { |
3286 | if (ecmd->speed == SPEED_1000) { | 3272 | u32 speed = ethtool_cmd_speed(ecmd); |
3273 | if (speed == SPEED_1000) { | ||
3287 | if (ecmd->duplex != DUPLEX_FULL) { | 3274 | if (ecmd->duplex != DUPLEX_FULL) { |
3288 | if (netif_msg_link(adapter)) | 3275 | if (netif_msg_link(adapter)) |
3289 | dev_warn(&adapter->pdev->dev, | 3276 | dev_warn(&adapter->pdev->dev, |
@@ -3292,7 +3279,7 @@ static int atl1_set_settings(struct net_device *netdev, | |||
3292 | goto exit_sset; | 3279 | goto exit_sset; |
3293 | } | 3280 | } |
3294 | hw->media_type = MEDIA_TYPE_1000M_FULL; | 3281 | hw->media_type = MEDIA_TYPE_1000M_FULL; |
3295 | } else if (ecmd->speed == SPEED_100) { | 3282 | } else if (speed == SPEED_100) { |
3296 | if (ecmd->duplex == DUPLEX_FULL) | 3283 | if (ecmd->duplex == DUPLEX_FULL) |
3297 | hw->media_type = MEDIA_TYPE_100M_FULL; | 3284 | hw->media_type = MEDIA_TYPE_100M_FULL; |
3298 | else | 3285 | else |
@@ -3408,6 +3395,9 @@ static int atl1_set_wol(struct net_device *netdev, | |||
3408 | adapter->wol = 0; | 3395 | adapter->wol = 0; |
3409 | if (wol->wolopts & WAKE_MAGIC) | 3396 | if (wol->wolopts & WAKE_MAGIC) |
3410 | adapter->wol |= ATLX_WUFC_MAG; | 3397 | adapter->wol |= ATLX_WUFC_MAG; |
3398 | |||
3399 | device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); | ||
3400 | |||
3411 | return 0; | 3401 | return 0; |
3412 | } | 3402 | } |
3413 | 3403 | ||
@@ -3503,6 +3493,8 @@ static int atl1_set_ringparam(struct net_device *netdev, | |||
3503 | struct atl1_rfd_ring rfd_old, rfd_new; | 3493 | struct atl1_rfd_ring rfd_old, rfd_new; |
3504 | struct atl1_rrd_ring rrd_old, rrd_new; | 3494 | struct atl1_rrd_ring rrd_old, rrd_new; |
3505 | struct atl1_ring_header rhdr_old, rhdr_new; | 3495 | struct atl1_ring_header rhdr_old, rhdr_new; |
3496 | struct atl1_smb smb; | ||
3497 | struct atl1_cmb cmb; | ||
3506 | int err; | 3498 | int err; |
3507 | 3499 | ||
3508 | tpd_old = adapter->tpd_ring; | 3500 | tpd_old = adapter->tpd_ring; |
@@ -3543,11 +3535,19 @@ static int atl1_set_ringparam(struct net_device *netdev, | |||
3543 | adapter->rrd_ring = rrd_old; | 3535 | adapter->rrd_ring = rrd_old; |
3544 | adapter->tpd_ring = tpd_old; | 3536 | adapter->tpd_ring = tpd_old; |
3545 | adapter->ring_header = rhdr_old; | 3537 | adapter->ring_header = rhdr_old; |
3538 | /* | ||
3539 | * Save SMB and CMB, since atl1_free_ring_resources | ||
3540 | * will clear them. | ||
3541 | */ | ||
3542 | smb = adapter->smb; | ||
3543 | cmb = adapter->cmb; | ||
3546 | atl1_free_ring_resources(adapter); | 3544 | atl1_free_ring_resources(adapter); |
3547 | adapter->rfd_ring = rfd_new; | 3545 | adapter->rfd_ring = rfd_new; |
3548 | adapter->rrd_ring = rrd_new; | 3546 | adapter->rrd_ring = rrd_new; |
3549 | adapter->tpd_ring = tpd_new; | 3547 | adapter->tpd_ring = tpd_new; |
3550 | adapter->ring_header = rhdr_new; | 3548 | adapter->ring_header = rhdr_new; |
3549 | adapter->smb = smb; | ||
3550 | adapter->cmb = cmb; | ||
3551 | 3551 | ||
3552 | err = atl1_up(adapter); | 3552 | err = atl1_up(adapter); |
3553 | if (err) | 3553 | if (err) |
@@ -3599,12 +3599,6 @@ static int atl1_set_pauseparam(struct net_device *netdev, | |||
3599 | return 0; | 3599 | return 0; |
3600 | } | 3600 | } |
3601 | 3601 | ||
3602 | /* FIXME: is this right? -- CHS */ | ||
3603 | static u32 atl1_get_rx_csum(struct net_device *netdev) | ||
3604 | { | ||
3605 | return 1; | ||
3606 | } | ||
3607 | |||
3608 | static void atl1_get_strings(struct net_device *netdev, u32 stringset, | 3602 | static void atl1_get_strings(struct net_device *netdev, u32 stringset, |
3609 | u8 *data) | 3603 | u8 *data) |
3610 | { | 3604 | { |
@@ -3658,7 +3652,7 @@ static int atl1_nway_reset(struct net_device *netdev) | |||
3658 | return 0; | 3652 | return 0; |
3659 | } | 3653 | } |
3660 | 3654 | ||
3661 | const struct ethtool_ops atl1_ethtool_ops = { | 3655 | static const struct ethtool_ops atl1_ethtool_ops = { |
3662 | .get_settings = atl1_get_settings, | 3656 | .get_settings = atl1_get_settings, |
3663 | .set_settings = atl1_set_settings, | 3657 | .set_settings = atl1_set_settings, |
3664 | .get_drvinfo = atl1_get_drvinfo, | 3658 | .get_drvinfo = atl1_get_drvinfo, |
@@ -3672,13 +3666,9 @@ const struct ethtool_ops atl1_ethtool_ops = { | |||
3672 | .set_ringparam = atl1_set_ringparam, | 3666 | .set_ringparam = atl1_set_ringparam, |
3673 | .get_pauseparam = atl1_get_pauseparam, | 3667 | .get_pauseparam = atl1_get_pauseparam, |
3674 | .set_pauseparam = atl1_set_pauseparam, | 3668 | .set_pauseparam = atl1_set_pauseparam, |
3675 | .get_rx_csum = atl1_get_rx_csum, | ||
3676 | .set_tx_csum = ethtool_op_set_tx_hw_csum, | ||
3677 | .get_link = ethtool_op_get_link, | 3669 | .get_link = ethtool_op_get_link, |
3678 | .set_sg = ethtool_op_set_sg, | ||
3679 | .get_strings = atl1_get_strings, | 3670 | .get_strings = atl1_get_strings, |
3680 | .nway_reset = atl1_nway_reset, | 3671 | .nway_reset = atl1_nway_reset, |
3681 | .get_ethtool_stats = atl1_get_ethtool_stats, | 3672 | .get_ethtool_stats = atl1_get_ethtool_stats, |
3682 | .get_sset_count = atl1_get_sset_count, | 3673 | .get_sset_count = atl1_get_sset_count, |
3683 | .set_tso = ethtool_op_set_tso, | ||
3684 | }; | 3674 | }; |
diff --git a/drivers/net/atlx/atl1.h b/drivers/net/atlx/atl1.h index 9c0ddb273ac8..68de8cbfb3ec 100644 --- a/drivers/net/atlx/atl1.h +++ b/drivers/net/atlx/atl1.h | |||
@@ -56,16 +56,13 @@ struct atl1_adapter; | |||
56 | struct atl1_hw; | 56 | struct atl1_hw; |
57 | 57 | ||
58 | /* function prototypes needed by multiple files */ | 58 | /* function prototypes needed by multiple files */ |
59 | u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr); | 59 | static u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr); |
60 | void atl1_hash_set(struct atl1_hw *hw, u32 hash_value); | 60 | static void atl1_hash_set(struct atl1_hw *hw, u32 hash_value); |
61 | s32 atl1_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data); | 61 | static void atl1_set_mac_addr(struct atl1_hw *hw); |
62 | void atl1_set_mac_addr(struct atl1_hw *hw); | ||
63 | static int atl1_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, | 62 | static int atl1_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, |
64 | int cmd); | 63 | int cmd); |
65 | static u32 atl1_check_link(struct atl1_adapter *adapter); | 64 | static u32 atl1_check_link(struct atl1_adapter *adapter); |
66 | 65 | ||
67 | extern const struct ethtool_ops atl1_ethtool_ops; | ||
68 | |||
69 | /* hardware definitions specific to L1 */ | 66 | /* hardware definitions specific to L1 */ |
70 | 67 | ||
71 | /* Block IDLE Status Register */ | 68 | /* Block IDLE Status Register */ |
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index 8da87383fb39..16249e9b6b95 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c | |||
@@ -51,10 +51,10 @@ | |||
51 | 51 | ||
52 | #define ATL2_DRV_VERSION "2.2.3" | 52 | #define ATL2_DRV_VERSION "2.2.3" |
53 | 53 | ||
54 | static char atl2_driver_name[] = "atl2"; | 54 | static const char atl2_driver_name[] = "atl2"; |
55 | static const char atl2_driver_string[] = "Atheros(R) L2 Ethernet Driver"; | 55 | static const char atl2_driver_string[] = "Atheros(R) L2 Ethernet Driver"; |
56 | static char atl2_copyright[] = "Copyright (c) 2007 Atheros Corporation."; | 56 | static const char atl2_copyright[] = "Copyright (c) 2007 Atheros Corporation."; |
57 | static char atl2_driver_version[] = ATL2_DRV_VERSION; | 57 | static const char atl2_driver_version[] = ATL2_DRV_VERSION; |
58 | 58 | ||
59 | MODULE_AUTHOR("Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>"); | 59 | MODULE_AUTHOR("Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>"); |
60 | MODULE_DESCRIPTION("Atheros Fast Ethernet Network Driver"); | 60 | MODULE_DESCRIPTION("Atheros Fast Ethernet Network Driver"); |
@@ -93,8 +93,8 @@ static int __devinit atl2_sw_init(struct atl2_adapter *adapter) | |||
93 | hw->device_id = pdev->device; | 93 | hw->device_id = pdev->device; |
94 | hw->subsystem_vendor_id = pdev->subsystem_vendor; | 94 | hw->subsystem_vendor_id = pdev->subsystem_vendor; |
95 | hw->subsystem_id = pdev->subsystem_device; | 95 | hw->subsystem_id = pdev->subsystem_device; |
96 | hw->revision_id = pdev->revision; | ||
96 | 97 | ||
97 | pci_read_config_byte(pdev, PCI_REVISION_ID, &hw->revision_id); | ||
98 | pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word); | 98 | pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word); |
99 | 99 | ||
100 | adapter->wol = 0; | 100 | adapter->wol = 0; |
@@ -870,7 +870,7 @@ static netdev_tx_t atl2_xmit_frame(struct sk_buff *skb, | |||
870 | offset = ((u32)(skb->len-copy_len + 3) & ~3); | 870 | offset = ((u32)(skb->len-copy_len + 3) & ~3); |
871 | } | 871 | } |
872 | #ifdef NETIF_F_HW_VLAN_TX | 872 | #ifdef NETIF_F_HW_VLAN_TX |
873 | if (adapter->vlgrp && vlan_tx_tag_present(skb)) { | 873 | if (vlan_tx_tag_present(skb)) { |
874 | u16 vlan_tag = vlan_tx_tag_get(skb); | 874 | u16 vlan_tag = vlan_tx_tag_get(skb); |
875 | vlan_tag = (vlan_tag << 4) | | 875 | vlan_tag = (vlan_tag << 4) | |
876 | (vlan_tag >> 13) | | 876 | (vlan_tag >> 13) | |
@@ -1411,9 +1411,8 @@ static int __devinit atl2_probe(struct pci_dev *pdev, | |||
1411 | 1411 | ||
1412 | err = -EIO; | 1412 | err = -EIO; |
1413 | 1413 | ||
1414 | #ifdef NETIF_F_HW_VLAN_TX | 1414 | netdev->hw_features = NETIF_F_SG; |
1415 | netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); | 1415 | netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); |
1416 | #endif | ||
1417 | 1416 | ||
1418 | /* Init PHY as early as possible due to power saving issue */ | 1417 | /* Init PHY as early as possible due to power saving issue */ |
1419 | atl2_phy_init(&adapter->hw); | 1418 | atl2_phy_init(&adapter->hw); |
@@ -1444,11 +1443,11 @@ static int __devinit atl2_probe(struct pci_dev *pdev, | |||
1444 | atl2_check_options(adapter); | 1443 | atl2_check_options(adapter); |
1445 | 1444 | ||
1446 | init_timer(&adapter->watchdog_timer); | 1445 | init_timer(&adapter->watchdog_timer); |
1447 | adapter->watchdog_timer.function = &atl2_watchdog; | 1446 | adapter->watchdog_timer.function = atl2_watchdog; |
1448 | adapter->watchdog_timer.data = (unsigned long) adapter; | 1447 | adapter->watchdog_timer.data = (unsigned long) adapter; |
1449 | 1448 | ||
1450 | init_timer(&adapter->phy_config_timer); | 1449 | init_timer(&adapter->phy_config_timer); |
1451 | adapter->phy_config_timer.function = &atl2_phy_config; | 1450 | adapter->phy_config_timer.function = atl2_phy_config; |
1452 | adapter->phy_config_timer.data = (unsigned long) adapter; | 1451 | adapter->phy_config_timer.data = (unsigned long) adapter; |
1453 | 1452 | ||
1454 | INIT_WORK(&adapter->reset_task, atl2_reset_task); | 1453 | INIT_WORK(&adapter->reset_task, atl2_reset_task); |
@@ -1504,8 +1503,8 @@ static void __devexit atl2_remove(struct pci_dev *pdev) | |||
1504 | 1503 | ||
1505 | del_timer_sync(&adapter->watchdog_timer); | 1504 | del_timer_sync(&adapter->watchdog_timer); |
1506 | del_timer_sync(&adapter->phy_config_timer); | 1505 | del_timer_sync(&adapter->phy_config_timer); |
1507 | 1506 | cancel_work_sync(&adapter->reset_task); | |
1508 | flush_scheduled_work(); | 1507 | cancel_work_sync(&adapter->link_chg_task); |
1509 | 1508 | ||
1510 | unregister_netdev(netdev); | 1509 | unregister_netdev(netdev); |
1511 | 1510 | ||
@@ -1701,7 +1700,7 @@ static struct pci_driver atl2_driver = { | |||
1701 | .id_table = atl2_pci_tbl, | 1700 | .id_table = atl2_pci_tbl, |
1702 | .probe = atl2_probe, | 1701 | .probe = atl2_probe, |
1703 | .remove = __devexit_p(atl2_remove), | 1702 | .remove = __devexit_p(atl2_remove), |
1704 | /* Power Managment Hooks */ | 1703 | /* Power Management Hooks */ |
1705 | .suspend = atl2_suspend, | 1704 | .suspend = atl2_suspend, |
1706 | #ifdef CONFIG_PM | 1705 | #ifdef CONFIG_PM |
1707 | .resume = atl2_resume, | 1706 | .resume = atl2_resume, |
@@ -1770,13 +1769,13 @@ static int atl2_get_settings(struct net_device *netdev, | |||
1770 | ecmd->transceiver = XCVR_INTERNAL; | 1769 | ecmd->transceiver = XCVR_INTERNAL; |
1771 | 1770 | ||
1772 | if (adapter->link_speed != SPEED_0) { | 1771 | if (adapter->link_speed != SPEED_0) { |
1773 | ecmd->speed = adapter->link_speed; | 1772 | ethtool_cmd_speed_set(ecmd, adapter->link_speed); |
1774 | if (adapter->link_duplex == FULL_DUPLEX) | 1773 | if (adapter->link_duplex == FULL_DUPLEX) |
1775 | ecmd->duplex = DUPLEX_FULL; | 1774 | ecmd->duplex = DUPLEX_FULL; |
1776 | else | 1775 | else |
1777 | ecmd->duplex = DUPLEX_HALF; | 1776 | ecmd->duplex = DUPLEX_HALF; |
1778 | } else { | 1777 | } else { |
1779 | ecmd->speed = -1; | 1778 | ethtool_cmd_speed_set(ecmd, -1); |
1780 | ecmd->duplex = -1; | 1779 | ecmd->duplex = -1; |
1781 | } | 1780 | } |
1782 | 1781 | ||
@@ -1840,11 +1839,6 @@ static int atl2_set_settings(struct net_device *netdev, | |||
1840 | return 0; | 1839 | return 0; |
1841 | } | 1840 | } |
1842 | 1841 | ||
1843 | static u32 atl2_get_tx_csum(struct net_device *netdev) | ||
1844 | { | ||
1845 | return (netdev->features & NETIF_F_HW_CSUM) != 0; | ||
1846 | } | ||
1847 | |||
1848 | static u32 atl2_get_msglevel(struct net_device *netdev) | 1842 | static u32 atl2_get_msglevel(struct net_device *netdev) |
1849 | { | 1843 | { |
1850 | return 0; | 1844 | return 0; |
@@ -1996,13 +1990,15 @@ static int atl2_set_eeprom(struct net_device *netdev, | |||
1996 | if (!eeprom_buff) | 1990 | if (!eeprom_buff) |
1997 | return -ENOMEM; | 1991 | return -ENOMEM; |
1998 | 1992 | ||
1999 | ptr = (u32 *)eeprom_buff; | 1993 | ptr = eeprom_buff; |
2000 | 1994 | ||
2001 | if (eeprom->offset & 3) { | 1995 | if (eeprom->offset & 3) { |
2002 | /* need read/modify/write of first changed EEPROM word */ | 1996 | /* need read/modify/write of first changed EEPROM word */ |
2003 | /* only the second byte of the word is being modified */ | 1997 | /* only the second byte of the word is being modified */ |
2004 | if (!atl2_read_eeprom(hw, first_dword*4, &(eeprom_buff[0]))) | 1998 | if (!atl2_read_eeprom(hw, first_dword*4, &(eeprom_buff[0]))) { |
2005 | return -EIO; | 1999 | ret_val = -EIO; |
2000 | goto out; | ||
2001 | } | ||
2006 | ptr++; | 2002 | ptr++; |
2007 | } | 2003 | } |
2008 | if (((eeprom->offset + eeprom->len) & 3)) { | 2004 | if (((eeprom->offset + eeprom->len) & 3)) { |
@@ -2011,18 +2007,22 @@ static int atl2_set_eeprom(struct net_device *netdev, | |||
2011 | * only the first byte of the word is being modified | 2007 | * only the first byte of the word is being modified |
2012 | */ | 2008 | */ |
2013 | if (!atl2_read_eeprom(hw, last_dword * 4, | 2009 | if (!atl2_read_eeprom(hw, last_dword * 4, |
2014 | &(eeprom_buff[last_dword - first_dword]))) | 2010 | &(eeprom_buff[last_dword - first_dword]))) { |
2015 | return -EIO; | 2011 | ret_val = -EIO; |
2012 | goto out; | ||
2013 | } | ||
2016 | } | 2014 | } |
2017 | 2015 | ||
2018 | /* Device's eeprom is always little-endian, word addressable */ | 2016 | /* Device's eeprom is always little-endian, word addressable */ |
2019 | memcpy(ptr, bytes, eeprom->len); | 2017 | memcpy(ptr, bytes, eeprom->len); |
2020 | 2018 | ||
2021 | for (i = 0; i < last_dword - first_dword + 1; i++) { | 2019 | for (i = 0; i < last_dword - first_dword + 1; i++) { |
2022 | if (!atl2_write_eeprom(hw, ((first_dword+i)*4), eeprom_buff[i])) | 2020 | if (!atl2_write_eeprom(hw, ((first_dword+i)*4), eeprom_buff[i])) { |
2023 | return -EIO; | 2021 | ret_val = -EIO; |
2022 | goto out; | ||
2023 | } | ||
2024 | } | 2024 | } |
2025 | 2025 | out: | |
2026 | kfree(eeprom_buff); | 2026 | kfree(eeprom_buff); |
2027 | return ret_val; | 2027 | return ret_val; |
2028 | } | 2028 | } |
@@ -2106,12 +2106,6 @@ static const struct ethtool_ops atl2_ethtool_ops = { | |||
2106 | .get_eeprom_len = atl2_get_eeprom_len, | 2106 | .get_eeprom_len = atl2_get_eeprom_len, |
2107 | .get_eeprom = atl2_get_eeprom, | 2107 | .get_eeprom = atl2_get_eeprom, |
2108 | .set_eeprom = atl2_set_eeprom, | 2108 | .set_eeprom = atl2_set_eeprom, |
2109 | .get_tx_csum = atl2_get_tx_csum, | ||
2110 | .get_sg = ethtool_op_get_sg, | ||
2111 | .set_sg = ethtool_op_set_sg, | ||
2112 | #ifdef NETIF_F_TSO | ||
2113 | .get_tso = ethtool_op_get_tso, | ||
2114 | #endif | ||
2115 | }; | 2109 | }; |
2116 | 2110 | ||
2117 | static void atl2_set_ethtool_ops(struct net_device *netdev) | 2111 | static void atl2_set_ethtool_ops(struct net_device *netdev) |
diff --git a/drivers/net/atlx/atlx.c b/drivers/net/atlx/atlx.c index f979ea2d6d3c..afb7f7dd1bb1 100644 --- a/drivers/net/atlx/atlx.c +++ b/drivers/net/atlx/atlx.c | |||
@@ -41,6 +41,10 @@ | |||
41 | 41 | ||
42 | #include "atlx.h" | 42 | #include "atlx.h" |
43 | 43 | ||
44 | static s32 atlx_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data); | ||
45 | static u32 atlx_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr); | ||
46 | static void atlx_set_mac_addr(struct atl1_hw *hw); | ||
47 | |||
44 | static struct atlx_spi_flash_dev flash_table[] = { | 48 | static struct atlx_spi_flash_dev flash_table[] = { |
45 | /* MFR_NAME WRSR READ PRGM WREN WRDI RDSR RDID SEC_ERS CHIP_ERS */ | 49 | /* MFR_NAME WRSR READ PRGM WREN WRDI RDSR RDID SEC_ERS CHIP_ERS */ |
46 | {"Atmel", 0x00, 0x03, 0x02, 0x06, 0x04, 0x05, 0x15, 0x52, 0x62}, | 50 | {"Atmel", 0x00, 0x03, 0x02, 0x06, 0x04, 0x05, 0x15, 0x52, 0x62}, |