ar71xx: ag71xx: poll PHY status of all available switch ports
SVN-Revision: 30924
This commit is contained in:
parent
8449eecf5f
commit
7c9534cfd7
1 changed files with 2 additions and 1 deletions
|
@ -1070,11 +1070,12 @@ err_free:
|
||||||
|
|
||||||
static void link_function(struct work_struct *work) {
|
static void link_function(struct work_struct *work) {
|
||||||
struct ag71xx *ag = container_of(work, struct ag71xx, link_work.work);
|
struct ag71xx *ag = container_of(work, struct ag71xx, link_work.work);
|
||||||
|
struct ar7240sw *as = ag->phy_priv;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int i;
|
int i;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < as->swdev.ports; i++) {
|
||||||
int link = ar7240sw_phy_read(ag->mii_bus, i, MII_BMSR);
|
int link = ar7240sw_phy_read(ag->mii_bus, i, MII_BMSR);
|
||||||
if(link & BMSR_LSTATUS) {
|
if(link & BMSR_LSTATUS) {
|
||||||
status = 1;
|
status = 1;
|
||||||
|
|
Loading…
Reference in a new issue