Skip to content

Commit 98200ec

Browse files
Toshiharu Okadadavem330
authored andcommitted
pch_gbe: Fix the MAC Address load issue.
With the specification of hardware, the processing at the time of driver starting was modified. This device write automatically the MAC address read from serial ROM into a MAC Adress1A/1B register at the time of power on reset. However, when stable clock is not supplied, the writing of MAC Adress1A/1B register may not be completed. In this case, it is necessary to load MAC address to MAC Address1A/1B register by the MAC Address1 load register. This patch always does the above processing, in order not to be dependent on system environment. Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5d17920 commit 98200ec

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

drivers/net/pch_gbe/pch_gbe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ struct pch_gbe_regs {
7373
struct pch_gbe_regs_mac_adr mac_adr[16];
7474
u32 ADDR_MASK;
7575
u32 MIIM;
76-
u32 reserve2;
76+
u32 MAC_ADDR_LOAD;
7777
u32 RGMII_ST;
7878
u32 RGMII_CTRL;
7979
u32 reserve3[3];

drivers/net/pch_gbe/pch_gbe_main.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ static unsigned int copybreak __read_mostly = PCH_GBE_COPYBREAK_DEFAULT;
8989
static int pch_gbe_mdio_read(struct net_device *netdev, int addr, int reg);
9090
static void pch_gbe_mdio_write(struct net_device *netdev, int addr, int reg,
9191
int data);
92+
93+
inline void pch_gbe_mac_load_mac_addr(struct pch_gbe_hw *hw)
94+
{
95+
iowrite32(0x01, &hw->reg->MAC_ADDR_LOAD);
96+
}
97+
9298
/**
9399
* pch_gbe_mac_read_mac_addr - Read MAC address
94100
* @hw: Pointer to the HW structure
@@ -2331,6 +2337,7 @@ static int pch_gbe_probe(struct pci_dev *pdev,
23312337
netdev->features = NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_GRO;
23322338
pch_gbe_set_ethtool_ops(netdev);
23332339

2340+
pch_gbe_mac_load_mac_addr(&adapter->hw);
23342341
pch_gbe_mac_reset_hw(&adapter->hw);
23352342

23362343
/* setup the private structure */

0 commit comments

Comments
 (0)