Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Mar 2003 10:37:43 -0800 (PST)
From:      Nate Lawson <nate@root.org>
To:        current@freebsd.org
Cc:        wpaul@freebsd.org
Subject:   Updated if_* attach/detach patches
Message-ID:  <Pine.BSF.4.21.0303191032480.12313-100000@root.org>

next in thread | raw e-mail | index | archive | help
I have updated my patches for:
    dc pcn rl sf sis sk ste ti tl vr wb xl
They have been compile tested but I only have an rl card so I'd appreciate
feedback.

Patches are at:
    http://www.root.org/~nate/freebsd/if_pci/

Clean up locking and resource management for pci/if_*

- Remove locking of the softc in the attach method, instead depending on
  ether_ifattach being at the end of attach (delaying interrupt enable)
- Call *_detach directly in the error case of attach, depending on checking
  in detach to only free resources that were allocated.  This makes all
  resource freeing in one place, avoiding thinkos that lead to memory leaks.
- dc: move interrupt allocation back where it was before.  It was unnecessary
  to move it
- pcn: add missing bzero of softc
- rl: move irq allocation before ether_ifattach.  Problems could have been
  caused by allocating the irq after enabling interrupts on the card.
- rl: call rl_stop before ether_ifdetach
- sf: call sf_stop before ether_ifdetach
- sis: add missed free of sis_tag
- sis: check errors from tag creation
- sk: remove duplicate initialization of sk_dev
- ste: add missed bus_generic_detach
- ti: call ti_stop before ether_ifdetach
- ti: add missed error setting in ti_rdata alloc failure
- vr: add missed error setting in I/O, memory mapping cases
- wb: add missing bzero of softc
- xl: add missed error setting in I/O, memory mapping cases
- xl: add missing bzero of softc
- xl: remove multi-level goto on attach failure

-Nate


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0303191032480.12313-100000>