From 7a267bca0a664501218ecb10f7cb5a4ad391754a Mon Sep 17 00:00:00 2001 From: Visa Hankala Date: Fri, 20 Nov 2015 15:16:07 +0000 Subject: Make cnmac compile again after IF_DROP() removal. Just bail out if the link is down. ok mpi@ --- sys/arch/octeon/dev/if_cnmac.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/octeon/dev/if_cnmac.c b/sys/arch/octeon/dev/if_cnmac.c index fbf6d69fbe9..8549d042708 100644 --- a/sys/arch/octeon/dev/if_cnmac.c +++ b/sys/arch/octeon/dev/if_cnmac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cnmac.c,v 1.31 2015/11/18 16:05:22 visa Exp $ */ +/* $OpenBSD: if_cnmac.c,v 1.32 2015/11/20 15:16:06 visa Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -1016,24 +1016,8 @@ octeon_eth_start(struct ifnet *ifp) if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING) goto last; - /* XXX assume that OCTEON doesn't buffer packets */ - if (__predict_false(!cn30xxgmx_link_status(sc->sc_gmx_port))) { - /* dequeue and drop them */ - while (1) { - IFQ_DEQUEUE(&ifp->if_snd, m); - if (m == NULL) - break; -#if 0 -#ifdef DDB - m_print(m, "cd", printf); -#endif - printf("%s: drop\n", sc->sc_dev.dv_xname); -#endif - m_freem(m); - IF_DROP(&ifp->if_snd); - } + if (__predict_false(!cn30xxgmx_link_status(sc->sc_gmx_port))) goto last; - } for (;;) { octeon_eth_send_queue_flush_fetch(sc); /* XXX */ -- cgit v1.2.3