From owner-p4-projects@FreeBSD.ORG Sat Sep 4 18:07:07 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 431D616A4D0; Sat, 4 Sep 2004 18:07:07 +0000 (GMT) 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 00F6416A4CE for ; Sat, 4 Sep 2004 18:07:07 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D316A43D1F for ; Sat, 4 Sep 2004 18:07:06 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i84I76uC090606 for ; Sat, 4 Sep 2004 18:07:06 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i84I76v3090603 for perforce@freebsd.org; Sat, 4 Sep 2004 18:07:06 GMT (envelope-from julian@freebsd.org) Date: Sat, 4 Sep 2004 18:07:06 GMT Message-Id: <200409041807.i84I76v3090603@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 61004 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: Sat, 04 Sep 2004 18:07:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=61004 Change 61004 by julian@julian_ref on 2004/09/04 18:06:17 IFC@61002 Affected files ... .. //depot/projects/nsched/sys/dev/ata/ata-all.c#10 integrate .. //depot/projects/nsched/sys/dev/ata/ata-all.h#5 integrate .. //depot/projects/nsched/sys/dev/ata/ata-chipset.c#13 integrate .. //depot/projects/nsched/sys/dev/ata/ata-lowlevel.c#8 integrate .. //depot/projects/nsched/sys/dev/re/if_re.c#8 integrate .. //depot/projects/nsched/sys/dev/usb/umass.c#6 integrate .. //depot/projects/nsched/sys/dev/usb/uplcom.c#5 integrate .. //depot/projects/nsched/sys/dev/usb/usb_quirks.c#5 integrate .. //depot/projects/nsched/sys/dev/usb/usbdevs#12 integrate .. //depot/projects/nsched/sys/dev/usb/uscanner.c#5 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs_vfsops.c#3 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs_vnops.c#4 integrate .. //depot/projects/nsched/sys/modules/cs/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/fdc/Makefile#5 integrate .. //depot/projects/nsched/sys/modules/linprocfs/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/msdosfs/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/nfs4client/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/nfsclient/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/owi/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/smbfs/Makefile#2 integrate .. //depot/projects/nsched/sys/vm/vm_meter.c#4 integrate Differences ... ==== //depot/projects/nsched/sys/dev/ata/ata-all.c#10 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.224 2004/08/27 14:48:32 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.225 2004/09/03 12:10:44 sos Exp $"); #include "opt_ata.h" #include @@ -734,6 +734,15 @@ /* * misc support functions */ +void +ata_udelay(int interval) +{ + if (interval < (1000000/hz) || ata_delayed_attach) + DELAY(interval); + else + tsleep(&interval, PRIBIO, "ataslp", interval/(1000000/hz)); +} + static void bswap(int8_t *buf, int len) { ==== //depot/projects/nsched/sys/dev/ata/ata-all.h#5 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.82 2004/08/27 14:48:32 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.83 2004/09/03 12:10:44 sos Exp $ */ /* ATA register defines */ @@ -390,6 +390,7 @@ int ata_detach(device_t dev); int ata_suspend(device_t dev); int ata_resume(device_t dev); +void ata_udelay(int interval); int ata_printf(struct ata_channel *ch, int device, const char *fmt, ...) __printflike(3, 4); int ata_prtdev(struct ata_device *atadev, const char *fmt, ...) __printflike(2, 3); void ata_set_name(struct ata_device *atadev, char *name, int lun); ==== //depot/projects/nsched/sys/dev/ata/ata-chipset.c#13 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.86 2004/09/03 08:23:04 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.87 2004/09/03 12:10:44 sos Exp $"); #include "opt_ata.h" #include @@ -926,9 +926,9 @@ pci_write_config(parent, 0x92, pci_read_config(parent, 0x92, 2) | mask, 2); while (timeout--) { - DELAY(10000); + ata_udelay(10000); if ((pci_read_config(parent, 0x92, 2) & (mask << 4)) == (mask << 4)) { - DELAY(10000); + ata_udelay(10000); return; } } @@ -1107,7 +1107,7 @@ static struct ata_chip_id ids[] = {{ ATA_NFORCE1, 0, AMDNVIDIA, NVIDIA, ATA_UDMA5, "nVidia nForce" }, { ATA_NFORCE2, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce2" }, - { ATA_NFORCE2_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia MCP" }, + { ATA_NFORCE2_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce2 MCP" }, { ATA_NFORCE3, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3" }, { ATA_NFORCE3_PRO, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 Pro" }, { ATA_NFORCE3_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 MCP" }, @@ -2171,7 +2171,7 @@ ATA_IDX_OUTL(ch, ATA_BMDEVSPEC_1, 0x00000001); DELAY(25000); ATA_IDX_OUTL(ch, ATA_BMDEVSPEC_1, 0x00000000); - tsleep(ch, PRIBIO, "siirst", hz); + ata_udelay(1000000); } static void ==== //depot/projects/nsched/sys/dev/ata/ata-lowlevel.c#8 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.46 2004/08/27 22:14:45 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.47 2004/09/03 12:10:44 sos Exp $"); #include "opt_ata.h" #include @@ -48,6 +48,7 @@ static void ata_generic_interrupt(void *); static void ata_generic_reset(struct ata_channel *); static int ata_wait(struct ata_device *, u_int8_t); +/*static int ata_command(struct ata_device *, u_int8_t, u_int64_t, u_int16_t, u_int16_t);*/ static void ata_pio_read(struct ata_request *, int); static void ata_pio_write(struct ata_request *, int); @@ -585,9 +586,9 @@ ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_MASTER); DELAY(10); ATA_IDX_OUTB(ch, ATA_ALTSTAT, ATA_A_IDS | ATA_A_RESET); - DELAY(10000); + ata_udelay(10000); ATA_IDX_OUTB(ch, ATA_ALTSTAT, ATA_A_IDS); - DELAY(100000); + ata_udelay(100000); ATA_IDX_INB(ch, ATA_ERROR); /* wait for BUSY to go inactive */ @@ -656,7 +657,7 @@ if (stat1 == 0xff && timeout > 5) mask &= ~0x02; } - DELAY(100000); + ata_udelay(100000); } if (bootverbose) ==== //depot/projects/nsched/sys/dev/re/if_re.c#8 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.29 2004/08/28 10:59:02 sanpei Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $"); /* * RealTek 8139C+/8169/8169S/8110S PCI NIC driver @@ -205,11 +205,18 @@ static int re_tx_list_init (struct rl_softc *); static void re_rxeof (struct rl_softc *); static void re_txeof (struct rl_softc *); +#ifdef DEVICE_POLLING +static void re_poll (struct ifnet *, enum poll_cmd, int); +static void re_poll_locked (struct ifnet *, enum poll_cmd, int); +#endif static void re_intr (void *); static void re_tick (void *); +static void re_tick_locked (struct rl_softc *); static void re_start (struct ifnet *); +static void re_start_locked (struct ifnet *); static int re_ioctl (struct ifnet *, u_long, caddr_t); static void re_init (void *); +static void re_init_locked (struct rl_softc *); static void re_stop (struct rl_softc *); static void re_watchdog (struct ifnet *); static int re_suspend (device_t); @@ -454,17 +461,14 @@ u_int16_t re8139_reg = 0; sc = device_get_softc(dev); - RL_LOCK(sc); if (sc->rl_type == RL_8169) { rval = re_gmii_readreg(dev, phy, reg); - RL_UNLOCK(sc); return (rval); } /* Pretend the internal PHY is only at address 0 */ if (phy) { - RL_UNLOCK(sc); return (0); } switch (reg) { @@ -485,7 +489,6 @@ break; case MII_PHYIDR1: case MII_PHYIDR2: - RL_UNLOCK(sc); return (0); /* * Allow the rlphy driver to read the media status @@ -495,15 +498,12 @@ */ case RL_MEDIASTAT: rval = CSR_READ_1(sc, RL_MEDIASTAT); - RL_UNLOCK(sc); return (rval); default: printf("re%d: bad phy register\n", sc->rl_unit); - RL_UNLOCK(sc); return (0); } rval = CSR_READ_2(sc, re8139_reg); - RL_UNLOCK(sc); return (rval); } @@ -517,19 +517,16 @@ int rval = 0; sc = device_get_softc(dev); - RL_LOCK(sc); if (sc->rl_type == RL_8169) { rval = re_gmii_writereg(dev, phy, reg, data); - RL_UNLOCK(sc); return (rval); } /* Pretend the internal PHY is only at address 0 */ - if (phy) { - RL_UNLOCK(sc); + if (phy) return (0); - } + switch (reg) { case MII_BMCR: re8139_reg = RL_BMCR; @@ -548,16 +545,13 @@ break; case MII_PHYIDR1: case MII_PHYIDR2: - RL_UNLOCK(sc); return (0); break; default: printf("re%d: bad phy register\n", sc->rl_unit); - RL_UNLOCK(sc); return (0); } CSR_WRITE_2(sc, re8139_reg, data); - RL_UNLOCK(sc); return (0); } @@ -582,6 +576,8 @@ u_int32_t rxfilt; int mcnt = 0; + RL_LOCK_ASSERT(sc); + ifp = &sc->arpcom.ac_if; rxfilt = CSR_READ_4(sc, RL_RXCFG); @@ -627,6 +623,8 @@ { register int i; + RL_LOCK_ASSERT(sc); + CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_RESET); for (i = 0; i < RL_TIMEOUT; i++) { @@ -675,11 +673,12 @@ u_int8_t src[] = { 0x00, 'w', 'o', 'r', 'l', 'd' }; /* Allocate a single mbuf */ - MGETHDR(m0, M_DONTWAIT, MT_DATA); if (m0 == NULL) return (ENOBUFS); + RL_LOCK(sc); + /* * Initialize the NIC in test mode. This sets the chip up * so that it can send and receive frames, but performs the @@ -691,10 +690,10 @@ ifp->if_flags |= IFF_PROMISC; sc->rl_testmode = 1; - re_init(sc); + re_init_locked(sc); re_stop(sc); DELAY(100000); - re_init(sc); + re_init_locked(sc); /* Put some data in the mbuf */ @@ -710,7 +709,9 @@ */ CSR_WRITE_2(sc, RL_ISR, 0xFFFF); + RL_UNLOCK(sc); IF_HANDOFF(&ifp->if_snd, m0, ifp); + RL_LOCK(sc); m0 = NULL; /* Wait for it to propagate through the chip */ @@ -789,6 +790,8 @@ if (m0 != NULL) m_freem(m0); + RL_UNLOCK(sc); + return (error); } @@ -826,15 +829,9 @@ } sc->rl_btag = rman_get_bustag(sc->rl_res); sc->rl_bhandle = rman_get_bushandle(sc->rl_res); - mtx_init(&sc->rl_mtx, - device_get_nameunit(dev), - MTX_NETWORK_LOCK, MTX_DEF); - RL_LOCK(sc); hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV; bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res); - RL_UNLOCK(sc); - mtx_destroy(&sc->rl_mtx); if (t->rl_basetype == hwrev) { device_set_desc(dev, t->rl_name); return (0); @@ -1065,7 +1062,7 @@ unit = device_get_unit(dev); mtx_init(&sc->rl_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, - MTX_DEF | MTX_RECURSE); + MTX_DEF); /* * Map control/status registers. */ @@ -1096,7 +1093,9 @@ } /* Reset the adapter. */ + RL_LOCK(sc); re_reset(sc); + RL_UNLOCK(sc); hw_rev = re_hwrevs; hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV; @@ -1221,13 +1220,11 @@ } /* Hook interrupt last to avoid having to lock softc */ - error = bus_setup_intr(dev, sc->rl_irq, INTR_TYPE_NET, + error = bus_setup_intr(dev, sc->rl_irq, INTR_TYPE_NET | INTR_MPSAFE, re_intr, sc, &sc->rl_intrhand); - if (error) { printf("re%d: couldn't set up irq\n", unit); ether_ifdetach(ifp); - goto fail; } fail: @@ -1251,19 +1248,29 @@ struct rl_softc *sc; struct ifnet *ifp; int i; + int attached; sc = device_get_softc(dev); + ifp = &sc->arpcom.ac_if; KASSERT(mtx_initialized(&sc->rl_mtx), ("rl mutex not initialized")); + + attached = device_is_attached(dev); + /* These should only be active if attach succeeded */ + if (attached) + ether_ifdetach(ifp); + RL_LOCK(sc); - ifp = &sc->arpcom.ac_if; +#if 0 + sc->suspended = 1; +#endif /* These should only be active if attach succeeded */ - if (device_is_attached(dev)) { + if (attached) { re_stop(sc); /* * Force off the IFF_UP flag here, in case someone * still had a BPF descriptor attached to this - * interface. If they do, ether_ifattach() will cause + * interface. If they do, ether_ifdetach() will cause * the BPF code to try and clear the promisc mode * flag, which will bubble down to re_ioctl(), * which will try to call re_init() again. This will @@ -1279,6 +1286,12 @@ device_delete_child(dev, sc->rl_miibus); bus_generic_detach(dev); + /* + * The rest is resource deallocation, so we should already be + * stopped here. + */ + RL_UNLOCK(sc); + if (sc->rl_intrhand) bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand); if (sc->rl_irq) @@ -1335,7 +1348,6 @@ if (sc->rl_parent_tag) bus_dma_tag_destroy(sc->rl_parent_tag); - RL_UNLOCK(sc); mtx_destroy(&sc->rl_mtx); return (0); @@ -1396,6 +1408,9 @@ re_tx_list_init(sc) struct rl_softc *sc; { + + RL_LOCK_ASSERT(sc); + bzero ((char *)sc->rl_ldata.rl_tx_list, RL_TX_LIST_SZ); bzero ((char *)&sc->rl_ldata.rl_tx_mbuf, (RL_TX_DESC_CNT * sizeof(struct mbuf *))); @@ -1679,32 +1694,53 @@ void *xsc; { struct rl_softc *sc; - struct mii_data *mii; sc = xsc; RL_LOCK(sc); + re_tick_locked(sc); + RL_UNLOCK(sc); +} + +static void +re_tick_locked(sc) + struct rl_softc *sc; +{ + struct mii_data *mii; + + RL_LOCK_ASSERT(sc); + mii = device_get_softc(sc->rl_miibus); mii_tick(mii); sc->rl_stat_ch = timeout(re_tick, sc, hz); - RL_UNLOCK(sc); } #ifdef DEVICE_POLLING static void -re_poll (struct ifnet *ifp, enum poll_cmd cmd, int count) +re_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct rl_softc *sc = ifp->if_softc; RL_LOCK(sc); + re_poll_locked(ifp, cmd, count); + RL_UNLOCK(sc); +} + +static void +re_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) +{ + struct rl_softc *sc = ifp->if_softc; + + RL_LOCK_ASSERT(sc); + if (!(ifp->if_capenable & IFCAP_POLLING)) { ether_poll_deregister(ifp); cmd = POLL_DEREGISTER; } if (cmd == POLL_DEREGISTER) { /* final call, enable interrupts */ CSR_WRITE_2(sc, RL_IMR, RL_INTRS_CPLUS); - goto done; + return; } sc->rxcycles = count; @@ -1712,14 +1748,14 @@ re_txeof(sc); if (ifp->if_snd.ifq_head != NULL) - (*ifp->if_start)(ifp); + re_start_locked(ifp); if (cmd == POLL_AND_CHECK_STATUS) { /* also check status register */ u_int16_t status; status = CSR_READ_2(sc, RL_ISR); if (status == 0xffff) - goto done; + return; if (status) CSR_WRITE_2(sc, RL_ISR, status); @@ -1729,11 +1765,9 @@ if (status & RL_ISR_SYSTEM_ERR) { re_reset(sc); - re_init(sc); + re_init_locked(sc); } } -done: - RL_UNLOCK(sc); } #endif /* DEVICE_POLLING */ @@ -1747,26 +1781,21 @@ sc = arg; - if (sc->suspended) { - return; - } + RL_LOCK(sc); - RL_LOCK(sc); ifp = &sc->arpcom.ac_if; - if (!(ifp->if_flags & IFF_UP)) { - RL_UNLOCK(sc); - return; - } + if (sc->suspended || !(ifp->if_flags & IFF_UP)) + goto done_locked; #ifdef DEVICE_POLLING if (ifp->if_flags & IFF_POLLING) - goto done; + goto done_locked; if ((ifp->if_capenable & IFCAP_POLLING) && ether_poll_register(re_poll, ifp)) { /* ok, disable interrupts */ CSR_WRITE_2(sc, RL_IMR, 0x0000); - re_poll(ifp, 0, 1); - goto done; + re_poll_locked(ifp, 0, 1); + goto done_locked; } #endif /* DEVICE_POLLING */ @@ -1795,21 +1824,19 @@ if (status & RL_ISR_SYSTEM_ERR) { re_reset(sc); - re_init(sc); + re_init_locked(sc); } if (status & RL_ISR_LINKCHG) { untimeout(re_tick, sc, sc->rl_stat_ch); - re_tick(sc); + re_tick_locked(sc); } } if (ifp->if_snd.ifq_head != NULL) - (*ifp->if_start)(ifp); + re_start_locked(ifp); -#ifdef DEVICE_POLLING -done: -#endif +done_locked: RL_UNLOCK(sc); } @@ -1825,6 +1852,8 @@ int error; struct m_tag *mtag; + RL_LOCK_ASSERT(sc); + if (sc->rl_ldata.rl_tx_free <= 4) return (EFBIG); @@ -1920,12 +1949,23 @@ return (0); } +static void +re_start(ifp) + struct ifnet *ifp; +{ + struct rl_softc *sc; + + sc = ifp->if_softc; + RL_LOCK(sc); + re_start_locked(ifp); + RL_UNLOCK(sc); +} + /* * Main transmit routine for C+ and gigE NICs. */ - static void -re_start(ifp) +re_start_locked(ifp) struct ifnet *ifp; { struct rl_softc *sc; @@ -1933,7 +1973,8 @@ int idx; sc = ifp->if_softc; - RL_LOCK(sc); + + RL_LOCK_ASSERT(sc); idx = sc->rl_ldata.rl_tx_prodidx; @@ -1983,8 +2024,6 @@ */ CSR_WRITE_4(sc, RL_TIMERCNT, 1); - RL_UNLOCK(sc); - /* * Set a timeout in case the chip goes out to lunch. */ @@ -1996,11 +2035,22 @@ void *xsc; { struct rl_softc *sc = xsc; + + RL_LOCK(sc); + re_init_locked(sc); + RL_UNLOCK(sc); +} + +static void +re_init_locked(sc) + struct rl_softc *sc; +{ struct ifnet *ifp = &sc->arpcom.ac_if; struct mii_data *mii; u_int32_t rxcfg = 0; - RL_LOCK(sc); + RL_LOCK_ASSERT(sc); + mii = device_get_softc(sc->rl_miibus); /* @@ -2146,10 +2196,8 @@ if (sc->rl_type == RL_8169) CSR_WRITE_2(sc, RL_MAXRXPKTLEN, 16383); - if (sc->rl_testmode) { - RL_UNLOCK(sc); + if (sc->rl_testmode) return; - } mii_mediachg(mii); @@ -2159,7 +2207,6 @@ ifp->if_flags &= ~IFF_OACTIVE; sc->rl_stat_ch = timeout(re_tick, sc, hz); - RL_UNLOCK(sc); } /* @@ -2209,8 +2256,6 @@ struct mii_data *mii; int error = 0; - RL_LOCK(sc); - switch (command) { case SIOCSIFMTU: if (ifr->ifr_mtu > RL_JUMBO_MTU) @@ -2218,17 +2263,19 @@ ifp->if_mtu = ifr->ifr_mtu; break; case SIOCSIFFLAGS: - if (ifp->if_flags & IFF_UP) { - re_init(sc); - } else { - if (ifp->if_flags & IFF_RUNNING) - re_stop(sc); - } + RL_LOCK(sc); + if (ifp->if_flags & IFF_UP) + re_init_locked(sc); + else if (ifp->if_flags & IFF_RUNNING) + re_stop(sc); + RL_UNLOCK(sc); error = 0; break; case SIOCADDMULTI: case SIOCDELMULTI: + RL_LOCK(sc); re_setmulti(sc); + RL_UNLOCK(sc); error = 0; break; case SIOCGIFMEDIA: @@ -2252,8 +2299,6 @@ break; } - RL_UNLOCK(sc); - return (error); } @@ -2270,9 +2315,8 @@ re_txeof(sc); re_rxeof(sc); + re_init_locked(sc); - re_init(sc); - RL_UNLOCK(sc); } @@ -2287,7 +2331,8 @@ register int i; struct ifnet *ifp; - RL_LOCK(sc); + RL_LOCK_ASSERT(sc); + ifp = &sc->arpcom.ac_if; ifp->if_timer = 0; @@ -2326,8 +2371,6 @@ sc->rl_ldata.rl_rx_mbuf[i] = NULL; } } - - RL_UNLOCK(sc); } /* @@ -2343,8 +2386,10 @@ sc = device_get_softc(dev); + RL_LOCK(sc); re_stop(sc); sc->suspended = 1; + RL_UNLOCK(sc); return (0); } @@ -2362,13 +2407,17 @@ struct ifnet *ifp; sc = device_get_softc(dev); + + RL_LOCK(sc); + ifp = &sc->arpcom.ac_if; /* reinitialize interface if necessary */ if (ifp->if_flags & IFF_UP) - re_init(sc); + re_init_locked(sc); sc->suspended = 0; + RL_UNLOCK(sc); return (0); } @@ -2385,5 +2434,7 @@ sc = device_get_softc(dev); + RL_LOCK(sc); re_stop(sc); + RL_UNLOCK(sc); } ==== //depot/projects/nsched/sys/dev/usb/umass.c#6 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/usb/umass.c,v 1.112 2004/08/15 23:39:18 imp Exp $ + * $FreeBSD: src/sys/dev/usb/umass.c,v 1.113 2004/09/04 07:07:35 sanpei Exp $ * $NetBSD: umass.c,v 1.28 2000/04/02 23:46:53 augustss Exp $ */ @@ -449,6 +449,10 @@ UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, + { USB_VENDOR_WESTERN, USB_PRODUCT_WESTERN_EXTHDD, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE + }, { USB_VENDOR_YANO, USB_PRODUCT_YANO_U640MO, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, FORCE_SHORT_INQUIRY ==== //depot/projects/nsched/sys/dev/usb/uplcom.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/uplcom.c,v 1.20 2004/08/08 05:21:56 sanpei Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/uplcom.c,v 1.21 2004/09/03 22:41:37 sanpei Exp $"); /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -211,6 +211,7 @@ { USB_VENDOR_RATOC, USB_PRODUCT_RATOC_REXUSB60 }, /* ELECOM UC-SGT */ { USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_UCSGT }, + { USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_UCSGT0 }, /* Sony Ericsson USB Cable */ { USB_VENDOR_SONYERICSSON, USB_PRODUCT_SONYERICSSON_DCU10 }, /* SOURCENEXT KeikaiDenwa 8 */ ==== //depot/projects/nsched/sys/dev/usb/usb_quirks.c#5 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.39 2004/08/19 19:21:14 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.40 2004/09/03 23:19:27 sanpei Exp $"); #include #include @@ -95,6 +95,8 @@ ANY, { UQ_ASSUME_CM_OVER_DATA }}, { USB_VENDOR_YAMAHA, USB_PRODUCT_YAMAHA_RTW65I, ANY, { UQ_ASSUME_CM_OVER_DATA }}, + { USB_VENDOR_QUALCOMM, USB_PRODUCT_QUALCOMM_CDMA_MSM, + ANY, { UQ_ASSUME_CM_OVER_DATA }}, { USB_VENDOR_QUALCOMM2, USB_PRODUCT_QUALCOMM2_CDMA_MSM, ANY, { UQ_ASSUME_CM_OVER_DATA }}, { USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_AS64LX, ==== //depot/projects/nsched/sys/dev/usb/usbdevs#12 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.197 2004/08/26 16:59:50 des Exp $ +$FreeBSD: src/sys/dev/usb/usbdevs,v 1.201 2004/09/04 07:07:35 sanpei Exp $ /* * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -339,9 +339,9 @@ vendor MICROTECH 0x07af Microtech vendor GENERALINSTMNTS 0x07b2 General Instruments (Motorola) vendor OLYMPUS 0x07b4 Olympus -vendor ONSPEC 0x07c4 OnSpec Electronic vendor ABOCOM 0x07b8 AboCom Systems vendor KEISOKUGIKEN 0x07c1 Keisokugiken +vendor ONSPEC 0x07c4 OnSpec Electronic vendor APG 0x07c5 APG Cash Drawer vendor BUG 0x07c8 B.U.G. vendor ALLIEDTELESYN 0x07c9 Allied Telesyn International @@ -429,6 +429,7 @@ vendor HAWKING 0x0e66 Hawking Technologies vendor MICROTUNE 0x0f4d Microtune, Inc. vendor QUALCOMM2 0x1004 Qualcomm +vendor WESTERN 0x1058 Western Digital vendor MOTOROLA 0x1063 Motorola vendor PLX 0x10b5 PLX vendor ASANTE 0x10bd Asante @@ -709,6 +710,7 @@ product ELECOM LDUSBLTX 0x4005 LD-USBL/TX product ELECOM LDUSBTX2 0x400b LD-USB/TX product ELECOM UCSGT 0x5003 UC-SGT +product ELECOM UCSGT0 0x5004 UC-SGT product ELECOM LDUSBTX3 0xabc1 LD-USB/TX /* Elsa products */ @@ -784,6 +786,7 @@ product FUJITSU AH_F401U 0x105b AH-F401U Air H device /* Qualcomm products */ +product QUALCOMM CDMA_MSM 0x3196 CDMA Technologies MSM modem product QUALCOMM2 CDMA_MSM 0x6000 CDMA Technologies MSM phone /* General Instruments (Motorola) products */ @@ -1116,6 +1119,7 @@ /* Nikon products */ product NIKON E990 0x0102 Digital Camera E990 +product NIKON LS40 0x4000 CoolScan LS40 ED /* Olympus products */ product OLYMPUS C1 0x0102 C-1 Digital Camera @@ -1141,7 +1145,6 @@ product PALM ZIRE31 0x0061 Palm Zire 31 product PALM ZIRE 0x0070 Palm Zire -/* Panasonic products */ product PANASONIC KXLRW32AN 0x0d09 CD-R Drive KXL-RW32AN product PANASONIC KXLCB20AN 0x0d0a CD-R Drive KXL-CB20AN product PANASONIC KXLCB35AN 0x0d0e DVD-ROM & CD-R/RW @@ -1410,6 +1413,10 @@ product WACOM INTUOSA5 0x0021 Intuos A5 product WACOM GD0912U 0x0022 Intuos 9x12 Graphics Tablet +/* Western Digital products */ +product WESTERN EXTHDD 0x0400 External HDD +product WESTERN HUB 0x0500 USB HUB + /* Xirlink products */ product XIRLINK PCCAM 0x8080 IBM PC Camera ==== //depot/projects/nsched/sys/dev/usb/uscanner.c#5 (text+ko) ==== @@ -5,7 +5,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/uscanner.c,v 1.57 2004/08/15 23:39:18 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/uscanner.c,v 1.58 2004/09/03 23:29:01 sanpei Exp $"); /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -170,6 +170,9 @@ {{ USB_VENDOR_NATIONAL, USB_PRODUCT_NATIONAL_BEARPAW1200 }, 0 }, {{ USB_VENDOR_NATIONAL, USB_PRODUCT_NATIONAL_BEARPAW2400 }, 0 }, + /* Nikon */ + {{ USB_VENDOR_NIKON, USB_PRODUCT_NIKON_LS40 }, 0 }, + /* Primax */ {{ USB_VENDOR_PRIMAX, USB_PRODUCT_PRIMAX_G2X300 }, 0 }, {{ USB_VENDOR_PRIMAX, USB_PRODUCT_PRIMAX_G2E300 }, 0 }, ==== //depot/projects/nsched/sys/fs/autofs/autofs_vfsops.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/autofs/autofs_vfsops.c,v 1.2 2004/09/02 20:44:55 alfred Exp $ + * $FreeBSD: src/sys/fs/autofs/autofs_vfsops.c,v 1.4 2004/09/03 16:05:44 des Exp $ * $Id: autofs_vfsops.c,v 1.21 2004/08/31 08:49:56 bright Exp $ */ #include @@ -444,7 +444,7 @@ stkreq.ar_xid = userreq->au_xid; if (userreq->au_op == AREQ_READDIR && userreq->au_auxlen > 0) { if (userreq->au_auxlen > AUTOFS_MAXAUX) { - DP(("EINVAL auxlen %d...\n", + DP(("EINVAL auxlen %zu...\n", userreq->au_auxlen)); error = EINVAL; break; @@ -610,7 +610,7 @@ } /* and... same name? */ if (r1->ar_namelen != r2->ar_namelen) { - DP(("dlen1 %zd dlen2 %zd\n", r1->ar_namelen, r2->ar_namelen)); + DP(("dlen1 %zu dlen2 %zu\n", r1->ar_namelen, r2->ar_namelen)); return (0); } if (strncmp(r1->ar_name, r2->ar_name, r1->ar_namelen) != 0) { ==== //depot/projects/nsched/sys/fs/autofs/autofs_vnops.c#4 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. >>> TRUNCATED FOR MAIL (1000 lines) <<<