if_ic.c (106937) | if_ic.c (109623) |
---|---|
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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * | 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * $FreeBSD: head/sys/dev/iicbus/if_ic.c 106937 2002-11-14 23:54:55Z sam $ | 26 * $FreeBSD: head/sys/dev/iicbus/if_ic.c 109623 2003-01-21 08:56:16Z alfred $ |
27 */ 28 29/* 30 * I2C bus IP driver 31 */ 32 33#include <sys/param.h> 34#include <sys/systm.h> --- 152 unchanged lines hidden (view full) --- 187 break; 188 } 189 if (((ifp->if_flags & IFF_UP)) && (!(ifp->if_flags & IFF_RUNNING))) { 190 191 if ((error = iicbus_request_bus(parent, icdev, IIC_WAIT|IIC_INTR))) 192 return (error); 193 194 sc->ic_obuf = malloc(sc->ic_if.if_mtu + ICHDRLEN, | 27 */ 28 29/* 30 * I2C bus IP driver 31 */ 32 33#include <sys/param.h> 34#include <sys/systm.h> --- 152 unchanged lines hidden (view full) --- 187 break; 188 } 189 if (((ifp->if_flags & IFF_UP)) && (!(ifp->if_flags & IFF_RUNNING))) { 190 191 if ((error = iicbus_request_bus(parent, icdev, IIC_WAIT|IIC_INTR))) 192 return (error); 193 194 sc->ic_obuf = malloc(sc->ic_if.if_mtu + ICHDRLEN, |
195 M_DEVBUF, M_WAITOK); | 195 M_DEVBUF, 0); |
196 if (!sc->ic_obuf) { 197 iicbus_release_bus(parent, icdev); 198 return ENOBUFS; 199 } 200 201 sc->ic_ifbuf = malloc(sc->ic_if.if_mtu + ICHDRLEN, | 196 if (!sc->ic_obuf) { 197 iicbus_release_bus(parent, icdev); 198 return ENOBUFS; 199 } 200 201 sc->ic_ifbuf = malloc(sc->ic_if.if_mtu + ICHDRLEN, |
202 M_DEVBUF, M_WAITOK); | 202 M_DEVBUF, 0); |
203 if (!sc->ic_ifbuf) { 204 iicbus_release_bus(parent, icdev); 205 return ENOBUFS; 206 } 207 208 iicbus_reset(parent, IIC_FASTEST, 0, NULL); 209 210 ifp->if_flags |= IFF_RUNNING; --- 241 unchanged lines hidden --- | 203 if (!sc->ic_ifbuf) { 204 iicbus_release_bus(parent, icdev); 205 return ENOBUFS; 206 } 207 208 iicbus_reset(parent, IIC_FASTEST, 0, NULL); 209 210 ifp->if_flags |= IFF_RUNNING; --- 241 unchanged lines hidden --- |