Skip to content

Commit

Permalink
net: sh_eth: change the condition of initialization
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
shimoday authored and davem330 committed Feb 16, 2012
1 parent 3acbc97 commit 150647f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/renesas/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions include/linux/sh_eth.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 150647f

Please sign in to comment.