Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Yoshihiro Shimoda and committed by
David S. Miller
150647fb 3acbc971

+3 -2
+2 -2
drivers/net/ethernet/renesas/sh_eth.c
··· 1859 1859 /* read and set MAC address */ 1860 1860 read_mac_address(ndev, pd->mac_addr); 1861 1861 1862 - /* First device only init */ 1863 - if (!devno) { 1862 + /* initialize first or needed device */ 1863 + if (!devno || pd->needs_init) { 1864 1864 if (mdp->cd->tsu) { 1865 1865 struct resource *rtsu; 1866 1866 rtsu = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+1
include/linux/sh_eth.h
··· 20 20 unsigned char mac_addr[6]; 21 21 unsigned no_ether_link:1; 22 22 unsigned ether_link_active_low:1; 23 + unsigned needs_init:1; 23 24 }; 24 25 25 26 #endif