Deleted Added
full compact
utopia.c (142384) utopia.c (147256)
1/*-
2 * Copyright (c) 2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
5 *
6 * Author: Hartmut Brandt <harti@freebsd.org>
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
5 *
6 * Author: Hartmut Brandt <harti@freebsd.org>
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/utopia/utopia.c 142384 2005-02-24 16:56:36Z harti $");
31__FBSDID("$FreeBSD: head/sys/dev/utopia/utopia.c 147256 2005-06-10 16:49:24Z brooks $");
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/unistd.h>
36#include <sys/kernel.h>
37#include <sys/kthread.h>
38#include <sys/proc.h>
39#include <sys/bus.h>

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

149{
150 int old;
151
152 old = utp->carrier;
153 if (carr_ok) {
154 /* carrier */
155 utp->carrier = UTP_CARR_OK;
156 if (old != UTP_CARR_OK) {
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/unistd.h>
36#include <sys/kernel.h>
37#include <sys/kthread.h>
38#include <sys/proc.h>
39#include <sys/bus.h>

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

149{
150 int old;
151
152 old = utp->carrier;
153 if (carr_ok) {
154 /* carrier */
155 utp->carrier = UTP_CARR_OK;
156 if (old != UTP_CARR_OK) {
157 if_printf(&utp->ifatm->ifnet, "carrier detected\n");
157 if_printf(utp->ifatm->ifp, "carrier detected\n");
158 ATMEV_SEND_IFSTATE_CHANGED(utp->ifatm, 1);
159 }
160 } else {
161 /* no carrier */
162 utp->carrier = UTP_CARR_LOST;
163 if (old == UTP_CARR_OK) {
158 ATMEV_SEND_IFSTATE_CHANGED(utp->ifatm, 1);
159 }
160 } else {
161 /* no carrier */
162 utp->carrier = UTP_CARR_LOST;
163 if (old == UTP_CARR_OK) {
164 if_printf(&utp->ifatm->ifnet, "carrier lost\n");
164 if_printf(utp->ifatm->ifp, "carrier lost\n");
165 ATMEV_SEND_IFSTATE_CHANGED(utp->ifatm, 0);
166 }
167 }
168}
169
170static int
171unknown_inval(struct utopia *utp, int what __unused)
172{

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

362 case SUNI_REGM_MRESET_TYPE_ULTRA:
363 utp->chip = &utopia_chip_ultra;
364 break;
365
366 default:
367 if (reg == (IDTPHY_REGM_MCR_DRIC | IDTPHY_REGM_MCR_EI))
368 utp->chip = &utopia_chip_idt77105;
369 else {
165 ATMEV_SEND_IFSTATE_CHANGED(utp->ifatm, 0);
166 }
167 }
168}
169
170static int
171unknown_inval(struct utopia *utp, int what __unused)
172{

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

362 case SUNI_REGM_MRESET_TYPE_ULTRA:
363 utp->chip = &utopia_chip_ultra;
364 break;
365
366 default:
367 if (reg == (IDTPHY_REGM_MCR_DRIC | IDTPHY_REGM_MCR_EI))
368 utp->chip = &utopia_chip_idt77105;
369 else {
370 if_printf(&utp->ifatm->ifnet,
370 if_printf(utp->ifatm->ifp,
371 "unknown ATM-PHY chip %#x\n", reg);
372 utp->chip = &utopia_chip_unknown;
373 }
374 break;
375 }
376 utp->state |= UTP_ST_ACTIVE;
377 return (0);
378}

--- 298 unchanged lines hidden ---
371 "unknown ATM-PHY chip %#x\n", reg);
372 utp->chip = &utopia_chip_unknown;
373 }
374 break;
375 }
376 utp->state |= UTP_ST_ACTIVE;
377 return (0);
378}

--- 298 unchanged lines hidden ---