svn commit: r189679 - head/sys/dev/pccard
Author: imp Date: Wed Mar 11 07:22:11 2009 New Revision: 189679 URL: http://svn.freebsd.org/changeset/base/189679 Log: Add 3 new cards that I found today in akihabara... Toshiba LANCT00A TDK LAK-CD011 TJ PTJ-LAN/T PC-NIC ENCC 990010759-001A Modified: head/sys/dev/pccard/pccarddevs Modified: head/sys/dev/pccard/pccarddevs == --- head/sys/dev/pccard/pccarddevs Wed Mar 11 05:11:57 2009 (r189678) +++ head/sys/dev/pccard/pccarddevs Wed Mar 11 07:22:11 2009 (r189679) @@ -186,6 +186,7 @@ vendor DUAL 0x890f Dual vendor EDIMAX 0x890f Edimax Technology Inc. vendor ADAPTEC20x9005 Adaptec vendor CONTEC 0xc001 Contec +vendor TJ 0xc00a TJ vendor MACNICA 0xc00b MACNICA vendor ROLAND 0xc00c Roland vendor COREGA2 0xc00f Corega K.K. @@ -589,6 +590,7 @@ product SYMBOL LA4100 0x0001 Symbol Spe /* TDK Products */ product TDK LAK_CD011WL0x TDK LAK-CD011WL +product TDK LAK_CD011 0x0100 TDK LAK-CD011 product TDK CFE_10 0x010a Xircom CompactCard CFE-10 product TDK LAK_CD021BX0x0200 TDK LAK-CD021BX Ethernet product TDK LAK_CF010 0x0900 TDK LAC-CF010 @@ -603,6 +605,12 @@ product TDK DFL5610WS 0xea15 TDK DFL561 product TELECOMDEVICE LM5LT0x0101 Billionton LM5LT-10B Ethernet/Modem product TELECOMDEVICE TCD_HPC100 0x0202 Telecom Device TCD-HPC100 +/* TJ Products */ +product TJ PTJ_LAN_T 0x0001 TJ Ethernet PTJ-LAN/T PC-NIC ENCC 990010759-001A + +/* Toshiba products */ +product TOSHIBA2 LANCT00A 0x0042 Toshiba LANCT00A Ethernet + /* US Robotics Products */ product USROBOTICS WORLDPORT1440x3330 US Robotics WorldPort 14.4 Modem ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189680 - head/sys/dev/pccard
Author: imp Date: Wed Mar 11 08:11:11 2009 New Revision: 189680 URL: http://svn.freebsd.org/changeset/base/189680 Log: Add entry for Hitachi HT-4840-11, which is a fe-based card. Modified: head/sys/dev/pccard/pccarddevs Modified: head/sys/dev/pccard/pccarddevs == --- head/sys/dev/pccard/pccarddevs Wed Mar 11 07:22:11 2009 (r189679) +++ head/sys/dev/pccard/pccarddevs Wed Mar 11 08:11:11 2009 (r189680) @@ -75,6 +75,7 @@ $FreeBSD$ * publication 106 reserves the top bit for parity. */ vendor FUJITSU 0x0004 Fujitsu Corporation +vendor HITACHI 0x0007 Hitachi vendor INTERSIL0x000b Intersil vendor PANASONIC 0x0032 Matsushita Electric Industrial Co. vendor SANDISK 0x0045 Sandisk Corporation @@ -347,6 +348,9 @@ product GLOBALVILLAGE LANMODEM 0x0105 Gl product GREY_CELL TDK3000 0x3341 TDK 3000/3400/5670 Fast Ethernet/Modem product GREY_CELL DMF650TX 0xc0ab D-Link DMF-650TX +/* Hitachi */ +productHITACHI HT_4840 0x000b Hitachi HT-4840-11 Ethernet Card + /* Home Wireless Networks */ product HWN AIRWAY802110x0002 HWN Airway Wireless PCMCIA Card ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189681 - head/sys/dev/fe
Author: imp Date: Wed Mar 11 08:12:28 2009 New Revision: 189681 URL: http://svn.freebsd.org/changeset/base/189681 Log: Add support for Hitachi HT-4840-11. This card is supposedly just like the J181, but not quite. This card's CIS has some quirks that means we have to ignore CFE's 1-9. Modified: head/sys/dev/fe/if_fe_pccard.c Modified: head/sys/dev/fe/if_fe_pccard.c == --- head/sys/dev/fe/if_fe_pccard.c Wed Mar 11 08:11:11 2009 (r189680) +++ head/sys/dev/fe/if_fe_pccard.c Wed Mar 11 08:12:28 2009 (r189681) @@ -64,6 +64,7 @@ static const struct fe_pccard_product { int mpp_flags; #define MPP_MBH10302 1 #define MPP_ANYFUNC 2 +#define MPP_SKIP_TO_CFE_10 4 } fe_pccard_products[] = { /* These need to be first */ { PCMCIA_CARD(FUJITSU2, FMV_J181), MPP_MBH10302 }, @@ -80,6 +81,7 @@ static const struct fe_pccard_product { { PCMCIA_CARD(FUJITSU, LA501), 0 }, { PCMCIA_CARD(FUJITSU, LA10S), 0 }, { PCMCIA_CARD(FUJITSU, NE200T), MPP_MBH10302 },/* Sold by Eagle */ + { PCMCIA_CARD(HITACHI, HT_4840), MPP_MBH10302 | MPP_SKIP_TO_CFE_10}, { PCMCIA_CARD(RATOC, REX_R280), 0 }, { PCMCIA_CARD(XIRCOM, CE), MPP_ANYFUNC }, { { NULL } } @@ -91,6 +93,7 @@ fe_pccard_probe(device_t dev) int error; uint32_tfcn = PCCARD_FUNCTION_UNSPEC; const struct fe_pccard_product *pp; + int i; if ((pp = (const struct fe_pccard_product *)pccard_product_lookup(dev, (const struct pccard_product *)fe_pccard_products, @@ -105,6 +108,16 @@ fe_pccard_probe(device_t dev) return (error); if (fcn != PCCARD_FUNCTION_NETWORK) return (ENXIO); + if (pp-mpp_flags MPP_SKIP_TO_CFE_10) { + for (i = 10; i 27; i++) { + if (pccard_select_cfe(dev, i) == 0) + goto good; + } + device_printf(dev, + Hitachi HT-4840-11 workaround failed\n); + return ENXIO; + } + good:; return (0); } return (ENXIO); @@ -126,6 +139,7 @@ static driver_t fe_pccard_driver = { }; DRIVER_MODULE(fe, pccard, fe_pccard_driver, fe_devclass, 0, 0); +MODULE_DEPEND(fe, pccard, 1, 1, 1); static int fe_probe_mbh(device_t, const struct fe_pccard_product *); static int fe_probe_tdk(device_t, const struct fe_pccard_product *); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189682 - head/sys/dev/pccard
Author: imp Date: Wed Mar 11 08:14:44 2009 New Revision: 189682 URL: http://svn.freebsd.org/changeset/base/189682 Log: Allow zero length memroy space descriptor sections. It is apparently legal in the spec. Add newline to the verbose messages we print when debugging when this happens. The Hitachi HT-4840-11 is the only card to hit these in years, and it works well enough if we're liberal about what we accept. Modified: head/sys/dev/pccard/pccard_cis.c Modified: head/sys/dev/pccard/pccard_cis.c == --- head/sys/dev/pccard/pccard_cis.cWed Mar 11 08:12:28 2009 (r189681) +++ head/sys/dev/pccard/pccard_cis.cWed Mar 11 08:14:44 2009 (r189682) @@ -1198,8 +1198,7 @@ pccard_parse_cis_tuple(const struct pcca if (lengthsize == 0) { DPRINTF((cfe memspace - lengthsize == 0)); - state-card-error++; + lengthsize == 0\n)); } for (i = 0; i cfe-num_memspace; i++) { if (lengthsize) { @@ -1211,9 +1210,8 @@ pccard_parse_cis_tuple(const struct pcca cfe-memspace[i].length = 0; } if (cfe-memspace[i].length == 0) { - DPRINTF((cfe-memspace[%d].length == 0, + DPRINTF((cfe-memspace[%d].length == 0\n, i)); - state-card-error++; } if (cardaddrsize) { cfe-memspace[i].cardaddr = ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189683 - head/sys/dev/pccard
Author: imp Date: Wed Mar 11 08:15:17 2009 New Revision: 189683 URL: http://svn.freebsd.org/changeset/base/189683 Log: Remove old compat method that's no longer needed (and hasn't been since just before 6.0). Modified: head/sys/dev/pccard/card_if.m Modified: head/sys/dev/pccard/card_if.m == --- head/sys/dev/pccard/card_if.m Wed Mar 11 08:14:44 2009 (r189682) +++ head/sys/dev/pccard/card_if.m Wed Mar 11 08:15:17 2009 (r189683) @@ -102,15 +102,6 @@ METHOD const struct pccard_product * do_ } # -# Helper method for the above. When a compatibility driver is converted, -# one must write a match routine. This routine is unused on OLDCARD but -# is used as a discriminator for NEWCARD. -# -METHOD int compat_match { - device_t dev; -} - -# # Scanning function for accessing the CIS of a card in its driver. # METHOD int cis_scan { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189684 - head/sys/kern
Author: imp Date: Wed Mar 11 08:19:31 2009 New Revision: 189684 URL: http://svn.freebsd.org/changeset/base/189684 Log: Minor nits notice by jhb@ Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c == --- head/sys/kern/subr_bus.cWed Mar 11 08:15:17 2009(r189683) +++ head/sys/kern/subr_bus.cWed Mar 11 08:19:31 2009(r189684) @@ -849,7 +849,6 @@ devclass_find(const char *classname) return (devclass_find_internal(classname, NULL, FALSE)); } - /** * @brief Register that a device driver has been added to a devclass * @@ -868,8 +867,8 @@ devclass_find(const char *classname) static void devclass_driver_added(devclass_t dc, driver_t *driver) { - int i; devclass_t parent; + int i; /* * Call BUS_DRIVER_ADDED for any existing busses in this class. @@ -883,7 +882,7 @@ devclass_driver_added(devclass_t dc, dri * single parent pointer around, we walk the entire list of * devclasses looking for children. We set the * DC_HAS_CHILDREN flag when a child devclass is created on -* the parent, so we only walk thoe list for those devclasses +* the parent, so we only walk the list for those devclasses * that have children. */ if (!(dc-flags DC_HAS_CHILDREN)) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189685 - head/sys/dev/txp
Author: yongari Date: Wed Mar 11 08:25:18 2009 New Revision: 189685 URL: http://svn.freebsd.org/changeset/base/189685 Log: KR - ANSI C function definitions. Modified: head/sys/dev/txp/if_txp.c Modified: head/sys/dev/txp/if_txp.c == --- head/sys/dev/txp/if_txp.c Wed Mar 11 08:19:31 2009(r189684) +++ head/sys/dev/txp/if_txp.c Wed Mar 11 08:25:18 2009(r189685) @@ -186,8 +186,7 @@ MODULE_DEPEND(txp, pci, 1, 1, 1); MODULE_DEPEND(txp, ether, 1, 1, 1); static int -txp_probe(dev) - device_t dev; +txp_probe(device_t dev) { struct txp_type *t; @@ -206,8 +205,7 @@ txp_probe(dev) } static int -txp_attach(dev) - device_t dev; +txp_attach(device_t dev) { struct txp_softc *sc; struct ifnet *ifp; @@ -363,8 +361,7 @@ fail: } static int -txp_detach(dev) - device_t dev; +txp_detach(device_t dev) { struct txp_softc *sc; struct ifnet *ifp; @@ -392,8 +389,7 @@ txp_detach(dev) } static void -txp_release_resources(sc) - struct txp_softc *sc; +txp_release_resources(struct txp_softc *sc) { device_t dev; @@ -418,8 +414,7 @@ txp_release_resources(sc) } static int -txp_chip_init(sc) - struct txp_softc *sc; +txp_chip_init(struct txp_softc *sc) { /* disable interrupts */ WRITE_REG(sc, TXP_IER, 0); @@ -456,8 +451,7 @@ txp_chip_init(sc) } static int -txp_reset_adapter(sc) - struct txp_softc *sc; +txp_reset_adapter(struct txp_softc *sc) { u_int32_t r; int i; @@ -484,8 +478,7 @@ txp_reset_adapter(sc) } static int -txp_download_fw(sc) - struct txp_softc *sc; +txp_download_fw(struct txp_softc *sc) { struct txp_fw_file_header *fileheader; struct txp_fw_section_header *secthead; @@ -573,8 +566,7 @@ fail: } static int -txp_download_fw_wait(sc) - struct txp_softc *sc; +txp_download_fw_wait(struct txp_softc *sc) { u_int32_t i, r; @@ -602,10 +594,8 @@ txp_download_fw_wait(sc) } static int -txp_download_fw_section(sc, sect, sectnum) - struct txp_softc *sc; - struct txp_fw_section_header *sect; - int sectnum; +txp_download_fw_section(struct txp_softc *sc, +struct txp_fw_section_header *sect, int sectnum) { vm_offset_t dma; int rseg, err = 0; @@ -670,8 +660,7 @@ bail: } static void -txp_intr(vsc) - void *vsc; +txp_intr(void *vsc) { struct txp_softc *sc = vsc; struct txp_hostvar *hv = sc-sc_hostvar; @@ -718,9 +707,7 @@ txp_intr(vsc) } static void -txp_rx_reclaim(sc, r) - struct txp_softc *sc; - struct txp_rx_ring *r; +txp_rx_reclaim(struct txp_softc *sc, struct txp_rx_ring *r) { struct ifnet *ifp = sc-sc_ifp; struct txp_rx_desc *rxd; @@ -810,8 +797,7 @@ next: } static void -txp_rxbuf_reclaim(sc) - struct txp_softc *sc; +txp_rxbuf_reclaim(struct txp_softc *sc) { struct ifnet *ifp = sc-sc_ifp; struct txp_hostvar *hv = sc-sc_hostvar; @@ -859,9 +845,7 @@ txp_rxbuf_reclaim(sc) * Reclaim mbufs and entries from a transmit ring. */ static void -txp_tx_reclaim(sc, r) - struct txp_softc *sc; - struct txp_tx_ring *r; +txp_tx_reclaim(struct txp_softc *sc, struct txp_tx_ring *r) { struct ifnet *ifp = sc-sc_ifp; u_int32_t idx = TXP_OFFSET2IDX(*(r-r_off)); @@ -906,8 +890,7 @@ txp_tx_reclaim(sc, r) } static int -txp_shutdown(dev) - device_t dev; +txp_shutdown(device_t dev) { struct txp_softc *sc; @@ -930,8 +913,7 @@ txp_shutdown(dev) } static int -txp_alloc_rings(sc) - struct txp_softc *sc; +txp_alloc_rings(struct txp_softc *sc) { struct txp_boot_record *boot; struct txp_ldata *ld; @@ -1066,10 +1048,7 @@ txp_alloc_rings(sc) } static int -txp_ioctl(ifp, command, data) - struct ifnet *ifp; - u_long command; - caddr_t data; +txp_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct txp_softc *sc = ifp-if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -1110,8 +1089,7 @@ txp_ioctl(ifp, command, data) } static int -txp_rxring_fill(sc) - struct txp_softc *sc; +txp_rxring_fill(struct txp_softc *sc) { int i; struct ifnet *ifp; @@ -1141,8 +1119,7 @@ txp_rxring_fill(sc) } static void -txp_rxring_empty(sc) - struct txp_softc *sc; +txp_rxring_empty(struct txp_softc *sc) { int i; struct txp_swdesc *sd; @@ -1167,8 +1144,7 @@ txp_rxring_empty(sc) } static void -txp_init(xsc) - void *xsc; +txp_init(void *xsc) { struct txp_softc *sc; @@ -1179,8 +1155,7 @@ txp_init(xsc) } static void -txp_init_locked(sc) - struct txp_softc *sc; +txp_init_locked(struct txp_softc *sc) { struct ifnet *ifp; u_int16_t p1; @@ -1229,8 +1204,7 @@ txp_init_locked(sc) } static void -txp_tick(vsc) - void *vsc; +txp_tick(void *vsc) {
svn commit: r189686 - head/sys/dev/txp
Author: yongari Date: Wed Mar 11 08:28:24 2009 New Revision: 189686 URL: http://svn.freebsd.org/changeset/base/189686 Log: Remove extra tab characters. Modified: head/sys/dev/txp/if_txp.c Modified: head/sys/dev/txp/if_txp.c == --- head/sys/dev/txp/if_txp.c Wed Mar 11 08:25:18 2009(r189685) +++ head/sys/dev/txp/if_txp.c Wed Mar 11 08:28:24 2009(r189686) @@ -534,7 +534,7 @@ txp_download_fw(struct txp_softc *sc) sizeof(struct txp_fw_file_header)); for (sect = 0; sect fileheader-nsections; sect++) { - + if (txp_download_fw_section(sc, secthead, sect)) { error = -1; goto fail; @@ -659,7 +659,7 @@ bail: return (err); } -static void +static void txp_intr(void *vsc) { struct txp_softc *sc = vsc; @@ -1519,7 +1519,7 @@ txp_rsp_fixup(struct txp_softc *sc, stru src++; sc-sc_rspring.lastwrite = hv-hv_resp_read_idx = ridx; } - + hv-hv_resp_read_idx = ridx; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189687 - head/sys/dev/txp
Author: yongari Date: Wed Mar 11 08:41:57 2009 New Revision: 189687 URL: http://svn.freebsd.org/changeset/base/189687 Log: Remove return statement at the end of function that returns void. Modified: head/sys/dev/txp/if_txp.c Modified: head/sys/dev/txp/if_txp.c == --- head/sys/dev/txp/if_txp.c Wed Mar 11 08:28:24 2009(r189686) +++ head/sys/dev/txp/if_txp.c Wed Mar 11 08:41:57 2009(r189687) @@ -409,8 +409,6 @@ txp_release_resources(struct txp_softc * if (sc-sc_ifp) if_free(sc-sc_ifp); - - return; } static int @@ -702,8 +700,6 @@ txp_intr(void *vsc) txp_start_locked(sc-sc_ifp); TXP_UNLOCK(sc); - - return; } static void @@ -792,8 +788,6 @@ next: } *r-r_roff = woff; - - return; } static void @@ -837,8 +831,6 @@ txp_rxbuf_reclaim(struct txp_softc *sc) } sc-sc_rxbufprod = i; - - return; } /* @@ -1139,8 +1131,6 @@ txp_rxring_empty(struct txp_softc *sc) sd-sd_mbuf = NULL; } } - - return; } static void @@ -1238,8 +1228,6 @@ out: free(rsp, M_DEVBUF); callout_reset(sc-sc_tick, hz, txp_tick, sc); - - return; } static void @@ -1355,7 +1343,6 @@ oactive: r-r_prod = firstprod; r-r_cnt = firstcnt; IF_PREPEND(ifp-if_snd, m); - return; } /* @@ -1563,14 +1550,12 @@ txp_stop(struct txp_softc *sc) txp_command(sc, TXP_CMD_RX_DISABLE, 0, 0, 0, NULL, NULL, NULL, 1); txp_rxring_empty(sc); - - return; } static void txp_watchdog(struct ifnet *ifp) { - return; + } static int @@ -1796,8 +1781,6 @@ setit: txp_command(sc, TXP_CMD_RX_FILTER_WRITE, filter, 0, 0, NULL, NULL, NULL, 1); - - return; } static void @@ -1864,6 +1847,4 @@ txp_capabilities(struct txp_softc *sc) out: if (rsp != NULL) free(rsp, M_DEVBUF); - - return; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189688 - head/sys/dev/txp
Author: yongari Date: Wed Mar 11 08:49:17 2009 New Revision: 189688 URL: http://svn.freebsd.org/changeset/base/189688 Log: style(9) - space after keywords. Modified: head/sys/dev/txp/if_txp.c Modified: head/sys/dev/txp/if_txp.c == --- head/sys/dev/txp/if_txp.c Wed Mar 11 08:41:57 2009(r189687) +++ head/sys/dev/txp/if_txp.c Wed Mar 11 08:49:17 2009(r189688) @@ -192,16 +192,16 @@ txp_probe(device_t dev) t = txp_devs; - while(t-txp_name != NULL) { + while (t-txp_name != NULL) { if ((pci_get_vendor(dev) == t-txp_vid) (pci_get_device(dev) == t-txp_did)) { device_set_desc(dev, t-txp_name); - return(BUS_PROBE_DEFAULT); + return (BUS_PROBE_DEFAULT); } t++; } - return(ENXIO); + return (ENXIO); } static int @@ -352,12 +352,12 @@ txp_attach(device_t dev) goto fail; } - return(0); + return (0); fail: txp_release_resources(sc); mtx_destroy(sc-sc_mtx); - return(error); + return (error); } static int @@ -385,7 +385,7 @@ txp_detach(device_t dev) txp_release_resources(sc); mtx_destroy(sc-sc_mtx); - return(0); + return (0); } static void @@ -901,7 +901,7 @@ txp_shutdown(device_t dev) txp_command(sc, TXP_CMD_HALT, 0, 0, 0, NULL, NULL, NULL, 0); TXP_UNLOCK(sc); - return(0); + return (0); } static int @@ -990,7 +990,7 @@ txp_alloc_rings(struct txp_softc *sc) sc-sc_rxbufs[i].rb_sd = malloc(sizeof(struct txp_swdesc), M_DEVBUF, M_NOWAIT); if (sc-sc_rxbufs[i].rb_sd == NULL) - return(ENOBUFS); + return (ENOBUFS); sd = sc-sc_rxbufs[i].rb_sd; sd-sd_mbuf = NULL; } @@ -1011,7 +1011,7 @@ txp_alloc_rings(struct txp_softc *sc) if (r != STAT_WAITING_FOR_BOOT) { device_printf(sc-sc_dev, not waiting for boot\n); - return(ENXIO); + return (ENXIO); } WRITE_REG(sc, TXP_H2A_2, 0); @@ -1027,7 +1027,7 @@ txp_alloc_rings(struct txp_softc *sc) } if (r != STAT_RUNNING) { device_printf(sc-sc_dev, fw not running\n); - return(ENXIO); + return (ENXIO); } /* Clear TX and CMD ring write registers */ @@ -1046,7 +1046,7 @@ txp_ioctl(struct ifnet *ifp, u_long comm struct ifreq *ifr = (struct ifreq *)data; int error = 0; - switch(command) { + switch (command) { case SIOCSIFFLAGS: TXP_LOCK(sc); if (ifp-if_flags IFF_UP) { @@ -1077,7 +1077,7 @@ txp_ioctl(struct ifnet *ifp, u_long comm break; } - return(error); + return (error); } static int @@ -1094,7 +1094,7 @@ txp_rxring_fill(struct txp_softc *sc) sd = sc-sc_rxbufs[i].rb_sd; sd-sd_mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); if (sd-sd_mbuf == NULL) - return(ENOBUFS); + return (ENOBUFS); sd-sd_mbuf-m_pkthdr.len = sd-sd_mbuf-m_len = MCLBYTES; sd-sd_mbuf-m_pkthdr.rcvif = ifp; @@ -1107,7 +1107,7 @@ txp_rxring_fill(struct txp_softc *sc) sc-sc_hostvar-hv_rx_buf_write_idx = (RXBUF_ENTRIES - 1) * sizeof(struct txp_rxbuf_desc); - return(0); + return (0); } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189689 - head/sys/dev/txp
Author: yongari Date: Wed Mar 11 09:06:39 2009 New Revision: 189689 URL: http://svn.freebsd.org/changeset/base/189689 Log: s/u_int8_t/uint8_t/g s/u_int16_t/uint16_t/g s/u_int32_t/uint32_t/g s/u_int64_t/uint64_t/g Modified: head/sys/dev/txp/if_txp.c head/sys/dev/txp/if_txpreg.h Modified: head/sys/dev/txp/if_txp.c == --- head/sys/dev/txp/if_txp.c Wed Mar 11 08:49:17 2009(r189688) +++ head/sys/dev/txp/if_txp.c Wed Mar 11 09:06:39 2009(r189689) @@ -136,12 +136,12 @@ static void txp_rxring_empty(struct txp_ static void txp_set_filter(struct txp_softc *); static int txp_cmd_desc_numfree(struct txp_softc *); -static int txp_command(struct txp_softc *, u_int16_t, u_int16_t, u_int32_t, -u_int32_t, u_int16_t *, u_int32_t *, u_int32_t *, int); -static int txp_command2(struct txp_softc *, u_int16_t, u_int16_t, -u_int32_t, u_int32_t, struct txp_ext_desc *, u_int8_t, +static int txp_command(struct txp_softc *, uint16_t, uint16_t, uint32_t, +uint32_t, uint16_t *, uint32_t *, uint32_t *, int); +static int txp_command2(struct txp_softc *, uint16_t, uint16_t, +uint32_t, uint32_t, struct txp_ext_desc *, uint8_t, struct txp_rsp_desc **, int); -static int txp_response(struct txp_softc *, u_int32_t, u_int16_t, u_int16_t, +static int txp_response(struct txp_softc *, uint32_t, uint16_t, uint16_t, struct txp_rsp_desc **); static void txp_rsp_fixup(struct txp_softc *, struct txp_rsp_desc *, struct txp_rsp_desc *); @@ -209,8 +209,8 @@ txp_attach(device_t dev) { struct txp_softc *sc; struct ifnet *ifp; - u_int16_t p1; - u_int32_t p2; + uint16_t p1; + uint32_t p2; int error = 0, rid; u_char eaddr[6]; @@ -296,12 +296,12 @@ txp_attach(device_t dev) goto fail; } - eaddr[0] = ((u_int8_t *)p1)[1]; - eaddr[1] = ((u_int8_t *)p1)[0]; - eaddr[2] = ((u_int8_t *)p2)[3]; - eaddr[3] = ((u_int8_t *)p2)[2]; - eaddr[4] = ((u_int8_t *)p2)[1]; - eaddr[5] = ((u_int8_t *)p2)[0]; + eaddr[0] = ((uint8_t *)p1)[1]; + eaddr[1] = ((uint8_t *)p1)[0]; + eaddr[2] = ((uint8_t *)p2)[3]; + eaddr[3] = ((uint8_t *)p2)[2]; + eaddr[4] = ((uint8_t *)p2)[1]; + eaddr[5] = ((uint8_t *)p2)[0]; sc-sc_cold = 0; @@ -451,7 +451,7 @@ txp_chip_init(struct txp_softc *sc) static int txp_reset_adapter(struct txp_softc *sc) { - u_int32_t r; + uint32_t r; int i; r = 0; @@ -481,7 +481,7 @@ txp_download_fw(struct txp_softc *sc) struct txp_fw_file_header *fileheader; struct txp_fw_section_header *secthead; int error, sect; - u_int32_t r, i, ier, imr; + uint32_t r, i, ier, imr; r = 0; error = 0; @@ -528,7 +528,7 @@ txp_download_fw(struct txp_softc *sc) goto fail; } - secthead = (struct txp_fw_section_header *)(((u_int8_t *)tc990image) + + secthead = (struct txp_fw_section_header *)(((uint8_t *)tc990image) + sizeof(struct txp_fw_file_header)); for (sect = 0; sect fileheader-nsections; sect++) { @@ -538,7 +538,7 @@ txp_download_fw(struct txp_softc *sc) goto fail; } secthead = (struct txp_fw_section_header *) - (((u_int8_t *)secthead) + secthead-nbytes + + (((uint8_t *)secthead) + secthead-nbytes + sizeof(*secthead)); } @@ -566,7 +566,7 @@ fail: static int txp_download_fw_wait(struct txp_softc *sc) { - u_int32_t i, r; + uint32_t i, r; r = 0; for (i = 0; i 1; i++) { @@ -598,14 +598,14 @@ txp_download_fw_section(struct txp_softc vm_offset_t dma; int rseg, err = 0; struct mbuf m; - u_int16_t csum; + uint16_t csum; /* Skip zero length sections */ if (sect-nbytes == 0) return (0); /* Make sure we aren't past the end of the image */ - rseg = ((u_int8_t *)sect) - ((u_int8_t *)tc990image); + rseg = ((uint8_t *)sect) - ((uint8_t *)tc990image); if (rseg = sizeof(tc990image)) { device_printf(sc-sc_dev, fw invalid section address, section %d\n, sectnum); @@ -620,7 +620,7 @@ txp_download_fw_section(struct txp_softc return (-1); } - bcopy(((u_int8_t *)sect) + sizeof(*sect), sc-sc_fwbuf, sect-nbytes); + bcopy(((uint8_t *)sect) + sizeof(*sect), sc-sc_fwbuf, sect-nbytes); dma = vtophys(sc-sc_fwbuf); /* @@ -662,7 +662,7 @@ txp_intr(void *vsc) { struct txp_softc *sc = vsc; struct txp_hostvar *hv = sc-sc_hostvar; - u_int32_t isr; + uint32_t isr; /* mask all interrupts */ TXP_LOCK(sc); @@ -709,7 +709,7 @@ txp_rx_reclaim(struct txp_softc *sc, str struct
svn commit: r189690 - head/sys/dev/txp
Author: yongari Date: Wed Mar 11 09:57:11 2009 New Revision: 189690 URL: http://svn.freebsd.org/changeset/base/189690 Log: Replace local CRC32 routine with ether_crc32_be(). This should have happened long time ago. Also simplify Rx filter logic. Modified: head/sys/dev/txp/if_txp.c head/sys/dev/txp/if_txpreg.h Modified: head/sys/dev/txp/if_txp.c == --- head/sys/dev/txp/if_txp.c Wed Mar 11 09:06:39 2009(r189689) +++ head/sys/dev/txp/if_txp.c Wed Mar 11 09:57:11 2009(r189690) @@ -1721,60 +1721,44 @@ txp_show_descriptor(void *d) static void txp_set_filter(struct txp_softc *sc) { - struct ifnet *ifp = sc-sc_ifp; - uint32_t crc, carry, hashbit, hash[2]; + struct ifnet *ifp; + uint32_t crc, mchash[2]; uint16_t filter; - uint8_t octet; - int i, j, mcnt = 0; struct ifmultiaddr *ifma; - char *enm; + int mcnt; - if (ifp-if_flags IFF_PROMISC) { - filter = TXP_RXFILT_PROMISC; - goto setit; - } + TXP_LOCK_ASSERT(sc); + ifp = sc-sc_ifp; filter = TXP_RXFILT_DIRECT; - - if (ifp-if_flags IFF_BROADCAST) + if ((ifp-if_flags IFF_BROADCAST) != 0) filter |= TXP_RXFILT_BROADCAST; + if ((ifp-if_flags (IFF_PROMISC | IFF_ALLMULTI)) != 0) { + if ((ifp-if_flags IFF_ALLMULTI) != 0) + filter |= TXP_RXFILT_ALLMULTI; + if ((ifp-if_flags IFF_PROMISC) != 0) + filter = TXP_RXFILT_PROMISC; + goto setit; + } - if (ifp-if_flags IFF_ALLMULTI) - filter |= TXP_RXFILT_ALLMULTI; - else { - hash[0] = hash[1] = 0; - - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) { - if (ifma-ifma_addr-sa_family != AF_LINK) - continue; - - enm = LLADDR((struct sockaddr_dl *)ifma-ifma_addr); - mcnt++; - crc = 0x; - - for (i = 0; i ETHER_ADDR_LEN; i++) { - octet = enm[i]; - for (j = 0; j 8; j++) { - carry = ((crc 0x8000) ? 1 : 0) ^ - (octet 1); - crc = 1; - octet = 1; - if (carry) - crc = (crc ^ TXP_POLYNOMIAL) | - carry; - } - } - hashbit = (uint16_t)(crc (64 - 1)); - hash[hashbit / 32] |= (1 hashbit % 32); - } - IF_ADDR_UNLOCK(ifp); - - if (mcnt 0) { - filter |= TXP_RXFILT_HASHMULTI; - txp_command(sc, TXP_CMD_MCAST_HASH_MASK_WRITE, - 2, hash[0], hash[1], NULL, NULL, NULL, 0); - } + mchash[0] = mchash[1] = 0; + mcnt = 0; + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) { + if (ifma-ifma_addr-sa_family != AF_LINK) + continue; + crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) + ifma-ifma_addr), ETHER_ADDR_LEN); + crc = 0x3f; + mchash[crc 5] |= 1 (crc 0x1f); + mcnt++; + } + IF_ADDR_UNLOCK(ifp); + + if (mcnt 0) { + filter |= TXP_RXFILT_HASHMULTI; + txp_command(sc, TXP_CMD_MCAST_HASH_MASK_WRITE, 2, mchash[0], + mchash[1], NULL, NULL, NULL, 0); } setit: Modified: head/sys/dev/txp/if_txpreg.h == --- head/sys/dev/txp/if_txpreg.hWed Mar 11 09:06:39 2009 (r189689) +++ head/sys/dev/txp/if_txpreg.hWed Mar 11 09:57:11 2009 (r189690) @@ -456,9 +456,6 @@ struct txp_tcpseg_desc { #defineTXP_RXFILT_PROMISC 0x0008 /* promiscuous mode */ #defineTXP_RXFILT_HASHMULTI0x0010 /* use multicast filter */ -/* multicast polynomial */ -#defineTXP_POLYNOMIAL 0x04c11db7 - /* * boot record (pointers to rings) */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r189629 - head/share/man/man4
Quoting Andrew Thompson thom...@freebsd.org (from Tue, 10 Mar 2009 15:54:37 + (UTC)): Author: thompsa Date: Tue Mar 10 15:54:37 2009 New Revision: 189629 URL: http://svn.freebsd.org/changeset/base/189629 Log: Remove these files, they refer to module bundles that do not exist anymore. ObsoleteFiles.inc? Bye, Alexander. -- BOFH excuse #222: I'm not sure, try calling the Internet's head office -- it's in the book http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189691 - head/sbin/recoverdisk
Author: phk Date: Wed Mar 11 10:37:02 2009 New Revision: 189691 URL: http://svn.freebsd.org/changeset/base/189691 Log: Some improvements to recoverdisk Modified: head/sbin/recoverdisk/recoverdisk.1 head/sbin/recoverdisk/recoverdisk.c Modified: head/sbin/recoverdisk/recoverdisk.1 == --- head/sbin/recoverdisk/recoverdisk.1 Wed Mar 11 09:57:11 2009 (r189690) +++ head/sbin/recoverdisk/recoverdisk.1 Wed Mar 11 10:37:02 2009 (r189691) @@ -32,7 +32,9 @@ .Nd recover data from hard disk or optical media .Sh SYNOPSIS .Nm +.Op Fl b Ar bigsize .Op Fl r Ar rlist +.Op Fl s Ar snapshot .Op Fl w Ar wlist .Ar special .Op Ar file @@ -46,15 +48,24 @@ It starts reading in multiples of the se Whenever a block fails, it is put to the end of the working queue and will be read again, possibly with a smaller read size. .Pp -It uses block sizes of roughly 1 MB, 64kB, and the native sector size (usually -512 bytes). +By default it uses block sizes of roughly 1 MB, 32kB, and the native +sector size (usually 512 bytes). These figures are adjusted slightly, for devices whose sectorsize is not a power of 2, e.g., audio CDs with a sector size of 2352 bytes. .Pp +.Pp The options are as follows: .Bl -tag -width indent +.It Fl b Ar bigsize +The size of reads attempted first. +The middle pass is roughly the logarithmic average of the bigsize and +the sectorsize. .It Fl r Ar rlist Read the list of blocks and block sizes to read from the specified file. +.It Fl s Ar snapshot +How often we should update the worklist file while things go OK. +The default is 60 and the units is progress messages so if things +go well, this is the same as once per minute. .It Fl w Ar wlist Write the list of remaining blocks to read to the specified file if .Nm @@ -106,6 +117,10 @@ recoverdisk -r worklist -w worklist /dev # recover a single file from the unreadable media touch file.avi; recoverdisk /cdrom/file.avi file.avi + +# If the disk hangs the system on read-errors try: +recoverdisk -b 0 /dev/ad3 /somewhere + .Ed .Sh SEE ALSO .Xr dd 1 Modified: head/sbin/recoverdisk/recoverdisk.c == --- head/sbin/recoverdisk/recoverdisk.c Wed Mar 11 09:57:11 2009 (r189690) +++ head/sbin/recoverdisk/recoverdisk.c Wed Mar 11 10:37:02 2009 (r189691) @@ -26,7 +26,7 @@ volatile sig_atomic_t aborting = 0; static size_t bigsize = 1024 * 1024; -static size_t medsize = 64 * 1024; +static size_t medsize; static size_t minsize = 512; struct lump { @@ -76,6 +76,7 @@ static void save_worklist(void) { FILE *file; + struct lump *llp; if (wworklist != NULL) { (void)fprintf(stderr, \nSaving worklist ...); @@ -85,14 +86,11 @@ save_worklist(void) if (file == NULL) err(1, Error opening file %s, wworklist); - for (;;) { - lp = TAILQ_FIRST(lumps); - if (lp == NULL) - break; + TAILQ_FOREACH(llp, lumps, list) fprintf(file, %jd %jd %d\n, - (intmax_t)lp-start, (intmax_t)lp-len, lp-state); - TAILQ_REMOVE(lumps, lp, list); - } + (intmax_t)llp-start, (intmax_t)llp-len, + llp-state); + fclose(file); (void)fprintf(stderr, done.\n); } } @@ -160,14 +158,21 @@ main(int argc, char * const argv[]) u_int sectorsize; time_t t1, t2; struct stat sb; + u_int n, snapshot = 60; - while ((ch = getopt(argc, argv, r:w:)) != -1) { + while ((ch = getopt(argc, argv, b:r:w:s:)) != -1) { switch (ch) { + case 'b': + bigsize = strtoul(optarg, NULL, 0); + break; case 'r': rworklist = strdup(optarg); if (rworklist == NULL) err(1, Cannot allocate enough memory); break; + case 's': + snapshot = strtoul(optarg, NULL, 0); + break; case 'w': wworklist = strdup(optarg); if (wworklist == NULL) @@ -197,15 +202,8 @@ main(int argc, char * const argv[]) if (error 0) err(1, DIOCGSECTORSIZE failed); - /* -* Make medsize roughly 64kB, depending on native sector -* size. bigsize has to be a multiple of medsize. -* For media with 2352 sectors, this will -* result in 2352, 63504, and 1016064 bytes. -*/ minsize = sectorsize; - medsize = (medsize /
svn commit: r189692 - head/sbin/recoverdisk
Author: phk Date: Wed Mar 11 11:42:17 2009 New Revision: 189692 URL: http://svn.freebsd.org/changeset/base/189692 Log: One Pp is more than enough. Says: brueffer Modified: head/sbin/recoverdisk/recoverdisk.1 Modified: head/sbin/recoverdisk/recoverdisk.1 == --- head/sbin/recoverdisk/recoverdisk.1 Wed Mar 11 10:37:02 2009 (r189691) +++ head/sbin/recoverdisk/recoverdisk.1 Wed Mar 11 11:42:17 2009 (r189692) @@ -53,7 +53,6 @@ sector size (usually 512 bytes). These figures are adjusted slightly, for devices whose sectorsize is not a power of 2, e.g., audio CDs with a sector size of 2352 bytes. .Pp -.Pp The options are as follows: .Bl -tag -width indent .It Fl b Ar bigsize ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r188010 - head/etc/defaults
Mike Makonnen m...@freebsd.org writes: Since, rc.d/defaultroute has the ability to wait for a default route to show up we can turn this knob back on without screwing subsequent daemons that expect to be able to talk to the outside world. Please revert this. It breaks the boot for, well, pretty much anyone who uses DHCP. It always takes at least a second or two to obtain or renew a DHCP lease, and if you background this process, /etc/rc will try to start services such as ntpdate, sendmail, sshd etc. before the machine has an IP address and a name server. In the worst case (such as mine), it will render the machine unusable until the admin has a chance to read svn logs and figure out what's broken and how to fix it. The rc_quiet changes you made last summer certainly didn't help me figure out what went on. I understand the rationale for them, but in my experience, they make debugging harder rather than easier. To add insult to injury, there is currently no way to revert to the historical behavior, short of applying a large number of patches in reverse. I would suggest adding an rc.conf knob for that, and making the historical behavior the default. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189693 - head/sys/fs/devfs
Author: kib Date: Wed Mar 11 12:53:16 2009 New Revision: 189693 URL: http://svn.freebsd.org/changeset/base/189693 Log: Enable advisory file locking for devfs vnodes. Reported by: Timothy Redaelli timothy redaelli eu MFC after:1 week Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c == --- head/sys/fs/devfs/devfs_vnops.c Wed Mar 11 11:42:17 2009 (r189692) +++ head/sys/fs/devfs/devfs_vnops.c Wed Mar 11 12:53:16 2009 (r189693) @@ -452,14 +452,6 @@ devfs_access(struct vop_access_args *ap) /* ARGSUSED */ static int -devfs_advlock(struct vop_advlock_args *ap) -{ - - return (ap-a_flags F_FLOCK ? EOPNOTSUPP : EINVAL); -} - -/* ARGSUSED */ -static int devfs_close(struct vop_close_args *ap) { struct vnode *vp = ap-a_vp, *oldvp; @@ -1552,7 +1544,6 @@ static struct vop_vector devfs_specops = .vop_default = default_vnodeops, .vop_access = devfs_access, - .vop_advlock = devfs_advlock, .vop_bmap = VOP_PANIC, .vop_close =devfs_close, .vop_create = VOP_PANIC, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r189624 - head/etc/rc.d
On Tue, Mar 10, 2009 at 03:33:28PM +, Gavin Atkinson wrote: Is this due to a bug/feature of gmirror? A long time ago, swapoff used to be run on shutdown, but it was removed by pjd@ in src/etc/rc.d/swap1 version 1.9 with the following commit message: It was due to a brainfart on my side.. I just backed it out. -Guido ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189694 - head/etc/rc.d
Author: guido Date: Wed Mar 11 12:55:12 2009 New Revision: 189694 URL: http://svn.freebsd.org/changeset/base/189694 Log: Backout previous commit due to PEBKAC Modified: head/etc/rc.d/swap1 Modified: head/etc/rc.d/swap1 == --- head/etc/rc.d/swap1 Wed Mar 11 12:53:16 2009(r189693) +++ head/etc/rc.d/swap1 Wed Mar 11 12:55:12 2009(r189694) @@ -11,7 +11,7 @@ name=swap1 start_cmd='swapon -aq' -stop_cmd='swapoff -aq' +stop_cmd=':' load_rc_config swap run_rc_command $1 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189695 - in head/sys: geom/part sys
Author: nyan Date: Wed Mar 11 13:15:42 2009 New Revision: 189695 URL: http://svn.freebsd.org/changeset/base/189695 Log: Move the PC98_[MS]ID_* defines from g_part_pc98.c to diskpc98.h. Reviewed by: marcel Modified: head/sys/geom/part/g_part_pc98.c head/sys/sys/diskpc98.h Modified: head/sys/geom/part/g_part_pc98.c == --- head/sys/geom/part/g_part_pc98.cWed Mar 11 12:55:12 2009 (r189694) +++ head/sys/geom/part/g_part_pc98.cWed Mar 11 13:15:42 2009 (r189695) @@ -45,14 +45,6 @@ __FBSDID($FreeBSD$); #include g_part_if.h -#definePC98_MID_BOOTABLE 0x80 -#definePC98_MID_MASK 0x7f -#definePC98_MID_386BSD 0x14 - -#definePC98_SID_ACTIVE 0x80 -#definePC98_SID_MASK 0x7f -#definePC98_SID_386BSD 0x44 - #defineSECSIZE 512 struct g_part_pc98_table { Modified: head/sys/sys/diskpc98.h == --- head/sys/sys/diskpc98.h Wed Mar 11 12:55:12 2009(r189694) +++ head/sys/sys/diskpc98.h Wed Mar 11 13:15:42 2009(r189695) @@ -42,9 +42,17 @@ #defineDOSMAGICOFFSET 510 #defineDOSMAGIC0xAA55 -#defineDOSMID_386BSD (0x14|0x80) /* 386BSD | bootable */ -#defineDOSSID_386BSD (0x44|0x80) /* 386BSD | active */ -#defineDOSPTYP_386BSD (DOSSID_386BSD 8 | DOSMID_386BSD) +#definePC98_MID_BOOTABLE 0x80 +#definePC98_MID_MASK 0x7f +#definePC98_MID_386BSD 0x14 + +#definePC98_SID_ACTIVE 0x80 +#definePC98_SID_MASK 0x7f +#definePC98_SID_386BSD 0x44 + +#defineDOSMID_386BSD (PC98_MID_386BSD | PC98_MID_BOOTABLE) +#defineDOSSID_386BSD (PC98_SID_386BSD | PC98_SID_ACTIVE) +#defineDOSPTYP_386BSD (DOSSID_386BSD 8 | DOSMID_386BSD) struct pc98_partition { unsigned char dp_mid; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r189629 - head/share/man/man4
On Wed, Mar 11, 2009 at 11:08:31AM +0100, Alexander Leidinger wrote: Quoting Andrew Thompson thom...@freebsd.org (from Tue, 10 Mar 2009 15:54:37 + (UTC)): Author: thompsa Date: Tue Mar 10 15:54:37 2009 New Revision: 189629 URL: http://svn.freebsd.org/changeset/base/189629 Log: Remove these files, they refer to module bundles that do not exist anymore. ObsoleteFiles.inc? Never installed. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r189617 - in head/sys: dev/syscons dev/syscons/teken pc98/cbus
* Andrey Chernov a...@nagual.pp.ru wrote: Hmm. Perhaps not after but before, because screen is cleared on mode change... It looks like rc messages appearse in the middle of the screen over boot messages. So the screen isn't correctly blanked when switching modes? Messages shouldn't overlap anymore, because we use the same terminal emulator to print both user and kernel messages now. -- Ed Schouten e...@80386.nl WWW: http://80386.nl/ pgpvT6EcrS6gL.pgp Description: PGP signature
svn commit: r189696 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs dev/md fs/cd9660 fs/udf kern sys ufs/ffs
Author: jhb Date: Wed Mar 11 14:13:47 2009 New Revision: 189696 URL: http://svn.freebsd.org/changeset/base/189696 Log: Add a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that a filesystem supports additional operations using shared vnode locks. Currently this is used to enable shared locks for open() and close() of read-only file descriptors. - When an ISOPEN namei() request is performed with LOCKSHARED, use a shared vnode lock for the leaf vnode only if the mount point has the extended shared flag set. - Set LOCKSHARED in vn_open_cred() for requests that specify O_RDONLY but not O_CREAT. - Use a shared vnode lock around VOP_CLOSE() if the file was opened with O_RDONLY and the mountpoint has the extended shared flag set. - Adjust md(4) to upgrade the vnode lock on the vnode it gets back from vn_open() since it now may only have a shared vnode lock. - Don't enable shared vnode locks on FIFO vnodes in ZFS and UFS since FIFO's require exclusive vnode locks for their open() and close() routines. (My recent MPSAFE patches for UDF and cd9660 already included this change.) - Enable extended shared operations on UFS, cd9660, and UDF. Submitted by: ups Reviewed by: pjd (ZFS bits) MFC after:1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/dev/md/md.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/udf/udf_vfsops.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_vnops.c head/sys/kern/vnode_if.src head/sys/sys/mount.h head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Mar 11 13:15:42 2009(r189695) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Mar 11 14:13:47 2009(r189696) @@ -153,7 +153,6 @@ zfs_znode_cache_constructor(void *buf, v zp-z_vnode = vp; vp-v_data = (caddr_t)zp; VN_LOCK_AREC(vp); - VN_LOCK_ASHARE(vp); list_link_init(zp-z_link_node); @@ -610,6 +609,8 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu vp-v_op = zfs_fifoops; break; } + if (vp-v_type != VFIFO) + VN_LOCK_ASHARE(vp); mutex_enter(zfsvfs-z_znodes_lock); list_insert_tail(zfsvfs-z_all_znodes, zp); @@ -1491,6 +1492,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, vp = ZTOV(rootzp); vp-v_type = VDIR; + VN_LOCK_ASHARE(vp); bzero(zfsvfs, sizeof (zfsvfs_t)); Modified: head/sys/dev/md/md.c == --- head/sys/dev/md/md.cWed Mar 11 13:15:42 2009(r189695) +++ head/sys/dev/md/md.cWed Mar 11 14:13:47 2009(r189696) @@ -924,12 +924,20 @@ mdcreate_vnode(struct md_s *sc, struct m return (error); vfslocked = NDHASGIANT(nd); NDFREE(nd, NDF_ONLY_PNBUF); - if (nd.ni_vp-v_type != VREG || - (error = VOP_GETATTR(nd.ni_vp, vattr, td-td_ucred))) { - VOP_UNLOCK(nd.ni_vp, 0); - (void)vn_close(nd.ni_vp, flags, td-td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); - return (error ? error : EINVAL); + if (nd.ni_vp-v_type != VREG) { + error = EINVAL; + goto bad; + } + error = VOP_GETATTR(nd.ni_vp, vattr, td-td_ucred); + if (error != 0) + goto bad; + if (VOP_ISLOCKED(nd.ni_vp) != LK_EXCLUSIVE) { + vn_lock(nd.ni_vp, LK_UPGRADE | LK_RETRY); + if (nd.ni_vp-v_iflag VI_DOOMED) { + /* Forced unmount. */ + error = EBADF; + goto bad; + } } nd.ni_vp-v_vflag |= VV_MD; VOP_UNLOCK(nd.ni_vp, 0); @@ -948,13 +956,15 @@ mdcreate_vnode(struct md_s *sc, struct m sc-vnode = NULL; vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY); nd.ni_vp-v_vflag = ~VV_MD; - VOP_UNLOCK(nd.ni_vp, 0); - (void)vn_close(nd.ni_vp, flags, td-td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); - return (error); + goto bad; } VFS_UNLOCK_GIANT(vfslocked); return (0); +bad: + VOP_UNLOCK(nd.ni_vp, 0); + (void)vn_close(nd.ni_vp, flags, td-td_ucred, td); + VFS_UNLOCK_GIANT(vfslocked); + return (error); } static int Modified: head/sys/fs/cd9660/cd9660_vfsops.c == --- head/sys/fs/cd9660/cd9660_vfsops.c Wed Mar 11 13:15:42 2009 (r189695) +++ head/sys/fs/cd9660/cd9660_vfsops.c Wed Mar 11 14:13:47 2009 (r189696) @@ -371,7 +371,8 @@
svn commit: r189697 - head/sys/kern
Author: jhb Date: Wed Mar 11 14:39:55 2009 New Revision: 189697 URL: http://svn.freebsd.org/changeset/base/189697 Log: Gah, fix the code to match the comment. For non-open lookups use a shared vnode lock for the leaf vnode if LOCKSHARED is set. Submitted by: rdivacky Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c == --- head/sys/kern/vfs_lookup.c Wed Mar 11 14:13:47 2009(r189696) +++ head/sys/kern/vfs_lookup.c Wed Mar 11 14:39:55 2009(r189697) @@ -385,7 +385,7 @@ needs_exclusive_leaf(struct mount *mp, i * Lookup requests outside of open() that specify LOCKSHARED * only need a shared lock on the leaf vnode. */ - return (1); + return (0); } /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189699 - in head/sys: . amd64/amd64 amd64/conf amd64/include amd64/include/xen conf contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/xen/balloon dev/xen/blkfront dev/xen/console d...
Author: dfr Date: Wed Mar 11 15:30:12 2009 New Revision: 189699 URL: http://svn.freebsd.org/changeset/base/189699 Log: Merge in support for Xen HVM on amd64 architecture. Added: head/sys/amd64/conf/XENHVM (contents, props changed) - copied, changed from r189614, user/dfr/xenhvm/7/sys/amd64/conf/XENHVM head/sys/amd64/include/xen/ (props changed) - copied from r189614, user/dfr/xenhvm/7/sys/amd64/include/xen/ head/sys/dev/xen/xenpci/ (props changed) - copied from r189614, user/dfr/xenhvm/7/sys/dev/xen/xenpci/ head/sys/xen/features.h - copied unchanged from r189614, user/dfr/xenhvm/7/sys/xen/features.h head/sys/xen/reboot.c - copied unchanged from r189614, user/dfr/xenhvm/7/sys/xen/reboot.c Modified: head/sys/ (props changed) head/sys/amd64/amd64/machdep.c head/sys/amd64/include/pcpu.h head/sys/amd64/include/xen/xenvar.h head/sys/conf/files head/sys/conf/options.amd64 head/sys/contrib/pf/ (props changed) head/sys/dev/ata/ata-usb.c (props changed) head/sys/dev/cxgb/ (props changed) head/sys/dev/sound/usb/uaudio.c (props changed) head/sys/dev/sound/usb/uaudio.h (props changed) head/sys/dev/sound/usb/uaudio_pcm.c (props changed) head/sys/dev/sound/usb/uaudioreg.h (props changed) head/sys/dev/usb/usb.h (props changed) head/sys/dev/usb/usb_if.m (props changed) head/sys/dev/usb/usbdevs (props changed) head/sys/dev/usb/usbhid.h (props changed) head/sys/dev/xen/balloon/balloon.c head/sys/dev/xen/blkfront/blkfront.c head/sys/dev/xen/console/console.c head/sys/dev/xen/console/xencons_ring.c head/sys/dev/xen/netfront/ (props changed) head/sys/dev/xen/netfront/netfront.c head/sys/dev/xen/xenpci/machine_reboot.c head/sys/i386/include/xen/xenpmap.h head/sys/xen/evtchn.h (props changed) head/sys/xen/evtchn/evtchn.c head/sys/xen/evtchn/evtchn_dev.c head/sys/xen/features.c head/sys/xen/gnttab.c head/sys/xen/gnttab.h head/sys/xen/hypervisor.h (contents, props changed) head/sys/xen/interface/arch-x86/xen.h head/sys/xen/interface/hvm/params.h head/sys/xen/xen_intr.h (contents, props changed) head/sys/xen/xenbus/xenbus_probe.c head/sys/xen/xenbus/xenbus_xs.c Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Wed Mar 11 14:55:04 2009 (r189698) +++ head/sys/amd64/amd64/machdep.c Wed Mar 11 15:30:12 2009 (r189699) @@ -1494,6 +1494,14 @@ hammer_time(u_int64_t modulep, u_int64_t if (env != NULL) strlcpy(kernelname, env, sizeof(kernelname)); +#ifdef XENHVM + if (inw(0x10) == 0x49d2) { + if (bootverbose) + printf(Xen detected: disabling emulated block and network devices\n); + outw(0x10, 3); + } +#endif + /* Location of kernel stack for locore */ return ((u_int64_t)thread0.td_pcb); } Copied and modified: head/sys/amd64/conf/XENHVM (from r189614, user/dfr/xenhvm/7/sys/amd64/conf/XENHVM) == --- user/dfr/xenhvm/7/sys/amd64/conf/XENHVM Tue Mar 10 10:59:30 2009 (r189614, copy source) +++ head/sys/amd64/conf/XENHVM Wed Mar 11 15:30:12 2009(r189699) @@ -1,8 +1,8 @@ # # XENHVM -- Xen HVM kernel configuration file for FreeBSD/amd64 # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -19,11 +19,17 @@ # $FreeBSD$ cpuHAMMER -ident XENHVM +ident GENERIC # To statically compile in device wiring instead of /boot/device.hints #hints GENERIC.hints # Default places to look for devices. +# Use the following to compile in values accessible to the kernel +# through getenv() (or kenv(1) in userland). The format of the file +# is 'variable=value', see kenv(1) +# +# env GENERIC.env + makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols makeoptionsMODULES_OVERRIDE= @@ -31,7 +37,7 @@ options SCHED_ULE # ULE scheduler optionsPREEMPTION # Enable kernel thread preemption optionsINET# InterNETworking optionsINET6 # IPv6 communications protocols -optionsSCTP# Stream Control Transmission Protocol +optionsSCTP# Stream Control Transmission Protocol optionsFFS # Berkeley Fast Filesystem optionsSOFTUPDATES # Enable FFS soft updates support optionsUFS_ACL # Support for access
svn commit: r189700 - head/sbin/recoverdisk
Author: phk Date: Wed Mar 11 16:32:00 2009 New Revision: 189700 URL: http://svn.freebsd.org/changeset/base/189700 Log: Fix printf warnings on amd64 etc. Modified: head/sbin/recoverdisk/recoverdisk.c Modified: head/sbin/recoverdisk/recoverdisk.c == --- head/sbin/recoverdisk/recoverdisk.c Wed Mar 11 15:30:12 2009 (r189699) +++ head/sbin/recoverdisk/recoverdisk.c Wed Mar 11 16:32:00 2009 (r189700) @@ -221,7 +221,7 @@ main(int argc, char * const argv[]) medsize = bigsize (ch / 2); medsize = (medsize / minsize) * minsize; - fprintf(stderr, Bigsize = %u, medsize = %u, minsize = %u\n, + fprintf(stderr, Bigsize = %zu, medsize = %zu, minsize = %zu\n, bigsize, medsize, minsize); buf = malloc(bigsize); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189701 - head/tools/tools/ath/athregs
Author: sam Date: Wed Mar 11 17:14:17 2009 New Revision: 189701 URL: http://svn.freebsd.org/changeset/base/189701 Log: add %b format strings for use by athdecode Modified: head/tools/tools/ath/athregs/dumpregs.h head/tools/tools/ath/athregs/dumpregs_5210.c head/tools/tools/ath/athregs/dumpregs_5211.c head/tools/tools/ath/athregs/dumpregs_5212.c head/tools/tools/ath/athregs/dumpregs_5416.c Modified: head/tools/tools/ath/athregs/dumpregs.h == --- head/tools/tools/ath/athregs/dumpregs.h Wed Mar 11 16:32:00 2009 (r189700) +++ head/tools/tools/ath/athregs/dumpregs.h Wed Mar 11 17:14:17 2009 (r189701) @@ -36,6 +36,7 @@ struct dumpreg { uint32_taddr; const char *name; + const char *bits; int type; u_int srevMin, srevMax; u_int phyMin, phyMax; @@ -61,6 +62,30 @@ enum { DUMP_ALL= 0x }; +#define_DEFREG(_addr, _name, _type) \ +{ .addr = _addr, .name = _name, .type = _type } +#define_DEFREGx(_addr, _name, _type, _srevmin, _srevmax) \ +{ .addr = _addr, .name = _name, .type = _type, \ + .srevMin = _srevmin, .srevMax = _srevmax } +#define_DEFREGfmt(_addr, _name, _type, _fmt) \ +{ .addr = _addr, .name = _name, .type = _type, .bits = _fmt } +#defineDEFVOID(_addr, _name) _DEFREG(_addr, _name, 0) +#defineDEFVOIDx(_addr, _name, _smin, _smax) \ + __DEFREGx(_addr, _name, _smin, _smax, 0) +#defineDEFVOIDfmt(_addr, _name, _fmt) \ + _DEFREGfmt(_addr, _name, 0, _fmt) +#defineDEFBASIC(_addr, _name) _DEFREG(_addr, _name, DUMP_BASIC) +#defineDEFBASICfmt(_addr, _name, _fmt) \ + _DEFREGfmt(_addr, _name, DUMP_BASIC, _fmt) +#defineDEFBASICx(_addr, _name, _smin, _smax) \ + _DEFREGx(_addr, _name, DUMP_BASIC, _smin, _smax) +#defineDEFBB(_addr, _name) _DEFREG(_addr, _name, DUMP_BASEBAND) +#defineDEFINT(_addr, _name)_DEFREG(_addr, _name, DUMP_INTERRUPT) +#defineDEFINTfmt(_addr, _name, _fmt) \ + _DEFREGfmt(_addr, _name, DUMP_INTERRUPT, _fmt) +#defineDEFQCU(_addr, _name)_DEFREG(_addr, _name, DUMP_QCU) +#defineDEFDCU(_addr, _name)_DEFREG(_addr, _name, DUMP_DCU) + void register_regs(struct dumpreg *_regs, u_int _nregs, int def_srev_min, int def_srev_max, int def_phy_min, int def_phy_max); Modified: head/tools/tools/ath/athregs/dumpregs_5210.c == --- head/tools/tools/ath/athregs/dumpregs_5210.cWed Mar 11 16:32:00 2009(r189700) +++ head/tools/tools/ath/athregs/dumpregs_5210.cWed Mar 11 17:14:17 2009(r189701) @@ -33,83 +33,85 @@ #include ah.h #include ah_internal.h #include ar5210/ar5210reg.h +#include ar5210/ar5210phy.h #include dumpregs.h #defineN(a)(sizeof(a) / sizeof(a[0])) static struct dumpreg ar5210regs[] = { -{ AR_TXDP0,TXDP0,DUMP_BASIC }, -{ AR_TXDP1,TXDP1,DUMP_BASIC }, -{ AR_CR, CR, DUMP_BASIC }, -{ AR_RXDP, RXDP, DUMP_BASIC }, -{ AR_CFG, CFG, DUMP_BASIC }, -#if 0 /* read clears pending interrupts */ -{ AR_ISR, ISR, DUMP_INTERRUPT }, -#endif -{ AR_IMR, IMR, DUMP_BASIC }, -{ AR_IER, IER, DUMP_BASIC }, -{ AR_BCR, BCR, DUMP_BASIC }, -{ AR_BSR, BSR, DUMP_BASIC }, -{ AR_TXCFG,TXCFG,DUMP_BASIC }, -{ AR_RXCFG,RXCFG,DUMP_BASIC }, -{ AR_MIBC, MIBC, DUMP_BASIC }, -{ AR_TOPS, TOPS, DUMP_BASIC }, -{ AR_RXNOFRM, RXNOFR, DUMP_BASIC }, -{ AR_TXNOFRM, TXNOFR, DUMP_BASIC }, -{ AR_RPGTO,RPGTO,DUMP_BASIC }, -{ AR_RFCNT,RFCNT,DUMP_BASIC }, -{ AR_MISC, MISC, DUMP_BASIC }, -{ AR_RC, RC, DUMP_BASIC }, -{ AR_SCR, SCR, DUMP_BASIC }, -{ AR_INTPEND, INTPEND, DUMP_BASIC }, -{ AR_SFR, SFR, DUMP_BASIC }, -{ AR_PCICFG, PCICFG, DUMP_BASIC }, -{ AR_GPIOCR, GPIOCR, DUMP_BASIC }, -#if 0 -{ AR_GPIODO, GPIODO, DUMP_BASIC }, -{ AR_GPIODI, GPIODI, DUMP_BASIC }, -#endif -{ AR_SREV, SREV, DUMP_BASIC }, -{ AR_STA_ID0, STA_ID0, DUMP_BASIC }, -{ AR_STA_ID1, STA_ID1, DUMP_BASIC }, -{ AR_BSS_ID0, BSS_ID0, DUMP_BASIC }, -{ AR_BSS_ID1, BSS_ID1, DUMP_BASIC }, -{ AR_SLOT_TIME,SLOTTIME, DUMP_BASIC }, -{ AR_TIME_OUT, TIME_OUT, DUMP_BASIC }, -{ AR_RSSI_THR,
svn commit: r189705 - in head/tools/tools/ath: athdecode athpoke athregs common
Author: sam Date: Wed Mar 11 17:46:01 2009 New Revision: 189705 URL: http://svn.freebsd.org/changeset/base/189705 Log: move shared register support code to common Added: head/tools/tools/ath/common/dumpregs.h (props changed) - copied unchanged from r189701, head/tools/tools/ath/athregs/dumpregs.h head/tools/tools/ath/common/dumpregs_5210.c (props changed) - copied unchanged from r189701, head/tools/tools/ath/athregs/dumpregs_5210.c head/tools/tools/ath/common/dumpregs_5211.c (props changed) - copied unchanged from r189701, head/tools/tools/ath/athregs/dumpregs_5211.c head/tools/tools/ath/common/dumpregs_5212.c (props changed) - copied unchanged from r189701, head/tools/tools/ath/athregs/dumpregs_5212.c head/tools/tools/ath/common/dumpregs_5416.c (props changed) - copied unchanged from r189701, head/tools/tools/ath/athregs/dumpregs_5416.c Deleted: head/tools/tools/ath/athregs/dumpregs.h head/tools/tools/ath/athregs/dumpregs_5210.c head/tools/tools/ath/athregs/dumpregs_5211.c head/tools/tools/ath/athregs/dumpregs_5212.c head/tools/tools/ath/athregs/dumpregs_5416.c Modified: head/tools/tools/ath/athdecode/Makefile head/tools/tools/ath/athpoke/Makefile head/tools/tools/ath/athregs/Makefile Modified: head/tools/tools/ath/athdecode/Makefile == --- head/tools/tools/ath/athdecode/Makefile Wed Mar 11 17:41:46 2009 (r189704) +++ head/tools/tools/ath/athdecode/Makefile Wed Mar 11 17:46:01 2009 (r189705) @@ -3,8 +3,7 @@ PROG= athdecode -.PATH.c: ${.CURDIR}/../athregs -CFLAGS+=-I${.CURDIR}/../athregs +.PATH.c: ${.CURDIR}/../common SRCS= main.c SRCS+= dumpregs_5210.c Modified: head/tools/tools/ath/athpoke/Makefile == --- head/tools/tools/ath/athpoke/Makefile Wed Mar 11 17:41:46 2009 (r189704) +++ head/tools/tools/ath/athpoke/Makefile Wed Mar 11 17:46:01 2009 (r189705) @@ -2,8 +2,7 @@ PROG= athpoke -.PATH.c: ${.CURDIR}/../athregs -CFLAGS+=-I${.CURDIR}/../athregs +.PATH.c: ${.CURDIR}/../common SRCS= athpoke.c SRCS+= dumpregs_5210.c Modified: head/tools/tools/ath/athregs/Makefile == --- head/tools/tools/ath/athregs/Makefile Wed Mar 11 17:41:46 2009 (r189704) +++ head/tools/tools/ath/athregs/Makefile Wed Mar 11 17:46:01 2009 (r189705) @@ -2,6 +2,8 @@ PROG= athregs +.PATH.c: ${.CURDIR}/../common + SRCS= dumpregs.c SRCS+= dumpregs_5210.c SRCS+= dumpregs_5211.c Copied: head/tools/tools/ath/common/dumpregs.h (from r189701, head/tools/tools/ath/athregs/dumpregs.h) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/common/dumpregs.h Wed Mar 11 17:46:01 2009 (r189705, copy of r189701, head/tools/tools/ath/athregs/dumpregs.h) @@ -0,0 +1,98 @@ +#ifndef _DUMPREGS_ +#define_DUMPREGS_ +/*- + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer, + *without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + *similar to the NO WARRANTY disclaimer below (Disclaimer) and any + *redistribution must be conditioned upon including a substantially + *similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + * + * $FreeBSD$ + */ + +#define__constructor __attribute__((constructor)) + +struct dumpreg { + uint32_taddr; + const char *name; + const char *bits; + int type; + u_int srevMin, srevMax; + u_int phyMin, phyMax; +}; +#define
svn commit: r189706 - head/sys/ufs/ffs
Author: kib Date: Wed Mar 11 19:45:52 2009 New Revision: 189706 URL: http://svn.freebsd.org/changeset/base/189706 Log: Do not double-free the struct inode when insmntque failed. Default insmntque destructor reclaims the vnode, and ufs_reclaim frees the memory. Reviewed by: tegge MFC after:3 days Modified: head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c == --- head/sys/ufs/ffs/ffs_vfsops.c Wed Mar 11 17:46:01 2009 (r189705) +++ head/sys/ufs/ffs/ffs_vfsops.c Wed Mar 11 19:45:52 2009 (r189706) @@ -1464,7 +1464,6 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags vp-v_vflag |= VV_FORCEINSMQ; error = insmntque(vp, mp); if (error != 0) { - uma_zfree(uma_inode, ip); *vpp = NULL; return (error); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r189617 - in head/sys: dev/syscons dev/syscons/teken pc98/cbus
On Wed, Mar 11, 2009 at 02:54:03PM +0100, Ed Schouten wrote: So the screen isn't correctly blanked when switching modes? Messages shouldn't overlap anymore, because we use the same terminal emulator to print both user and kernel messages now. It seems that rc don't use NL with some output while kernel messages (from USB) are delayed for some time. Here is example what is in dmesg and what is actually on the screen: device_attach: uhid1 attach returned 12 Entropy harvesting: interrupts ethernet point_to_point ugen2.3: T-wins at usbus2 uhid1: T-wins ASUS DH Remote, class 0/0, rev 1.10/1.00, addr 3 on usbus2 kickstart . /dev/ad6s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS -- device_attach: uhid1 attach returned 12 Entropy harvesting: interrupts ethernet point_to_pointugen2.3: T-wins at usbus2 uhid1: T-wins ASUS DH Remote, class 0/0, rev 1.10/1.00, addr 3 on usbus2 kickstart. /dev/ad6s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS -- http://ache.pp.ru/ pgpNW8KlW0ZYA.pgp Description: PGP signature
svn commit: r189707 - in head: sys/kern sys/sys usr.bin/kdump usr.bin/ktrace
Author: jhb Date: Wed Mar 11 21:48:36 2009 New Revision: 189707 URL: http://svn.freebsd.org/changeset/base/189707 Log: Add a new type of KTRACE record for sysctl(3) invocations. It uses the internal sysctl_sysctl_name() handler to map the MIB array to a string name and logs this name in the trace log. This can be useful to see exactly which sysctls a thread is invoking. MFC after:1 month Modified: head/sys/kern/kern_ktrace.c head/sys/kern/kern_sysctl.c head/sys/sys/ktrace.h head/usr.bin/kdump/kdump.1 head/usr.bin/kdump/kdump.c head/usr.bin/ktrace/ktrace.1 head/usr.bin/ktrace/ktrace.h head/usr.bin/ktrace/subr.c Modified: head/sys/kern/kern_ktrace.c == --- head/sys/kern/kern_ktrace.c Wed Mar 11 19:45:52 2009(r189706) +++ head/sys/kern/kern_ktrace.c Wed Mar 11 21:48:36 2009(r189707) @@ -111,6 +111,7 @@ static int data_lengths[] = { sizeof(struct ktr_csw), /* KTR_CSW */ 0, /* KTR_USER */ 0, /* KTR_STRUCT */ + 0, /* KTR_SYSCTL */ }; static STAILQ_HEAD(, ktr_request) ktr_free; @@ -319,7 +320,7 @@ ktr_enqueuerequest(struct thread *td, st * is used both internally before committing other records, and also on * system call return. We drain all the ones we can find at the time when * drain is requested, but don't keep draining after that as those events - * may me approximately after the current event. + * may be approximately after the current event. */ static void ktr_drain(struct thread *td) @@ -481,6 +482,40 @@ ktrnamei(path) } void +ktrsysctl(name, namelen) + int *name; + u_int namelen; +{ + struct ktr_request *req; + u_int mib[CTL_MAXNAME + 2]; + char *mibname; + size_t mibnamelen; + int error; + + /* Lookup name of mib. */ + KASSERT(namelen = CTL_MAXNAME, (sysctl MIB too long)); + mib[0] = 0; + mib[1] = 1; + bcopy(name, mib + 2, namelen * sizeof(*name)); + mibnamelen = 128; + mibname = malloc(mibnamelen, M_KTRACE, M_WAITOK); + error = kernel_sysctl(curthread, mib, namelen + 2, mibname, mibnamelen, + NULL, 0, mibnamelen, 0); + if (error) { + free(mibname, M_KTRACE); + return; + } + req = ktr_getrequest(KTR_SYSCTL); + if (req == NULL) { + free(mibname, M_KTRACE); + return; + } + req-ktr_header.ktr_len = mibnamelen; + req-ktr_buffer = mibname; + ktr_submitrequest(curthread, req); +} + +void ktrgenio(fd, rw, uio, error) int fd; enum uio_rw rw; @@ -925,6 +960,9 @@ ktr_writerequest(struct thread *td, stru mtx_unlock(ktrace_mtx); kth = req-ktr_header; + KASSERT(((u_short)kth-ktr_type ~KTR_DROP) + sizeof(data_lengths) / sizeof(data_lengths[0]), + (data_lengths array overflow)); datalen = data_lengths[(u_short)kth-ktr_type ~KTR_DROP]; buflen = kth-ktr_len; auio.uio_iov = aiov[0]; Modified: head/sys/kern/kern_sysctl.c == --- head/sys/kern/kern_sysctl.c Wed Mar 11 19:45:52 2009(r189706) +++ head/sys/kern/kern_sysctl.c Wed Mar 11 21:48:36 2009(r189707) @@ -39,6 +39,7 @@ __FBSDID($FreeBSD$); #include opt_compat.h +#include opt_ktrace.h #include opt_mac.h #include sys/param.h @@ -54,6 +55,9 @@ __FBSDID($FreeBSD$); #include sys/sysproto.h #include sys/uio.h #include sys/vimage.h +#ifdef KTRACE +#include sys/ktrace.h +#endif #include security/mac/mac_framework.h @@ -758,7 +762,7 @@ sysctl_sysctl_next(SYSCTL_HANDLER_ARGS) static SYSCTL_NODE(_sysctl, 2, next, CTLFLAG_RD, sysctl_sysctl_next, ); static int -name2oid (char *name, int *oid, int *len, struct sysctl_oid **oidpp) +name2oid(char *name, int *oid, int *len, struct sysctl_oid **oidpp) { int i; struct sysctl_oid *oidp; @@ -1499,6 +1503,11 @@ userland_sysctl(struct thread *td, int * req.newfunc = sysctl_new_user; req.lock = REQ_LOCKED; +#ifdef KTRACE + if (KTRPOINT(curthread, KTR_SYSCTL)) + ktrsysctl(name, namelen); +#endif + SYSCTL_XLOCK(); CURVNET_SET(TD_TO_VNET(curthread)); Modified: head/sys/sys/ktrace.h == --- head/sys/sys/ktrace.h Wed Mar 11 19:45:52 2009(r189706) +++ head/sys/sys/ktrace.h Wed Mar 11 21:48:36 2009(r189707) @@ -158,6 +158,12 @@ struct sockaddr; struct stat; /* + * KTR_SYSCTL - name of a sysctl MIB + */ +#defineKTR_SYSCTL 9 + /* record contains null-terminated MIB name */ + +/* * KTR_DROP - If this bit is set in ktr_type, then at least one
Re: svn commit: r189707 - in head: sys/kern sys/sys usr.bin/kdump usr.bin/ktrace
On Wednesday 11 March 2009 5:48:36 pm John Baldwin wrote: Author: jhb Date: Wed Mar 11 21:48:36 2009 New Revision: 189707 URL: http://svn.freebsd.org/changeset/base/189707 Log: Add a new type of KTRACE record for sysctl(3) invocations. It uses the internal sysctl_sysctl_name() handler to map the MIB array to a string name and logs this name in the trace log. This can be useful to see exactly which sysctls a thread is invoking. MFC after: 1 month Sample output below: 884 ktrace CALL execve(0x7fffe3a0,0x7fffe990,0x7fffe9a0) 884 ktrace NAMI /bin/sh 884 ktrace NAMI /libexec/ld-elf.so.1 884 sh RET execve 0 884 sh CALL __sysctl(0x7fffe580,0x2,0x7fffe59c,0x7fffe590,0,0) 884 sh SCTL kern.osreldate 884 sh RET __sysctl 0 884 sh CALL mmap(0,0x240,PROT_READ|PROT_WRITE,MAP_ANON,0x,0) 884 sh RET mmap 5513216/0x800542000 Some of the sysctl's from a simple ps: 935 ps SCTL kern.proc.uid.1059 935 ps SCTL kern.proc.uid.1059 935 ps SCTL sysctl.name2oid 935 ps SCTL kern.ccpu 935 ps SCTL sysctl.name2oid 935 ps SCTL kern.fscale 935 ps SCTL sysctl.name2oid 935 ps SCTL hw.availpages 935 ps SCTL sysctl.name2oid 935 ps SCTL kern.ps_arg_cache_limit 935 ps SCTL kern.proc.args.935 935 ps SCTL kern.argmax 935 ps SCTL kern.proc.args.854 -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189708 - head/sys/kern
Author: rwatson Date: Wed Mar 11 22:00:03 2009 New Revision: 189708 URL: http://svn.freebsd.org/changeset/base/189708 Log: When writing out updated pollfd records when returning from poll(), only copy out the revents field, not the whole pollfd structure. Otherwise, if the events field is updated concurrently by another thread, that update may be lost. This issue apparently causes problems for the JDK on FreeBSD, which expects the Linux behavior of not updating all fields (somewhat oddly, Solaris does not implement the required behavior, but presumably our adaptation of the JDK is based on the Linux port?). MFC after: 2 weeks PR: kern/130924 Submitted by: Kurt Miller kurt @ intricatesoftware.com Discussed with: kib Modified: head/sys/kern/sys_generic.c Modified: head/sys/kern/sys_generic.c == --- head/sys/kern/sys_generic.c Wed Mar 11 21:48:36 2009(r189707) +++ head/sys/kern/sys_generic.c Wed Mar 11 22:00:03 2009(r189708) @@ -76,6 +76,7 @@ static MALLOC_DEFINE(M_IOCTLOPS, ioctlo static MALLOC_DEFINE(M_SELECT, select, select() buffer); MALLOC_DEFINE(M_IOV, iov, large iov's); +static int pollout(struct pollfd *, struct pollfd *, u_int); static int pollscan(struct thread *, struct pollfd *, u_int); static int pollrescan(struct thread *); static int selscan(struct thread *, fd_mask **, fd_mask **, int); @@ -1128,7 +1129,7 @@ done: if (error == EWOULDBLOCK) error = 0; if (error == 0) { - error = copyout(bits, uap-fds, ni); + error = pollout(bits, uap-fds, nfds); if (error) goto out; } @@ -1183,6 +1184,26 @@ pollrescan(struct thread *td) static int +pollout(fds, ufds, nfd) + struct pollfd *fds; + struct pollfd *ufds; + u_int nfd; +{ + int error = 0; + u_int i = 0; + + for (i = 0; i nfd; i++) { + error = copyout(fds-revents, ufds-revents, + sizeof(ufds-revents)); + if (error) + return (error); + fds++; + ufds++; + } + return (0); +} + +static int pollscan(td, fds, nfd) struct thread *td; struct pollfd *fds; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r189617 - in head/sys: dev/syscons dev/syscons/teken pc98/cbus
* Andrey Chernov a...@nagual.pp.ru wrote: On Wed, Mar 11, 2009 at 02:54:03PM +0100, Ed Schouten wrote: So the screen isn't correctly blanked when switching modes? Messages shouldn't overlap anymore, because we use the same terminal emulator to print both user and kernel messages now. It seems that rc don't use NL with some output while kernel messages (from USB) are delayed for some time. Here is example what is in dmesg and what is actually on the screen: snip This is not a bug, but a feature. It has always been like this... -- Ed Schouten e...@80386.nl WWW: http://80386.nl/ pgpNAdqu6jKpY.pgp Description: PGP signature
svn commit: r189709 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb fs/cd9660
Author: jhb Date: Wed Mar 11 22:13:12 2009 New Revision: 189709 URL: http://svn.freebsd.org/changeset/base/189709 Log: MFC: Make cd9660 MPSAFE and able to use shared vnode locks for pathname lookups. Also, disable operations on character device nodes. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/fs/cd9660/cd9660_lookup.c stable/7/sys/fs/cd9660/cd9660_node.c stable/7/sys/fs/cd9660/cd9660_node.h stable/7/sys/fs/cd9660/cd9660_vfsops.c stable/7/sys/fs/cd9660/cd9660_vnops.c Modified: stable/7/sys/fs/cd9660/cd9660_lookup.c == --- stable/7/sys/fs/cd9660/cd9660_lookup.c Wed Mar 11 22:00:03 2009 (r189708) +++ stable/7/sys/fs/cd9660/cd9660_lookup.c Wed Mar 11 22:13:12 2009 (r189709) @@ -94,29 +94,34 @@ cd9660_lookup(ap) struct iso_node *dp;/* inode for directory being searched */ struct iso_mnt *imp;/* filesystem that directory is in */ struct buf *bp; /* a buffer of directory entries */ - struct iso_directory_record *ep = 0;/* the current directory entry */ + struct iso_directory_record *ep;/* the current directory entry */ + struct iso_directory_record *ep2;/* copy of current directory entry */ int entryoffsetinblock; /* offset of ep in bp's buffer */ int saveoffset = 0; /* offset of last directory entry in dir */ + doff_t i_diroff;/* cached i_diroff value. */ + doff_t i_offset;/* cached i_offset value. */ int numdirpasses; /* strategy for directory search */ doff_t endsearch; /* offset to end directory search */ struct vnode *pdp; /* saved dp during symlink work */ struct vnode *tdp; /* returned by cd9660_vget_internal */ u_long bmask; /* block offset mask */ int error; - ino_t ino = 0, saved_ino; - int reclen; + ino_t ino, i_ino; + int ltype, reclen; u_short namelen; int isoflags; char altname[NAME_MAX]; int res; int assoc, len; char *name; + struct mount *mp; struct vnode **vpp = ap-a_vpp; struct componentname *cnp = ap-a_cnp; int flags = cnp-cn_flags; int nameiop = cnp-cn_nameiop; struct thread *td = cnp-cn_thread; + ep2 = ep = NULL; bp = NULL; *vpp = NULL; vdp = ap-a_dvp; @@ -126,9 +131,11 @@ cd9660_lookup(ap) /* * We now have a segment name to search for, and a directory to search. */ - + ino = reclen = 0; + i_diroff = dp-i_diroff; len = cnp-cn_namelen; name = cnp-cn_nameptr; + /* * A leading `=' means, we are looking for an associated file */ @@ -150,15 +157,14 @@ cd9660_lookup(ap) * of simplicity. */ bmask = imp-im_bmask; - if (nameiop != LOOKUP || dp-i_diroff == 0 || - dp-i_diroff dp-i_size) { + if (nameiop != LOOKUP || i_diroff == 0 || i_diroff dp-i_size) { entryoffsetinblock = 0; - dp-i_offset = 0; + i_offset = 0; numdirpasses = 1; } else { - dp-i_offset = dp-i_diroff; - if ((entryoffsetinblock = dp-i_offset bmask) - (error = cd9660_blkatoff(vdp, (off_t)dp-i_offset, NULL, bp))) + i_offset = i_diroff; + if ((entryoffsetinblock = i_offset bmask) + (error = cd9660_blkatoff(vdp, (off_t)i_offset, NULL, bp))) return (error); numdirpasses = 2; nchstats.ncs_2passes++; @@ -166,17 +172,17 @@ cd9660_lookup(ap) endsearch = dp-i_size; searchloop: - while (dp-i_offset endsearch) { + while (i_offset endsearch) { /* * If offset is on a block boundary, * read the next directory block. * Release previous if it exists. */ - if ((dp-i_offset bmask) == 0) { + if ((i_offset bmask) == 0) { if (bp != NULL) brelse(bp); if ((error = - cd9660_blkatoff(vdp, (off_t)dp-i_offset, NULL, bp)) != 0) + cd9660_blkatoff(vdp, (off_t)i_offset, NULL, bp)) != 0) return (error); entryoffsetinblock = 0; } @@ -189,8 +195,8 @@ searchloop: reclen = isonum_711(ep-length); if (reclen == 0) { /* skip to next block,
svn commit: r189713 - head/sys/dev/ath/ath_hal
Author: sam Date: Thu Mar 12 00:09:29 2009 New Revision: 189713 URL: http://svn.freebsd.org/changeset/base/189713 Log: add asserts Modified: head/sys/dev/ath/ath_hal/ah.c Modified: head/sys/dev/ath/ath_hal/ah.c == --- head/sys/dev/ath/ath_hal/ah.c Thu Mar 12 00:03:55 2009 (r189712) +++ head/sys/dev/ath/ath_hal/ah.c Thu Mar 12 00:09:29 2009 (r189713) @@ -844,6 +844,7 @@ ath_hal_ini_write(struct ath_hal *ah, co { int r; + HALASSERT(col ia-cols); for (r = 0; r ia-rows; r++) { OS_REG_WRITE(ah, HAL_INI_VAL(ia, r, 0), HAL_INI_VAL(ia, r, col)); @@ -857,6 +858,7 @@ ath_hal_ini_bank_setup(uint32_t data[], { int r; + HALASSERT(col ia-cols); for (r = 0; r ia-rows; r++) data[r] = HAL_INI_VAL(ia, r, col); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189714 - head/sys/dev/txp
Author: yongari Date: Thu Mar 12 01:14:47 2009 New Revision: 189714 URL: http://svn.freebsd.org/changeset/base/189714 Log: bus_dma(9) conversion and make txp(4) work on all architectures. o Header file cleanup. o bus_dma(9) conversion. - Removed all consumers of vtophys(9) and converted to use bus_dma(9). - Typhoon2 functional specification says the controller supports 64bit DMA addressing. However all Typhoon controllers are known to lack of DAC support so 64bit DMA support was disabled. - The hardware can't handle more 16 fragmented Tx DMA segments so teach txp(4) to collapse these segments to be less than 16. - Added Rx buffer alignment requirements(4 bytes alignment) and implemented fixup code to align receive frame. Previously txp(4) always copied Rx frame to align it on 2 byte boundary but its copy overhead is much higher than unaligned access on i386/amd64. Alignment fixup code is now applied only for strict-alignment architectures. With this change i386 and amd64 will get instant Rx performance boost. Typhoon2 datasheet mentions a command that pads arbitrary bytes in Rx buffer but that command does not work. - Nuked pointer trick in descriptor ring. This does not work on sparc64 and replaced it with bcopy. Alternatively txp(4) can embed a 32 bits index value into the descriptor and compute real buffer address but it may make code complicated. - Added endianness support code in various Tx/Rx/command/response descriptor access. With this change txp(4) should work on all architectures. o Added comments for known firmware bugs(Tx checksum offloading, TSO, VLAN stripping and Rx buffer padding control). o Prefer faster memory space register access to I/O space access. Added fall-back mechanism to use alternative I/O space access. The hardware supports both memory and I/O mapped access. Users can still force to use old I/O space access by setting hw.txp.prefer_iomap tunable to 1 in /boot/loader.conf. o Added experimental suspend/resume methods. o Nuke error prone Rx buffer handling code and implemented local buffer management with TAILQ. Be definition the controller can't pass the last received frame to host if no Rx free buffers are available to use as head and tail pointer of Rx descriptor ring can't have the same value. In that case the Rx buffer pointer in Rx buffer ring still holds a valid buffer and txp_rxbuf_reclaim() can't fill Rx buffers as the first buffer is still valid. Instead of relying on the value of Rx buffer ring, introduce local buffer management code to handle empty buffer situation. This should fix a long standing bug which completely hangs the controller under high network load. I could easily trigger the issue by sending 64 bytes UDP frames with netperf. I have no idea how this bugs was not fixed for a long time. o Converted ithread interrupt handler to filter based one. o Rearranged txp_detach routine such that it's now used for general clean-up routine. o Show sleep image version on device attach time. This will help to know what action should be taken depending on sleep image version. The version information in datasheet was wrong for newer NV images so I followed Linux which seems to correctly extract version numbers from response descriptors. o Firmware image is no longer downloaded in device attach time. Now it is reloaded whenever if_init is invoked. This is to ensure correct operation of hardware when something goes wrong. Previously the controller always run without regard to running state of firmware. This change will add additional controller initialization time but it give more robust operation as txp(4) always start off from a known state. The controller is put into sleep state until administrator explicitly up the interface. o As firmware is loaded in if_init handler, it's now possible to implement real watchdog timeout handler. When watchdog timer is expired, full-reset the controller and initialize the hardware again as most other drivers do. While I'm here use our own timer for watchdog instead of using if_watchdog/if_timer interface. o Instead of masking specific interrupts with TXP_IMR register, program TXP_IER register with the interrupts to be raised and use TXP_IMR to toggle interrupt generation. o Implemented txp_wait() to wait a specific state of a controller. o Separate boot related code from txp_download_fw() and name it txp_boot() to handle boot process. o Added bus_barrier(9) to host to ARM communication. o Added endianness to all typhoon command processing. The ARM93C always expects little-endian format of command/data. o Removed __STRICT_ALIGNMENT which is not valid on FreeBSD. __NO_STRICT_ALIGNMENT is provided for that purpose on FreeBSD.
svn commit: r189715 - head/sys/sparc64/conf
Author: yongari Date: Thu Mar 12 01:17:35 2009 New Revision: 189715 URL: http://svn.freebsd.org/changeset/base/189715 Log: Uncomment txp(4), txp(4) should work on all architectures. Modified: head/sys/sparc64/conf/GENERIC Modified: head/sys/sparc64/conf/GENERIC == --- head/sys/sparc64/conf/GENERIC Thu Mar 12 01:14:47 2009 (r189714) +++ head/sys/sparc64/conf/GENERIC Thu Mar 12 01:17:35 2009 (r189715) @@ -165,7 +165,7 @@ device em # Intel PRO/1000 adapter Gig #deviceixgb# Intel PRO/10GbE Ethernet Card device le # AMD Am7900 LANCE and Am79C9xx PCnet device ti # Alteon Networks Tigon I/II gigabit Ethernet -#devicetxp # 3Com 3cR990 (``Typhoon'') +device txp # 3Com 3cR990 (``Typhoon'') #devicevx # 3Com 3c590, 3c595 (``Vortex'') # PCI Ethernet NICs that use the common MII bus controller code. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189716 - head/share/man/man4
Author: yongari Date: Thu Mar 12 01:21:48 2009 New Revision: 189716 URL: http://svn.freebsd.org/changeset/base/189716 Log: Add txp(4) to the list of drivers supporting ALTQ. Modified: head/share/man/man4/altq.4 Modified: head/share/man/man4/altq.4 == --- head/share/man/man4/altq.4 Thu Mar 12 01:17:35 2009(r189715) +++ head/share/man/man4/altq.4 Thu Mar 12 01:21:48 2009(r189716) @@ -25,7 +25,7 @@ .\ .\ $FreeBSD$ .\ -.Dd November 12, 2008 +.Dd March 12, 2009 .Dt ALTQ 4 .Os .Sh NAME @@ -151,6 +151,7 @@ They have been applied to the following .Xr sk 4 , .Xr ste 4 , .Xr stge 4 , +.Xr txp 4 , .Xr udav 4 , .Xr ural 4 , .Xr vge 4 , ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189717 - head/share/man/man4
Author: yongari Date: Thu Mar 12 01:27:15 2009 New Revision: 189717 URL: http://svn.freebsd.org/changeset/base/189717 Log: Xref altq.4 and bump .Dd Modified: head/share/man/man4/txp.4 Modified: head/share/man/man4/txp.4 == --- head/share/man/man4/txp.4 Thu Mar 12 01:21:48 2009(r189716) +++ head/share/man/man4/txp.4 Thu Mar 12 01:27:15 2009(r189717) @@ -26,7 +26,7 @@ .\ .\ $FreeBSD$ .\ -.Dd July 16, 2005 +.Dd March 12, 2009 .Dt TXP 4 .Os .Sh NAME @@ -134,6 +134,7 @@ driver supports the following cards: 3Com 3cR990B-SRV .El .Sh SEE ALSO +.Xr altq 4 , .Xr arp 4 , .Xr inet 4 , .Xr intro 4 , ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189718 - head/sys/dev/usb
Author: thompsa Date: Thu Mar 12 02:32:54 2009 New Revision: 189718 URL: http://svn.freebsd.org/changeset/base/189718 Log: MFp4 //depot/projects/usb 159004,159053,159091 More HID parsing fixes for usb mice. - be less strict on the last HID item usage. - preserve item size and count accross items - improve default HID usage selection. Tested by:ache Submitted by: Hans Petter Selasky Modified: head/sys/dev/usb/usb_hid.c Modified: head/sys/dev/usb/usb_hid.c == --- head/sys/dev/usb/usb_hid.c Thu Mar 12 01:27:15 2009(r189717) +++ head/sys/dev/usb/usb_hid.c Thu Mar 12 02:32:54 2009(r189718) @@ -68,7 +68,10 @@ struct hid_data { struct hid_item cur[MAXPUSH]; int32_t usages_min[MAXUSAGE]; int32_t usages_max[MAXUSAGE]; - int kindset; + int32_t usage_last; /* last seen usage */ + uint32_t loc_size; /* last seen size */ + uint32_t loc_count; /* last seen count */ + uint8_t kindset;/* we have 5 kinds so 8 bits are enough */ uint8_t pushlevel; /* current pushlevel */ uint8_t ncount; /* end usage item count */ uint8_t icount; /* current usage item count */ @@ -181,15 +184,21 @@ hid_get_item(struct hid_data *s, struct top: /* check if there is an array of items */ - if ((s-icount != s-ncount) - (s-iusage != s-nusage)) { - dval = s-usages_min[s-iusage] + s-ousage; - c-usage = dval; - if (dval == s-usages_max[s-iusage]) { - s-iusage ++; - s-ousage = 0; + if (s-icount s-ncount) { + /* get current usage */ + if (s-iusage s-nusage) { + dval = s-usages_min[s-iusage] + s-ousage; + c-usage = dval; + s-usage_last = dval; + if (dval == s-usages_max[s-iusage]) { + s-iusage ++; + s-ousage = 0; + } else { + s-ousage ++; + } } else { - s-ousage ++; + DPRINTFN(1, Using last usage\n); + dval = s-usage_last; } s-icount ++; /* @@ -268,6 +277,9 @@ hid_get_item(struct hid_data *s, struct c-kind = hid_input; c-flags = dval; ret: + c-loc.count = s-loc_count; + c-loc.size = s-loc_size; + if (c-flags HIO_VARIABLE) { /* range check usage count */ if (c-loc.count 255) { @@ -285,13 +297,9 @@ hid_get_item(struct hid_data *s, struct } else { s-ncount = 1; } - /* make sure we have a usage */ - if (s-nusage == 0) { - /* use the undefined HID PAGE */ - s-usages_min[s-nusage] = 0x; - s-usages_max[s-nusage] = 0x; - s-nusage = s-ncount; - } + /* set default usage */ + /* use the undefined HID PAGE */ + s-usage_last = 0; goto top; case 9: /* Output */ @@ -346,7 +354,8 @@ hid_get_item(struct hid_data *s, struct c-unit = dval; break; case 7: - c-loc.size = dval; + /* mask because value is unsigned */ + s-loc_size = dval mask; break; case 8: c-report_ID = dval; @@ -354,12 +363,17 @@ hid_get_item(struct hid_data *s, struct c-loc.pos = 0; break; case 9: - c-loc.count = dval; + /* mask because value is unsigned */ + s-loc_count = dval mask; break; case 10:/* Push */ s-pushlevel ++; if (s-pushlevel MAXPUSH) { s-cur[s-pushlevel] = *c; +
svn commit: r189719 - in head/sys: compat/ndis dev/if_ndis
Author: weongyo Date: Thu Mar 12 02:51:55 2009 New Revision: 189719 URL: http://svn.freebsd.org/changeset/base/189719 Log: o change a lock model based on HAL preemption lock to a normal mtx. Based on the HAL preemption lock there is a problem on SMP machines and causes a panic. o When a device detached the current tactic to detach NDIS USB driver is to call SURPRISE_REMOVED event. So it don't need to call ndis_halt_nic() again. This fixes some page faults when some drivers work abnormal. o it assumes now that URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER is in DISPATCH_LEVEL (non-sleepable) and as further work URB_FUNCTION_VENDOR_XXX and URB_FUNCTION_CLASS_XXX should be. Reviewed by: Hans Petter Selasky hselasky_at_freebsd.org Tested by:Paul B. Mahol onemda_at_gmail.com Modified: head/sys/compat/ndis/hal_var.h head/sys/compat/ndis/subr_hal.c head/sys/compat/ndis/subr_usbd.c head/sys/dev/if_ndis/if_ndis.c head/sys/dev/if_ndis/if_ndis_usb.c head/sys/dev/if_ndis/if_ndisvar.h Modified: head/sys/compat/ndis/hal_var.h == --- head/sys/compat/ndis/hal_var.h Thu Mar 12 02:32:54 2009 (r189718) +++ head/sys/compat/ndis/hal_var.h Thu Mar 12 02:51:55 2009 (r189719) @@ -48,7 +48,6 @@ extern image_patch_table hal_functbl[]; __BEGIN_DECLS extern int hal_libinit(void); extern int hal_libfini(void); -extern struct mtx *hal_getdisplock(void); extern uint8_t KfAcquireSpinLock(kspin_lock *); extern void KfReleaseSpinLock(kspin_lock *, uint8_t); extern uint8_t KfRaiseIrql(uint8_t); Modified: head/sys/compat/ndis/subr_hal.c == --- head/sys/compat/ndis/subr_hal.c Thu Mar 12 02:32:54 2009 (r189718) +++ head/sys/compat/ndis/subr_hal.c Thu Mar 12 02:51:55 2009 (r189719) @@ -124,13 +124,6 @@ hal_libfini() return(0); } -struct mtx * -hal_getdisplock() -{ - - return disp_lock[curthread-td_oncpu]; -} - static void KeStallExecutionProcessor(usecs) uint32_tusecs; Modified: head/sys/compat/ndis/subr_usbd.c == --- head/sys/compat/ndis/subr_usbd.cThu Mar 12 02:32:54 2009 (r189718) +++ head/sys/compat/ndis/subr_usbd.cThu Mar 12 02:51:55 2009 (r189719) @@ -93,6 +93,8 @@ static int32_t usbd_power(device_objec static void usbd_irpcancel(device_object *, irp *); static int32_t usbd_submit_urb(irp *); static int32_t usbd_urb2nt(int32_t); +static void usbd_task(device_object *, void *); +static int32_t usbd_taskadd(irp *, unsigned); static void usbd_xfertask(device_object *, void *); static void dummy(void); @@ -118,6 +120,7 @@ static funcptr usbd_ioinvalid_wrap; static funcptr usbd_pnp_wrap; static funcptr usbd_power_wrap; static funcptr usbd_irpcancel_wrap; +static funcptr usbd_task_wrap; static funcptr usbd_xfertask_wrap; int @@ -144,6 +147,8 @@ usbd_libinit(void) (funcptr *)usbd_power_wrap, 2, WINDRV_WRAP_STDCALL); windrv_wrap((funcptr)usbd_irpcancel, (funcptr *)usbd_irpcancel_wrap, 2, WINDRV_WRAP_STDCALL); + windrv_wrap((funcptr)usbd_task, + (funcptr *)usbd_task_wrap, 2, WINDRV_WRAP_STDCALL); windrv_wrap((funcptr)usbd_xfertask, (funcptr *)usbd_xfertask_wrap, 2, WINDRV_WRAP_STDCALL); @@ -184,6 +189,7 @@ usbd_libfini(void) windrv_unwrap(usbd_pnp_wrap); windrv_unwrap(usbd_power_wrap); windrv_unwrap(usbd_irpcancel_wrap); + windrv_unwrap(usbd_task_wrap); windrv_unwrap(usbd_xfertask_wrap); free(usbd_driver.dro_drivername.us_buf, M_DEVBUF); @@ -417,7 +423,6 @@ usbd_func_getdesc(ip) device_t dev = IRP_NDIS_DEV(ip); struct ndis_softc *sc = device_get_softc(dev); struct usbd_urb_control_descriptor_request *ctldesc; - uint8_t irql; uint16_t actlen; uint32_t len; union usbd_urb *urb; @@ -450,13 +455,13 @@ usbd_func_getdesc(ip) actlen = len; status = USB_ERR_NORMAL_COMPLETION; } else { - KeRaiseIrql(DISPATCH_LEVEL, irql); - status = usb2_req_get_desc(sc-ndisusb_dev, hal_getdisplock(), + NDISUSB_LOCK(sc); + status = usb2_req_get_desc(sc-ndisusb_dev, sc-ndisusb_mtx, actlen, ctldesc-ucd_trans_buf, 2, ctldesc-ucd_trans_buflen, ctldesc-ucd_langid, ctldesc-ucd_desctype, ctldesc-ucd_idx, NDISUSB_GETDESC_MAXRETRIES); - KeLowerIrql(irql); + NDISUSB_UNLOCK(sc); } exit: if (status != USB_ERR_NORMAL_COMPLETION) { @@ -497,11 +502,6 @@ usbd_func_selconf(ip)
svn commit: r189720 - in stable/7: . sys/amd64/conf sys/arm/conf sys/conf sys/dev/ath sys/dev/ath/ath_rate/amrr sys/dev/ath/ath_rate/onoe sys/dev/ath/ath_rate/sample sys/i386/conf sys/modules sys/m...
Author: bms Date: Thu Mar 12 03:09:11 2009 New Revision: 189720 URL: http://svn.freebsd.org/changeset/base/189720 Log: Merge the open source Atheros HAL from HEAD to STABLE. This adds support for the AH_SUPPORT_AR5416 kernel configuration option, and removes the ath_rate* and ath_hal modules. Their kernel options are not however removed -- please see UPDATING. Tested on an IBM/Lenovo T43 and ASUS EeePC 701 in both STA and HostAP modes. Submitted by: sam Deleted: stable/7/sys/modules/ath_hal/ stable/7/sys/modules/ath_rate_amrr/ stable/7/sys/modules/ath_rate_onoe/ stable/7/sys/modules/ath_rate_sample/ Modified: stable/7/UPDATING stable/7/sys/amd64/conf/GENERIC stable/7/sys/amd64/conf/NOTES stable/7/sys/arm/conf/AVILA stable/7/sys/conf/files stable/7/sys/conf/files.amd64 stable/7/sys/conf/files.arm stable/7/sys/conf/files.i386 stable/7/sys/conf/files.pc98 stable/7/sys/conf/files.powerpc stable/7/sys/conf/files.sparc64 stable/7/sys/conf/kern.pre.mk stable/7/sys/conf/options stable/7/sys/dev/ath/ah_osdep.c stable/7/sys/dev/ath/ah_osdep.h stable/7/sys/dev/ath/ath_rate/amrr/amrr.c stable/7/sys/dev/ath/ath_rate/onoe/onoe.c stable/7/sys/dev/ath/ath_rate/sample/sample.c stable/7/sys/dev/ath/if_ath.c stable/7/sys/dev/ath/if_ath_pci.c stable/7/sys/dev/ath/if_athvar.h stable/7/sys/i386/conf/GENERIC stable/7/sys/i386/conf/NOTES stable/7/sys/modules/Makefile stable/7/sys/modules/ath/Makefile stable/7/sys/pc98/conf/GENERIC stable/7/sys/pc98/conf/NOTES stable/7/sys/sparc64/conf/GENERIC Modified: stable/7/UPDATING == --- stable/7/UPDATING Thu Mar 12 02:51:55 2009(r189719) +++ stable/7/UPDATING Thu Mar 12 03:09:11 2009(r189720) @@ -8,6 +8,16 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090312: + The open-source Atheros HAL has been merged from HEAD + to STABLE. + The kernel compile-time option AH_SUPPORT_AR5416 has been + added to support certain newer Atheros parts, particularly + PCI-Express chipsets. + The following modules are no longer available, and should be + removed from MODULES_OVERRIDE and/or loader.conf:- +ath_hal ath_rate_amrr ath_rate_onoe ath_rate_sample + 20090207: ZFS users on amd64 machines with 4GB or more of RAM should reevaluate their need for setting vm.kmem_size_max and Modified: stable/7/sys/amd64/conf/GENERIC == --- stable/7/sys/amd64/conf/GENERIC Thu Mar 12 02:51:55 2009 (r189719) +++ stable/7/sys/amd64/conf/GENERIC Thu Mar 12 03:09:11 2009 (r189720) @@ -242,6 +242,7 @@ device wlan_scan_sta # 802.11 STA mode device an # Aironet 4500/4800 802.11 wireless NICs. device ath # Atheros pci/cardbus NIC's device ath_hal # Atheros HAL (Hardware Access Layer) +optionsAH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors device ath_rate_sample # SampleRate tx rate control for ath device awi # BayStack 660 and others device ral # Ralink Technology RT2500 wireless NICs. Modified: stable/7/sys/amd64/conf/NOTES == --- stable/7/sys/amd64/conf/NOTES Thu Mar 12 02:51:55 2009 (r189719) +++ stable/7/sys/amd64/conf/NOTES Thu Mar 12 03:09:11 2009 (r189720) @@ -331,6 +331,7 @@ device wpi device ath device ath_hal # Atheros HAL (includes binary component) +optionsAH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors #deviceath_rate_amrr # AMRR rate control for ath driver #deviceath_rate_onoe # Onoe rate control for ath driver device ath_rate_sample # SampleRate rate control for the ath driver Modified: stable/7/sys/arm/conf/AVILA == --- stable/7/sys/arm/conf/AVILA Thu Mar 12 02:51:55 2009(r189719) +++ stable/7/sys/arm/conf/AVILA Thu Mar 12 03:09:11 2009(r189720) @@ -133,6 +133,7 @@ device wlan# 802.11 support #devicewlan_tkip # 802.11 TKIP support device ath # Atheros pci/cardbus NIC's device ath_hal # Atheros HAL (Hardware Access Layer) +optionsAH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors device ath_rate_sample # SampleRate tx rate control for ath optionsATH_DEBUG Modified: stable/7/sys/conf/files == --- stable/7/sys/conf/files
Re: svn commit: r189707 - in head: sys/kern sys/sys usr.bin/kdump usr.bin/ktrace
John Baldwin wrote: Log: Add a new type of KTRACE record for sysctl(3) invocations. It uses the internal sysctl_sysctl_name() handler to map the MIB array to a string name and logs this name in the trace log. This can be useful to see exactly which sysctls a thread is invoking. This is really cool! ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r189721 - head/lib/libelf
Author: obrien Date: Thu Mar 12 04:44:09 2009 New Revision: 189721 URL: http://svn.freebsd.org/changeset/base/189721 Log: Don't need to set symbol, default value is OK. Modified: head/lib/libelf/Makefile Modified: head/lib/libelf/Makefile == --- head/lib/libelf/MakefileThu Mar 12 03:09:11 2009(r189720) +++ head/lib/libelf/MakefileThu Mar 12 04:44:09 2009(r189721) @@ -148,7 +148,7 @@ VERSION_MAP=${.CURDIR}/Version.map LIBELF_TEST_HOOKS?=1 .if defined(LIBELF_TEST_HOOKS) (${LIBELF_TEST_HOOKS} 0) -CFLAGS+= -DLIBELF_TEST_HOOKS=1 +CFLAGS+= -DLIBELF_TEST_HOOKS .endif libelf_convert.c: elf_types.m4 libelf_convert.m4 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org