DragonFly commits List (threaded) for 2007-04
DragonFly BSD
DragonFly commits List (threaded) for 2007-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/dev/netif/rum if_rum.c if_rumvar.h


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 8 Apr 2007 02:41:42 -0700 (PDT)

sephe       2007/04/08 02:41:41 PDT

DragonFly src repository

  Modified files:
    sys/dev/netif/rum    if_rum.c if_rumvar.h 
  Log:
  Code cleanup:
  - Nuke commented out spl*() and function declaration.
  - Break long comment lines in rum_ioctl().
  - Nuke unnecessary NULL node check in rum_start().
  
  Resource alloc/free fixes and cleanup:
  - Fix several resource leakages:
    o  In rum_start(), decrease node refcnt on error handling path.
    o  In rum_stop(), free rum_softc.stats_xfer.
    o  In rum_tx_free_list(), free possible pending TX mbuf.
  - In rum_tx_data(), if usbd_transfer() fails, clear rum_tx_data.m and
    rum_tx_data.ni, so later resource free routine will not double free
    them.
  - Change the redundant resource free code in rum_detach() into assertion
    to make sure everything are clear.
  - In rum_alloc_{tx,rx}_list(), don't call rum_free_{tx,rx}_list, if
    error happens, since caller will do that in rum_stop().
  
  Rest of changes are used to fix following problems:
  1) Random system hanging if following script is excuted:
     #!/bin/csh
     while (1)
       ifconfig rum0 up
       ifconfig rum0 down
     end
  2) Random system hanging during 'ifconfig rum0 down', if rum(4) is
     attached to uhci/ohci.
  3) Promised system hanging if wpa_supplicant(8) is used and killed after
     connection to AP is established, and rum(4) is attached to uhci/ohci.
  4) Random serializer recursive assertion, if rum(4) is under heavy load
     and brought down.
  
  - In rum_stop(), turn on RUM_FLAG_STOPPED, so USB transanction will
    not be restarted in rum_rxeof() and rum_stats_timeout() during device
    halting.
  - In rum_stop(), release ifnet.if_serializer before aborting RX/TX pipe.
    This make sure serializer will not be recursive held,
    e.g. abort RX pipe -> rum_rxeof().
  - Don't turn off TSF sync, when 802.11 state transits to INIT.  Since
    o  Chip will be reset immediately after INIT state transition, so
       turning off TSF sync does not make much sense.
    o  If rum(4) is under heavy RX/TX load, turning off TSF sync will
       stall various USB operations, thus hang the whole system.
  - After above change, perform INIT state transition in rum_newstate(),
    so that 802.11 state machine is promised to be halted during detach
    and stop routine.
  - Use critical section and RUM_FLAG_CONFIG to protect various USB operation
    sequences, which are not intended to be interfered.
  
  Revision  Changes    Path
  1.11      +228 -208  src/sys/dev/netif/rum/if_rum.c
  1.3       +3 -0      src/sys/dev/netif/rum/if_rumvar.h


http://www.dragonflybsd.org/cvsweb/src/sys/dev/netif/rum/if_rum.c.diff?r1=1.10&r2=1.11&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/dev/netif/rum/if_rumvar.h.diff?r1=1.2&r2=1.3&f=u



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