diff options
-rw-r--r-- | arch/sh/include/asm/sh_eth.h | 3 | ||||
-rw-r--r-- | drivers/net/sh_eth.c | 6 | ||||
-rw-r--r-- | drivers/net/sh_eth.h | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/arch/sh/include/asm/sh_eth.h b/arch/sh/include/asm/sh_eth.h index bb832584f3c1..acf99700deed 100644 --- a/arch/sh/include/asm/sh_eth.h +++ b/arch/sh/include/asm/sh_eth.h | |||
@@ -6,6 +6,9 @@ enum {EDMAC_LITTLE_ENDIAN, EDMAC_BIG_ENDIAN}; | |||
6 | struct sh_eth_plat_data { | 6 | struct sh_eth_plat_data { |
7 | int phy; | 7 | int phy; |
8 | int edmac_endian; | 8 | int edmac_endian; |
9 | |||
10 | unsigned no_ether_link:1; | ||
11 | unsigned ether_link_active_low:1; | ||
9 | }; | 12 | }; |
10 | 13 | ||
11 | #endif | 14 | #endif |
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 4c4dcbf19026..f49d0800c1d1 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
@@ -772,13 +772,15 @@ static void sh_eth_error(struct net_device *ndev, int intr_status) | |||
772 | mdp->stats.tx_carrier_errors++; | 772 | mdp->stats.tx_carrier_errors++; |
773 | if (felic_stat & ECSR_LCHNG) { | 773 | if (felic_stat & ECSR_LCHNG) { |
774 | /* Link Changed */ | 774 | /* Link Changed */ |
775 | if (mdp->cd->no_psr) { | 775 | if (mdp->cd->no_psr || mdp->no_ether_link) { |
776 | if (mdp->link == PHY_DOWN) | 776 | if (mdp->link == PHY_DOWN) |
777 | link_stat = 0; | 777 | link_stat = 0; |
778 | else | 778 | else |
779 | link_stat = PHY_ST_LINK; | 779 | link_stat = PHY_ST_LINK; |
780 | } else { | 780 | } else { |
781 | link_stat = (ctrl_inl(ioaddr + PSR)); | 781 | link_stat = (ctrl_inl(ioaddr + PSR)); |
782 | if (mdp->ether_link_active_low) | ||
783 | link_stat = ~link_stat; | ||
782 | } | 784 | } |
783 | if (!(link_stat & PHY_ST_LINK)) { | 785 | if (!(link_stat & PHY_ST_LINK)) { |
784 | /* Link Down : disable tx and rx */ | 786 | /* Link Down : disable tx and rx */ |
@@ -1410,6 +1412,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev) | |||
1410 | mdp->phy_id = pd->phy; | 1412 | mdp->phy_id = pd->phy; |
1411 | /* EDMAC endian */ | 1413 | /* EDMAC endian */ |
1412 | mdp->edmac_endian = pd->edmac_endian; | 1414 | mdp->edmac_endian = pd->edmac_endian; |
1415 | mdp->no_ether_link = pd->no_ether_link; | ||
1416 | mdp->ether_link_active_low = pd->ether_link_active_low; | ||
1413 | 1417 | ||
1414 | /* set cpu data */ | 1418 | /* set cpu data */ |
1415 | mdp->cd = &sh_eth_my_cpu_data; | 1419 | mdp->cd = &sh_eth_my_cpu_data; |
diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h index 9afe5b4c855d..ba151f86ae7b 100644 --- a/drivers/net/sh_eth.h +++ b/drivers/net/sh_eth.h | |||
@@ -729,6 +729,9 @@ struct sh_eth_private { | |||
729 | char post_rx; /* POST receive */ | 729 | char post_rx; /* POST receive */ |
730 | char post_fw; /* POST forward */ | 730 | char post_fw; /* POST forward */ |
731 | struct net_device_stats tsu_stats; /* TSU forward status */ | 731 | struct net_device_stats tsu_stats; /* TSU forward status */ |
732 | |||
733 | unsigned no_ether_link:1; | ||
734 | unsigned ether_link_active_low:1; | ||
732 | }; | 735 | }; |
733 | 736 | ||
734 | static inline void sh_eth_soft_swap(char *src, int len) | 737 | static inline void sh_eth_soft_swap(char *src, int len) |