yes,

you are right

regards,
misho

----- Original Message -----
From: "Luigi Rizzo" <[EMAIL PROTECTED]>
To: "misho" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 5:00 AM
Subject: Re: HEADS-UP: net polling code now in STABLE.


> On Thu, Dec 06, 2001 at 04:50:46AM +0200, misho wrote:
> > Hi Luigi,
> >
> > I found this bug several days ago, but I don;t have free time to send
you
> > simple patch.
> > In my opinion it;s better to disable interrupts in xxx_intr() code when
> > device is in polling mode.
> > Something like this:
>
> I have committed a proper fix yesterday.
>
> The code you propose is a safety belt to mask bugs, but *_intr()
> could still be called because other devices are sharing the interrupt
> line (this is actually very common when you have many interfaces).
>
> As a matter of fact, calling *_stop() or writing to I/O registers
> when you get some unwanted interrupts is a bad thing because the
> operations involved can be very time consuming.
>
> cheers
> luigi
>
> > /*
> >  * Process interface interrupts.
> >  */
> > static void
> > fxp_intr(void *xsc)
> > {
> >  struct fxp_softc *sc = xsc;
> >  u_int8_t statack;
> >
> > #ifdef DEVICE_POLLING
> >  struct ifnet *ifp = &sc->sc_if;
> >
> >  if (ifp->if_ipending & IFF_POLLING) {
> >       /* this shouldn't happen, we are in polling mode
> >        *     disable interrupts
> >        */
> >       CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE);
> >       return;
> > }
> >  if (ether_poll_register(fxp_poll, ifp)) {
>


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

Reply via email to