|
@@ -674,12 +674,29 @@ PXENV_EXIT_t pxenv_undi_isr ( struct s_PXENV_UNDI_ISR *undi_isr ) {
|
674
|
674
|
*/
|
675
|
675
|
netdev_poll ( pxe_netdev );
|
676
|
676
|
|
677
|
|
- /* Disable interrupts to avoid interrupt storm */
|
|
677
|
+ /* A 100% accurate determination of "OURS" vs "NOT
|
|
678
|
+ * OURS" is difficult to achieve without invasive and
|
|
679
|
+ * unpleasant changes to the driver model. We settle
|
|
680
|
+ * for always returning "OURS" if interrupts are
|
|
681
|
+ * currently enabled.
|
|
682
|
+ *
|
|
683
|
+ * Returning "NOT OURS" when interrupts are disabled
|
|
684
|
+ * allows us to avoid a potential interrupt storm when
|
|
685
|
+ * we are on a shared interrupt line; if we were to
|
|
686
|
+ * always return "OURS" then the other device's ISR
|
|
687
|
+ * may never be called.
|
|
688
|
+ */
|
|
689
|
+ if ( netdev_irq_enabled ( pxe_netdev ) ) {
|
|
690
|
+ DBGC2 ( &pxenv_undi_isr, " OURS" );
|
|
691
|
+ undi_isr->FuncFlag = PXENV_UNDI_ISR_OUT_OURS;
|
|
692
|
+ } else {
|
|
693
|
+ DBGC2 ( &pxenv_undi_isr, " NOT OURS" );
|
|
694
|
+ undi_isr->FuncFlag = PXENV_UNDI_ISR_OUT_NOT_OURS;
|
|
695
|
+ }
|
|
696
|
+
|
|
697
|
+ /* Disable interrupts */
|
678
|
698
|
netdev_irq ( pxe_netdev, 0 );
|
679
|
699
|
|
680
|
|
- /* Always say it was ours for the sake of simplicity */
|
681
|
|
- DBGC2 ( &pxenv_undi_isr, " OURS" );
|
682
|
|
- undi_isr->FuncFlag = PXENV_UNDI_ISR_OUT_OURS;
|
683
|
700
|
break;
|
684
|
701
|
case PXENV_UNDI_ISR_IN_PROCESS :
|
685
|
702
|
case PXENV_UNDI_ISR_IN_GET_NEXT :
|