Skip to content

Commit 150647f

Browse files
shimodaydavem330
authored andcommitted
net: sh_eth: change the condition of initialization
The SH7757 has 2 Fast Ethernet and 2 Gigabit Ethernet, and the first Gigabit channel needs the initialization. So, this patch adds the parameter of "needs_init", and if the sh_eth_plat_data is set it to 1, the driver will initialize the channel. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3acbc97 commit 150647f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

drivers/net/ethernet/renesas/sh_eth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,8 +1859,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
18591859
/* read and set MAC address */
18601860
read_mac_address(ndev, pd->mac_addr);
18611861

1862-
/* First device only init */
1863-
if (!devno) {
1862+
/* initialize first or needed device */
1863+
if (!devno || pd->needs_init) {
18641864
if (mdp->cd->tsu) {
18651865
struct resource *rtsu;
18661866
rtsu = platform_get_resource(pdev, IORESOURCE_MEM, 1);

include/linux/sh_eth.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct sh_eth_plat_data {
2020
unsigned char mac_addr[6];
2121
unsigned no_ether_link:1;
2222
unsigned ether_link_active_low:1;
23+
unsigned needs_init:1;
2324
};
2425

2526
#endif

0 commit comments

Comments
 (0)