Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 150647fb authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by David S. Miller
Browse files

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: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3acbc971
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1859,8 +1859,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
	/* read and set MAC address */
	read_mac_address(ndev, pd->mac_addr);

	/* First device only init */
	if (!devno) {
	/* initialize first or needed device */
	if (!devno || pd->needs_init) {
		if (mdp->cd->tsu) {
			struct resource *rtsu;
			rtsu = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ struct sh_eth_plat_data {
	unsigned char mac_addr[6];
	unsigned no_ether_link:1;
	unsigned ether_link_active_low:1;
	unsigned needs_init:1;
};

#endif