Deleted Added
full compact
if_ic.c (147256) if_ic.c (147611)
1/*-
2 * Copyright (c) 1998, 2001 Nicolas Souchu
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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1998, 2001 Nicolas Souchu
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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/iicbus/if_ic.c 147256 2005-06-10 16:49:24Z brooks $");
28__FBSDID("$FreeBSD: head/sys/dev/iicbus/if_ic.c 147611 2005-06-26 18:11:11Z dwmalone $");
29
30/*
31 * I2C bus IP driver
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/mbuf.h>

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

369{
370 device_t icdev = devclass_get_device(ic_devclass, ifp->if_dunit);
371 device_t parent = device_get_parent(icdev);
372 struct ic_softc *sc = (struct ic_softc *)device_get_softc(icdev);
373
374 int s, len, sent;
375 struct mbuf *mm;
376 u_char *cp;
29
30/*
31 * I2C bus IP driver
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/mbuf.h>

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

369{
370 device_t icdev = devclass_get_device(ic_devclass, ifp->if_dunit);
371 device_t parent = device_get_parent(icdev);
372 struct ic_softc *sc = (struct ic_softc *)device_get_softc(icdev);
373
374 int s, len, sent;
375 struct mbuf *mm;
376 u_char *cp;
377 u_int32_t hdr = dst->sa_family;
377 u_int32_t hdr;
378
378
379 /* BPF writes need to be handled specially. */
380 if (dst->sa_family == AF_UNSPEC)
381 bcopy(dst->sa_data, &hdr, sizeof(hdr));
382 else
383 hdr = dst->sa_family;
384
379 ifp->if_flags |= IFF_RUNNING;
380
381 s = splhigh();
382
383 /* already sending? */
384 if (sc->ic_sending) {
385 ifp->if_oerrors ++;
386 goto error;

--- 52 unchanged lines hidden ---
385 ifp->if_flags |= IFF_RUNNING;
386
387 s = splhigh();
388
389 /* already sending? */
390 if (sc->ic_sending) {
391 ifp->if_oerrors ++;
392 goto error;

--- 52 unchanged lines hidden ---