In the if_em driver, it appears there is a possibility of 
a system crash when POLLING is enabled in conjunction with
a link change.

em_disable_intr leaves the RXSEQ interrupt enabled (which
occurs when a link goes up or down). THe em_intr routine,
when in polling mode, just returns (with the interrupt
still active), which then re-enters it. the kern_poll
will never get a chance to do its POLL_AND_CHECK_STATUS in
this case.

I'm proposing to add to em_intr a call to em_poll with
POLL_AND_CHECK_STATUS if there is an interrupt pending
and we are in polling mode:

1086c1086,1087
<       if (ifp->if_ipending & IFF_POLLING)
---
>       if (ifp->if_ipending & IFF_POLLING) {
>               em_poll(ifp, POLL_AND_CHECK_STATUS, 1);
1087a1089
>       }

I also propose to enable the link status change interrupt in
em_disable_intr():
2259c2261
<                       (0xffffffff & ~E1000_IMC_RXSEQ));
---
>                       (0xffffffff & ~(E1000_IMC_RXSEQ | E1000_ICR_LSC)));

Does anybody have any comments on this?

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to