Deleted Added
full compact
if_ed.c (150108) if_ed.c (150215)
1/*-
2 * Copyright (c) 1995, David Greenman
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1995, David Greenman
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/dev/ed/if_ed.c 150108 2005-09-13 19:47:44Z imp $");
29__FBSDID("$FreeBSD: head/sys/dev/ed/if_ed.c 150215 2005-09-16 11:25:19Z ru $");
30
31/*
32 * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
33 * adapters. By David Greenman, 29-April-1993
34 *
35 * Currently supports the Western Digital/SMC 8003 and 8013 series,
36 * the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
37 * and a variety of similar clones.

--- 209 unchanged lines hidden (view full) ---

247 }
248 if (sc->irq_res) {
249 bus_deactivate_resource(dev, SYS_RES_IRQ,
250 sc->irq_rid, sc->irq_res);
251 bus_release_resource(dev, SYS_RES_IRQ,
252 sc->irq_rid, sc->irq_res);
253 sc->irq_res = 0;
254 }
30
31/*
32 * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
33 * adapters. By David Greenman, 29-April-1993
34 *
35 * Currently supports the Western Digital/SMC 8003 and 8013 series,
36 * the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
37 * and a variety of similar clones.

--- 209 unchanged lines hidden (view full) ---

247 }
248 if (sc->irq_res) {
249 bus_deactivate_resource(dev, SYS_RES_IRQ,
250 sc->irq_rid, sc->irq_res);
251 bus_release_resource(dev, SYS_RES_IRQ,
252 sc->irq_rid, sc->irq_res);
253 sc->irq_res = 0;
254 }
255 if (sc->ifp)
256 if_free(sc->ifp);
255}
256
257/*
258 * Install interface into kernel networking data structures
259 */
260int
261ed_attach(device_t dev)
262{

--- 106 unchanged lines hidden (view full) ---

369 ED_ASSERT_UNLOCKED(sc);
370 ED_LOCK(sc);
371 if (bus_child_present(dev))
372 ed_stop(sc);
373 ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
374 ED_UNLOCK(sc);
375 callout_drain(&sc->tick_ch);
376 ether_ifdetach(ifp);
257}
258
259/*
260 * Install interface into kernel networking data structures
261 */
262int
263ed_attach(device_t dev)
264{

--- 106 unchanged lines hidden (view full) ---

371 ED_ASSERT_UNLOCKED(sc);
372 ED_LOCK(sc);
373 if (bus_child_present(dev))
374 ed_stop(sc);
375 ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
376 ED_UNLOCK(sc);
377 callout_drain(&sc->tick_ch);
378 ether_ifdetach(ifp);
377 if_free(ifp);
378 bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
379 ed_release_resources(dev);
380 ED_LOCK_DESTROY(sc);
381 return (0);
382}
383
384/*
385 * Reset interface.

--- 1427 unchanged lines hidden ---
379 bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
380 ed_release_resources(dev);
381 ED_LOCK_DESTROY(sc);
382 return (0);
383}
384
385/*
386 * Reset interface.

--- 1427 unchanged lines hidden ---