Deleted Added
full compact
if_cp.c (149847) if_cp.c (150306)
1/*-
2 * Cronyx-Tau-PCI adapter driver for FreeBSD.
3 * Supports PPP/HDLC, Cisco/HDLC and FrameRelay protocol in synchronous mode,
4 * and asyncronous channels with full modem control.
5 * Keepalive protocol implemented in both Cisco and PPP modes.
6 *
7 * Copyright (C) 1999-2004 Cronyx Engineering.
8 * Author: Kurakin Roman, <rik@cronyx.ru>

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

17 * modify and redistribute this software in source and binary forms,
18 * as long as this message is kept with the software, all derivative
19 * works or modified versions.
20 *
21 * Cronyx Id: if_cp.c,v 1.1.2.41 2004/06/23 17:09:13 rik Exp $
22 */
23
24#include <sys/cdefs.h>
1/*-
2 * Cronyx-Tau-PCI adapter driver for FreeBSD.
3 * Supports PPP/HDLC, Cisco/HDLC and FrameRelay protocol in synchronous mode,
4 * and asyncronous channels with full modem control.
5 * Keepalive protocol implemented in both Cisco and PPP modes.
6 *
7 * Copyright (C) 1999-2004 Cronyx Engineering.
8 * Author: Kurakin Roman, <rik@cronyx.ru>

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

17 * modify and redistribute this software in source and binary forms,
18 * as long as this message is kept with the software, all derivative
19 * works or modified versions.
20 *
21 * Cronyx Id: if_cp.c,v 1.1.2.41 2004/06/23 17:09:13 rik Exp $
22 */
23
24#include <sys/cdefs.h>
25__FBSDID("$FreeBSD: head/sys/dev/cp/if_cp.c 149847 2005-09-07 09:53:35Z obrien $");
25__FBSDID("$FreeBSD: head/sys/dev/cp/if_cp.c 150306 2005-09-19 03:10:21Z imp $");
26
27#include <sys/param.h>
28#include <sys/ucred.h>
29#include <sys/proc.h>
30#include <sys/systm.h>
31#include <sys/mbuf.h>
32#include <sys/kernel.h>
33#include <sys/module.h>

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

1433
1434 /* Reset the adapter. */
1435 cp_destroy = 1;
1436 cp_interrupt_poll (b, 1);
1437 cp_led_off (b);
1438 cp_reset (b, 0 ,0);
1439 callout_stop (&led_timo[b->num]);
1440
26
27#include <sys/param.h>
28#include <sys/ucred.h>
29#include <sys/proc.h>
30#include <sys/systm.h>
31#include <sys/mbuf.h>
32#include <sys/kernel.h>
33#include <sys/module.h>

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

1433
1434 /* Reset the adapter. */
1435 cp_destroy = 1;
1436 cp_interrupt_poll (b, 1);
1437 cp_led_off (b);
1438 cp_reset (b, 0 ,0);
1439 callout_stop (&led_timo[b->num]);
1440
1441 /* Disable the interrupt request. */
1442 bus_teardown_intr (dev, bd->cp_irq, bd->cp_intrhand);
1443
1441 for (c=b->chan; c<b->chan+NCHAN; ++c) {
1442 drv_t *d = (drv_t*) c->sys;
1443
1444 if (! d || ! d->chan->type)
1445 continue;
1446#ifndef NETGRAPH
1447 /* Detach from the packet filter list of interfaces. */
1448 bpfdetach (d->ifp);

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

1465 mtx_destroy (&d->hi_queue.ifq_mtx);
1466#endif
1467 destroy_dev (d->devt);
1468 }
1469
1470 b->sys = NULL;
1471 CP_UNLOCK (bd);
1472
1444 for (c=b->chan; c<b->chan+NCHAN; ++c) {
1445 drv_t *d = (drv_t*) c->sys;
1446
1447 if (! d || ! d->chan->type)
1448 continue;
1449#ifndef NETGRAPH
1450 /* Detach from the packet filter list of interfaces. */
1451 bpfdetach (d->ifp);

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

1468 mtx_destroy (&d->hi_queue.ifq_mtx);
1469#endif
1470 destroy_dev (d->devt);
1471 }
1472
1473 b->sys = NULL;
1474 CP_UNLOCK (bd);
1475
1473 /* Disable the interrupt request. */
1474 bus_teardown_intr (dev, bd->cp_irq, bd->cp_intrhand);
1475 bus_deactivate_resource (dev, SYS_RES_IRQ, 0, bd->cp_irq);
1476 bus_release_resource (dev, SYS_RES_IRQ, 0, bd->cp_irq);
1477 bus_release_resource (dev, SYS_RES_MEMORY, PCIR_BAR(0), bd->cp_res);
1478
1479 CP_LOCK (bd);
1480 cp_led_off (b);
1481 CP_UNLOCK (bd);
1482 callout_drain (&led_timo[b->num]);

--- 844 unchanged lines hidden ---
1476 bus_deactivate_resource (dev, SYS_RES_IRQ, 0, bd->cp_irq);
1477 bus_release_resource (dev, SYS_RES_IRQ, 0, bd->cp_irq);
1478 bus_release_resource (dev, SYS_RES_MEMORY, PCIR_BAR(0), bd->cp_res);
1479
1480 CP_LOCK (bd);
1481 cp_led_off (b);
1482 CP_UNLOCK (bd);
1483 callout_drain (&led_timo[b->num]);

--- 844 unchanged lines hidden ---