From owner-p4-projects@FreeBSD.ORG Thu Aug 14 15:03:42 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6C2FF37B404; Thu, 14 Aug 2003 15:03:41 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19FFE37B401 for ; Thu, 14 Aug 2003 15:03:41 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9396343FA3 for ; Thu, 14 Aug 2003 15:03:40 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h7EM3e0U084651 for ; Thu, 14 Aug 2003 15:03:40 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h7EM3eMt084648 for perforce@freebsd.org; Thu, 14 Aug 2003 15:03:40 -0700 (PDT) Date: Thu, 14 Aug 2003 15:03:40 -0700 (PDT) Message-Id: <200308142203.h7EM3eMt084648@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 36140 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2003 22:03:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=36140 Change 36140 by sam@sam_ebb on 2003/08/14 15:03:18 re-enable MPSAFE operation (somehow lost) Affected files ... .. //depot/projects/netperf/sys/pci/if_sis.c#5 edit .. //depot/projects/netperf/sys/pci/if_sisreg.h#2 edit Differences ... ==== //depot/projects/netperf/sys/pci/if_sis.c#5 (text+ko) ==== @@ -1228,7 +1228,7 @@ printf("sis%d: Ethernet address: %6D\n", unit, eaddr, ":"); sc->sis_unit = unit; - callout_handle_init(&sc->sis_stat_ch); + callout_init(&sc->sis_stat_ch, CALLOUT_MPSAFE); bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); /* @@ -1388,7 +1388,7 @@ ifp->if_capabilities |= IFCAP_VLAN_MTU; /* Hook interrupt last to avoid having to lock softc */ - error = bus_setup_intr(dev, sc->sis_irq, INTR_TYPE_NET, + error = bus_setup_intr(dev, sc->sis_irq, INTR_TYPE_NET | INTR_MPSAFE, sis_intr, sc, &sc->sis_intrhand); if (error) { @@ -1751,7 +1751,7 @@ sis_start(ifp); } - sc->sis_stat_ch = timeout(sis_tick, sc, hz); + callout_reset(&sc->sis_stat_ch, hz, sis_tick, sc); sc->in_tick = 0; SIS_UNLOCK(sc); @@ -1967,6 +1967,7 @@ struct ifnet *ifp; { struct sis_softc *sc; + struct mbuf *m_head = NULL; u_int32_t idx; sc = ifp->if_softc; @@ -1976,15 +1977,15 @@ SIS_UNLOCK(sc); return; } + + idx = sc->sis_cdata.sis_tx_prod; + if (ifp->if_flags & IFF_OACTIVE) { SIS_UNLOCK(sc); return; } - idx = sc->sis_cdata.sis_tx_prod; while(sc->sis_ldata.sis_tx_list[idx].sis_mbuf == NULL) { - struct mbuf *m_head; - IF_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; @@ -2189,7 +2190,7 @@ ifp->if_flags &= ~IFF_OACTIVE; if (!sc->in_tick) - sc->sis_stat_ch = timeout(sis_tick, sc, hz); + callout_reset(&sc->sis_stat_ch, hz, sis_tick, sc); SIS_UNLOCK(sc); @@ -2327,7 +2328,7 @@ ifp = &sc->arpcom.ac_if; ifp->if_timer = 0; - untimeout(sis_tick, sc, sc->sis_stat_ch); + callout_stop(&sc->sis_stat_ch); ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); #ifdef DEVICE_POLLING ==== //depot/projects/netperf/sys/pci/if_sisreg.h#2 (text+ko) ==== @@ -459,7 +459,7 @@ bus_dma_tag_t sis_parent_tag; bus_dma_tag_t sis_tag; struct sis_ring_data sis_cdata; - struct callout_handle sis_stat_ch; + struct callout sis_stat_ch; #ifdef DEVICE_POLLING int rxcycles; #endif