Change the way PHY interrupts work: disable automatically. Then we have to re-subscribe each time after the interrupt fires
This commit is contained in:
parent
5be7dd2140
commit
bf98b2bbac
@ -327,9 +327,14 @@ static int nsh_netinit_monitor(void)
|
|||||||
goto errout_with_socket;
|
goto errout_with_socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Now loop, waiting for changes in link status */
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
/* Configure to receive a signal on changes in link status */
|
/* Configure to receive a signal on changes in link status */
|
||||||
|
|
||||||
strncpy(ifr.ifr_name, NET_DEVNAME, IFNAMSIZ);
|
strncpy(ifr.ifr_name, NET_DEVNAME, IFNAMSIZ);
|
||||||
|
|
||||||
ifr.ifr_mii_notify_pid = 0; /* PID=0 means this task */
|
ifr.ifr_mii_notify_pid = 0; /* PID=0 means this task */
|
||||||
ifr.ifr_mii_notify_signo = CONFIG_NSH_NETINIT_SIGNO;
|
ifr.ifr_mii_notify_signo = CONFIG_NSH_NETINIT_SIGNO;
|
||||||
ifr.ifr_mii_notify_arg = NULL;
|
ifr.ifr_mii_notify_arg = NULL;
|
||||||
@ -344,14 +349,8 @@ static int nsh_netinit_monitor(void)
|
|||||||
goto errout_with_sigaction;
|
goto errout_with_sigaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now loop, waiting for changes in link status */
|
|
||||||
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
/* Does the driver think that the link is up or down? */
|
/* Does the driver think that the link is up or down? */
|
||||||
|
|
||||||
strncpy(ifr.ifr_name, NET_DEVNAME, IFNAMSIZ);
|
|
||||||
|
|
||||||
ret = ioctl(sd, SIOCGIFFLAGS, (unsigned long)&ifr);
|
ret = ioctl(sd, SIOCGIFFLAGS, (unsigned long)&ifr);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
@ -483,7 +482,7 @@ static int nsh_netinit_monitor(void)
|
|||||||
abstime.tv_nsec -= 1000000000;
|
abstime.tv_nsec -= 1000000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUGVERIFY(sem_timedwait(&g_notify_sem, &abstime));
|
(void)sem_timedwait(&g_notify_sem, &abstime);
|
||||||
sched_unlock();
|
sched_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user