DragonFly BSD
DragonFly submit List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: kue0 not receiving patch


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 14 Feb 2005 23:19:29 -0800 (PST)

    Hmm.  That doesn't look quite right.... the mbuf is being put on the
    ifq but then it is also being passed to NETISR_USB.   NETISR_USB
    (usbintr() in usb/usb_ethersubr.c) takes the passed mbuf and 
    IF_DEQUEUE's it... so far so good.  But then it *LOOPS* on the ifq
    to get the next mbuf... but that means the same mbuf may be IF_DEQUEUE'd
    more then once since the other mbufs on the ifq also had an ISR queued
    for them.

    It sounds like if more then one packet is queued to the NETISR, the 
    system ought to crash :-(.

    It seems to me that instead of IF_ENQUEUE'ing the mbuf in 
    usb_ether_input() and usb_tx_done() we should have the usbintr() code
    not try to dequeue it.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>


:This patch ought to fix the USB Ethernet transmit/receive problems for 
:all adaptors, not just kue (cue too!?)
:
:Plenty of opportunity to clean this code up to remove usbq_rx and 
:usbq_tx, since the messages handle the queuing for us. But this fix gets 
:things working...
:
:
:--- bus/usb/usb_ethersubr.c     2004-07-23 00:16:24.000000000 -0700
:+++ /tmp/usb_ethersubr.c        2005-02-14 11:54:02.000000000 -0800
:@@ -134,11 +134,13 @@
:  void
:  usb_ether_input(struct mbuf *m)
:  {
:+       IF_ENQUEUE(&usbq_rx, m);
:         netisr_queue(NETISR_USB, m);
:  }
:
:  void
:  usb_tx_done(struct mbuf *m)
:  {
:+       IF_ENQUEUE(&usbq_tx, m);
:         netisr_queue(NETISR_USB, m);
:  }
:--- dev/netif/kue/if_kue.c      2004-10-14 11:31:02.000000000 -0700
:+++ /tmp/if_kue.c       2005-02-14 11:59:39.000000000 -0800
:@@ -279,7 +279,8 @@
:          * it's probed while the firmware is still loaded and
:          * running.
:          */
:-       if (hwrev == 0x0202)
:+       /* if (hwrev == 0x0202): Apparently this can be 0x2xx) */
:+       if (hwrev > 0x0202)
:                 return(0);
:
:         /* Load code segment */



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]