From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00:12:02 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A93210656BD; Sun, 4 Jan 2009 00:12:02 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 850918FC16; Sun, 4 Jan 2009 00:12:02 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n040C2ii040930; Sun, 4 Jan 2009 00:12:02 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n040C2gH040928; Sun, 4 Jan 2009 00:12:02 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <200901040012.n040C2gH040928@svn.freebsd.org> From: Alfred Perlstein Date: Sun, 4 Jan 2009 00:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 00:12:03 -0000 Author: alfred Date: Sun Jan 4 00:12:01 2009 New Revision: 186730 URL: http://svn.freebsd.org/changeset/base/186730 Log: Sync with usb4bsd: src/lib/libusb20/libusb20_desc.c Make "libusb20_desc_foreach()" more readable. src/sys/dev/usb2/controller/*.[ch] src/sys/dev/usb2/core/*.[ch] Implement support for USB power save for all HC's. Implement support for Big-endian EHCI. Move Huawei quirks back into "u3g" driver. Improve device enumeration. src/sys/dev/usb2/ethernet/*[ch] Patches for supporting new AXE Gigabit chipset. src/sys/dev/usb2/serial/*[ch] Fix IOCTL return code. src/sys/dev/usb2/wlan/*[ch] Sync with old USB stack. Submitted by: hps Added: head/sys/modules/usb2/serial_3g/ head/sys/modules/usb2/serial_3g/Makefile (contents, props changed) Modified: head/lib/libusb20/libusb20_desc.c head/sys/dev/usb2/controller/at91dci.c head/sys/dev/usb2/controller/ehci2.c head/sys/dev/usb2/controller/ehci2.h head/sys/dev/usb2/controller/musb2_otg.c head/sys/dev/usb2/controller/ohci2.c head/sys/dev/usb2/controller/uhci2.c head/sys/dev/usb2/controller/uhci2.h head/sys/dev/usb2/controller/usb2_bus.h head/sys/dev/usb2/controller/usb2_controller.c head/sys/dev/usb2/controller/usb2_controller.h head/sys/dev/usb2/controller/uss820dci.c head/sys/dev/usb2/core/usb2_busdma.c head/sys/dev/usb2/core/usb2_core.h head/sys/dev/usb2/core/usb2_device.c head/sys/dev/usb2/core/usb2_device.h head/sys/dev/usb2/core/usb2_dynamic.c head/sys/dev/usb2/core/usb2_dynamic.h head/sys/dev/usb2/core/usb2_generic.c head/sys/dev/usb2/core/usb2_handle_request.c head/sys/dev/usb2/core/usb2_hub.c head/sys/dev/usb2/core/usb2_hub.h head/sys/dev/usb2/core/usb2_msctest.c head/sys/dev/usb2/core/usb2_msctest.h head/sys/dev/usb2/core/usb2_request.c head/sys/dev/usb2/core/usb2_request.h head/sys/dev/usb2/core/usb2_transfer.c head/sys/dev/usb2/core/usb2_transfer.h head/sys/dev/usb2/ethernet/if_axe2.c head/sys/dev/usb2/ethernet/if_axe2_reg.h head/sys/dev/usb2/image/uscanner2.c head/sys/dev/usb2/include/usb2_devid.h head/sys/dev/usb2/include/usb2_devtable.h head/sys/dev/usb2/include/usb2_ioctl.h head/sys/dev/usb2/include/usb2_standard.h head/sys/dev/usb2/serial/u3g2.c head/sys/dev/usb2/serial/uchcom2.c head/sys/dev/usb2/serial/uftdi2.c head/sys/dev/usb2/serial/uplcom2.c head/sys/dev/usb2/serial/uvscom2.c head/sys/dev/usb2/sound/uaudio2.c head/sys/dev/usb2/storage/umass2.c head/sys/dev/usb2/storage/ustorage2_fs.c head/sys/dev/usb2/wlan/if_ural2.c head/sys/dev/usb2/wlan/if_zyd2.c head/sys/dev/usb2/wlan/if_zyd2_reg.h head/sys/modules/usb2/Makefile Modified: head/lib/libusb20/libusb20_desc.c ============================================================================== --- head/lib/libusb20/libusb20_desc.c Sat Jan 3 22:51:54 2009 (r186729) +++ head/lib/libusb20/libusb20_desc.c Sun Jan 4 00:12:01 2009 (r186730) @@ -238,23 +238,37 @@ const uint8_t * libusb20_desc_foreach(const struct libusb20_me_struct *pdesc, const uint8_t *psubdesc) { - const void *end; + const uint8_t *start; + const uint8_t *end; + const uint8_t *desc_next; - if (pdesc == NULL) { + /* be NULL safe */ + if (pdesc == NULL) return (NULL); - } - end = LIBUSB20_ADD_BYTES(pdesc->ptr, pdesc->len); - if (psubdesc == NULL) { - psubdesc = LIBUSB20_ADD_BYTES(pdesc->ptr, 0); - } else { - psubdesc = LIBUSB20_ADD_BYTES(psubdesc, psubdesc[0]); - } - return (((((const void *)psubdesc) >= ((void *)(pdesc->ptr))) && - (((const void *)psubdesc) < end) && - (LIBUSB20_ADD_BYTES(psubdesc, psubdesc[0]) >= ((void *)(pdesc->ptr))) && - (LIBUSB20_ADD_BYTES(psubdesc, psubdesc[0]) <= end) && - (psubdesc[0] >= 3)) ? psubdesc : NULL); + start = (const uint8_t *)pdesc->ptr; + end = LIBUSB20_ADD_BYTES(start, pdesc->len); + + /* get start of next descriptor */ + if (psubdesc == NULL) + psubdesc = start; + else + psubdesc = psubdesc + psubdesc[0]; + + /* check that the next USB descriptor is within the range */ + if ((psubdesc < start) || (psubdesc >= end)) + return (NULL); /* out of range, or EOD */ + + /* check start of the second next USB descriptor, if any */ + desc_next = psubdesc + psubdesc[0]; + if ((desc_next < start) || (desc_next > end)) + return (NULL); /* out of range */ + + /* check minimum descriptor length */ + if (psubdesc[0] < 3) + return (NULL); /* too short descriptor */ + + return (psubdesc); /* return start of next descriptor */ } /*------------------------------------------------------------------------* Modified: head/sys/dev/usb2/controller/at91dci.c ============================================================================== --- head/sys/dev/usb2/controller/at91dci.c Sat Jan 3 22:51:54 2009 (r186729) +++ head/sys/dev/usb2/controller/at91dci.c Sun Jan 4 00:12:01 2009 (r186730) @@ -261,42 +261,28 @@ at91dci_pull_down(struct at91dci_softc * } static void -at91dci_wakeup_peer(struct at91dci_softc *sc) +at91dci_wakeup_peer(struct usb2_xfer *xfer) { - uint32_t temp; + struct at91dci_softc *sc = xfer->usb2_sc; + uint8_t use_polling; if (!(sc->sc_flags.status_suspend)) { return; } - temp = AT91_UDP_READ_4(sc, AT91_UDP_GSTATE); - - if (!(temp & AT91_UDP_GSTATE_ESR)) { - return; - } - AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, temp); -} - -static void -at91dci_rem_wakeup_set(struct usb2_device *udev, uint8_t is_on) -{ - struct at91dci_softc *sc; - uint32_t temp; - - DPRINTFN(5, "is_on=%u\n", is_on); - - USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); - - sc = AT9100_DCI_BUS2SC(udev->bus); + use_polling = mtx_owned(xfer->xfer_mtx) ? 1 : 0; - temp = AT91_UDP_READ_4(sc, AT91_UDP_GSTATE); + AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, AT91_UDP_GSTATE_ESR); - if (is_on) { - temp |= AT91_UDP_GSTATE_ESR; + /* wait 8 milliseconds */ + if (use_polling) { + /* polling */ + DELAY(8000); } else { - temp &= ~AT91_UDP_GSTATE_ESR; + /* Wait for reset to complete. */ + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 8); } - AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, temp); + AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, 0); } static void @@ -2120,7 +2106,7 @@ tr_handle_clear_port_feature: switch (value) { case UHF_PORT_SUSPEND: - at91dci_wakeup_peer(sc); + at91dci_wakeup_peer(xfer); break; case UHF_PORT_ENABLE: @@ -2492,5 +2478,4 @@ struct usb2_bus_methods at91dci_bus_meth .set_stall = &at91dci_set_stall, .clear_stall = &at91dci_clear_stall, .vbus_interrupt = &at91dci_vbus_interrupt, - .rem_wakeup_set = &at91dci_rem_wakeup_set, }; Modified: head/sys/dev/usb2/controller/ehci2.c ============================================================================== --- head/sys/dev/usb2/controller/ehci2.c Sat Jan 3 22:51:54 2009 (r186729) +++ head/sys/dev/usb2/controller/ehci2.c Sun Jan 4 00:12:01 2009 (r186730) @@ -84,7 +84,7 @@ SYSCTL_INT(_hw_usb2_ehci, OID_AUTO, no_h &ehcinohighspeed, 0, "Disable High Speed USB"); static void ehci_dump_regs(ehci_softc_t *sc); -static void ehci_dump_sqh(ehci_qh_t *sqh); +static void ehci_dump_sqh(ehci_softc_t *sc, ehci_qh_t *sqh); #endif @@ -101,7 +101,7 @@ extern struct usb2_pipe_methods ehci_roo static usb2_config_td_command_t ehci_root_ctrl_task; static void ehci_do_poll(struct usb2_bus *bus); -static void ehci_root_ctrl_poll(struct ehci_softc *sc); +static void ehci_root_ctrl_poll(ehci_softc_t *sc); static void ehci_device_done(struct usb2_xfer *xfer, usb2_error_t error); static uint8_t ehci_check_transfer(struct usb2_xfer *xfer); static void ehci_timeout(void *arg); @@ -110,6 +110,7 @@ static usb2_sw_transfer_func_t ehci_root static usb2_sw_transfer_func_t ehci_root_ctrl_done; struct ehci_std_temp { + ehci_softc_t *sc; struct usb2_page_cache *pc; ehci_qtd_t *td; ehci_qtd_t *td_next; @@ -123,10 +124,27 @@ struct ehci_std_temp { uint8_t short_frames_ok; }; +/* + * Byte-order conversion functions. + */ +static uint32_t +htoehci32(ehci_softc_t *sc, const uint32_t v) +{ + return ((sc->sc_flags & EHCI_SCFLG_BIGEDESC) ? + htobe32(v) : htole32(v)); +} + +static uint32_t +ehci32toh(ehci_softc_t *sc, const uint32_t v) +{ + return ((sc->sc_flags & EHCI_SCFLG_BIGEDESC) ? + be32toh(v) : le32toh(v)); +} + void ehci_iterate_hw_softc(struct usb2_bus *bus, usb2_bus_mem_sub_cb_t *cb) { - struct ehci_softc *sc = EHCI_BUS2SC(bus); + ehci_softc_t *sc = EHCI_BUS2SC(bus); uint32_t i; cb(bus, &sc->sc_hw.pframes_pc, &sc->sc_hw.pframes_pg, @@ -280,21 +298,21 @@ ehci_init(ehci_softc_t *sc) sc->sc_intr_p_last[i] = qh; qh->qh_self = - htole32(buf_res.physaddr) | - htole32(EHCI_LINK_QH); + htoehci32(sc, buf_res.physaddr) | + htoehci32(sc, EHCI_LINK_QH); qh->qh_endp = - htole32(EHCI_QH_SET_EPS(EHCI_QH_SPEED_HIGH)); + htoehci32(sc, EHCI_QH_SET_EPS(EHCI_QH_SPEED_HIGH)); qh->qh_endphub = - htole32(EHCI_QH_SET_MULT(1)); + htoehci32(sc, EHCI_QH_SET_MULT(1)); qh->qh_curqtd = 0; qh->qh_qtd.qtd_next = - htole32(EHCI_LINK_TERMINATE); + htoehci32(sc, EHCI_LINK_TERMINATE); qh->qh_qtd.qtd_altnext = - htole32(EHCI_LINK_TERMINATE); + htoehci32(sc, EHCI_LINK_TERMINATE); qh->qh_qtd.qtd_status = - htole32(EHCI_QTD_HALTED); + htoehci32(sc, EHCI_QTD_HALTED); } /* @@ -329,7 +347,7 @@ ehci_init(ehci_softc_t *sc) qh = sc->sc_intr_p_last[0]; /* the last (1ms) QH terminates */ - qh->qh_link = htole32(EHCI_LINK_TERMINATE); + qh->qh_link = htoehci32(sc, EHCI_LINK_TERMINATE); } for (i = 0; i < EHCI_VIRTUAL_FRAMELIST_COUNT; i++) { ehci_sitd_t *sitd; @@ -350,11 +368,11 @@ ehci_init(ehci_softc_t *sc) /* initialize full speed isochronous */ sitd->sitd_self = - htole32(buf_res.physaddr) | - htole32(EHCI_LINK_SITD); + htoehci32(sc, buf_res.physaddr) | + htoehci32(sc, EHCI_LINK_SITD); sitd->sitd_back = - htole32(EHCI_LINK_TERMINATE); + htoehci32(sc, EHCI_LINK_TERMINATE); sitd->sitd_next = sc->sc_intr_p_last[i | (EHCI_VIRTUAL_FRAMELIST_COUNT / 2)]->qh_self; @@ -375,8 +393,8 @@ ehci_init(ehci_softc_t *sc) /* initialize high speed isochronous */ itd->itd_self = - htole32(buf_res.physaddr) | - htole32(EHCI_LINK_ITD); + htoehci32(sc, buf_res.physaddr) | + htoehci32(sc, EHCI_LINK_ITD); itd->itd_next = sitd->sitd_self; @@ -421,20 +439,20 @@ ehci_init(ehci_softc_t *sc) /* init dummy QH that starts the async list */ qh->qh_self = - htole32(buf_res.physaddr) | - htole32(EHCI_LINK_QH); + htoehci32(sc, buf_res.physaddr) | + htoehci32(sc, EHCI_LINK_QH); /* fill the QH */ qh->qh_endp = - htole32(EHCI_QH_SET_EPS(EHCI_QH_SPEED_HIGH) | EHCI_QH_HRECL); - qh->qh_endphub = htole32(EHCI_QH_SET_MULT(1)); + htoehci32(sc, EHCI_QH_SET_EPS(EHCI_QH_SPEED_HIGH) | EHCI_QH_HRECL); + qh->qh_endphub = htoehci32(sc, EHCI_QH_SET_MULT(1)); qh->qh_link = qh->qh_self; qh->qh_curqtd = 0; /* fill the overlay qTD */ - qh->qh_qtd.qtd_next = htole32(EHCI_LINK_TERMINATE); - qh->qh_qtd.qtd_altnext = htole32(EHCI_LINK_TERMINATE); - qh->qh_qtd.qtd_status = htole32(EHCI_QTD_HALTED); + qh->qh_qtd.qtd_next = htoehci32(sc, EHCI_LINK_TERMINATE); + qh->qh_qtd.qtd_altnext = htoehci32(sc, EHCI_LINK_TERMINATE); + qh->qh_qtd.qtd_status = htoehci32(sc, EHCI_QTD_HALTED); } /* flush all cache into memory */ @@ -442,7 +460,7 @@ ehci_init(ehci_softc_t *sc) #if USB_DEBUG if (ehcidebug) { - ehci_dump_sqh(sc->sc_async_p_last); + ehci_dump_sqh(sc, sc->sc_async_p_last); } #endif @@ -490,7 +508,7 @@ done: * shut down the controller when the system is going down */ void -ehci_detach(struct ehci_softc *sc) +ehci_detach(ehci_softc_t *sc) { USB_BUS_LOCK(&sc->sc_bus); @@ -510,7 +528,7 @@ ehci_detach(struct ehci_softc *sc) } void -ehci_suspend(struct ehci_softc *sc) +ehci_suspend(ehci_softc_t *sc) { uint32_t cmd; uint32_t hcr; @@ -564,7 +582,7 @@ ehci_suspend(struct ehci_softc *sc) } void -ehci_resume(struct ehci_softc *sc) +ehci_resume(ehci_softc_t *sc) { struct usb2_page_search buf_res; uint32_t cmd; @@ -723,9 +741,9 @@ ehci_dump_regs(ehci_softc_t *sc) } static void -ehci_dump_link(uint32_t link, int type) +ehci_dump_link(ehci_softc_t *sc, uint32_t link, int type) { - link = le32toh(link); + link = ehci32toh(sc, link); printf("0x%08x", link); if (link & EHCI_LINK_TERMINATE) printf(""); @@ -752,16 +770,16 @@ ehci_dump_link(uint32_t link, int type) } static void -ehci_dump_qtd(ehci_qtd_t *qtd) +ehci_dump_qtd(ehci_softc_t *sc, ehci_qtd_t *qtd) { uint32_t s; printf(" next="); - ehci_dump_link(qtd->qtd_next, 0); + ehci_dump_link(sc, qtd->qtd_next, 0); printf(" altnext="); - ehci_dump_link(qtd->qtd_altnext, 0); + ehci_dump_link(sc, qtd->qtd_altnext, 0); printf("\n"); - s = le32toh(qtd->qtd_status); + s = ehci32toh(sc, qtd->qtd_status); printf(" status=0x%08x: toggle=%d bytes=0x%x ioc=%d c_page=0x%x\n", s, EHCI_QTD_GET_TOGGLE(s), EHCI_QTD_GET_BYTES(s), EHCI_QTD_GET_IOC(s), EHCI_QTD_GET_C_PAGE(s)); @@ -778,35 +796,35 @@ ehci_dump_qtd(ehci_qtd_t *qtd) for (s = 0; s < 5; s++) { printf(" buffer[%d]=0x%08x\n", s, - le32toh(qtd->qtd_buffer[s])); + ehci32toh(sc, qtd->qtd_buffer[s])); } for (s = 0; s < 5; s++) { printf(" buffer_hi[%d]=0x%08x\n", s, - le32toh(qtd->qtd_buffer_hi[s])); + ehci32toh(sc, qtd->qtd_buffer_hi[s])); } } static uint8_t -ehci_dump_sqtd(ehci_qtd_t *sqtd) +ehci_dump_sqtd(ehci_softc_t *sc, ehci_qtd_t *sqtd) { uint8_t temp; usb2_pc_cpu_invalidate(sqtd->page_cache); - printf("QTD(%p) at 0x%08x:\n", sqtd, le32toh(sqtd->qtd_self)); - ehci_dump_qtd(sqtd); - temp = (sqtd->qtd_next & htole32(EHCI_LINK_TERMINATE)) ? 1 : 0; + printf("QTD(%p) at 0x%08x:\n", sqtd, ehci32toh(sc, sqtd->qtd_self)); + ehci_dump_qtd(sc, sqtd); + temp = (sqtd->qtd_next & htoehci32(sc, EHCI_LINK_TERMINATE)) ? 1 : 0; return (temp); } static void -ehci_dump_sqtds(ehci_qtd_t *sqtd) +ehci_dump_sqtds(ehci_softc_t *sc, ehci_qtd_t *sqtd) { uint16_t i; uint8_t stop; stop = 0; for (i = 0; sqtd && (i < 20) && !stop; sqtd = sqtd->obj_next, i++) { - stop = ehci_dump_sqtd(sqtd); + stop = ehci_dump_sqtd(sc, sqtd); } if (sqtd) { printf("dump aborted, too many TDs\n"); @@ -814,16 +832,17 @@ ehci_dump_sqtds(ehci_qtd_t *sqtd) } static void -ehci_dump_sqh(ehci_qh_t *qh) +ehci_dump_sqh(ehci_softc_t *sc, ehci_qh_t *qh) { - uint32_t endp, endphub; + uint32_t endp; + uint32_t endphub; usb2_pc_cpu_invalidate(qh->page_cache); - printf("QH(%p) at 0x%08x:\n", qh, le32toh(qh->qh_self) & ~0x1F); + printf("QH(%p) at 0x%08x:\n", qh, ehci32toh(sc, qh->qh_self) & ~0x1F); printf(" link="); - ehci_dump_link(qh->qh_link, 1); + ehci_dump_link(sc, qh->qh_link, 1); printf("\n"); - endp = le32toh(qh->qh_endp); + endp = ehci32toh(sc, qh->qh_endp); printf(" endp=0x%08x\n", endp); printf(" addr=0x%02x inact=%d endpt=%d eps=%d dtc=%d hrecl=%d\n", EHCI_QH_GET_ADDR(endp), EHCI_QH_GET_INACT(endp), @@ -832,90 +851,90 @@ ehci_dump_sqh(ehci_qh_t *qh) printf(" mpl=0x%x ctl=%d nrl=%d\n", EHCI_QH_GET_MPL(endp), EHCI_QH_GET_CTL(endp), EHCI_QH_GET_NRL(endp)); - endphub = le32toh(qh->qh_endphub); + endphub = ehci32toh(sc, qh->qh_endphub); printf(" endphub=0x%08x\n", endphub); printf(" smask=0x%02x cmask=0x%02x huba=0x%02x port=%d mult=%d\n", EHCI_QH_GET_SMASK(endphub), EHCI_QH_GET_CMASK(endphub), EHCI_QH_GET_HUBA(endphub), EHCI_QH_GET_PORT(endphub), EHCI_QH_GET_MULT(endphub)); printf(" curqtd="); - ehci_dump_link(qh->qh_curqtd, 0); + ehci_dump_link(sc, qh->qh_curqtd, 0); printf("\n"); printf("Overlay qTD:\n"); - ehci_dump_qtd((void *)&qh->qh_qtd); + ehci_dump_qtd(sc, (void *)&qh->qh_qtd); } static void -ehci_dump_sitd(ehci_sitd_t *sitd) +ehci_dump_sitd(ehci_softc_t *sc, ehci_sitd_t *sitd) { usb2_pc_cpu_invalidate(sitd->page_cache); - printf("SITD(%p) at 0x%08x\n", sitd, le32toh(sitd->sitd_self) & ~0x1F); - printf(" next=0x%08x\n", le32toh(sitd->sitd_next)); + printf("SITD(%p) at 0x%08x\n", sitd, ehci32toh(sc, sitd->sitd_self) & ~0x1F); + printf(" next=0x%08x\n", ehci32toh(sc, sitd->sitd_next)); printf(" portaddr=0x%08x dir=%s addr=%d endpt=0x%x port=0x%x huba=0x%x\n", - le32toh(sitd->sitd_portaddr), - (sitd->sitd_portaddr & htole32(EHCI_SITD_SET_DIR_IN)) + ehci32toh(sc, sitd->sitd_portaddr), + (sitd->sitd_portaddr & htoehci32(sc, EHCI_SITD_SET_DIR_IN)) ? "in" : "out", - EHCI_SITD_GET_ADDR(le32toh(sitd->sitd_portaddr)), - EHCI_SITD_GET_ENDPT(le32toh(sitd->sitd_portaddr)), - EHCI_SITD_GET_PORT(le32toh(sitd->sitd_portaddr)), - EHCI_SITD_GET_HUBA(le32toh(sitd->sitd_portaddr))); - printf(" mask=0x%08x\n", le32toh(sitd->sitd_mask)); - printf(" status=0x%08x <%s> len=0x%x\n", le32toh(sitd->sitd_status), - (sitd->sitd_status & htole32(EHCI_SITD_ACTIVE)) ? "ACTIVE" : "", - EHCI_SITD_GET_LEN(le32toh(sitd->sitd_status))); + EHCI_SITD_GET_ADDR(ehci32toh(sc, sitd->sitd_portaddr)), + EHCI_SITD_GET_ENDPT(ehci32toh(sc, sitd->sitd_portaddr)), + EHCI_SITD_GET_PORT(ehci32toh(sc, sitd->sitd_portaddr)), + EHCI_SITD_GET_HUBA(ehci32toh(sc, sitd->sitd_portaddr))); + printf(" mask=0x%08x\n", ehci32toh(sc, sitd->sitd_mask)); + printf(" status=0x%08x <%s> len=0x%x\n", ehci32toh(sc, sitd->sitd_status), + (sitd->sitd_status & htoehci32(sc, EHCI_SITD_ACTIVE)) ? "ACTIVE" : "", + EHCI_SITD_GET_LEN(ehci32toh(sc, sitd->sitd_status))); printf(" back=0x%08x, bp=0x%08x,0x%08x,0x%08x,0x%08x\n", - le32toh(sitd->sitd_back), - le32toh(sitd->sitd_bp[0]), - le32toh(sitd->sitd_bp[1]), - le32toh(sitd->sitd_bp_hi[0]), - le32toh(sitd->sitd_bp_hi[1])); + ehci32toh(sc, sitd->sitd_back), + ehci32toh(sc, sitd->sitd_bp[0]), + ehci32toh(sc, sitd->sitd_bp[1]), + ehci32toh(sc, sitd->sitd_bp_hi[0]), + ehci32toh(sc, sitd->sitd_bp_hi[1])); } static void -ehci_dump_itd(ehci_itd_t *itd) +ehci_dump_itd(ehci_softc_t *sc, ehci_itd_t *itd) { usb2_pc_cpu_invalidate(itd->page_cache); - printf("ITD(%p) at 0x%08x\n", itd, le32toh(itd->itd_self) & ~0x1F); - printf(" next=0x%08x\n", le32toh(itd->itd_next)); - printf(" status[0]=0x%08x; <%s>\n", le32toh(itd->itd_status[0]), - (itd->itd_status[0] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[1]=0x%08x; <%s>\n", le32toh(itd->itd_status[1]), - (itd->itd_status[1] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[2]=0x%08x; <%s>\n", le32toh(itd->itd_status[2]), - (itd->itd_status[2] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[3]=0x%08x; <%s>\n", le32toh(itd->itd_status[3]), - (itd->itd_status[3] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[4]=0x%08x; <%s>\n", le32toh(itd->itd_status[4]), - (itd->itd_status[4] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[5]=0x%08x; <%s>\n", le32toh(itd->itd_status[5]), - (itd->itd_status[5] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[6]=0x%08x; <%s>\n", le32toh(itd->itd_status[6]), - (itd->itd_status[6] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[7]=0x%08x; <%s>\n", le32toh(itd->itd_status[7]), - (itd->itd_status[7] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" bp[0]=0x%08x\n", le32toh(itd->itd_bp[0])); + printf("ITD(%p) at 0x%08x\n", itd, ehci32toh(sc, itd->itd_self) & ~0x1F); + printf(" next=0x%08x\n", ehci32toh(sc, itd->itd_next)); + printf(" status[0]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[0]), + (itd->itd_status[0] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[1]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[1]), + (itd->itd_status[1] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[2]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[2]), + (itd->itd_status[2] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[3]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[3]), + (itd->itd_status[3] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[4]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[4]), + (itd->itd_status[4] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[5]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[5]), + (itd->itd_status[5] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[6]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[6]), + (itd->itd_status[6] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[7]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[7]), + (itd->itd_status[7] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" bp[0]=0x%08x\n", ehci32toh(sc, itd->itd_bp[0])); printf(" addr=0x%02x; endpt=0x%01x\n", - EHCI_ITD_GET_ADDR(le32toh(itd->itd_bp[0])), - EHCI_ITD_GET_ENDPT(le32toh(itd->itd_bp[0]))); - printf(" bp[1]=0x%08x\n", le32toh(itd->itd_bp[1])); + EHCI_ITD_GET_ADDR(ehci32toh(sc, itd->itd_bp[0])), + EHCI_ITD_GET_ENDPT(ehci32toh(sc, itd->itd_bp[0]))); + printf(" bp[1]=0x%08x\n", ehci32toh(sc, itd->itd_bp[1])); printf(" dir=%s; mpl=0x%02x\n", - (le32toh(itd->itd_bp[1]) & EHCI_ITD_SET_DIR_IN) ? "in" : "out", - EHCI_ITD_GET_MPL(le32toh(itd->itd_bp[1]))); + (ehci32toh(sc, itd->itd_bp[1]) & EHCI_ITD_SET_DIR_IN) ? "in" : "out", + EHCI_ITD_GET_MPL(ehci32toh(sc, itd->itd_bp[1]))); printf(" bp[2..6]=0x%08x,0x%08x,0x%08x,0x%08x,0x%08x\n", - le32toh(itd->itd_bp[2]), - le32toh(itd->itd_bp[3]), - le32toh(itd->itd_bp[4]), - le32toh(itd->itd_bp[5]), - le32toh(itd->itd_bp[6])); + ehci32toh(sc, itd->itd_bp[2]), + ehci32toh(sc, itd->itd_bp[3]), + ehci32toh(sc, itd->itd_bp[4]), + ehci32toh(sc, itd->itd_bp[5]), + ehci32toh(sc, itd->itd_bp[6])); printf(" bp_hi=0x%08x,0x%08x,0x%08x,0x%08x,\n" " 0x%08x,0x%08x,0x%08x\n", - le32toh(itd->itd_bp_hi[0]), - le32toh(itd->itd_bp_hi[1]), - le32toh(itd->itd_bp_hi[2]), - le32toh(itd->itd_bp_hi[3]), - le32toh(itd->itd_bp_hi[4]), - le32toh(itd->itd_bp_hi[5]), - le32toh(itd->itd_bp_hi[6])); + ehci32toh(sc, itd->itd_bp_hi[0]), + ehci32toh(sc, itd->itd_bp_hi[1]), + ehci32toh(sc, itd->itd_bp_hi[2]), + ehci32toh(sc, itd->itd_bp_hi[3]), + ehci32toh(sc, itd->itd_bp_hi[4]), + ehci32toh(sc, itd->itd_bp_hi[5]), + ehci32toh(sc, itd->itd_bp_hi[6])); } static void @@ -936,12 +955,12 @@ ehci_dump_isoc(ehci_softc_t *sc) sitd = sc->sc_isoc_fs_p_last[pos]; while (itd && max && max--) { - ehci_dump_itd(itd); + ehci_dump_itd(sc, itd); itd = itd->prev; } while (sitd && max && max--) { - ehci_dump_sitd(sitd); + ehci_dump_sitd(sc, sitd); sitd = sitd->prev; } } @@ -1022,6 +1041,11 @@ _ehci_append_qh(ehci_qh_t *sqh, ehci_qh_ { DPRINTFN(11, "%p to %p\n", sqh, last); + if (sqh->prev != NULL) { + /* should not happen */ + DPRINTFN(0, "QH already linked!\n"); + return (last); + } /* (sc->sc_bus.mtx) must be locked */ sqh->next = last->next; @@ -1040,12 +1064,6 @@ _ehci_append_qh(ehci_qh_t *sqh, ehci_qh_ usb2_pc_cpu_flush(last->page_cache); -#if USB_DEBUG - if (ehcidebug > 5) { - printf("%s:\n", __FUNCTION__); - ehci_dump_sqh(sqh); - } -#endif return (sqh); } @@ -1109,14 +1127,6 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_ sqh->next->prev = sqh->prev; usb2_pc_cpu_flush(sqh->next->page_cache); } - /* - * set the Terminate-bit in the e_next of the QH, in case - * the transferred packet was short so that the QH still - * points at the last used TD - */ - - sqh->qh_qtd.qtd_next = htole32(EHCI_LINK_TERMINATE); - last = ((last == sqh) ? sqh->prev : last); sqh->prev = 0; @@ -1129,6 +1139,7 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_ static usb2_error_t ehci_non_isoc_done_sub(struct usb2_xfer *xfer) { + ehci_softc_t *sc = xfer->usb2_sc; ehci_qtd_t *td; ehci_qtd_t *td_alt_next; uint32_t status; @@ -1140,7 +1151,7 @@ ehci_non_isoc_done_sub(struct usb2_xfer while (1) { usb2_pc_cpu_invalidate(td->page_cache); - status = le32toh(td->qtd_status); + status = ehci32toh(sc, td->qtd_status); len = EHCI_QTD_GET_BYTES(status); @@ -1232,7 +1243,9 @@ ehci_non_isoc_done(struct usb2_xfer *xfe #if USB_DEBUG if (ehcidebug > 10) { - ehci_dump_sqtds(xfer->td_transfer_first); + ehci_softc_t *sc = xfer->usb2_sc; + + ehci_dump_sqtds(sc, xfer->td_transfer_first); } #endif @@ -1282,6 +1295,7 @@ static uint8_t ehci_check_transfer(struct usb2_xfer *xfer) { struct usb2_pipe_methods *methods = xfer->pipe->methods; + ehci_softc_t *sc = xfer->usb2_sc; uint32_t status; @@ -1294,13 +1308,13 @@ ehci_check_transfer(struct usb2_xfer *xf td = xfer->td_transfer_last; usb2_pc_cpu_invalidate(td->page_cache); - status = le32toh(td->sitd_status); + status = ehci32toh(sc, td->sitd_status); /* also check if first is complete */ td = xfer->td_transfer_first; usb2_pc_cpu_invalidate(td->page_cache); - status |= le32toh(td->sitd_status); + status |= ehci32toh(sc, td->sitd_status); if (!(status & EHCI_SITD_ACTIVE)) { ehci_device_done(xfer, USB_ERR_NORMAL_COMPLETION); @@ -1329,7 +1343,7 @@ ehci_check_transfer(struct usb2_xfer *xf td->itd_status[6] | td->itd_status[7]; /* if no transactions are active we continue */ - if (!(status & htole32(EHCI_ITD_ACTIVE))) { + if (!(status & htoehci32(sc, EHCI_ITD_ACTIVE))) { ehci_device_done(xfer, USB_ERR_NORMAL_COMPLETION); goto transferred; } @@ -1346,7 +1360,7 @@ ehci_check_transfer(struct usb2_xfer *xf while (1) { usb2_pc_cpu_invalidate(td->page_cache); - status = le32toh(td->qtd_status); + status = ehci32toh(sc, td->qtd_status); /* * if there is an active TD the transfer isn't done @@ -1520,7 +1534,7 @@ ehci_timeout(void *arg) static void ehci_do_poll(struct usb2_bus *bus) { - struct ehci_softc *sc = EHCI_BUS2SC(bus); + ehci_softc_t *sc = EHCI_BUS2SC(bus); USB_BUS_LOCK(&sc->sc_bus); ehci_interrupt_poll(sc); @@ -1542,7 +1556,7 @@ ehci_setup_standard_chain_sub(struct ehc uint8_t shortpkt_old; uint8_t precompute; - qtd_altnext = htole32(EHCI_LINK_TERMINATE); + qtd_altnext = htoehci32(temp->sc, EHCI_LINK_TERMINATE); td_alt_next = NULL; buf_offset = 0; shortpkt_old = temp->shortpkt; @@ -1599,7 +1613,8 @@ restart: /* fill out current TD */ td->qtd_status = - temp->qtd_status | htole32(EHCI_QTD_SET_BYTES(average)); + temp->qtd_status | + htoehci32(temp->sc, EHCI_QTD_SET_BYTES(average)); if (average == 0) { @@ -1607,7 +1622,8 @@ restart: /* update data toggle, ZLP case */ - temp->qtd_status ^= htole32(EHCI_QTD_TOGGLE_MASK); + temp->qtd_status ^= + htoehci32(temp->sc, EHCI_QTD_TOGGLE_MASK); } td->len = 0; @@ -1627,7 +1643,8 @@ restart: if (((average + temp->max_frame_size - 1) / temp->max_frame_size) & 1) { - temp->qtd_status ^= htole32(EHCI_QTD_TOGGLE_MASK); + temp->qtd_status ^= + htoehci32(temp->sc, EHCI_QTD_TOGGLE_MASK); } } td->len = average; @@ -1639,7 +1656,8 @@ restart: /* fill out buffer pointers */ usb2_get_page(temp->pc, buf_offset, &buf_res); - td->qtd_buffer[0] = htole32(buf_res.physaddr); + td->qtd_buffer[0] = + htoehci32(temp->sc, buf_res.physaddr); td->qtd_buffer_hi[0] = 0; x = 1; @@ -1648,7 +1666,9 @@ restart: average -= EHCI_PAGE_SIZE; buf_offset += EHCI_PAGE_SIZE; usb2_get_page(temp->pc, buf_offset, &buf_res); - td->qtd_buffer[x] = htole32(buf_res.physaddr & (~0xFFF)); + td->qtd_buffer[x] = + htoehci32(temp->sc, + buf_res.physaddr & (~0xFFF)); td->qtd_buffer_hi[x] = 0; x++; } @@ -1663,7 +1683,9 @@ restart: */ buf_offset += average; usb2_get_page(temp->pc, buf_offset - 1, &buf_res); - td->qtd_buffer[x] = htole32(buf_res.physaddr & (~0xFFF)); + td->qtd_buffer[x] = + htoehci32(temp->sc, + buf_res.physaddr & (~0xFFF)); td->qtd_buffer_hi[x] = 0; } @@ -1717,6 +1739,7 @@ ehci_setup_standard_chain(struct usb2_xf temp.average = xfer->max_usb2_frame_size; temp.max_frame_size = xfer->max_frame_size; + temp.sc = xfer->usb2_sc; /* toggle the DMA set we are using */ xfer->flags_int.curr_dma_set ^= 1; @@ -1736,7 +1759,8 @@ ehci_setup_standard_chain(struct usb2_xf if (xfer->flags_int.control_xfr) { if (xfer->pipe->toggle_next) { /* DATA1 is next */ - temp.qtd_status |= htole32(EHCI_QTD_SET_TOGGLE(1)); + temp.qtd_status |= + htoehci32(temp.sc, EHCI_QTD_SET_TOGGLE(1)); } temp.auto_data_toggle = 0; } else { @@ -1745,14 +1769,16 @@ ehci_setup_standard_chain(struct usb2_xf if (usb2_get_speed(xfer->udev) != USB_SPEED_HIGH) { /* max 3 retries */ - temp.qtd_status |= htole32(EHCI_QTD_SET_CERR(3)); + temp.qtd_status |= + htoehci32(temp.sc, EHCI_QTD_SET_CERR(3)); } /* check if we should prepend a setup message */ if (xfer->flags_int.control_xfr) { if (xfer->flags_int.control_hdr) { - temp.qtd_status &= htole32(EHCI_QTD_SET_CERR(3)); + temp.qtd_status &= + htoehci32(temp.sc, EHCI_QTD_SET_CERR(3)); temp.qtd_status |= htole32 (EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_SETUP) | @@ -1783,7 +1809,8 @@ ehci_setup_standard_chain(struct usb2_xf } /* keep previous data toggle and error count */ - temp.qtd_status &= htole32(EHCI_QTD_SET_CERR(3) | + temp.qtd_status &= + htoehci32(temp.sc, EHCI_QTD_SET_CERR(3) | EHCI_QTD_SET_TOGGLE(1)); if (temp.len == 0) { @@ -1803,9 +1830,9 @@ ehci_setup_standard_chain(struct usb2_xf temp.qtd_status |= (UE_GET_DIR(xfer->endpoint) == UE_DIR_IN) ? - htole32(EHCI_QTD_ACTIVE | + htoehci32(temp.sc, EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_IN)) : - htole32(EHCI_QTD_ACTIVE | + htoehci32(temp.sc, EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_OUT)); ehci_setup_standard_chain_sub(&temp); @@ -1821,14 +1848,14 @@ ehci_setup_standard_chain(struct usb2_xf * direction. */ - temp.qtd_status &= htole32(EHCI_QTD_SET_CERR(3) | + temp.qtd_status &= htoehci32(temp.sc, EHCI_QTD_SET_CERR(3) | EHCI_QTD_SET_TOGGLE(1)); temp.qtd_status |= (UE_GET_DIR(xfer->endpoint) == UE_DIR_OUT) ? - htole32(EHCI_QTD_ACTIVE | + htoehci32(temp.sc, EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_IN) | EHCI_QTD_SET_TOGGLE(1)) : - htole32(EHCI_QTD_ACTIVE | + htoehci32(temp.sc, EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_OUT) | EHCI_QTD_SET_TOGGLE(1)); @@ -1841,9 +1868,9 @@ ehci_setup_standard_chain(struct usb2_xf td = temp.td; /* the last TD terminates the transfer: */ - td->qtd_next = htole32(EHCI_LINK_TERMINATE); - td->qtd_altnext = htole32(EHCI_LINK_TERMINATE); - td->qtd_status |= htole32(EHCI_QTD_IOC); + td->qtd_next = htoehci32(temp.sc, EHCI_LINK_TERMINATE); + td->qtd_altnext = htoehci32(temp.sc, EHCI_LINK_TERMINATE); + td->qtd_status |= htoehci32(temp.sc, EHCI_QTD_IOC); usb2_pc_cpu_flush(td->page_cache); @@ -1855,7 +1882,8 @@ ehci_setup_standard_chain(struct usb2_xf if (ehcidebug > 8) { DPRINTF("nexttog=%d; data before transfer:\n", xfer->pipe->toggle_next); - ehci_dump_sqtds(xfer->td_transfer_first); + ehci_dump_sqtds(temp.sc, + xfer->td_transfer_first); } #endif @@ -1892,7 +1920,7 @@ ehci_setup_standard_chain(struct usb2_xf } } - qh->qh_endp = htole32(qh_endp); + qh->qh_endp = htoehci32(temp.sc, qh_endp); qh_endphub = (EHCI_QH_SET_MULT(xfer->max_packet_count & 3) | @@ -1901,38 +1929,42 @@ ehci_setup_standard_chain(struct usb2_xf EHCI_QH_SET_HUBA(xfer->udev->hs_hub_addr) | EHCI_QH_SET_PORT(xfer->udev->hs_port_no)); - qh->qh_endphub = htole32(qh_endphub); - qh->qh_curqtd = htole32(0); + qh->qh_endphub = htoehci32(temp.sc, qh_endphub); + qh->qh_curqtd = htoehci32(temp.sc, 0); /* fill the overlay qTD */ - qh->qh_qtd.qtd_status = htole32(0); + qh->qh_qtd.qtd_status = htoehci32(temp.sc, 0); if (temp.auto_data_toggle) { /* let the hardware compute the data toggle */ - qh->qh_endp &= ~htole32(EHCI_QH_DTC); + qh->qh_endp &= htoehci32(temp.sc, ~EHCI_QH_DTC); if (xfer->pipe->toggle_next) { /* DATA1 is next */ - qh->qh_qtd.qtd_status |= htole32(EHCI_QTD_SET_TOGGLE(1)); + qh->qh_qtd.qtd_status |= + htoehci32(temp.sc, EHCI_QTD_SET_TOGGLE(1)); } } td = xfer->td_transfer_first; qh->qh_qtd.qtd_next = td->qtd_self; - qh->qh_qtd.qtd_altnext = htole32(EHCI_LINK_TERMINATE); + qh->qh_qtd.qtd_altnext = + htoehci32(temp.sc, EHCI_LINK_TERMINATE); usb2_pc_cpu_flush(qh->page_cache); - EHCI_APPEND_QH(qh, *qh_last); + if (xfer->udev->pwr_save.suspended == 0) { + EHCI_APPEND_QH(qh, *qh_last); + } } static void ehci_root_intr_done(struct usb2_xfer *xfer, struct usb2_sw_transfer *std) { - struct ehci_softc *sc = xfer->usb2_sc; + ehci_softc_t *sc = xfer->usb2_sc; uint16_t i; uint16_t m; @@ -1992,11 +2024,11 @@ ehci_isoc_fs_done(ehci_softc_t *sc, stru #if USB_DEBUG if (ehcidebug > 15) { DPRINTF("isoc FS-TD\n"); - ehci_dump_sitd(td); + ehci_dump_sitd(sc, td); } #endif usb2_pc_cpu_invalidate(td->page_cache); - status = le32toh(td->sitd_status); + status = ehci32toh(sc, td->sitd_status); len = EHCI_SITD_GET_LEN(status); @@ -2044,12 +2076,12 @@ ehci_isoc_hs_done(ehci_softc_t *sc, stru #if USB_DEBUG if (ehcidebug > 15) { DPRINTF("isoc HS-TD\n"); - ehci_dump_itd(td); + ehci_dump_itd(sc, td); } #endif usb2_pc_cpu_invalidate(td->page_cache); - status = le32toh(td->itd_status[td_no]); + status = ehci32toh(sc, td->itd_status[td_no]); len = EHCI_ITD_GET_LEN(status); @@ -2102,7 +2134,8 @@ ehci_device_done(struct usb2_xfer *xfer, if (ehcidebug > 8) { DPRINTF("nexttog=%d; data after transfer:\n", xfer->pipe->toggle_next); - ehci_dump_sqtds(xfer->td_transfer_first); + ehci_dump_sqtds(xfer->usb2_sc, + xfer->td_transfer_first); } #endif @@ -2322,6 +2355,7 @@ struct usb2_pipe_methods ehci_device_int static void ehci_device_isoc_fs_open(struct usb2_xfer *xfer) { + ehci_softc_t *sc = xfer->usb2_sc; ehci_sitd_t *td; uint32_t sitd_portaddr; uint8_t ds; @@ -2335,7 +2369,7 @@ ehci_device_isoc_fs_open(struct usb2_xfe if (UE_GET_DIR(xfer->endpoint) == UE_DIR_IN) { sitd_portaddr |= EHCI_SITD_SET_DIR_IN; } - sitd_portaddr = htole32(sitd_portaddr); + sitd_portaddr = htoehci32(sc, sitd_portaddr); /* initialize all TD's */ @@ -2352,7 +2386,7 @@ ehci_device_isoc_fs_open(struct usb2_xfe * * micro-frame usage (8 microframes per 1ms) */ - td->sitd_back = htole32(EHCI_LINK_TERMINATE); + td->sitd_back = htoehci32(sc, EHCI_LINK_TERMINATE); usb2_pc_cpu_flush(td->page_cache); } @@ -2499,7 +2533,7 @@ ehci_device_isoc_fs_enter(struct usb2_xf * non-zero length */ usb2_get_page(xfer->frbuffers, buf_offset, &buf_res); - td->sitd_bp[0] = htole32(buf_res.physaddr); + td->sitd_bp[0] = htoehci32(sc, buf_res.physaddr); buf_offset += *plen; /* * NOTE: We need to subtract one from the offset so @@ -2544,9 +2578,9 @@ ehci_device_isoc_fs_enter(struct usb2_xf *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00:20:19 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B7AB106566B; Sun, 4 Jan 2009 00:20:19 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A48C8FC19; Sun, 4 Jan 2009 00:20:19 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n040KIg3041123; Sun, 4 Jan 2009 00:20:18 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n040KIcc041121; Sun, 4 Jan 2009 00:20:18 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901040020.n040KIcc041121@svn.freebsd.org> From: Ed Schouten Date: Sun, 4 Jan 2009 00:20:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 00:20:19 -0000 Author: ed Date: Sun Jan 4 00:20:18 2009 New Revision: 186731 URL: http://svn.freebsd.org/changeset/base/186731 Log: Print control characters, even though they are normally not visible. With cons25, there are printable characters below 0x1B. This is not the case with ASCII, UTF-8, etc. but in this case we just have to. Also don't set LC_CTYPE to UTF-8 when libteken is compiled without UTF-8 in the demo-application. Modified: head/sys/dev/syscons/teken/teken.c head/sys/dev/syscons/teken/teken_demo.c Modified: head/sys/dev/syscons/teken/teken.c ============================================================================== --- head/sys/dev/syscons/teken/teken.c Sun Jan 4 00:12:01 2009 (r186730) +++ head/sys/dev/syscons/teken/teken.c Sun Jan 4 00:20:18 2009 (r186731) @@ -53,10 +53,14 @@ static FILE *df; #include "teken_wcwidth.h" #else /* !TEKEN_UTF8 */ static inline int -teken_wcwidth(teken_char_t c) +teken_wcwidth(teken_char_t c __unused) { +#ifdef TEKEN_CONS25 + return (1); +#else /* !TEKEN_CONS25 */ return (c <= 0x1B) ? -1 : 1; +#endif /* TEKEN_CONS25 */ } #endif /* TEKEN_UTF8 */ Modified: head/sys/dev/syscons/teken/teken_demo.c ============================================================================== --- head/sys/dev/syscons/teken/teken_demo.c Sun Jan 4 00:12:01 2009 (r186730) +++ head/sys/dev/syscons/teken/teken_demo.c Sun Jan 4 00:20:18 2009 (r186731) @@ -280,7 +280,9 @@ main(int argc __unused, char *argv[] __u exit(1); case 0: setenv("TERM", "cons25", 1); +#ifdef TEKEN_UTF8 setenv("LC_CTYPE", "UTF-8", 0); +#endif /* TEKEN_UTF8 */ execlp("zsh", "-zsh", NULL); execlp("bash", "-bash", NULL); execlp("sh", "-sh", NULL); From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 07:29:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B224106566C; Sun, 4 Jan 2009 07:29:05 +0000 (UTC) (envelope-from chinsan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A60F8FC14; Sun, 4 Jan 2009 07:29:05 +0000 (UTC) (envelope-from chinsan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n047T4GK049213; Sun, 4 Jan 2009 07:29:04 GMT (envelope-from chinsan@svn.freebsd.org) Received: (from chinsan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n047T4oF049212; Sun, 4 Jan 2009 07:29:04 GMT (envelope-from chinsan@svn.freebsd.org) Message-Id: <200901040729.n047T4oF049212@svn.freebsd.org> From: Chin-San Huang Date: Sun, 4 Jan 2009 07:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186732 - head/usr.sbin/pkg_install/add X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 07:29:05 -0000 Author: chinsan (doc,ports committer) Date: Sun Jan 4 07:29:04 2009 New Revision: 186732 URL: http://svn.freebsd.org/changeset/base/186732 Log: - s/no-scripts/no-script/ PR: docs/127732 Submitted by: TerryP MFC after: 3 days Modified: head/usr.sbin/pkg_install/add/pkg_add.1 Modified: head/usr.sbin/pkg_install/add/pkg_add.1 ============================================================================== --- head/usr.sbin/pkg_install/add/pkg_add.1 Sun Jan 4 00:20:18 2009 (r186731) +++ head/usr.sbin/pkg_install/add/pkg_add.1 Sun Jan 4 07:29:04 2009 (r186732) @@ -15,7 +15,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 30, 2008 +.Dd Jan 4, 2009 .Dt PKG_ADD 1 .Os .Sh NAME @@ -90,7 +90,7 @@ if it is defined or in current directory .It Fl i , -no-deps Install the package without fetching and installing dependencies. -.It Fl I , -no-scripts +.It Fl I , -no-script If any installation scripts (pre-install or post-install) exist for a given package, do not execute them. .It Fl n , -dry-run From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 07:32:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CD7E106566B; Sun, 4 Jan 2009 07:32:07 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C74C8FC13; Sun, 4 Jan 2009 07:32:07 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n047W7cS049311; Sun, 4 Jan 2009 07:32:07 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n047W7c4049310; Sun, 4 Jan 2009 07:32:07 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200901040732.n047W7c4049310@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 4 Jan 2009 07:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186733 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 07:32:07 -0000 Author: marcel Date: Sun Jan 4 07:32:06 2009 New Revision: 186733 URL: http://svn.freebsd.org/changeset/base/186733 Log: Improve probing. o Don't check the dummy fields. o The entry is unused if either dp_mid is 0 or dp_sid is 0. o The start or end cylinder cannot be 0. o The start CHS cannot be equal to the end CHS. Submitted by: nyan Modified: head/sys/geom/part/g_part_pc98.c Modified: head/sys/geom/part/g_part_pc98.c ============================================================================== --- head/sys/geom/part/g_part_pc98.c Sun Jan 4 07:29:04 2009 (r186732) +++ head/sys/geom/part/g_part_pc98.c Sun Jan 4 07:32:06 2009 (r186733) @@ -333,7 +333,7 @@ g_part_pc98_probe(struct g_part_table *t struct g_provider *pp; u_char *buf, *p; int error, index, res, sum; - uint16_t magic; + uint16_t magic, ecyl, scyl; pp = cp->provider; @@ -365,11 +365,15 @@ g_part_pc98_probe(struct g_part_table *t for (index = 0; index < NDOSPART; index++) { p = buf + SECSIZE + index * DOSPARTSIZE; - if (p[2] != 0 || p[3] != 0) - goto out; - if (p[1] == 0) + if (p[0] == 0 || p[1] == 0) /* !dp_mid || !dp_sid */ continue; - if (le16dec(p + 10) == 0) + scyl = le16dec(p + 10); + ecyl = le16dec(p + 14); + if (scyl == 0 || ecyl == 0) + goto out; + if (p[8] == p[12] && /* dp_ssect == dp_esect */ + p[9] == p[13] && /* dp_shd == dp_ehd */ + scyl == ecyl) goto out; } From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 09:24:53 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF446106564A; Sun, 4 Jan 2009 09:24:53 +0000 (UTC) (envelope-from sziszi@bsd.hu) Received: from mail.rubicom.hu (mail.rubicom.hu [89.147.80.28]) by mx1.freebsd.org (Postfix) with ESMTP id 655848FC14; Sun, 4 Jan 2009 09:24:53 +0000 (UTC) (envelope-from sziszi@bsd.hu) Received: from localhost ([127.0.0.1] helo=mail.rubicom.hu) by mail.rubicom.hu with smtp (Exim 4.63) (envelope-from ) id 1LJOMO-0000BC-C8; Sun, 04 Jan 2009 09:29:24 +0100 Received: from ip5993549e.rubicom.hu ([89.147.84.158] helo=baranyfelhocske.buza.adamsfamily.xx) by mail.rubicom.hu with esmtp (Exim 4.63) (envelope-from ) id 1LJOMN-0000Aw-Vs; Sun, 04 Jan 2009 09:29:24 +0100 Received: from baranyfelhocske.buza.adamsfamily.xx (localhost [127.0.0.1]) by baranyfelhocske.buza.adamsfamily.xx (8.14.3/8.14.3) with ESMTP id n048TNRu022308; Sun, 4 Jan 2009 09:29:23 +0100 (CET) (envelope-from sziszi@bsd.hu) Received: (from sziszi@localhost) by baranyfelhocske.buza.adamsfamily.xx (8.14.3/8.14.3/Submit) id n048TN3s022307; Sun, 4 Jan 2009 09:29:23 +0100 (CET) (envelope-from sziszi@bsd.hu) X-Authentication-Warning: baranyfelhocske.buza.adamsfamily.xx: sziszi set sender to sziszi@bsd.hu using -f Date: Sun, 4 Jan 2009 09:29:23 +0100 From: Szilveszter Adam To: svn-src-head@freebsd.org Message-ID: <20090104082923.GA20960@baranyfelhocske.buza.adamsfamily.xx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Cc: peter@freebsd.org Subject: svn2cvs exporter stopped? X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 09:24:54 -0000 Dear Peter, dear all, I know no better list to ask this on: Has the svn2cvs exporter stopped for some reason? I cannot see the recent commits to head being exported approx. for the last two days or so. (and neither does cvsweb.freebsd.org, while they show up just fine in the commit mail and on viewvc). -- Regards: Szilveszter ADAM Budapest Hungary From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 11:31:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D18521065672; Sun, 4 Jan 2009 11:31:03 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEB598FC08; Sun, 4 Jan 2009 11:31:03 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04BV36E056279; Sun, 4 Jan 2009 11:31:03 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04BV360056278; Sun, 4 Jan 2009 11:31:03 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <200901041131.n04BV360056278@svn.freebsd.org> From: Ivan Voras Date: Sun, 4 Jan 2009 11:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186735 - head/sbin/geom/class/virstor X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 11:31:04 -0000 Author: ivoras Date: Sun Jan 4 11:31:03 2009 New Revision: 186735 URL: http://svn.freebsd.org/changeset/base/186735 Log: Several significant updates: * Better wording of sections dealing with physical storage * A new section on assumptions gvirstor has on its consumer devices (components) and its interaction with file systems * Improved markup (by hrs@) Reviewed by: hrs Approved by: gnn (mentor) Modified: head/sbin/geom/class/virstor/gvirstor.8 Modified: head/sbin/geom/class/virstor/gvirstor.8 ============================================================================== --- head/sbin/geom/class/virstor/gvirstor.8 Sun Jan 4 07:33:10 2009 (r186734) +++ head/sbin/geom/class/virstor/gvirstor.8 Sun Jan 4 11:31:03 2009 (r186735) @@ -1,5 +1,4 @@ -.\" Copyright (c) 2005 Pawel Jakub Dawidek -.\" Copyright (c) 2005 Ivan Voras +.\" Copyright (c) 2006-2008 Ivan Voras .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2006 +.Dd December 17, 2008 .Dt GVIRSTOR 8 .Os .Sh NAME @@ -69,10 +68,17 @@ .Sh DESCRIPTION The .Nm -utility is used for setting up a storage device of arbitrary large size (for example, -several TB), consisting of an arbitrary number of physical storage devices with -total size <= the virtual size. Data for the virtual devices will be allocated from -physical devices on demand. In short, this is the virtual storage functionality. +utility is used for setting up a virtual storage device of arbitrary +large size +.Pq for example, several TB , +consisting of an arbitrary number of physical storage devices with the +total size which is equal to or smaller than the virtual size. Data +for the virtual devices will be allocated from physical devices on +demand. The idea behind +.Nm +is similar to the concept of Virtual Memory in operating systems, +effectively allowing users to overcommit on storage +.Pq free file system space . The first argument to .Nm indicates an action to be performed: @@ -82,12 +88,15 @@ Set up a virtual device from the given c .Ar name . Metadata are stored in the last sector of every component. Argument -.Ar virsize -is the size of new virtual device, with default being 2 TiB (2097152 MiB). +.Fl s Ar virsize +is the size of new virtual device, with default being 2 TiB +.Pq 2097152 MiB . Argument -.Ar chunksize -is the chunk size, with default being 4 MiB (4096 KiB). -The default is thus "-s 2097152 -m 4096". +.Fl m Ar chunksize +is the chunk size, with default being 4 MiB +.Pq 4096 KiB . +The default is thus +.Qq Fl s Ar 2097152 Fl m Ar 4096 . .It Cm stop Turn off an existing virtual device by its .Ar name . @@ -96,8 +105,10 @@ As with other GEOM classes, stopped geom .It Cm add Adds new components to existing virtual device by its .Ar name . -The specified virstor device must exist and be active (i.e. -module loaded, device present in /dev). +The specified virstor device must exist and be active +.Pq i.e. module loaded, device present in Pa /dev . +This action can be safely performed while the virstor device is in use +.Pq Qo hot Qc operation .It Cm remove Removes components from existing virtual device by its .Ar name . @@ -130,82 +141,97 @@ Hardcode providers' names in metadata. Be more verbose. .El .Sh EXIT STATUS -Exit status is 0 on success, and 1 if the command fails. +The +.Nm +utility exits 0 on success, and 1 if an error occurs. .Sh EXAMPLES The following example shows how to create a virtual device of default size -(2 TiB), of default chunk (extent) size (4 MiB), with two physical devices for -backing storage. +.Pq 2 TiB , +of default chunk +.Pq extent +size +.Pq 4 MiB , +with two physical devices for backing storage. .Bd -literal -offset indent -gvirstor label -v mydata /dev/ad4 /dev/ad6 -newfs /dev/virstor/mydata +.No gvirstor label -v Ar mydata Ar /dev/ad4 Ar /dev/ad6 +.No newfs Ar /dev/virstor/mydata .Ed .Pp From now on, the virtual device will be available via the .Pa /dev/virstor/mydata device entry. -To add a new physical device / provider to an active virstor device: +To add a new physical device / component to an active virstor device: .Bd -literal -offset indent -gvirstor add mydata ad8 +.No gvirstor add Ar mydata Ar ad8 .Ed .Pp -This will add physical storage (from ad8) to +This will add physical storage +.Ar ad8 +to .Pa /dev/virstor/mydata device. -To see device status information (including how much physical storage -is still available for the virtual device), use: +To see device status information +.Pq including how much physical storage is still available for the virtual device , +use: .Bd -literal -offset indent gvirstor list .Ed .Pp All standard .Xr geom 8 -subcommands (e.g. "status", "help") are also supported. -.Sh SYSCTLs +subcommands +.Pq e.g. Cm status , Cm help +are also supported. +.Sh SYSCTL VARIABLES .Nm -has several +has several .Xr sysctl 8 tunable variables. .Bd -literal -offset indent -.Pa int kern.geom.virstor.debug +.Va int kern.geom.virstor.debug .Ed .Pp This sysctl controls verbosity of the kernel module, in the range -1 to 15. Messages that are marked with higher verbosity levels than -this are supressed. Default value is 5 and it's not -recommented to set this tunable to less than 2, because level 1 messages +1 to 15. Messages that are marked with higher verbosity levels than +this are suppressed. Default value is 5 and it's not +recommended to set this tunable to less than 2, because level 1 messages are error events, and level 2 messages are system warnings. .Bd -literal -offset indent -.Pa int kern.geom.virstor.chunk_watermark +.Va int kern.geom.virstor.chunk_watermark .Ed .Pp Value in this sysctl sets warning watermark level for physical chunk usage on a single component. The warning is issued when a virstor component -has less than this many free chunks (default 100). +has less than this many free chunks +.Pq default 100 . .Bd -literal -offset indent -.Pa int kern.geom.virstor.component_watermark +.Va int kern.geom.virstor.component_watermark .Ed .Pp Value in this sysctl sets warning watermark level for component usage. -The warning is issed when there are less than this many unallocated -components (default is 1). +The warning is issued when there are less than this many unallocated +components +.Pq default is 1 . .Pp All these sysctls are also available as .Xr loader 8 tunables. -.Sh LOG MESSAGES +.Sh DIAGNOSTICS .Nm -kernel module issues log messages with prefixes in standardised format, +kernel module issues log messages with prefixes in standardized format, which is useful for log message filtering and dispatching. Each message line begins with .Bd -literal -offset indent -.Pa GEOM_VIRSTOR[%d]: +.Li GEOM_VIRSTOR[%d]: .Ed .Pp -The number (%d) is message verbosity / importance level, in the range -1 to 15. If a message filtering, dispatching or operator alert system is -used, it is recommended that messages with levels 1 and 2 be taken -seriously (for example, to catch out-of-space conditions as set by -watermark sysctls). +The number +.Pq %d +is message verbosity / importance level, in the range 1 to 15. If a +message filtering, dispatching or operator alert system is used, it is +recommended that messages with levels 1 and 2 be taken seriously +.Pq for example, to catch out-of-space conditions as set by watermark +sysctls . .Sh SEE ALSO .Xr geom 4 , .Xr geom 8 , @@ -218,10 +244,40 @@ The utility appeared in .Fx 7.0 . .Sh BUGS -Commands "add" and "remove" contain unavoidable critical sections -which may make the virstor device unusable if a power failure (or -other disruptive event) happens during their execution. -It's recommended to run them when the system is quiescent. +Commands +.Cm add +and +.Cm remove +contain unavoidable critical sections which may make the virstor +device unusable if a power failure +.Pq or other disruptive event +happens during their execution. It's recommended to run them when the +system is quiescent. +.Sh ASSUMPTIONS AND INTERACTION WITH FILE SYSTEMS +There are several assumptions that +.Nm +has in its operation: that the size of the virtual storage device will not +change once it's set, and that the sizes of individual physical storage +components will always remain constant during their existence. For +alternative ways to implement virtual or resizable file systems see +.Xr zfs 1M , +.Xr gconcat 8 and +.Xr growfs 8 . +.Pp +Note that +.Nm +has nontrivial interaction with file systems which initialize a large +number of on-disk structures during newfs. If such file systems +attempt to spread their structures across the drive media +.Pq like UFS/UFS2 does , +their efforts will be effectively foiled by sequential allocation of +chunks in +.Nm +and all their structures will be physically allocated at the start +of the first virstor component. This could have a significant impac +t on file system performance +.Pq which can in some rare cases be even positive . .Sh AUTHOR -.An Ivan Voras Aq ivoras@FreeBSD.org +.An Ivan Voras Aq ivoras@FreeBSD.org +.Pp Sponsored by Google Summer of Code 2006 From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 12:04:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 132C41065706; Sun, 4 Jan 2009 12:04:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id A91BD8FC20; Sun, 4 Jan 2009 12:04:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LJRig-000IFi-I3; Sun, 04 Jan 2009 14:04:38 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n04C4Zft080184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 4 Jan 2009 14:04:35 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n04C4ZsG039444; Sun, 4 Jan 2009 14:04:35 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n04C4Y7i039443; Sun, 4 Jan 2009 14:04:34 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 4 Jan 2009 14:04:34 +0200 From: Kostik Belousov To: Ed Schouten Message-ID: <20090104120434.GF93900@deviant.kiev.zoral.com.ua> References: <200901040020.n040KIcc041121@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kbCYTQG2MZjuOjyn" Content-Disposition: inline In-Reply-To: <200901040020.n040KIcc041121@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LJRig-000IFi-I3 c44239d637e79628a127cc02fa932537 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 12:04:42 -0000 --kbCYTQG2MZjuOjyn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 04, 2009 at 12:20:18AM +0000, Ed Schouten wrote: > Author: ed > Date: Sun Jan 4 00:20:18 2009 > New Revision: 186731 > URL: http://svn.freebsd.org/changeset/base/186731 >=20 > Log: > Print control characters, even though they are normally not visible. > =20 > With cons25, there are printable characters below 0x1B. This is not the > case with ASCII, UTF-8, etc. but in this case we just have to. > =20 > Also don't set LC_CTYPE to UTF-8 when libteken is compiled without UTF-8 > in the demo-application. >=20 > Modified: > head/sys/dev/syscons/teken/teken.c > head/sys/dev/syscons/teken/teken_demo.c >=20 > Modified: head/sys/dev/syscons/teken/teken.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/syscons/teken/teken.c Sun Jan 4 00:12:01 2009 (r186730) > +++ head/sys/dev/syscons/teken/teken.c Sun Jan 4 00:20:18 2009 (r186731) > @@ -53,10 +53,14 @@ static FILE *df; > #include "teken_wcwidth.h" > #else /* !TEKEN_UTF8 */ > static inline int > -teken_wcwidth(teken_char_t c) > +teken_wcwidth(teken_char_t c __unused) > { > =20 > +#ifdef TEKEN_CONS25 > + return (1); > +#else /* !TEKEN_CONS25 */ > return (c <=3D 0x1B) ? -1 : 1; > +#endif /* TEKEN_CONS25 */ > } > #endif /* TEKEN_UTF8 */ > =20 >=20 > Modified: head/sys/dev/syscons/teken/teken_demo.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/syscons/teken/teken_demo.c Sun Jan 4 00:12:01 2009 (r18= 6730) > +++ head/sys/dev/syscons/teken/teken_demo.c Sun Jan 4 00:20:18 2009 (r18= 6731) > @@ -280,7 +280,9 @@ main(int argc __unused, char *argv[] __u > exit(1); > case 0: > setenv("TERM", "cons25", 1); > +#ifdef TEKEN_UTF8 > setenv("LC_CTYPE", "UTF-8", 0); > +#endif /* TEKEN_UTF8 */ > execlp("zsh", "-zsh", NULL); > execlp("bash", "-bash", NULL); > execlp("sh", "-sh", NULL); IMHO, it would be much easier to try and use the new code if the TEKEN_XXX defines would be implemented as both sysctl and kernel tunables. --kbCYTQG2MZjuOjyn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklgpdIACgkQC3+MBN1Mb4gbEQCfcMmuvBgtYpoGn4GlCssGPo6d 4bwAoN4fhbI4zaysxvCW26yC2wT2x65X =se5N -----END PGP SIGNATURE----- --kbCYTQG2MZjuOjyn-- From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 12:13:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31279106566B; Sun, 4 Jan 2009 12:13:33 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id BF3C08FC13; Sun, 4 Jan 2009 12:13:32 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id A7E9B1CE07; Sun, 4 Jan 2009 13:13:31 +0100 (CET) Date: Sun, 4 Jan 2009 13:13:31 +0100 From: Ed Schouten To: Kostik Belousov Message-ID: <20090104121331.GC14235@hoeg.nl> References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CFO0SFgG+t1lcV5s" Content-Disposition: inline In-Reply-To: <20090104120434.GF93900@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 12:13:33 -0000 --CFO0SFgG+t1lcV5s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Kostik Belousov wrote: > IMHO, it would be much easier to try and use the new code if the > TEKEN_XXX defines would be implemented as both sysctl and kernel > tunables. Yes. Eventually we should add tunables, but first I want to get it working correctly. Unfortunately there is a big amount of complexity when switching to xterm. I think it may be better to switch when we're moving to UTF-8 as well. If we want to switch to xterm without having UTF-8, I suspect we'll break lots of things related to character maps, box drawing, etc. But at least having a kernel tunable would be nice. I'll see what I can do. --=20 Ed Schouten WWW: http://80386.nl/ --CFO0SFgG+t1lcV5s Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklgp+sACgkQ52SDGA2eCwXGvgCfdiWUXOptUgwEulHE79KqJ0+D lFsAmQHT/bHwag4+8Qs22DztII9Zy+qX =Rwdo -----END PGP SIGNATURE----- --CFO0SFgG+t1lcV5s-- From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 12:18:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E36C1106564A; Sun, 4 Jan 2009 12:18:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D28C48FC08; Sun, 4 Jan 2009 12:18:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04CIIFq057164; Sun, 4 Jan 2009 12:18:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04CIIDe057163; Sun, 4 Jan 2009 12:18:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901041218.n04CIIDe057163@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 4 Jan 2009 12:18:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186736 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 12:18:19 -0000 Author: bz Date: Sun Jan 4 12:18:18 2009 New Revision: 186736 URL: http://svn.freebsd.org/changeset/base/186736 Log: Back out r186615; the sanitizing of the pointers in the error case is not needed and seems that it will not be needed either. Pointy hat: mine, mine, mine and not pho's Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Sun Jan 4 11:31:03 2009 (r186735) +++ head/sys/kern/kern_jail.c Sun Jan 4 12:18:18 2009 (r186736) @@ -329,11 +329,9 @@ jail_copyin_ips(struct jail *j) e_free_ip: #ifdef INET6 free(ip6, M_PRISON); - j->ip6 = NULL; #endif #ifdef INET free(ip4, M_PRISON); - j->ip4 = NULL; #endif return (error); } From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 15:41:02 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F5161065670; Sun, 4 Jan 2009 15:41:02 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CAF98FC19; Sun, 4 Jan 2009 15:41:02 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04Ff1Jq060754; Sun, 4 Jan 2009 15:41:01 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04Ff1Oh060753; Sun, 4 Jan 2009 15:41:01 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901041541.n04Ff1Oh060753@svn.freebsd.org> From: Daniel Gerzo Date: Sun, 4 Jan 2009 15:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186737 - head/sbin/geom/class/virstor X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 15:41:02 -0000 Author: danger (doc committer) Date: Sun Jan 4 15:41:01 2009 New Revision: 186737 URL: http://svn.freebsd.org/changeset/base/186737 Log: - grammar and language fixes - hard sentence breaks - trim EXIT STATUS section and move it to DIAGNOSTICS as well as use .Er macro - sort SEE ALSO MFC after: 7 days Modified: head/sbin/geom/class/virstor/gvirstor.8 Modified: head/sbin/geom/class/virstor/gvirstor.8 ============================================================================== --- head/sbin/geom/class/virstor/gvirstor.8 Sun Jan 4 12:18:18 2009 (r186736) +++ head/sbin/geom/class/virstor/gvirstor.8 Sun Jan 4 15:41:01 2009 (r186737) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm gvirstor -.Nd "provides virtual data storage geom" +.Nd "control utility for virtual data storage devices" .Sh SYNOPSIS .Nm .Cm label @@ -72,9 +72,10 @@ utility is used for setting up a virtual large size .Pq for example, several TB , consisting of an arbitrary number of physical storage devices with the -total size which is equal to or smaller than the virtual size. Data -for the virtual devices will be allocated from physical devices on -demand. The idea behind +total size which is equal to or smaller than the virtual size. +Data for the virtual devices will be allocated from physical devices on +demand. +The idea behind .Nm is similar to the concept of Virtual Memory in operating systems, effectively allowing users to overcommit on storage @@ -82,35 +83,35 @@ effectively allowing users to overcommit The first argument to .Nm indicates an action to be performed: -.Bl -tag -width ".Cm destroy" +.Bl -tag -width ".Cm remove" .It Cm label Set up a virtual device from the given components with the specified .Ar name . -Metadata are stored in the last sector of every component. +Metadata is stored in the last sector of every component. Argument .Fl s Ar virsize -is the size of new virtual device, with default being 2 TiB +is the size of new virtual device, with default being set to 2 TiB .Pq 2097152 MiB . Argument .Fl m Ar chunksize -is the chunk size, with default being 4 MiB +is the chunk size, with default being set to 4 MiB .Pq 4096 KiB . -The default is thus +The default arguments are thus .Qq Fl s Ar 2097152 Fl m Ar 4096 . .It Cm stop -Turn off an existing virtual device by its +Turn off an existing virtual device with the given .Ar name . This command does not touch on-disk metadata. As with other GEOM classes, stopped geoms cannot be started manually. .It Cm add -Adds new components to existing virtual device by its +Adds new components to existing virtual device with the given .Ar name . The specified virstor device must exist and be active .Pq i.e. module loaded, device present in Pa /dev . This action can be safely performed while the virstor device is in use .Pq Qo hot Qc operation .It Cm remove -Removes components from existing virtual device by its +Removes components from existing virtual device with the given .Ar name . Only unallocated providers can be removed. .It Cm clear @@ -140,10 +141,6 @@ Hardcode providers' names in metadata. .It Fl v Be more verbose. .El -.Sh EXIT STATUS -The -.Nm -utility exits 0 on success, and 1 if an error occurs. .Sh EXAMPLES The following example shows how to create a virtual device of default size .Pq 2 TiB , @@ -165,12 +162,13 @@ To add a new physical device / component .No gvirstor add Ar mydata Ar ad8 .Ed .Pp -This will add physical storage +This will add physical storage of .Ar ad8 to .Pa /dev/virstor/mydata device. -To see device status information +.Pp +To see the device status information .Pq including how much physical storage is still available for the virtual device , use: .Bd -literal -offset indent @@ -192,17 +190,20 @@ tunable variables. .Ed .Pp This sysctl controls verbosity of the kernel module, in the range -1 to 15. Messages that are marked with higher verbosity levels than -this are suppressed. Default value is 5 and it's not -recommended to set this tunable to less than 2, because level 1 messages -are error events, and level 2 messages are system warnings. +1 to 15. +Messages that are marked with higher verbosity levels than this are +suppressed. +Default value is 5 and it is not recommended to set this tunable to less +than 2, because level 1 messages are error events, and level 2 messages +are system warnings. .Bd -literal -offset indent .Va int kern.geom.virstor.chunk_watermark .Ed .Pp -Value in this sysctl sets warning watermark level for physical chunk usage -on a single component. The warning is issued when a virstor component -has less than this many free chunks +Value in this sysctl sets warning watermark level for physical chunk +usage on a single component. +The warning is issued when a virstor component has less than this many +free chunks .Pq default 100 . .Bd -literal -offset indent .Va int kern.geom.virstor.component_watermark @@ -217,31 +218,33 @@ All these sysctls are also available as .Xr loader 8 tunables. .Sh DIAGNOSTICS +.Ex -std +.Pp .Nm kernel module issues log messages with prefixes in standardized format, -which is useful for log message filtering and dispatching. Each message -line begins with +which is useful for log message filtering and dispatching. +Each message line begins with .Bd -literal -offset indent .Li GEOM_VIRSTOR[%d]: .Ed .Pp The number .Pq %d -is message verbosity / importance level, in the range 1 to 15. If a -message filtering, dispatching or operator alert system is used, it is -recommended that messages with levels 1 and 2 be taken seriously +is message verbosity / importance level, in the range 1 to 15. +If a message filtering, dispatching or operator alert system is used, it +is recommended that messages with levels 1 and 2 be taken seriously .Pq for example, to catch out-of-space conditions as set by watermark -sysctls . +sysctls. .Sh SEE ALSO .Xr geom 4 , -.Xr geom 8 , -.Xr newfs 8 , .Xr fstab 5 , -.Xr glabel 8 +.Xr geom 8 , +.Xr glabel 8 , +.Xr newfs 8 .Sh HISTORY The .Nm -utility appeared in +utility first appeared in .Fx 7.0 . .Sh BUGS Commands @@ -251,15 +254,15 @@ and contain unavoidable critical sections which may make the virstor device unusable if a power failure .Pq or other disruptive event -happens during their execution. It's recommended to run them when the -system is quiescent. +happens during their execution. +It is recommended to run them when the system is quiescent. .Sh ASSUMPTIONS AND INTERACTION WITH FILE SYSTEMS There are several assumptions that .Nm has in its operation: that the size of the virtual storage device will not -change once it's set, and that the sizes of individual physical storage -components will always remain constant during their existence. For -alternative ways to implement virtual or resizable file systems see +change once it is set, and that the sizes of individual physical storage +components will always remain constant during their existence. +For alternative ways to implement virtual or resizable file systems see .Xr zfs 1M , .Xr gconcat 8 and .Xr growfs 8 . @@ -267,17 +270,18 @@ alternative ways to implement virtual or Note that .Nm has nontrivial interaction with file systems which initialize a large -number of on-disk structures during newfs. If such file systems -attempt to spread their structures across the drive media +number of on-disk structures during newfs. +If such file systems attempt to spread their structures across the drive +media .Pq like UFS/UFS2 does , their efforts will be effectively foiled by sequential allocation of chunks in .Nm and all their structures will be physically allocated at the start -of the first virstor component. This could have a significant impac -t on file system performance +of the first virstor component. +This could have a significant impact on file system performance .Pq which can in some rare cases be even positive . .Sh AUTHOR .An Ivan Voras Aq ivoras@FreeBSD.org .Pp -Sponsored by Google Summer of Code 2006 +Sponsored by Google Summer of Code 2006. From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 15:48:39 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AFA61065678; Sun, 4 Jan 2009 15:48:39 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 198D88FC1C; Sun, 4 Jan 2009 15:48:39 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04FmcjD060921; Sun, 4 Jan 2009 15:48:38 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04Fmcc5060920; Sun, 4 Jan 2009 15:48:38 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901041548.n04Fmcc5060920@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 4 Jan 2009 15:48:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186738 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 15:48:39 -0000 Author: stas Date: Sun Jan 4 15:48:38 2009 New Revision: 186738 URL: http://svn.freebsd.org/changeset/base/186738 Log: - Improve wording. - ae(4) first appeared in 7.1. Reflect this. Approved by: kib (mentor) MFC after: 1 week Modified: head/share/man/man4/ae.4 Modified: head/share/man/man4/ae.4 ============================================================================== --- head/share/man/man4/ae.4 Sun Jan 4 15:41:01 2009 (r186737) +++ head/share/man/man4/ae.4 Sun Jan 4 15:48:38 2009 (r186738) @@ -121,8 +121,7 @@ the network connection (cable). .It "ae%d: reset timeout." The card reset operation has been timed out. .It "ae%d: Generating random ethernet address." -No valid ethernet address was found neither in the controller registers not in -NVRAM. +No valid Ethernet address was found in the controller NVRAM and registers. Random locally administered address with ASUS OUI identifier will be used instead. .El @@ -135,8 +134,8 @@ instead. .Xr vlan 4 , .Xr ifconfig 8 .Sh BUGS -The Attansic L2 FastEthernet contoller supports DMA but do not use a descriptor -based transfer mechanism via scatter-gather DMA. +The Attansic L2 FastEthernet contoller supports DMA but does not use a +descriptor based transfer mechanism via scatter-gather DMA. Thus the data should be copied to/from the controller memory on each transmit/receive. Furthermore, a lot of data alignment restrictions apply. @@ -150,4 +149,4 @@ driver and this manual page was written .An Stanislav Sedov .Aq stas@FreeBSD.org . It first appeared in -.Fx 8.0 . +.Fx 7.1 . From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 15:49:31 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0628D106566C; Sun, 4 Jan 2009 15:49:31 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8AEA8FC0C; Sun, 4 Jan 2009 15:49:30 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04FnUFG060974; Sun, 4 Jan 2009 15:49:30 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04FnU51060972; Sun, 4 Jan 2009 15:49:30 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901041549.n04FnU51060972@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 4 Jan 2009 15:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186739 - in head: share/man/man4 usr.sbin/cpucontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 15:49:31 -0000 Author: stas Date: Sun Jan 4 15:49:30 2009 New Revision: 186739 URL: http://svn.freebsd.org/changeset/base/186739 Log: - Improve wording. Approved by: kib (mentor) MFC after: 1 week Modified: head/share/man/man4/cpuctl.4 head/usr.sbin/cpucontrol/cpucontrol.8 Modified: head/share/man/man4/cpuctl.4 ============================================================================== --- head/share/man/man4/cpuctl.4 Sun Jan 4 15:48:38 2009 (r186738) +++ head/share/man/man4/cpuctl.4 Sun Jan 4 15:49:30 2009 (r186739) @@ -55,7 +55,7 @@ CPU firmware updates. For each CPU present in the system, the special file .Pa /dev/cpuctl%d with the appropriate index will be created. -For multicore CPUs the +For multicore CPUs such special file will be created for each core. .Pp Currently, only i386 and amd64 processors are @@ -123,7 +123,7 @@ For additional information refer to .Bl -tag -width Er .It Bq Er ENXIO The operation requested is not supported by the device (e.g. unsupported -architecture or the CPU was disabled). +architecture or the CPU is disabled) .It Bq Er EINVAL Incorrect request was supplied, or microcode image is not correct. .It Bq Er ENOMEM Modified: head/usr.sbin/cpucontrol/cpucontrol.8 ============================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.8 Sun Jan 4 15:48:38 2009 (r186738) +++ head/usr.sbin/cpucontrol/cpucontrol.8 Sun Jan 4 15:49:30 2009 (r186739) @@ -77,7 +77,7 @@ Apply CPU firmware updates. The .Nm utility will walk through the configured data directories -and will apply all firmware patches available for this CPU. +and apply all firmware updates available for this CPU. .It Fl v Increase the verbosity level. .It Fl h @@ -111,6 +111,11 @@ use the following command: .Dq Li "cpucontrol -d /usr/local/share/cpuctl/ -u /dev/cpuctl0" .Sh SEE ALSO .Xr cpuctl 4 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 8.0 . .Sh BUGS Yes, probably, report if any. .Sh AUTHORS From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 15:52:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 213271065673 for ; Sun, 4 Jan 2009 15:52:38 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 62D958FC1A for ; Sun, 4 Jan 2009 15:52:37 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 04 Jan 2009 15:25:54 -0000 Received: from p54A3FD83.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.253.131] by mail.gmx.net (mp031) with SMTP; 04 Jan 2009 16:25:54 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/i6t8KSTripo939g0MF5xkd9F2DhlfGj29XpSe5z 6425Pcfq6vlCvp Message-ID: <4960D501.70607@gmx.de> Date: Sun, 04 Jan 2009 16:25:53 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Alfred Perlstein References: <200901040012.n040C2gH040928@svn.freebsd.org> In-Reply-To: <200901040012.n040C2gH040928@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.64 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 15:52:38 -0000 Alfred Perlstein schrieb: > Author: alfred > Date: Sun Jan 4 00:12:01 2009 > New Revision: 186730 > URL: http://svn.freebsd.org/changeset/base/186730 > > Log: > [...] > Make "libusb20_desc_foreach()" more readable. In my part of the world we give credit or, at the very least, say "thank you" to the sender, when we apply patches sent to us. Disappointedly Christoph From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 15:56:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B1B71065670; Sun, 4 Jan 2009 15:56:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19D888FC13; Sun, 4 Jan 2009 15:56:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04FunRm061147; Sun, 4 Jan 2009 15:56:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04Funod061146; Sun, 4 Jan 2009 15:56:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901041556.n04Funod061146@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 Jan 2009 15:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186740 - head/sys/gnu/fs/ext2fs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 15:56:50 -0000 Author: kib Date: Sun Jan 4 15:56:49 2009 New Revision: 186740 URL: http://svn.freebsd.org/changeset/base/186740 Log: Do not incorrectly add the low 5 bits of the offset to the resulting position of the found zero bit. Submitted by: Jaakko Heinonen MFC after: 2 weeks Modified: head/sys/gnu/fs/ext2fs/ext2_bitops.h Modified: head/sys/gnu/fs/ext2fs/ext2_bitops.h ============================================================================== --- head/sys/gnu/fs/ext2fs/ext2_bitops.h Sun Jan 4 15:49:30 2009 (r186739) +++ head/sys/gnu/fs/ext2fs/ext2_bitops.h Sun Jan 4 15:56:49 2009 (r186740) @@ -84,7 +84,7 @@ find_next_zero_bit(void *data, size_t sz mask = ~0U << (ofs & 31); bit = *p | ~mask; if (bit != ~0U) - return (ffs(~bit) + ofs - 1); + return (ffs(~bit) + (ofs & ~31U) - 1); p++; ofs = (ofs + 31U) & ~31U; } From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 16:28:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DEC3106566B; Sun, 4 Jan 2009 16:28:35 +0000 (UTC) (envelope-from chris@hitnet.RWTH-Aachen.DE) Received: from mta-2.ms.rz.rwth-aachen.de (mta-2.ms.rz.RWTH-Aachen.DE [134.130.7.73]) by mx1.freebsd.org (Postfix) with ESMTP id 1879C8FC0C; Sun, 4 Jan 2009 16:28:34 +0000 (UTC) (envelope-from chris@hitnet.RWTH-Aachen.DE) MIME-version: 1.0 Received: from ironport-out-1.rz.rwth-aachen.de ([134.130.5.40]) by mta-2.ms.rz.RWTH-Aachen.de (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008)) with ESMTP id <0KCY007IUF1L08D0@mta-2.ms.rz.RWTH-Aachen.de>; Sun, 04 Jan 2009 16:58:33 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.36,327,1228086000"; d="scan'208";a="95370145" Received: from smarthost-2.ms.rz.rwth-aachen.de (HELO smarthost.rwth-aachen.de) ([134.130.7.90]) by ironport-in-1.rz.rwth-aachen.de with ESMTP; Sun, 04 Jan 2009 16:58:33 +0100 Received: from bigboss.hitnet.rwth-aachen.de (bigspace.hitnet.RWTH-Aachen.DE [137.226.181.2]) by smarthost.rwth-aachen.de (8.13.8+Sun/8.13.8/1) with ESMTP id n04FwX4m024276; Sun, 04 Jan 2009 16:58:33 +0100 (CET) Received: from haakonia.hitnet.rwth-aachen.de ([137.226.181.92]) by bigboss.hitnet.rwth-aachen.de with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1LJVN2-0000xk-VH; Sun, 04 Jan 2009 16:58:32 +0100 Received: by haakonia.hitnet.rwth-aachen.de (Postfix, from userid 1001) id A046B3F421; Sun, 04 Jan 2009 16:58:32 +0100 (CET) Date: Sun, 04 Jan 2009 16:58:32 +0100 From: Christian Brueffer To: Daniel Gerzo Message-id: <20090104155832.GA1257@haakonia.hitnet.RWTH-Aachen.DE> References: <200901041541.n04Ff1Oh060753@svn.freebsd.org> Content-type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary=Dxnq1zWXvFF0Q93v Content-disposition: inline In-reply-to: <200901041541.n04Ff1Oh060753@svn.freebsd.org> X-Operating-System: FreeBSD 6.4-STABLE X-PGP-Key: http://people.FreeBSD.org/~brueffer/brueffer.key.asc X-PGP-Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D User-Agent: Mutt/1.5.11 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186737 - head/sbin/geom/class/virstor X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 16:28:35 -0000 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 04, 2009 at 03:41:01PM +0000, Daniel Gerzo wrote: > Author: danger (doc committer) > Date: Sun Jan 4 15:41:01 2009 > New Revision: 186737 > URL: http://svn.freebsd.org/changeset/base/186737 >=20 > Log: [...] > - trim EXIT STATUS section and move it to DIAGNOSTICS as well as use .Er > macro >=20 While using .Ex is good, collapsing EXIT STATUS into DIAGNOSTICS is not. EXIT STATUS is a standard section in our manpages and it's orthogonal to DIAGNOSTICS. Please revert this part. - Christian --=20 Christian Brueffer chris@unixpages.org brueffer@FreeBSD.org GPG Key: http://people.freebsd.org/~brueffer/brueffer.key.asc GPG Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D --Dxnq1zWXvFF0Q93v Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFJYNyobHYXjKDtmC0RAiUJAKCVlFN/JLCU2ix4OffZObbE2znomwCguBJO 5c1NTHLDmA8XoZ1yJH5zFD4= =ZTsq -----END PGP SIGNATURE----- --Dxnq1zWXvFF0Q93v-- From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 17:08:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FD06106566C; Sun, 4 Jan 2009 17:08:48 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 22A538FC12; Sun, 4 Jan 2009 17:08:48 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n04H7fxX095092; Sun, 4 Jan 2009 10:07:41 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 04 Jan 2009 10:07:55 -0700 (MST) Message-Id: <20090104.100755.686402162.imp@bsdimp.com> To: obrien@freebsd.org From: "M. Warner Losh" In-Reply-To: <200901031014.n03AE1lA022458@svn.freebsd.org> References: <200901031014.n03AE1lA022458@svn.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186713 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 17:08:48 -0000 In message: <200901031014.n03AE1lA022458@svn.freebsd.org> "David E. O'Brien" writes: : Author: obrien : Date: Sat Jan 3 10:14:01 2009 : New Revision: 186713 : URL: http://svn.freebsd.org/changeset/base/186713 : : Log: : + Add the -Q be-quiet flag for parallel jobs. : - Enable -Q by default for the moment - there is something weird : going on in the rescue build. This seems to also include other things not related to -Q, is that intentional: : Modified: head/usr.bin/make/var.c : ============================================================================== : --- head/usr.bin/make/var.c Sat Jan 3 05:32:37 2009 (r186712) : +++ head/usr.bin/make/var.c Sat Jan 3 10:14:01 2009 (r186713) : @@ -946,12 +946,14 @@ VarFindAny(const char name[], GNode *ctx : * The name and val arguments are duplicated so they may : * safely be freed. : */ : -static void : +static Var * : VarAdd(const char *name, const char *val, GNode *ctxt) : { : + Var *v; : : - Lst_AtFront(&ctxt->context, VarCreate(name, val, 0)); : + Lst_AtFront(&ctxt->context, v = VarCreate(name, val, 0)); : DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, name, val)); : + return (v); : } : : /** : @@ -1004,30 +1006,22 @@ Var_Set(const char *name, const char *va : n = VarPossiblyExpand(name, ctxt); : v = VarFindOnly(n, ctxt); : if (v == NULL) { : - VarAdd(n, val, ctxt); : - if (ctxt == VAR_CMD) { : - /* : - * Any variables given on the command line : - * are automatically exported to the : - * environment (as per POSIX standard) : - */ : - setenv(n, val, 1); : - } : + v = VarAdd(n, val, ctxt); : } else { : Buf_Clear(v->val); : Buf_Append(v->val, val); : - : - if (ctxt == VAR_CMD || (v->flags & VAR_TO_ENV)) { : - /* : - * Any variables given on the command line : - * are automatically exported to the : - * environment (as per POSIX standard) : - */ : - setenv(n, val, 1); : - } : DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, n, val)); : } : : + if (ctxt == VAR_CMD || (v->flags & VAR_TO_ENV)) { : + /* : + * Any variables given on the command line : + * are automatically exported to the : + * environment (as per POSIX standard) : + */ : + setenv(n, val, 1); : + } : + : free(n); : } : : @@ -2325,7 +2319,8 @@ match_var(const char str[], const char v : * None. The old string must be freed by the caller : */ : Buffer * : -Var_Subst(const char *str, GNode *ctxt, Boolean err) : +//Var_Subst(const char *var, const char *str, GNode *ctxt, Boolean undefErr) : +Var_Subst( const char *str, GNode *ctxt, Boolean err) : { : Boolean errorReported; : Buffer *buf; /* Buffer for forming things */ : From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 17:11:37 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB1391065670; Sun, 4 Jan 2009 17:11:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9019A8FC18; Sun, 4 Jan 2009 17:11:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n04HB7N6095141; Sun, 4 Jan 2009 10:11:07 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 04 Jan 2009 10:11:21 -0700 (MST) Message-Id: <20090104.101121.2139791946.imp@bsdimp.com> To: alfred@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200901040012.n040C2gH040928@svn.freebsd.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 17:11:38 -0000 In message: <200901040012.n040C2gH040928@svn.freebsd.org> Alfred Perlstein writes: : Sync with usb4bsd: Alfred, thanks for trudging these fixes into the tree. It is a thankless job that people will complain about... Speaking of complaining, is there a review process that can be joined for them that's more formal than "diff against hps' p4 tree and complain?" Warner From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 18:06:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3EAC1065670 for ; Sun, 4 Jan 2009 18:06:21 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 4FA8B8FC18 for ; Sun, 4 Jan 2009 18:06:21 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 04 Jan 2009 18:06:19 -0000 Received: from p54A3FD83.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.253.131] by mail.gmx.net (mp070) with SMTP; 04 Jan 2009 19:06:19 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX19O6o0YditOnpQMvsek+gYaaGTybL0tUuVWMjV8ye NjFB54hJZAGyop Message-ID: <4960FA9A.1090509@gmx.de> Date: Sun, 04 Jan 2009 19:06:18 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: "David E. O'Brien" References: <200812262254.mBQMsrbR052676@svn.freebsd.org> In-Reply-To: <200812262254.mBQMsrbR052676@svn.freebsd.org> Content-Type: multipart/mixed; boundary="------------040804020300050601020108" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.49,0.46 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186504 - head/sbin/mount X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 18:06:22 -0000 This is a multi-part message in MIME format. --------------040804020300050601020108 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi David, I'm pretty sure $SUPERNATURAL_BEING_OF_YOUR_CHOICE killed a kitten for the ugly hack you added to mount. The moment you overflow a buffer, you are in no man's land and there's no escape. I appended a patch, which solves this issue once and for all: The argv array gets dynamically expanded, when its limit is reached. Please - for all kittens out there - commit this patch. Christoph David E. O'Brien schrieb: > Author: obrien > Date: Fri Dec 26 22:54:53 2008 > New Revision: 186504 > URL: http://svn.freebsd.org/changeset/base/186504 > > Log: > Make the sub-'argc' static to make it harder to overwrite thru a buffer > overflow. > > Modified: > head/sbin/mount/mount.c > > Modified: head/sbin/mount/mount.c > ============================================================================== > --- head/sbin/mount/mount.c Fri Dec 26 22:47:11 2008 (r186503) > +++ head/sbin/mount/mount.c Fri Dec 26 22:54:53 2008 (r186504) > @@ -503,9 +503,10 @@ int > mountfs(const char *vfstype, const char *spec, const char *name, int flags, > const char *options, const char *mntopts) > { > + static int argc; > char *argv[MAX_ARGS]; > struct statfs sf; > - int argc, i, ret; > + int i, ret; > char *optbuf, execname[PATH_MAX], mntpath[PATH_MAX]; > > /* resolve the mountpoint with realpath(3) */ > _______________________________________________ > 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-unsubscribe@freebsd.org" > --------------040804020300050601020108 Content-Type: text/plain; name="mount.diff" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="mount.diff" SW5kZXg6IG1vdW50LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbW91bnQuYwkoUmV2aXNpb24gMTg2 NzQwKQorKysgbW91bnQuYwkoQXJiZWl0c2tvcGllKQpAQCAtNjgsMTYgKzY4LDE3IEBACiAj ZGVmaW5lIE1PVU5UX01FVEFfT1BUSU9OX0ZTVEFCCQkiZnN0YWIiCiAjZGVmaW5lIE1PVU5U X01FVEFfT1BUSU9OX0NVUlJFTlQJImN1cnJlbnQiCiAKLSNkZWZpbmUJTUFYX0FSR1MJCQkx MDAKLQogaW50IGRlYnVnLCBmc3RhYl9zdHlsZSwgdmVyYm9zZTsKK3N0YXRpYyBjaGFyICoq bW50X2FyZ3Y7CitzdGF0aWMgaW50IG1udF9hcmd2X3NpemU7CitzdGF0aWMgaW50IG1udF9h cmdjOwogCiBjaGFyICAgKmNhdG9wdChjaGFyICosIGNvbnN0IGNoYXIgKik7CiBzdHJ1Y3Qg c3RhdGZzICpnZXRtbnRwdChjb25zdCBjaGFyICopOwogaW50CWhhc29wdChjb25zdCBjaGFy ICosIGNvbnN0IGNoYXIgKik7CiBpbnQJaXNtb3VudGVkKHN0cnVjdCBmc3RhYiAqLCBzdHJ1 Y3Qgc3RhdGZzICosIGludCk7CiBpbnQJaXNyZW1vdW50YWJsZShjb25zdCBjaGFyICopOwot dm9pZAltYW5nbGUoY2hhciAqLCBpbnQgKiwgY2hhciAqW10pOworc3RhdGljIHZvaWQJbWFu Z2xlKGNoYXIgKik7CiBjaGFyICAgKnVwZGF0ZV9vcHRpb25zKGNoYXIgKiwgY2hhciAqLCBp bnQpOwogaW50CW1vdW50ZnMoY29uc3QgY2hhciAqLCBjb25zdCBjaGFyICosIGNvbnN0IGNo YXIgKiwKIAkJCWludCwgY29uc3QgY2hhciAqLCBjb25zdCBjaGFyICopOwpAQCAtNDk5LDEy ICs1MDAsMjIgQEAKIAlyZXR1cm4gKGZvdW5kKTsKIH0KIAorc3RhdGljIHZvaWQKK2FwcGVu ZF9hcmd2KGNoYXIgKmFyZykKK3sKKwlpZiAobW50X2FyZ2MgPT0gbW50X2FyZ3Zfc2l6ZSkg eworCQltbnRfYXJndl9zaXplID0gbW50X2FyZ3Zfc2l6ZSA9PSAwID8gMTYgOiBtbnRfYXJn dl9zaXplICogMjsKKwkJbW50X2FyZ3YgPSByZWFsbG9jKG1udF9hcmd2LCBzaXplb2YoKm1u dF9hcmd2KSAqIG1udF9hcmd2X3NpemUpOworCQlpZiAobW50X2FyZ3YgPT0gTlVMTCkKKwkJ CWVycngoMSwgInJlYWxsb2MgZmFpbGVkIik7CisJfQorCW1udF9hcmd2W21udF9hcmdjKytd ID0gYXJnOworfQorCiBpbnQKIG1vdW50ZnMoY29uc3QgY2hhciAqdmZzdHlwZSwgY29uc3Qg Y2hhciAqc3BlYywgY29uc3QgY2hhciAqbmFtZSwgaW50IGZsYWdzLAogCWNvbnN0IGNoYXIg Km9wdGlvbnMsIGNvbnN0IGNoYXIgKm1udG9wdHMpCiB7Ci0Jc3RhdGljIGludCBhcmdjOwot CWNoYXIgKmFyZ3ZbTUFYX0FSR1NdOwogCXN0cnVjdCBzdGF0ZnMgc2Y7CiAJaW50IGksIHJl dDsKIAljaGFyICpvcHRidWYsIGV4ZWNuYW1lW1BBVEhfTUFYXSwgbW50cGF0aFtQQVRIX01B WF07CkBAIC01NDIsMzIgKzU1MywyNyBAQAogCS8qIENvbnN0cnVjdCB0aGUgbmFtZSBvZiB0 aGUgYXBwcm9wcmlhdGUgbW91bnQgY29tbWFuZCAqLwogCSh2b2lkKXNucHJpbnRmKGV4ZWNu YW1lLCBzaXplb2YoZXhlY25hbWUpLCAibW91bnRfJXMiLCB2ZnN0eXBlKTsKIAotCWFyZ2Mg PSAwOwotCWFyZ3ZbYXJnYysrXSA9IGV4ZWNuYW1lOwotCW1hbmdsZShvcHRidWYsICZhcmdj LCBhcmd2KTsKLQlhcmd2W2FyZ2MrK10gPSBzdHJkdXAoc3BlYyk7Ci0JYXJndlthcmdjKytd ID0gc3RyZHVwKG5hbWUpOwotCWFyZ3ZbYXJnY10gPSBOVUxMOworCWFwcGVuZF9hcmd2KGV4 ZWNuYW1lKTsKKwltYW5nbGUob3B0YnVmKTsKKwlhcHBlbmRfYXJndihzdHJkdXAoc3BlYykp OworCWFwcGVuZF9hcmd2KHN0cmR1cChuYW1lKSk7CisJYXBwZW5kX2FyZ3YoTlVMTCk7CiAK LQlpZiAoTUFYX0FSR1MgPD0gYXJnYyApCi0JCWVycngoMSwgIkNhbm5vdCBwcm9jZXNzIG1v cmUgdGhhbiAlZCBtb3VudCBhcmd1bWVudHMiLAotCQkgICAgTUFYX0FSR1MpOwotCiAJaWYg KGRlYnVnKSB7CiAJCWlmICh1c2VfbW91bnRwcm9nKHZmc3R5cGUpKQogCQkJcHJpbnRmKCJl eGVjOiBtb3VudF8lcyIsIHZmc3R5cGUpOwogCQllbHNlCiAJCQlwcmludGYoIm1vdW50IC10 ICVzIiwgdmZzdHlwZSk7Ci0JCWZvciAoaSA9IDE7IGkgPCBhcmdjOyBpKyspCi0JCQkodm9p ZClwcmludGYoIiAlcyIsIGFyZ3ZbaV0pOworCQlmb3IgKGkgPSAxOyBpIDwgbW50X2FyZ2M7 IGkrKykKKwkJCSh2b2lkKXByaW50ZigiICVzIiwgbW50X2FyZ3ZbaV0pOwogCQkodm9pZClw cmludGYoIlxuIik7CiAJCXJldHVybiAoMCk7CiAJfQogCiAJaWYgKHVzZV9tb3VudHByb2co dmZzdHlwZSkpIHsKLQkJcmV0ID0gZXhlY19tb3VudHByb2cobmFtZSwgZXhlY25hbWUsIGFy Z3YpOworCQlyZXQgPSBleGVjX21vdW50cHJvZyhuYW1lLCBleGVjbmFtZSwgbW50X2FyZ3Yp OwogCX0gZWxzZSB7Ci0JCXJldCA9IG1vdW50X2ZzKHZmc3R5cGUsIGFyZ2MsIGFyZ3YpOwor CQlyZXQgPSBtb3VudF9mcyh2ZnN0eXBlLCBtbnRfYXJnYywgbW50X2FyZ3YpOwogCX0KIAog CWZyZWUob3B0YnVmKTsKQEAgLTY2OSwxMyArNjc1LDExIEBACiAJcmV0dXJuIChjcCk7CiB9 CiAKLXZvaWQKLW1hbmdsZShjaGFyICpvcHRpb25zLCBpbnQgKmFyZ2NwLCBjaGFyICphcmd2 W10pCitzdGF0aWMgdm9pZAorbWFuZ2xlKGNoYXIgKm9wdGlvbnMpCiB7CiAJY2hhciAqcCwg KnM7Ci0JaW50IGFyZ2M7CiAKLQlhcmdjID0gKmFyZ2NwOwogCWZvciAocyA9IG9wdGlvbnM7 IChwID0gc3Ryc2VwKCZzLCAiLCIpKSAhPSBOVUxMOykKIAkJaWYgKCpwICE9ICdcMCcpIHsK IAkJCWlmIChzdHJjbXAocCwgIm5vYXV0byIpID09IDApIHsKQEAgLTcwNywxOSArNzExLDE3 IEBACiAJCQkgICAgc2l6ZW9mKGdyb3VwcXVvdGFlcSkgLSAxKSA9PSAwKSB7CiAJCQkJY29u dGludWU7CiAJCQl9IGVsc2UgaWYgKCpwID09ICctJykgewotCQkJCWFyZ3ZbYXJnYysrXSA9 IHA7CisJCQkJYXBwZW5kX2FyZ3YocCk7CiAJCQkJcCA9IHN0cmNocihwLCAnPScpOwogCQkJ CWlmIChwICE9IE5VTEwpIHsKIAkJCQkJKnAgPSAnXDAnOwotCQkJCQlhcmd2W2FyZ2MrK10g PSBwKzE7CisJCQkJCWFwcGVuZF9hcmd2KHAgKyAxKTsKIAkJCQl9CiAJCQl9IGVsc2Ugewot CQkJCWFyZ3ZbYXJnYysrXSA9IHN0cmR1cCgiLW8iKTsKLQkJCQlhcmd2W2FyZ2MrK10gPSBw OworCQkJCWFwcGVuZF9hcmd2KHN0cmR1cCgiLW8iKSk7CisJCQkJYXBwZW5kX2FyZ3YocCk7 CiAJCQl9CiAJCX0KLQotCSphcmdjcCA9IGFyZ2M7CiB9CiAKIAo= --------------040804020300050601020108-- From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 19:03:43 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31A18106564A; Sun, 4 Jan 2009 19:03:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 201768FC08; Sun, 4 Jan 2009 19:03:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04J3hxL071798; Sun, 4 Jan 2009 19:03:43 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04J3hNs071797; Sun, 4 Jan 2009 19:03:43 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901041903.n04J3hNs071797@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 19:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186745 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 19:03:43 -0000 Author: rwatson Date: Sun Jan 4 19:03:42 2009 New Revision: 186745 URL: http://svn.freebsd.org/changeset/base/186745 Log: Remove now-unused pr_ousrreq from struct protosw. It may not have been used since the last millenia. Modified: head/sys/sys/protosw.h Modified: head/sys/sys/protosw.h ============================================================================== --- head/sys/sys/protosw.h Sun Jan 4 18:18:59 2009 (r186744) +++ head/sys/sys/protosw.h Sun Jan 4 19:03:42 2009 (r186745) @@ -89,8 +89,6 @@ struct protosw { pr_output_t *pr_output; /* output to protocol (from above) */ pr_ctlinput_t *pr_ctlinput; /* control input (from below) */ pr_ctloutput_t *pr_ctloutput; /* control output (from above) */ -/* user-protocol hook */ - pr_usrreq_t *pr_ousrreq; /* utility hooks */ pr_init_t *pr_init; pr_fasttimo_t *pr_fasttimo; /* fast timeout (200ms) */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 19:16:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D07B9106566B; Sun, 4 Jan 2009 19:16:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEB748FC0C; Sun, 4 Jan 2009 19:16:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04JGal1072103; Sun, 4 Jan 2009 19:16:36 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04JGadR072101; Sun, 4 Jan 2009 19:16:36 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901041916.n04JGadR072101@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 19:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186746 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 19:16:38 -0000 Author: rwatson Date: Sun Jan 4 19:16:36 2009 New Revision: 186746 URL: http://svn.freebsd.org/changeset/base/186746 Log: Remove two further uses (debugging and NULLing) of pr_ousrreq, missed due to svn commit in the wrong directory. Spotted by: bz Modified: head/sys/kern/uipc_debug.c head/sys/kern/uipc_domain.c Modified: head/sys/kern/uipc_debug.c ============================================================================== --- head/sys/kern/uipc_debug.c Sun Jan 4 19:03:42 2009 (r186745) +++ head/sys/kern/uipc_debug.c Sun Jan 4 19:16:36 2009 (r186746) @@ -322,7 +322,6 @@ db_print_protosw(struct protosw *pr, con db_print_indent(indent); db_printf("pr_ctloutput: %p ", pr->pr_ctloutput); - db_printf("pr_ousrreq: %p ", pr->pr_ousrreq); db_printf("pr_init: %p\n", pr->pr_init); db_print_indent(indent); @@ -331,7 +330,6 @@ db_print_protosw(struct protosw *pr, con db_printf("pr_drain: %p\n", pr->pr_drain); db_print_indent(indent); - db_printf("pr_ousrreq: %p\n", pr->pr_ousrreq); } static void Modified: head/sys/kern/uipc_domain.c ============================================================================== --- head/sys/kern/uipc_domain.c Sun Jan 4 19:03:42 2009 (r186745) +++ head/sys/kern/uipc_domain.c Sun Jan 4 19:16:36 2009 (r186746) @@ -426,7 +426,6 @@ found: dpr->pr_output = NULL; dpr->pr_ctlinput = NULL; dpr->pr_ctloutput = NULL; - dpr->pr_ousrreq = NULL; dpr->pr_init = NULL; dpr->pr_fasttimo = NULL; dpr->pr_slowtimo = NULL; From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 19:22:54 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AC971065674; Sun, 4 Jan 2009 19:22:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1984B8FC13; Sun, 4 Jan 2009 19:22:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04JMrGN072276; Sun, 4 Jan 2009 19:22:53 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04JMrLt072275; Sun, 4 Jan 2009 19:22:53 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901041922.n04JMrLt072275@svn.freebsd.org> From: Ed Schouten Date: Sun, 4 Jan 2009 19:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186747 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 19:22:54 -0000 Author: ed Date: Sun Jan 4 19:22:53 2009 New Revision: 186747 URL: http://svn.freebsd.org/changeset/base/186747 Log: Remove Giant locking from domains list. During boot, the domain list is locked with Giant. It is not possible to register any protocols after the system has booted, so the lock is only used to protect insertion of entries. There is already a mutex in uipc_domain.c called dom_mtx. Use this mutex to lock the list, instead of using Giant. It won't matter anything with respect to performance, but we'll never get rid of Giant if we don't remove from places where we don't need it. Approved by: rwatson MFC after: 3 weeks Modified: head/sys/kern/uipc_domain.c Modified: head/sys/kern/uipc_domain.c ============================================================================== --- head/sys/kern/uipc_domain.c Sun Jan 4 19:16:36 2009 (r186746) +++ head/sys/kern/uipc_domain.c Sun Jan 4 19:22:53 2009 (r186747) @@ -72,7 +72,7 @@ static void pfslowtimo(void *); struct domain *domains; /* registered protocol domains */ int domain_init_status = 0; -struct mtx dom_mtx; /* domain list lock */ +static struct mtx dom_mtx; /* domain list lock */ MTX_SYSINIT(domain, &dom_mtx, "domain list", MTX_DEF); /* @@ -338,13 +338,13 @@ found: * Protect us against races when two protocol registrations for * the same protocol happen at the same time. */ - mtx_lock(&Giant); + mtx_lock(&dom_mtx); /* The new protocol must not yet exist. */ for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) { if ((pr->pr_type == npr->pr_type) && (pr->pr_protocol == npr->pr_protocol)) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (EEXIST); /* XXX: Check only protocol? */ } /* While here, remember the first free spacer. */ @@ -354,7 +354,7 @@ found: /* If no free spacer is found we can't add the new protocol. */ if (fpr == NULL) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (ENOMEM); } @@ -362,7 +362,7 @@ found: bcopy(npr, fpr, sizeof(*fpr)); /* Job is done, no more protection required. */ - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); /* Initialize and activate the protocol. */ protosw_init(fpr); @@ -398,13 +398,13 @@ found: dpr = NULL; /* Lock out everyone else while we are manipulating the protosw. */ - mtx_lock(&Giant); + mtx_lock(&dom_mtx); /* The protocol must exist and only once. */ for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) { if ((pr->pr_type == type) && (pr->pr_protocol == protocol)) { if (dpr != NULL) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (EMLINK); /* Should not happen! */ } else dpr = pr; @@ -413,7 +413,7 @@ found: /* Protocol does not exist. */ if (dpr == NULL) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (EPROTONOSUPPORT); } @@ -433,7 +433,7 @@ found: dpr->pr_usrreqs = &nousrreqs; /* Job is done, not more protection required. */ - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (0); } From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 19:23:45 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0679E106566C; Sun, 4 Jan 2009 19:23:45 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E95DA8FC19; Sun, 4 Jan 2009 19:23:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04JNi7x072343; Sun, 4 Jan 2009 19:23:44 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04JNiZc072342; Sun, 4 Jan 2009 19:23:44 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901041923.n04JNiZc072342@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 19:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186748 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 19:23:45 -0000 Author: rwatson Date: Sun Jan 4 19:23:44 2009 New Revision: 186748 URL: http://svn.freebsd.org/changeset/base/186748 Log: Remove reference to pr_ousrreq from domain(9) since it's now gone from struct protosw. Submitted by: bz MFC after: 3 weeks Modified: head/share/man/man9/domain.9 Modified: head/share/man/man9/domain.9 ============================================================================== --- head/share/man/man9/domain.9 Sun Jan 4 19:22:53 2009 (r186747) +++ head/share/man/man9/domain.9 Sun Jan 4 19:23:44 2009 (r186748) @@ -94,8 +94,6 @@ struct protosw { pr_output_t *pr_output; /* output to protocol (from above) */ pr_ctlinput_t *pr_ctlinput; /* control input (from below) */ pr_ctloutput_t *pr_ctloutput; /* control output (from above) */ -/* user-protocol hook */ - pr_usrreq_t *pr_ousrreq; /* utility hooks */ pr_init_t *pr_init; pr_fasttimo_t *pr_fasttimo; /* fast timeout (200ms) */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 20:43:26 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45D181065677; Sun, 4 Jan 2009 20:43:26 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from dhcp-172-28-76-114.eur.corp.google.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E31698FC1B; Sun, 4 Jan 2009 20:43:24 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <49611F6B.10802@FreeBSD.org> Date: Sun, 04 Jan 2009 20:43:23 +0000 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: obrien@freebsd.org References: <200812192020.mBJKKEIo081792@svn.freebsd.org> <20081223182314.GC25145@dragon.NUXI.org> In-Reply-To: <20081223182314.GC25145@dragon.NUXI.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Carlos A. M. dos Santos" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186337 - head/usr.sbin/burncd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 20:43:26 -0000 David O'Brien wrote: > On Sun, Dec 21, 2008 at 10:15:21AM -0200, Carlos A. M. dos Santos wrote: >> On Fri, Dec 19, 2008 at 6:20 PM, David E. O'Brien wrote: >>> Author: obrien >>> Date: Fri Dec 19 20:20:14 2008 >>> New Revision: 186337 >>> URL: http://svn.freebsd.org/changeset/base/186337 >>> >>> Log: >>> burncd(8) doesn't handle signals and interrupting burncd during operation. >>> For example, ^C (SIGINT) may leave the drive spinning and locked. >>> This may also happen if you try to write a too-large image to a disc >>> and burncd(8) exits with an I/O error. >>> >>> Add signal handling by doing a CDRIOCFLUSH ioctl to attempt to leave >>> burner in a sane state when burning is interrupted with SIGHUP, SIGINT, >>> SIGTERM, or in case an I/O error occurs during write. >>> Note, that blanking will still continue after interrupt but it seems to >>> finish correctly even after burncd(8) has quit. >>> >>> Also, while I'm here bump WARNS to "6". >>> >>> PR: 48730 >>> Submitted by: Jaakko Heinonen >> While you are here, would you mind taking a look at bin/123693, either >> committing the proposed patch or closing the PR if my proposition is >> not acceptable? > > Yep, I already have that patch to look at. Note it was hell getting the > patch - its best to not attach it when it will be base64 encoded - we > have no easy way of extracting such encoded attachements. > AFAIK, the web PR interface will detect base64-encoded attachments and present them for download. Kris From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 20:59:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A78F1065670; Sun, 4 Jan 2009 20:59:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48C6F8FC12; Sun, 4 Jan 2009 20:59:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04KxN5i074101; Sun, 4 Jan 2009 20:59:23 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04KxNhW074100; Sun, 4 Jan 2009 20:59:23 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901042059.n04KxNhW074100@svn.freebsd.org> From: Doug Barton Date: Sun, 4 Jan 2009 20:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186749 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 20:59:24 -0000 Author: dougb Date: Sun Jan 4 20:59:23 2009 New Revision: 186749 URL: http://svn.freebsd.org/changeset/base/186749 Log: Instead of using obj and all targets which are not cross-build aware, use _obj and everything which are. Submitted by: ru Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Sun Jan 4 19:23:44 2009 (r186748) +++ head/usr.sbin/mergemaster/mergemaster.sh Sun Jan 4 20:59:23 2009 (r186749) @@ -592,10 +592,11 @@ case "${RERUN}" in ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs ;; esac + od=${TEMPROOT}/usr/obj ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} obj SUBDIR_OVERRIDE=etc && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} all SUBDIR_OVERRIDE=etc && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || + MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || { echo ''; echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; echo " the temproot environment"; From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 21:13:51 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B48D106566B; Sun, 4 Jan 2009 21:13:51 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A0258FC1B; Sun, 4 Jan 2009 21:13:51 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04LDpdw074401; Sun, 4 Jan 2009 21:13:51 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04LDpiw074400; Sun, 4 Jan 2009 21:13:51 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901042113.n04LDpiw074400@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 21:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186750 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 21:13:52 -0000 Author: rwatson Date: Sun Jan 4 21:13:51 2009 New Revision: 186750 URL: http://svn.freebsd.org/changeset/base/186750 Log: struct ip6protosw is a copy of struct protosw, so remove pr_usrreq there to reflect removal from struct protosw. Spotted by: ed Modified: head/sys/netinet6/ip6protosw.h Modified: head/sys/netinet6/ip6protosw.h ============================================================================== --- head/sys/netinet6/ip6protosw.h Sun Jan 4 20:59:23 2009 (r186749) +++ head/sys/netinet6/ip6protosw.h Sun Jan 4 21:13:51 2009 (r186750) @@ -126,11 +126,6 @@ struct ip6protosw { int (*pr_ctloutput) /* control output (from above) */ __P((struct socket *, struct sockopt *)); -/* user-protocol hook */ - int (*pr_usrreq) /* user request: see list below */ - __P((struct socket *, int, struct mbuf *, - struct mbuf *, struct mbuf *, struct thread *)); - /* utility hooks */ void (*pr_init) /* initialization hook */ __P((void)); From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 21:53:43 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31F9F106574F; Sun, 4 Jan 2009 21:53:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 207468FC17; Sun, 4 Jan 2009 21:53:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04Lrhid075149; Sun, 4 Jan 2009 21:53:43 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04LrgkD075147; Sun, 4 Jan 2009 21:53:42 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901042153.n04LrgkD075147@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 21:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 21:53:44 -0000 Author: rwatson Date: Sun Jan 4 21:53:42 2009 New Revision: 186751 URL: http://svn.freebsd.org/changeset/base/186751 Log: Unlike with struct protosw, several instances of struct ip6protosw did not use C99-style sparse structure initialization, so remove NULL assignments for now-removed pr_usrreq function pointers. Reported by: Chris Ruiz Modified: head/sys/netinet6/in6_gif.c head/sys/netipsec/xform_ipip.c Modified: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Sun Jan 4 21:13:51 2009 (r186750) +++ head/sys/netinet6/in6_gif.c Sun Jan 4 21:53:42 2009 (r186751) @@ -78,7 +78,6 @@ extern struct domain inet6domain; struct ip6protosw in6_gif_protosw = { SOCK_RAW, &inet6domain, 0/* IPPROTO_IPV[46] */, PR_ATOMIC|PR_ADDR, in6_gif_input, rip6_output, 0, rip6_ctloutput, - 0, 0, 0, 0, 0, &rip6_usrreqs }; Modified: head/sys/netipsec/xform_ipip.c ============================================================================== --- head/sys/netipsec/xform_ipip.c Sun Jan 4 21:13:51 2009 (r186750) +++ head/sys/netipsec/xform_ipip.c Sun Jan 4 21:53:42 2009 (r186751) @@ -673,7 +673,6 @@ static struct ip6protosw ipe6_protosw = { SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR|PR_LASTHDR, ip4_input6, 0, 0, rip_ctloutput, - 0, 0, 0, 0, 0, &rip_usrreqs }; From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:07:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD8701065675; Sun, 4 Jan 2009 22:07:18 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 915F88FC20; Sun, 4 Jan 2009 22:07:18 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 8739C1CE79; Sun, 4 Jan 2009 23:07:16 +0100 (CET) Date: Sun, 4 Jan 2009 23:07:16 +0100 From: Ed Schouten To: Robert Watson Message-ID: <20090104220716.GL14235@hoeg.nl> References: <200901042153.n04LrgkD075147@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="P8VDRTGkfyc6BSVj" Content-Disposition: inline In-Reply-To: <200901042153.n04LrgkD075147@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:07:19 -0000 --P8VDRTGkfyc6BSVj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Robert Watson wrote: > Unlike with struct protosw, several instances of struct ip6protosw > did not use C99-style sparse structure initialization, so remove > NULL assignments for now-removed pr_usrreq function pointers. Maybe we should convert them to use the C99-style initialisation. This could prevent similar issues in the future, right? --=20 Ed Schouten WWW: http://80386.nl/ --P8VDRTGkfyc6BSVj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklhMxQACgkQ52SDGA2eCwXv6QCeMf6CL9/FbdPJb25zBCg9Ut6a rq4An38EgtqF9hi6UvF5JikTNko3PunJ =geSB -----END PGP SIGNATURE----- --P8VDRTGkfyc6BSVj-- From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:11:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00DFF106566C; Sun, 4 Jan 2009 22:11:25 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from dhcp-172-28-76-114.eur.corp.google.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DA1C08FC13; Sun, 4 Jan 2009 22:11:23 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <4961340B.5010306@FreeBSD.org> Date: Sun, 04 Jan 2009 22:11:23 +0000 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Konstantin Belousov References: <200901041556.n04Funod061146@svn.freebsd.org> In-Reply-To: <200901041556.n04Funod061146@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186740 - head/sys/gnu/fs/ext2fs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:11:25 -0000 Konstantin Belousov wrote: > Author: kib > Date: Sun Jan 4 15:56:49 2009 > New Revision: 186740 > URL: http://svn.freebsd.org/changeset/base/186740 > > Log: > Do not incorrectly add the low 5 bits of the offset to the resulting > position of the found zero bit. > > Submitted by: Jaakko Heinonen > MFC after: 2 weeks > > Modified: > head/sys/gnu/fs/ext2fs/ext2_bitops.h Does this fix ext2fs on amd64? Kris > Modified: head/sys/gnu/fs/ext2fs/ext2_bitops.h > ============================================================================== > --- head/sys/gnu/fs/ext2fs/ext2_bitops.h Sun Jan 4 15:49:30 2009 (r186739) > +++ head/sys/gnu/fs/ext2fs/ext2_bitops.h Sun Jan 4 15:56:49 2009 (r186740) > @@ -84,7 +84,7 @@ find_next_zero_bit(void *data, size_t sz > mask = ~0U << (ofs & 31); > bit = *p | ~mask; > if (bit != ~0U) > - return (ffs(~bit) + ofs - 1); > + return (ffs(~bit) + (ofs & ~31U) - 1); > p++; > ofs = (ofs + 31U) & ~31U; > } From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:14:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47DAC1065733; Sun, 4 Jan 2009 22:14:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 241E08FC1B; Sun, 4 Jan 2009 22:14:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id B3DD346B17; Sun, 4 Jan 2009 17:14:16 -0500 (EST) Date: Sun, 4 Jan 2009 22:14:16 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ed Schouten In-Reply-To: <20090104220716.GL14235@hoeg.nl> Message-ID: References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:14:17 -0000 On Sun, 4 Jan 2009, Ed Schouten wrote: > * Robert Watson wrote: >> Unlike with struct protosw, several instances of struct ip6protosw >> did not use C99-style sparse structure initialization, so remove >> NULL assignments for now-removed pr_usrreq function pointers. > > Maybe we should convert them to use the C99-style initialisation. This could > prevent similar issues in the future, right? I think Bjoern already has a work-in-progress on this one, but yes, that would be a good idea. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:15:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B479106567F; Sun, 4 Jan 2009 22:15:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AAEB8FC32; Sun, 4 Jan 2009 22:15:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04MFFvB075657; Sun, 4 Jan 2009 22:15:15 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04MFFjx075656; Sun, 4 Jan 2009 22:15:15 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901042215.n04MFFjx075656@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 22:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186752 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:15:17 -0000 Author: rwatson Date: Sun Jan 4 22:15:15 2009 New Revision: 186752 URL: http://svn.freebsd.org/changeset/base/186752 Log: Fix non-C99 initialization for protosw initializing pr_ousrreq. Modified: head/sys/netipsec/xform_ipip.c Modified: head/sys/netipsec/xform_ipip.c ============================================================================== --- head/sys/netipsec/xform_ipip.c Sun Jan 4 21:53:42 2009 (r186751) +++ head/sys/netipsec/xform_ipip.c Sun Jan 4 22:15:15 2009 (r186752) @@ -664,7 +664,6 @@ static struct protosw ipe4_protosw = { SOCK_RAW, &inetdomain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR|PR_LASTHDR, ip4_input, 0, 0, rip_ctloutput, - 0, 0, 0, 0, 0, &rip_usrreqs }; From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:17:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1463106564A; Sun, 4 Jan 2009 22:17:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 535B78FC18; Sun, 4 Jan 2009 22:17:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LJbI4-000IUq-9L; Mon, 05 Jan 2009 00:17:48 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n04MHgqH012169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Jan 2009 00:17:42 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n04MHgWQ099394; Mon, 5 Jan 2009 00:17:42 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n04MHgb1099393; Mon, 5 Jan 2009 00:17:42 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 5 Jan 2009 00:17:42 +0200 From: Kostik Belousov To: Kris Kennaway Message-ID: <20090104221742.GK93900@deviant.kiev.zoral.com.ua> References: <200901041556.n04Funod061146@svn.freebsd.org> <4961340B.5010306@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6K2R/cS9K4qvcBNq" Content-Disposition: inline In-Reply-To: <4961340B.5010306@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LJbI4-000IUq-9L 1564a66b36ad10949adc6ddcacf89c23 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186740 - head/sys/gnu/fs/ext2fs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:17:51 -0000 --6K2R/cS9K4qvcBNq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 04, 2009 at 10:11:23PM +0000, Kris Kennaway wrote: > Konstantin Belousov wrote: > >Author: kib > >Date: Sun Jan 4 15:56:49 2009 > >New Revision: 186740 > >URL: http://svn.freebsd.org/changeset/base/186740 > > > >Log: > > Do not incorrectly add the low 5 bits of the offset to the resulting > > position of the found zero bit. > > =20 > > Submitted by: Jaakko Heinonen > > MFC after: 2 weeks > > > >Modified: > > head/sys/gnu/fs/ext2fs/ext2_bitops.h >=20 > Does this fix ext2fs on amd64? Submitter claims that yes, I only tested the function that was patched. --6K2R/cS9K4qvcBNq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklhNYQACgkQC3+MBN1Mb4gGjgCfRLx7h9SnyFRNkg7g1RKTSSd+ zMgAnjMQd8XX1JIJ+skNJKU3cGhYFMB3 =PjiF -----END PGP SIGNATURE----- --6K2R/cS9K4qvcBNq-- From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:22:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA725106566C; Sun, 4 Jan 2009 22:22:09 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from dhcp-172-28-76-114.eur.corp.google.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8F4198FC12; Sun, 4 Jan 2009 22:22:08 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <4961368F.8090002@FreeBSD.org> Date: Sun, 04 Jan 2009 22:22:07 +0000 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Kostik Belousov References: <200901041556.n04Funod061146@svn.freebsd.org> <4961340B.5010306@FreeBSD.org> <20090104221742.GK93900@deviant.kiev.zoral.com.ua> In-Reply-To: <20090104221742.GK93900@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186740 - head/sys/gnu/fs/ext2fs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:22:10 -0000 Kostik Belousov wrote: > On Sun, Jan 04, 2009 at 10:11:23PM +0000, Kris Kennaway wrote: >> Konstantin Belousov wrote: >>> Author: kib >>> Date: Sun Jan 4 15:56:49 2009 >>> New Revision: 186740 >>> URL: http://svn.freebsd.org/changeset/base/186740 >>> >>> Log: >>> Do not incorrectly add the low 5 bits of the offset to the resulting >>> position of the found zero bit. >>> >>> Submitted by: Jaakko Heinonen >>> MFC after: 2 weeks >>> >>> Modified: >>> head/sys/gnu/fs/ext2fs/ext2_bitops.h >> Does this fix ext2fs on amd64? > > Submitter claims that yes, I only tested the function that was patched. Great! I thought I had filed a PR about this but can't find it now. Kris From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:24:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59B40106566B; Sun, 4 Jan 2009 22:24:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48AD68FC08; Sun, 4 Jan 2009 22:24:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04MOl78075868; Sun, 4 Jan 2009 22:24:47 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04MOlK7075867; Sun, 4 Jan 2009 22:24:47 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901042224.n04MOlK7075867@svn.freebsd.org> From: Ed Schouten Date: Sun, 4 Jan 2009 22:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186753 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:24:49 -0000 Author: ed Date: Sun Jan 4 22:24:47 2009 New Revision: 186753 URL: http://svn.freebsd.org/changeset/base/186753 Log: Fix rendering glitch in cons25 emulation. Because we now have cons25-style linewrapping, we must also use cons25- style reverse linewrapping. This means that a ^H on column 0 will move the cursor one line up. Also fix a small regression: if the user invokes a RIS (Reset to Initial State), we must show the cursor again. Spotted by: Paul B. Mahol Modified: head/sys/dev/syscons/teken/teken_subr.h Modified: head/sys/dev/syscons/teken/teken_subr.h ============================================================================== --- head/sys/dev/syscons/teken/teken_subr.h Sun Jan 4 22:15:15 2009 (r186752) +++ head/sys/dev/syscons/teken/teken_subr.h Sun Jan 4 22:24:47 2009 (r186753) @@ -198,11 +198,22 @@ static void teken_subr_backspace(teken_t *t) { +#ifdef TEKEN_CONS25 + if (t->t_cursor.tp_col == 0) { + if (t->t_cursor.tp_row == t->t_originreg.ts_begin) + return; + t->t_cursor.tp_row--; + t->t_cursor.tp_col = t->t_winsize.tp_col - 1; + } else { + t->t_cursor.tp_col--; + } +#else /* !TEKEN_CONS25 */ if (t->t_cursor.tp_col == 0) return; t->t_cursor.tp_col--; t->t_stateflags &= ~TS_WRAPPED; +#endif /* TEKEN_CONS25 */ teken_funcs_cursor(t); } @@ -862,6 +873,7 @@ teken_subr_reset_to_initial_state(teken_ teken_subr_do_reset(t); teken_subr_erase_display(t, 2); + teken_funcs_param(t, TP_SHOWCURSOR, 1); teken_funcs_cursor(t); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 05:00:36 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0633F1065675; Mon, 5 Jan 2009 05:00:36 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id E46CB8FC13; Mon, 5 Jan 2009 05:00:35 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id CBDEC1A3C3A; Sun, 4 Jan 2009 21:00:35 -0800 (PST) Date: Sun, 4 Jan 2009 21:00:35 -0800 From: Alfred Perlstein To: Christoph Mallon Message-ID: <20090105050035.GW60686@elvis.mu.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <4960D501.70607@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4960D501.70607@gmx.de> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:00:36 -0000 * Christoph Mallon [090104 07:52] wrote: > Alfred Perlstein schrieb: > >Author: alfred > >Date: Sun Jan 4 00:12:01 2009 > >New Revision: 186730 > >URL: http://svn.freebsd.org/changeset/base/186730 > > > >Log: > >[...] > > Make "libusb20_desc_foreach()" more readable. > > In my part of the world we give credit or, at the very least, say "thank > you" to the sender, when we apply patches sent to us. > > > Disappointedly > Christoph Was this something you submitted to Hans? If so I will ask him to try to retain credits going forward. -- - Alfred Perlstein From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 05:04:15 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4FEB1065674; Mon, 5 Jan 2009 05:04:15 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id BF2C18FC13; Mon, 5 Jan 2009 05:04:15 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id A07471A3C3A; Sun, 4 Jan 2009 21:04:15 -0800 (PST) Date: Sun, 4 Jan 2009 21:04:15 -0800 From: Alfred Perlstein To: "M. Warner Losh" Message-ID: <20090105050415.GY60686@elvis.mu.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090104.101121.2139791946.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090104.101121.2139791946.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:04:16 -0000 * M. Warner Losh [090104 09:11] wrote: > In message: <200901040012.n040C2gH040928@svn.freebsd.org> > Alfred Perlstein writes: > : Sync with usb4bsd: > > Alfred, > > thanks for trudging these fixes into the tree. It is a thankless job > that people will complain about... > > Speaking of complaining, is there a review process that can be joined > for them that's more formal than "diff against hps' p4 tree and > complain?" We're trying to figure out a way to do this. We haven't had much luck exploring svk/hg/git as they're just about as much work as shipping patches back and forth. I asked core for a restricted "users/hps" area under svn for Hans to put code, but that was denied, perhaps now it's time to reconsider that? -- - Alfred Perlstein From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 05:14:26 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8BCA1065674; Mon, 5 Jan 2009 05:14:26 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96E618FC16; Mon, 5 Jan 2009 05:14:26 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n055EQki085693; Mon, 5 Jan 2009 05:14:26 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n055EQsG085692; Mon, 5 Jan 2009 05:14:26 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200901050514.n055EQsG085692@svn.freebsd.org> From: Joseph Koshy Date: Mon, 5 Jan 2009 05:14:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186758 - head/lib/libelf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:14:27 -0000 Author: jkoshy Date: Mon Jan 5 05:14:26 2009 New Revision: 186758 URL: http://svn.freebsd.org/changeset/base/186758 Log: Add a README. Added: head/lib/libelf/README (contents, props changed) Added: head/lib/libelf/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libelf/README Mon Jan 5 05:14:26 2009 (r186758) @@ -0,0 +1,12 @@ +# $FreeBSD$ +# $NetBSD$ + +libelf: a BSD-licensed implementation of the ELF(3)/GELF(3) API. + +Documentation: + * Manual page elf.3 contains an overview of the library. Other + manual pages document individual APIs in the library. + * A tutorial "libelf by Example" is available at: + http://people.freebsd.org/~jkoshy/download/libelf/article.html + +For ongoing development please see http://elftoolchain.sourceforge.net/ From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 12:10:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECBE5106566C; Mon, 5 Jan 2009 12:10:23 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBA5C8FC12; Mon, 5 Jan 2009 12:10:23 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05CAMjF095671; Mon, 5 Jan 2009 12:10:22 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05CAMba095670; Mon, 5 Jan 2009 12:10:22 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200901051210.n05CAMba095670@svn.freebsd.org> From: Tom Rhodes Date: Mon, 5 Jan 2009 12:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186768 - head/sbin/mount_msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 12:10:24 -0000 Author: trhodes Date: Mon Jan 5 12:10:22 2009 New Revision: 186768 URL: http://svn.freebsd.org/changeset/base/186768 Log: Add missing qualifier which was missed in the previous commit. Noticed by: brooks Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 ============================================================================== --- head/sbin/mount_msdosfs/mount_msdosfs.8 Mon Jan 5 10:43:48 2009 (r186767) +++ head/sbin/mount_msdosfs/mount_msdosfs.8 Mon Jan 5 12:10:22 2009 (r186768) @@ -75,7 +75,7 @@ The following MSDOS file system-specific .Bl -tag -width indent .It Cm large Support file systems larger than 128 gigabytes at the expense -of 32 bytes of kernel memory. +of 32 bytes of kernel memory for each file on disk. This memory will not be reclaimed until the file system has been unmounted. .It Cm longnames From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 12:18:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D93DE106566B; Mon, 5 Jan 2009 12:18:46 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C82578FC12; Mon, 5 Jan 2009 12:18:46 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05CIkJb095856; Mon, 5 Jan 2009 12:18:46 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05CIk9G095855; Mon, 5 Jan 2009 12:18:46 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200901051218.n05CIk9G095855@svn.freebsd.org> From: Tom Rhodes Date: Mon, 5 Jan 2009 12:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186769 - head/lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 12:18:47 -0000 Author: trhodes Date: Mon Jan 5 12:18:46 2009 New Revision: 186769 URL: http://svn.freebsd.org/changeset/base/186769 Log: Note that the protocol argument can be set to 0. PR: 127890 Reviewed by: rwatson Modified: head/lib/libc/sys/socket.2 Modified: head/lib/libc/sys/socket.2 ============================================================================== --- head/lib/libc/sys/socket.2 Mon Jan 5 12:10:22 2009 (r186768) +++ head/lib/libc/sys/socket.2 Mon Jan 5 12:18:46 2009 (r186769) @@ -28,7 +28,7 @@ .\" From: @(#)socket.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 4, 2008 +.Dd January 5, 2009 .Dt SOCKET 2 .Os .Sh NAME @@ -131,6 +131,11 @@ in which communication is to take place; see .Xr protocols 5 . .Pp +The +.Fa protocol +argument may be set to zero (0) to request the default +implementation of a socket type for the protocol, if any. +.Pp Sockets of type .Dv SOCK_STREAM are full-duplex byte streams, similar From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 12:35:37 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85ABB10656C2; Mon, 5 Jan 2009 12:35:37 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from pittgoth.com (pittgoth.com [205.134.163.206]) by mx1.freebsd.org (Postfix) with ESMTP id 435C38FC0C; Mon, 5 Jan 2009 12:35:37 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from localhost.fbsdsecure.org (c-68-83-213-214.hsd1.va.comcast.net [68.83.213.214]) (authenticated bits=0) by pittgoth.com (8.14.3/8.14.3) with ESMTP id n05CAu8o026338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 5 Jan 2009 07:10:57 -0500 (EST) (envelope-from trhodes@FreeBSD.org) Date: Mon, 5 Jan 2009 07:10:55 -0500 From: Tom Rhodes To: Brooks Davis Message-Id: <20090105071055.569e16c3.trhodes@FreeBSD.org> In-Reply-To: <20090102165652.GA8152@lor.one-eyed-alien.net> References: <200812231335.mBNDZRBZ003693@svn.freebsd.org> <20090102165652.GA8152@lor.one-eyed-alien.net> X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186429 - head/sbin/mount_msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 12:35:39 -0000 On Fri, 2 Jan 2009 10:56:52 -0600 Brooks Davis wrote: > On Tue, Dec 23, 2008 at 01:35:27PM +0000, Tom Rhodes wrote: > > Author: trhodes > > Date: Tue Dec 23 13:35:26 2008 > > New Revision: 186429 > > URL: http://svn.freebsd.org/changeset/base/186429 > > > > Log: > > Document the "-o large" option. > > > > PR: 129792 > > > > Modified: > > head/sbin/mount_msdosfs/mount_msdosfs.8 > > > > Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 > > ============================================================================== > > --- head/sbin/mount_msdosfs/mount_msdosfs.8 Tue Dec 23 13:09:17 2008 (r186428) > > +++ head/sbin/mount_msdosfs/mount_msdosfs.8 Tue Dec 23 13:35:26 2008 (r186429) > > @@ -30,7 +30,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd April 7, 1994 > > +.Dd December 23, 2008 > > .Dt MOUNT_MSDOSFS 8 > > .Os > > .Sh NAME > > @@ -73,6 +73,11 @@ as described in > > .Xr mount 8 . > > The following MSDOS file system-specific options are available: > > .Bl -tag -width indent > > +.It Cm large > > +Support file systems larger than 128 gigabytes at the expense > > +of 32 bytes of kernel memory. > > The second half of this sentence doesn't make sense. If it's 32-bytes > per file system, that's not worth mentioning since the mount table > entry is going to be a bigger than that. Presumably there's a missing > qualifier like "per file opened" or something. For each file on disk, I've committed a fix, thanks! -- Tom Rhodes From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 13:46:26 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66B4D106566B; Mon, 5 Jan 2009 13:46:26 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 25C478FC17; Mon, 5 Jan 2009 13:46:26 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 09C946D43F; Mon, 5 Jan 2009 13:46:25 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E4B9E844F2; Mon, 5 Jan 2009 14:46:24 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Luigi Rizzo References: <200812262231.mBQMVjHC052150@svn.freebsd.org> Date: Mon, 05 Jan 2009 14:46:24 +0100 In-Reply-To: <200812262231.mBQMVjHC052150@svn.freebsd.org> (Luigi Rizzo's message of "Fri, 26 Dec 2008 22:31:45 +0000 (UTC)") Message-ID: <867i59lvbj.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186502 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 13:46:27 -0000 Luigi Rizzo writes: > Log: > Clarify the behaviour of conditionals when dealing with comparisons. > In particular, point out that string comparison can only use !=3D and = =3D=3D > (how weird, given that the underlying call to strcmp returns more > information), that floating point values are correctly interpreted > as numbers, and that the left-hand side must be a variable expansion. Any chance of fixing items 1 and 3? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 13:55:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFCB3106566B; Mon, 5 Jan 2009 13:55:17 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCECD8FC0C; Mon, 5 Jan 2009 13:55:17 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05DtHeF097994; Mon, 5 Jan 2009 13:55:17 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05DtHoD097993; Mon, 5 Jan 2009 13:55:17 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200901051355.n05DtHoD097993@svn.freebsd.org> From: Randall Stewart Date: Mon, 5 Jan 2009 13:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186775 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 13:55:18 -0000 Author: rrs Date: Mon Jan 5 13:55:17 2009 New Revision: 186775 URL: http://svn.freebsd.org/changeset/base/186775 Log: Add the missing PRU_FLUSH and 'FLUSH' defines noticed by rwatson. Opps.. Modified: head/sys/sys/protosw.h Modified: head/sys/sys/protosw.h ============================================================================== --- head/sys/sys/protosw.h Mon Jan 5 13:18:39 2009 (r186774) +++ head/sys/sys/protosw.h Mon Jan 5 13:55:17 2009 (r186775) @@ -170,7 +170,8 @@ struct protosw { #define PRU_SEND_EOF 22 /* send and close */ #define PRU_SOSETLABEL 23 /* MAC label change */ #define PRU_CLOSE 24 /* socket close */ -#define PRU_NREQ 24 +#define PRU_FLUSH 25 /* flush the socket */ +#define PRU_NREQ 25 #ifdef PRUREQUESTS const char *prurequests[] = { @@ -180,7 +181,7 @@ const char *prurequests[] = { "SENSE", "RCVOOB", "SENDOOB", "SOCKADDR", "PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO", "PROTORCV", "PROTOSEND", "SEND_EOF", "SOSETLABEL", - "CLOSE", + "CLOSE", "FLUSH", }; #endif From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 13:56:19 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE2391065672; Mon, 5 Jan 2009 13:56:18 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id ABC278FC17; Mon, 5 Jan 2009 13:56:18 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id D31A26D43F; Mon, 5 Jan 2009 13:56:17 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id B4634844F2; Mon, 5 Jan 2009 14:56:17 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "David E. O'Brien" References: <200812231757.mBNHvI9c009238@svn.freebsd.org> Date: Mon, 05 Jan 2009 14:56:17 +0100 In-Reply-To: <200812231757.mBNHvI9c009238@svn.freebsd.org> (David E. O'Brien's message of "Tue, 23 Dec 2008 17:57:18 +0000 (UTC)") Message-ID: <863afxluv2.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186444 - head/usr.sbin/burncd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 13:56:20 -0000 "David E. O'Brien" writes: > -static int global_fd_for_cleanup, quiet, verbose, saved_block_size, notr= acks; > +static int quiet, verbose, saved_block_size, notracks; > +static volatile int global_fd_for_cleanup; The correct type is sig_atomic_t (which in FreeBSD is either int or long depending on the platform) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 14:21:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32180106564A; Mon, 5 Jan 2009 14:21:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 204BB8FC16; Mon, 5 Jan 2009 14:21:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05ELoxA098514; Mon, 5 Jan 2009 14:21:50 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05ELnlC098512; Mon, 5 Jan 2009 14:21:49 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901051421.n05ELnlC098512@svn.freebsd.org> From: Robert Watson Date: Mon, 5 Jan 2009 14:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186776 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 14:21:50 -0000 Author: rwatson Date: Mon Jan 5 14:21:49 2009 New Revision: 186776 URL: http://svn.freebsd.org/changeset/base/186776 Log: Add commented out options KDTRACE_HOOKS and, for amd64, KDRACE_FRAME, to GENERIC configuration files. This brings what's in 8.x in sync with what is in 7.x, but does not change any current defaults. Possibly they should now be enabled in head by default? Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Mon Jan 5 13:55:17 2009 (r186775) +++ head/sys/amd64/conf/GENERIC Mon Jan 5 14:21:49 2009 (r186776) @@ -65,6 +65,8 @@ options KBD_INSTALL_CDEV # install a CD options STOP_NMI # Stop CPUS using NMI instead of IPI options AUDIT # Security event auditing options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +#options KDTRACE_FRAME # Ensure frames are compiled in +#options KDTRACE_HOOKS # Kernel DTrace hooks # Debugging for use in -current options KDB # Enable kernel debugger support. Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Mon Jan 5 13:55:17 2009 (r186775) +++ head/sys/i386/conf/GENERIC Mon Jan 5 14:21:49 2009 (r186776) @@ -65,6 +65,7 @@ options KBD_INSTALL_CDEV # install a CD options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing +#options KDTRACE_HOOKS # Kernel DTrace hooks # Debugging for use in -current options KDB # Enable kernel debugger support. From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 14:24:33 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A51B81065670; Mon, 5 Jan 2009 14:24:33 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 60D078FC1E; Mon, 5 Jan 2009 14:24:33 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 7189B73098; Mon, 5 Jan 2009 15:29:29 +0100 (CET) Date: Mon, 5 Jan 2009 15:29:29 +0100 From: Luigi Rizzo To: Dag-Erling Sm??rgrav Message-ID: <20090105142929.GA70683@onelab2.iet.unipi.it> References: <200812262231.mBQMVjHC052150@svn.freebsd.org> <867i59lvbj.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <867i59lvbj.fsf@ds4.des.no> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r186502 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 14:24:34 -0000 On Mon, Jan 05, 2009 at 02:46:24PM +0100, Dag-Erling Sm??rgrav wrote: > Luigi Rizzo writes: > > Log: > > Clarify the behaviour of conditionals when dealing with comparisons. > > In particular, point out that string comparison can only use != and == > > (how weird, given that the underlying call to strcmp returns more > > information), that floating point values are correctly interpreted > > as numbers, and that the left-hand side must be a variable expansion. > > Any chance of fixing items 1 and 3? item 1 is easy except perhaps for Locale issues which however should not be a big deal in this context. item 3 should also be easy. But the thing i wonder about is whether there is any standard that mandates this beviour, or we are relatively free to make enhancements to our "make" program. cheers luigi From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 15:18:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119C11065673; Mon, 5 Jan 2009 15:18:17 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1E068FC16; Mon, 5 Jan 2009 15:18:16 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05FIGx6099942; Mon, 5 Jan 2009 15:18:16 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05FIGli099929; Mon, 5 Jan 2009 15:18:16 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200901051518.n05FIGli099929@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 5 Jan 2009 15:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186781 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 15:18:17 -0000 Author: lulf Date: Mon Jan 5 15:18:16 2009 New Revision: 186781 URL: http://svn.freebsd.org/changeset/base/186781 Log: Merge support for CVSMode (aka. mirror mode) into csup. This means csup can now fetch a complete CVS repository. Support for rsync update of regular files are also included, but are not yet enabled. The change should not have an impact on existing csup usage, as little of the existing code has changed. Added: head/contrib/csup/lex.rcs.c - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/lex.rcs.c head/contrib/csup/rcsfile.c - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcsfile.c head/contrib/csup/rcsfile.h - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcsfile.h head/contrib/csup/rcsparse.c - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcsparse.c head/contrib/csup/rcsparse.h - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcsparse.h head/contrib/csup/rcstokenizer.h - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcstokenizer.h head/contrib/csup/rcstokenizer.l - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcstokenizer.l head/contrib/csup/rsyncfile.c - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rsyncfile.c head/contrib/csup/rsyncfile.h - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rsyncfile.h Modified: head/contrib/csup/ (props changed) head/contrib/csup/GNUmakefile head/contrib/csup/Makefile head/contrib/csup/TODO head/contrib/csup/config.c head/contrib/csup/detailer.c head/contrib/csup/diff.c head/contrib/csup/diff.h head/contrib/csup/fattr.c head/contrib/csup/fattr.h head/contrib/csup/keyword.c head/contrib/csup/keyword.h head/contrib/csup/lister.c head/contrib/csup/misc.c head/contrib/csup/misc.h head/contrib/csup/mux.c head/contrib/csup/proto.c head/contrib/csup/proto.h head/contrib/csup/status.c head/contrib/csup/stream.c head/contrib/csup/stream.h head/contrib/csup/updater.c head/usr.bin/csup/ (props changed) head/usr.bin/csup/Makefile Modified: head/contrib/csup/GNUmakefile ============================================================================== --- head/contrib/csup/GNUmakefile Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/GNUmakefile Mon Jan 5 15:18:16 2009 (r186781) @@ -12,8 +12,9 @@ GROUP?= 0 UNAME= $(shell uname -s) SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ - globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c pathcomp.c \ - parse.c proto.c status.c stream.c threads.c token.c updater.c + globtree.c idcache.c keyword.c lex.rcs.c lister.c main.c misc.c mux.c \ + pathcomp.c parse.c proto.c rcsfile.c rcsparse.c rsyncfile.c status.c \ + stream.c threads.c token.c updater.c OBJS= $(SRCS:.c=.o) WARNS= -Wall -W -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith \ Modified: head/contrib/csup/Makefile ============================================================================== --- head/contrib/csup/Makefile Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/Makefile Mon Jan 5 15:18:16 2009 (r186781) @@ -9,10 +9,11 @@ UNAME!= /usr/bin/uname -s PROG= csup SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \ - pathcomp.c proto.c status.c stream.c threads.c token.l updater.c + pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \ + rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c CFLAGS+= -I. -I${.CURDIR} -g -pthread -DHAVE_FFLAGS -DNDEBUG -WARNS?= 6 +WARNS?= 1 # A bit of tweaking is needed to get this Makefile working # with the bsd.prog.mk of all the *BSD OSes... Modified: head/contrib/csup/TODO ============================================================================== --- head/contrib/csup/TODO Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/TODO Mon Jan 5 15:18:16 2009 (r186781) @@ -28,4 +28,3 @@ MISSING FEATURES: checkout files (files in CVS/ subdirectores), a command line override to only update a specific collection and a third verbosity level to display commit log messages. -- Add support for CVS mode (maybe?). Modified: head/contrib/csup/config.c ============================================================================== --- head/contrib/csup/config.c Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/config.c Mon Jan 5 15:18:16 2009 (r186781) @@ -133,7 +133,6 @@ config_init(const char *file, struct col coll->co_options &= ~CO_CHECKRCS; /* In recent versions, we always try to set the file modes. */ coll->co_options |= CO_SETMODE; - /* XXX We don't support the rsync updating algorithm yet. */ coll->co_options |= CO_NORSYNC; error = config_parse_refusefiles(coll); if (error) @@ -444,10 +443,6 @@ coll_add(char *name) "\"%s\"\n", cur_coll->co_name); exit(1); } - if (!(cur_coll->co_options & CO_CHECKOUTMODE)) { - lprintf(-1, "Client only supports checkout mode\n"); - exit(1); - } if (!STAILQ_EMPTY(&colls)) { coll = STAILQ_LAST(&colls, coll, co_next); if (strcmp(coll->co_host, cur_coll->co_host) != 0) { Modified: head/contrib/csup/detailer.c ============================================================================== --- head/contrib/csup/detailer.c Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/detailer.c Mon Jan 5 15:18:16 2009 (r186781) @@ -30,13 +30,21 @@ #include #include #include +#include + +#include +#include +#include #include "config.h" #include "detailer.h" #include "fixups.h" +#include "globtree.h" #include "misc.h" #include "mux.h" #include "proto.h" +#include "rcsfile.h" +#include "rsyncfile.h" #include "status.h" #include "stream.h" @@ -56,8 +64,16 @@ struct detailer { static int detailer_batch(struct detailer *); static int detailer_coll(struct detailer *, struct coll *, struct status *); -static int detailer_dofile(struct detailer *, struct coll *, +static int detailer_dofile_co(struct detailer *, struct coll *, struct status *, char *); +static int detailer_dofile_rcs(struct detailer *, struct coll *, + char *, char *); +static int detailer_dofile_regular(struct detailer *, char *, char *); +static int detailer_dofile_rsync(struct detailer *, char *, char *); +static int detailer_checkrcsattr(struct detailer *, struct coll *, char *, + struct fattr *, int); +int detailer_send_details(struct detailer *, struct coll *, char *, + char *, struct fattr *); void * detailer(void *arg) @@ -186,8 +202,13 @@ detailer_batch(struct detailer *d) } if (fixup->f_coll != coll) break; - error = proto_printf(wr, "Y %s %s %s\n", fixup->f_name, - coll->co_tag, coll->co_date); + if (coll->co_options & CO_CHECKOUTMODE) + error = proto_printf(wr, "Y %s %s %s\n", + fixup->f_name, coll->co_tag, coll->co_date); + else { + error = proto_printf(wr, "A %s\n", + fixup->f_name); + } if (error) return (DETAILER_ERR_WRITE); fixup = NULL; @@ -208,12 +229,14 @@ detailer_batch(struct detailer *d) static int detailer_coll(struct detailer *d, struct coll *coll, struct status *st) { + struct fattr *rcsattr; struct stream *rd, *wr; - char *cmd, *file, *line, *msg; - int error; + char *attr, *cmd, *file, *line, *msg, *path, *target; + int error, attic; rd = d->rd; wr = d->wr; + attic = 0; line = stream_getln(rd, NULL); if (line == NULL) return (DETAILER_ERR_READ); @@ -226,17 +249,84 @@ detailer_coll(struct detailer *d, struct /* Delete file. */ file = proto_get_ascii(&line); if (file == NULL || line != NULL) - return (DETAILER_ERR_PROTO); + return (DETAILER_ERR_PROTO); error = proto_printf(wr, "D %s\n", file); if (error) return (DETAILER_ERR_WRITE); break; + case 'I': + case 'i': + case 'j': + /* Directory operations. */ + file = proto_get_ascii(&line); + if (file == NULL || line != NULL) + return (DETAILER_ERR_PROTO); + error = proto_printf(wr, "%s %s\n", cmd, file); + if (error) + return (DETAILER_ERR_WRITE); + break; + case 'J': + /* Set directory attributes. */ + file = proto_get_ascii(&line); + attr = proto_get_ascii(&line); + if (file == NULL || line != NULL || attr == NULL) + return (DETAILER_ERR_PROTO); + error = proto_printf(wr, "%s %s %s\n", cmd, file, attr); + if (error) + return (DETAILER_ERR_WRITE); + break; + case 'H': + case 'h': + /* Create a hard link. */ + file = proto_get_ascii(&line); + target = proto_get_ascii(&line); + if (file == NULL || target == NULL) + return (DETAILER_ERR_PROTO); + error = proto_printf(wr, "%s %s %s\n", cmd, file, + target); + break; + case 't': + file = proto_get_ascii(&line); + attr = proto_get_ascii(&line); + if (file == NULL || attr == NULL || line != NULL) { + return (DETAILER_ERR_PROTO); + } + rcsattr = fattr_decode(attr); + if (rcsattr == NULL) { + return (DETAILER_ERR_PROTO); + } + error = detailer_checkrcsattr(d, coll, file, rcsattr, + 1); + break; + + case 'T': + file = proto_get_ascii(&line); + attr = proto_get_ascii(&line); + if (file == NULL || attr == NULL || line != NULL) + return (DETAILER_ERR_PROTO); + rcsattr = fattr_decode(attr); + if (rcsattr == NULL) + return (DETAILER_ERR_PROTO); + error = detailer_checkrcsattr(d, coll, file, rcsattr, + 0); + break; + case 'U': /* Add or update file. */ file = proto_get_ascii(&line); if (file == NULL || line != NULL) return (DETAILER_ERR_PROTO); - error = detailer_dofile(d, coll, st, file); + if (coll->co_options & CO_CHECKOUTMODE) { + error = detailer_dofile_co(d, coll, st, file); + } else { + path = cvspath(coll->co_prefix, file, 0); + rcsattr = fattr_frompath(path, FATTR_NOFOLLOW); + error = detailer_send_details(d, coll, file, + path, rcsattr); + if (rcsattr != NULL) + fattr_free(rcsattr); + free(path); + } if (error) return (error); break; @@ -261,14 +351,110 @@ detailer_coll(struct detailer *d, struct return (0); } +/* + * Tell the server to update a regular file. + */ static int -detailer_dofile(struct detailer *d, struct coll *coll, struct status *st, - char *file) +detailer_dofile_regular(struct detailer *d, char *name, char *path) { + struct stream *wr; + struct stat st; char md5[MD5_DIGEST_SIZE]; + int error; + + wr = d->wr; + error = stat(path, &st); + /* If we don't have it or it's unaccessible, we want it again. */ + if (error) { + proto_printf(wr, "A %s\n", name); + return (0); + } + + /* If not, we want the file to be updated. */ + error = MD5_File(path, md5); + if (error) { + lprintf(-1, "Error reading \"%s\"\n", name); + return (error); + } + error = proto_printf(wr, "R %s %O %s\n", name, st.st_size, md5); + if (error) + return (DETAILER_ERR_WRITE); + return (0); +} + +/* + * Tell the server to update a file with the rsync algorithm. + */ +static int +detailer_dofile_rsync(struct detailer *d, char *name, char *path) +{ + struct stream *wr; + struct rsyncfile *rf; + + wr = d->wr; + rf = rsync_open(path, 0, 1); + if (rf == NULL) { + /* Fallback if we fail in opening it. */ + proto_printf(wr, "A %s\n", name); + return (0); + } + proto_printf(wr, "r %s %z %z\n", name, rsync_filesize(rf), + rsync_blocksize(rf)); + /* Detail the blocks. */ + while (rsync_nextblock(rf) != 0) + proto_printf(wr, "%s %s\n", rsync_rsum(rf), rsync_blockmd5(rf)); + proto_printf(wr, ".\n"); + rsync_close(rf); + return (0); +} + +/* + * Tell the server to update an RCS file that we have, or send it if we don't. + */ +static int +detailer_dofile_rcs(struct detailer *d, struct coll *coll, char *name, + char *path) +{ + struct stream *wr; + struct fattr *fa; + struct rcsfile *rf; + int error; + + wr = d->wr; + path = atticpath(coll->co_prefix, name); + fa = fattr_frompath(path, FATTR_NOFOLLOW); + if (fa == NULL) { + /* We don't have it, so send request to get it. */ + error = proto_printf(wr, "A %s\n", name); + if (error) + return (DETAILER_ERR_WRITE); + free(path); + return (0); + } + + rf = rcsfile_frompath(path, name, coll->co_cvsroot, coll->co_tag, 1); + free(path); + if (rf == NULL) { + error = proto_printf(wr, "A %s\n", name); + if (error) + return (DETAILER_ERR_WRITE); + return (0); + } + /* Tell to update the RCS file. The client version details follow. */ + rcsfile_send_details(rf, wr); + rcsfile_free(rf); + fattr_free(fa); + return (0); +} + +static int +detailer_dofile_co(struct detailer *d, struct coll *coll, struct status *st, + char *file) +{ struct stream *wr; struct fattr *fa; struct statusrec *sr; + char md5[MD5_DIGEST_SIZE]; char *path; int error, ret; @@ -337,3 +523,81 @@ detailer_dofile(struct detailer *d, stru return (DETAILER_ERR_WRITE); return (0); } + +int +detailer_checkrcsattr(struct detailer *d, struct coll *coll, char *name, + struct fattr *server_attr, int attic) +{ + struct fattr *client_attr; + char *attr, *path; + int error; + + /* + * I don't think we can use the status file, since it only records file + * attributes in cvsmode. + */ + client_attr = NULL; + path = cvspath(coll->co_prefix, name, attic); + if (path == NULL) { + return (DETAILER_ERR_PROTO); + } + + if (access(path, F_OK) == 0 && + ((client_attr = fattr_frompath(path, FATTR_NOFOLLOW)) != NULL) && + fattr_equal(client_attr, server_attr)) { + attr = fattr_encode(client_attr, NULL, 0); + if (attic) { + error = proto_printf(d->wr, "l %s %s\n", name, attr); + } else { + error = proto_printf(d->wr, "L %s %s\n", name, attr); + } + free(attr); + free(path); + fattr_free(client_attr); + if (error) + return (DETAILER_ERR_WRITE); + return (0); + } + /* We don't have it, so tell the server to send it. */ + error = detailer_send_details(d, coll, name, path, client_attr); + fattr_free(client_attr); + free(path); + return (error); +} + +int +detailer_send_details(struct detailer *d, struct coll *coll, char *name, + char *path, struct fattr *fa) +{ + int error; + size_t len; + + /* + * Try to check if the file exists either live or dead to see if we can + * edit it and put it live or dead, rather than receiving the entire + * file. + */ + if (fa == NULL) { + path = atticpath(coll->co_prefix, name); + fa = fattr_frompath(path, FATTR_NOFOLLOW); + } + if (fa == NULL) { + error = proto_printf(d->wr, "A %s\n", name); + if (error) + return (DETAILER_ERR_WRITE); + } else if (fattr_type(fa) == FT_FILE) { + if (isrcs(name, &len) && !(coll->co_options & CO_NORCS)) { + detailer_dofile_rcs(d, coll, name, path); + } else if (!(coll->co_options & CO_NORSYNC) && + !globtree_test(coll->co_norsync, name)) { + detailer_dofile_rsync(d, name, path); + } else { + detailer_dofile_regular(d, name, path); + } + } else { + error = proto_printf(d->wr, "N %s\n", name); + if (error) + return (DETAILER_ERR_WRITE); + } + return (0); +} Modified: head/contrib/csup/diff.c ============================================================================== --- head/contrib/csup/diff.c Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/diff.c Mon Jan 5 15:18:16 2009 (r186781) @@ -26,9 +26,12 @@ * $FreeBSD$ */ +#include + #include #include #include +#include #include #include @@ -36,15 +39,20 @@ #include "keyword.h" #include "misc.h" #include "stream.h" +#include "queue.h" typedef long lineno_t; #define EC_ADD 0 #define EC_DEL 1 +#define MAXKEY LONG_MAX /* Editing command and state. */ struct editcmd { int cmd; + long key; + int havetext; + int offset; lineno_t where; lineno_t count; lineno_t lasta; @@ -55,20 +63,28 @@ struct editcmd { struct diffinfo *di; struct stream *orig; struct stream *dest; + LIST_ENTRY(editcmd) next; +}; + +struct diffstart { + LIST_HEAD(, editcmd) dhead; }; static int diff_geteditcmd(struct editcmd *, char *); static int diff_copyln(struct editcmd *, lineno_t); +static int diff_ignoreln(struct editcmd *, lineno_t); static void diff_write(struct editcmd *, void *, size_t); +static int diff_insert_edit(struct diffstart *, struct editcmd *); +static void diff_free(struct diffstart *); int diff_apply(struct stream *rd, struct stream *orig, struct stream *dest, - struct keyword *keyword, struct diffinfo *di) + struct keyword *keyword, struct diffinfo *di, int comode) { struct editcmd ec; lineno_t i; - char *line; size_t size; + char *line; int empty, error, noeol; memset(&ec, 0, sizeof(ec)); @@ -104,7 +120,7 @@ diff_apply(struct stream *rd, struct str line = stream_getln(rd, &size); if (line == NULL) return (-1); - if (line[0] == '.') { + if (comode && line[0] == '.') { line++; size--; } @@ -124,10 +140,10 @@ diff_apply(struct stream *rd, struct str } line = stream_getln(rd, NULL); } - if (line == NULL) + if (comode && line == NULL) return (-1); /* If we got ".+", there's no ending newline. */ - if (strcmp(line, ".+") == 0 && !empty) + if (comode && strcmp(line, ".+") == 0 && !empty) noeol = 1; ec.where = 0; while ((line = stream_getln(orig, &size)) != NULL) @@ -143,6 +159,198 @@ diff_apply(struct stream *rd, struct str return (0); } +/* + * Reverse a diff using the same algorithm as in cvsup. + */ +static int +diff_write_reverse(struct stream *dest, struct diffstart *ds) +{ + struct editcmd *ec, *nextec; + long editline, endline, firstoutputlinedeleted; + long num_added, num_deleted, startline; + int num; + + nextec = LIST_FIRST(&ds->dhead); + editline = 0; + num = 0; + while (nextec != NULL) { + ec = nextec; + nextec = LIST_NEXT(nextec, next); + if (nextec == NULL) + break; + num++; + num_deleted = 0; + if (ec->havetext) + num_deleted = ec->count; + num_added = num_deleted + nextec->offset - ec->offset; + if (num_deleted > 0) { + firstoutputlinedeleted = ec->key - num_deleted + 1; + stream_printf(dest, "d%ld %ld\n", firstoutputlinedeleted, + num_deleted); + if (num_added <= 0) + continue; + } + if (num_added > 0) { + stream_printf(dest, "a%ld %ld\n", ec->key, num_added); + startline = ec->key - num_deleted + 1 + ec->offset; + endline = startline + num_added - 1; + + /* Copy lines from original file. First ignore some. */ + ec->editline = editline; + diff_ignoreln(ec, startline - 1); + diff_copyln(ec, endline); + editline = ec->editline; + } + } + return (0); +} + +/* + * Insert a diff into the list sorted on key. Should perhaps use quicker + * algorithms than insertion sort, but do this for now. + */ +static int +diff_insert_edit(struct diffstart *ds, struct editcmd *ec) +{ + struct editcmd *curec; + + if (ec == NULL) + return (0); + + if (LIST_EMPTY(&ds->dhead)) { + LIST_INSERT_HEAD(&ds->dhead, ec, next); + return (0); + } + + /* Insertion sort based on key. */ + LIST_FOREACH(curec, &ds->dhead, next) { + if (ec->key < curec->key) { + LIST_INSERT_BEFORE(curec, ec, next); + return (0); + } + if (LIST_NEXT(curec, next) == NULL) + break; + } + /* Just insert it after. */ + LIST_INSERT_AFTER(curec, ec, next); + return (0); +} + +static void +diff_free(struct diffstart *ds) +{ + struct editcmd *ec; + + while(!LIST_EMPTY(&ds->dhead)) { + ec = LIST_FIRST(&ds->dhead); + LIST_REMOVE(ec, next); + free(ec); + } +} + +/* + * Write the reverse diff from the diff in rd, and original file into + * destination. This algorithm is the same as used in cvsup. + */ +int +diff_reverse(struct stream *rd, struct stream *orig, struct stream *dest, + struct keyword *keyword, struct diffinfo *di) +{ + struct diffstart ds; + struct editcmd ec, *addec, *delec; + lineno_t i; + char *line; + int error, offset; + + memset(&ec, 0, sizeof(ec)); + ec.orig = orig; + ec.dest = dest; + ec.keyword = keyword; + ec.di = di; + addec = NULL; + delec = NULL; + ec.havetext = 0; + offset = 0; + LIST_INIT(&ds.dhead); + + /* Start with next since we need it. */ + line = stream_getln(rd, NULL); + /* First we build up the list of diffs from input. */ + while (line != NULL) { + error = diff_geteditcmd(&ec, line); + if (error) + break; + if (ec.cmd == EC_ADD) { + addec = xmalloc(sizeof(struct editcmd)); + *addec = ec; + addec->havetext = 1; + /* Ignore the lines we was supposed to add. */ + for (i = 0; i < ec.count; i++) { + line = stream_getln(rd, NULL); + if (line == NULL) + return (-1); + } + + /* Get the next diff command if we have one. */ + addec->key = addec->where + addec->count - offset; + if (delec != NULL && + delec->key == addec->key - addec->count) { + delec->key = addec->key; + delec->havetext = addec->havetext; + delec->count = addec->count; + diff_insert_edit(&ds, delec); + free(addec); + delec = NULL; + addec = NULL; + } else { + if (delec != NULL) { + diff_insert_edit(&ds, delec); + } + delec = NULL; + addec->offset = offset; + diff_insert_edit(&ds, addec); + addec = NULL; + } + offset -= ec.count; + } else if (ec.cmd == EC_DEL) { + if (delec != NULL) { + /* Update offset to our next. */ + diff_insert_edit(&ds, delec); + delec = NULL; + } + delec = xmalloc(sizeof(struct editcmd)); + *delec = ec; + delec->key = delec->where - 1 - offset; + delec->offset = offset; + delec->count = 0; + delec->havetext = 0; + /* Important to use the count we had before reset.*/ + offset += ec.count; + } + line = stream_getln(rd, NULL); + } + + while (line != NULL) + line = stream_getln(rd, NULL); + if (delec != NULL) { + diff_insert_edit(&ds, delec); + delec = NULL; + } + + addec = xmalloc(sizeof(struct editcmd)); + /* Should be filesize, but we set it to max value. */ + addec->key = MAXKEY; + addec->offset = offset; + addec->havetext = 0; + addec->count = 0; + diff_insert_edit(&ds, addec); + addec = NULL; + diff_write_reverse(dest, &ds); + diff_free(&ds); + stream_flush(dest); + return (0); +} + /* Get an editing command from the diff. */ static int diff_geteditcmd(struct editcmd *ec, char *line) @@ -181,8 +389,8 @@ diff_geteditcmd(struct editcmd *ec, char static int diff_copyln(struct editcmd *ec, lineno_t to) { - char *line; size_t size; + char *line; while (ec->editline < to) { line = stream_getln(ec->orig, &size); @@ -194,12 +402,28 @@ diff_copyln(struct editcmd *ec, lineno_t return (0); } +/* Ignore lines from the original version of the file up to line "to". */ +static int +diff_ignoreln(struct editcmd *ec, lineno_t to) +{ + size_t size; + char *line; + + while (ec->editline < to) { + line = stream_getln(ec->orig, &size); + if (line == NULL) + return (-1); + ec->editline++; + } + return (0); +} + /* Write a new line to the file, expanding RCS keywords appropriately. */ static void diff_write(struct editcmd *ec, void *buf, size_t size) { - char *line, *newline; size_t newsize; + char *line, *newline; int ret; line = buf; Modified: head/contrib/csup/diff.h ============================================================================== --- head/contrib/csup/diff.h Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/diff.h Mon Jan 5 15:18:16 2009 (r186781) @@ -45,6 +45,8 @@ struct diffinfo { }; int diff_apply(struct stream *, struct stream *, struct stream *, - struct keyword *, struct diffinfo *); + struct keyword *, struct diffinfo *, int); +int diff_reverse(struct stream *, struct stream *, + struct stream *, struct keyword *, struct diffinfo *); #endif /* !_DIFF_H_ */ Modified: head/contrib/csup/fattr.c ============================================================================== --- head/contrib/csup/fattr.c Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/fattr.c Mon Jan 5 15:18:16 2009 (r186781) @@ -44,7 +44,7 @@ /* * Include the appropriate definition for the file attributes we support. * There are two different files: fattr_bsd.h for BSD-like systems that - * support the extended file flags à la chflags() and fattr_posix.h for + * support the extended file flags a la chflags() and fattr_posix.h for * bare POSIX systems that don't. */ #ifdef HAVE_FFLAGS @@ -449,7 +449,7 @@ fattr_encode(const struct fattr *fa, fat piece++; } if (mask & FA_DEV) { - vallen = snprintf(piece->val, sizeof(piece->val), "%lld", + vallen = snprintf(piece->val, sizeof(piece->val), "%llx", (long long)fa->dev); len += snprintf(piece->len, sizeof(piece->len), "%lld", (long long)vallen) + vallen + 1; @@ -534,6 +534,13 @@ fattr_getlinkcount(const struct fattr *f return (fa->linkcount); } +char * +fattr_getlinktarget(const struct fattr *fa) +{ + + return (fa->linktarget); +} + /* * Eat the specified attribute and put it in the file attribute * structure. Returns NULL on error, or a pointer to the next @@ -732,18 +739,28 @@ fattr_makenode(const struct fattr *fa, c mode_t modemask, mode; int error; + error = 0; + if (fa->mask & FA_OWNER && fa->mask & FA_GROUP) modemask = FA_SETIDMASK | FA_PERMMASK; else modemask = FA_PERMMASK; /* We only implement fattr_makenode() for dirs for now. */ - assert(fa->type == FT_DIRECTORY); if (fa->mask & FA_MODE) mode = fa->mode & modemask; else mode = 0700; - error = mkdir(path, mode); + + if (fa->type == FT_DIRECTORY) + error = mkdir(path, mode); + else if (fa->type == FT_SYMLINK) { + error = symlink(fa->linktarget, path); + } else if (fa->type == FT_CDEV) { + lprintf(-1, "Character devices not supported!\n"); + } else if (fa->type == FT_BDEV) { + lprintf(-1, "Block devices not supported!\n"); + } return (error); } @@ -823,6 +840,19 @@ fattr_install(struct fattr *fa, const ch } #endif + /* + * If it is changed from a file to a symlink, remove the file + * and create the symlink. + */ + if (inplace && (fa->type == FT_SYMLINK) && + (old->type == FT_FILE)) { + error = unlink(topath); + if (error) + goto bad; + error = symlink(fa->linktarget, topath); + if (error) + goto bad; + } /* Determine whether we need to remove the target first. */ if (!inplace && (fa->type == FT_DIRECTORY) != (old->type == FT_DIRECTORY)) { @@ -853,8 +883,9 @@ fattr_install(struct fattr *fa, const ch if (mask & FA_GROUP) gid = fa->gid; error = chown(frompath, uid, gid); - if (error) + if (error) { goto bad; + } } if (mask & FA_MODE) { newmode = fa->mode & modemask; @@ -901,6 +932,9 @@ fattr_equal(const struct fattr *fa1, con mask = fa1->mask & fa2->mask; if (fa1->type == FT_UNKNOWN || fa2->type == FT_UNKNOWN) return (0); + if (mask & FA_FILETYPE) + if (fa1->type != fa2->type) + return (0); if (mask & FA_MODTIME) if (fa1->modtime != fa2->modtime) return (0); @@ -936,3 +970,12 @@ fattr_equal(const struct fattr *fa1, con return (0); return (1); } + +/* + * Must have to get the correct filesize sendt by the server. + */ +off_t +fattr_filesize(const struct fattr *fa) +{ + return (fa->size); +} Modified: head/contrib/csup/fattr.h ============================================================================== --- head/contrib/csup/fattr.h Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/fattr.h Mon Jan 5 15:18:16 2009 (r186781) @@ -101,6 +101,7 @@ int fattr_type(const struct fattr *); void fattr_maskout(struct fattr *, int); int fattr_getmask(const struct fattr *); nlink_t fattr_getlinkcount(const struct fattr *); +char *fattr_getlinktarget(const struct fattr *); void fattr_umask(struct fattr *, mode_t); void fattr_merge(struct fattr *, const struct fattr *); void fattr_mergedefault(struct fattr *); @@ -111,5 +112,7 @@ int fattr_install(struct fattr *, cons int fattr_equal(const struct fattr *, const struct fattr *); void fattr_free(struct fattr *); int fattr_supported(int); +off_t fattr_filesize(const struct fattr *); + #endif /* !_FATTR_H_ */ Modified: head/contrib/csup/keyword.c ============================================================================== --- head/contrib/csup/keyword.c Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/keyword.c Mon Jan 5 15:18:16 2009 (r186781) @@ -152,6 +152,29 @@ keyword_decode_expand(const char *expand return (-1); } +const char * +keyword_encode_expand(int expand) +{ + + switch (expand) { + case EXPAND_DEFAULT: + return ("."); + case EXPAND_KEYVALUE: + return ("kv"); + case EXPAND_KEYVALUELOCKER: + return ("kvl"); + case EXPAND_KEY: + return ("k"); + case EXPAND_OLD: + return ("o"); + case EXPAND_BINARY: + return ("b"); + case EXPAND_VALUE: + return ("v"); + } + return (NULL); +} + void keyword_free(struct keyword *keyword) { Modified: head/contrib/csup/keyword.h ============================================================================== --- head/contrib/csup/keyword.h Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/keyword.h Mon Jan 5 15:18:16 2009 (r186781) @@ -42,6 +42,7 @@ struct keyword; struct keyword *keyword_new(void); int keyword_decode_expand(const char *); +const char *keyword_encode_expand(int); int keyword_alias(struct keyword *, const char *, const char *); int keyword_enable(struct keyword *, const char *); int keyword_disable(struct keyword *, const char *); Copied: head/contrib/csup/lex.rcs.c (from r186779, projects/csup_cvsmode/contrib/csup/lex.rcs.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/csup/lex.rcs.c Mon Jan 5 15:18:16 2009 (r186781, copy of r186779, projects/csup_cvsmode/contrib/csup/lex.rcs.c) @@ -0,0 +1,2094 @@ + +#line 3 "lex.rcs.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 16:00:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12600106567E; Mon, 5 Jan 2009 16:00:30 +0000 (UTC) (envelope-from lulf@freebsd.org) Received: from bene1.itea.ntnu.no (bene1.itea.ntnu.no [IPv6:2001:700:300:3::56]) by mx1.freebsd.org (Postfix) with ESMTP id 571738FC21; Mon, 5 Jan 2009 16:00:29 +0000 (UTC) (envelope-from lulf@freebsd.org) Received: from localhost (localhost [127.0.0.1]) by bene1.itea.ntnu.no (Postfix) with ESMTP id A3BAE2401E; Mon, 5 Jan 2009 17:00:27 +0100 (CET) Received: from carrot (unknown [IPv6:2001:700:300:3::184]) by bene1.itea.ntnu.no (Postfix) with ESMTP id 2F91E2401C; Mon, 5 Jan 2009 17:00:27 +0100 (CET) Date: Mon, 5 Jan 2009 17:00:25 +0100 From: Ulf Lilleengen To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20090105160025.GA22123@carrot.lan> References: <200901051518.n05FIGli099929@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200901051518.n05FIGli099929@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Debian amavisd-new at bene1.itea.ntnu.no Cc: naddy@freebsd.org, kris@freebsd.org Subject: Re: svn commit: r186781 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:00:31 -0000 On Mon, Jan 05, 2009 at 03:18:16PM +0000, Ulf Lilleengen wrote: > Author: lulf > Date: Mon Jan 5 15:18:16 2009 > New Revision: 186781 > URL: http://svn.freebsd.org/changeset/base/186781 > > Log: > Merge support for CVSMode (aka. mirror mode) into csup. This means csup can now > fetch a complete CVS repository. Support for rsync update of regular files are > also included, but are not yet enabled. The change should not have an impact on > existing csup usage, as little of the existing code has changed. > A big thanks to naddy@ and kris@ for help with testing and reproducing problems. -- Ulf Lilleengen From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 16:05:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C591065672; Mon, 5 Jan 2009 16:05:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 22BF68FC1B; Mon, 5 Jan 2009 16:05:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n05G4X3o014020; Mon, 5 Jan 2009 09:04:33 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 05 Jan 2009 09:04:49 -0700 (MST) Message-Id: <20090105.090449.-1253035084.imp@bsdimp.com> To: alfred@freebsd.org From: "M. Warner Losh" In-Reply-To: <20090105050415.GY60686@elvis.mu.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090104.101121.2139791946.imp@bsdimp.com> <20090105050415.GY60686@elvis.mu.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:05:26 -0000 In message: <20090105050415.GY60686@elvis.mu.org> Alfred Perlstein writes: : * M. Warner Losh [090104 09:11] wrote: : > In message: <200901040012.n040C2gH040928@svn.freebsd.org> : > Alfred Perlstein writes: : > : Sync with usb4bsd: : > : > Alfred, : > : > thanks for trudging these fixes into the tree. It is a thankless job : > that people will complain about... : > : > Speaking of complaining, is there a review process that can be joined : > for them that's more formal than "diff against hps' p4 tree and : > complain?" : : We're trying to figure out a way to do this. We haven't had much : luck exploring svk/hg/git as they're just about as much work as : shipping patches back and forth. : : I asked core for a restricted "users/hps" area under svn for Hans : to put code, but that was denied, perhaps now it's time to reconsider : that? And also: > In my part of the world we give credit or, at the very least, say "thank > you" to the sender, when we apply patches sent to us. One of the things that works well in Linux is the patch queues that they have. You submit a patch, people talk about it, and various tags get added to it. They break things down into a series of mostly independent patches. Maybe we should try to initiate something like this so that we can comment on changes more easily, as well as track submitters and the like as things pass through Hans. Consider it an experiment to see if we can do things to help improve our world? Warner From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 16:25:36 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6842810656C3; Mon, 5 Jan 2009 16:25:36 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5549F8FC17; Mon, 5 Jan 2009 16:25:36 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05GPaFL001364; Mon, 5 Jan 2009 16:25:36 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05GPakZ001363; Mon, 5 Jan 2009 16:25:36 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200901051625.n05GPakZ001363@svn.freebsd.org> From: Giorgos Keramidas Date: Mon, 5 Jan 2009 16:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186783 - head/share/man/man7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:25:38 -0000 Author: keramida (doc committer) Date: Mon Jan 5 16:25:36 2009 New Revision: 186783 URL: http://svn.freebsd.org/changeset/base/186783 Log: Document the NO_XXX options supported by our Makefile.inc1. Noticed by: simon Reviewed by: imp MFC after: 1 week Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Mon Jan 5 15:38:45 2009 (r186782) +++ head/share/man/man7/build.7 Mon Jan 5 16:25:36 2009 (r186783) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2006 +.Dd January 5, 2009 .Dt BUILD 7 .Os .Sh NAME @@ -373,6 +373,69 @@ value for that platform. .El .Pp Builds under directory +.Pa /usr/src +are also influenced by defining one or more the following symbols, +using the +.Fl D +option of +.Xr make 1 : +.Bl -tag -width ".Va -DNO_KERNELDEPEND" +.It Va NO_CLEANDIR +If set, the build targets that clean parts of the object tree use the +equivalent of +.Dq make clean +instead of +.Dq make cleandir . +.It Va NO_CLEAN +If set, no object tree files are cleaned at all. +Setting +.Va NO_CLEAN +implies +.Va NO_KERNELCLEAN , +so when +.Va NO_CLEAN +is set no kernel objects are cleaned either. +.It Va NO_CTF +If set, the build process does not run the DTrace CTF conversion tools +on built objects. +.It Va NO_SHARE +If set, the build does not descend into the +.Pa /usr/src/share +subdirectory (i.e. manpages, locale data files, timezone data files and +other +.Pa /usr/src/share +files will not be rebuild from their sources). +.It Va NO_KERNELCLEAN +If set, the build process does not run +.Dq make clean +as part of the +.Cm buildkernel +target. +.It Va NO_KERNELCONFIG +If set, the build process does not run +.Xr config 8 +as part of the +.Cm buildkernel +target. +.It Va NO_KERNELDEPEND +If set, the build process does not run +.Dq make depend +as part of the +.Cm buildkernel +target. +.It Va NO_DOCUPDATE +If set, the update process does not update the source of the +.Fx +documentation as part of the +.Dq make update +target. +.It Va NO_PORTSUPDATE +If set, the update process does not update the Ports tree as part of the +.Dq make update +target. +.El +.Pp +Builds under directory .Pa /usr/doc are influenced by the following .Xr make 1 From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 16:47:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D575F10656F4; Mon, 5 Jan 2009 16:47:42 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3B258FC1C; Mon, 5 Jan 2009 16:47:42 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Glg0P001762; Mon, 5 Jan 2009 16:47:42 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05Glgf5001761; Mon, 5 Jan 2009 16:47:42 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901051647.n05Glgf5001761@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 5 Jan 2009 16:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186784 - head/usr.sbin/burncd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:47:43 -0000 Author: obrien Date: Mon Jan 5 16:47:42 2009 New Revision: 186784 URL: http://svn.freebsd.org/changeset/base/186784 Log: Correct the type for the global var accessed in sig handlers. Modified: head/usr.sbin/burncd/burncd.c Modified: head/usr.sbin/burncd/burncd.c ============================================================================== --- head/usr.sbin/burncd/burncd.c Mon Jan 5 16:25:36 2009 (r186783) +++ head/usr.sbin/burncd/burncd.c Mon Jan 5 16:47:42 2009 (r186784) @@ -59,7 +59,7 @@ struct track_info { }; static struct track_info tracks[100]; static int quiet, verbose, saved_block_size, notracks; -static volatile int global_fd_for_cleanup; +static volatile sig_atomic_t global_fd_for_cleanup; void add_track(char *, int, int, int); void do_DAO(int fd, int, int); From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 16:48:33 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57D6B1065691; Mon, 5 Jan 2009 16:48:33 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 18C048FC14; Mon, 5 Jan 2009 16:48:32 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n05GmWko050519; Mon, 5 Jan 2009 08:48:32 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n05GmWu2050518; Mon, 5 Jan 2009 08:48:32 -0800 (PST) (envelope-from obrien) Date: Mon, 5 Jan 2009 08:48:32 -0800 From: "David O'Brien" To: Kris Kennaway Message-ID: <20090105164832.GF46222@dragon.NUXI.org> References: <200812192020.mBJKKEIo081792@svn.freebsd.org> <20081223182314.GC25145@dragon.NUXI.org> <49611F6B.10802@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49611F6B.10802@FreeBSD.org> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: "Carlos A. M. dos Santos" , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186337 - head/usr.sbin/burncd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:48:33 -0000 On Sun, Jan 04, 2009 at 08:43:23PM +0000, Kris Kennaway wrote: > David O'Brien wrote: >> On Sun, Dec 21, 2008 at 10:15:21AM -0200, Carlos A. M. dos Santos wrote: >>> On Fri, Dec 19, 2008 at 6:20 PM, David E. O'Brien >>> wrote: >>>> Author: obrien >>>> Date: Fri Dec 19 20:20:14 2008 >>>> New Revision: 186337 >>>> URL: http://svn.freebsd.org/changeset/base/186337 >>>> >>>> Log: >>>> burncd(8) doesn't handle signals and interrupting burncd during >>>> operation. >>>> For example, ^C (SIGINT) may leave the drive spinning and locked. >>>> This may also happen if you try to write a too-large image to a disc >>>> and burncd(8) exits with an I/O error. >>>> >>>> Add signal handling by doing a CDRIOCFLUSH ioctl to attempt to leave >>>> burner in a sane state when burning is interrupted with SIGHUP, SIGINT, >>>> SIGTERM, or in case an I/O error occurs during write. >>>> Note, that blanking will still continue after interrupt but it seems to >>>> finish correctly even after burncd(8) has quit. >>>> >>>> Also, while I'm here bump WARNS to "6". >>>> >>>> PR: 48730 >>>> Submitted by: Jaakko Heinonen >>> While you are here, would you mind taking a look at bin/123693, either >>> committing the proposed patch or closing the PR if my proposition is >>> not acceptable? >> Yep, I already have that patch to look at. Note it was hell getting the >> patch - its best to not attach it when it will be base64 encoded - we >> have no easy way of extracting such encoded attachements. >> > > AFAIK, the web PR interface will detect base64-encoded attachments and > present them for download. Everytime I tried, I wound up with a binary file being downloaded. -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 16:54:35 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE5D510656C0; Mon, 5 Jan 2009 16:54:35 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-2.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.freebsd.org (Postfix) with ESMTP id 3DAFB8FC19; Mon, 5 Jan 2009 16:54:35 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from exbe05.intra.dlr.de ([192.168.35.38]) by smtp-2.dlr.de with Microsoft SMTPSVC(6.0.3790.1830); Mon, 5 Jan 2009 17:41:17 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 5 Jan 2009 17:40:33 +0100 Message-ID: In-Reply-To: <20090105142929.GA70683@onelab2.iet.unipi.it> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: svn commit: r186502 - head/usr.bin/make Thread-Index: AclvQV7Nb+xtC05nTU6BlMQwnrhOLgAEeCew References: <200812262231.mBQMVjHC052150@svn.freebsd.org> <867i59lvbj.fsf@ds4.des.no> <20090105142929.GA70683@onelab2.iet.unipi.it> From: To: , X-OriginalArrivalTime: 05 Jan 2009 16:41:17.0906 (UTC) FILETIME=[6E873320:01C96F54] Cc: svn-src-head@FreeBSD.org, luigi@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: RE: svn commit: r186502 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:54:36 -0000 > -----Original Message----- > From: owner-src-committers@FreeBSD.org=20 > [mailto:owner-src-committers@FreeBSD.org] On Behalf Of Luigi Rizzo > Sent: Monday, January 05, 2009 3:29 PM > To: Dag-Erling Sm??rgrav > Cc: Luigi Rizzo; src-committers@FreeBSD.org;=20 > svn-src-all@FreeBSD.org; svn-src-head@FreeBSD.org > Subject: Re: svn commit: r186502 - head/usr.bin/make >=20 > On Mon, Jan 05, 2009 at 02:46:24PM +0100, Dag-Erling Sm??rgrav wrote: > > Luigi Rizzo writes: > > > Log: > > > Clarify the behaviour of conditionals when dealing with=20 > comparisons. > > > In particular, point out that string comparison can=20 > only use !=3D and =3D=3D > > > (how weird, given that the underlying call to strcmp=20 > returns more > > > information), that floating point values are correctly=20 > interpreted > > > as numbers, and that the left-hand side must be a=20 > variable expansion. > >=20 > > Any chance of fixing items 1 and 3? >=20 > item 1 is easy except perhaps for Locale issues which however=20 > should not > be a big deal in this context. > item 3 should also be easy. >=20 > But the thing i wonder about is whether there is any standard that > mandates this beviour, or we are relatively free to make enhancements > to our "make" program. >From the Posix standpoint of view, we can do what we want as long as we are not syntax compatible with posix-make :-) This is the reason, why most of our make extensions are compatible with posix. As soon as you have a construct that is a syntax error according to the Posix specification you invoke implementation-defined behaviour and as such you just have to document it. There are several of these escape mechanisms in the standard: the .POSIX pseudo-target and all targets that start with a dot and consist of uppercase letters. With regard to conditionals: there is no standard. Posix decided to standard only minimal make, which is roughly compatible to V7 make. If you change things like conditional semantics you should: (1) document it, and (2) arrange a full ports build with the portcluster people. This takes some days, but is a good thing to do. harti From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 17:12:04 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05E4D1065696; Mon, 5 Jan 2009 17:12:04 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id CA7D98FC29; Mon, 5 Jan 2009 17:12:03 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n05HC22w046870 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Jan 2009 09:12:02 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <49623F62.6000206@freebsd.org> Date: Mon, 05 Jan 2009 09:12:02 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901042059.n04KxNhW074100@svn.freebsd.org> In-Reply-To: <200901042059.n04KxNhW074100@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Rhyolite-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186749 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:12:04 -0000 Doug Barton wrote: > Author: dougb > Date: Sun Jan 4 20:59:23 2009 > New Revision: 186749 > URL: http://svn.freebsd.org/changeset/base/186749 > > Log: > Instead of using obj and all targets which are not cross-build aware, > use _obj and everything which are. > > Submitted by: ru > > Modified: > head/usr.sbin/mergemaster/mergemaster.sh > > Modified: head/usr.sbin/mergemaster/mergemaster.sh > ============================================================================== > --- head/usr.sbin/mergemaster/mergemaster.sh Sun Jan 4 19:23:44 2009 (r186748) > +++ head/usr.sbin/mergemaster/mergemaster.sh Sun Jan 4 20:59:23 2009 (r186749) > @@ -592,10 +592,11 @@ case "${RERUN}" in > ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs > ;; > esac > + od=${TEMPROOT}/usr/obj > ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs && > - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} obj SUBDIR_OVERRIDE=etc && > - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} all SUBDIR_OVERRIDE=etc && > - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || > + MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc && > + MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc && > + MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || > { echo ''; > echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; > echo " the temproot environment"; > > > This fixes my cross-install setup; thank you. Sam From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 17:15:52 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0714106564A; Mon, 5 Jan 2009 17:15:52 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id C10E88FC1D; Mon, 5 Jan 2009 17:15:52 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n05HFOEw051239; Mon, 5 Jan 2009 09:15:24 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n05HFOiN051238; Mon, 5 Jan 2009 09:15:24 -0800 (PST) (envelope-from obrien) Date: Mon, 5 Jan 2009 09:15:24 -0800 From: "David O'Brien" To: Ed Schouten Message-ID: <20090105171523.GC50568@dragon.NUXI.org> References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> <20090104121331.GC14235@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090104121331.GC14235@hoeg.nl> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:15:53 -0000 On Sun, Jan 04, 2009 at 01:13:31PM +0100, Ed Schouten wrote: > * Kostik Belousov wrote: > > IMHO, it would be much easier to try and use the new code if the > > TEKEN_XXX defines would be implemented as both sysctl and kernel > > tunables. > > Yes. Eventually we should add tunables, but first I want to get it > working correctly. Unfortunately there is a big amount of complexity > when switching to xterm. Why xterm and not vt100? -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 17:22:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D558110656F0; Mon, 5 Jan 2009 17:22:45 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 1E7968FC52; Mon, 5 Jan 2009 17:22:44 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 18AD01CCFB; Mon, 5 Jan 2009 18:22:43 +0100 (CET) Date: Mon, 5 Jan 2009 18:22:43 +0100 From: Ed Schouten To: David O'Brien Message-ID: <20090105172243.GO14235@hoeg.nl> References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> <20090104121331.GC14235@hoeg.nl> <20090105171523.GC50568@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Zz8eIV9MTSc31S3o" Content-Disposition: inline In-Reply-To: <20090105171523.GC50568@dragon.NUXI.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:23:05 -0000 --Zz8eIV9MTSc31S3o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello David, * David O'Brien wrote: > Why xterm and not vt100? The reason I'm proposing xterm, is because it is the best supported terminal type out there. Example: if we would use TERM=3Dvt100, we would only get black & white. If we use TERM=3Dvt100-color, we do get the colors, but unfortunately we won't be compatible with other operating systems. Solaris, for example, has no termtype called vt100-color. This means the user has to change TERM by hand. TERM=3Dxterm has proven to be very portable across different operating systems and there are a lot of other pieces of software that try to mimic it. At least the Terminal application in OS X, GNOME's gnome-terminal, maybe KDE's Konsole as well. I hope that answers your question? --=20 Ed Schouten WWW: http://80386.nl/ --Zz8eIV9MTSc31S3o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkliQeMACgkQ52SDGA2eCwVogwCfURlPVXsPi3NwQx7frR81QLQ3 WNkAn3/5v6FfmNLpvv89KWBYCEgcz1Ej =9dbw -----END PGP SIGNATURE----- --Zz8eIV9MTSc31S3o-- From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 17:30:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F052A1065672; Mon, 5 Jan 2009 17:30:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id A1CB98FC17; Mon, 5 Jan 2009 17:30:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 0184141C67B; Mon, 5 Jan 2009 18:30:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id Jvbyf+LnqPTE; Mon, 5 Jan 2009 18:30:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 60D7441C677; Mon, 5 Jan 2009 18:30:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 5C2814448DD; Mon, 5 Jan 2009 17:26:09 +0000 (UTC) Date: Mon, 5 Jan 2009 17:26:09 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Robert Watson In-Reply-To: Message-ID: <20090105172400.T45399@maildrop.int.zabbadoz.net> References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Ed Schouten , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:30:09 -0000 On Sun, 4 Jan 2009, Robert Watson wrote: > > On Sun, 4 Jan 2009, Ed Schouten wrote: > >> * Robert Watson wrote: >>> Unlike with struct protosw, several instances of struct ip6protosw >>> did not use C99-style sparse structure initialization, so remove >>> NULL assignments for now-removed pr_usrreq function pointers. >> >> Maybe we should convert them to use the C99-style initialisation. This >> could prevent similar issues in the future, right? > > I think Bjoern already has a work-in-progress on this one, but yes, that > would be a good idea. I have broken it out from a larger patch; the C99 initializer is here: http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff I case someone can give it a quick glance I'll commit them. /bz -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 17:38:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8D60106564A; Mon, 5 Jan 2009 17:38:03 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B76808FC0C; Mon, 5 Jan 2009 17:38:03 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Hc35O005456; Mon, 5 Jan 2009 17:38:03 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05Hc383005455; Mon, 5 Jan 2009 17:38:03 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200901051738.n05Hc383005455@svn.freebsd.org> From: Maxim Konovalov Date: Mon, 5 Jan 2009 17:38:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186785 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:38:04 -0000 Author: maxim Date: Mon Jan 5 17:38:03 2009 New Revision: 186785 URL: http://svn.freebsd.org/changeset/base/186785 Log: o FreeBSD 7.1 added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Mon Jan 5 16:47:42 2009 (r186784) +++ head/share/misc/bsd-family-tree Mon Jan 5 17:38:03 2009 (r186785) @@ -221,9 +221,13 @@ FreeBSD 5.2 | | *--FreeBSD | | | | DragonFly 1.12.0 | 7.0 | | | | | | | | | | OpenBSD 4.3 | - | V | | | | DragonFly 2.0.0 - | FreeBSD | | OpenBSD 4.4 | - | 6.4 | | | | + | | | | | | DragonFly 2.0.0 + | | FreeBSD | | OpenBSD 4.4 | + | | 6.4 | | | | + | | | | | | + | FreeBSD 7.1 | | | | + | | | | | | + | V | | | | | | | | | FreeBSD 8 -current | NetBSD -current OpenBSD -current | | | | | | @@ -490,6 +494,7 @@ OpenBSD 4.3 2008-05-01 [OBD] DragonFly 2.0.0 2008-07-21 [DFB] OpenBSD 4.4 2008-11-01 [OBD] FreeBSD 6.4 2008-11-28 [FBD] +FreeBSD 7.1 2009-01-04 [FBD] Bibliography ------------------------ From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 17:47:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB0C51065680; Mon, 5 Jan 2009 17:47:03 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mx1.freebsd.org (Postfix) with ESMTP id C93968FC23; Mon, 5 Jan 2009 17:47:02 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by bwz12 with SMTP id 12so20266022bwz.19 for ; Mon, 05 Jan 2009 09:47:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=VC5BIrvhk0Yw3wFkETLU09R23AHuzW6hieXyik1tcd0=; b=RPzwXZfsHC9ehU2azEwSoOM5Qolqfn5yC4EJBVqgMc3WOQpJBJ56RdN3Y7HxG5HQoL gxSNhwfHwKNjp+ouu//HHvyEwOu5XYCq2s83YdiXxH7Bsn7ilDdSUiIAcXVkHU5jBJjD LfgmLtUBSPMake+n0uDeq1Kw9dFIMqY25ankM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=HFgwSGkXDMn6bMmSVD7tcJxLjYrAIaPQhOeCfU1iZ7t5hMeQ/XBqJafc8uVBT5znbS k+7dmKyZxstAUFOaDzqHl5eCuqpsEHpasV6nVdCdj4snOAJqpNROFn7PpMDJYZCBM5wp aRhTC/fP5yMdb/afOe9JiR1e2gfGxJCxrhMQ4= Received: by 10.181.48.13 with SMTP id a13mr8163169bkk.43.1231177603128; Mon, 05 Jan 2009 09:46:43 -0800 (PST) Received: by 10.180.208.17 with HTTP; Mon, 5 Jan 2009 09:46:42 -0800 (PST) Message-ID: <9bbcef730901050946q64b59c9bvc0a5b587b2e7bb11@mail.gmail.com> Date: Mon, 5 Jan 2009 18:46:42 +0100 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Ed Schouten" In-Reply-To: <20090105172243.GO14235@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> <20090104121331.GC14235@hoeg.nl> <20090105171523.GC50568@dragon.NUXI.org> <20090105172243.GO14235@hoeg.nl> X-Google-Sender-Auth: 9864927f289ca220 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:47:05 -0000 2009/1/5 Ed Schouten : > Hello David, > > * David O'Brien wrote: >> Why xterm and not vt100? > > The reason I'm proposing xterm, is because it is the best supported > terminal type out there. Example: if we would use TERM=vt100, we would > only get black & white. If we use TERM=vt100-color, we do get the > colors, but unfortunately we won't be compatible with other operating > systems. Solaris, for example, has no termtype called vt100-color. This > means the user has to change TERM by hand. > > TERM=xterm has proven to be very portable across different operating > systems and there are a lot of other pieces of software that try to > mimic it. At least the Terminal application in OS X, GNOME's > gnome-terminal, maybe KDE's Konsole as well. > > I hope that answers your question? Also, isn't xterm better suited for UTF-8? From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 18:08:40 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72B14106568A; Mon, 5 Jan 2009 18:08:40 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 32DBF8FC21; Mon, 5 Jan 2009 18:08:40 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 597801CCFB; Mon, 5 Jan 2009 19:08:39 +0100 (CET) Date: Mon, 5 Jan 2009 19:08:39 +0100 From: Ed Schouten To: "Bjoern A. Zeeb" Message-ID: <20090105180839.GP14235@hoeg.nl> References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lz5aeKxNMHO5Q25g" Content-Disposition: inline In-Reply-To: <20090105172400.T45399@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 18:08:41 -0000 --lz5aeKxNMHO5Q25g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Bjoern A. Zeeb wrote: > I have broken it out from a larger patch; the C99 initializer is here: > http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff > > I case someone can give it a quick glance I'll commit them. Looks good, but I'm not a sys/net* guru. ;-) --=20 Ed Schouten WWW: http://80386.nl/ --lz5aeKxNMHO5Q25g Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkliTKcACgkQ52SDGA2eCwWYegCeO7RL1+g6C0m/j//NTRkm1PH8 PMIAn325WzBE6HmJYPa3+fDs3Rm0hOJY =IJAh -----END PGP SIGNATURE----- --lz5aeKxNMHO5Q25g-- From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 18:13:19 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0857E106566B for ; Mon, 5 Jan 2009 18:13:19 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id C68F08FC2A for ; Mon, 5 Jan 2009 18:13:17 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 05 Jan 2009 18:13:15 -0000 Received: from p54A3E58D.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.229.141] by mail.gmx.net (mp015) with SMTP; 05 Jan 2009 19:13:15 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/pGslCFnHpLtQ9jeRaXkUo6dtKkVLe9istaJGuzh RrWpqjvwtk66P6 Message-ID: <49624DB9.8080900@gmx.de> Date: Mon, 05 Jan 2009 19:13:13 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> In-Reply-To: <20090105172400.T45399@maildrop.int.zabbadoz.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 Cc: svn-src-head@freebsd.org, Ed Schouten , svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 18:13:19 -0000 Bjoern A. Zeeb schrieb: > I have broken it out from a larger patch; the C99 initializer is here: > http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff > > I case someone can give it a quick glance I'll commit them. + .pr_flags = PR_ATOMIC|PR_ADDR, style(9) wants spaces around binary operators. The designator initializers seem to be correct. Christoph From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 18:16:45 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E25A5106566B; Mon, 5 Jan 2009 18:16:45 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id A25998FC08; Mon, 5 Jan 2009 18:16:45 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 10C9E1CCFB; Mon, 5 Jan 2009 19:16:45 +0100 (CET) Date: Mon, 5 Jan 2009 19:16:45 +0100 From: Ed Schouten To: Ivan Voras Message-ID: <20090105181645.GQ14235@hoeg.nl> References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> <20090104121331.GC14235@hoeg.nl> <20090105171523.GC50568@dragon.NUXI.org> <20090105172243.GO14235@hoeg.nl> <9bbcef730901050946q64b59c9bvc0a5b587b2e7bb11@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wiP8eU6Yj5r7oh2+" Content-Disposition: inline In-Reply-To: <9bbcef730901050946q64b59c9bvc0a5b587b2e7bb11@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 18:16:47 -0000 --wiP8eU6Yj5r7oh2+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Ivan Voras wrote: > Also, isn't xterm better suited for UTF-8? Yes. I have yet to confirm this, but I suspect things may go wrong when you run a non-UTF-8 aware application that performs box drawing inside a UTF-8 aware cons25 emulator. With cons25, the box drawing characters are above 0x7f, which is obviously not compatible with UTF-8. With xterm you can use the UTF-8 codepoints or switch to the special character map with the box drawing characters. When your application doesn't use UTF-8, it should only generate bytes below 0x80. --=20 Ed Schouten WWW: http://80386.nl/ --wiP8eU6Yj5r7oh2+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkliTo0ACgkQ52SDGA2eCwVUtACaA9UB5JfeYeslBRk/HhnGqasN scQAn16uNE42tvc9roT5KSeyT6qiaGG0 =cNfl -----END PGP SIGNATURE----- --wiP8eU6Yj5r7oh2+-- From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 19:39:43 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37928106566B; Mon, 5 Jan 2009 19:39:43 +0000 (UTC) (envelope-from prvs=julian=24935958a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 160408FC0C; Mon, 5 Jan 2009 19:39:42 +0000 (UTC) (envelope-from prvs=julian=24935958a@elischer.org) Received: from jelischer-laptop.sfo.ironport.com (HELO julian-mac.elischer.org) ([10.251.22.38]) by smtp-outbound.ironport.com with ESMTP; 05 Jan 2009 11:09:38 -0800 Message-ID: <49625AF6.5040407@elischer.org> Date: Mon, 05 Jan 2009 11:09:42 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Ed Schouten References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <20090105180839.GP14235@hoeg.nl> In-Reply-To: <20090105180839.GP14235@hoeg.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 19:39:43 -0000 Ed Schouten wrote: > * Bjoern A. Zeeb wrote: >> I have broken it out from a larger patch; the C99 initializer is here: >> http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff >> >> I case someone can give it a quick glance I'll commit them. > > Looks good, but I'm not a sys/net* guru. ;-) > looks fine.. From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 19:50:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DBC01065672; Mon, 5 Jan 2009 19:50:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id B76DA8FC16; Mon, 5 Jan 2009 19:50:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 2F56641C64C; Mon, 5 Jan 2009 20:50:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id wipuPZQovv6Q; Mon, 5 Jan 2009 20:50:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id A8D6441C67B; Mon, 5 Jan 2009 20:50:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 647764448DD; Mon, 5 Jan 2009 19:45:48 +0000 (UTC) Date: Mon, 5 Jan 2009 19:45:47 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Christoph Mallon In-Reply-To: <49624DB9.8080900@gmx.de> Message-ID: <20090105194210.P45399@maildrop.int.zabbadoz.net> References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 19:50:08 -0000 On Mon, 5 Jan 2009, Christoph Mallon wrote: Hi, > Bjoern A. Zeeb schrieb: >> I have broken it out from a larger patch; the C99 initializer is here: >> http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff >> >> I case someone can give it a quick glance I'll commit them. > > + .pr_flags = PR_ATOMIC|PR_ADDR, > > style(9) wants spaces around binary operators. I am not sure it does. In case it does I am not going to break consistency with all other 65 places that don't do for pr_flags; but it seems I should change the = to =. Thanks for making me look, and thanks for review! -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20:09:55 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBBCB106566B; Mon, 5 Jan 2009 20:09:54 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8CA08FC16; Mon, 5 Jan 2009 20:09:54 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05K9sZj009624; Mon, 5 Jan 2009 20:09:54 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05K9soF009621; Mon, 5 Jan 2009 20:09:54 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901052009.n05K9soF009621@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 5 Jan 2009 20:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186789 - head/sys/boot/forth X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:09:55 -0000 Author: luigi Date: Mon Jan 5 20:09:54 2009 New Revision: 186789 URL: http://svn.freebsd.org/changeset/base/186789 Log: This patch introduces a number of simplifications to the Forth functions used in the bootloader. The goal is to make the code more readable and smaller (especially because we have size issues in the loader's environment). High level description of the changes: + define some string manipulation functions to improve readability; + create functions to manipulate module descriptors, removing some duplicated code; + rename the error codes to ESOMETHING; + consistently use set_environment_variable (which evaluates $variables) when interpreting variable=value assignments; I have tested the code, but there might be code paths that I have not traversed so please let me know of any issues. Details of this change: --- loader.4th --- + add some module operators, to remove duplicated code while parsing module-related commands: set-module-flag enable-module disable-module toggle-module show-module --- pnp.4th --- + move here the definition related to the pnp devices list, e.g. STAILQ_* , pnpident, pnpinfo --- support.4th --- + rename error codes to capital e.g. ENOMEM EFREE ... and do obvious changes related to the renaming; + remove unused structures (those relevant to pnp are moved to pnp.4th) + various string functions - strlen removed (it is an internal function) - strchr, defined as the C function - strtype -- type a string to output - strref -- assign a reference to the string on the stack - unquote -- remove quotes from a string + remove reset_line_buffer + move up the 'set_environment_variable' function (which now uses the interpreter, so $variables are evaluated). Use the function in various places + add a 'test_file function' for debugging purposes MFC after: 4 weeks Modified: head/sys/boot/forth/loader.4th head/sys/boot/forth/pnp.4th head/sys/boot/forth/support.4th Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Mon Jan 5 20:02:12 2009 (r186788) +++ head/sys/boot/forth/loader.4th Mon Jan 5 20:09:54 2009 (r186789) @@ -93,6 +93,7 @@ only forth definitions also support-func \ \ If a password was defined, execute autoboot and ask for \ password if autoboot returns. +\ Do not exit unless the right password is given. : check-password password .addr @ if @@ -150,8 +151,7 @@ only forth definitions also support-func \ line, if interpreted, or given on the stack, if compiled in. : (read-conf) ( addr len -- ) - conf_files .addr @ ?dup if free abort" Fatal error freeing memory" then - strdup conf_files .len ! conf_files .addr ! + conf_files string= include_conf_files \ Will recurse on new loader_conf_files definitions ; @@ -165,110 +165,26 @@ only forth definitions also support-func then ; immediate -\ ***** enable-module -\ -\ Turn a module loading on. +\ show, enable, disable, toggle module loading. They all take module from +\ the next word -: enable-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - r@ module.name dup .addr @ swap .len @ type - true r> module.flag ! - ." will be loaded." cr - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr +: set-module-flag ( module_addr val -- ) \ set and print flag + over module.flag ! + dup module.name strtype + module.flag @ if ." will be loaded" else ." will not be loaded" then cr ; -\ ***** disable-module -\ -\ Turn a module loading off. - -: disable-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - r@ module.name dup .addr @ swap .len @ type - false r> module.flag ! - ." will not be loaded." cr - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr -; +: enable-module find-module ?dup if true set-module-flag then ; -\ ***** toggle-module -\ -\ Turn a module loading on/off. +: disable-module find-module ?dup if false set-module-flag then ; -: toggle-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - r@ module.name dup .addr @ swap .len @ type - r@ module.flag @ 0= dup r> module.flag ! - if - ." will be loaded." cr - else - ." will not be loaded." cr - then - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr -; +: toggle-module find-module ?dup if dup module.flag @ 0= set-module-flag then ; \ ***** show-module \ \ Show loading information about a module. -: show-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - ." Name: " r@ module.name dup .addr @ swap .len @ type cr - ." Path: " r@ module.loadname dup .addr @ swap .len @ type cr - ." Type: " r@ module.type dup .addr @ swap .len @ type cr - ." Flags: " r@ module.args dup .addr @ swap .len @ type cr - ." Before load: " r@ module.beforeload dup .addr @ swap .len @ type cr - ." After load: " r@ module.afterload dup .addr @ swap .len @ type cr - ." Error: " r@ module.loaderror dup .addr @ swap .len @ type cr - ." Status: " r> module.flag @ if ." Load" else ." Don't load" then cr - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr -; +: show-module ( -- ) find-module ?dup if show-one-module then ; \ Words to be used inside configuration files Modified: head/sys/boot/forth/pnp.4th ============================================================================== --- head/sys/boot/forth/pnp.4th Mon Jan 5 20:02:12 2009 (r186788) +++ head/sys/boot/forth/pnp.4th Mon Jan 5 20:09:54 2009 (r186789) @@ -24,6 +24,39 @@ \ \ $FreeBSD$ + +\ The following pnp code is used in pnp.4th and pnp.c +structure: STAILQ_HEAD + ptr stqh_first \ type* + ptr stqh_last \ type** +;structure + +structure: STAILQ_ENTRY + ptr stqe_next \ type* +;structure + +structure: pnphandler + ptr pnph.name + ptr pnph.enumerate +;structure + +structure: pnpident + ptr pnpid.ident \ char* + sizeof STAILQ_ENTRY cells member: pnpid.link \ pnpident +;structure + +structure: pnpinfo \ sync with sys/boot/config/bootstrap.h + ptr pnpi.desc + int pnpi.revision + ptr pnpi.module \ (char*) module args + int pnpi.argc + ptr pnpi.argv + ptr pnpi.handler \ pnphandler + sizeof STAILQ_HEAD member: pnpi.ident \ pnpident + sizeof STAILQ_ENTRY member: pnpi.link \ pnpinfo +;structure +\ end of pnp support + pnpdevices drop : enumerate Modified: head/sys/boot/forth/support.4th ============================================================================== --- head/sys/boot/forth/support.4th Mon Jan 5 20:02:12 2009 (r186788) +++ head/sys/boot/forth/support.4th Mon Jan 5 20:09:54 2009 (r186789) @@ -26,7 +26,6 @@ \ Loader.rc support functions: \ -\ initialize_support ( -- ) initialize global variables \ initialize ( addr len -- ) as above, plus load_conf_files \ load_conf ( addr len -- ) load conf file given \ include_conf_files ( -- ) load all conf files in load_conf_files @@ -61,24 +60,23 @@ \ value any_conf_read? indicates if a conf file was succesfully read \ \ Other exported words: -\ +\ note, strlen is internal \ strdup ( addr len -- addr' len) similar to strdup(3) \ strcat ( addr len addr' len' -- addr len+len' ) similar to strcat(3) -\ strlen ( addr -- len ) similar to strlen(3) \ s' ( | string' -- addr len | ) similar to s" \ rudimentary structure support \ Exception values -1 constant syntax_error -2 constant out_of_memory -3 constant free_error -4 constant set_error -5 constant read_error -6 constant open_error -7 constant exec_error -8 constant before_load_error -9 constant after_load_error +1 constant ESYNTAX +2 constant ENOMEM +3 constant EFREE +4 constant ESETERROR \ error setting environment variable +5 constant EREAD \ error reading +6 constant EOPEN +7 constant EEXEC \ XXX never catched +8 constant EBEFORELOAD +9 constant EAFTERLOAD \ I/O constants @@ -132,7 +130,8 @@ structure: module ptr module.next ;structure -\ Internal loader structures +\ Internal loader structures (preloaded_file, kernel_module, file_metadata) +\ must be in sync with the C struct in sys/boot/common/bootstrap.h structure: preloaded_file ptr pf.name ptr pf.type @@ -159,51 +158,7 @@ structure: file_metadata 0 member: md.data \ variable size ;structure -structure: config_resource - ptr cf.name - int cf.type -0 constant RES_INT -1 constant RES_STRING -2 constant RES_LONG - 2 cells member: u -;structure - -structure: config_device - ptr cd.name - int cd.unit - int cd.resource_count - ptr cd.resources \ config_resource -;structure - -structure: STAILQ_HEAD - ptr stqh_first \ type* - ptr stqh_last \ type** -;structure - -structure: STAILQ_ENTRY - ptr stqe_next \ type* -;structure - -structure: pnphandler - ptr pnph.name - ptr pnph.enumerate -;structure - -structure: pnpident - ptr pnpid.ident \ char* - sizeof STAILQ_ENTRY cells member: pnpid.link \ pnpident -;structure - -structure: pnpinfo - ptr pnpi.desc - int pnpi.revision - ptr pnpi.module \ (char*) module args - int pnpi.argc - ptr pnpi.argv - ptr pnpi.handler \ pnphandler - sizeof STAILQ_HEAD member: pnpi.ident \ pnpident - sizeof STAILQ_ENTRY member: pnpi.link \ pnpinfo -;structure +\ end of structures \ Global variables @@ -216,11 +171,9 @@ create last_module_option sizeof module. 0 value nextboot? \ Support string functions - -: strdup ( addr len -- addr' len ) - >r r@ allocate if out_of_memory throw then - tuck r@ move - r> +: strdup { addr len -- addr' len' } + len allocate if ENOMEM throw then + addr over len move len ; : strcat { addr len addr' len' -- addr len+len' } @@ -228,29 +181,27 @@ create last_module_option sizeof module. addr len len' + ; -: strlen ( addr -- len ) - 0 >r +: strchr { addr len c -- addr' len' } begin - dup c@ while - 1+ r> 1+ >r repeat - drop r> + len + while + addr c@ c = if addr len exit then + addr 1 + to addr + len 1 - to len + repeat + 0 0 ; -: s' +: s' \ same as s", allows " in the string [char] ' parse - state @ if - postpone sliteral - then + state @ if postpone sliteral then ; immediate : 2>r postpone >r postpone >r ; immediate : 2r> postpone r> postpone r> ; immediate : 2r@ postpone 2r> postpone 2dup postpone 2>r ; immediate -: getenv? - getenv - -1 = if false else drop true then -; +: getenv? getenv -1 = if false else drop true then ; \ Private definitions @@ -271,27 +222,27 @@ only forth also support-functions defini \ Standard suffixes -: load_module_suffix s" _load" ; -: module_loadname_suffix s" _name" ; -: module_type_suffix s" _type" ; -: module_args_suffix s" _flags" ; -: module_beforeload_suffix s" _before" ; -: module_afterload_suffix s" _after" ; -: module_loaderror_suffix s" _error" ; +: load_module_suffix s" _load" ; +: module_loadname_suffix s" _name" ; +: module_type_suffix s" _type" ; +: module_args_suffix s" _flags" ; +: module_beforeload_suffix s" _before" ; +: module_afterload_suffix s" _after" ; +: module_loaderror_suffix s" _error" ; \ Support operators : >= < 0= ; : <= > 0= ; -\ Assorted support funcitons +\ Assorted support functions -: free-memory free if free_error throw then ; +: free-memory free if EFREE throw then ; : strget { var -- addr len } var .addr @ var .len @ ; \ assign addr len to variable. -: strset { addr len var -- } addr var .addr ! len var .len ! ; +: strset { addr len var -- } addr var .addr ! len var .len ! ; \ free memory and reset fields : strfree { var -- } var .addr @ ?dup if free-memory 0 0 var strset then ; @@ -299,6 +250,18 @@ only forth also support-functions defini \ free old content, make a copy of the string and assign to variable : string= { addr len var -- } var strfree addr len strdup var strset ; +: strtype ( str -- ) strget type ; + +\ assign a reference to what is on the stack +: strref { addr len var -- addr len } + addr var .addr ! len var .len ! addr len +; + +\ unquote a string +: unquote ( addr len -- addr len ) + over c@ [char] " = if 2 chars - swap char+ swap then +; + \ Assignment data temporary storage string name_buffer @@ -366,16 +329,16 @@ line-reading definitions line_buffer .len @ if line_buffer .addr @ line_buffer .len @ r@ + - resize if out_of_memory throw then + resize if ENOMEM throw then else - r@ allocate if out_of_memory throw then + r@ allocate if ENOMEM throw then then line_buffer .addr ! r> ; : append_to_line_buffer ( addr len -- ) - line_buffer .addr @ line_buffer .len @ + line_buffer strget 2swap strcat line_buffer .len ! drop @@ -395,23 +358,15 @@ line-reading definitions : refill_buffer 0 to read_buffer_ptr read_buffer .addr @ 0= if - read_buffer_size allocate if out_of_memory throw then + read_buffer_size allocate if ENOMEM throw then read_buffer .addr ! then fd @ read_buffer .addr @ read_buffer_size fread - dup -1 = if read_error throw then + dup -1 = if EREAD throw then dup 0= if true to end_of_file? then read_buffer .len ! ; -: reset_line_buffer - line_buffer .addr @ ?dup if - free-memory - then - 0 line_buffer .addr ! - 0 line_buffer .len ! -; - support-functions definitions : reset_line_reading @@ -419,7 +374,7 @@ support-functions definitions ; : read_line - reset_line_buffer + line_buffer strfree skip_newlines begin read_from_buffer @@ -459,9 +414,9 @@ also parser definitions also 0 value parsing_function 0 value end_of_line -: end_of_line? - line_pointer end_of_line = -; +: end_of_line? line_pointer end_of_line = ; + +\ classifiers for various character classes in the input line : letter? line_pointer c@ >r @@ -480,70 +435,46 @@ also parser definitions also or ; -: quote? - line_pointer c@ [char] " = -; +: quote? line_pointer c@ [char] " = ; -: assignment_sign? - line_pointer c@ [char] = = -; +: assignment_sign? line_pointer c@ [char] = = ; -: comment? - line_pointer c@ [char] # = -; +: comment? line_pointer c@ [char] # = ; -: space? - line_pointer c@ bl = - line_pointer c@ tab = or -; +: space? line_pointer c@ bl = line_pointer c@ tab = or ; -: backslash? - line_pointer c@ [char] \ = -; +: backslash? line_pointer c@ [char] \ = ; -: underscore? - line_pointer c@ [char] _ = -; +: underscore? line_pointer c@ [char] _ = ; -: dot? - line_pointer c@ [char] . = -; +: dot? line_pointer c@ [char] . = ; -: skip_character - line_pointer char+ to line_pointer -; +\ manipulation of input line +: skip_character line_pointer char+ to line_pointer ; -: skip_to_end_of_line - end_of_line to line_pointer -; +: skip_to_end_of_line end_of_line to line_pointer ; : eat_space begin - space? + end_of_line? if 0 else space? then while skip_character - end_of_line? if exit then repeat ; : parse_name ( -- addr len ) line_pointer begin - letter? digit? underscore? dot? or or or + end_of_line? if 0 else letter? digit? underscore? dot? or or or then while skip_character - end_of_line? if - line_pointer over - - strdup - exit - then repeat line_pointer over - strdup ; : remove_backslashes { addr len | addr' len' -- addr' len' } - len allocate if out_of_memory throw then + len allocate if ENOMEM throw then to addr' addr >r begin @@ -561,16 +492,16 @@ also parser definitions also : parse_quote ( -- addr len ) line_pointer skip_character - end_of_line? if syntax_error throw then + end_of_line? if ESYNTAX throw then begin quote? 0= while backslash? if skip_character - end_of_line? if syntax_error throw then + end_of_line? if ESYNTAX throw then then skip_character - end_of_line? if syntax_error throw then + end_of_line? if ESYNTAX throw then repeat skip_character line_pointer over - @@ -579,8 +510,7 @@ also parser definitions also : read_name parse_name ( -- addr len ) - name_buffer .len ! - name_buffer .addr ! + name_buffer strset ; : read_value @@ -589,8 +519,7 @@ also parser definitions also else parse_name ( -- addr len ) then - value_buffer .len ! - value_buffer .addr ! + value_buffer strset ; : comment @@ -600,7 +529,7 @@ also parser definitions also : white_space_4 eat_space comment? if ['] comment to parsing_function exit then - end_of_line? 0= if syntax_error throw then + end_of_line? 0= if ESYNTAX throw then ; : variable_value @@ -613,7 +542,7 @@ also parser definitions also letter? digit? quote? or or if ['] variable_value to parsing_function exit then - syntax_error throw + ESYNTAX throw ; : assignment_sign @@ -624,7 +553,7 @@ also parser definitions also : white_space_2 eat_space assignment_sign? if ['] assignment_sign to parsing_function exit then - syntax_error throw + ESYNTAX throw ; : variable_name @@ -636,13 +565,13 @@ also parser definitions also eat_space letter? if ['] variable_name to parsing_function exit then comment? if ['] comment to parsing_function exit then - end_of_line? 0= if syntax_error throw then + end_of_line? 0= if ESYNTAX throw then ; file-processing definitions : get_assignment - line_buffer .addr @ line_buffer .len @ + to end_of_line + line_buffer strget + to end_of_line line_buffer .addr @ to line_pointer ['] white_space_1 to parsing_function begin @@ -653,7 +582,7 @@ file-processing definitions parsing_function ['] comment = parsing_function ['] white_space_1 = parsing_function ['] white_space_4 = - or or 0= if syntax_error throw then + or or 0= if ESYNTAX throw then ; only forth also support-functions also file-processing definitions also @@ -661,7 +590,7 @@ only forth also support-functions also f \ Process line : assignment_type? ( addr len -- flag ) - name_buffer .addr @ name_buffer .len @ + name_buffer strget compare 0= ; @@ -671,69 +600,56 @@ only forth also support-functions also f over compare 0= ; -: loader_conf_files? - s" loader_conf_files" assignment_type? -; +: loader_conf_files? s" loader_conf_files" assignment_type? ; -: nextboot_flag? - s" nextboot_enable" assignment_type? -; +: nextboot_flag? s" nextboot_enable" assignment_type? ; -: nextboot_conf? - s" nextboot_conf" assignment_type? -; +: nextboot_conf? s" nextboot_conf" assignment_type? ; -: verbose_flag? - s" verbose_loading" assignment_type? -; +: verbose_flag? s" verbose_loading" assignment_type? ; -: execute? - s" exec" assignment_type? -; +: execute? s" exec" assignment_type? ; -: password? - s" password" assignment_type? -; +: password? s" password" assignment_type? ; -: module_load? - load_module_suffix suffix_type? -; +: module_load? load_module_suffix suffix_type? ; -: module_loadname? - module_loadname_suffix suffix_type? -; +: module_loadname? module_loadname_suffix suffix_type? ; -: module_type? - module_type_suffix suffix_type? -; +: module_type? module_type_suffix suffix_type? ; -: module_args? - module_args_suffix suffix_type? -; +: module_args? module_args_suffix suffix_type? ; -: module_beforeload? - module_beforeload_suffix suffix_type? -; +: module_beforeload? module_beforeload_suffix suffix_type? ; -: module_afterload? - module_afterload_suffix suffix_type? -; +: module_afterload? module_afterload_suffix suffix_type? ; -: module_loaderror? - module_loaderror_suffix suffix_type? -; +: module_loaderror? module_loaderror_suffix suffix_type? ; -: set_nextboot_conf - nextboot_conf_file .addr @ ?dup if - free-memory - then - value_buffer .addr @ c@ [char] " = if - value_buffer .addr @ char+ value_buffer .len @ 2 chars - +\ build a 'set' statement and execute it +: set_environment_variable + name_buffer .len @ value_buffer .len @ + 5 chars + \ size of result string + allocate if ENOMEM throw then + dup 0 \ start with an empty string and append the pieces + s" set " strcat + name_buffer strget strcat + s" =" strcat + value_buffer strget strcat + ['] evaluate catch if + 2drop free drop + ESETERROR throw else - value_buffer .addr @ value_buffer .len @ + free-memory then - strdup - nextboot_conf_file .len ! nextboot_conf_file .addr ! +; + +: set_conf_files + set_environment_variable + s" loader_conf_files" getenv conf_files string= +; + +: set_nextboot_conf \ XXX maybe do as set_conf_files ? + value_buffer strget unquote nextboot_conf_file string= ; : append_to_module_options_list ( addr -- ) @@ -746,35 +662,32 @@ only forth also support-functions also f then ; -: set_module_name ( addr -- ) - name_buffer .addr @ name_buffer .len @ - strdup - >r over module.name .addr ! - r> swap module.name .len ! +: set_module_name { addr -- } \ check leaks + name_buffer strget addr module.name string= ; : yes_value? - value_buffer .addr @ value_buffer .len @ + value_buffer strget \ XXX could use unquote 2dup s' "YES"' compare >r 2dup s' "yes"' compare >r 2dup s" YES" compare >r s" yes" compare r> r> r> and and and 0= ; -: find_module_option ( -- addr | 0 ) +: find_module_option ( -- addr | 0 ) \ return ptr to entry matching name_buffer module_options @ begin dup while - dup module.name dup .addr @ swap .len @ - name_buffer .addr @ name_buffer .len @ + dup module.name strget + name_buffer strget compare 0= if exit then module.next @ repeat ; : new_module_option ( -- addr ) - sizeof module allocate if out_of_memory throw then + sizeof module allocate if ENOMEM throw then dup sizeof module erase dup append_to_module_options_list dup set_module_name @@ -792,103 +705,38 @@ only forth also support-functions also f : set_module_args name_buffer .len @ module_args_suffix nip - name_buffer .len ! - get_module_option module.args - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.args string= ; : set_module_loadname name_buffer .len @ module_loadname_suffix nip - name_buffer .len ! - get_module_option module.loadname - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.loadname string= ; : set_module_type name_buffer .len @ module_type_suffix nip - name_buffer .len ! - get_module_option module.type - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.type string= ; : set_module_beforeload name_buffer .len @ module_beforeload_suffix nip - name_buffer .len ! - get_module_option module.beforeload - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.beforeload string= ; : set_module_afterload name_buffer .len @ module_afterload_suffix nip - name_buffer .len ! - get_module_option module.afterload - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.afterload string= ; : set_module_loaderror name_buffer .len @ module_loaderror_suffix nip - name_buffer .len ! - get_module_option module.loaderror - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! -; - -: set_environment_variable - name_buffer .len @ - value_buffer .len @ + - 5 chars + - allocate if out_of_memory throw then - dup 0 ( addr -- addr addr len ) - s" set " strcat - name_buffer .addr @ name_buffer .len @ strcat - s" =" strcat - value_buffer .addr @ value_buffer .len @ strcat - ['] evaluate catch if - 2drop free drop - set_error throw - else - free-memory - then -; - -: set_conf_files - set_environment_variable - s" loader_conf_files" getenv conf_files string= + value_buffer strget unquote + get_module_option module.loaderror string= ; : set_nextboot_flag @@ -900,23 +748,12 @@ only forth also support-functions also f ; : execute_command - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 - swap char+ swap - then - ['] evaluate catch if exec_error throw then + value_buffer strget unquote + ['] evaluate catch if EEXEC throw then ; : set_password - password .addr @ ?dup if free if free_error throw then then - value_buffer .addr @ c@ [char] " = if - value_buffer .addr @ char+ value_buffer .len @ 2 - strdup - value_buffer .addr @ free if free_error throw then - else - value_buffer .addr @ value_buffer .len @ - then - password .len ! password .addr ! - 0 value_buffer .addr ! + value_buffer strget unquote password string= ; : process_assignment @@ -944,16 +781,8 @@ only forth also support-functions also f \ not allocated, it's value (0) is used as flag. : free_buffers - name_buffer .addr @ dup if free then - value_buffer .addr @ dup if free then - or if free_error throw then -; - -: reset_assignment_buffers - 0 name_buffer .addr ! - 0 name_buffer .len ! - 0 value_buffer .addr ! - 0 value_buffer .len ! + name_buffer strfree + value_buffer strfree ; \ Higher level file processing @@ -964,7 +793,7 @@ support-functions definitions begin end_of_file? 0= while - reset_assignment_buffers + free_buffers read_line get_assignment ['] process_assignment catch @@ -977,8 +806,8 @@ support-functions definitions 0 to end_of_file? reset_line_reading O_RDONLY fopen fd ! - fd @ -1 = if open_error throw then - reset_assignment_buffers + fd @ -1 = if EOPEN throw then + free_buffers read_line get_assignment ['] process_assignment catch @@ -991,39 +820,73 @@ only forth also support-functions defini \ Interface to loading conf files : load_conf ( addr len -- ) + ." ----- Trying conf " 2dup type cr 0 to end_of_file? reset_line_reading O_RDONLY fopen fd ! - fd @ -1 = if open_error throw then + fd @ -1 = if EOPEN throw then ['] process_conf catch fd @ fclose throw *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20:15:32 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9917106566C for ; Mon, 5 Jan 2009 20:15:32 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id EFA498FC19 for ; Mon, 5 Jan 2009 20:15:31 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 05 Jan 2009 20:15:30 -0000 Received: from p54A3E58D.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.229.141] by mail.gmx.net (mp001) with SMTP; 05 Jan 2009 21:15:30 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1+T8dxRKVeTwa01BXZql77v1sMZBOgB9uswM+Lsz2 2c35lbgS/TdRm6 Message-ID: <49626A60.70808@gmx.de> Date: Mon, 05 Jan 2009 21:15:28 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> <20090105194210.P45399@maildrop.int.zabbadoz.net> In-Reply-To: <20090105194210.P45399@maildrop.int.zabbadoz.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.59 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:15:33 -0000 Bjoern A. Zeeb schrieb: > On Mon, 5 Jan 2009, Christoph Mallon wrote: >> Bjoern A. Zeeb schrieb: >>> I have broken it out from a larger patch; the C99 initializer is here: >>> http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff >>> >>> I case someone can give it a quick glance I'll commit them. >> >> + .pr_flags = PR_ATOMIC|PR_ADDR, >> >> style(9) wants spaces around binary operators. > > I am not sure it does. "Unary operators do not require spaces, binary operators do." I guess only "usual" binary operators are meant here and it does not include ",", "[]" or "->". > In case it does I am not going to break > consistency with all other 65 places that don't do for pr_flags; You have a point there. Maybe these should be fixed all at once. > but it seems I should change the = to =. /after/ =? This sounds wrong to me. (In general I think using for alignment is a bad idea and it should only be used for indentation) From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20:29:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 765791065675; Mon, 5 Jan 2009 20:29:01 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 648198FC08; Mon, 5 Jan 2009 20:29:01 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05KT1n4010056; Mon, 5 Jan 2009 20:29:01 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05KT1OL010054; Mon, 5 Jan 2009 20:29:01 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901052029.n05KT1OL010054@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 5 Jan 2009 20:29:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186791 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:29:02 -0000 Author: bz Date: Mon Jan 5 20:29:01 2009 New Revision: 186791 URL: http://svn.freebsd.org/changeset/base/186791 Log: Switch the last protosw* structs to C99 initializers. Reviewed by: ed, julian, Christoph Mallon MFC after: 2 weeks Modified: head/sys/netinet6/in6_gif.c head/sys/netipsec/xform_ipip.c Modified: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Mon Jan 5 20:23:01 2009 (r186790) +++ head/sys/netinet6/in6_gif.c Mon Jan 5 20:29:01 2009 (r186791) @@ -75,11 +75,15 @@ static int gif_validate6(const struct ip struct ifnet *); extern struct domain inet6domain; -struct ip6protosw in6_gif_protosw = -{ SOCK_RAW, &inet6domain, 0/* IPPROTO_IPV[46] */, PR_ATOMIC|PR_ADDR, - in6_gif_input, rip6_output, 0, rip6_ctloutput, - 0, 0, 0, 0, - &rip6_usrreqs +struct ip6protosw in6_gif_protosw = { + .pr_type = SOCK_RAW, + .pr_domain = &inet6domain, + .pr_protocol = 0, /* IPPROTO_IPV[46] */ + .pr_flags = PR_ATOMIC|PR_ADDR, + .pr_input = in6_gif_input, + .pr_output = rip6_output, + .pr_ctloutput = rip6_ctloutput, + .pr_usrreqs = &rip6_usrreqs }; int Modified: head/sys/netipsec/xform_ipip.c ============================================================================== --- head/sys/netipsec/xform_ipip.c Mon Jan 5 20:23:01 2009 (r186790) +++ head/sys/netipsec/xform_ipip.c Mon Jan 5 20:29:01 2009 (r186791) @@ -660,20 +660,24 @@ static struct xformsw ipe4_xformsw = { }; extern struct domain inetdomain; -static struct protosw ipe4_protosw = -{ SOCK_RAW, &inetdomain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR|PR_LASTHDR, - ip4_input, - 0, 0, rip_ctloutput, - 0, 0, 0, 0, - &rip_usrreqs +static struct protosw ipe4_protosw = { + .pr_type = SOCK_RAW, + .pr_domain = &inetdomain, + .pr_protocol = IPPROTO_IPV4, + .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, + .pr_input = ip4_input, + .pr_ctloutput = rip_ctloutput, + .pr_usrreqs = &rip_usrreqs }; #ifdef INET6 -static struct ip6protosw ipe6_protosw = -{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR|PR_LASTHDR, - ip4_input6, - 0, 0, rip_ctloutput, - 0, 0, 0, 0, - &rip_usrreqs +static struct ip6protosw ipe6_protosw = { + .pr_type = SOCK_RAW, + .pr_domain = &inetdomain, + .pr_protocol = IPPROTO_IPV6, + .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, + .pr_input = ip4_input6, + .pr_ctloutput = rip_ctloutput, + .pr_usrreqs = &rip_usrreqs }; #endif From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20:43:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4E60106566B; Mon, 5 Jan 2009 20:43:57 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 777A68FC20; Mon, 5 Jan 2009 20:43:57 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.3/8.14.3) with ESMTP id n05Khv5o084924; Mon, 5 Jan 2009 12:43:57 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.3/8.14.3/Submit) id n05KhvZe084918; Mon, 5 Jan 2009 12:43:57 -0800 (PST) (envelope-from sgk) Date: Mon, 5 Jan 2009 12:43:56 -0800 From: Steve Kargl To: "Bjoern A. Zeeb" Message-ID: <20090105204356.GA52934@troutmask.apl.washington.edu> References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> <20090105194210.P45399@maildrop.int.zabbadoz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090105194210.P45399@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Christoph Mallon , src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:43:58 -0000 On Mon, Jan 05, 2009 at 07:45:47PM +0000, Bjoern A. Zeeb wrote: > On Mon, 5 Jan 2009, Christoph Mallon wrote: > > Hi, > > >Bjoern A. Zeeb schrieb: > >>I have broken it out from a larger patch; the C99 initializer is here: > >>http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff > >> > >>I case someone can give it a quick glance I'll commit them. > > > >+ .pr_flags = PR_ATOMIC|PR_ADDR, > > > >style(9) wants spaces around binary operators. > > I am not sure it does. In case it does I am not going to break > consistency with all other 65 places that don't do for pr_flags; > but it seems I should change the = to =. > Thanks for making me look, and thanks for review! > >From style(9): Unary operators do not require spaces, binary operators do. and Stylistic changes (including whitespace changes) are hard on the source repository and are to be avoided without good reason. So, it appears your change conforms to the prevailing style of the file, and is acceptable. -- Steve From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20:46:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 601A610656C5; Mon, 5 Jan 2009 20:46:46 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D51B8FC0C; Mon, 5 Jan 2009 20:46:46 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05KkkCo010604; Mon, 5 Jan 2009 20:46:46 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05KkkAh010603; Mon, 5 Jan 2009 20:46:46 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901052046.n05KkkAh010603@svn.freebsd.org> From: Christian Brueffer Date: Mon, 5 Jan 2009 20:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186793 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:46:47 -0000 Author: brueffer Date: Mon Jan 5 20:46:46 2009 New Revision: 186793 URL: http://svn.freebsd.org/changeset/base/186793 Log: More wording improvements. Discussed with: stas Modified: head/share/man/man4/cpuctl.4 Modified: head/share/man/man4/cpuctl.4 ============================================================================== --- head/share/man/man4/cpuctl.4 Mon Jan 5 20:37:07 2009 (r186792) +++ head/share/man/man4/cpuctl.4 Mon Jan 5 20:46:46 2009 (r186793) @@ -45,18 +45,18 @@ at boot time, place the following in cpuctl_load="YES" .Ed .Sh DESCRIPTION -The special file +The special device .Pa /dev/cpuctl presents interface to the system CPU. It provides functionality to retrieve CPUID information, read/write machine specific registers (MSR) and perform CPU firmware updates. .Pp -For each CPU present in the system, the special file +For each CPU present in the system, the special device .Pa /dev/cpuctl%d with the appropriate index will be created. -For multicore CPUs such -special file will be created for each core. +For multicore CPUs such a +special device will be created for each core. .Pp Currently, only i386 and amd64 processors are supported. From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20:57:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EA83106568E; Mon, 5 Jan 2009 20:57:21 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 665368FC13; Mon, 5 Jan 2009 20:57:21 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 50EE31A3C3B; Mon, 5 Jan 2009 12:57:21 -0800 (PST) Date: Mon, 5 Jan 2009 12:57:21 -0800 From: Alfred Perlstein To: "M. Warner Losh" Message-ID: <20090105205721.GH60686@elvis.mu.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090104.101121.2139791946.imp@bsdimp.com> <20090105050415.GY60686@elvis.mu.org> <20090105.090449.-1253035084.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090105.090449.-1253035084.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:57:22 -0000 * M. Warner Losh [090105 08:05] wrote: > In message: <20090105050415.GY60686@elvis.mu.org> > Alfred Perlstein writes: > : * M. Warner Losh [090104 09:11] wrote: > : > In message: <200901040012.n040C2gH040928@svn.freebsd.org> > : > Alfred Perlstein writes: > : > : Sync with usb4bsd: > : > > : > Alfred, > : > > : > thanks for trudging these fixes into the tree. It is a thankless job > : > that people will complain about... > : > > : > Speaking of complaining, is there a review process that can be joined > : > for them that's more formal than "diff against hps' p4 tree and > : > complain?" > : > : We're trying to figure out a way to do this. We haven't had much > : luck exploring svk/hg/git as they're just about as much work as > : shipping patches back and forth. > : > : I asked core for a restricted "users/hps" area under svn for Hans > : to put code, but that was denied, perhaps now it's time to reconsider > : that? > > And also: > > In my part of the world we give credit or, at the very least, say "thank > > you" to the sender, when we apply patches sent to us. > > One of the things that works well in Linux is the patch queues that > they have. You submit a patch, people talk about it, and various tags > get added to it. They break things down into a series of mostly > independent patches. > > Maybe we should try to initiate something like this so that we can > comment on changes more easily, as well as track submitters and the > like as things pass through Hans. > > Consider it an experiment to see if we can do things to help improve > our world? I guess so, but this can all be implemented via a sandbox in our VCS for Hans/me to use... or GNATS, but that just adds overhead. I sort of feel this would be reinventing something that we already have. -- - Alfred Perlstein From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20:58:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1E4D106566B; Mon, 5 Jan 2009 20:58:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0DAD8FC0C; Mon, 5 Jan 2009 20:58:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05KwfrN011026; Mon, 5 Jan 2009 20:58:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05KwfoM011025; Mon, 5 Jan 2009 20:58:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901052058.n05KwfoM011025@svn.freebsd.org> From: Warner Losh Date: Mon, 5 Jan 2009 20:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186795 - head/sys/dev/pccard X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:58:42 -0000 Author: imp Date: Mon Jan 5 20:58:41 2009 New Revision: 186795 URL: http://svn.freebsd.org/changeset/base/186795 Log: Define bits for memory mapping house keeping by bridges. Modified: head/sys/dev/pccard/pccardvar.h Modified: head/sys/dev/pccard/pccardvar.h ============================================================================== --- head/sys/dev/pccard/pccardvar.h Mon Jan 5 20:55:56 2009 (r186794) +++ head/sys/dev/pccard/pccardvar.h Mon Jan 5 20:58:41 2009 (r186795) @@ -69,6 +69,10 @@ struct pccard_mem_handle { int kind; }; +/* Bits for kind */ +#define PCCARD_MEM_16BIT 1 /* 1 -> 16bit 0 -> 8bit */ +#define PCCARD_MEM_ATTR 2 /* 1 -> attribute mem 0 -> common */ + #define PCCARD_WIDTH_AUTO 0 #define PCCARD_WIDTH_IO8 1 #define PCCARD_WIDTH_IO16 2 From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 21:00:22 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 855E1106566C; Mon, 5 Jan 2009 21:00:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 741F68FC17; Mon, 5 Jan 2009 21:00:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05L0MUH011138; Mon, 5 Jan 2009 21:00:22 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05L0McF011137; Mon, 5 Jan 2009 21:00:22 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901052100.n05L0McF011137@svn.freebsd.org> From: Warner Losh Date: Mon, 5 Jan 2009 21:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186796 - head/sys/dev/exca X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 21:00:23 -0000 Author: imp Date: Mon Jan 5 21:00:22 2009 New Revision: 186796 URL: http://svn.freebsd.org/changeset/base/186796 Log: First cut at fixing memory mapping botch. Nobody must use the ray(4) driver since it couldn't have worked with NEWCARD w/o these fixes. This should allow selecting 16-bit memory width as well (which was what was broken). Modified: head/sys/dev/exca/exca.c Modified: head/sys/dev/exca/exca.c ============================================================================== --- head/sys/dev/exca/exca.c Mon Jan 5 20:58:41 2009 (r186795) +++ head/sys/dev/exca/exca.c Mon Jan 5 21:00:22 2009 (r186796) @@ -179,39 +179,38 @@ exca_do_mem_map(struct exca_softc *sc, i struct mem_map_index_st *map; struct pccard_mem_handle *mem; uint32_t offset; - int mem8 = 1 /* mem->kind == PCCARD_A_MEM_ATTR */; + uint32_t mem16; + uint32_t attrmem; map = &mem_map_index[win]; mem = &sc->mem[win]; + mem16 = (mem->kind & PCCARD_MEM_16BIT) ? + EXCA_SYSMEM_ADDRX_START_MSB_DATASIZE_16BIT : 0; + attrmem = (mem->kind & PCCARD_MEM_ATTR) ? + EXCA_CARDMEM_ADDRX_MSB_REGACTIVE_ATTR : 0; offset = ((mem->cardaddr >> EXCA_CARDMEM_ADDRX_SHIFT) - (mem->addr >> EXCA_SYSMEM_ADDRX_SHIFT)) & 0x3fff; exca_putb(sc, map->sysmem_start_lsb, - (mem->addr >> EXCA_SYSMEM_ADDRX_SHIFT) & 0xff); + mem->addr >> EXCA_SYSMEM_ADDRX_SHIFT); exca_putb(sc, map->sysmem_start_msb, ((mem->addr >> (EXCA_SYSMEM_ADDRX_SHIFT + 8)) & - EXCA_SYSMEM_ADDRX_START_MSB_ADDR_MASK) | - (mem8 ? 0 : EXCA_SYSMEM_ADDRX_START_MSB_DATASIZE_16BIT)); + EXCA_SYSMEM_ADDRX_START_MSB_ADDR_MASK) | mem16); exca_putb(sc, map->sysmem_stop_lsb, - ((mem->addr + mem->realsize - 1) >> - EXCA_SYSMEM_ADDRX_SHIFT) & 0xff); + (mem->addr + mem->realsize - 1) >> EXCA_SYSMEM_ADDRX_SHIFT); exca_putb(sc, map->sysmem_stop_msb, (((mem->addr + mem->realsize - 1) >> (EXCA_SYSMEM_ADDRX_SHIFT + 8)) & EXCA_SYSMEM_ADDRX_STOP_MSB_ADDR_MASK) | EXCA_SYSMEM_ADDRX_STOP_MSB_WAIT2); - - exca_putb(sc, map->sysmem_win, - (mem->addr >> EXCA_MEMREG_WIN_SHIFT) & 0xff); + exca_putb(sc, map->sysmem_win, mem->addr >> EXCA_MEMREG_WIN_SHIFT); exca_putb(sc, map->cardmem_lsb, offset & 0xff); - exca_putb(sc, map->cardmem_msb, (((offset >> 8) & 0xff) & - EXCA_CARDMEM_ADDRX_MSB_ADDR_MASK) | - ((mem->kind == PCCARD_A_MEM_ATTR) ? - EXCA_CARDMEM_ADDRX_MSB_REGACTIVE_ATTR : 0)); + exca_putb(sc, map->cardmem_msb, ((offset >> 8) & + EXCA_CARDMEM_ADDRX_MSB_ADDR_MASK) | attrmem); #ifdef EXCA_DEBUG - if (mem->kind == PCCARD_A_MEM_ATTR) + if (mem->kind & PCCARD_MEM_ATTR) printf("attribtue memory\n"); else printf("common memory\n"); @@ -342,7 +341,21 @@ exca_mem_set_flags(struct exca_softc *sc return (ENOENT); } - sc->mem[win].kind = flags; + switch (flags) + { + case PCCARD_A_MEM_ATTR: + sc->mem[win].kind |= PCCARD_MEM_ATTR; + break; + case PCCARD_A_MEM_COM: + sc->mem[win].kind &= ~PCCARD_MEM_ATTR; + break; + case PCCARD_A_MEM_16BIT: + sc->mem[win].kind |= PCCARD_MEM_16BIT; + break; + case PCCARD_A_MEM_8BIT: + sc->mem[win].kind &= ~PCCARD_MEM_16BIT; + break; + } exca_do_mem_map(sc, win); return (0); } @@ -801,7 +814,7 @@ exca_activate_resource(struct exca_softc err = exca_io_map(exca, PCCARD_WIDTH_AUTO, res); break; case SYS_RES_MEMORY: - err = exca_mem_map(exca, PCCARD_A_MEM_COM, res); + err = exca_mem_map(exca, 0, res); break; } if (err) From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 21:03:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F7B61065716 for ; Mon, 5 Jan 2009 21:03:17 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id CC0338FC14 for ; Mon, 5 Jan 2009 21:03:16 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 05 Jan 2009 21:03:15 -0000 Received: from p54A3E58D.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.229.141] by mail.gmx.net (mp064) with SMTP; 05 Jan 2009 22:03:15 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/A+BMXzjzAwPU6VatTS/oJDzINilTmj5HPshUbfd 4p7gwS5Css/fv2 Message-ID: <49627592.60208@gmx.de> Date: Mon, 05 Jan 2009 22:03:14 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Steve Kargl References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> <20090105194210.P45399@maildrop.int.zabbadoz.net> <20090105204356.GA52934@troutmask.apl.washington.edu> In-Reply-To: <20090105204356.GA52934@troutmask.apl.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.75 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 21:03:17 -0000 Steve Kargl schrieb: > Stylistic changes (including whitespace changes) are hard on > the source repository and are to be avoided without good reason. Yet another anachronism in style(9). (Does that sentence even mean what I think it means? Somehow it sounds like "there is no good reason, but avoid them anyway" instead of "avoid them if you have no good reason".) From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 21:05:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43FD1065675 for ; Mon, 5 Jan 2009 21:05:35 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 5DA2C8FC1D for ; Mon, 5 Jan 2009 21:05:35 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 68B578FC5C for ; Tue, 6 Jan 2009 00:05:34 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 58F9D8FC57; Tue, 6 Jan 2009 00:05:31 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 8BCF9398F3; Tue, 6 Jan 2009 00:07:57 +0300 (MSK) Date: Tue, 6 Jan 2009 00:07:57 +0300 From: Stanislav Sedov To: Alfred Perlstein Message-Id: <20090106000757.9c92d93d.stas@FreeBSD.org> In-Reply-To: <200901040012.n040C2gH040928@svn.freebsd.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 00:05:34 2009 X-DSPAM-Confidence: 1.0000 X-DSPAM-Improbability: 1 in 98689409 chance of being spam X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 4962761e967002037718652 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Hans Petter Selasky Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 21:05:37 -0000 On Sun, 4 Jan 2009 00:12:02 +0000 (UTC) Alfred Perlstein mentioned: > Author: alfred > Date: Sun Jan 4 00:12:01 2009 > New Revision: 186730 > URL: http://svn.freebsd.org/changeset/base/186730 > > Log: > Sync with usb4bsd: > > src/lib/libusb20/libusb20_desc.c > > Make "libusb20_desc_foreach()" more readable. > > src/sys/dev/usb2/controller/*.[ch] > src/sys/dev/usb2/core/*.[ch] > > Implement support for USB power save for all HC's. > > Implement support for Big-endian EHCI. > > Move Huawei quirks back into "u3g" driver. > > Improve device enumeration. > > src/sys/dev/usb2/ethernet/*[ch] > > Patches for supporting new AXE Gigabit chipset. > > src/sys/dev/usb2/serial/*[ch] > > Fix IOCTL return code. > > src/sys/dev/usb2/wlan/*[ch] > > Sync with old USB stack. > > Submitted by: hps ... > +#if (USB_DEBUG != 0) > + if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { > + /* > + * This check verifies that the physical address is correct: > + */ > + DPRINTFN(0, "Page offset was not preserved!\n"); > + error = 1; > + goto done; > + } > +#endif > while (nseg > 0) { > nseg--; > segs++; > @@ -788,7 +800,16 @@ > ext_seg = 0; > } > nseg--; > - > +#if (USB_DEBUG != 0) > + if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { > + /* > + * This check verifies that the physical address is correct: > + */ > + DPRINTFN(0, "Page offset was not preserved!\n"); > + error = 1; > + goto done; > + } > +#endif This bits prevent usb2 from working on my desktop with the following messages: usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_alloc_device:1423: set address 2 failed (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_alloc_device:1458: getting device descriptor at addr 2 failed! usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_alloc_device:1423: set address 2 failed (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_alloc_device:1458: getting device descriptor at addr 2 failed! usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! Starting Network: lo0 em0. Waiting 30s for an interface to come up: usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! ugen3.2: <> at usbus3 (disconnected) uhub_reattach_port:417: could not allocate new device! usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! ugen1.2: <> at usbus1 (disconnected) uhub_reattach_port:417: could not allocate new device! Can you take a look at this? Thanks! -- Stanislav Sedov ST4096-RIPE !DSPAM:4962761e967002037718652! From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 21:09:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2614D106566B; Mon, 5 Jan 2009 21:09:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C6F548FC19; Mon, 5 Jan 2009 21:09:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n05L6bO8017451; Mon, 5 Jan 2009 14:06:37 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 05 Jan 2009 14:06:54 -0700 (MST) Message-Id: <20090105.140654.796891882.imp@bsdimp.com> To: alfred@freebsd.org From: "M. Warner Losh" In-Reply-To: <20090105205721.GH60686@elvis.mu.org> References: <20090105050415.GY60686@elvis.mu.org> <20090105.090449.-1253035084.imp@bsdimp.com> <20090105205721.GH60686@elvis.mu.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 21:09:25 -0000 In message: <20090105205721.GH60686@elvis.mu.org> Alfred Perlstein writes: : * M. Warner Losh [090105 08:05] wrote: : > In message: <20090105050415.GY60686@elvis.mu.org> : > Alfred Perlstein writes: : > : * M. Warner Losh [090104 09:11] wrote: : > : > In message: <200901040012.n040C2gH040928@svn.freebsd.org> : > : > Alfred Perlstein writes: : > : > : Sync with usb4bsd: : > : > : > : > Alfred, : > : > : > : > thanks for trudging these fixes into the tree. It is a thankless job : > : > that people will complain about... : > : > : > : > Speaking of complaining, is there a review process that can be joined : > : > for them that's more formal than "diff against hps' p4 tree and : > : > complain?" : > : : > : We're trying to figure out a way to do this. We haven't had much : > : luck exploring svk/hg/git as they're just about as much work as : > : shipping patches back and forth. : > : : > : I asked core for a restricted "users/hps" area under svn for Hans : > : to put code, but that was denied, perhaps now it's time to reconsider : > : that? : > : > And also: : > > In my part of the world we give credit or, at the very least, say "thank : > > you" to the sender, when we apply patches sent to us. : > : > One of the things that works well in Linux is the patch queues that : > they have. You submit a patch, people talk about it, and various tags : > get added to it. They break things down into a series of mostly : > independent patches. : > : > Maybe we should try to initiate something like this so that we can : > comment on changes more easily, as well as track submitters and the : > like as things pass through Hans. : > : > Consider it an experiment to see if we can do things to help improve : > our world? : : I guess so, but this can all be implemented via a sandbox in : our VCS for Hans/me to use... or GNATS, but that just adds overhead. : : I sort of feel this would be reinventing something that we already : have. We don't already have this. The patch streams that are implemented elsewhere serve the purpose of review and tracking. Patches are posted to a mailing list, people review them, they get committed upstream. See, for example, the qemu developer mailing list for one way this is done. If we were to follow that model, individual patches would be generated, posted there, and then committed as patches if there were no objections. While many of these features would be there in, say, an svn project tree, the review before merge isn't. Also, by forcing the patches to be reviewed and committed individually, we retain more history than we have now. And we have fewer chances to undo changes that are committed between big honkin' code drops into the tree. We need to draw more developers into this process. It can't just be Hans feeding you patches forever. There has to be uptake by the greater FreeBSD community of developers, or this usb stack will fail like the last one did. We need a bus-factor greater than 1. It is my contention that having a more public review process would help facilitate drawing more people in... Warner From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 21:51:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FAEC1065672; Mon, 5 Jan 2009 21:51:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D6E48FC21; Mon, 5 Jan 2009 21:51:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Lpoeb012280; Mon, 5 Jan 2009 21:51:50 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05LpnTJ012276; Mon, 5 Jan 2009 21:51:49 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200901052151.n05LpnTJ012276@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 5 Jan 2009 21:51:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186797 - in head/sys: amd64/amd64 amd64/include i386/cpufreq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 21:51:51 -0000 Author: jkim Date: Mon Jan 5 21:51:49 2009 New Revision: 186797 URL: http://svn.freebsd.org/changeset/base/186797 Log: Add Centaur/IDT/VIA vendor ID for Nano family, which has long mode support. Modified: head/sys/amd64/amd64/identcpu.c head/sys/amd64/include/cputypes.h head/sys/amd64/include/specialreg.h head/sys/i386/cpufreq/est.c Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Mon Jan 5 21:00:22 2009 (r186796) +++ head/sys/amd64/amd64/identcpu.c Mon Jan 5 21:51:49 2009 (r186797) @@ -102,6 +102,7 @@ static struct { } cpu_vendors[] = { { INTEL_VENDOR_ID, CPU_VENDOR_INTEL }, /* GenuineIntel */ { AMD_VENDOR_ID, CPU_VENDOR_AMD }, /* AuthenticAMD */ + { CENTAUR_VENDOR_ID, CPU_VENDOR_CENTAUR }, /* CentaurHauls */ }; int cpu_cores; Modified: head/sys/amd64/include/cputypes.h ============================================================================== --- head/sys/amd64/include/cputypes.h Mon Jan 5 21:00:22 2009 (r186796) +++ head/sys/amd64/include/cputypes.h Mon Jan 5 21:51:49 2009 (r186797) @@ -47,7 +47,9 @@ * Vendors of processor. */ #define CPU_VENDOR_AMD 0x1022 /* AMD */ +#define CPU_VENDOR_IDT 0x111d /* Centaur/IDT/VIA */ #define CPU_VENDOR_INTEL 0x8086 /* Intel */ +#define CPU_VENDOR_CENTAUR CPU_VENDOR_IDT #ifndef LOCORE extern int cpu; Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Mon Jan 5 21:00:22 2009 (r186796) +++ head/sys/amd64/include/specialreg.h Mon Jan 5 21:51:49 2009 (r186797) @@ -205,6 +205,7 @@ * CPUID manufacturers identifiers */ #define AMD_VENDOR_ID "AuthenticAMD" +#define CENTAUR_VENDOR_ID "CentaurHauls" #define INTEL_VENDOR_ID "GenuineIntel" /* Modified: head/sys/i386/cpufreq/est.c ============================================================================== --- head/sys/i386/cpufreq/est.c Mon Jan 5 21:00:22 2009 (r186796) +++ head/sys/i386/cpufreq/est.c Mon Jan 5 21:51:49 2009 (r186797) @@ -55,10 +55,6 @@ __FBSDID("$FreeBSD$"); #define MSR_MISC_ENABLE 0x1a0 #define MSR_SS_ENABLE (1<<16) -#ifndef CPU_VENDOR_CENTAUR -#define CPU_VENDOR_CENTAUR 0x111d -#endif - /* Frequency and MSR control values. */ typedef struct { uint16_t freq; From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 22:09:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C908210656BB; Mon, 5 Jan 2009 22:09:33 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8E28FC18; Mon, 5 Jan 2009 22:09:32 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=TFc2zGvHZnoA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=6I5d2MoRAAAA:8 a=QgLjfRn7plP4TwmgLsgA:9 a=3zHzqPp2frb5drdnqTsA:7 a=l7Pb6bEAkraB9rQVZIdEkA_qwYMA:4 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1073003297; Mon, 05 Jan 2009 22:09:27 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Mon, 5 Jan 2009 22:11:49 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106000757.9c92d93d.stas@FreeBSD.org> In-Reply-To: <20090106000757.9c92d93d.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901052211.50514.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:09:34 -0000 On Monday 05 January 2009, Stanislav Sedov wrote: > On Sun, 4 Jan 2009 00:12:02 +0000 (UTC) > > Alfred Perlstein mentioned: > > Author: alfred > > Date: Sun Jan 4 00:12:01 2009 > > New Revision: 186730 > > URL: http://svn.freebsd.org/changeset/base/186730 > > > > Log: > > Sync with usb4bsd: > > > > src/lib/libusb20/libusb20_desc.c > > > > Make "libusb20_desc_foreach()" more readable. > > > > src/sys/dev/usb2/controller/*.[ch] > > src/sys/dev/usb2/core/*.[ch] > > > > Implement support for USB power save for all HC's. > > > > Implement support for Big-endian EHCI. > > > > Move Huawei quirks back into "u3g" driver. > > > > Improve device enumeration. > > > > src/sys/dev/usb2/ethernet/*[ch] > > > > Patches for supporting new AXE Gigabit chipset. > > > > src/sys/dev/usb2/serial/*[ch] > > > > Fix IOCTL return code. > > > > src/sys/dev/usb2/wlan/*[ch] > > > > Sync with old USB stack. > > > > Submitted by: hps > > ... > > > +#if (USB_DEBUG != 0) > > + if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { > > + /* > > + * This check verifies that the physical address is correct: > > + */ > > + DPRINTFN(0, "Page offset was not preserved!\n"); > > + error = 1; > > + goto done; > > + } > > +#endif > > while (nseg > 0) { > > nseg--; > > segs++; > > @@ -788,7 +800,16 @@ > > ext_seg = 0; > > } > > nseg--; > > - > > +#if (USB_DEBUG != 0) > > + if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { > > + /* > > + * This check verifies that the physical address is correct: > > + */ > > + DPRINTFN(0, "Page offset was not preserved!\n"); > > + error = 1; > > + goto done; > > + } > > +#endif > > This bits prevent usb2 from working on my desktop with the following > messages: usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_alloc_device:1423: set address 2 failed (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_alloc_device:1458: getting device descriptor at addr 2 failed! > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_alloc_device:1423: set address 2 failed (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_alloc_device:1458: getting device descriptor at addr 2 failed! > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > Starting Network: lo0 em0. > Waiting 30s for an interface to come up: > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > ugen3.2: <> at usbus3 (disconnected) > uhub_reattach_port:417: could not allocate new device! > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > ugen1.2: <> at usbus1 (disconnected) > uhub_reattach_port:417: could not allocate new device! > > Can you take a look at this? > > Thanks! Try this patch and let me know the result! I see exactly why things are not working! http://perforce.freebsd.org/chv.cgi?CH=154181 It's not a USB problem! --HPS From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 22:09:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CCF11065716; Mon, 5 Jan 2009 22:09:47 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A7C28FC17; Mon, 5 Jan 2009 22:09:47 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05M9lBG012760; Mon, 5 Jan 2009 22:09:47 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05M9liJ012756; Mon, 5 Jan 2009 22:09:47 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901052209.n05M9liJ012756@svn.freebsd.org> From: Ed Schouten Date: Mon, 5 Jan 2009 22:09:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186798 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:09:48 -0000 Author: ed Date: Mon Jan 5 22:09:46 2009 New Revision: 186798 URL: http://svn.freebsd.org/changeset/base/186798 Log: Import yet some more small fixes to libteken sources: - Implement NP (ASCII 12, Form Feed). When used with cons25, it should clear the screen and place the cursor at the top of the screen. When used with xterm, it should just simulate a newline. - When we want to use xterm emulation, make teken_demo set TERM to xterm. Spotted by: Paul B. Mahol Modified: head/sys/dev/syscons/teken/teken.c head/sys/dev/syscons/teken/teken_demo.c head/sys/dev/syscons/teken/teken_subr.h Modified: head/sys/dev/syscons/teken/teken.c ============================================================================== --- head/sys/dev/syscons/teken/teken.c Mon Jan 5 21:51:49 2009 (r186797) +++ head/sys/dev/syscons/teken/teken.c Mon Jan 5 22:09:46 2009 (r186798) @@ -226,6 +226,9 @@ teken_input_char(teken_t *t, teken_char_ case '\x0B': teken_subr_newline(t); break; + case '\x0C': + teken_subr_newpage(t); + break; case '\r': teken_subr_carriage_return(t); break; Modified: head/sys/dev/syscons/teken/teken_demo.c ============================================================================== --- head/sys/dev/syscons/teken/teken_demo.c Mon Jan 5 21:51:49 2009 (r186797) +++ head/sys/dev/syscons/teken/teken_demo.c Mon Jan 5 22:09:46 2009 (r186798) @@ -279,7 +279,11 @@ main(int argc __unused, char *argv[] __u perror("forkpty"); exit(1); case 0: +#ifdef TEKEN_CONS25 setenv("TERM", "cons25", 1); +#else /* !TEKEN_CONS25 */ + setenv("TERM", "xterm", 1); +#endif /* TEKEN_CONS25 */ #ifdef TEKEN_UTF8 setenv("LC_CTYPE", "UTF-8", 0); #endif /* TEKEN_UTF8 */ Modified: head/sys/dev/syscons/teken/teken_subr.h ============================================================================== --- head/sys/dev/syscons/teken/teken_subr.h Mon Jan 5 21:51:49 2009 (r186797) +++ head/sys/dev/syscons/teken/teken_subr.h Mon Jan 5 22:09:46 2009 (r186798) @@ -662,6 +662,24 @@ teken_subr_newline(teken_t *t) } static void +teken_subr_newpage(teken_t *t) +{ +#ifdef TEKEN_CONS25 + teken_rect_t tr; + + tr.tr_begin.tp_row = tr.tr_begin.tp_col = 0; + tr.tr_end = t->t_winsize; + teken_funcs_fill(t, &tr, BLANK, &t->t_curattr); + + t->t_cursor.tp_row = t->t_cursor.tp_col = 0; + teken_funcs_cursor(t); +#else /* !TEKEN_CONS25 */ + + teken_subr_newline(t); +#endif /* TEKEN_CONS25 */ +} + +static void teken_subr_next_line(teken_t *t) { From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 22:18:24 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09CE31065672; Mon, 5 Jan 2009 22:18:24 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id DD1D18FC18; Mon, 5 Jan 2009 22:18:23 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n05MHxBQ058196; Mon, 5 Jan 2009 14:17:59 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n05MHxHK058195; Mon, 5 Jan 2009 14:17:59 -0800 (PST) (envelope-from obrien) Date: Mon, 5 Jan 2009 14:17:59 -0800 From: "David O'Brien" To: Ed Schouten Message-ID: <20090105221759.GA57949@dragon.NUXI.org> References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> <20090104121331.GC14235@hoeg.nl> <20090105171523.GC50568@dragon.NUXI.org> <20090105172243.GO14235@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090105172243.GO14235@hoeg.nl> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:18:24 -0000 On Mon, Jan 05, 2009 at 06:22:43PM +0100, Ed Schouten wrote: > Hello David, > * David O'Brien wrote: > > Why xterm and not vt100? > > The reason I'm proposing xterm, is because it is the best supported > terminal type out there. Example: if we would use TERM=vt100, we would > only get black & white. If we use TERM=vt100-color, we do get the There's always vt340. :-) But I see your point that color is desired. > I hope that answers your question? Yes - thank you for the good explanation. I thought it might be UTF-8 related, but really don't know too much about UTF-8. -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 22:46:54 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1FBF1065670 for ; Mon, 5 Jan 2009 22:46:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 49CFE8FC1B for ; Mon, 5 Jan 2009 22:46:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 1183 invoked by uid 399); 5 Jan 2009 22:46:54 -0000 Received: from localhost (HELO ?192.168.0.4?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 5 Jan 2009 22:46:54 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <49628DD3.8020901@FreeBSD.org> Date: Mon, 05 Jan 2009 14:46:43 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: src-committers@FreeBSD.org References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <18782.40912.247441.716938@hergotha.csail.mit.edu> In-Reply-To: <18782.40912.247441.716938@hergotha.csail.mit.edu> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:46:55 -0000 Garrett Wollman wrote: >> Garrett Wollman wrote: >>> It would be much better if the options that *nearly every user will >>> want to use* are set correctly by default. Taking a step back from the specifics for a minute, I completely fail to understand why so many people believe that this should be true for this one program. I have been using Unix systems for 15 years now, and I have extensive tweaks to nearly every command I use on a regular basis. I have a .nexrc file for vi I have a .inputrc file for readline (esp. bash) I have a .cvsrc I have a .profile for sh, an aliases file that is common to sh and bash, a .bash_profile, .bashrc, etc. I have a .portmasterrc, and of course a .mergemasterrc That's not counting all of the aliases for things like ls, df, etc.; and it's totally ignoring all of the programs that dump their own config files (like Alpine, Openbox, WindowMaker, etc.). On my most basic system I have no less than 12 config files in /etc (and nothing particularly exotic) that I have to copy when I do a clean upgrade, so I have no sympathy for the argument that copying /etc/mergemaster.rc is an overwhelming burden. It's Ok with me if you don't like the defaults for mergemaster. I have provided extensive capabilities for customizing it for your preferences. I note with interest that several of the people who have complained the loudest have either never read the man page, or haven't read it all the way through. And yes, I do believe that users continue to have the "nothing done to your system by default" expectation. But given that the default has been what it is for over 10 years, and given that it's always a bad idea to change default behavior in an application, I don't see myself agreeing to change it any time soon. A few more specifics in no particular order: You can save yourself a lot of time hitting 'i' with the -U option. You don't have to page through the whole diff if you use less as your PAGER. Matt Dillon's change to the PAGER was the single thing I got the most user complaints about. Sometimes, particularly between major version upgrades, default behavior for something in /etc/ changes. I personally think it's useful for users to see those changes by default. Others may disagree, that's why there are options to avoid that. I will not be supportive of anything with "mergemaster" in the name set to modify the base by default. I have always said however that I would be pleased as punch if someone wanted to make a new etc/config file updating thingy, in which case you should feel free to have whatever defaults you want. If mergemaster falls out of favor and is no longer needed in the base because the new thing is much better, I have no problems with that. There are even a few candidates in ports that are worth a look. hope this helps, Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 22:47:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DF851065670 for ; Mon, 5 Jan 2009 22:47:57 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1508FC1C for ; Mon, 5 Jan 2009 22:47:57 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id F24508FC53 for ; Tue, 6 Jan 2009 01:47:55 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 3E3958FC18; Tue, 6 Jan 2009 01:47:52 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 2D1D9398F3; Tue, 6 Jan 2009 01:50:18 +0300 (MSK) Date: Tue, 6 Jan 2009 01:50:12 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106015012.548aaa9d.stas@FreeBSD.org> In-Reply-To: <200901052211.50514.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106000757.9c92d93d.stas@FreeBSD.org> <200901052211.50514.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 01:47:55 2009 X-DSPAM-Confidence: 1.0000 X-DSPAM-Improbability: 1 in 98689409 chance of being spam X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 49628e1b967001051363828 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:47:57 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 5 Jan 2009 22:11:49 +0100 Hans Petter Selasky mentioned: > > Try this patch and let me know the result! I see exactly why things are not > working! > > http://perforce.freebsd.org/chv.cgi?CH=154181 > > > It's not a USB problem! > These patches help. Now everything works. Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAklijqoACgkQK/VZk+smlYE+swCeOitw67RJbRYabQTgz2DTnEvs C+QAn0DIvn3tak96oJkAtt1qvkjq1aW4 =0yaH -----END PGP SIGNATURE----- !DSPAM:49628e1b967001051363828! From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 22:52:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E54D41065670; Mon, 5 Jan 2009 22:52:37 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id B15438FC23; Mon, 5 Jan 2009 22:52:37 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n05MqXSJ049188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Jan 2009 14:52:34 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <49628F31.5040606@freebsd.org> Date: Mon, 05 Jan 2009 14:52:33 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Christoph Mallon References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> <20090105194210.P45399@maildrop.int.zabbadoz.net> <20090105204356.GA52934@troutmask.apl.washington.edu> <49627592.60208@gmx.de> In-Reply-To: <49627592.60208@gmx.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org, Steve Kargl Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:52:38 -0000 Christoph Mallon wrote: > Steve Kargl schrieb: >> Stylistic changes (including whitespace changes) are hard on >> the source repository and are to be avoided without good reason. > > Yet another anachronism in style(9). > (Does that sentence even mean what I think it means? Somehow it sounds > like "there is no good reason, but avoid them anyway" instead of > "avoid them if you have no good reason".) > > And for the N'th time I will say: style is guideline and not a contract. The day people arbitrarily change code simply because some cabal decided where spaces should go is the day people will stop contributing. It's all fine and well to make style consistent when you're working in an area of the code (and can verify your changes) but knob polishing is just code churn and in my experience is counter-productive. Spend your time and effort on fixing real problems; god knows we've got enough of 'em... Sam From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 23:11:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25AA5106564A for ; Mon, 5 Jan 2009 23:11:38 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from mail-out2.fuse.net (mail-out2.fuse.net [216.68.8.171]) by mx1.freebsd.org (Postfix) with ESMTP id D15848FC14 for ; Mon, 5 Jan 2009 23:11:37 +0000 (UTC) (envelope-from cokane@FreeBSD.org) X-CNFS-Analysis: v=1.0 c=1 a=VBWXqiNljtYA:10 a=4sCiAi32jZgA:10 a=LkYvsgB9u1MH7Ao0BLhsLg==:17 a=1y3wLVyHvuV-DGakN5kA:9 a=Mgz1k1vZPO8QfofpCsSDIzABEKEA:4 a=LY0hPdMaydYA:10 a=ApawOiLNbh1uXRHR0lcA:9 a=9CU_ybZ4FjlN7utNSoDZDu1c_0EA:4 a=rPt6xJ-oxjAA:10 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Received: from [74.215.227.9] ([74.215.227.9:50020] helo=discordia) by mail-out2.fuse.net (ecelerity 2.1.1.22 r(17669)) with ESMTP id 1D/01-17809-32092694 for ; Mon, 05 Jan 2009 17:56:35 -0500 Received: by discordia (Postfix, from userid 103) id 36E041DB2FA; Mon, 5 Jan 2009 17:56:35 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.1.8-gr1 (2007-02-13) on discordia X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8-gr1 Received: from [172.31.1.6] (unknown [172.31.1.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by discordia (Postfix) with ESMTP id A51AD1DB2F9; Mon, 5 Jan 2009 17:56:28 -0500 (EST) From: Coleman Kane To: Sam Leffler In-Reply-To: <49628F31.5040606@freebsd.org> References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> <20090105194210.P45399@maildrop.int.zabbadoz.net> <20090105204356.GA52934@troutmask.apl.washington.edu> <49627592.60208@gmx.de> <49628F31.5040606@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-TFryUuFZ4ZKFyM/OjpCd" Organization: FreeBSD Project Date: Mon, 05 Jan 2009 17:56:29 -0500 Message-Id: <1231196189.9129.1.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Steve Kargl , svn-src-head@freebsd.org, Christoph Mallon Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 23:11:38 -0000 --=-TFryUuFZ4ZKFyM/OjpCd Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2009-01-05 at 14:52 -0800, Sam Leffler wrote: > Christoph Mallon wrote: > > Steve Kargl schrieb: > >> Stylistic changes (including whitespace changes) are hard on > >> the source repository and are to be avoided without good reason.=20 > > > > Yet another anachronism in style(9). > > (Does that sentence even mean what I think it means? Somehow it sounds=20 > > like "there is no good reason, but avoid them anyway" instead of=20 > > "avoid them if you have no good reason".) > > > > > And for the N'th time I will say: style is guideline and not a=20 > contract. The day people arbitrarily change code simply because some=20 > cabal decided where spaces should go is the day people will stop=20 > contributing. It's all fine and well to make style consistent when=20 > you're working in an area of the code (and can verify your changes) but=20 > knob polishing is just code churn and in my experience is=20 > counter-productive. Spend your time and effort on fixing real problems;=20 > god knows we've got enough of 'em... >=20 > Sam >=20 Maybe prepend 'Mere' to the beginning of that sentence in style(9)? I am amused by the thread on stylistic changes to style(9). /me ducks! --=20 Coleman Kane --=-TFryUuFZ4ZKFyM/OjpCd Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAklikBkACgkQcMSxQcXat5eoqgCePtCa+VdbtDF3G3sOs2LitE7R Mm0An0NncYOpsVVavM6uicQe8d+hiQWe =LEXy -----END PGP SIGNATURE----- --=-TFryUuFZ4ZKFyM/OjpCd-- From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 23:24:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13CD0106568A; Mon, 5 Jan 2009 23:24:58 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 8394C8FC16; Mon, 5 Jan 2009 23:24:57 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n05NDOvo021582; Tue, 6 Jan 2009 02:13:25 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Tue, 6 Jan 2009 02:13:24 +0300 (MSK) From: Dmitry Morozovsky To: Ulf Lilleengen In-Reply-To: <200901051518.n05FIGli099929@svn.freebsd.org> Message-ID: References: <200901051518.n05FIGli099929@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (woozle.rinet.ru [0.0.0.0]); Tue, 06 Jan 2009 02:13:25 +0300 (MSK) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186781 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 23:24:58 -0000 On Mon, 5 Jan 2009, Ulf Lilleengen wrote: UL> Author: lulf UL> Date: Mon Jan 5 15:18:16 2009 UL> New Revision: 186781 UL> URL: http://svn.freebsd.org/changeset/base/186781 UL> UL> Log: UL> Merge support for CVSMode (aka. mirror mode) into csup. This means csup can now UL> fetch a complete CVS repository. Support for rsync update of regular files are UL> also included, but are not yet enabled. The change should not have an impact on UL> existing csup usage, as little of the existing code has changed. Any plans to MFC this to stable/7 aka RELENG_7? BTW, are these changed comparing november patch? With this, I occasionally have "protocol error"s which are fixed by invoking cvsup -s... Thanks! Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 23:24:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 497401065680; Mon, 5 Jan 2009 23:24:59 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id B84268FC17; Mon, 5 Jan 2009 23:24:58 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n05NG4Yo023071; Tue, 6 Jan 2009 02:16:04 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Tue, 6 Jan 2009 02:16:04 +0300 (MSK) From: Dmitry Morozovsky To: Ulf Lilleengen In-Reply-To: <20090105160025.GA22123@carrot.lan> Message-ID: References: <200901051518.n05FIGli099929@svn.freebsd.org> <20090105160025.GA22123@carrot.lan> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (woozle.rinet.ru [0.0.0.0]); Tue, 06 Jan 2009 02:16:04 +0300 (MSK) Cc: svn-src-head@freebsd.org, naddy@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, kris@freebsd.org Subject: Re: svn commit: r186781 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 23:25:00 -0000 On Mon, 5 Jan 2009, Ulf Lilleengen wrote: UL> > Merge support for CVSMode (aka. mirror mode) into csup. This means csup can now UL> > fetch a complete CVS repository. Support for rsync update of regular files are UL> > also included, but are not yet enabled. The change should not have an impact on UL> > existing csup usage, as little of the existing code has changed. UL> > UL> A big thanks to naddy@ and kris@ for help with testing and reproducing UL> problems. BTW, it seems now the only thing csup is missing is server mode (and authentication, but this is another story...) ;-) Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 23:25:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D0CD10656C1; Mon, 5 Jan 2009 23:25:35 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0248FC17; Mon, 5 Jan 2009 23:25:35 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05NPZFX015110; Mon, 5 Jan 2009 23:25:35 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05NPZ3x015109; Mon, 5 Jan 2009 23:25:35 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901052325.n05NPZ3x015109@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 5 Jan 2009 23:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186799 - head/lib/libstand X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 23:25:35 -0000 Author: luigi Date: Mon Jan 5 23:25:35 2009 New Revision: 186799 URL: http://svn.freebsd.org/changeset/base/186799 Log: put a prefix on dhcp options to avoid clobbering, even by mistake, existing environment variables. MFC after: 2 weeks Modified: head/lib/libstand/bootp.c Modified: head/lib/libstand/bootp.c ============================================================================== --- head/lib/libstand/bootp.c Mon Jan 5 22:09:46 2009 (r186798) +++ head/lib/libstand/bootp.c Mon Jan 5 23:25:35 2009 (r186799) @@ -496,7 +496,7 @@ static struct dhcp_opt vndr_opt[] = { /* {94, __BYTES, "network-interface"}, {97, __BYTES, "machine-identifier"}, #else /* default (empty) table */ - {0, 0, ""}, /* prefix */ + {0, 0, "dhcp.vendor."}, /* prefix */ #endif {0, __TXT, "%soption-%d"} }; From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 00:44:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 720B51065673; Tue, 6 Jan 2009 00:44:47 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2F0E78FC2A; Tue, 6 Jan 2009 00:44:47 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n060hZXZ020093; Mon, 5 Jan 2009 17:43:35 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 05 Jan 2009 17:43:51 -0700 (MST) Message-Id: <20090105.174351.1172770788.imp@bsdimp.com> To: ed@80386.nl From: "M. Warner Losh" In-Reply-To: <20090105172243.GO14235@hoeg.nl> References: <20090104121331.GC14235@hoeg.nl> <20090105171523.GC50568@dragon.NUXI.org> <20090105172243.GO14235@hoeg.nl> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, obrien@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 00:44:48 -0000 In message: <20090105172243.GO14235@hoeg.nl> Ed Schouten writes: : Hello David, : : * David O'Brien wrote: : > Why xterm and not vt100? : : The reason I'm proposing xterm, is because it is the best supported : terminal type out there. Example: if we would use TERM=vt100, we would : only get black & white. If we use TERM=vt100-color, we do get the : colors, but unfortunately we won't be compatible with other operating : systems. Solaris, for example, has no termtype called vt100-color. This : means the user has to change TERM by hand. : : TERM=xterm has proven to be very portable across different operating : systems and there are a lot of other pieces of software that try to : mimic it. At least the Terminal application in OS X, GNOME's : gnome-terminal, maybe KDE's Konsole as well. : : I hope that answers your question? Also, xterm is a superset of vt100. Most vt100-only programs will just work inside an xterm. Warner From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 01:36:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99A4D106564A; Tue, 6 Jan 2009 01:36:37 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86D3B8FC0C; Tue, 6 Jan 2009 01:36:37 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n061absH017944; Tue, 6 Jan 2009 01:36:37 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n061ab37017941; Tue, 6 Jan 2009 01:36:37 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901060136.n061ab37017941@svn.freebsd.org> From: Sam Leffler Date: Tue, 6 Jan 2009 01:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186804 - in head/sys/dev/ath/ath_rate: amrr onoe sample X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 01:36:38 -0000 Author: sam Date: Tue Jan 6 01:36:36 2009 New Revision: 186804 URL: http://svn.freebsd.org/changeset/base/186804 Log: remove module glue, it's not used any more Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c head/sys/dev/ath/ath_rate/onoe/onoe.c head/sys/dev/ath/ath_rate/sample/sample.c Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c ============================================================================== --- head/sys/dev/ath/ath_rate/amrr/amrr.c Tue Jan 6 00:30:24 2009 (r186803) +++ head/sys/dev/ath/ath_rate/amrr/amrr.c Tue Jan 6 01:36:36 2009 (r186804) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -434,29 +433,3 @@ ath_rate_detach(struct ath_ratectrl *arc free(asc, M_DEVBUF); } - -/* - * Module glue. - */ -static int -amrr_modevent(module_t mod, int type, void *unused) -{ - switch (type) { - case MOD_LOAD: - if (bootverbose) - printf("ath_rate: version 0.1\n"); - return 0; - case MOD_UNLOAD: - return 0; - } - return EINVAL; -} - -static moduledata_t amrr_mod = { - "ath_rate", - amrr_modevent, - 0 -}; -DECLARE_MODULE(ath_rate, amrr_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); -MODULE_VERSION(ath_rate, 1); -MODULE_DEPEND(ath_rate, wlan, 1, 1, 1); Modified: head/sys/dev/ath/ath_rate/onoe/onoe.c ============================================================================== --- head/sys/dev/ath/ath_rate/onoe/onoe.c Tue Jan 6 00:30:24 2009 (r186803) +++ head/sys/dev/ath/ath_rate/onoe/onoe.c Tue Jan 6 01:36:36 2009 (r186804) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -403,29 +402,3 @@ ath_rate_detach(struct ath_ratectrl *arc free(osc, M_DEVBUF); } - -/* - * Module glue. - */ -static int -onoe_modevent(module_t mod, int type, void *unused) -{ - switch (type) { - case MOD_LOAD: - if (bootverbose) - printf("ath_rate: \n"); - return 0; - case MOD_UNLOAD: - return 0; - } - return EINVAL; -} - -static moduledata_t onoe_mod = { - "ath_rate", - onoe_modevent, - 0 -}; -DECLARE_MODULE(ath_rate, onoe_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); -MODULE_VERSION(ath_rate, 1); -MODULE_DEPEND(ath_rate, wlan, 1, 1, 1); Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Tue Jan 6 00:30:24 2009 (r186803) +++ head/sys/dev/ath/ath_rate/sample/sample.c Tue Jan 6 01:36:36 2009 (r186804) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -993,29 +992,3 @@ ath_rate_detach(struct ath_ratectrl *arc free(ssc, M_DEVBUF); } - -/* - * Module glue. - */ -static int -sample_modevent(module_t mod, int type, void *unused) -{ - switch (type) { - case MOD_LOAD: - if (bootverbose) - printf("ath_rate: version 1.9 \n"); - return 0; - case MOD_UNLOAD: - return 0; - } - return EINVAL; -} - -static moduledata_t sample_mod = { - "ath_rate", - sample_modevent, - 0 -}; -DECLARE_MODULE(ath_rate, sample_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); -MODULE_VERSION(ath_rate, 1); -MODULE_DEPEND(ath_rate, wlan, 1, 1, 1); From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 01:54:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0E77106566B; Tue, 6 Jan 2009 01:54:57 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDF788FC0C; Tue, 6 Jan 2009 01:54:57 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n061svxj018268; Tue, 6 Jan 2009 01:54:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n061svIc018267; Tue, 6 Jan 2009 01:54:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200901060154.n061svIc018267@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 6 Jan 2009 01:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186805 - head/sys/powerpc/powermac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 01:54:58 -0000 Author: nwhitehorn Date: Tue Jan 6 01:54:57 2009 New Revision: 186805 URL: http://svn.freebsd.org/changeset/base/186805 Log: Add a new quirk type so that the MacIO driver will assign memory resources belonging to a devices children, in analogy to the way we handle interrupts for SCC serial devices. This is required to counteract overly deep nesting on onboard audio devices. Submitted by: Marco Trillo Modified: head/sys/powerpc/powermac/macio.c Modified: head/sys/powerpc/powermac/macio.c ============================================================================== --- head/sys/powerpc/powermac/macio.c Tue Jan 6 01:36:36 2009 (r186804) +++ head/sys/powerpc/powermac/macio.c Tue Jan 6 01:54:57 2009 (r186805) @@ -152,6 +152,7 @@ static struct macio_pci_dev { */ #define MACIO_QUIRK_IGNORE 0x00000001 #define MACIO_QUIRK_CHILD_HAS_INTR 0x00000002 +#define MACIO_QUIRK_USE_CHILD_REG 0x00000004 struct macio_quirk_entry { const char *mq_name; @@ -162,7 +163,9 @@ static struct macio_quirk_entry macio_qu { "escc-legacy", MACIO_QUIRK_IGNORE }, { "timer", MACIO_QUIRK_IGNORE }, { "escc", MACIO_QUIRK_CHILD_HAS_INTR }, - { NULL, 0 } + { "i2s", MACIO_QUIRK_CHILD_HAS_INTR | + MACIO_QUIRK_USE_CHILD_REG }, + { NULL, 0 } }; static int @@ -318,7 +321,10 @@ macio_attach(device_t dev) resource_list_init(&dinfo->mdi_resources); dinfo->mdi_ninterrupts = 0; macio_add_intr(child, dinfo); - macio_add_reg(child, dinfo); + if ((quirks & MACIO_QUIRK_USE_CHILD_REG) != 0) + macio_add_reg(OF_child(child), dinfo); + else + macio_add_reg(child, dinfo); if ((quirks & MACIO_QUIRK_CHILD_HAS_INTR) != 0) for (subchild = OF_child(child); subchild != 0; subchild = OF_peer(subchild)) From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 01:58:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1447C106566C; Tue, 6 Jan 2009 01:58:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02ECA8FC13; Tue, 6 Jan 2009 01:58:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n061wja6018384; Tue, 6 Jan 2009 01:58:45 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n061wjuY018383; Tue, 6 Jan 2009 01:58:45 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901060158.n061wjuY018383@svn.freebsd.org> From: Sam Leffler Date: Tue, 6 Jan 2009 01:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186806 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 01:58:46 -0000 Author: sam Date: Tue Jan 6 01:58:45 2009 New Revision: 186806 URL: http://svn.freebsd.org/changeset/base/186806 Log: remove the ath_rate module dependency; it's all bundled Modified: head/sys/dev/ath/if_ath_pci.c Modified: head/sys/dev/ath/if_ath_pci.c ============================================================================== --- head/sys/dev/ath/if_ath_pci.c Tue Jan 6 01:54:57 2009 (r186805) +++ head/sys/dev/ath/if_ath_pci.c Tue Jan 6 01:58:45 2009 (r186806) @@ -254,4 +254,3 @@ DRIVER_MODULE(if_ath, pci, ath_pci_drive DRIVER_MODULE(if_ath, cardbus, ath_pci_driver, ath_devclass, 0, 0); MODULE_VERSION(if_ath, 1); MODULE_DEPEND(if_ath, wlan, 1, 1, 1); /* 802.11 media layer */ -MODULE_DEPEND(if_ath, ath_rate, 1, 1, 1); /* rate control algorithm */ From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 06:47:54 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23770106564A; Tue, 6 Jan 2009 06:47:54 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12A8E8FC0C; Tue, 6 Jan 2009 06:47:54 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n066lrgC023851; Tue, 6 Jan 2009 06:47:53 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n066lrYg023850; Tue, 6 Jan 2009 06:47:53 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200901060647.n066lrYg023850@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 6 Jan 2009 06:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186807 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 06:47:54 -0000 Author: marcel Date: Tue Jan 6 06:47:53 2009 New Revision: 186807 URL: http://svn.freebsd.org/changeset/base/186807 Log: Don't enforce an upper-bound to the number of sectors or heads that that the provider has. The limits we imposed were PC BIOS specific and not always applicable. Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Tue Jan 6 01:58:45 2009 (r186806) +++ head/sys/geom/part/g_part.c Tue Jan 6 06:47:53 2009 (r186807) @@ -182,10 +182,8 @@ g_part_geometry(struct g_part_table *tab u_int heads, sectors; int idx; - if (g_getattr("GEOM::fwsectors", cp, §ors) != 0 || - sectors < 1 || sectors > 63 || - g_getattr("GEOM::fwheads", cp, &heads) != 0 || - heads < 1 || heads > 255) { + if (g_getattr("GEOM::fwsectors", cp, §ors) != 0 || sectors == 0 || + g_getattr("GEOM::fwheads", cp, &heads) != 0 || heads == 0) { table->gpt_fixgeom = 0; table->gpt_heads = 0; table->gpt_sectors = 0; From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 09:03:02 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A46F71065686; Tue, 6 Jan 2009 09:03:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 936828FC32; Tue, 6 Jan 2009 09:03:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06932bH026407; Tue, 6 Jan 2009 09:03:02 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06932hZ026405; Tue, 6 Jan 2009 09:03:02 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200901060903.n06932hZ026405@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 6 Jan 2009 09:03:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186808 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 09:03:03 -0000 Author: trasz Date: Tue Jan 6 09:03:02 2009 New Revision: 186808 URL: http://svn.freebsd.org/changeset/base/186808 Log: Add workaround for Parallels 4.0. Without it, ehci and uhci drivers would fail to attach due to unsupported USB revision. It should have no effect when running on a real hardware. Reviewed by: imp Approved by: rwatson (mentor) Modified: head/sys/dev/usb/ehci_pci.c head/sys/dev/usb/uhci_pci.c Modified: head/sys/dev/usb/ehci_pci.c ============================================================================== --- head/sys/dev/usb/ehci_pci.c Tue Jan 6 06:47:53 2009 (r186807) +++ head/sys/dev/usb/ehci_pci.c Tue Jan 6 09:03:02 2009 (r186808) @@ -315,6 +315,14 @@ ehci_pci_attach(device_t self) device_printf(self, "Quirk for CS5536 USB 2.0 enabled\n"); break; } + + /* + * Quirk for Parallels Desktop 4.0. + */ + if (pci_get_devid(self) == PCI_EHCI_DEVICEID_ICH6) { + sc->sc_bus.usbrev = USBREV_2_0; + break; + } sc->sc_bus.usbrev = USBREV_UNKNOWN; return ENXIO; case PCI_USBREV_2_0: Modified: head/sys/dev/usb/uhci_pci.c ============================================================================== --- head/sys/dev/usb/uhci_pci.c Tue Jan 6 06:47:53 2009 (r186807) +++ head/sys/dev/usb/uhci_pci.c Tue Jan 6 09:03:02 2009 (r186808) @@ -389,6 +389,12 @@ uhci_pci_attach(device_t self) break; } + /* + * Quirk for Parallels Desktop 4.0. + */ + if (pci_get_devid(self) == PCI_UHCI_DEVICEID_ICH6_A) + sc->sc_bus.usbrev = USBREV_2_0; + err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO, NULL, (driver_intr_t *) uhci_intr, sc, &sc->ih); if (err) { From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 09:34:32 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2EDD106566B; Tue, 6 Jan 2009 09:34:32 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.tele2.se [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id D4D2E8FC13; Tue, 6 Jan 2009 09:34:31 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=oi64sMs8YxQA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=6I5d2MoRAAAA:8 a=z3945OJnm37Y0V4CdtMA:9 a=fWFc_S1jSKY4U62sQtZ75JA31tEA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 433302276; Tue, 06 Jan 2009 09:34:27 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 09:36:49 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901052211.50514.hselasky@c2i.net> <20090106015012.548aaa9d.stas@FreeBSD.org> In-Reply-To: <20090106015012.548aaa9d.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901060936.50984.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 09:34:33 -0000 On Monday 05 January 2009, Stanislav Sedov wrote: > On Mon, 5 Jan 2009 22:11:49 +0100 > > Hans Petter Selasky mentioned: > > Try this patch and let me know the result! I see exactly why things are > > not working! > > > > http://perforce.freebsd.org/chv.cgi?CH=154181 > > > > > > It's not a USB problem! > > These patches help. Now everything works. > Thanks! Hi, I'm trying to push these patches into -current. Can you tell us what CPU architecture you are using? And how much RAM? --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 09:40:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7546410656F2 for ; Tue, 6 Jan 2009 09:40:46 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 230218FC08 for ; Tue, 6 Jan 2009 09:40:46 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 174C88FC53 for ; Tue, 6 Jan 2009 12:40:44 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 71A7F8FC18; Tue, 6 Jan 2009 12:40:41 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 24E1D3996C; Tue, 6 Jan 2009 12:43:08 +0300 (MSK) Date: Tue, 6 Jan 2009 12:43:03 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106124303.d8bab0de.stas@FreeBSD.org> In-Reply-To: <200901060936.50984.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901052211.50514.hselasky@c2i.net> <20090106015012.548aaa9d.stas@FreeBSD.org> <200901060936.50984.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 12:40:44 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963271c967002116118448 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 09:40:46 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 09:36:49 +0100 Hans Petter Selasky mentioned: > Hi, > > I'm trying to push these patches into -current. Can you tell us what CPU > architecture you are using? And how much RAM? > That will be nice to have these fixes in tree. I'm using Core2Quad Q9400 w/ 4Gb RAM running amd64. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljJ6wACgkQK/VZk+smlYHntQCfVb6i+INc1nLX1jskUCyu95kc VnYAn3k5j3M+abZZNVkLB8aOR5CE/1FX =aG86 -----END PGP SIGNATURE----- !DSPAM:4963271c967002116118448! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 10:32:49 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70479106566B for ; Tue, 6 Jan 2009 10:32:49 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 1C3EA8FC12 for ; Tue, 6 Jan 2009 10:32:49 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 266D28FC53 for ; Tue, 6 Jan 2009 13:32:48 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 84A748FC18; Tue, 6 Jan 2009 13:32:44 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 21A223996C; Tue, 6 Jan 2009 13:35:11 +0300 (MSK) Date: Tue, 6 Jan 2009 13:35:07 +0300 From: Stanislav Sedov To: Stanislav Sedov Message-Id: <20090106133507.1e2bc2d2.stas@FreeBSD.org> In-Reply-To: <20090106124303.d8bab0de.stas@FreeBSD.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901052211.50514.hselasky@c2i.net> <20090106015012.548aaa9d.stas@FreeBSD.org> <200901060936.50984.hselasky@c2i.net> <20090106124303.d8bab0de.stas@FreeBSD.org> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 13:32:47 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963334f967001277812411 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , Hans Petter Selasky , Stanislav Sedov , svn-src-head@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 10:32:49 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 12:43:03 +0300 Stanislav Sedov mentioned: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tue, 6 Jan 2009 09:36:49 +0100 > Hans Petter Selasky mentioned: > > > Hi, > > > > I'm trying to push these patches into -current. Can you tell us what CPU > > architecture you are using? And how much RAM? > > > > That will be nice to have these fixes in tree. > I'm using Core2Quad Q9400 w/ 4Gb RAM running amd64. > BTW, I'm still experiencing problems with some kinds of devices. E.g. Anydata E100X modem (ubsa) fails to select configuration and attach both on amd64 and arm with following messages in the log. usb2_alloc_device:1423: set address 2 failed (ignored) usb2_alloc_device:1458: getting device descriptor at addr 2 failed! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! ugen0.2: at usbus0 Do you by a chance know what is going on? Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljM98ACgkQK/VZk+smlYHV2QCdE2EM+yyrL+nRmefZL2vxuZxs vy0AoIKxAngfT+cBQzgpiIMYE9cZJ6rc =wZYj -----END PGP SIGNATURE----- !DSPAM:4963334f967001277812411! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 11:02:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 553DD106566C; Tue, 6 Jan 2009 11:02:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 443268FC16; Tue, 6 Jan 2009 11:02:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06B2HRA028841; Tue, 6 Jan 2009 11:02:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06B2HST028840; Tue, 6 Jan 2009 11:02:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901061102.n06B2HST028840@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 6 Jan 2009 11:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186809 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 11:02:17 -0000 Author: bz Date: Tue Jan 6 11:02:17 2009 New Revision: 186809 URL: http://svn.freebsd.org/changeset/base/186809 Log: Further cleanup protosw.h: - Remove unused typedefs to avoid confusion and ease in merging ip6protosw with protosw. - Correct a few comments. - Remove most of a comment about usrreq. [1] - Use tabs instead of spaces for consistency. Submitted by: rwatson [1] Reviewed by: rwatson MFC after: 3 weeks Modified: head/sys/sys/protosw.h Modified: head/sys/sys/protosw.h ============================================================================== --- head/sys/sys/protosw.h Tue Jan 6 09:03:02 2009 (r186808) +++ head/sys/sys/protosw.h Tue Jan 6 11:02:17 2009 (r186809) @@ -66,9 +66,7 @@ struct sockopt; /* USE THESE FOR YOUR PROTOTYPES ! */ typedef void pr_input_t (struct mbuf *, int); typedef int pr_input6_t (struct mbuf **, int*, int); /* XXX FIX THIS */ -typedef void pr_in_input_t (struct mbuf *, int, int); /* XXX FIX THIS */ typedef int pr_output_t (struct mbuf *, struct socket *); -typedef int pr_in_output_t (struct mbuf *, struct socket *, struct sockaddr *); typedef void pr_ctlinput_t (int, struct sockaddr *, void *); typedef int pr_ctloutput_t (struct socket *, struct sockopt *); typedef void pr_init_t (void); @@ -76,9 +74,6 @@ typedef void pr_fasttimo_t (void); typedef void pr_slowtimo_t (void); typedef void pr_drain_t (void); -typedef int pr_usrreq_t(struct socket *, int, struct mbuf *, - struct mbuf *, struct mbuf *, struct thread *); - struct protosw { short pr_type; /* socket type used for */ struct domain *pr_domain; /* domain protocol a member of */ @@ -95,7 +90,7 @@ struct protosw { pr_slowtimo_t *pr_slowtimo; /* slow timeout (500ms) */ pr_drain_t *pr_drain; /* flush any excess space possible */ - struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */ + struct pr_usrreqs *pr_usrreqs; /* user-protocol hook */ }; /*#endif*/ @@ -131,17 +126,6 @@ struct protosw { * We now provide individual function pointers which protocols can implement, * which offers a number of benefits (such as type checking for arguments). * These older constants are still present in order to support TCP debugging. - * - * The arguments to usrreq were: - * (*protosw[].pr_usrreq)(up, req, m, nam, opt); - * where up is a (struct socket *), req is one of these requests, - * m is an optional mbuf chain containing a message, - * nam is an optional mbuf chain containing an address, - * and opt is a pointer to a socketopt structure or nil. - * The protocol is responsible for disposal of the mbuf chain m, - * the caller is responsible for any space held by nam and opt. - * A non-zero return from usrreq gives an - * UNIX error number which should be passed to higher level software. */ #define PRU_ATTACH 0 /* attach protocol to up */ #define PRU_DETACH 1 /* detach protocol from up */ @@ -170,8 +154,8 @@ struct protosw { #define PRU_SEND_EOF 22 /* send and close */ #define PRU_SOSETLABEL 23 /* MAC label change */ #define PRU_CLOSE 24 /* socket close */ -#define PRU_FLUSH 25 /* flush the socket */ -#define PRU_NREQ 25 +#define PRU_FLUSH 25 /* flush the socket */ +#define PRU_NREQ 25 #ifdef PRUREQUESTS const char *prurequests[] = { @@ -181,7 +165,7 @@ const char *prurequests[] = { "SENSE", "RCVOOB", "SENDOOB", "SOCKADDR", "PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO", "PROTORCV", "PROTOSEND", "SEND_EOF", "SOSETLABEL", - "CLOSE", "FLUSH", + "CLOSE", "FLUSH", }; #endif @@ -327,7 +311,7 @@ char *prcrequests[] = { * The protocol is responsible for disposal of the mbuf chain *optval * if supplied, * the caller is responsible for any space held by *optval, when returned. - * A non-zero return from usrreq gives an + * A non-zero return from ctloutput gives an * UNIX error number which should be passed to higher level software. */ #define PRCO_GETOPT 0 From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 11:11:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EC091065672; Tue, 6 Jan 2009 11:11:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DCA88FC1B; Tue, 6 Jan 2009 11:11:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06BBwW7029072; Tue, 6 Jan 2009 11:11:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06BBwA0029070; Tue, 6 Jan 2009 11:11:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901061111.n06BBwA0029070@svn.freebsd.org> From: Alexander Motin Date: Tue, 6 Jan 2009 11:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186810 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 11:11:58 -0000 Author: mav Date: Tue Jan 6 11:11:58 2009 New Revision: 186810 URL: http://svn.freebsd.org/changeset/base/186810 Log: Cross-reference snd_ich and snd_hda man pages. Some hardware require different drivers depending on implementation, that may confuse users. Modified: head/share/man/man4/snd_hda.4 head/share/man/man4/snd_ich.4 Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Tue Jan 6 11:02:17 2009 (r186809) +++ head/share/man/man4/snd_hda.4 Tue Jan 6 11:11:58 2009 (r186810) @@ -578,6 +578,7 @@ VIA VT1709 .El .Sh SEE ALSO .Xr sound 4 , +.Xr snd_ich 4 , .Xr device.hints 5 , .Xr loader.conf 5 , .Xr sysctl 8 Modified: head/share/man/man4/snd_ich.4 ============================================================================== --- head/share/man/man4/snd_ich.4 Tue Jan 6 11:02:17 2009 (r186809) +++ head/share/man/man4/snd_ich.4 Tue Jan 6 11:11:58 2009 (r186810) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2005 +.Dd January 6, 2009 .Dt SND_ICH 4 .Os .Sh NAME .Nm snd_ich -.Nd "Intel ICH PCI and compatible bridge device driver" +.Nd "Intel ICH AC'97 and compatible bridge device driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -49,7 +49,12 @@ The .Nm bridge driver allows the generic audio driver .Xr sound 4 -to attach to Intel ICH and compatible audio devices. +to attach to Intel ICH AC'97 and compatible audio devices. +.Pp +Some later chips, like ICH6/ICH7, depending on wiring can instead implement +newer Intel HD Audio specification, which is supported by +.Xr snd_hda 4 +driver. .Sh HARDWARE The .Nm @@ -94,7 +99,8 @@ NVIDIA nForce4 SiS 7012 .El .Sh SEE ALSO -.Xr sound 4 +.Xr sound 4 , +.Xr snd_hda 4 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 11:13:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9F5B1065674; Tue, 6 Jan 2009 11:13:56 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 8CF028FC1E; Tue, 6 Jan 2009 11:13:55 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Ay6owWMc1CgA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=Zo1utoyLX5JlXuvC6oQA:9 a=FcHCRB79suTTbTiChUVNcnwtclgA:4 a=SV7veod9ZcQA:10 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1175326276; Tue, 06 Jan 2009 12:13:53 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 12:15:37 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106124303.d8bab0de.stas@FreeBSD.org> <20090106133507.1e2bc2d2.stas@FreeBSD.org> In-Reply-To: <20090106133507.1e2bc2d2.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061215.37947.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 11:13:57 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 12:43:03 +0300 > > Stanislav Sedov mentioned: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > On Tue, 6 Jan 2009 09:36:49 +0100 > > > > Hans Petter Selasky mentioned: > > > Hi, > > > > > > I'm trying to push these patches into -current. Can you tell us what > > > CPU architecture you are using? And how much RAM? > > > > That will be nice to have these fixes in tree. > > I'm using Core2Quad Q9400 w/ 4Gb RAM running amd64. > > BTW, I'm still experiencing problems with some kinds of devices. > E.g. Anydata E100X modem (ubsa) fails to select configuration and > attach both on amd64 and arm with following messages in the log. > > usb2_alloc_device:1423: set address 2 failed (ignored) > usb2_alloc_device:1458: getting device descriptor at addr 2 failed! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > ugen0.2: at usbus0 > > Do you by a chance know what is going on? Hi, As long as your device shows up like "ugen0.2" it is detected properly and will function. Check with "usbconfig". Suggestions: usbconfig -u 0 -a 2 reset usbconfig -u 0 -a 2 dump_device_desc The failures indicate that the firmware on your USB device is not reponding correctly at the time the set address command is being sent to the device. As you can see the new USB stack will try to re-enumerate the device one time. Have you loaded the correct driver for your serial device? kldload usb2_serial_bsa or kldload usb2_serial_u3g or kldload usb2_serial_gensa --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 12:13:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BCC3106564A; Tue, 6 Jan 2009 12:13:41 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39A468FC16; Tue, 6 Jan 2009 12:13:41 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06CDfNO030336; Tue, 6 Jan 2009 12:13:41 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06CDfuv030333; Tue, 6 Jan 2009 12:13:41 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200901061213.n06CDfuv030333@svn.freebsd.org> From: Randall Stewart Date: Tue, 6 Jan 2009 12:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186813 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:13:42 -0000 Author: rrs Date: Tue Jan 6 12:13:40 2009 New Revision: 186813 URL: http://svn.freebsd.org/changeset/base/186813 Log: Add the ability of an alternate transport protocol to easily tunnel over udp by providing a hook function that will be called instead of appending to the socket buffer. Modified: head/sys/netinet/udp_usrreq.c head/sys/netinet/udp_var.h head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue Jan 6 12:12:39 2009 (r186812) +++ head/sys/netinet/udp_usrreq.c Tue Jan 6 12:13:40 2009 (r186813) @@ -488,10 +488,33 @@ udp_input(struct mbuf *m, int off) struct mbuf *n; n = m_copy(m, 0, M_COPYALL); - if (n != NULL) - udp_append(last, ip, n, iphlen + - sizeof(struct udphdr), &udp_in); - INP_RUNLOCK(last); + if (last->inp_ppcb == NULL) { + if (n != NULL) + udp_append(last, + ip, n, + iphlen + + sizeof(struct udphdr), + &udp_in); + INP_RUNLOCK(last); + } else { + /* + * Engage the tunneling protocol we + * will have to leave the info_lock + * up, since we are hunting through + * multiple UDP inp's hope we don't + * break. + * + * XXXML: Maybe add a flag to the + * prototype so that the tunneling + * can defer work that can't be done + * under the info lock? + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)last->inp_ppcb; + tunnel_func(n, iphlen, last); + INP_RUNLOCK(last); + } } last = inp; /* @@ -516,10 +539,24 @@ udp_input(struct mbuf *m, int off) V_udpstat.udps_noportbcast++; goto badheadlocked; } - udp_append(last, ip, m, iphlen + sizeof(struct udphdr), - &udp_in); - INP_RUNLOCK(last); - INP_INFO_RUNLOCK(&V_udbinfo); + if (last->inp_ppcb == NULL) { + udp_append(last, ip, m, iphlen + sizeof(struct udphdr), + &udp_in); + INP_RUNLOCK(last); + INP_INFO_RUNLOCK(&V_udbinfo); + } else { + /* + * Engage the tunneling protocol we must make sure + * all locks are released when we call the tunneling + * protocol. + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)last->inp_ppcb; + tunnel_func(m, iphlen, last); + INP_RUNLOCK(last); + INP_INFO_RUNLOCK(&V_udbinfo); + } return; } @@ -563,6 +600,18 @@ udp_input(struct mbuf *m, int off) INP_RUNLOCK(inp); goto badunlocked; } + if (inp->inp_ppcb != NULL) { + /* + * Engage the tunneling protocol we must make sure all locks + * are released when we call the tunneling protocol. + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)inp->inp_ppcb; + tunnel_func(m, iphlen, inp); + INP_RUNLOCK(inp); + return; + } udp_append(inp, ip, m, iphlen + sizeof(struct udphdr), &udp_in); INP_RUNLOCK(inp); return; @@ -1138,6 +1187,34 @@ udp_attach(struct socket *so, int proto, INP_INFO_WUNLOCK(&V_udbinfo); inp->inp_vflag |= INP_IPV4; inp->inp_ip_ttl = V_ip_defttl; + /* + * UDP does not have a per-protocol pcb (inp->inp_ppcb). + * We use this pointer for kernel tunneling pointer. + * If we ever need to have a protocol block we will + * need to move this function pointer there. Null + * in this pointer means "do the normal thing". + */ + inp->inp_ppcb = NULL; + INP_WUNLOCK(inp); + return (0); +} + +int +udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f) +{ + struct inpcb *inp; + + inp = (struct inpcb *)so->so_pcb; + if (so->so_type != SOCK_DGRAM) { + /* Not UDP socket... sorry! */ + return (ENOTSUP); + } + if (inp == NULL) { + /* NULL INP? */ + return (EINVAL); + } + INP_WLOCK(inp); + inp->inp_ppcb = f; INP_WUNLOCK(inp); return (0); } Modified: head/sys/netinet/udp_var.h ============================================================================== --- head/sys/netinet/udp_var.h Tue Jan 6 12:12:39 2009 (r186812) +++ head/sys/netinet/udp_var.h Tue Jan 6 12:13:40 2009 (r186813) @@ -110,6 +110,10 @@ void udp_init(void); void udp_input(struct mbuf *, int); struct inpcb *udp_notify(struct inpcb *inp, int errno); int udp_shutdown(struct socket *so); + + +typedef void(*udp_tun_func_t)(struct mbuf *, int off, struct inpcb *); +int udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f); #endif #endif Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Tue Jan 6 12:12:39 2009 (r186812) +++ head/sys/netinet6/udp6_usrreq.c Tue Jan 6 12:13:40 2009 (r186813) @@ -287,8 +287,25 @@ udp6_input(struct mbuf **mp, int *offp, if ((n = m_copy(m, 0, M_COPYALL)) != NULL) { INP_RLOCK(last); - udp6_append(last, n, off, &fromsa); - INP_RUNLOCK(last); + if (last->inp_ppcb != NULL) { + /* + * Engage the tunneling + * protocol we will have to + * leave the info_lock up, + * since we are hunting + * through multiple UDP + * inp's hope we don't break. + * + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)last->inp_ppcb; + tunnel_func(n, off, last); + INP_RUNLOCK(last); + } else { + udp6_append(last, n, off, &fromsa); + INP_RUNLOCK(last); + } } } last = inp; @@ -317,6 +334,19 @@ udp6_input(struct mbuf **mp, int *offp, } INP_RLOCK(last); INP_INFO_RUNLOCK(&V_udbinfo); + if (last->inp_ppcb != NULL) { + /* + * Engage the tunneling protocol we must make sure + * all locks are released when we call the tunneling + * protocol. + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)inp->inp_ppcb; + tunnel_func(m, off, last); + INP_RUNLOCK(last); + return (IPPROTO_DONE); + } udp6_append(last, m, off, &fromsa); INP_RUNLOCK(last); return (IPPROTO_DONE); @@ -354,6 +384,18 @@ udp6_input(struct mbuf **mp, int *offp, } INP_RLOCK(inp); INP_INFO_RUNLOCK(&V_udbinfo); + if (inp->inp_ppcb != NULL) { + /* + * Engage the tunneling protocol we must make sure all locks + * are released when we call the tunneling protocol. + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)inp->inp_ppcb; + tunnel_func(m, off, inp); + INP_RUNLOCK(inp); + return (IPPROTO_DONE); + } udp6_append(inp, m, off, &fromsa); INP_RUNLOCK(inp); return (IPPROTO_DONE); From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 12:23:19 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68128106564A; Tue, 6 Jan 2009 12:23:19 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5730D8FC16; Tue, 6 Jan 2009 12:23:19 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06CNJh8030646; Tue, 6 Jan 2009 12:23:19 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06CNJTw030645; Tue, 6 Jan 2009 12:23:19 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200901061223.n06CNJTw030645@svn.freebsd.org> From: Randall Stewart Date: Tue, 6 Jan 2009 12:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186815 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:23:20 -0000 Author: rrs Date: Tue Jan 6 12:23:19 2009 New Revision: 186815 URL: http://svn.freebsd.org/changeset/base/186815 Log: Adds flags for SCTP checksum offload. Prep for support for new Intel NIC's that have this feature. Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Tue Jan 6 12:17:43 2009 (r186814) +++ head/sys/sys/mbuf.h Tue Jan 6 12:23:19 2009 (r186815) @@ -241,11 +241,13 @@ struct mbuf { #define CSUM_IP_FRAGS 0x0008 /* will csum IP fragments */ #define CSUM_FRAGMENT 0x0010 /* will do IP fragmentation */ #define CSUM_TSO 0x0020 /* will do TSO */ +#define CSUM_SCTP 0x0040 /* will csum SCTP */ #define CSUM_IP_CHECKED 0x0100 /* did csum IP */ #define CSUM_IP_VALID 0x0200 /* ... the csum is valid */ #define CSUM_DATA_VALID 0x0400 /* csum_data field is valid */ #define CSUM_PSEUDO_HDR 0x0800 /* csum_data has pseudo hdr */ +#define CSUM_SCTP_VALID 0x1000 /* SCTP checksum is valid */ #define CSUM_DELAY_DATA (CSUM_TCP | CSUM_UDP) #define CSUM_DELAY_IP (CSUM_IP) /* XXX add ipv6 here too? */ From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 12:43:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C507106566B; Tue, 6 Jan 2009 12:43:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3B1638FC14; Tue, 6 Jan 2009 12:43:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id D508A46B3C; Tue, 6 Jan 2009 07:43:41 -0500 (EST) Date: Tue, 6 Jan 2009 12:43:41 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Randall Stewart In-Reply-To: <200901061213.n06CDfuv030333@svn.freebsd.org> Message-ID: References: <200901061213.n06CDfuv030333@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186813 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:43:42 -0000 On Tue, 6 Jan 2009, Randall Stewart wrote: > + /* > + * Engage the tunneling protocol we > + * will have to leave the info_lock > + * up, since we are hunting through > + * multiple UDP inp's hope we don't > + * break. > + * > + * XXXML: Maybe add a flag to the > + * prototype so that the tunneling > + * can defer work that can't be done > + * under the info lock? > + */ > + udp_tun_func_t tunnel_func; > + > + tunnel_func = (udp_tun_func_t)last->inp_ppcb; > + tunnel_func(n, iphlen, last); > + INP_RUNLOCK(last); There's a basic working assumption throughout most protocol input paths that the inpcb (and hence things it points to) will remain valid only if appropriate locks are held, so I think we won't ever be in a position where we can safely call tunnel_func() without at least the inpcb, and possibly the pcbinfo, lock. As such, I think we can lose the comments about locking here and elsewhere. > - udp_append(last, ip, m, iphlen + sizeof(struct udphdr), > - &udp_in); > - INP_RUNLOCK(last); > - INP_INFO_RUNLOCK(&V_udbinfo); > + if (last->inp_ppcb == NULL) { > + udp_append(last, ip, m, iphlen + sizeof(struct udphdr), > + &udp_in); > + INP_RUNLOCK(last); > + INP_INFO_RUNLOCK(&V_udbinfo); > + } else { > + /* > + * Engage the tunneling protocol we must make sure > + * all locks are released when we call the tunneling > + * protocol. This comment appears to be stale -- the locks are held, and must be. > + /* > + * Engage the tunneling protocol we must make sure all locks > + * are released when we call the tunneling protocol. > + */ > + udp_tun_func_t tunnel_func; Ditto here -- locks are held, and must be. > +int > +udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f) > +{ > + struct inpcb *inp; > + Hmm. Perhaps the sanity tests here should be KASSERT's: KASSERT(so->so_type == SOCK_DGRAM, ("udp_set_kernel_tunneling: !dgram")); KASSERT(so->so_ppcb != NULL, ("udp_set_kernel_tunneling: NULL inp")); Otherwise these if's are really just error handling for violated invariants. > + INP_WLOCK(inp); > + inp->inp_ppcb = f; > INP_WUNLOCK(inp); However, I could see having some error-handling here, perhaps something like: INP_WLOCK(inp); if (inp->inp_ppcb != NULL) { INP_WUNLOCK(inp); return (EBUSY); } inp->inp_ppcb = f; INP_WUNLOCK(inp); > - udp6_append(last, n, off, &fromsa); > - INP_RUNLOCK(last); > + if (last->inp_ppcb != NULL) { > + /* > + * Engage the tunneling > + * protocol we will have to > + * leave the info_lock up, > + * since we are hunting > + * through multiple UDP > + * inp's hope we don't break. I think we can omit the comment here -- the locks are necessary and unavoidable, so any functions called here need to deal with it by definition. > + if (last->inp_ppcb != NULL) { > + /* > + * Engage the tunneling protocol we must make sure > + * all locks are released when we call the tunneling > + * protocol. Ditto as above -- stale, and probably unnecessary. > @@ -354,6 +384,18 @@ udp6_input(struct mbuf **mp, int *offp, > } > INP_RLOCK(inp); > INP_INFO_RUNLOCK(&V_udbinfo); > + if (inp->inp_ppcb != NULL) { > + /* > + * Engage the tunneling protocol we must make sure all locks > + * are released when we call the tunneling protocol. > + */ Ditto. BTW, have you thought about trying to use so_upcall for these things rather than something specific to the UDP layer, or do you really need the full IP/UDP header? Robert N M Watson Computer Laboratory University of Cambridge > + udp_tun_func_t tunnel_func; > + > + tunnel_func = (udp_tun_func_t)inp->inp_ppcb; > + tunnel_func(m, off, inp); > + INP_RUNLOCK(inp); > + return (IPPROTO_DONE); > + } > udp6_append(inp, m, off, &fromsa); > INP_RUNLOCK(inp); > return (IPPROTO_DONE); > From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 13:05:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDBB71065673; Tue, 6 Jan 2009 13:05:58 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBA5C8FC1A; Tue, 6 Jan 2009 13:05:58 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06D5ws5031675; Tue, 6 Jan 2009 13:05:58 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06D5w82031674; Tue, 6 Jan 2009 13:05:58 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061305.n06D5w82031674@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 13:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186817 - head/lib/libc/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:05:59 -0000 Author: danger (doc committer) Date: Tue Jan 6 13:05:58 2009 New Revision: 186817 URL: http://svn.freebsd.org/changeset/base/186817 Log: catch up wtih r175955 by ume: - the support of AI_ALL and AI_V4MAPPED has been completely removed. Modified: head/lib/libc/net/getaddrinfo.3 Modified: head/lib/libc/net/getaddrinfo.3 ============================================================================== --- head/lib/libc/net/getaddrinfo.3 Tue Jan 6 12:39:28 2009 (r186816) +++ head/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:05:58 2009 (r186817) @@ -126,13 +126,11 @@ field to which the parameter points shall be set to zero or be the bitwise-inclusive OR of one or more of the values .Dv AI_ADDRCONFIG , -.Dv AI_ALL , .Dv AI_CANONNAME , .Dv AI_NUMERICHOST , -.Dv AI_NUMERICSERV , -.Dv AI_PASSIVE , +.Dv AI_NUMERICSERV and -.Dv AI_V4MAPPED . +.Dv AI_PASSIVE . .Bl -tag -width "AI_CANONNAMEXX" .It Dv AI_ADDRCONFIG If the @@ -141,19 +139,6 @@ bit is set, IPv4 addresses shall be retu an IPv4 address is configured on the local system, and IPv6 addresses shall be returned only if an IPv6 address is configured on the local system. -.It Dv AI_ALL -If the -.Dv AI_ALL -bit is set with the -.Dv AI_V4MAPPED -bit, then -.Fn getaddrinfo -shall return all matching IPv6 and IPv4 addresses. -The -.Dv AI_ALL -bit without the -.Dv AI_V4MAPPED -bit is ignored. .It Dv AI_CANONNAME If the .Dv AI_CANONNAME @@ -218,30 +203,6 @@ loopback address if is the null pointer and .Dv AI_PASSIVE is not set. -.It Dv AI_V4MAPPED -If the -.Dv AI_V4MAPPED -flag is specified along with an -.Fa ai_family -of -.Dv AF_INET6 , -then -.Fn getaddrinfo -shall return IPv4-mapped IPv6 addresses -on finding no matching IPv6 addresses ( -.Fa ai_addrlen -shall be 16). -The -.Dv AI_V4MAPPED -flag shall be ignored unless -.Fa ai_family -equals -.Dv AF_INET6 . -Note: this flag is currently -.Em not -supported, see the -.Sx BUGS -section. .El .El .Pp @@ -490,18 +451,6 @@ freeaddrinfo(res0); .%B "Proceedings of the freenix track: 2000 USENIX annual technical conference" .%D June 2000 .Re -.Sh BUGS -The -.Nm -function as implemented in -.Fx -currently does not support -.Dv AI_ALL -and -.Dv AI_V4MAPPED -flags and returns -.Dv EAI_BADFLAGS -if one of them is specified. .Sh STANDARDS The .Fn getaddrinfo From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 13:10:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10D3C1065672; Tue, 6 Jan 2009 13:10:16 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9CB68FC18; Tue, 6 Jan 2009 13:10:15 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06DAFoT031853; Tue, 6 Jan 2009 13:10:15 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06DAFnR031852; Tue, 6 Jan 2009 13:10:15 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061310.n06DAFnR031852@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 13:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186819 - head/lib/libc/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:10:17 -0000 Author: danger (doc committer) Date: Tue Jan 6 13:10:15 2009 New Revision: 186819 URL: http://svn.freebsd.org/changeset/base/186819 Log: - forgot to bump a date Modified: head/lib/libc/net/getaddrinfo.3 Modified: head/lib/libc/net/getaddrinfo.3 ============================================================================== --- head/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:09:19 2009 (r186818) +++ head/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:10:15 2009 (r186819) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2008 +.Dd January 6, 2009 .Dt GETADDRINFO 3 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 13:19:27 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BCEF106564A; Tue, 6 Jan 2009 13:19:27 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:203:6dff:fe1a:4ddc]) by mx1.freebsd.org (Postfix) with ESMTP id AAC678FC0C; Tue, 6 Jan 2009 13:19:26 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from [10.1.1.54] ([10.1.1.54]) (authenticated bits=0) by lakerest.net (8.14.1/8.14.1) with ESMTP id n06DJOI4059166 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 6 Jan 2009 08:19:25 -0500 (EST) (envelope-from rrs@lakerest.net) Message-Id: <13F887DB-F42B-4283-B19A-02CCCB8CDB27@lakerest.net> From: Randall Stewart To: Robert Watson In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 6 Jan 2009 08:19:24 -0500 References: <200901061213.n06CDfuv030333@svn.freebsd.org> X-Mailer: Apple Mail (2.930.3) Cc: svn-src-head@FreeBSD.org, Randall Stewart , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186813 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:19:27 -0000 On Jan 6, 2009, at 7:43 AM, Robert Watson wrote: > On Tue, 6 Jan 2009, Randall Stewart wrote: > >> + /* >> + * Engage the tunneling protocol we >> + * will have to leave the info_lock >> + * up, since we are hunting through >> + * multiple UDP inp's hope we don't >> + * break. >> + * >> + * XXXML: Maybe add a flag to the >> + * prototype so that the tunneling >> + * can defer work that can't be done >> + * under the info lock? >> + */ >> + udp_tun_func_t tunnel_func; >> + >> + tunnel_func = (udp_tun_func_t)last->inp_ppcb; >> + tunnel_func(n, iphlen, last); >> + INP_RUNLOCK(last); > > There's a basic working assumption throughout most protocol input > paths that the inpcb (and hence things it points to) will remain > valid only if appropriate locks are held, so I think we won't ever > be in a position where we can safely call tunnel_func() without at > least the inpcb, and possibly the pcbinfo, lock. As such, I think > we can lose the comments about locking here and elsewhere. Right.. Ok I will scrub out all the stale comments.. > > >> - udp_append(last, ip, m, iphlen + sizeof(struct udphdr), >> - &udp_in); >> - INP_RUNLOCK(last); >> - INP_INFO_RUNLOCK(&V_udbinfo); >> + if (last->inp_ppcb == NULL) { >> + udp_append(last, ip, m, iphlen + sizeof(struct udphdr), >> + &udp_in); >> + INP_RUNLOCK(last); >> + INP_INFO_RUNLOCK(&V_udbinfo); >> + } else { >> + /* >> + * Engage the tunneling protocol we must make sure >> + * all locks are released when we call the tunneling >> + * protocol. > > This comment appears to be stale -- the locks are held, and must be. > >> + /* >> + * Engage the tunneling protocol we must make sure all locks >> + * are released when we call the tunneling protocol. >> + */ >> + udp_tun_func_t tunnel_func; > > Ditto here -- locks are held, and must be. > >> +int >> +udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f) >> +{ >> + struct inpcb *inp; >> + > > Hmm. Perhaps the sanity tests here should be KASSERT's: > > KASSERT(so->so_type == SOCK_DGRAM, ("udp_set_kernel_tunneling: ! > dgram")); > KASSERT(so->so_ppcb != NULL, ("udp_set_kernel_tunneling: NULL inp")); > > Otherwise these if's are really just error handling for violated > invariants. > >> + INP_WLOCK(inp); >> + inp->inp_ppcb = f; >> INP_WUNLOCK(inp); > > However, I could see having some error-handling here, perhaps > something like: > > INP_WLOCK(inp); > if (inp->inp_ppcb != NULL) { > INP_WUNLOCK(inp); > return (EBUSY); > } > inp->inp_ppcb = f; > INP_WUNLOCK(inp); > Hmm yeah a KASSERT would be better. And I like your error check.. I will add these with the commit. >> - udp6_append(last, n, off, &fromsa); >> - INP_RUNLOCK(last); >> + if (last->inp_ppcb != NULL) { >> + /* >> + * Engage the tunneling >> + * protocol we will have to >> + * leave the info_lock up, >> + * since we are hunting >> + * through multiple UDP >> + * inp's hope we don't break. > > I think we can omit the comment here -- the locks are necessary and > unavoidable, so any functions called here need to deal with it by > definition. > >> + if (last->inp_ppcb != NULL) { >> + /* >> + * Engage the tunneling protocol we must make sure >> + * all locks are released when we call the tunneling >> + * protocol. > > Ditto as above -- stale, and probably unnecessary. > >> @@ -354,6 +384,18 @@ udp6_input(struct mbuf **mp, int *offp, >> } >> INP_RLOCK(inp); >> INP_INFO_RUNLOCK(&V_udbinfo); >> + if (inp->inp_ppcb != NULL) { >> + /* >> + * Engage the tunneling protocol we must make sure all locks >> + * are released when we call the tunneling protocol. >> + */ > > Ditto. BTW, have you thought about trying to use so_upcall for > these things rather than something specific to the UDP layer, or do > you really need the full IP/UDP header? > I think the answer is yes, we definitely need the full IP header and UDP header. Consider that the transport protocol you are tunneling to will do (in general) the following: 1) Pull out the UDP port number of the sender and stash this (or make sure it is stashed) in its internal PCB. 2) Strip out the udp header. 3) Present the IP+Real Transport header AND the udp Port used (to act as a flag that it came via udp) to the real transports NNN_input() function. Without the full IP/UDP headers you would not be able to do this. R > Robert N M Watson > Computer Laboratory > University of Cambridge > >> + udp_tun_func_t tunnel_func; >> + >> + tunnel_func = (udp_tun_func_t)inp->inp_ppcb; >> + tunnel_func(m, off, inp); >> + INP_RUNLOCK(inp); >> + return (IPPROTO_DONE); >> + } >> udp6_append(inp, m, off, &fromsa); >> INP_RUNLOCK(inp); >> return (IPPROTO_DONE); >> > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 13:27:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 206AB106566B; Tue, 6 Jan 2009 13:27:57 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4298FC1A; Tue, 6 Jan 2009 13:27:57 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06DRugx032334; Tue, 6 Jan 2009 13:27:56 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06DRuLo032332; Tue, 6 Jan 2009 13:27:56 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200901061327.n06DRuLo032332@svn.freebsd.org> From: Randall Stewart Date: Tue, 6 Jan 2009 13:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186821 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:27:57 -0000 Author: rrs Date: Tue Jan 6 13:27:56 2009 New Revision: 186821 URL: http://svn.freebsd.org/changeset/base/186821 Log: Addresses Roberts comments on comments. Also adds the KASSERT and checks suggested. Reviewed by: The udp tunneling was discussed on net@ under the thread entitled "Heads up -- Thinking about UDP and tunneling" Modified: head/sys/netinet/udp_usrreq.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue Jan 6 13:12:26 2009 (r186820) +++ head/sys/netinet/udp_usrreq.c Tue Jan 6 13:27:56 2009 (r186821) @@ -501,13 +501,8 @@ udp_input(struct mbuf *m, int off) * Engage the tunneling protocol we * will have to leave the info_lock * up, since we are hunting through - * multiple UDP inp's hope we don't - * break. + * multiple UDP's. * - * XXXML: Maybe add a flag to the - * prototype so that the tunneling - * can defer work that can't be done - * under the info lock? */ udp_tun_func_t tunnel_func; @@ -546,9 +541,7 @@ udp_input(struct mbuf *m, int off) INP_INFO_RUNLOCK(&V_udbinfo); } else { /* - * Engage the tunneling protocol we must make sure - * all locks are released when we call the tunneling - * protocol. + * Engage the tunneling protocol. */ udp_tun_func_t tunnel_func; @@ -602,8 +595,7 @@ udp_input(struct mbuf *m, int off) } if (inp->inp_ppcb != NULL) { /* - * Engage the tunneling protocol we must make sure all locks - * are released when we call the tunneling protocol. + * Engage the tunneling protocol. */ udp_tun_func_t tunnel_func; @@ -1205,6 +1197,8 @@ udp_set_kernel_tunneling(struct socket * struct inpcb *inp; inp = (struct inpcb *)so->so_pcb; + KASSERT(so->so_type == SOCK_DGRAM, ("udp_set_kernel_tunneling: !dgram")); + KASSERT(so->so_pcb != NULL, ("udp_set_kernel_tunneling: NULL inp")); if (so->so_type != SOCK_DGRAM) { /* Not UDP socket... sorry! */ return (ENOTSUP); @@ -1214,6 +1208,10 @@ udp_set_kernel_tunneling(struct socket * return (EINVAL); } INP_WLOCK(inp); + if (inp->inp_ppcb != NULL) { + INP_WUNLOCK(inp); + return (EBUSY); + } inp->inp_ppcb = f; INP_WUNLOCK(inp); return (0); Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Tue Jan 6 13:12:26 2009 (r186820) +++ head/sys/netinet6/udp6_usrreq.c Tue Jan 6 13:27:56 2009 (r186821) @@ -293,8 +293,7 @@ udp6_input(struct mbuf **mp, int *offp, * protocol we will have to * leave the info_lock up, * since we are hunting - * through multiple UDP - * inp's hope we don't break. + * through multiple UDP's. * */ udp_tun_func_t tunnel_func; @@ -336,9 +335,7 @@ udp6_input(struct mbuf **mp, int *offp, INP_INFO_RUNLOCK(&V_udbinfo); if (last->inp_ppcb != NULL) { /* - * Engage the tunneling protocol we must make sure - * all locks are released when we call the tunneling - * protocol. + * Engage the tunneling protocol. */ udp_tun_func_t tunnel_func; @@ -386,8 +383,7 @@ udp6_input(struct mbuf **mp, int *offp, INP_INFO_RUNLOCK(&V_udbinfo); if (inp->inp_ppcb != NULL) { /* - * Engage the tunneling protocol we must make sure all locks - * are released when we call the tunneling protocol. + * Engage the tunneling protocol. */ udp_tun_func_t tunnel_func; From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 13:59:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D851E106566B; Tue, 6 Jan 2009 13:59:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C62038FC08; Tue, 6 Jan 2009 13:59:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06Dxxgh032916; Tue, 6 Jan 2009 13:59:59 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06DxxFj032915; Tue, 6 Jan 2009 13:59:59 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901061359.n06DxxFj032915@svn.freebsd.org> From: Robert Watson Date: Tue, 6 Jan 2009 13:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186822 - head/sys/security/audit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:00:00 -0000 Author: rwatson Date: Tue Jan 6 13:59:59 2009 New Revision: 186822 URL: http://svn.freebsd.org/changeset/base/186822 Log: In AUDIT_SYSCALL_EXIT(), invoke audit_syscall_exit() only if an audit record is active on the current thread--historically we may always have wanted to enter the audit code if auditing was enabled, but now we just commit the audit record so don't need to enter if there isn't one. Obtained from: TrustedBSD Project Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit.h Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Tue Jan 6 13:27:56 2009 (r186821) +++ head/sys/security/audit/audit.h Tue Jan 6 13:59:59 2009 (r186822) @@ -198,11 +198,11 @@ void audit_thread_free(struct thread *t /* * Wrap the audit_syscall_exit() function so that it is called only when - * auditing is enabled, or we have a audit record on the thread. It is - * possible that an audit record was begun before auditing was turned off. + * we have a audit record on the thread. Audit records can persist after + * auditing is disabled, so we don't just check audit_enabled here. */ #define AUDIT_SYSCALL_EXIT(error, td) do { \ - if (audit_enabled || (td->td_ar != NULL)) \ + if (td->td_ar != NULL) \ audit_syscall_exit(error, td); \ } while (0) From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 14:10:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D88C1065672; Tue, 6 Jan 2009 14:10:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B2EF8FC0C; Tue, 6 Jan 2009 14:10:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06EABtp033160; Tue, 6 Jan 2009 14:10:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06EABW2033159; Tue, 6 Jan 2009 14:10:11 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901061410.n06EABW2033159@svn.freebsd.org> From: Marius Strobl Date: Tue, 6 Jan 2009 14:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186823 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:10:12 -0000 Author: marius Date: Tue Jan 6 14:10:10 2009 New Revision: 186823 URL: http://svn.freebsd.org/changeset/base/186823 Log: - Don't enforce an upper-bound to the number of sectors or heads, allowing the full 16-bit width of the corresponding fields in the VTOC8 label to be used. The removed limits basically only held true for providers labeled using the synthetic geometry provided by cam_calc_geometry(9) but neither SCSI disks labeled with Solaris nor sufficiently large ATA disks. - Given that providers (originally) labeled with Solaris typically use the native geometry as reported by the target while FreeBSD typically uses a synthetic one put the message complaining about mismatching geometries between what the label indicates and what GEOM thinks the provider has, which we generally can't help, under bootverbose in order to not unnecessarily scare users. - For informational purposes add the non-matching values to the message complaining about them, similar to what r186501 did for g_part_bsd_read() except also indicating the origin of the values. - Make it clear that the messages emitted by this code refer to the VTOC8 support rather than to another existing scheme or to VTOC32. Modified: head/sys/geom/part/g_part_vtoc8.c Modified: head/sys/geom/part/g_part_vtoc8.c ============================================================================== --- head/sys/geom/part/g_part_vtoc8.c Tue Jan 6 13:59:59 2009 (r186822) +++ head/sys/geom/part/g_part_vtoc8.c Tue Jan 6 14:10:10 2009 (r186823) @@ -371,7 +371,7 @@ g_part_vtoc8_read(struct g_part_table *b msize = pp->mediasize / pp->sectorsize; sectors = be16dec(&table->vtoc.nsecs); - if (sectors < 1 || sectors > 63) + if (sectors < 1) goto invalid_label; if (sectors != basetable->gpt_sectors && !basetable->gpt_fixgeom) { g_part_geometry_heads(msize, sectors, &chs, &heads); @@ -382,13 +382,21 @@ g_part_vtoc8_read(struct g_part_table *b } heads = be16dec(&table->vtoc.nheads); - if (heads < 1 || heads > 255) + if (heads < 1) goto invalid_label; if (heads != basetable->gpt_heads && !basetable->gpt_fixgeom) basetable->gpt_heads = heads; - if (sectors != basetable->gpt_sectors || - heads != basetable->gpt_heads) - printf("GEOM: %s: geometry does not match label.\n", pp->name); + /* + * Except for ATA disks > 32GB, Solaris uses the native geometry + * as reported by the target for the labels while da(4) typically + * uses a synthetic one so we don't complain too loudly if these + * geometries don't match. + */ + if (bootverbose && (sectors != basetable->gpt_sectors || + heads != basetable->gpt_heads)) + printf("GEOM: %s: geometry does not match VTOC8 label " + "(label: %uh,%us GEOM: %uh,%us).\n", pp->name, heads, + sectors, basetable->gpt_heads, basetable->gpt_sectors); table->secpercyl = heads * sectors; cyls = be16dec(&table->vtoc.ncyls); @@ -402,7 +410,7 @@ g_part_vtoc8_read(struct g_part_table *b withtags = (be32dec(&table->vtoc.sanity) == VTOC_SANITY) ? 1 : 0; if (!withtags) { - printf("GEOM: %s: adding VTOC information.\n", pp->name); + printf("GEOM: %s: adding VTOC8 information.\n", pp->name); be32enc(&table->vtoc.version, VTOC_VERSION); bzero(&table->vtoc.volume, VTOC_VOLUME_LEN); be16enc(&table->vtoc.nparts, VTOC8_NPARTS); @@ -444,7 +452,7 @@ g_part_vtoc8_read(struct g_part_table *b return (0); invalid_label: - printf("GEOM: %s: invalid disklabel.\n", pp->name); + printf("GEOM: %s: invalid VTOC8 label.\n", pp->name); return (EINVAL); } From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 14:10:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85F0C1065678; Tue, 6 Jan 2009 14:10:30 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73F958FC16; Tue, 6 Jan 2009 14:10:30 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06EAUDG033201; Tue, 6 Jan 2009 14:10:30 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06EAUTa033200; Tue, 6 Jan 2009 14:10:30 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901061410.n06EAUTa033200@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 6 Jan 2009 14:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186824 - head/usr.sbin/kldxref X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:10:31 -0000 Author: luigi Date: Tue Jan 6 14:10:30 2009 New Revision: 186824 URL: http://svn.freebsd.org/changeset/base/186824 Log: correct description of how a string is stored, fix a few typos and reference the kernel file which processes this info. All in all, the content of this file should be moved to kldxref.c or to the kld(4) manpage. MFC after: 3 days Modified: head/usr.sbin/kldxref/fileformat Modified: head/usr.sbin/kldxref/fileformat ============================================================================== --- head/usr.sbin/kldxref/fileformat Tue Jan 6 14:10:10 2009 (r186823) +++ head/usr.sbin/kldxref/fileformat Tue Jan 6 14:10:30 2009 (r186824) @@ -1,7 +1,9 @@ $FreeBSD$ - linker.hints file consists from the one or more records. First record of -file is special and determines its version: +linker.hints file consists from the one or more records, +and is processed by sys/kern/kern_linker.c::linker_hints_lookup() + +First record of file is special and determines its version: int version; @@ -16,25 +18,28 @@ struct record { 'data' determines its type: struct data { - int type; /* type of data. currently MTD_* values */ + int type; /* type of data. currently MDT_* values */ }; The rest of record depends on the type. struct string { - int length; /* length of string */ + uint8_t length; /* length of string */ char val[]; /* string itself (no terminating zero) */ }; struct data_mdt_version { int type = MDT_VERSION; struct string modname; + /* padding */ int version; struct string kldname; + /* padding */ }; struct data_mdt_module { - int type = MDT_VERSION; + int type = MDT_MODULE; struct string modname; struct string kldname; + /* padding */ }; From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 14:15:39 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5620E1065672; Tue, 6 Jan 2009 14:15:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 440808FC08; Tue, 6 Jan 2009 14:15:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06EFcNL033355; Tue, 6 Jan 2009 14:15:38 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06EFc91033354; Tue, 6 Jan 2009 14:15:38 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901061415.n06EFc91033354@svn.freebsd.org> From: Robert Watson Date: Tue, 6 Jan 2009 14:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186825 - head/sys/security/audit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:15:39 -0000 Author: rwatson Date: Tue Jan 6 14:15:38 2009 New Revision: 186825 URL: http://svn.freebsd.org/changeset/base/186825 Log: Do a lockless read of the audit pipe list before grabbing the audit pipe lock in order to avoid the lock acquire hit if the pipe list is very likely empty. Obtained from: TrustedBSD Project MFC after: 3 weeks Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Tue Jan 6 14:10:30 2009 (r186824) +++ head/sys/security/audit/audit_pipe.c Tue Jan 6 14:15:38 2009 (r186825) @@ -436,6 +436,10 @@ audit_pipe_preselect(au_id_t auid, au_ev { struct audit_pipe *ap; + /* Lockless read to avoid acquiring the global lock if not needed. */ + if (TAILQ_EMPTY(&audit_pipe_list)) + return (0); + AUDIT_PIPE_LIST_RLOCK(); TAILQ_FOREACH(ap, &audit_pipe_list, ap_list) { AUDIT_PIPE_LOCK(ap); From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 14:21:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 310F7106566B; Tue, 6 Jan 2009 14:21:18 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4A48FC1D; Tue, 6 Jan 2009 14:21:18 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06ELIqx033485; Tue, 6 Jan 2009 14:21:18 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06ELH2t033483; Tue, 6 Jan 2009 14:21:17 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901061421.n06ELH2t033483@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 6 Jan 2009 14:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186826 - head/usr.sbin/kldxref X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:21:18 -0000 Author: luigi Date: Tue Jan 6 14:21:17 2009 New Revision: 186826 URL: http://svn.freebsd.org/changeset/base/186826 Log: fix a couple of innocuous compiler warnings MFC after: 3 days Modified: head/usr.sbin/kldxref/ef_i386.c head/usr.sbin/kldxref/ef_obj.c Modified: head/usr.sbin/kldxref/ef_i386.c ============================================================================== --- head/usr.sbin/kldxref/ef_i386.c Tue Jan 6 14:15:38 2009 (r186825) +++ head/usr.sbin/kldxref/ef_i386.c Tue Jan 6 14:21:17 2009 (r186826) @@ -43,12 +43,13 @@ */ int ef_reloc(struct elf_file *ef, const void *reldata, int reltype, Elf_Off relbase, - Elf_Off dataoff, size_t len, void *dest) + Elf_Off dataoff, size_t len, void *_dest) { Elf_Addr *where, addr, addend; Elf_Size rtype, symidx; const Elf_Rel *rel; const Elf_Rela *rela; + char *dest = _dest; switch (reltype) { case EF_RELOC_REL: Modified: head/usr.sbin/kldxref/ef_obj.c ============================================================================== --- head/usr.sbin/kldxref/ef_obj.c Tue Jan 6 14:15:38 2009 (r186825) +++ head/usr.sbin/kldxref/ef_obj.c Tue Jan 6 14:21:17 2009 (r186826) @@ -133,7 +133,7 @@ static struct elf_file_ops ef_obj_file_o }; static int -ef_obj_get_type(elf_file_t ef) +ef_obj_get_type(elf_file_t __unused ef) { return (EFT_KLD); @@ -180,7 +180,7 @@ ef_obj_symaddr(elf_file_t ef, Elf_Size s { const Elf_Sym *sym; - if (symidx >= ef->ddbsymcnt) + if (symidx >= (size_t) ef->ddbsymcnt) return (0); sym = ef->ddbsymtab + symidx; From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 14:23:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0CA6106566C; Tue, 6 Jan 2009 14:23:38 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDF9D8FC08; Tue, 6 Jan 2009 14:23:38 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06ENcSn033582; Tue, 6 Jan 2009 14:23:38 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06ENc5s033581; Tue, 6 Jan 2009 14:23:38 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901061423.n06ENc5s033581@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 6 Jan 2009 14:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186827 - head/usr.sbin/kldxref X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:23:39 -0000 Author: luigi Date: Tue Jan 6 14:23:38 2009 New Revision: 186827 URL: http://svn.freebsd.org/changeset/base/186827 Log: various cleanups including: + check a possible buffer overflow when creating a temp file, submitted by Christoph Mallon + remove stale struct definitions + clarify the use of dflag and remove useless checks MFC after: 3 days Modified: head/usr.sbin/kldxref/kldxref.c Modified: head/usr.sbin/kldxref/kldxref.c ============================================================================== --- head/usr.sbin/kldxref/kldxref.c Tue Jan 6 14:21:17 2009 (r186826) +++ head/usr.sbin/kldxref/kldxref.c Tue Jan 6 14:23:38 2009 (r186827) @@ -57,37 +57,19 @@ #define MAXRECSIZE 1024 #define check(val) if ((error = (val)) != 0) break -#ifndef min -#define min(a,b) (((a)<(b)) ? (a) : (b)) -#endif - -struct mod_info { - char* mi_name; - int mi_ver; - SLIST_ENTRY(mod_info) mi_next; -}; - -#ifdef notnow -struct kld_info { - char* k_filename; - SLIST_HEAD(mod_list_head, mod_info) k_modules; - SLIST_ENTRY(kld_info) k_next; -}; +static int dflag; /* do not create a hint file, only write on stdout */ +static int verbose; -SLIST_HEAD(kld_list_head, kld_info) kldlist; -#endif - -static int dflag, verbose; - -FILE *fxref; +static FILE *fxref; /* current hints file */ static const char *xref_file = "linker.hints"; +/* + * A record is stored in the static buffer recbuf before going to disk. + */ static char recbuf[MAXRECSIZE]; -static int recpos, reccnt; - -FILE *maketempfile(char *, const char *); -static void usage(void); +static int recpos; /* current write position */ +static int reccnt; /* total record written to this file so far */ static void intalign(void) @@ -105,7 +87,7 @@ record_start(void) static int record_end(void) { - if (dflag || recpos == 0) + if (recpos == 0) return 0; reccnt++; intalign(); @@ -123,6 +105,9 @@ record_buf(const void *buf, int size) return 0; } +/* + * An int is stored in host order and aligned + */ static int record_int(int val) { @@ -130,21 +115,21 @@ record_int(int val) return record_buf(&val, sizeof(val)); } -static int -record_byte(u_char val) -{ - return record_buf(&val, sizeof(val)); -} - +/* + * A string is stored as 1-byte length plus data, no padding + */ static int record_string(const char *str) { - int len = strlen(str); - int error; - + int len, error; + u_char val; + if (dflag) return 0; - error = record_byte(len); + val = len = strlen(str); + if (len > 255) + errx(1, "string %s too long", str); + error = record_buf(&val, sizeof(val)); if (error) return error; return record_buf(str, len); @@ -170,21 +155,23 @@ parse_entry(struct mod_metadata *md, con break; case MDT_VERSION: check(EF_SEG_READ(ef, data, sizeof(mdv), &mdv)); - record_int(MDT_VERSION); - record_string(cval); - record_int(mdv.mv_version); - record_string(kldname); - if (!dflag) - break; - printf(" interface %s.%d\n", cval, mdv.mv_version); + if (dflag) { + printf(" interface %s.%d\n", cval, mdv.mv_version); + } else { + record_int(MDT_VERSION); + record_string(cval); + record_int(mdv.mv_version); + record_string(kldname); + } break; case MDT_MODULE: - record_int(MDT_MODULE); - record_string(cval); - record_string(kldname); - if (!dflag) - break; - printf(" module %s\n", cval); + if (dflag) { + printf(" module %s\n", cval); + } else { + record_int(MDT_MODULE); + record_string(cval); + record_string(kldname); + } break; default: warnx("unknown metadata record %d in file %s", md->md_type, kldname); @@ -199,8 +186,6 @@ read_kld(char *filename, char *kldname) { struct mod_metadata md; struct elf_file ef; -/* struct kld_info *kip; - struct mod_info *mip;*/ void **p, **orgp; int error, eftype, nmlen; long start, finish, entries; @@ -224,8 +209,9 @@ read_kld(char *filename, char *kldname) } if (!dflag) { cp = strrchr(kldname, '.'); - nmlen = cp ? min(MAXMODNAME, cp - kldname) : - min(MAXMODNAME, strlen(kldname)); + nmlen = (cp != NULL) ? cp - kldname : (int)strlen(kldname); + if (nmlen > MAXMODNAME) + nmlen = MAXMODNAME; strlcpy(kldmodname, kldname, nmlen); /* fprintf(fxref, "%s:%s:%d\n", kldmodname, kldname, 0);*/ } @@ -252,27 +238,43 @@ read_kld(char *filename, char *kldname) return error; } -FILE * +/* + * Create a temp file in directory root, make sure we don't + * overflow the buffer for the destination name + */ +static FILE * maketempfile(char *dest, const char *root) { char *p; - int fd; + int n, fd; - strlcpy(dest, root, MAXPATHLEN); + p = strrchr(root, '/'); + n = p != NULL ? p - root + 1 : 0; + if (snprintf(dest, MAXPATHLEN, "%.*slhint.XXXXXX", n, root) >= + MAXPATHLEN) { + errno = ENAMETOOLONG; + return NULL; + } - if ((p = strrchr(dest, '/')) != 0) - p++; - else - p = dest; - strcpy(p, "lhint.XXXXXX"); fd = mkstemp(dest); - if (fd >= 0) - fchmod(fd, 0644); /* nothing secret in the file */ - return ((fd == -1) ? NULL : fdopen(fd, "w+")); + if (fd < 0) + return NULL; + fchmod(fd, 0644); /* nothing secret in the file */ + return fdopen(fd, "w+"); } static char xrefname[MAXPATHLEN], tempname[MAXPATHLEN]; +static void +usage(void) +{ + + fprintf(stderr, "%s\n", + "usage: kldxref [-Rdv] [-f hintsfile] path ..." + ); + exit(1); +} + int main(int argc, char *argv[]) { @@ -282,20 +284,19 @@ main(int argc, char *argv[]) struct stat sb; fts_options = FTS_PHYSICAL; -/* SLIST_INIT(&kldlist);*/ while ((opt = getopt(argc, argv, "Rdf:v")) != -1) { switch (opt) { - case 'd': + case 'd': /* no hint file, only print on stdout */ dflag = 1; break; - case 'f': + case 'f': /* use this name instead of linker.hints */ xref_file = optarg; break; case 'v': verbose++; break; - case 'R': + case 'R': /* recurse on directories */ fts_options |= FTS_COMFOLLOW; break; default: @@ -321,19 +322,22 @@ main(int argc, char *argv[]) for (;;) { p = fts_read(ftsp); - if ((p == NULL || p->fts_info == FTS_D) && !dflag && fxref) { + if ((p == NULL || p->fts_info == FTS_D) && fxref) { + /* close and rename the current hint file */ fclose(fxref); fxref = NULL; if (reccnt) { rename(tempname, xrefname); } else { + /* didn't find any entry, ignore this file */ unlink(tempname); unlink(xrefname); } } if (p == NULL) break; - if (p && p->fts_info == FTS_D && !dflag) { + if (p->fts_info == FTS_D && !dflag) { + /* visiting a new directory, create a new hint file */ snprintf(xrefname, sizeof(xrefname), "%s/%s", ftsp->fts_path, xref_file); fxref = maketempfile(tempname, ftsp->fts_path); @@ -343,6 +347,7 @@ main(int argc, char *argv[]) fwrite(&ival, sizeof(ival), 1, fxref); reccnt = 0; } + /* skip non-files or .symbols entries */ if (p->fts_info != FTS_F) continue; if (p->fts_namelen >= 8 && @@ -353,13 +358,3 @@ main(int argc, char *argv[]) fts_close(ftsp); return 0; } - -static void -usage(void) -{ - - fprintf(stderr, "%s\n", - "usage: kldxref [-Rdv] [-f hintsfile] path ..." - ); - exit(1); -} From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 14:57:39 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54134106566C; Tue, 6 Jan 2009 14:57:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41E9A8FC16; Tue, 6 Jan 2009 14:57:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06Evd9S034318; Tue, 6 Jan 2009 14:57:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06EvdnH034317; Tue, 6 Jan 2009 14:57:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901061457.n06EvdnH034317@svn.freebsd.org> From: Alexander Motin Date: Tue, 6 Jan 2009 14:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186828 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:57:40 -0000 Author: mav Date: Tue Jan 6 14:57:39 2009 New Revision: 186828 URL: http://svn.freebsd.org/changeset/base/186828 Log: Add small hint that snd_ich is the AC'97 controller driver. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Jan 6 14:23:38 2009 (r186827) +++ head/sys/conf/NOTES Tue Jan 6 14:57:39 2009 (r186828) @@ -2004,7 +2004,7 @@ device sound # snd_gusc: Gravis UltraSound ISA PnP/non-PnP. # snd_hda: Intel High Definition Audio (Controller) and # compatible. -# snd_ich: Intel ICH PCI and some more audio controllers +# snd_ich: Intel ICH AC'97 and some more audio controllers # embedded in a chipset, for example nVidia # nForce controllers. # snd_maestro: ESS Technology Maestro-1/2x PCI. From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 14:59:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5CF7106564A for ; Tue, 6 Jan 2009 14:59:07 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 614F88FC27 for ; Tue, 6 Jan 2009 14:59:07 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 3515E8FC4E for ; Tue, 6 Jan 2009 17:59:06 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id A612C8FC18; Tue, 6 Jan 2009 17:59:02 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id B36DC398F3; Tue, 6 Jan 2009 18:01:29 +0300 (MSK) Date: Tue, 6 Jan 2009 18:01:23 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106180123.d032657d.stas@FreeBSD.org> In-Reply-To: <200901061215.37947.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106124303.d8bab0de.stas@FreeBSD.org> <20090106133507.1e2bc2d2.stas@FreeBSD.org> <200901061215.37947.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 17:59:05 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 496371b9967006267776625 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:59:08 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 12:15:37 +0100 Hans Petter Selasky mentioned: > As long as your device shows up like "ugen0.2" it is detected properly and > will function. Check with "usbconfig". > > Suggestions: > > usbconfig -u 0 -a 2 reset > usbconfig -u 0 -a 2 dump_device_desc > This doesn't change anything, the device fails to attach. > The failures indicate that the firmware on your USB device is not reponding > correctly at the time the set address command is being sent to the device. > Do you have some ideas how this situation could be handled in the new stack? > As you can see the new USB stack will try to re-enumerate the device one time. > > Have you loaded the correct driver for your serial device? > > kldload usb2_serial_bsa > Yes, this module is loaded and I can see it enters the probe routine. But as the configuration index doesn't match what the driver expects it fails to probe. Driver checks for configuration idx 1, but I see this device on idx 0. ugen0.2: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON The old stack didn't checked for specific configuration index, but tryed to select the appropriate one in the attach routine. /* Move the device into the configured state. */ err = usbd_set_config_index(dev, UBSA_CONFIG_INDEX, 1); What is the reason you have reworked this? Should this be changed to be handled like in the old driver? Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljckkACgkQK/VZk+smlYER6ACfSI3SQ9FwEr/6vXEe/4G0CKDw 4SEAnR3FsMBGxyDLnYpnVVigbvFbX6tj =dW5S -----END PGP SIGNATURE----- !DSPAM:496371b9967006267776625! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 15:10:26 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C3DF106566B; Tue, 6 Jan 2009 15:10:26 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A4338FC0C; Tue, 6 Jan 2009 15:10:26 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06FAQu6034586; Tue, 6 Jan 2009 15:10:26 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06FAQ0g034585; Tue, 6 Jan 2009 15:10:26 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901061510.n06FAQ0g034585@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 6 Jan 2009 15:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186829 - head/sys/i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 15:10:26 -0000 Author: luigi Date: Tue Jan 6 15:10:26 2009 New Revision: 186829 URL: http://svn.freebsd.org/changeset/base/186829 Log: Add a reference to the "env" kernel config option in the GENERIC file, as this is very useful e.g. in diskless configurations and barely documented anywhere else. MFC after: 3 days Modified: head/sys/i386/conf/GENERIC Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Tue Jan 6 14:57:39 2009 (r186828) +++ head/sys/i386/conf/GENERIC Tue Jan 6 15:10:26 2009 (r186829) @@ -26,6 +26,12 @@ 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' , same as for hints files. +# +# env "my_kenv_variables" + makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 15:11:19 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26383106566C; Tue, 6 Jan 2009 15:11:19 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id C0A578FC25; Tue, 6 Jan 2009 15:11:17 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=K7R4C4L6l2QA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=OrbuaqbLBcVSlk_17agA:9 a=VVhOyabtMYaBlzekCKXHqET_pOgA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1175435757; Tue, 06 Jan 2009 16:11:15 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 16:13:32 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061215.37947.hselasky@c2i.net> <20090106180123.d032657d.stas@FreeBSD.org> In-Reply-To: <20090106180123.d032657d.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061613.33687.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 15:11:19 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 12:15:37 +0100 > > Hans Petter Selasky mentioned: > > As long as your device shows up like "ugen0.2" it is detected properly > > and will function. Check with "usbconfig". > > > > Suggestions: > > > > usbconfig -u 0 -a 2 reset > > usbconfig -u 0 -a 2 dump_device_desc > > This doesn't change anything, the device fails to attach. > > > The failures indicate that the firmware on your USB device is not > > reponding correctly at the time the set address command is being sent to > > the device. > > Do you have some ideas how this situation could be handled in the new > stack? > > > As you can see the new USB stack will try to re-enumerate the device one > > time. > > > > Have you loaded the correct driver for your serial device? > > > > kldload usb2_serial_bsa > > Yes, this module is loaded and I can see it enters the probe routine. But > as the configuration index doesn't match what the driver expects it fails > to probe. Driver checks for configuration idx 1, but I see this device on > idx 0. ugen0.2: at usbus0, > cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON > > The old stack didn't checked for specific configuration index, but tryed to > select the appropriate one in the attach routine. > /* Move the device into the configured state. */ > err = usbd_set_config_index(dev, UBSA_CONFIG_INDEX, 1); > > What is the reason you have reworked this? Should this be changed to be > handled like in the old driver? The new is that the driver is not allowed to set the config index by itself. Try: usbconfig -u 0 -a 2 set_config 1 You can for example add a quirk for this, see "usbconfig -h | grep -i quirk". I know this is not so easy, but if you can make a general rule for when selecting another configuration, I will add it. Could you dump me the descriptors of your USB device? usbconfig -u 0 -a 2 dump_curr_config_desc dump_device_desc --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 15:12:49 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33E9A106568B; Tue, 6 Jan 2009 15:12:49 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id 017248FC13; Tue, 6 Jan 2009 15:12:48 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id DB3E91FD044; Tue, 6 Jan 2009 10:12:47 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Tue, 06 Jan 2009 10:12:47 -0500 X-Sasl-enc: rFM3qNLrXEEg+654gDi6K0Fdx+yBNMRCuG/FhoLB0Tb4 1231254767 Received: from empiric.lon.incunabulum.net (unknown [81.168.51.182]) by mail.messagingengine.com (Postfix) with ESMTPSA id EB417320CA; Tue, 6 Jan 2009 10:12:46 -0500 (EST) Message-ID: <496374ED.9010505@incunabulum.net> Date: Tue, 06 Jan 2009 15:12:45 +0000 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.19 (X11/20081209) MIME-Version: 1.0 To: Luigi Rizzo References: <200901061510.n06FAQ0g034585@svn.freebsd.org> In-Reply-To: <200901061510.n06FAQ0g034585@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186829 - head/sys/i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 15:12:50 -0000 Luigi Rizzo wrote: > Log: > Add a reference to the "env" kernel config option in the GENERIC file, > as this is very useful e.g. in diskless configurations and barely documented > anywhere else. > > Thanks! This pointer is a big help for folk who don't already know of it. cheers BMS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 16:24:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50451106566C; Tue, 6 Jan 2009 16:24:23 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E79F8FC1F; Tue, 6 Jan 2009 16:24:23 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06GONJR036134; Tue, 6 Jan 2009 16:24:23 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06GONlG036133; Tue, 6 Jan 2009 16:24:23 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901061624.n06GONlG036133@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 6 Jan 2009 16:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186831 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:24:23 -0000 Author: obrien Date: Tue Jan 6 16:24:22 2009 New Revision: 186831 URL: http://svn.freebsd.org/changeset/base/186831 Log: Note that r186713 also contained a change to VarAdd where we propagate the newly created 'Var' back to the caller. Also, back out an accidentally commented WIP comment. Modified: head/usr.bin/make/var.c Modified: head/usr.bin/make/var.c ============================================================================== --- head/usr.bin/make/var.c Tue Jan 6 15:18:14 2009 (r186830) +++ head/usr.bin/make/var.c Tue Jan 6 16:24:22 2009 (r186831) @@ -2319,8 +2319,7 @@ match_var(const char str[], const char v * None. The old string must be freed by the caller */ Buffer * -//Var_Subst(const char *var, const char *str, GNode *ctxt, Boolean undefErr) -Var_Subst( const char *str, GNode *ctxt, Boolean err) +Var_Subst(const char *str, GNode *ctxt, Boolean err) { Boolean errorReported; Buffer *buf; /* Buffer for forming things */ From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 16:27:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B450106564A; Tue, 6 Jan 2009 16:27:09 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2C1AA8FC16; Tue, 6 Jan 2009 16:27:09 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n06GR28n075345; Tue, 6 Jan 2009 08:27:02 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n06GR1Ds075344; Tue, 6 Jan 2009 08:27:01 -0800 (PST) (envelope-from obrien) Date: Tue, 6 Jan 2009 08:27:01 -0800 From: "David O'Brien" To: "M. Warner Losh" Message-ID: <20090106162701.GA75326@dragon.NUXI.org> References: <200901031014.n03AE1lA022458@svn.freebsd.org> <20090104.100755.686402162.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090104.100755.686402162.imp@bsdimp.com> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186713 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:27:09 -0000 On Sun, Jan 04, 2009 at 10:07:55AM -0700, M. Warner Losh wrote: > In message: <200901031014.n03AE1lA022458@svn.freebsd.org> > "David E. O'Brien" writes: > : Author: obrien > : Date: Sat Jan 3 10:14:01 2009 > : New Revision: 186713 > : URL: http://svn.freebsd.org/changeset/base/186713 > : > : Log: > : + Add the -Q be-quiet flag for parallel jobs. > : - Enable -Q by default for the moment - there is something weird > : going on in the rescue build. > > This seems to also include other things not related to -Q, is that > intentional: Thanks for catching that. From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 16:36:27 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9BF51065677 for ; Tue, 6 Jan 2009 16:36:27 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 2AAB98FC08 for ; Tue, 6 Jan 2009 16:36:27 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 0D99B8FC53 for ; Tue, 6 Jan 2009 19:36:25 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id DE8468FC18; Tue, 6 Jan 2009 19:36:21 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 31424398F3; Tue, 6 Jan 2009 19:38:49 +0300 (MSK) Date: Tue, 6 Jan 2009 19:38:44 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106193844.c727cfb7.stas@FreeBSD.org> In-Reply-To: <200901061613.33687.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061215.37947.hselasky@c2i.net> <20090106180123.d032657d.stas@FreeBSD.org> <200901061613.33687.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 19:36:25 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 49638889967001599015256 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:36:28 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 16:13:32 +0100 Hans Petter Selasky mentioned: > Try: > > usbconfig -u 0 -a 2 set_config 1 > This helps. Now ubsa attaches to the device. But I can't communicate with it (no echo even). I see the following messages in the log: ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > You can for example add a quirk for this, see "usbconfig -h | grep -i quirk". > I know this is not so easy, but if you can make a general rule for when > selecting another configuration, I will add it. Why not let the driver to set the config? > > Could you dump me the descriptors of your USB device? > > usbconfig -u 0 -a 2 dump_curr_config_desc dump_device_desc > Sure: ugen0.2: at usbus0, cfg=1 md=HOST spd=FULL (12Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x16d5 idProduct = 0x6501 bcdDevice = 0x0000 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0001 Configuration index 1 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x003e bNumInterfaces = 0x0002 bConfigurationValue = 0x0001 iConfiguration = 0x0000 bmAttributes = 0x00a0 bMaxPower = 0x00fa Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0003 bInterfaceClass = 0x00ff bInterfaceSubClass = 0x00ff bInterfaceProtocol = 0x00ff iInterface = 0x0003 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0003 wMaxPacketSize = 0x0040 bInterval = 0x0080 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0082 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 2 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Interface 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x00ff bInterfaceSubClass = 0x00ff bInterfaceProtocol = 0x00ff iInterface = 0x0003 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0084 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0004 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljiRkACgkQK/VZk+smlYFvKQCdF1sYtowfXCOrJk11YstQXn7M /asAnjunPYxAHA14khAc7PIkwK0jzyg2 =oYfO -----END PGP SIGNATURE----- !DSPAM:49638889967001599015256! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 16:40:53 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DC65106566B; Tue, 6 Jan 2009 16:40:53 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1A7ED8FC0C; Tue, 6 Jan 2009 16:40:52 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n06GeqZ4075719; Tue, 6 Jan 2009 08:40:52 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n06GeqWF075718; Tue, 6 Jan 2009 08:40:52 -0800 (PST) (envelope-from obrien) Date: Tue, 6 Jan 2009 08:40:52 -0800 From: "David O'Brien" To: Doug Barton Message-ID: <20090106164052.GC75326@dragon.NUXI.org> References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <18782.40912.247441.716938@hergotha.csail.mit.edu> <49628DD3.8020901@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49628DD3.8020901@FreeBSD.org> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:40:53 -0000 On Mon, Jan 05, 2009 at 02:46:43PM -0800, Doug Barton wrote: > A few more specifics in no particular order: .. > You don't have to page through the whole diff if you use less as your PAGER. You do thought have to hit 'q' don't you? > Matt Dillon's change to the PAGER was the single thing I got the most > user complaints about. :-( I know I saw others say in email they liked it better... a ~/.mergemasterrc knob would be nice. :-) -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 16:49:12 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA3A91065680; Tue, 6 Jan 2009 16:49:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 51A618FC14; Tue, 6 Jan 2009 16:49:11 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=7_Zea3ffw2MA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=AzN79KX1Kj8eupxTqHsA:9 a=JCYPLtasg-RiWE6rUfEA:7 a=Dsjo9SA-XqrzBf6lB1XOTWryhd4A:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1073393546; Tue, 06 Jan 2009 17:49:09 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 17:51:26 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061613.33687.hselasky@c2i.net> <20090106193844.c727cfb7.stas@FreeBSD.org> In-Reply-To: <20090106193844.c727cfb7.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061751.27394.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:49:13 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 16:13:32 +0100 > > Hans Petter Selasky mentioned: > > Try: > > > > usbconfig -u 0 -a 2 set_config 1 > > This helps. Now ubsa attaches to the device. But I can't communicate > with it (no echo even). I see the following messages in the log: > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > > > You can for example add a quirk for this, see "usbconfig -h | grep -i > > quirk". I know this is not so easy, but if you can make a general rule > > for when selecting another configuration, I will add it. > > Why not let the driver to set the config? Because: 1) it clashes with USB device side mode, where the config index is received from Host 2) Different device drivers might want different configurations. 3) The driver for the active configuration might not be loaded. > > > Could you dump me the descriptors of your USB device? > > > > usbconfig -u 0 -a 2 dump_curr_config_desc dump_device_desc > > Sure: > > ugen0.2: at usbus0, cfg=1 > md=HOST spd=FULL (12Mbps) pwr=ON > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0110 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x16d5 > idProduct = 0x6501 > bcdDevice = 0x0000 > iManufacturer = 0x0001 > iProduct = 0x0002 > iSerialNumber = 0x0000 This is interesting: > bNumConfigurations = 0x0001 The device says it only has one configuration! So setting index 1 should not be allowed. Could you try to change the check in the ubsa2.c probe routine to check for config index 0 instead? Mostly config index 0 is used in USB devices. %cat *[ch] | grep -i "config.*Index" #define U3G_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != U3G_CONFIG_INDEX) { #define UARK_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != 0) { #define UBSA_CONFIG_INDEX 1 if (uaa->info.bConfigIndex != UBSA_CONFIG_INDEX) { #define UCHCOM_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UCHCOM_CONFIG_INDEX) { if (uaa->info.bConfigIndex != 0) { #define UFTDI_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UFTDI_CONFIG_INDEX) { #define UGENSA_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UGENSA_CONFIG_INDEX) { #define UIPAQ_CONFIG_INDEX 0 /* config number 1 */ if (uaa->info.bConfigIndex != UIPAQ_CONFIG_INDEX) { "config number: %d\n", alt_index); #define UMCT_CONFIG_INDEX 1 if (uaa->info.bConfigIndex != UMCT_CONFIG_INDEX) { #define UMOSCOM_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UMOSCOM_CONFIG_INDEX) { #define UPLCOM_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UPLCOM_CONFIG_INDEX) { #define UVISOR_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UVISOR_CONFIG_INDEX) { #define UVSCOM_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UVSCOM_CONFIG_INDEX) { Try changing "UBSA_CONFIG_INDEX" to zero. If it works I will commit a patch for this. > > Configuration index 1 > > bLength = 0x0009 > bDescriptorType = 0x0002 > wTotalLength = 0x003e > bNumInterfaces = 0x0002 > bConfigurationValue = 0x0001 > iConfiguration = 0x0000 > bmAttributes = 0x00a0 > bMaxPower = 0x00fa > > Interface 0 > bLength = 0x0009 > bDescriptorType = 0x0004 > bInterfaceNumber = 0x0000 > bAlternateSetting = 0x0000 > bNumEndpoints = 0x0003 > bInterfaceClass = 0x00ff > bInterfaceSubClass = 0x00ff > bInterfaceProtocol = 0x00ff > iInterface = 0x0003 When you cannot retrive the strings, I think your device is gone! (Crashed) --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 16:58:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D3FB106564A for ; Tue, 6 Jan 2009 16:58:42 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id EC3C38FC29 for ; Tue, 6 Jan 2009 16:58:41 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id CE7278FC53 for ; Tue, 6 Jan 2009 19:58:40 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 2DFB18FC18; Tue, 6 Jan 2009 19:58:36 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id CDB90398F3; Tue, 6 Jan 2009 20:01:03 +0300 (MSK) Date: Tue, 6 Jan 2009 20:01:03 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106200103.26f2b5a9.stas@FreeBSD.org> In-Reply-To: <200901061751.27394.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061613.33687.hselasky@c2i.net> <20090106193844.c727cfb7.stas@FreeBSD.org> <200901061751.27394.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 19:58:40 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 49638dc0967001363314401 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:58:43 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 17:51:26 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > On Tue, 6 Jan 2009 16:13:32 +0100 > > > > Hans Petter Selasky mentioned: > > > Try: > > > > > > usbconfig -u 0 -a 2 set_config 1 > > > > This helps. Now ubsa attaches to the device. But I can't communicate > > with it (no echo even). I see the following messages in the log: > > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > > > > > You can for example add a quirk for this, see "usbconfig -h | grep -i > > > quirk". I know this is not so easy, but if you can make a general rule > > > for when selecting another configuration, I will add it. > > > > Why not let the driver to set the config? > > Because: > > 1) it clashes with USB device side mode, where the config index is received > from Host > > 2) Different device drivers might want different configurations. > > 3) The driver for the active configuration might not be loaded. > I see. > This is interesting: > > bNumConfigurations = 0x0001 > > The device says it only has one configuration! So setting index 1 should not > be allowed. > > Could you try to change the check in the ubsa2.c probe routine to check for > config index 0 instead? > It attaches but doesn't work with the same error message as listed above. > > iInterface = 0x0003 > > When you cannot retrive the strings, I think your device is gone! (Crashed) So at this point the device is effectively detached? Do you have ideas why that might happen. I don't also understand how it may work with config index 1 on old stack if the maximum number of configurations is 1 too... Looks weird. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljjk8ACgkQK/VZk+smlYHhagCdFvM/p9fLTQL5A3manV/wq72h 2hQAniOi0FidMBaVHkcFZybsT832ivtz =HPtC -----END PGP SIGNATURE----- !DSPAM:49638dc0967001363314401! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 17:21:14 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 489FB106566B; Tue, 6 Jan 2009 17:21:14 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.tele2.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id EDFBC8FC1A; Tue, 6 Jan 2009 17:21:12 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Lcuq5n9lQ50A:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=BgEwljOxvJJA3K97OGEA:9 a=wtgyqGEEd_kUbc-JDdMA:7 a=OAKkXXBgVJ-EBx0yoi5eOTq0s1cA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1003439231; Tue, 06 Jan 2009 18:21:11 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 18:23:33 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061751.27394.hselasky@c2i.net> <20090106200103.26f2b5a9.stas@FreeBSD.org> In-Reply-To: <20090106200103.26f2b5a9.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061823.34415.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 17:21:14 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 17:51:26 +0100 > > Hans Petter Selasky mentioned: > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > On Tue, 6 Jan 2009 16:13:32 +0100 > > > > > > Hans Petter Selasky mentioned: > > > > Try: > > > > > > > > usbconfig -u 0 -a 2 set_config 1 > > > > > > This helps. Now ubsa attaches to the device. But I can't communicate > > > with it (no echo even). I see the following messages in the log: > > > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED > > > (ignored) ubsa_cfg_request:395: device request failed, > > > err=USB_ERR_STALLED (ignored) ubsa_cfg_request:395: device request > > > failed, err=USB_ERR_STALLED (ignored) > > > > > > > You can for example add a quirk for this, see "usbconfig -h | grep -i > > > > quirk". I know this is not so easy, but if you can make a general > > > > rule for when selecting another configuration, I will add it. > > > > > > Why not let the driver to set the config? > > > > Because: > > > > 1) it clashes with USB device side mode, where the config index is > > received from Host > > > > 2) Different device drivers might want different configurations. > > > > 3) The driver for the active configuration might not be loaded. > > I see. > > > This is interesting: > > > bNumConfigurations = 0x0001 > > > > The device says it only has one configuration! So setting index 1 should > > not be allowed. > > > > Could you try to change the check in the ubsa2.c probe routine to check > > for config index 0 instead? > > It attaches but doesn't work with the same error message as listed above. > > > > iInterface = 0x0003 > > > > When you cannot retrive the strings, I think your device is gone! > > (Crashed) > > So at this point the device is effectively detached? Do you have ideas why > that might happen. I don't also understand how it may work with config > index 1 on old stack if the maximum number of configurations is 1 too... > Looks weird. Hi, Some checkpoints: 1) You removed the config index 1 quirk? 2) You re-plugged the module and let it stay disconnected for some seconds? You can reach the endpoints through ugen when config index 0 is set. cat /dev/ugen0.2.0.1 echo "at" > /dev/ugen0.2.0.2 If you are lucky you will get something back. --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 17:23:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D01011065673; Tue, 6 Jan 2009 17:23:37 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDEC68FC14; Tue, 6 Jan 2009 17:23:37 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06HNbLV037295; Tue, 6 Jan 2009 17:23:37 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06HNbgY037287; Tue, 6 Jan 2009 17:23:37 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200901061723.n06HNbgY037287@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 6 Jan 2009 17:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186833 - head/sys/dev/iicbus X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 17:23:38 -0000 Author: nwhitehorn Date: Tue Jan 6 17:23:37 2009 New Revision: 186833 URL: http://svn.freebsd.org/changeset/base/186833 Log: Change the way I2C bus attachment works to allow firmware-assisted bus subclasses as are available with PCI. Changes I2C device drivers without real probe logic to return BUS_PROBE_NOWILDWARD to avoid interference with firmware bus enumeration, and reduces the probe priority of the iicbus base driver to allow subclass attachment at higher priority. Discussed on: freebsd-arch Modified: head/sys/dev/iicbus/ad7418.c head/sys/dev/iicbus/ds1672.c head/sys/dev/iicbus/icee.c head/sys/dev/iicbus/if_ic.c head/sys/dev/iicbus/iic.c head/sys/dev/iicbus/iicbus.c head/sys/dev/iicbus/iicsmb.c Modified: head/sys/dev/iicbus/ad7418.c ============================================================================== --- head/sys/dev/iicbus/ad7418.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/ad7418.c Tue Jan 6 17:23:37 2009 (r186833) @@ -82,7 +82,7 @@ ad7418_probe(device_t dev) { /* XXX really probe? */ device_set_desc(dev, "Analog Devices AD7418 ADC"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: head/sys/dev/iicbus/ds1672.c ============================================================================== --- head/sys/dev/iicbus/ds1672.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/ds1672.c Tue Jan 6 17:23:37 2009 (r186833) @@ -61,7 +61,7 @@ ds1672_probe(device_t dev) { /* XXX really probe? */ device_set_desc(dev, "Dallas Semiconductor DS1672 RTC"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: head/sys/dev/iicbus/icee.c ============================================================================== --- head/sys/dev/iicbus/icee.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/icee.c Tue Jan 6 17:23:37 2009 (r186833) @@ -86,7 +86,7 @@ icee_probe(device_t dev) { /* XXX really probe? -- not until we know the size... */ device_set_desc(dev, "I2C EEPROM"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: head/sys/dev/iicbus/if_ic.c ============================================================================== --- head/sys/dev/iicbus/if_ic.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/if_ic.c Tue Jan 6 17:23:37 2009 (r186833) @@ -153,7 +153,7 @@ ic_alloc_buffers(struct ic_softc *sc, in static int icprobe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } /* Modified: head/sys/dev/iicbus/iic.c ============================================================================== --- head/sys/dev/iicbus/iic.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/iic.c Tue Jan 6 17:23:37 2009 (r186833) @@ -110,14 +110,14 @@ iic_identify(driver_t *driver, device_t { if (device_find_child(parent, "iic", -1) == NULL) - BUS_ADD_CHILD(parent, 0, "iic", -1); + BUS_ADD_CHILD(parent, 0, "iic", 0); } static int iic_probe(device_t dev) { device_set_desc(dev, "I2C generic I/O"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: head/sys/dev/iicbus/iicbus.c ============================================================================== --- head/sys/dev/iicbus/iicbus.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/iicbus.c Tue Jan 6 17:23:37 2009 (r186833) @@ -53,7 +53,9 @@ iicbus_probe(device_t dev) { device_set_desc(dev, "Philips I2C bus"); - return (0); + + /* Allow other subclasses to override this driver. */ + return (-1000); } #if SCAN_IICBUS Modified: head/sys/dev/iicbus/iicsmb.c ============================================================================== --- head/sys/dev/iicbus/iicsmb.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/iicsmb.c Tue Jan 6 17:23:37 2009 (r186833) @@ -149,7 +149,7 @@ static int iicsmb_probe(device_t dev) { device_set_desc(dev, "SMBus over I2C bridge"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 17:58:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B864C106567A for ; Tue, 6 Jan 2009 17:58:05 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id ECEFB8FC1D for ; Tue, 6 Jan 2009 17:58:04 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 02ECD8FC4F for ; Tue, 6 Jan 2009 20:58:03 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 576238FC4E; Tue, 6 Jan 2009 20:58:00 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id D33BF398F3; Tue, 6 Jan 2009 21:00:23 +0300 (MSK) Date: Tue, 6 Jan 2009 21:00:19 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106210019.a517ff3f.stas@FreeBSD.org> In-Reply-To: <200901061823.34415.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061751.27394.hselasky@c2i.net> <20090106200103.26f2b5a9.stas@FreeBSD.org> <200901061823.34415.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 20:58:03 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 49639bab967001389555047 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 17:58:06 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 18:23:33 +0100 Hans Petter Selasky mentioned: > > So at this point the device is effectively detached? Do you have ideas why > > that might happen. I don't also understand how it may work with config > > index 1 on old stack if the maximum number of configurations is 1 too... > > Looks weird. > BTW, it seems that device really uses the config index 0. I checked with the old stack and it seems that setting cfg index to 1 effectively does nothing, though doesn't fail. Old ubsa continues to work even with configuration index 0, so I think it worth to change it to 0. At least, for my device - cfg index=1 is incorrect, though works. > 1) You removed the config index 1 quirk? Which quirk are you talking about? I changed default index to 0 in ubsa2.c. > 2) You re-plugged the module and let it stay disconnected for some seconds? > Yes. > You can reach the endpoints through ugen when config index 0 is set. > > cat /dev/ugen0.2.0.1 > > echo "at" > /dev/ugen0.2.0.2 > I don't receive anything back... Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljnDcACgkQK/VZk+smlYEX8gCbBxiPkJb+lPRud28J06A9JP3N ogkAoIKGUY06LirvAlaJNRZs2tfyyvZW =YlnA -----END PGP SIGNATURE----- !DSPAM:49639bab967001389555047! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 18:10:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 915AB1065773; Tue, 6 Jan 2009 18:10:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FC328FC22; Tue, 6 Jan 2009 18:10:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06IAHfP038207; Tue, 6 Jan 2009 18:10:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06IAH3c038206; Tue, 6 Jan 2009 18:10:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901061810.n06IAH3c038206@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 6 Jan 2009 18:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186834 - head/lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:10:18 -0000 Author: bz Date: Tue Jan 6 18:10:17 2009 New Revision: 186834 URL: http://svn.freebsd.org/changeset/base/186834 Log: Document the special loopback address behaviour of jails. PR: kern/103464 Submitted by: brueffer (correct markup) Reviewed by: brueffer MFC after: 2 weeks Modified: head/lib/libc/sys/jail.2 Modified: head/lib/libc/sys/jail.2 ============================================================================== --- head/lib/libc/sys/jail.2 Tue Jan 6 17:23:37 2009 (r186833) +++ head/lib/libc/sys/jail.2 Tue Jan 6 18:10:17 2009 (r186834) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2008 +.Dd January 6, 2009 .Dt JAIL 2 .Os .Sh NAME @@ -118,6 +118,12 @@ or, if present, the per-jail .Pp All IP activity will be forced to happen to/from the IP number specified, which should be an alias on one of the network interfaces. +All connections to/from the loopback address +.Pf ( Li 127.0.0.1 +for IPv4, +.Li ::1 +for IPv6) will be changed to be to/from the primary address +of the jail for the given address family. .Pp It is possible to identify a process as jailed by examining .Dq Li /proc//status : From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 18:12:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1A0D10656DF for ; Tue, 6 Jan 2009 18:12:58 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 4D3128FC23 for ; Tue, 6 Jan 2009 18:12:58 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 635C88FC53 for ; Tue, 6 Jan 2009 21:12:57 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 6382F8FC18; Tue, 6 Jan 2009 21:12:53 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 48D52398F3; Tue, 6 Jan 2009 21:15:20 +0300 (MSK) Date: Tue, 6 Jan 2009 21:15:20 +0300 From: Stanislav Sedov To: Stanislav Sedov Message-Id: <20090106211520.27e695c6.stas@FreeBSD.org> In-Reply-To: <20090106210019.a517ff3f.stas@FreeBSD.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061751.27394.hselasky@c2i.net> <20090106200103.26f2b5a9.stas@FreeBSD.org> <200901061823.34415.hselasky@c2i.net> <20090106210019.a517ff3f.stas@FreeBSD.org> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 21:12:57 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 49639f29967003387433068 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , Hans Petter Selasky , Stanislav Sedov , svn-src-head@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:12:59 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 21:00:19 +0300 Stanislav Sedov mentioned: > > You can reach the endpoints through ugen when config index 0 is set. > > > > cat /dev/ugen0.2.0.1 > > > > echo "at" > /dev/ugen0.2.0.2 > > > > I don't receive anything back... > Hmm, it seems that I have the same problem with plain uplcom. It attaches but doesn't work. Log shows: uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) Have you seen this before? Any ideas? Usbconfig reset doesn't help. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljn7gACgkQK/VZk+smlYHSygCeOnjuAh4Q0xfqzj3IivW4GM2P imEAnjM3kUl732l3Ri7IWsIClHPuLAkw =g3YO -----END PGP SIGNATURE----- !DSPAM:49639f29967003387433068! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 18:15:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D55E106564A; Tue, 6 Jan 2009 18:15:09 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe15.swipnet.se [212.247.155.193]) by mx1.freebsd.org (Postfix) with ESMTP id 3215A8FC19; Tue, 6 Jan 2009 18:15:08 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=zU2_IFj2hz0A:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=0kqcLAFk_B0cgyMVJFMA:9 a=sDgvBcLyHOYrhHA-oZGKouCR2yMA:4 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe15.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 430273762; Tue, 06 Jan 2009 19:15:06 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 19:17:28 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106210019.a517ff3f.stas@FreeBSD.org> <20090106211520.27e695c6.stas@FreeBSD.org> In-Reply-To: <20090106211520.27e695c6.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061917.29305.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:15:09 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 21:00:19 +0300 > > Stanislav Sedov mentioned: > > > You can reach the endpoints through ugen when config index 0 is set. > > > > > > cat /dev/ugen0.2.0.1 > > > > > > echo "at" > /dev/ugen0.2.0.2 > > > > I don't receive anything back... > What platform are you using, what Host Controller, amount of memory? --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 18:21:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7153A106566C for ; Tue, 6 Jan 2009 18:21:57 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 1E4DF8FC18 for ; Tue, 6 Jan 2009 18:21:57 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 8DC538FC4E for ; Tue, 6 Jan 2009 21:21:56 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id DB9CA8FC18; Tue, 6 Jan 2009 21:21:52 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 77ECA398F3; Tue, 6 Jan 2009 21:24:20 +0300 (MSK) Date: Tue, 6 Jan 2009 21:24:20 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106212420.b59adb99.stas@FreeBSD.org> In-Reply-To: <200901061917.29305.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106210019.a517ff3f.stas@FreeBSD.org> <20090106211520.27e695c6.stas@FreeBSD.org> <200901061917.29305.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 21:21:56 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963a144967001662357114 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:21:57 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 19:17:28 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > On Tue, 6 Jan 2009 21:00:19 +0300 > > > > Stanislav Sedov mentioned: > > > > You can reach the endpoints through ugen when config index 0 is set. > > > > > > > > cat /dev/ugen0.2.0.1 > > > > > > > > echo "at" > /dev/ugen0.2.0.2 > > > > > > I don't receive anything back... > > > > What platform are you using, what Host Controller, amount of memory? > amd64, Intel ICH9, 2x2G You can see full dmesg here: http://www.SpringDaemons.com/stas/dmesg - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljodQACgkQK/VZk+smlYF/XgCeNmm7TVENyiv/Tc5EZOdTS3uS JAIAn2xPZMvxUMyRguUi+/kafSVvwB1P =c3ko -----END PGP SIGNATURE----- !DSPAM:4963a144967001662357114! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 18:25:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7836F106566C; Tue, 6 Jan 2009 18:25:46 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.tele2.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id 479678FC1F; Tue, 6 Jan 2009 18:25:44 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=reCBf_VVjwMA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=F-Y6h51ZAAAA:8 a=Hi8v3RRKxCrs62WSawAA:9 a=TgBnTuWs9GMYdguBnB3_WdqctmUA:4 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1006659344; Tue, 06 Jan 2009 19:25:40 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 19:28:02 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061917.29305.hselasky@c2i.net> <20090106212420.b59adb99.stas@FreeBSD.org> In-Reply-To: <20090106212420.b59adb99.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061928.03420.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:25:47 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > http://www.SpringDaemons.com/stas/dmesg Dmesg looks fine. Do you have the same for USB2? Are any other USB devices working at the same USB speed like the ones that fail ? --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 18:32:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A566F106566B; Tue, 6 Jan 2009 18:32:03 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swip.net [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id 782018FC1B; Tue, 6 Jan 2009 18:32:02 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=TIVv8n4V54cA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=6I5d2MoRAAAA:8 a=I6hRJrGC8jS7Moei41wA:9 a=8PqTdrXmHC9HdEaaXrsA:7 a=r_a9kZzfaPVQKl8JrGDj8c0uif8A:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 433583212; Tue, 06 Jan 2009 19:32:00 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 19:34:23 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061823.34415.hselasky@c2i.net> <20090106210019.a517ff3f.stas@FreeBSD.org> In-Reply-To: <20090106210019.a517ff3f.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061934.23915.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:32:04 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 18:23:33 +0100 > > Hans Petter Selasky mentioned: > > > So at this point the device is effectively detached? Do you have ideas > > > why that might happen. I don't also understand how it may work with > > > config index 1 on old stack if the maximum number of configurations is > > > 1 too... Looks weird. > I've changed ubsa to use config index 0. Will be committed to -current early next week, hence I am accumulating patches. http://perforce.freebsd.org/chv.cgi?CH=155730 --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 18:49:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39E14106566C for ; Tue, 6 Jan 2009 18:49:23 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id CCF268FC1A for ; Tue, 6 Jan 2009 18:49:22 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id AB5708FC53 for ; Tue, 6 Jan 2009 21:49:21 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 6AE4E8FC18; Tue, 6 Jan 2009 21:49:17 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 89B683996C; Tue, 6 Jan 2009 21:51:44 +0300 (MSK) Date: Tue, 6 Jan 2009 21:51:39 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106215139.3bde5a63.stas@FreeBSD.org> In-Reply-To: <200901061928.03420.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061917.29305.hselasky@c2i.net> <20090106212420.b59adb99.stas@FreeBSD.org> <200901061928.03420.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Tue Jan 6 21:49:20 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963a7b0967002515839542 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:49:23 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 19:28:02 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > http://www.SpringDaemons.com/stas/dmesg > > Dmesg looks fine. Do you have the same for USB2? > Sure. Take it there: http://www.SpringDaemons.com/stas/dmesg It also contains some uplcom and ubsa debug messages from the previous run. Ignore E0/E1/etc - these is my debug output from ubsa. > Are any other USB devices working at the same USB speed like the ones that > fail ? > It seems that all high-speed and low-speed devices I have work fine. Both uplcom and ubsa are working at the full-speed, and both fail. I also have the Morotola cell phone operating as a full-speed umodem(4) controlled modem - it works just fine with the new stack. All ports on my motherboard behaves the same way, so it seems it is not a port problem. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljqEAACgkQK/VZk+smlYEfzQCfYPELIwl+dxdvTFU0Wj5DRwBn BVcAn0p/DgjZFKplcQJRhtzPumKJkCII =9dcG -----END PGP SIGNATURE----- !DSPAM:4963a7b0967002515839542! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 19:00:12 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB44B1065672; Tue, 6 Jan 2009 19:00:12 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B88858FC1D; Tue, 6 Jan 2009 19:00:12 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06J0CTh039200; Tue, 6 Jan 2009 19:00:12 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06J0CGZ039198; Tue, 6 Jan 2009 19:00:12 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <200901061900.n06J0CGZ039198@svn.freebsd.org> From: Florent Thoumie Date: Tue, 6 Jan 2009 19:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186835 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:00:13 -0000 Author: flz Date: Tue Jan 6 19:00:12 2009 New Revision: 186835 URL: http://svn.freebsd.org/changeset/base/186835 Log: - Backout latest changes (follow symlinks: r186496, r186518). - Bump PKG_INSTALL_VER to 20090106. Modified: head/usr.sbin/pkg_install/lib/lib.h head/usr.sbin/pkg_install/lib/plist.c Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Tue Jan 6 18:10:17 2009 (r186834) +++ head/usr.sbin/pkg_install/lib/lib.h Tue Jan 6 19:00:12 2009 (r186835) @@ -105,7 +105,7 @@ * Version of the package tools - increase only when some * functionality used by bsd.port.mk is changed, added or removed */ -#define PKG_INSTALL_VERSION 20081227 +#define PKG_INSTALL_VERSION 20090106 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: head/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- head/usr.sbin/pkg_install/lib/plist.c Tue Jan 6 18:10:17 2009 (r186834) +++ head/usr.sbin/pkg_install/lib/plist.c Tue Jan 6 19:00:12 2009 (r186835) @@ -544,82 +544,45 @@ delete_package(Boolean ign_err, Boolean int delete_hierarchy(const char *dir, Boolean ign_err, Boolean nukedirs) { - char *cp1, *cp2, realdir[FILENAME_MAX]; + char *cp1, *cp2; - if (realdir == NULL) { - warnx("Couldn't allocate enough memory\n"); - return (ign_err ? SUCCESS : FAIL); - } - - if (issymlink(dir) && readlink(dir, realdir, FILENAME_MAX-1) == -1) - return (ign_err ? SUCCESS : FAIL); - - strlcpy(realdir, dir, FILENAME_MAX-1); - - cp1 = cp2 = strdup(realdir); - if (cp1 == NULL) { - warnx("Couldn't allocate enough memory\n"); - return (ign_err ? SUCCESS : FAIL); - } - - if (!fexists(realdir)) { + cp1 = cp2 = strdup(dir); + if (!fexists(dir)) { if (!ign_err) warnx("%s '%s' doesn't exist", - isdir(realdir) ? "directory" : "file", realdir); - free(cp1); - return (ign_err ? SUCCESS : FAIL); + isdir(dir) ? "directory" : "file", dir); + return !ign_err; } else if (nukedirs) { - if (vsystem("%s -r%s %s", REMOVE_CMD, (ign_err ? "f" : ""), realdir)) { - free(cp1); - return (ign_err ? SUCCESS : FAIL); - } + if (vsystem("%s -r%s %s", REMOVE_CMD, (ign_err ? "f" : ""), dir)) + return 1; } - else if (isdir(realdir)) { - if (RMDIR(realdir)) { - free(cp1); - return (ign_err ? SUCCESS : FAIL); - } + else if (isdir(dir) && !issymlink(dir)) { + if (RMDIR(dir) && !ign_err) + return 1; } else { - if (REMOVE(realdir, ign_err)) { - free(cp1); - return (ign_err ? SUCCESS : FAIL); - } + if (REMOVE(dir, ign_err)) + return 1; } - if (!nukedirs) { - free(cp1); - return (SUCCESS); - } + if (!nukedirs) + return 0; while (cp2) { if ((cp2 = strrchr(cp1, '/')) != NULL) *cp2 = '\0'; - if (!isemptydir(realdir)) { - free(cp1); - return (SUCCESS); - } - if (RMDIR(realdir) && !ign_err) { - if (!fexists(realdir)) { - warnx("directory '%s' doesn't exist", realdir); - free(cp1); - return (SUCCESS); - } else { - free(cp1); - return (FAIL); - } + if (!isemptydir(dir)) + return 0; + if (RMDIR(dir) && !ign_err) { + if (!fexists(dir)) + warnx("directory '%s' doesn't exist", dir); + else + return 1; } /* back up the pathname one component */ if (cp2) { - free(cp1); - cp1 = strdup(realdir); - if (cp1 == NULL) { - warnx("Couldn't allocate enough memory\n"); - return (ign_err ? SUCCESS : FAIL); - } + cp1 = strdup(dir); } } - free(cp1); - return (SUCCESS); + return 0; } - From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 19:02:31 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD0FF106566B; Tue, 6 Jan 2009 19:02:31 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swipnet.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id B80E08FC1E; Tue, 6 Jan 2009 19:02:30 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=qFwKWeLwAD0A:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=F-Y6h51ZAAAA:8 a=qS_koVNbs58QD22P39sA:9 a=qgdECkjNfmwmnTlbn2sA:7 a=CE2tia_AjStc4I2-656_pCMRke8A:4 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1003484237; Tue, 06 Jan 2009 20:02:29 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 20:04:51 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061928.03420.hselasky@c2i.net> <20090106215139.3bde5a63.stas@FreeBSD.org> In-Reply-To: <20090106215139.3bde5a63.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200901062004.51961.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:02:32 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > http://www.SpringDaemons.com/stas/dmesg =46rom the debug messages it might look like your device has a problem with= =20 clearing the stall. Try commenting out the following lines in "ubsa2.c": /* clear stall at first run */ sc->sc_flag |=3D (UBSA_FLAG_WRITE_STALL | UBSA_FLAG_READ_STALL); =2D-HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 19:05:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44F0710657C0; Tue, 6 Jan 2009 19:05:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id EF3C18FC19; Tue, 6 Jan 2009 19:05:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 3022041C711; Tue, 6 Jan 2009 20:05:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id e2k9dxa3S3C3; Tue, 6 Jan 2009 20:05:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id D317D41C710; Tue, 6 Jan 2009 20:05:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 421874448DD; Tue, 6 Jan 2009 19:04:26 +0000 (UTC) Date: Tue, 6 Jan 2009 19:04:25 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Luigi Rizzo In-Reply-To: <200901052009.n05K9soF009621@svn.freebsd.org> Message-ID: <20090106190220.I45399@maildrop.int.zabbadoz.net> References: <200901052009.n05K9soF009621@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186789 - head/sys/boot/forth X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:05:07 -0000 On Mon, 5 Jan 2009, Luigi Rizzo wrote: > Author: luigi > Date: Mon Jan 5 20:09:54 2009 > New Revision: 186789 > URL: http://svn.freebsd.org/changeset/base/186789 > > Log: > This patch introduces a number of simplifications to the Forth > functions used in the bootloader. The goal is to make the code more > readable and smaller (especially because we have size issues > in the loader's environment). ... It's waay to chatty now... I guess some debug stuff slipped in? -- starting on get_file_name has /boot/defaults/loader.conf ----- Trying conf /boot/defaults/loader.conf Loading /boot/defaults/loader.conf -- starting on get_file_name has /boot/device.hints ----- Trying conf /boot/device.hints get_file_name has /boot/loader.conf ----- Trying conf /boot/loader.conf ;get_file_name has /boot/loader.conf.local ----- Trying conf /boot/loader.conf.local -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 19:17:51 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74F7C1065672 for ; Tue, 6 Jan 2009 19:17:51 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 08D808FC26 for ; Tue, 6 Jan 2009 19:17:51 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 21105 invoked by uid 399); 6 Jan 2009 19:17:50 -0000 Received: from localhost (HELO ?192.168.0.4?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 6 Jan 2009 19:17:50 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4963AE5B.8040002@FreeBSD.org> Date: Tue, 06 Jan 2009 11:17:47 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: obrien@FreeBSD.org References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <18782.40912.247441.716938@hergotha.csail.mit.edu> <49628DD3.8020901@FreeBSD.org> <20090106164052.GC75326@dragon.NUXI.org> In-Reply-To: <20090106164052.GC75326@dragon.NUXI.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:17:52 -0000 David O'Brien wrote: > On Mon, Jan 05, 2009 at 02:46:43PM -0800, Doug Barton wrote: >> A few more specifics in no particular order: > .. >> You don't have to page through the whole diff if you use less as your PAGER. > > You do thought have to hit 'q' don't you? Only if you are not using the -U option (or if there are differences in a file where you have local edits). >> Matt Dillon's change to the PAGER was the single thing I got the most >> user complaints about. > > :-( I know I saw others say in email they liked it better... a > ~/.mergemasterrc knob would be nice. :-) /me waves his magic wand ..... voila! Put PAGER in your mergemaster rc file and it will work for you. (I'm guessing you haven't actually tried it ...) Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 19:25:24 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 572F4106566B; Tue, 6 Jan 2009 19:25:24 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45B378FC20; Tue, 6 Jan 2009 19:25:24 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06JPObI039879; Tue, 6 Jan 2009 19:25:24 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06JPO2D039878; Tue, 6 Jan 2009 19:25:24 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200901061925.n06JPO2D039878@svn.freebsd.org> From: Colin Percival Date: Tue, 6 Jan 2009 19:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186836 - head/sbin/md5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:25:24 -0000 Author: cperciva Date: Tue Jan 6 19:25:24 2009 New Revision: 186836 URL: http://svn.freebsd.org/changeset/base/186836 Log: Strengthen some of the language concerning attacks on MD5, in light of the recent demonstration of a forged SSL certificate. Add text pointing out that SHA-1 is at least theoretically broken. Add a recommendation that new applications use SHA-256. MFC after: 1 month Modified: head/sbin/md5/md5.1 Modified: head/sbin/md5/md5.1 ============================================================================== --- head/sbin/md5/md5.1 Tue Jan 6 19:00:12 2009 (r186835) +++ head/sbin/md5/md5.1 Tue Jan 6 19:25:24 2009 (r186836) @@ -49,15 +49,23 @@ key under a public-key cryptosystem such .Tn RSA . .Pp .Tn MD5 -has not yet (2007-03-05) been broken, but sufficient attacks have been -made that its security is in some doubt. -The attacks on +has been completely broken as far as finding collisions is +concerned, and should not be relied upon to produce unique outputs. +This also means that .Tn MD5 -are in the nature of finding -.Dq collisions -\(em that is, multiple -inputs which hash to the same value; it is still unlikely for an attacker -to be able to determine the exact original input given a hash value. +should not be used as part of a cryptographic signature scheme. +At the current time (2009-01-06) there is no publicly known method to +"reverse" MD5, i.e., to find an input given a hash value. +.Pp +.Tn SHA-1 +currently (2009-01-06) has no known collisions, but an attack has been +found which is faster than a brute-force search, placing the security of +.Tn SHA-1 +in doubt. +.Pp +It is recommended that all new applications use +.Tn SHA-256 +instead of one of the other hash functions. .Pp The following options may be used in any combination and must precede any files named on the command line. From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 19:33:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0952106568D for ; Tue, 6 Jan 2009 19:33:47 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 61FB58FC1A for ; Tue, 6 Jan 2009 19:33:47 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 423B08FC53 for ; Tue, 6 Jan 2009 22:33:46 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 2C0CA8FC18; Tue, 6 Jan 2009 22:33:42 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 51CC43996C; Tue, 6 Jan 2009 22:36:09 +0300 (MSK) Date: Tue, 6 Jan 2009 22:36:04 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106223604.ad706b69.stas@FreeBSD.org> In-Reply-To: <200901062004.51961.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061928.03420.hselasky@c2i.net> <20090106215139.3bde5a63.stas@FreeBSD.org> <200901062004.51961.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Tue Jan 6 22:33:45 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963b219967001771758939 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:33:48 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 20:04:51 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > http://www.SpringDaemons.com/stas/dmesg > > From the debug messages it might look like your device has a problem with > clearing the stall. Try commenting out the following lines in "ubsa2.c": > > /* clear stall at first run */ > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > UBSA_FLAG_READ_STALL); This doesn't affect anything. :-( BTW, sometime I see the following after plugging in the module: usb2_alloc_device:1458: getting device descriptor at addr 2 failed! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! uhub_reattach_port:417: could not allocate new device! and the device doesn't attach. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljsqkACgkQK/VZk+smlYFiPQCfXA056TdBXufM73tpozglxoHM 5u0An01cctctO5srXoo//dxeBqa4pAOM =+xve -----END PGP SIGNATURE----- !DSPAM:4963b219967001771758939! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 19:41:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A1171065675; Tue, 6 Jan 2009 19:41:05 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 2402E8FC29; Tue, 6 Jan 2009 19:41:03 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=f5Rk4X9yzsQA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=F-Y6h51ZAAAA:8 a=9x5dnzHiO3eVplxSM60A:9 a=v7yQg19w3QerdMeJbyAA:7 a=sq_I_DTHMld0pAaR46Ge8UC3H2EA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1179024635; Tue, 06 Jan 2009 20:41:02 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 20:43:19 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901062004.51961.hselasky@c2i.net> <20090106223604.ad706b69.stas@FreeBSD.org> In-Reply-To: <20090106223604.ad706b69.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901062043.20696.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:41:06 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 20:04:51 +0100 > > Hans Petter Selasky mentioned: > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > http://www.SpringDaemons.com/stas/dmesg > > > > From the debug messages it might look like your device has a problem with > > clearing the stall. Try commenting out the following lines in "ubsa2.c": > > > > /* clear stall at first run */ > > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > > UBSA_FLAG_READ_STALL); > > This doesn't affect anything. :-( > > BTW, sometime I see the following after plugging in the module: In the function "ubsa_cfg_request": Try: 1) Always return - no requests: Do you get AT+OK back on the modem channel? 2) Add pause("DLY", hz / 10); in that function. --HPS > > usb2_alloc_device:1458: getting device descriptor at addr 2 failed! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > uhub_reattach_port:417: could not allocate new device! > > and the device doesn't attach. From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 19:54:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF4CB106570D for ; Tue, 6 Jan 2009 19:54:09 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 4C8D58FC26 for ; Tue, 6 Jan 2009 19:54:09 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 28B748FC53 for ; Tue, 6 Jan 2009 22:54:08 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 6A6DF8FC27; Tue, 6 Jan 2009 22:54:04 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id DD4E23996C; Tue, 6 Jan 2009 22:56:28 +0300 (MSK) Date: Tue, 6 Jan 2009 22:56:28 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106225628.2c8fdc28.stas@FreeBSD.org> In-Reply-To: <200901062043.20696.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901062004.51961.hselasky@c2i.net> <20090106223604.ad706b69.stas@FreeBSD.org> <200901062043.20696.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Tue Jan 6 22:54:07 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963b6df967004835023868 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:54:12 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 20:43:19 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > On Tue, 6 Jan 2009 20:04:51 +0100 > > > > Hans Petter Selasky mentioned: > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > http://www.SpringDaemons.com/stas/dmesg > > > > > > From the debug messages it might look like your device has a problem with > > > clearing the stall. Try commenting out the following lines in "ubsa2.c": > > > > > > /* clear stall at first run */ > > > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > > > UBSA_FLAG_READ_STALL); > > > > This doesn't affect anything. :-( > > > > BTW, sometime I see the following after plugging in the module: > > In the function "ubsa_cfg_request": > > Try: > > 1) Always return - no requests: Do you get AT+OK back on the modem channel? This doesn't change anything. > 2) Add pause("DLY", hz / 10); in that function. > After this change the device began to work (that is I'm receiving replies for AT commands). However I can connect to it only once, after disconnecting "cu" I can communicate with it again only after device reset (or reattach). - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljt2wACgkQK/VZk+smlYFC9gCfQVlIWWSmmTW9Ji9rIBjPZDgM hOcAn15p0gTdm5zGXwbU4jdhBhsicXmD =MBND -----END PGP SIGNATURE----- !DSPAM:4963b6df967004835023868! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:01:54 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAF00106566C; Tue, 6 Jan 2009 20:01:54 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 7C4938FC1B; Tue, 6 Jan 2009 20:01:53 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=QwWaQ7pgnxYA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=F-Y6h51ZAAAA:8 a=62FAX-sNFUz4PeZK3J0A:9 a=RgWdw775qXAWmPfdS5MA:7 a=Jz0rIYrg1Y3LTUe37p9Hn5vqjRAA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1179032114; Tue, 06 Jan 2009 21:01:51 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 21:04:14 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901062043.20696.hselasky@c2i.net> <20090106225628.2c8fdc28.stas@FreeBSD.org> In-Reply-To: <20090106225628.2c8fdc28.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901062104.14919.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:01:55 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 20:43:19 +0100 > > Hans Petter Selasky mentioned: > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > On Tue, 6 Jan 2009 20:04:51 +0100 > > > > > > Hans Petter Selasky mentioned: > > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > > http://www.SpringDaemons.com/stas/dmesg > > > > > > > > From the debug messages it might look like your device has a problem > > > > with clearing the stall. Try commenting out the following lines in > > > > "ubsa2.c": > > > > > > > > /* clear stall at first run */ > > > > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > > > > UBSA_FLAG_READ_STALL); > > > > > > This doesn't affect anything. :-( > > > > > > BTW, sometime I see the following after plugging in the module: > > > > In the function "ubsa_cfg_request": > > > > Try: > > > > 1) Always return - no requests: Do you get AT+OK back on the modem > > channel? > > This doesn't change anything. > > > 2) Add pause("DLY", hz / 10); in that function. > > After this change the device began to work (that is I'm receiving > replies for AT commands). However I can connect to it only once, > after disconnecting "cu" I can communicate with it again only after > device reset (or reattach). Can you send me change 2) with debugging output? --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:20:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E8D0106564A for ; Tue, 6 Jan 2009 20:20:59 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id CCBB28FC16 for ; Tue, 6 Jan 2009 20:20:58 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id D47B28FC53 for ; Tue, 6 Jan 2009 23:20:57 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 1202A8FC18; Tue, 6 Jan 2009 23:20:54 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id B9DDC3996C; Tue, 6 Jan 2009 23:23:20 +0300 (MSK) Date: Tue, 6 Jan 2009 23:23:20 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106232320.a1492098.stas@FreeBSD.org> In-Reply-To: <200901062104.14919.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901062043.20696.hselasky@c2i.net> <20090106225628.2c8fdc28.stas@FreeBSD.org> <200901062104.14919.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Tue Jan 6 23:20:57 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963bd29967007587913496 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:21:00 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 21:04:14 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > On Tue, 6 Jan 2009 20:43:19 +0100 > > > > Hans Petter Selasky mentioned: > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > On Tue, 6 Jan 2009 20:04:51 +0100 > > > > > > > > Hans Petter Selasky mentioned: > > > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > > > http://www.SpringDaemons.com/stas/dmesg > > > > > > > > > > From the debug messages it might look like your device has a problem > > > > > with clearing the stall. Try commenting out the following lines in > > > > > "ubsa2.c": > > > > > > > > > > /* clear stall at first run */ > > > > > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > > > > > UBSA_FLAG_READ_STALL); > > > > > > > > This doesn't affect anything. :-( > > > > > > > > BTW, sometime I see the following after plugging in the module: > > > > > > In the function "ubsa_cfg_request": > > > > > > Try: > > > > > > 1) Always return - no requests: Do you get AT+OK back on the modem > > > channel? > > > > This doesn't change anything. > > > > > 2) Add pause("DLY", hz / 10); in that function. > > > > After this change the device began to work (that is I'm receiving > > replies for AT commands). However I can connect to it only once, > > after disconnecting "cu" I can communicate with it again only after > > device reset (or reattach). > > Can you send me change 2) with debugging output? Unfortunately, it stopped working for some reason. :-( Probably, I need to reboot. Anyway the change was like this: @@ -384,6 +390,8 @@ req.wIndex[1] = 0; USETW(req.wLength, 0); + pause("DLY", hz / 10); + err = usb2_do_request_flags (sc->sc_udev, &Giant, &req, NULL, 0, NULL, 1000); What kind of debugging info are you interested in? Should I enable hw.usb2.ubsa.debug? Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljvbgACgkQK/VZk+smlYHlGwCfWWaEjRyjT7D8eqGNPA+MrqMG yl0An3IgQwJ696yAvDxOjMFEY9ezenCn =ohdD -----END PGP SIGNATURE----- !DSPAM:4963bd29967007587913496! From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:21:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A6C31065686; Tue, 6 Jan 2009 20:21:56 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout013.mac.com (asmtpout013.mac.com [17.148.16.88]) by mx1.freebsd.org (Postfix) with ESMTP id E8DB38FC1D; Tue, 6 Jan 2009 20:21:55 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed Received: from lynx.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp013.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KD200ITUGKFPT20@asmtp013.mac.com>; Tue, 06 Jan 2009 12:21:52 -0800 (PST) Message-id: From: Marcel Moolenaar To: Marius Strobl In-reply-to: <200901061410.n06EABW2033159@svn.freebsd.org> Date: Tue, 06 Jan 2009 12:21:50 -0800 References: <200901061410.n06EABW2033159@svn.freebsd.org> X-Mailer: Apple Mail (2.930.3) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186823 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:21:56 -0000 On Jan 6, 2009, at 6:10 AM, Marius Strobl wrote: > Author: marius > Date: Tue Jan 6 14:10:10 2009 > New Revision: 186823 > URL: http://svn.freebsd.org/changeset/base/186823 > > Log: > - Don't enforce an upper-bound to the number of sectors or heads, > allowing the full 16-bit width of the corresponding fields in the > VTOC8 label to be used. The removed limits basically only held > true for providers labeled using the synthetic geometry provided > by cam_calc_geometry(9) but neither SCSI disks labeled with Solaris > nor sufficiently large ATA disks. > - Given that providers (originally) labeled with Solaris typically > use the native geometry as reported by the target while FreeBSD > typically uses a synthetic one put the message complaining about > mismatching geometries between what the label indicates and what > GEOM thinks the provider has, which we generally can't help, > under bootverbose in order to not unnecessarily scare users. > - For informational purposes add the non-matching values to the > message complaining about them, similar to what r186501 did for > g_part_bsd_read() except also indicating the origin of the > values. > - Make it clear that the messages emitted by this code refer to > the VTOC8 support rather than to another existing scheme or to > VTOC32. Thanks! -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:23:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D993C1065670; Tue, 6 Jan 2009 20:23:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id 7B5868FC08; Tue, 6 Jan 2009 20:23:16 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=GDlzLHxCoWoA:10 a=tgiRRak4JjAA:10 a=nklthdr5v5AUSfVrlghuJA==:17 a=F-Y6h51ZAAAA:8 a=RNqYidxoasWGO47mH-IA:9 a=fuaRsuBzg8i7HqludkUA:7 a=BZ2XMUk8AI9YOKFhnPo7SxCN8-4A:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.113.132.62] (account mc467741@c2i.net [62.113.132.62] verified) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1176617209; Tue, 06 Jan 2009 21:23:14 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 21:25:25 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901062104.14919.hselasky@c2i.net> <20090106232320.a1492098.stas@FreeBSD.org> In-Reply-To: <20090106232320.a1492098.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901062125.27685.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:23:18 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 21:04:14 +0100 > > Hans Petter Selasky mentioned: > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > On Tue, 6 Jan 2009 20:43:19 +0100 > > > > > > Hans Petter Selasky mentioned: > > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > > On Tue, 6 Jan 2009 20:04:51 +0100 > > > > > > > > > > Hans Petter Selasky mentioned: > > > > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > > > > http://www.SpringDaemons.com/stas/dmesg > > > > > > > > > > > > From the debug messages it might look like your device has a > > > > > > problem with clearing the stall. Try commenting out the following > > > > > > lines in "ubsa2.c": > > > > > > > > > > > > /* clear stall at first run */ > > > > > > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > > > > > > UBSA_FLAG_READ_STALL); > > > > > > > > > > This doesn't affect anything. :-( > > > > > > > > > > BTW, sometime I see the following after plugging in the module: > > > > > > > > In the function "ubsa_cfg_request": > > > > > > > > Try: > > > > > > > > 1) Always return - no requests: Do you get AT+OK back on the modem > > > > channel? > > > > > > This doesn't change anything. > > > > > > > 2) Add pause("DLY", hz / 10); in that function. > > > > > > After this change the device began to work (that is I'm receiving > > > replies for AT commands). However I can connect to it only once, > > > after disconnecting "cu" I can communicate with it again only after > > > device reset (or reattach). > > > > Can you send me change 2) with debugging output? > > Unfortunately, it stopped working for some reason. :-( Probably, I need > to reboot. Anyway the change was like this: > @@ -384,6 +390,8 @@ > req.wIndex[1] = 0; > USETW(req.wLength, 0); > > + pause("DLY", hz / 10); > + > err = usb2_do_request_flags > (sc->sc_udev, &Giant, &req, NULL, 0, NULL, 1000); > > What kind of debugging info are you interested in? Should I enable > hw.usb2.ubsa.debug? Yes, only ubsa debugging. --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:57:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB099106566B; Tue, 6 Jan 2009 20:57:01 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A8EA48FC1F; Tue, 6 Jan 2009 20:57:01 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n06KtLlF039586; Tue, 6 Jan 2009 13:55:22 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 06 Jan 2009 13:55:34 -0700 (MST) Message-Id: <20090106.135534.742957024.imp@bsdimp.com> To: christoph.mallon@gmx.de From: "M. Warner Losh" In-Reply-To: <49627592.60208@gmx.de> References: <20090105194210.P45399@maildrop.int.zabbadoz.net> <20090105204356.GA52934@troutmask.apl.washington.edu> <49627592.60208@gmx.de> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, bz@freebsd.org, src-committers@freebsd.org, sgk@troutmask.apl.washington.edu Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:57:02 -0000 In message: <49627592.60208@gmx.de> Christoph Mallon writes: : Steve Kargl schrieb: : > Stylistic changes (including whitespace changes) are hard on : > the source repository and are to be avoided without good reason. : : Yet another anachronism in style(9). : (Does that sentence even mean what I think it means? Somehow it sounds : like "there is no good reason, but avoid them anyway" instead of "avoid : them if you have no good reason".) It means "Don't make white space changes because you can, make them because you have some other reason for changing the code." If you are just reading something and notice a space out of whack, don't bother. If you are debugging the code, fixing a bug, adding a feature, go ahead and fix that too: but make two commits. Warner From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 21:16:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C77571065678; Tue, 6 Jan 2009 21:16:42 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B55DC8FC13; Tue, 6 Jan 2009 21:16:42 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06LGg6H042137; Tue, 6 Jan 2009 21:16:42 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06LGgE8042136; Tue, 6 Jan 2009 21:16:42 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200901062116.n06LGgE8042136@svn.freebsd.org> From: "Simon L. Nielsen" Date: Tue, 6 Jan 2009 21:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186839 - head/sbin/md5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 21:16:43 -0000 Author: simon Date: Tue Jan 6 21:16:42 2009 New Revision: 186839 URL: http://svn.freebsd.org/changeset/base/186839 Log: Minor markup fix for the r186836 update. Modified: head/sbin/md5/md5.1 Modified: head/sbin/md5/md5.1 ============================================================================== --- head/sbin/md5/md5.1 Tue Jan 6 20:19:49 2009 (r186838) +++ head/sbin/md5/md5.1 Tue Jan 6 21:16:42 2009 (r186839) @@ -55,7 +55,8 @@ This also means that .Tn MD5 should not be used as part of a cryptographic signature scheme. At the current time (2009-01-06) there is no publicly known method to -"reverse" MD5, i.e., to find an input given a hash value. +.Dq reverse +MD5, i.e., to find an input given a hash value. .Pp .Tn SHA-1 currently (2009-01-06) has no known collisions, but an attack has been From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 21:53:01 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDE57106564A; Tue, 6 Jan 2009 21:53:01 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 896A28FC1A; Tue, 6 Jan 2009 21:53:01 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id n06LjbGZ016412; Tue, 6 Jan 2009 16:45:37 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id n06LjbvO016411; Tue, 6 Jan 2009 16:45:37 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Tue, 6 Jan 2009 16:45:37 -0500 From: David Schultz To: Marcel Moolenaar Message-ID: <20090106214537.GA16219@zim.MIT.EDU> Mail-Followup-To: Marcel Moolenaar , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <200812232220.mBNMKx62015133@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812232220.mBNMKx62015133@svn.freebsd.org> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r186461 - in head: lib/libc/arm lib/libc/include lib/msun/src sys/arm/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 21:53:02 -0000 On Tue, Dec 23, 2008, Marcel Moolenaar wrote: > Author: marcel > Date: Tue Dec 23 22:20:59 2008 > New Revision: 186461 > URL: http://svn.freebsd.org/changeset/base/186461 > > Log: > Add support for the FPA floating-point format on ARM. The > FPA floating-point format is identical to the VFP format, > but is always stored in big-endian. > Introduce _IEEE_WORD_ORDER to describe the byte-order of > the FP representation. There may be a few other files that assume that the word order and the byte order are the same, e.g., lib/libc/arm/gen/infinity.c lib/libc/gen/ldexp.c lib/msun/src/s_cbrt.c lib/msun/src/s_nan.c The last three ideally shouldn't... From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 22:02:32 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E07C10656E0; Tue, 6 Jan 2009 22:02:32 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id EC7318FC19; Tue, 6 Jan 2009 22:02:30 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n06M2T8T051834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Jan 2009 14:02:30 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4963D4E9.707@FreeBSD.org> Date: Tue, 06 Jan 2009 14:02:17 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Luigi Rizzo References: <200901061510.n06FAQ0g034585@svn.freebsd.org> In-Reply-To: <200901061510.n06FAQ0g034585@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 22:02:35 -0000 Luigi Rizzo wrote: > +# through getenv() (or kenv(1) in userland). The format of the file > +# is 'variable=value' , same as for hints files. What do you think about extending comment with the following: "hints files" -> "hints or loader.conf(5) files". -Maxim From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 22:18:24 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B083A106564A; Tue, 6 Jan 2009 22:18:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E2A38FC0C; Tue, 6 Jan 2009 22:18:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06MIOOx043409; Tue, 6 Jan 2009 22:18:24 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06MIOvp043408; Tue, 6 Jan 2009 22:18:24 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901062218.n06MIOvp043408@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 6 Jan 2009 22:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186841 - head/etc/defaults X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 22:18:25 -0000 Author: bz Date: Tue Jan 6 22:18:24 2009 New Revision: 186841 URL: http://svn.freebsd.org/changeset/base/186841 Log: Put the devfs ruleset next to devfs enable, add a comment about the suggested ruleset[1]. While here use an IP from the 'test-net' prefix for docs. PR: kern/130102 ([1] different problem in the end) Reviewed by: simon MFC after: 2 weeks Modified: head/etc/defaults/rc.conf Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Tue Jan 6 21:34:53 2009 (r186840) +++ head/etc/defaults/rc.conf Tue Jan 6 22:18:24 2009 (r186841) @@ -622,7 +622,7 @@ jail_sysvipc_allow="NO" # Allow SystemV # #jail_example_rootdir="/usr/jail/default" # Jail's root directory #jail_example_hostname="default.domain.com" # Jail's hostname -#jail_example_ip="192.168.0.10" # Jail's IP number +#jail_example_ip="192.0.2.10" # Jail's IP number #jail_example_interface="" # Interface to create the IP alias on #jail_example_fib="0" # routing table for setfib(1) #jail_example_exec_start="/bin/sh /etc/rc" # command to execute in jail for starting @@ -631,10 +631,11 @@ jail_sysvipc_allow="NO" # Allow SystemV # specified using a trailing number #jail_example_exec_stop="/bin/sh /etc/rc.shutdown" # command to execute in jail for stopping #jail_example_devfs_enable="NO" # mount devfs in the jail +#jail_example_devfs_ruleset="ruleset_name" # devfs ruleset to apply to jail - + # usually you want "devfsrules_jail". #jail_example_fdescfs_enable="NO" # mount fdescfs in the jail #jail_example_procfs_enable="NO" # mount procfs in jail #jail_example_mount_enable="NO" # mount/umount jail's fs -#jail_example_devfs_ruleset="ruleset_name" # devfs ruleset to apply to jail #jail_example_fstab="" # fstab(5) for mount/umount #jail_example_flags="-l -U root" # flags for jail(8) From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 22:42:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D57A2106566C; Tue, 6 Jan 2009 22:42:01 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 9313E8FC25; Tue, 6 Jan 2009 22:42:01 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 0324173098; Tue, 6 Jan 2009 23:46:59 +0100 (CET) Date: Tue, 6 Jan 2009 23:46:58 +0100 From: Luigi Rizzo To: Maxim Sobolev Message-ID: <20090106224658.GB3130@onelab2.iet.unipi.it> References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4963D4E9.707@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 22:42:02 -0000 On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: > Luigi Rizzo wrote: > >+# through getenv() (or kenv(1) in userland). The format of the file > >+# is 'variable=value' , same as for hints files. > > What do you think about extending comment with the following: > > "hints files" -> "hints or loader.conf(5) files". i don't know -- in fact, I have a curiosity here: loader.conf is processed by some code in loader.4th which in turn is interpreted by loader.conf, and this chain does some magic on certain variable names (and can also do $variable expansion). Instead, I believe that 'hints' (and presumably 'env' values) are passed directly to the kernel, so there are no special manipulation of variable names or values. Is that correct ? cheers luigi From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 00:09:15 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31C28106566C; Wed, 7 Jan 2009 00:09:15 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id EA8888FC12; Wed, 7 Jan 2009 00:09:14 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n0709CdA058242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Jan 2009 16:09:13 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4963F29B.4070001@FreeBSD.org> Date: Tue, 06 Jan 2009 16:08:59 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Luigi Rizzo References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> In-Reply-To: <20090106224658.GB3130@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:09:16 -0000 Luigi Rizzo wrote: > On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: >> Luigi Rizzo wrote: >>> +# through getenv() (or kenv(1) in userland). The format of the file >>> +# is 'variable=value' , same as for hints files. >> What do you think about extending comment with the following: >> >> "hints files" -> "hints or loader.conf(5) files". > > i don't know -- in fact, I have a curiosity here: > loader.conf is processed by some code in loader.4th which in turn > is interpreted by loader.conf, and this chain does some magic > on certain variable names (and can also do $variable expansion). > > Instead, I believe that 'hints' (and presumably 'env' values) are > passed directly to the kernel, so there are no special manipulation > of variable names or values. Is that correct ? That's true, however if loader doesn't have any handling logic for a certain valuable it simply sets kenv (aka kernel tunable). Take a look at the loader.conf(5) for example. -Maxim From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 00:25:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E679106566B; Wed, 7 Jan 2009 00:25:35 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 2A0F98FC14; Wed, 7 Jan 2009 00:25:34 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 3335A73098; Wed, 7 Jan 2009 01:30:33 +0100 (CET) Date: Wed, 7 Jan 2009 01:30:33 +0100 From: Luigi Rizzo To: Maxim Sobolev Message-ID: <20090107003033.GA5795@onelab2.iet.unipi.it> References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> <4963F29B.4070001@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4963F29B.4070001@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:25:36 -0000 On Tue, Jan 06, 2009 at 04:08:59PM -0800, Maxim Sobolev wrote: > Luigi Rizzo wrote: > >On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: > >>Luigi Rizzo wrote: > >>>+# through getenv() (or kenv(1) in userland). The format of the file > >>>+# is 'variable=value' , same as for hints files. > >>What do you think about extending comment with the following: > >> > >>"hints files" -> "hints or loader.conf(5) files". > > > >i don't know -- in fact, I have a curiosity here: > >loader.conf is processed by some code in loader.4th which in turn > >is interpreted by loader.conf, and this chain does some magic > >on certain variable names (and can also do $variable expansion). > > > >Instead, I believe that 'hints' (and presumably 'env' values) are > >passed directly to the kernel, so there are no special manipulation > >of variable names or values. Is that correct ? > > That's true, however if loader doesn't have any handling logic for a > certain valuable it simply sets kenv (aka kernel tunable). Take a look > at the loader.conf(5) for example. ok, but all we need to say is the following: The file can contain lines of the form name = "value" # this is a coment where whitespace around name and '=' is ignored, and so is everything after a '#' character. Almost any printable character except '=' is acceptable as part of a name. Quotes are optional and necessary only if the value contains whitespace. so why don't we just say that in the kenv(1) manpage (and refer to that) instead of referring to loader.conf which contains a lot of stuff that does not apply in this case ? cheers luigi From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 00:34:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FC76106566B; Wed, 7 Jan 2009 00:34:59 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 5AF018FC12; Wed, 7 Jan 2009 00:34:59 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id B6C0473098; Wed, 7 Jan 2009 01:39:57 +0100 (CET) Date: Wed, 7 Jan 2009 01:39:57 +0100 From: Luigi Rizzo To: "Bjoern A. Zeeb" Message-ID: <20090107003957.GA6307@onelab2.iet.unipi.it> References: <200901052009.n05K9soF009621@svn.freebsd.org> <20090106190220.I45399@maildrop.int.zabbadoz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090106190220.I45399@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186789 - head/sys/boot/forth X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:35:00 -0000 On Tue, Jan 06, 2009 at 07:04:25PM +0000, Bjoern A. Zeeb wrote: > On Mon, 5 Jan 2009, Luigi Rizzo wrote: > > >Author: luigi > >Date: Mon Jan 5 20:09:54 2009 > >New Revision: 186789 > >URL: http://svn.freebsd.org/changeset/base/186789 > > > >Log: > > This patch introduces a number of simplifications to the Forth > > functions used in the bootloader. The goal is to make the code more > > readable and smaller (especially because we have size issues > > in the loader's environment). > > ... > > > It's waay to chatty now... I guess some debug stuff slipped in? > > -- starting on > get_file_name has /boot/defaults/loader.conf > ----- Trying conf /boot/defaults/loader.conf > Loading /boot/defaults/loader.conf > -- starting on /boot/loader.conf.local> > get_file_name has /boot/device.hints > ----- Trying conf /boot/device.hints > get_file_name has /boot/loader.conf > ----- Trying conf /boot/loader.conf > ;get_file_name has /boot/loader.conf.local > ----- Trying conf /boot/loader.conf.local whoops... sorry! try the following patch, i will commit it tomorrow after testing (you can actually kill the lines altogether if you like) cheers luigi Index: support.4th =================================================================== --- support.4th (revision 186797) +++ support.4th (working copy) @@ -820,7 +820,7 @@ \ Interface to loading conf files : load_conf ( addr len -- ) - ." ----- Trying conf " 2dup type cr + \ ." ----- Trying conf " 2dup type cr \ debugging 0 to end_of_file? reset_line_reading O_RDONLY fopen fd ! @@ -912,7 +912,7 @@ \ loader_conf_files processing support functions : get_conf_files ( -- addr len ) \ put addr/len on stack, reset var - ." -- starting on <" conf_files strtype ." >" cr + \ ." -- starting on <" conf_files strtype ." >" cr \ debugging conf_files strget 0 0 conf_files strset ; @@ -939,8 +939,7 @@ pos char+ to pos repeat addr len pos addr r@ + pos r> - - 2dup - ." get_file_name has " type cr + \ 2dup ." get_file_name has " type cr \ debugging ; : get_next_file ( addr len ptr -- addr len ptr' addr' len' | 0 ) From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 00:37:16 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2E33106566C; Wed, 7 Jan 2009 00:37:16 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 8C7B08FC12; Wed, 7 Jan 2009 00:37:16 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n070bE38059626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Jan 2009 16:37:15 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4963F92E.1040708@FreeBSD.org> Date: Tue, 06 Jan 2009 16:37:02 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Luigi Rizzo References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> <4963F29B.4070001@FreeBSD.org> <20090107003033.GA5795@onelab2.iet.unipi.it> In-Reply-To: <20090107003033.GA5795@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:37:17 -0000 Luigi Rizzo wrote: > On Tue, Jan 06, 2009 at 04:08:59PM -0800, Maxim Sobolev wrote: >> Luigi Rizzo wrote: >>> On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: >>>> Luigi Rizzo wrote: >>>>> +# through getenv() (or kenv(1) in userland). The format of the file >>>>> +# is 'variable=value' , same as for hints files. >>>> What do you think about extending comment with the following: >>>> >>>> "hints files" -> "hints or loader.conf(5) files". >>> i don't know -- in fact, I have a curiosity here: >>> loader.conf is processed by some code in loader.4th which in turn >>> is interpreted by loader.conf, and this chain does some magic >>> on certain variable names (and can also do $variable expansion). >>> >>> Instead, I believe that 'hints' (and presumably 'env' values) are >>> passed directly to the kernel, so there are no special manipulation >>> of variable names or values. Is that correct ? >> That's true, however if loader doesn't have any handling logic for a >> certain valuable it simply sets kenv (aka kernel tunable). Take a look >> at the loader.conf(5) for example. > > ok, but all we need to say is the following: > > The file can contain lines of the form > > name = "value" # this is a coment > > where whitespace around name and '=' is ignored, and so is > everything after a '#' character. Almost any printable > character except '=' is acceptable as part of a name. Quotes > are optional and necessary only if the value contains > whitespace. > > so why don't we just say that in the kenv(1) manpage (and refer to > that) instead of referring to loader.conf which contains a lot of > stuff that does not apply in this case ? My main point is that usually people set those tunables not in "hints files" but in loader.conf, so that if you refer to hints you should also need to mention loader.conf. In fact I guess that many people may not even know about what "hints files" are. -Maxim From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 00:43:20 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E921106566B; Wed, 7 Jan 2009 00:43:20 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 4743C8FC08; Wed, 7 Jan 2009 00:43:20 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n070hIxM059920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Jan 2009 16:43:19 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4963FA9A.8030208@FreeBSD.org> Date: Tue, 06 Jan 2009 16:43:06 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> <4963F29B.4070001@FreeBSD.org> <20090107003033.GA5795@onelab2.iet.unipi.it> <4963F92E.1040708@FreeBSD.org> In-Reply-To: <4963F92E.1040708@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, Luigi Rizzo , svn-src-all@FreeBSD.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:43:21 -0000 Maxim Sobolev wrote: > Luigi Rizzo wrote: >> On Tue, Jan 06, 2009 at 04:08:59PM -0800, Maxim Sobolev wrote: >>> Luigi Rizzo wrote: >>>> On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: >>>>> Luigi Rizzo wrote: >>>>>> +# through getenv() (or kenv(1) in userland). The format of the file >>>>>> +# is 'variable=value' , same as for hints files. >>>>> What do you think about extending comment with the following: >>>>> >>>>> "hints files" -> "hints or loader.conf(5) files". >>>> i don't know -- in fact, I have a curiosity here: >>>> loader.conf is processed by some code in loader.4th which in turn >>>> is interpreted by loader.conf, and this chain does some magic >>>> on certain variable names (and can also do $variable expansion). >>>> >>>> Instead, I believe that 'hints' (and presumably 'env' values) are >>>> passed directly to the kernel, so there are no special manipulation >>>> of variable names or values. Is that correct ? >>> That's true, however if loader doesn't have any handling logic for a >>> certain valuable it simply sets kenv (aka kernel tunable). Take a >>> look at the loader.conf(5) for example. >> >> ok, but all we need to say is the following: >> >> The file can contain lines of the form >> >> name = "value" # this is a coment >> >> where whitespace around name and '=' is ignored, and so is >> everything after a '#' character. Almost any printable >> character except '=' is acceptable as part of a name. Quotes >> are optional and necessary only if the value contains >> whitespace. >> >> so why don't we just say that in the kenv(1) manpage (and refer to >> that) instead of referring to loader.conf which contains a lot of >> stuff that does not apply in this case ? > > My main point is that usually people set those tunables not in "hints > files" but in loader.conf, so that if you refer to hints you should also > need to mention loader.conf. In fact I guess that many people may not > even know about what "hints files" are. Forgot to mention that IMHO another reason why loader.conf(5) is a good reference is that it describes purpose of many of the commonly used tunables. -Maxim From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 00:51:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB5D71065672; Wed, 7 Jan 2009 00:51:41 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 985E28FC0C; Wed, 7 Jan 2009 00:51:41 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n070pf4G046279; Wed, 7 Jan 2009 00:51:41 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n070pf7g046278; Wed, 7 Jan 2009 00:51:41 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070051.n070pf7g046278@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 00:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186843 - head/sbin/ping X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:51:42 -0000 Author: danger (doc committer) Date: Wed Jan 7 00:51:41 2009 New Revision: 186843 URL: http://svn.freebsd.org/changeset/base/186843 Log: - rename the RETURN VALUES section to EXIT STATUS - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/sbin/ping/ping.8 Modified: head/sbin/ping/ping.8 ============================================================================== --- head/sbin/ping/ping.8 Tue Jan 6 23:05:28 2009 (r186842) +++ head/sbin/ping/ping.8 Wed Jan 7 00:51:41 2009 (r186843) @@ -503,7 +503,7 @@ packets that they use for packets, for example either 30 or 60. Others may use completely wild values. .El -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility returns an exit status of zero if at least one response was From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 00:54:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91C811065670; Wed, 7 Jan 2009 00:54:30 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F0C78FC1A; Wed, 7 Jan 2009 00:54:30 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n070sUYF046360; Wed, 7 Jan 2009 00:54:30 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n070sUMg046359; Wed, 7 Jan 2009 00:54:30 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070054.n070sUMg046359@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 00:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186844 - head/usr.sbin/rtsold X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:54:31 -0000 Author: danger (doc committer) Date: Wed Jan 7 00:54:30 2009 New Revision: 186844 URL: http://svn.freebsd.org/changeset/base/186844 Log: - rename the RETURN VALUES section to EXIT STATUS [1] - convert to .Ex macro - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/usr.sbin/rtsold/rtsold.8 Modified: head/usr.sbin/rtsold/rtsold.8 ============================================================================== --- head/usr.sbin/rtsold/rtsold.8 Wed Jan 7 00:51:41 2009 (r186843) +++ head/usr.sbin/rtsold/rtsold.8 Wed Jan 7 00:54:30 2009 (r186844) @@ -220,10 +220,8 @@ must be the absolute path from root to t file, and be created by the same owner who runs .Nm . .El -.Sh RETURN VALUES -The -.Nm -program exits 0 on success, and >0 on failures. +.Sh EXIT STATUS +.Ex -std .\" .Sh FILES .Bl -tag -width /var/run/rtsold.dump -compact From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 00:54:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BB81106564A; Wed, 7 Jan 2009 00:54:56 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 35F8A8FC0C; Wed, 7 Jan 2009 00:54:56 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 9D1BE7309E; Wed, 7 Jan 2009 01:59:54 +0100 (CET) Date: Wed, 7 Jan 2009 01:59:54 +0100 From: Luigi Rizzo To: Maxim Sobolev Message-ID: <20090107005954.GA6567@onelab2.iet.unipi.it> References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> <4963F29B.4070001@FreeBSD.org> <20090107003033.GA5795@onelab2.iet.unipi.it> <4963F92E.1040708@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4963F92E.1040708@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:54:57 -0000 On Tue, Jan 06, 2009 at 04:37:02PM -0800, Maxim Sobolev wrote: > Luigi Rizzo wrote: ... > >ok, but all we need to say is the following: > > > > The file can contain lines of the form > > > > name = "value" # this is a coment > > > > where whitespace around name and '=' is ignored, and so is > > everything after a '#' character. Almost any printable > > character except '=' is acceptable as part of a name. Quotes > > are optional and necessary only if the value contains > > whitespace. > > > >so why don't we just say that in the kenv(1) manpage (and refer to > >that) instead of referring to loader.conf which contains a lot of > >stuff that does not apply in this case ? > > My main point is that usually people set those tunables not in "hints > files" but in loader.conf, so that if you refer to hints you should also > need to mention loader.conf. In fact I guess that many people may not > even know about what "hints files" are. Point taken. "hints file" is definitely a wrong name and I will rephrase the comment. But I'd like to document things in a way that reduces confusion: /boot/loader and loader.conf are completely out of the loop in processing this config directive (and so they are when processing the "hints" directive), so I don't think they are a good first reference. I think the proper place is one of the kenv([12]) pages, which in turn should mention or refer loader.conf in the same way as it is done in device.hints(5) cheers luigi From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 00:57:27 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69FB71065670; Wed, 7 Jan 2009 00:57:27 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 575CC8FC25; Wed, 7 Jan 2009 00:57:27 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n070vRsn046467; Wed, 7 Jan 2009 00:57:27 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n070vRTp046466; Wed, 7 Jan 2009 00:57:27 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070057.n070vRTp046466@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 00:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186845 - head/usr.sbin/traceroute6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:57:28 -0000 Author: danger (doc committer) Date: Wed Jan 7 00:57:27 2009 New Revision: 186845 URL: http://svn.freebsd.org/changeset/base/186845 Log: - rename the RETURN VALUES section to EXIT STATUS - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/usr.sbin/traceroute6/traceroute6.8 Modified: head/usr.sbin/traceroute6/traceroute6.8 ============================================================================== --- head/usr.sbin/traceroute6/traceroute6.8 Wed Jan 7 00:54:30 2009 (r186844) +++ head/usr.sbin/traceroute6/traceroute6.8 Wed Jan 7 00:57:27 2009 (r186845) @@ -162,7 +162,7 @@ This was more interesting in the IPv4 ca where some IP stack bugs could be identified by this behaviour. .El .\" -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility will exit with 0 on success, and non-zero on errors. From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 00:58:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 775B01065675; Wed, 7 Jan 2009 00:58:25 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6450E8FC1C; Wed, 7 Jan 2009 00:58:25 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n070wPXH046520; Wed, 7 Jan 2009 00:58:25 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n070wPDn046519; Wed, 7 Jan 2009 00:58:25 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070058.n070wPDn046519@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 00:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186846 - head/usr.sbin/rrenumd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:58:26 -0000 Author: danger (doc committer) Date: Wed Jan 7 00:58:25 2009 New Revision: 186846 URL: http://svn.freebsd.org/changeset/base/186846 Log: - rename the RETURN VALUES section to EXIT STATUS - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/usr.sbin/rrenumd/rrenumd.8 Modified: head/usr.sbin/rrenumd/rrenumd.8 ============================================================================== --- head/usr.sbin/rrenumd/rrenumd.8 Wed Jan 7 00:57:27 2009 (r186845) +++ head/usr.sbin/rrenumd/rrenumd.8 Wed Jan 7 00:58:25 2009 (r186846) @@ -82,7 +82,7 @@ Configuration information is obtained fr .It Fl c Ar conf_file Specify a configuration file where configuration information is kept. .El -.Sh RETURN VALUES +.Sh EXIT STATUS The program exits with 0 on success, and non-zero on failures. .Sh SEE ALSO .Xr rrenumd.conf 5 , From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 00:59:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B52061065678; Wed, 7 Jan 2009 00:59:34 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A17108FC27; Wed, 7 Jan 2009 00:59:34 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n070xYZe046579; Wed, 7 Jan 2009 00:59:34 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n070xYV0046578; Wed, 7 Jan 2009 00:59:34 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070059.n070xYV0046578@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 00:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186847 - head/usr.sbin/mld6query X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:59:36 -0000 Author: danger (doc committer) Date: Wed Jan 7 00:59:34 2009 New Revision: 186847 URL: http://svn.freebsd.org/changeset/base/186847 Log: - rename the RETURN VALUES section to EXIT STATUS - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/usr.sbin/mld6query/mld6query.8 Modified: head/usr.sbin/mld6query/mld6query.8 ============================================================================== --- head/usr.sbin/mld6query/mld6query.8 Wed Jan 7 00:58:25 2009 (r186846) +++ head/usr.sbin/mld6query/mld6query.8 Wed Jan 7 00:59:34 2009 (r186847) @@ -75,7 +75,7 @@ similarly, MLD report packet will be tra .Fl dr options are for debugging purposes only. .\" -.Sh RETURN VALUES +.Sh EXIT STATUS The program exits with 0 on success, non-zero on failures. .\" .\" .Sh SEE ALSO From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 01:01:26 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEB3C1065691; Wed, 7 Jan 2009 01:01:26 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB83E8FC16; Wed, 7 Jan 2009 01:01:26 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0711QYk046676; Wed, 7 Jan 2009 01:01:26 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0711QsN046675; Wed, 7 Jan 2009 01:01:26 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070101.n0711QsN046675@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 01:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186848 - head/usr.sbin/rtadvd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 01:01:27 -0000 Author: danger (doc committer) Date: Wed Jan 7 01:01:26 2009 New Revision: 186848 URL: http://svn.freebsd.org/changeset/base/186848 Log: - rename the RETURN VALUES section to EXIT STATUS [1] - convert to .Ex macro - not bumping a date as this is not a real content change Approved by: ru [1] MFC after: 3 days Modified: head/usr.sbin/rtadvd/rtadvd.8 Modified: head/usr.sbin/rtadvd/rtadvd.8 ============================================================================== --- head/usr.sbin/rtadvd/rtadvd.8 Wed Jan 7 00:59:34 2009 (r186847) +++ head/usr.sbin/rtadvd/rtadvd.8 Wed Jan 7 01:01:26 2009 (r186848) @@ -162,10 +162,8 @@ In this case, will transmit router advertisement with router lifetime 0 to all the interfaces .Pq in accordance with RFC2461 6.2.5 . -.Sh RETURN VALUES -The -.Nm -program exits 0 on success, and >0 on failures. +.Sh EXIT STATUS +.Ex -std .Sh FILES .Bl -tag -width Pa -compact .It Pa /etc/rtadvd.conf From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 01:03:24 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26AF91065672; Wed, 7 Jan 2009 01:03:24 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13F738FC13; Wed, 7 Jan 2009 01:03:24 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0713N3P046748; Wed, 7 Jan 2009 01:03:24 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0713NSW046747; Wed, 7 Jan 2009 01:03:23 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070103.n0713NSW046747@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 01:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186849 - head/bin/test X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 01:03:24 -0000 Author: danger (doc committer) Date: Wed Jan 7 01:03:23 2009 New Revision: 186849 URL: http://svn.freebsd.org/changeset/base/186849 Log: - rename the RETURN VALUES section to EXIT STATUS - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/bin/test/test.1 Modified: head/bin/test/test.1 ============================================================================== --- head/bin/test/test.1 Wed Jan 7 01:01:26 2009 (r186848) +++ head/bin/test/test.1 Wed Jan 7 01:03:23 2009 (r186849) @@ -310,7 +310,7 @@ are evaluated consistently according to standards document. All other cases are subject to the ambiguity in the command semantics. -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility exits with one of the following values: From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 01:31:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8658B106564A; Wed, 7 Jan 2009 01:31:09 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 738148FC17; Wed, 7 Jan 2009 01:31:09 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n071V9C1047262; Wed, 7 Jan 2009 01:31:09 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n071V9ks047261; Wed, 7 Jan 2009 01:31:09 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070131.n071V9ks047261@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 01:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186850 - head/usr.sbin/cpucontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 01:31:10 -0000 Author: danger (doc committer) Date: Wed Jan 7 01:31:09 2009 New Revision: 186850 URL: http://svn.freebsd.org/changeset/base/186850 Log: - use .Ex macro in EXIT STATUS section Modified: head/usr.sbin/cpucontrol/cpucontrol.8 Modified: head/usr.sbin/cpucontrol/cpucontrol.8 ============================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.8 Wed Jan 7 01:03:23 2009 (r186849) +++ head/usr.sbin/cpucontrol/cpucontrol.8 Wed Jan 7 01:31:09 2009 (r186850) @@ -84,9 +84,7 @@ Increase the verbosity level. Show help message. .El .Sh EXIT STATUS -The -.Nm -utility exits 0 on success, and >0 if an error occurs. +.Ex -std .Sh EXAMPLES The command .Pp From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 03:15:22 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE607106566B; Wed, 7 Jan 2009 03:15:22 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC41F8FC1B; Wed, 7 Jan 2009 03:15:22 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n073FMea049674; Wed, 7 Jan 2009 03:15:22 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n073FM6E049672; Wed, 7 Jan 2009 03:15:22 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200901070315.n073FM6E049672@svn.freebsd.org> From: Rong-En Fan Date: Wed, 7 Jan 2009 03:15:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186851 - in head/sys: conf dev/sound/pci modules/sound/driver/au88x0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 03:15:23 -0000 Author: rafan Date: Wed Jan 7 03:15:22 2009 New Revision: 186851 URL: http://svn.freebsd.org/changeset/base/186851 Log: - Remove snd_au88x0 which seems never got compiled into kernel nor as a kernel module. These files cause manual interaction when building ports/audio/aureal-kmod which provides a usable i386-only driver (it requires linking against some linux object files distributed by vendor which bankrupted back in 2000). MFC after: 1 week Deleted: head/sys/dev/sound/pci/au88x0.c head/sys/dev/sound/pci/au88x0.h head/sys/modules/sound/driver/au88x0/ Modified: head/sys/conf/NOTES head/sys/conf/files Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Jan 7 01:31:09 2009 (r186850) +++ head/sys/conf/NOTES Wed Jan 7 03:15:22 2009 (r186851) @@ -1984,8 +1984,6 @@ device sound # snd_ad1816: Analog Devices AD1816 ISA PnP/non-PnP. # snd_als4000: Avance Logic ALS4000 PCI. # snd_atiixp: ATI IXP 200/300/400 PCI. -# snd_au88x0 Aureal Vortex 1/2/Advantage PCI. This driver -# lacks support for playback and recording. # snd_audiocs: Crystal Semiconductor CS4231 SBus/EBus. Only # for sparc64. # snd_cmi: CMedia CMI8338/CMI8738 PCI. @@ -2029,7 +2027,6 @@ device sound device snd_ad1816 device snd_als4000 device snd_atiixp -#device snd_au88x0 #device snd_audiocs device snd_cmi device snd_cs4281 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jan 7 01:31:09 2009 (r186850) +++ head/sys/conf/files Wed Jan 7 03:15:22 2009 (r186851) @@ -1337,7 +1337,6 @@ dev/sound/isa/sbc.c optional snd_sbc is dev/sound/isa/sndbuf_dma.c optional sound isa dev/sound/pci/als4000.c optional snd_als4000 pci dev/sound/pci/atiixp.c optional snd_atiixp pci -#dev/sound/pci/au88x0.c optional snd_au88x0 pci dev/sound/pci/cmi.c optional snd_cmi pci dev/sound/pci/cs4281.c optional snd_cs4281 pci dev/sound/pci/csa.c optional snd_csa pci \ From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 09:50:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 524BC106566B; Wed, 7 Jan 2009 09:50:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26FDA8FC0C; Wed, 7 Jan 2009 09:50:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n079owVP057894; Wed, 7 Jan 2009 09:50:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n079owcb057893; Wed, 7 Jan 2009 09:50:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901070950.n079owcb057893@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 09:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186853 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 09:50:59 -0000 Author: mav Date: Wed Jan 7 09:50:57 2009 New Revision: 186853 URL: http://svn.freebsd.org/changeset/base/186853 Log: Hook up sdhci man page to the build. Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Jan 7 09:17:25 2009 (r186852) +++ head/share/man/man4/Makefile Wed Jan 7 09:50:57 2009 (r186853) @@ -316,6 +316,7 @@ MAN= aac.4 \ screen.4 \ scsi.4 \ sctp.4 \ + sdhci.4 \ sem.4 \ ses.4 \ sf.4 \ From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 09:56:54 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0C92106564A; Wed, 7 Jan 2009 09:56:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EBC18FC17; Wed, 7 Jan 2009 09:56:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n079us3v058082; Wed, 7 Jan 2009 09:56:54 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n079ushE058081; Wed, 7 Jan 2009 09:56:54 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901070956.n079ushE058081@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 7 Jan 2009 09:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186854 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 09:56:55 -0000 Author: bz Date: Wed Jan 7 09:56:54 2009 New Revision: 186854 URL: http://svn.freebsd.org/changeset/base/186854 Log: Using KMODOWN/KMODGRP rather than hard coding root/wheel for installing the kernel allows one, like with modules, to override the default user/group and install as non-su to a temporary directory to test, create images or seed a tftp dir. Reviewed by: Andrzej Tobola MFC after: 4 weeks Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Wed Jan 7 09:50:57 2009 (r186853) +++ head/sys/conf/kern.post.mk Wed Jan 7 09:56:54 2009 (r186854) @@ -217,21 +217,21 @@ kernel-install: fi .endif mkdir -p ${DESTDIR}${KODIR} - ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} .if defined(DEBUG) && !defined(INSTALL_NODEBUG) - ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif .if defined(KERNEL_EXTRA_INSTALL) - ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_EXTRA_INSTALL} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_EXTRA_INSTALL} ${DESTDIR}${KODIR} .endif kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} - ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} .if defined(DEBUG) && !defined(INSTALL_NODEBUG) - ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif config.o env.o hints.o vers.o vnode_if.o: From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 10:15:23 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C96A1065670; Wed, 7 Jan 2009 10:15:23 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw1.york.ac.uk (mail-gw1.york.ac.uk [144.32.128.246]) by mx1.freebsd.org (Postfix) with ESMTP id 1ABF88FC14; Wed, 7 Jan 2009 10:15:22 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw1.york.ac.uk (8.13.6/8.13.6) with ESMTP id n07AFHtg008854; Wed, 7 Jan 2009 10:15:17 GMT Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1LKVRV-0006md-Iu; Wed, 07 Jan 2009 10:15:17 +0000 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.2/8.14.2) with ESMTP id n07AFH5m084899; Wed, 7 Jan 2009 10:15:17 GMT (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.2/8.14.2/Submit) id n07AFGPa084888; Wed, 7 Jan 2009 10:15:16 GMT (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: Rong-En Fan In-Reply-To: <200901070315.n073FM6E049672@svn.freebsd.org> References: <200901070315.n073FM6E049672@svn.freebsd.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Wed, 07 Jan 2009 10:15:06 +0000 Message-Id: <1231323316.84852.0.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 FreeBSD GNOME Team Port X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186851 - in head/sys: conf dev/sound/pci modules/sound/driver/au88x0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 10:15:26 -0000 On Wed, 2009-01-07 at 03:15 +0000, Rong-En Fan wrote: > Author: rafan > Date: Wed Jan 7 03:15:22 2009 > New Revision: 186851 > URL: http://svn.freebsd.org/changeset/base/186851 > > Log: > - Remove snd_au88x0 which seems never got compiled into kernel nor as a kernel > module. These files cause manual interaction when building > ports/audio/aureal-kmod which provides a usable i386-only driver (it requires > linking against some linux object files distributed by vendor which bankrupted > back in 2000). PR: 124343 Gavin From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 16:01:24 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48F25106564A; Wed, 7 Jan 2009 16:01:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36BE78FC12; Wed, 7 Jan 2009 16:01:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07G1N6g091432; Wed, 7 Jan 2009 16:01:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07G1N7X091431; Wed, 7 Jan 2009 16:01:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071601.n07G1N7X091431@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 16:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186864 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 16:01:24 -0000 Author: mav Date: Wed Jan 7 16:01:23 2009 New Revision: 186864 URL: http://svn.freebsd.org/changeset/base/186864 Log: Add some more supported controller and codec models. Add one more proposition to check correct PCM audio device usage. Modified: head/share/man/man4/snd_hda.4 Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Wed Jan 7 15:31:46 2009 (r186863) +++ head/share/man/man4/snd_hda.4 Wed Jan 7 16:01:23 2009 (r186864) @@ -455,7 +455,8 @@ On headphones connection rear connectors .Sh HARDWARE The .Nm -driver supports the following audio chipsets: +driver supports many Intel HDA compatible audio chipsets including the +following: .Pp .Bl -bullet -compact .It @@ -465,13 +466,17 @@ ATI SB600 .It Intel 631x/632xESB .It -Intel 82801F +Intel 82801F (ICH6) .It -Intel 82801G +Intel 82801G (ICH7) .It -Intel 82801H +Intel 82801H (ICH8) .It -Intel 82801I +Intel 82801I (ICH9) +.It +Intel 82801J (ICH10) +.It +Intel US15W (SCH) .It nVidia MCP51 .It @@ -481,6 +486,8 @@ nVidia MCP61A .It nVidia MCP61B .It +nVidia MCP63 +.It nVidia MCP65A .It nVidia MCP65B @@ -489,14 +496,16 @@ nVidia MCP67A .It nVidia MCP67B .It +nVidia MCP68 +.It +nVidia MCP69 +.It SiS 966 .It VIA VT8251/8237A .El .Pp -Generic audio chipsets compatible with the Intel HDA specification should work, -but have not been verified yet. -The following codecs have been verified to work: +The following and many other codecs have been verified to work: .Pp .Bl -bullet -compact .It @@ -514,9 +523,11 @@ Analog Devices AD1988B .It CMedia CMI9880 .It -Conexant Venice +Conexant CX20549 (Venice) +.It +Conexant CX20551 (Waikiki) .It -Conexant Waikiki +Conexant CX20561 (Hermosa) .It Realtek ALC260 .It @@ -574,6 +585,8 @@ Sigmatel STAC9872AK .It VIA VT1708 .It +VIA VT1708B +.It VIA VT1709 .El .Sh SEE ALSO @@ -607,7 +620,11 @@ rendering the .Nm driver useless, which usually results in a state where the .Nm -driver seems to attach and work, but without any sound. +driver seems to attach and work, but without any sound. Some of +that cases can be solved by tuning loader.conf variables. But before +trying to fix problem that way, make sure that problem is really exists +and the PCM audio device you are using really corresponds to expected +audio connector. .Pp Due to OSS limitation multichannel (not multidevice) playback is not supported. From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 16:06:10 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59EDB106566B; Wed, 7 Jan 2009 16:06:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2ED618FC19; Wed, 7 Jan 2009 16:06:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07G69tW091558; Wed, 7 Jan 2009 16:06:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07G69Sd091557; Wed, 7 Jan 2009 16:06:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071606.n07G69Sd091557@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 16:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186865 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 16:06:10 -0000 Author: mav Date: Wed Jan 7 16:06:09 2009 New Revision: 186865 URL: http://svn.freebsd.org/changeset/base/186865 Log: Update date. Modified: head/share/man/man4/snd_hda.4 Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Wed Jan 7 16:01:23 2009 (r186864) +++ head/share/man/man4/snd_hda.4 Wed Jan 7 16:06:09 2009 (r186865) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 8, 2008 +.Dd January 7, 2009 .Dt SND_HDA 4 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 18:17:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11127106564A; Wed, 7 Jan 2009 18:17:38 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F36F28FC1A; Wed, 7 Jan 2009 18:17:37 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07IHaLC094753; Wed, 7 Jan 2009 18:17:36 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07IHakT094752; Wed, 7 Jan 2009 18:17:36 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901071817.n07IHakT094752@svn.freebsd.org> From: Sam Leffler Date: Wed, 7 Jan 2009 18:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186870 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 18:17:38 -0000 Author: sam Date: Wed Jan 7 18:17:36 2009 New Revision: 186870 URL: http://svn.freebsd.org/changeset/base/186870 Log: only mark an infrastructure node to require an associd for xmit; fixes adhoc mode sta's that join an existing ibss Modified: head/sys/net80211/ieee80211_node.c Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Wed Jan 7 18:02:36 2009 (r186869) +++ head/sys/net80211/ieee80211_node.c Wed Jan 7 18:17:36 2009 (r186870) @@ -732,7 +732,10 @@ ieee80211_sta_join(struct ieee80211vap * ni->ni_erp = se->se_erp; IEEE80211_RSSI_LPF(ni->ni_avgrssi, se->se_rssi); ni->ni_noise = se->se_noise; - ni->ni_flags |= IEEE80211_NODE_ASSOCID; + if (vap->iv_opmode == IEEE80211_M_STA) { + /* NB: only infrastructure mode requires an associd */ + ni->ni_flags |= IEEE80211_NODE_ASSOCID; + } if (ieee80211_ies_init(&ni->ni_ies, se->se_ies.data, se->se_ies.len)) { ieee80211_ies_expand(&ni->ni_ies); From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 18:37:10 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FD2B106566C; Wed, 7 Jan 2009 18:37:08 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1198FC12; Wed, 7 Jan 2009 18:37:08 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07Ib8ML095166; Wed, 7 Jan 2009 18:37:08 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07Ib86p095165; Wed, 7 Jan 2009 18:37:08 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200901071837.n07Ib86p095165@svn.freebsd.org> From: Ulf Lilleengen Date: Wed, 7 Jan 2009 18:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186871 - head/contrib/csup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 18:37:10 -0000 Author: lulf Date: Wed Jan 7 18:37:07 2009 New Revision: 186871 URL: http://svn.freebsd.org/changeset/base/186871 Log: - Update manpage now that cvs mode is supported. Modified: head/contrib/csup/csup.1 Modified: head/contrib/csup/csup.1 ============================================================================== --- head/contrib/csup/csup.1 Wed Jan 7 18:17:36 2009 (r186870) +++ head/contrib/csup/csup.1 Wed Jan 7 18:37:07 2009 (r186871) @@ -442,8 +442,6 @@ They are called mode and .Em checkout mode. -.Nm -only supports the checkout mode for now. .Pp In CVS mode, the client receives copies of the actual RCS files making up the master CVS repository. CVS mode is the default mode of operation. From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 19:51:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 724DE106564A; Wed, 7 Jan 2009 19:51:11 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2F7CE8FC19; Wed, 7 Jan 2009 19:51:11 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n07Jlv4d060208; Wed, 7 Jan 2009 12:48:00 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 07 Jan 2009 12:48:10 -0700 (MST) Message-Id: <20090107.124810.1933499588.imp@bsdimp.com> To: rizzo@iet.unipi.it From: "M. Warner Losh" In-Reply-To: <20090106224658.GB3130@onelab2.iet.unipi.it> References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, sobomax@freebsd.org, luigi@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 19:51:12 -0000 In message: <20090106224658.GB3130@onelab2.iet.unipi.it> Luigi Rizzo writes: : On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: : > Luigi Rizzo wrote: : > >+# through getenv() (or kenv(1) in userland). The format of the file : > >+# is 'variable=value' , same as for hints files. : > : > What do you think about extending comment with the following: : > : > "hints files" -> "hints or loader.conf(5) files". : : i don't know -- in fact, I have a curiosity here: : loader.conf is processed by some code in loader.4th which in turn : is interpreted by loader.conf, and this chain does some magic : on certain variable names (and can also do $variable expansion). : : Instead, I believe that 'hints' (and presumably 'env' values) are : passed directly to the kernel, so there are no special manipulation : of variable names or values. Is that correct ? hints are either compiled into the kernel, or are loaded into the kernel environment by reading /boot/device.hints. There's nothing really magical about it. You could put all your hints into /boot/loader.conf if you wanted... If you compile them directly into the kernel, the loader can't help... Warner From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 20:17:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1539010656CA; Wed, 7 Jan 2009 20:17:57 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFF778FC21; Wed, 7 Jan 2009 20:17:56 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07KHuG1098473; Wed, 7 Jan 2009 20:17:56 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07KHucY098461; Wed, 7 Jan 2009 20:17:56 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200901072017.n07KHucY098461@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 7 Jan 2009 20:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186872 - head/contrib/lukemftpd/src head/crypto/openssl/apps head/crypto/openssl/ssl releng/6.3 releng/6.3/contrib/lukemftpd/src releng/6.3/crypto/openssl/apps releng/6.3/crypto/openss... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 20:17:59 -0000 Author: simon Date: Wed Jan 7 20:17:55 2009 New Revision: 186872 URL: http://svn.freebsd.org/changeset/base/186872 Log: Prevent cross-site forgery attacks on lukemftpd(8) due to splitting long commands into multiple requests. [09:01] Fix incorrect OpenSSL checks for malformed signatures due to invalid check of return value from EVP_VerifyFinal(), DSA_verify, and DSA_do_verify. [09:02] Security: FreeBSD-SA-09:01.lukemftpd Security: FreeBSD-SA-09:02.openssl Obtained from: NetBSD [SA-09:01] Obtained from: OpenSSL Project [SA-09:02] Approved by: so (simon) Modified: head/contrib/lukemftpd/src/extern.h head/contrib/lukemftpd/src/ftpcmd.y head/contrib/lukemftpd/src/ftpd.c head/crypto/openssl/apps/speed.c head/crypto/openssl/apps/spkac.c head/crypto/openssl/apps/verify.c head/crypto/openssl/apps/x509.c head/crypto/openssl/ssl/s2_clnt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssltest.c Changes in other areas also in this revision: Modified: releng/6.3/UPDATING releng/6.3/contrib/lukemftpd/src/extern.h releng/6.3/contrib/lukemftpd/src/ftpcmd.y releng/6.3/contrib/lukemftpd/src/ftpd.c releng/6.3/crypto/openssl/apps/speed.c releng/6.3/crypto/openssl/apps/spkac.c releng/6.3/crypto/openssl/apps/verify.c releng/6.3/crypto/openssl/apps/x509.c releng/6.3/crypto/openssl/ssl/s2_clnt.c releng/6.3/crypto/openssl/ssl/s2_srvr.c releng/6.3/crypto/openssl/ssl/s3_clnt.c releng/6.3/crypto/openssl/ssl/s3_srvr.c releng/6.3/sys/conf/newvers.sh releng/6.4/UPDATING releng/6.4/contrib/lukemftpd/src/extern.h releng/6.4/contrib/lukemftpd/src/ftpcmd.y releng/6.4/contrib/lukemftpd/src/ftpd.c releng/6.4/crypto/openssl/apps/speed.c releng/6.4/crypto/openssl/apps/spkac.c releng/6.4/crypto/openssl/apps/verify.c releng/6.4/crypto/openssl/apps/x509.c releng/6.4/crypto/openssl/ssl/s2_clnt.c releng/6.4/crypto/openssl/ssl/s2_srvr.c releng/6.4/crypto/openssl/ssl/s3_clnt.c releng/6.4/crypto/openssl/ssl/s3_srvr.c releng/6.4/sys/conf/newvers.sh releng/7.0/UPDATING releng/7.0/contrib/lukemftpd/src/extern.h releng/7.0/contrib/lukemftpd/src/ftpcmd.y releng/7.0/contrib/lukemftpd/src/ftpd.c releng/7.0/crypto/openssl/apps/speed.c releng/7.0/crypto/openssl/apps/spkac.c releng/7.0/crypto/openssl/apps/verify.c releng/7.0/crypto/openssl/apps/x509.c releng/7.0/crypto/openssl/ssl/s2_clnt.c releng/7.0/crypto/openssl/ssl/s2_srvr.c releng/7.0/crypto/openssl/ssl/s3_clnt.c releng/7.0/crypto/openssl/ssl/s3_srvr.c releng/7.0/crypto/openssl/ssl/ssltest.c releng/7.0/sys/conf/newvers.sh releng/7.1/UPDATING releng/7.1/contrib/lukemftpd/src/extern.h releng/7.1/contrib/lukemftpd/src/ftpcmd.y releng/7.1/contrib/lukemftpd/src/ftpd.c releng/7.1/crypto/openssl/apps/speed.c releng/7.1/crypto/openssl/apps/spkac.c releng/7.1/crypto/openssl/apps/verify.c releng/7.1/crypto/openssl/apps/x509.c releng/7.1/crypto/openssl/ssl/s2_clnt.c releng/7.1/crypto/openssl/ssl/s2_srvr.c releng/7.1/crypto/openssl/ssl/s3_clnt.c releng/7.1/crypto/openssl/ssl/s3_srvr.c releng/7.1/crypto/openssl/ssl/ssltest.c releng/7.1/sys/conf/newvers.sh stable/6/contrib/lukemftpd/src/extern.h stable/6/contrib/lukemftpd/src/ftpcmd.y stable/6/contrib/lukemftpd/src/ftpd.c stable/7/contrib/lukemftpd/src/extern.h stable/7/contrib/lukemftpd/src/ftpcmd.y stable/7/contrib/lukemftpd/src/ftpd.c stable/7/crypto/openssl/apps/speed.c stable/7/crypto/openssl/apps/spkac.c stable/7/crypto/openssl/apps/verify.c stable/7/crypto/openssl/apps/x509.c stable/7/crypto/openssl/ssl/s2_clnt.c stable/7/crypto/openssl/ssl/s2_srvr.c stable/7/crypto/openssl/ssl/s3_clnt.c stable/7/crypto/openssl/ssl/s3_srvr.c stable/7/crypto/openssl/ssl/ssltest.c Modified: head/contrib/lukemftpd/src/extern.h ============================================================================== --- head/contrib/lukemftpd/src/extern.h Wed Jan 7 18:37:07 2009 (r186871) +++ head/contrib/lukemftpd/src/extern.h Wed Jan 7 20:17:55 2009 (r186872) @@ -139,7 +139,7 @@ void feat(void); void format_path(char *, const char *); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *[], const char *, int); -char *getline(char *, int, FILE *); +int getline(char *, int, FILE *); void init_curclass(void); void logxfer(const char *, off_t, const char *, const char *, const struct timeval *, const char *); Modified: head/contrib/lukemftpd/src/ftpcmd.y ============================================================================== --- head/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 18:37:07 2009 (r186871) +++ head/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 20:17:55 2009 (r186872) @@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. + * `s' is the buffer to read into. + * `n' is the 1 less than the size of the buffer, to allow trailing NUL + * `iop' is the FILE to read from. + * Returns 0 on success, -1 on EOF, -2 if the command was too long. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop) if (ftpd_debug) syslog(LOG_DEBUG, "command: %s", s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n <= 0 || c == '\n') + if (--n <= 0) { + /* + * If command doesn't fit into buffer, discard the + * rest of the command and indicate truncation. + * This prevents the command to be split up into + * multiple commands. + */ + if (ftpd_debug) + syslog(LOG_DEBUG, + "command too long, last char: %d", c); + while (c != '\n' && (c = getc(iop)) != EOF) + continue; + return (-2); + } + if (c == '\n') break; } if (c == EOF && cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpd_debug) { if ((curclass.type != CLASS_GUEST && @@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop) syslog(LOG_DEBUG, "command: %.*s", len, s); } } - return (s); + return (0); } void @@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp) void ftp_loop(void) { + int ret; while (1) { (void) alarm(curclass.timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + ret = getline(cbuf, sizeof(cbuf)-1, stdin); + (void) alarm(0); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + reply(500, "Command too long."); + } else { + ftp_handle_line(cbuf); } - (void) alarm(0); - ftp_handle_line(cbuf); } /*NOTREACHED*/ } Modified: head/contrib/lukemftpd/src/ftpd.c ============================================================================== --- head/contrib/lukemftpd/src/ftpd.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/contrib/lukemftpd/src/ftpd.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */ +/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */ /* * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -2896,6 +2896,7 @@ static int handleoobcmd() { char *cp; + int ret; if (!urgflag) return (0); @@ -2904,9 +2905,14 @@ handleoobcmd() if (!transflag) return (0); cp = tmpline; - if (getline(cp, sizeof(tmpline), stdin) == NULL) { + ret = getline(cp, sizeof(tmpline)-1, stdin); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + /* Ignore truncated command */ + /* XXX: abort xfer with "500 command too long", & return 1 ? */ + return 0; } /* * Manually parse OOB commands, because we can't Modified: head/crypto/openssl/apps/speed.c ============================================================================== --- head/crypto/openssl/apps/speed.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/apps/speed.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2038,7 +2038,7 @@ int MAIN(int argc, char **argv) { ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); - if (ret == 0) + if (ret <= 0) { BIO_printf(bio_err, "RSA verify failure\n"); Modified: head/crypto/openssl/apps/spkac.c ============================================================================== --- head/crypto/openssl/apps/spkac.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/apps/spkac.c Wed Jan 7 20:17:55 2009 (r186872) @@ -285,7 +285,7 @@ bad: pkey = NETSCAPE_SPKI_get_pubkey(spki); if(verify) { i = NETSCAPE_SPKI_verify(spki, pkey); - if(i) BIO_printf(bio_err, "Signature OK\n"); + if (i > 0) BIO_printf(bio_err, "Signature OK\n"); else { BIO_printf(bio_err, "Signature Failure\n"); ERR_print_errors(bio_err); Modified: head/crypto/openssl/apps/verify.c ============================================================================== --- head/crypto/openssl/apps/verify.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/apps/verify.c Wed Jan 7 20:17:55 2009 (r186872) @@ -266,7 +266,7 @@ static int check(X509_STORE *ctx, char * ret=0; end: - if (i) + if (i > 0) { fprintf(stdout,"OK\n"); ret=1; @@ -367,4 +367,3 @@ static int MS_CALLBACK cb(int ok, X509_S ERR_clear_error(); return(ok); } - Modified: head/crypto/openssl/apps/x509.c ============================================================================== --- head/crypto/openssl/apps/x509.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/apps/x509.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1144,7 +1144,7 @@ static int x509_certify(X509_STORE *ctx, /* NOTE: this certificate can/should be self signed, unless it was * a certificate request in which case it is not. */ X509_STORE_CTX_set_cert(&xsc,x); - if (!reqfile && !X509_verify_cert(&xsc)) + if (!reqfile && X509_verify_cert(&xsc) <= 0) goto end; if (!X509_check_private_key(xca,pkey)) Modified: head/crypto/openssl/ssl/s2_clnt.c ============================================================================== --- head/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1044,7 +1044,7 @@ int ssl2_set_certificate(SSL *s, int typ i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)) { SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); goto err; Modified: head/crypto/openssl/ssl/s2_srvr.c ============================================================================== --- head/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1054,7 +1054,7 @@ static int request_certificate(SSL *s) i=ssl_verify_cert_chain(s,sk); - if (i) /* we like the packet, now check the chksum */ + if (i > 0) /* we like the packet, now check the chksum */ { EVP_MD_CTX ctx; EVP_PKEY *pkey=NULL; @@ -1083,7 +1083,7 @@ static int request_certificate(SSL *s) EVP_PKEY_free(pkey); EVP_MD_CTX_cleanup(&ctx); - if (i) + if (i > 0) { if (s->session->peer != NULL) X509_free(s->session->peer); Modified: head/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- head/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -883,7 +883,7 @@ int ssl3_get_server_certificate(SSL *s) } i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0) #ifndef OPENSSL_NO_KRB5 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK)) != (SSL_aKRB5|SSL_kKRB5) @@ -1368,7 +1368,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; @@ -1386,7 +1386,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; Modified: head/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- head/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2481,7 +2481,7 @@ int ssl3_get_client_certificate(SSL *s) else { i=ssl_verify_cert_chain(s,sk); - if (!i) + if (i <= 0) { al=ssl_verify_alarm_type(s->verify_result); SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); Modified: head/crypto/openssl/ssl/ssltest.c ============================================================================== --- head/crypto/openssl/ssl/ssltest.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/ssl/ssltest.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2072,7 +2072,7 @@ static int MS_CALLBACK app_verify_callba if (cb_arg->proxy_auth) { - if (ok) + if (ok > 0) { const char *cond_end = NULL; From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 21:12:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 894AE1065676; Wed, 7 Jan 2009 21:12:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7815D8FC0C; Wed, 7 Jan 2009 21:12:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07LCXPW099769; Wed, 7 Jan 2009 21:12:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07LCXCS099767; Wed, 7 Jan 2009 21:12:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901072112.n07LCXCS099767@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 21:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186875 - in head/sys: dev/sound/pcm sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 21:12:34 -0000 Author: mav Date: Wed Jan 7 21:12:33 2009 New Revision: 186875 URL: http://svn.freebsd.org/changeset/base/186875 Log: Add some new oss_sysinfo structure fields from OSSv4. Modified: head/sys/dev/sound/pcm/sound.c head/sys/sys/soundcard.h Modified: head/sys/dev/sound/pcm/sound.c ============================================================================== --- head/sys/dev/sound/pcm/sound.c Wed Jan 7 21:10:16 2009 (r186874) +++ head/sys/dev/sound/pcm/sound.c Wed Jan 7 21:12:33 2009 (r186875) @@ -1405,6 +1405,7 @@ sound_oss_sysinfo(oss_sysinfo *si) { static char si_product[] = "FreeBSD native OSS ABI"; static char si_version[] = __XSTRING(__FreeBSD_version); + static char si_license[] = "BSD"; static int intnbits = sizeof(int) * 8; /* Better suited as macro? Must pester a C guru. */ @@ -1417,6 +1418,7 @@ sound_oss_sysinfo(oss_sysinfo *si) strlcpy(si->product, si_product, sizeof(si->product)); strlcpy(si->version, si_version, sizeof(si->version)); si->versionnum = SOUND_VERSION; + strlcpy(si->license, si_license, sizeof(si->license)); /* * Iterate over PCM devices and their channels, gathering up data @@ -1454,6 +1456,7 @@ sound_oss_sysinfo(oss_sysinfo *si) pcm_unlock(d); } + si->numaudioengines = si->numaudios; si->numsynths = 0; /* OSSv4 docs: this field is obsolete */ /** Modified: head/sys/sys/soundcard.h ============================================================================== --- head/sys/sys/soundcard.h Wed Jan 7 21:10:16 2009 (r186874) +++ head/sys/sys/soundcard.h Wed Jan 7 21:12:33 2009 (r186875) @@ -1639,7 +1639,10 @@ typedef struct oss_sysinfo int openedmidi[8]; /* Bit mask telling which midi devices are busy */ int numcards; /* Number of sound cards in the system */ - int filler[241]; /* For future expansion (set to -1) */ + int numaudioengines; /* Number of audio engines in the system */ + char license[16]; /* For example "GPL" or "CDDL" */ + char revision_info[256]; /* For internal use */ + int filler[172]; /* For future expansion (set to -1) */ } oss_sysinfo; typedef struct oss_mixext From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 21:25:44 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E74501065670; Wed, 7 Jan 2009 21:25:44 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5ABC8FC08; Wed, 7 Jan 2009 21:25:44 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07LPiDr000170; Wed, 7 Jan 2009 21:25:44 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07LPiek000168; Wed, 7 Jan 2009 21:25:44 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901072125.n07LPiek000168@svn.freebsd.org> From: Marius Strobl Date: Wed, 7 Jan 2009 21:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186876 - head/sys/dev/dcons X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 21:25:45 -0000 Author: marius Date: Wed Jan 7 21:25:44 2009 New Revision: 186876 URL: http://svn.freebsd.org/changeset/base/186876 Log: Check the return values of contigmalloc(9) as well as bus_dma(9) functions and stop attaching of dcons(4) and dcons_crom(4) if they indicate failure. This fixes a panic seen on sparc64 machines with no free physical memory in the requested 32-bit region but still doesn't make dcons(4)/dcons_crom(4) these work. I think the latter can be fixed by simply specifying ~0UL as the upper limit for contigmalloc(9) and letting the bounce pages and the IOMMU respectively handle limitations of the DMA engine. I didn't want to change that without the consensus of simokawa@ though, who unfortunately didn't reply so far. MFC after: 1 week Modified: head/sys/dev/dcons/dcons_crom.c head/sys/dev/dcons/dcons_os.c Modified: head/sys/dev/dcons/dcons_crom.c ============================================================================== --- head/sys/dev/dcons/dcons_crom.c Wed Jan 7 21:12:33 2009 (r186875) +++ head/sys/dev/dcons/dcons_crom.c Wed Jan 7 21:25:44 2009 (r186876) @@ -205,7 +205,10 @@ dcons_crom_attach(device_t dev) return (-1); #else struct dcons_crom_softc *sc; + int error; + if (dcons_conf->buf == NULL) + return (ENXIO); sc = (struct dcons_crom_softc *) device_get_softc(dev); sc->fd.fc = device_get_ivars(dev); sc->fd.dev = dev; @@ -213,7 +216,7 @@ dcons_crom_attach(device_t dev) sc->fd.post_busreset = (void *) dcons_crom_post_busreset; /* map dcons buffer */ - bus_dma_tag_create( + error = bus_dma_tag_create( /*parent*/ sc->fd.fc->dmat, /*alignment*/ sizeof(u_int32_t), /*boundary*/ 0, @@ -229,10 +232,16 @@ dcons_crom_attach(device_t dev) /*lockarg*/&Giant, #endif &sc->dma_tag); - bus_dmamap_create(sc->dma_tag, BUS_DMA_COHERENT, &sc->dma_map); - bus_dmamap_load(sc->dma_tag, sc->dma_map, + if (error != 0) + return (error); + error = bus_dmamap_create(sc->dma_tag, BUS_DMA_COHERENT, &sc->dma_map); + if (error != 0) + return (error); + error = bus_dmamap_load(sc->dma_tag, sc->dma_map, (void *)dcons_conf->buf, dcons_conf->size, dmamap_cb, sc, 0); + if (error != 0) + return (error); sc->ehand = EVENTHANDLER_REGISTER(dcons_poll, dcons_crom_poll, (void *)sc, 0); return (0); Modified: head/sys/dev/dcons/dcons_os.c ============================================================================== --- head/sys/dev/dcons/dcons_os.c Wed Jan 7 21:12:33 2009 (r186875) +++ head/sys/dev/dcons/dcons_os.c Wed Jan 7 21:25:44 2009 (r186876) @@ -336,6 +336,8 @@ dcons_drv_init(int stage) */ dg.buf = (struct dcons_buf *) contigmalloc(dg.size, M_DEVBUF, 0, 0x10000, 0xffffffff, PAGE_SIZE, 0ul); + if (dg.buf == NULL) + return (-1); dcons_init(dg.buf, dg.size, sc); } @@ -400,8 +402,8 @@ dcons_modevent(module_t mode, int type, switch (type) { case MOD_LOAD: ret = dcons_drv_init(1); - dcons_attach(); if (ret == 0) { + dcons_attach(); dcons_cnprobe(&dcons_consdev); dcons_cninit(&dcons_consdev); cnadd(&dcons_consdev); @@ -409,13 +411,15 @@ dcons_modevent(module_t mode, int type, break; case MOD_UNLOAD: printf("dcons: unload\n"); - callout_stop(&dcons_callout); - cnremove(&dcons_consdev); - dcons_detach(DCONS_CON); - dcons_detach(DCONS_GDB); - dg.buf->magic = 0; + if (drv_init == 1) { + callout_stop(&dcons_callout); + cnremove(&dcons_consdev); + dcons_detach(DCONS_CON); + dcons_detach(DCONS_GDB); + dg.buf->magic = 0; - contigfree(dg.buf, DCONS_BUF_SIZE, M_DEVBUF); + contigfree(dg.buf, DCONS_BUF_SIZE, M_DEVBUF); + } break; case MOD_SHUTDOWN: From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 21:52:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA3721065820; Wed, 7 Jan 2009 21:52:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A72BB8FC13; Wed, 7 Jan 2009 21:52:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07Lql69000813; Wed, 7 Jan 2009 21:52:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07Lql7h000807; Wed, 7 Jan 2009 21:52:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901072152.n07Lql7h000807@svn.freebsd.org> From: Marius Strobl Date: Wed, 7 Jan 2009 21:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186878 - head/sys/dev/mpt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 21:52:49 -0000 Author: marius Date: Wed Jan 7 21:52:47 2009 New Revision: 186878 URL: http://svn.freebsd.org/changeset/base/186878 Log: Make the whole initiator mode part of mpt(4) endian-clean, specifically SPI controllers now also work in big-endian machines and some conversions relevant for FC and SAS controllers as well as support for ILP32 machines which all were omitted in previous attempts are now also implemented. The IOCTL-interface is intentionally left (and where needed actually changed) to be completely little-endian as otherwise we would have to add conversion code for every possible configuration page to mpt(4), which didn't seem the right thing to do, neither did converting only half of the user- interface to the native byte order. This change was tested on amd64 (SAS+SPI), i386 (SAS) and sparc64 (SAS+SPI). Due to lack of the necessary hardware the target mode code is still left to be made endian-clean. Reviewed by: scottl MFC after: 1 month Modified: head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt.h head/sys/dev/mpt/mpt_cam.c head/sys/dev/mpt/mpt_raid.c head/sys/dev/mpt/mpt_user.c Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Wed Jan 7 21:36:24 2009 (r186877) +++ head/sys/dev/mpt/mpt.c Wed Jan 7 21:52:47 2009 (r186878) @@ -1637,7 +1637,7 @@ mpt_read_extcfg_header(struct mpt_softc rslt->PageVersion = cfgp->Header.PageVersion; rslt->PageNumber = cfgp->Header.PageNumber; rslt->PageType = cfgp->Header.PageType; - rslt->ExtPageLength = cfgp->ExtPageLength; + rslt->ExtPageLength = le16toh(cfgp->ExtPageLength); rslt->ExtPageType = cfgp->ExtPageType; error = 0; break; @@ -1668,7 +1668,7 @@ mpt_read_extcfg_page(struct mpt_softc *m req = mpt_get_request(mpt, sleep_ok); if (req == NULL) { - mpt_prt(mpt, "mpt_read_cfg_page: Get request failed!\n"); + mpt_prt(mpt, "mpt_read_extcfg_page: Get request failed!\n"); return (-1); } @@ -2025,6 +2025,7 @@ mpt_read_config_info_ioc(struct mpt_soft mpt_raid_free_mem(mpt); return (EIO); } + mpt2host_config_page_ioc3(mpt->ioc_page3); mpt_raid_wakeup(mpt); return (0); } @@ -2760,6 +2761,7 @@ mpt_enable_ioc(struct mpt_softc *mpt, in void mpt2host_sge_simple_union(SGE_SIMPLE_UNION *sge) { + MPT_2_HOST32(sge, FlagsLength); MPT_2_HOST32(sge, u.Address64.Low); MPT_2_HOST32(sge, u.Address64.High); @@ -2768,6 +2770,7 @@ mpt2host_sge_simple_union(SGE_SIMPLE_UNI void mpt2host_iocfacts_reply(MSG_IOC_FACTS_REPLY *rp) { + MPT_2_HOST16(rp, MsgVersion); MPT_2_HOST16(rp, HeaderVersion); MPT_2_HOST32(rp, MsgContext); @@ -2794,6 +2797,7 @@ mpt2host_iocfacts_reply(MSG_IOC_FACTS_RE void mpt2host_portfacts_reply(MSG_PORT_FACTS_REPLY *pfp) { + MPT_2_HOST16(pfp, Reserved); MPT_2_HOST16(pfp, Reserved1); MPT_2_HOST32(pfp, MsgContext); @@ -2809,20 +2813,139 @@ mpt2host_portfacts_reply(MSG_PORT_FACTS_ MPT_2_HOST16(pfp, Reserved4); MPT_2_HOST32(pfp, Reserved5); } + void mpt2host_config_page_ioc2(CONFIG_PAGE_IOC_2 *ioc2) { int i; - ioc2->CapabilitiesFlags = htole32(ioc2->CapabilitiesFlags); + + MPT_2_HOST32(ioc2, CapabilitiesFlags); for (i = 0; i < MPI_IOC_PAGE_2_RAID_VOLUME_MAX; i++) { MPT_2_HOST16(ioc2, RaidVolume[i].Reserved3); } } void +mpt2host_config_page_ioc3(CONFIG_PAGE_IOC_3 *ioc3) +{ + + MPT_2_HOST16(ioc3, Reserved2); +} + +void +mpt2host_config_page_scsi_port_0(CONFIG_PAGE_SCSI_PORT_0 *sp0) +{ + + MPT_2_HOST32(sp0, Capabilities); + MPT_2_HOST32(sp0, PhysicalInterface); +} + +void +mpt2host_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *sp1) +{ + + MPT_2_HOST32(sp1, Configuration); + MPT_2_HOST32(sp1, OnBusTimerValue); + MPT_2_HOST16(sp1, IDConfig); +} + +void +host2mpt_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *sp1) +{ + + HOST_2_MPT32(sp1, Configuration); + HOST_2_MPT32(sp1, OnBusTimerValue); + HOST_2_MPT16(sp1, IDConfig); +} + +void +mpt2host_config_page_scsi_port_2(CONFIG_PAGE_SCSI_PORT_2 *sp2) +{ + int i; + + MPT_2_HOST32(sp2, PortFlags); + MPT_2_HOST32(sp2, PortSettings); + for (i = 0; i < sizeof(sp2->DeviceSettings) / + sizeof(*sp2->DeviceSettings); i++) { + MPT_2_HOST16(sp2, DeviceSettings[i].DeviceFlags); + } +} + +void +mpt2host_config_page_scsi_device_0(CONFIG_PAGE_SCSI_DEVICE_0 *sd0) +{ + + MPT_2_HOST32(sd0, NegotiatedParameters); + MPT_2_HOST32(sd0, Information); +} + +void +mpt2host_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *sd1) +{ + + MPT_2_HOST32(sd1, RequestedParameters); + MPT_2_HOST32(sd1, Reserved); + MPT_2_HOST32(sd1, Configuration); +} + +void +host2mpt_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *sd1) +{ + + HOST_2_MPT32(sd1, RequestedParameters); + HOST_2_MPT32(sd1, Reserved); + HOST_2_MPT32(sd1, Configuration); +} + +void +mpt2host_config_page_fc_port_0(CONFIG_PAGE_FC_PORT_0 *fp0) +{ + + MPT_2_HOST32(fp0, Flags); + MPT_2_HOST32(fp0, PortIdentifier); + MPT_2_HOST32(fp0, WWNN.Low); + MPT_2_HOST32(fp0, WWNN.High); + MPT_2_HOST32(fp0, WWPN.Low); + MPT_2_HOST32(fp0, WWPN.High); + MPT_2_HOST32(fp0, SupportedServiceClass); + MPT_2_HOST32(fp0, SupportedSpeeds); + MPT_2_HOST32(fp0, CurrentSpeed); + MPT_2_HOST32(fp0, MaxFrameSize); + MPT_2_HOST32(fp0, FabricWWNN.Low); + MPT_2_HOST32(fp0, FabricWWNN.High); + MPT_2_HOST32(fp0, FabricWWPN.Low); + MPT_2_HOST32(fp0, FabricWWPN.High); + MPT_2_HOST32(fp0, DiscoveredPortsCount); + MPT_2_HOST32(fp0, MaxInitiators); +} + +void +mpt2host_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *fp1) +{ + + MPT_2_HOST32(fp1, Flags); + MPT_2_HOST32(fp1, NoSEEPROMWWNN.Low); + MPT_2_HOST32(fp1, NoSEEPROMWWNN.High); + MPT_2_HOST32(fp1, NoSEEPROMWWPN.Low); + MPT_2_HOST32(fp1, NoSEEPROMWWPN.High); +} + +void +host2mpt_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *fp1) +{ + + HOST_2_MPT32(fp1, Flags); + HOST_2_MPT32(fp1, NoSEEPROMWWNN.Low); + HOST_2_MPT32(fp1, NoSEEPROMWWNN.High); + HOST_2_MPT32(fp1, NoSEEPROMWWPN.Low); + HOST_2_MPT32(fp1, NoSEEPROMWWPN.High); +} + +void mpt2host_config_page_raid_vol_0(CONFIG_PAGE_RAID_VOL_0 *volp) { int i; + MPT_2_HOST16(volp, VolumeStatus.Reserved); MPT_2_HOST16(volp, VolumeSettings.Settings); MPT_2_HOST32(volp, MaxLBA); @@ -2836,8 +2959,21 @@ mpt2host_config_page_raid_vol_0(CONFIG_P } void +mpt2host_config_page_raid_phys_disk_0(CONFIG_PAGE_RAID_PHYS_DISK_0 *rpd0) +{ + + MPT_2_HOST32(rpd0, Reserved1); + MPT_2_HOST16(rpd0, PhysDiskStatus.Reserved); + MPT_2_HOST32(rpd0, MaxLBA); + MPT_2_HOST16(rpd0, ErrorData.Reserved); + MPT_2_HOST16(rpd0, ErrorData.ErrorCount); + MPT_2_HOST16(rpd0, ErrorData.SmartCount); +} + +void mpt2host_mpi_raid_vol_indicator(MPI_RAID_VOL_INDICATOR *vi) { + MPT_2_HOST16(vi, TotalBlocks.High); MPT_2_HOST16(vi, TotalBlocks.Low); MPT_2_HOST16(vi, BlocksRemaining.High); Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Wed Jan 7 21:36:24 2009 (r186877) +++ head/sys/dev/mpt/mpt.h Wed Jan 7 21:52:47 2009 (r186878) @@ -317,14 +317,39 @@ void mpt2host_sge_simple_union(SGE_SIMPL void mpt2host_iocfacts_reply(MSG_IOC_FACTS_REPLY *); void mpt2host_portfacts_reply(MSG_PORT_FACTS_REPLY *); void mpt2host_config_page_ioc2(CONFIG_PAGE_IOC_2 *); +void mpt2host_config_page_ioc3(CONFIG_PAGE_IOC_3 *); +void mpt2host_config_page_scsi_port_0(CONFIG_PAGE_SCSI_PORT_0 *); +void mpt2host_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *); +void host2mpt_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *); +void mpt2host_config_page_scsi_port_2(CONFIG_PAGE_SCSI_PORT_2 *); +void mpt2host_config_page_scsi_device_0(CONFIG_PAGE_SCSI_DEVICE_0 *); +void mpt2host_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *); +void host2mpt_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *); +void mpt2host_config_page_fc_port_0(CONFIG_PAGE_FC_PORT_0 *); +void mpt2host_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *); +void host2mpt_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *); void mpt2host_config_page_raid_vol_0(CONFIG_PAGE_RAID_VOL_0 *); +void mpt2host_config_page_raid_phys_disk_0(CONFIG_PAGE_RAID_PHYS_DISK_0 *); void mpt2host_mpi_raid_vol_indicator(MPI_RAID_VOL_INDICATOR *); #else #define mpt2host_sge_simple_union(x) do { ; } while (0) #define mpt2host_iocfacts_reply(x) do { ; } while (0) #define mpt2host_portfacts_reply(x) do { ; } while (0) #define mpt2host_config_page_ioc2(x) do { ; } while (0) +#define mpt2host_config_page_ioc3(x) do { ; } while (0) +#define mpt2host_config_page_scsi_port_0(x) do { ; } while (0) +#define mpt2host_config_page_scsi_port_1(x) do { ; } while (0) +#define host2mpt_config_page_scsi_port_1(x) do { ; } while (0) +#define mpt2host_config_page_scsi_port_2(x) do { ; } while (0) +#define mpt2host_config_page_scsi_device_0(x) do { ; } while (0) +#define mpt2host_config_page_scsi_device_1(x) do { ; } while (0) +#define host2mpt_config_page_scsi_device_1(x) do { ; } while (0) +#define mpt2host_config_page_fc_port_0(x) do { ; } while (0) +#define mpt2host_config_page_fc_port_1(x) do { ; } while (0) +#define host2mpt_config_page_fc_port_1(x) do { ; } while (0) #define mpt2host_config_page_raid_vol_0(x) do { ; } while (0) +#define mpt2host_config_page_raid_phys_disk_0(x) \ + do { ; } while (0) #define mpt2host_mpi_raid_vol_indicator(x) do { ; } while (0) #endif Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Wed Jan 7 21:36:24 2009 (r186877) +++ head/sys/dev/mpt/mpt_cam.c Wed Jan 7 21:52:47 2009 (r186878) @@ -437,6 +437,7 @@ mpt_read_config_info_fc(struct mpt_softc mpt_prt(mpt, "failed to read FC Port Page 0\n"); return (-1); } + mpt2host_config_page_fc_port_0(&mpt->mpt_fcport_page0); mpt->mpt_fcport_speed = mpt->mpt_fcport_page0.CurrentSpeed; @@ -527,13 +528,14 @@ mpt_set_initial_config_fc(struct mpt_sof mpt_prt(mpt, "failed to read FC page 1\n"); return (mpt_fc_reset_link(mpt, 1)); } + mpt2host_config_page_fc_port_1(&fc); /* * Check our flags to make sure we support the role we want. */ doit = 0; role = 0; - fl = le32toh(fc.Flags);; + fl = fc.Flags; if (fl & MPI_FCPORTPAGE1_FLAGS_PROT_FCP_INIT) { role |= MPT_ROLE_INITIATOR; @@ -587,7 +589,8 @@ mpt_set_initial_config_fc(struct mpt_sof } if (doit) { - fc.Flags = htole32(fl); + fc.Flags = fl; + host2mpt_config_page_fc_port_1(&fc); r = mpt_write_cfg_page(mpt, MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM, 0, &fc.Header, sizeof(fc), FALSE, 5000); @@ -982,6 +985,7 @@ mpt_read_config_info_spi(struct mpt_soft if (rv) { mpt_prt(mpt, "failed to read SPI Port Page 0\n"); } else { + mpt2host_config_page_scsi_port_0(&mpt->mpt_port_page0); mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "SPI Port Page 0: Capabilities %x PhysicalInterface %x\n", mpt->mpt_port_page0.Capabilities, @@ -993,6 +997,7 @@ mpt_read_config_info_spi(struct mpt_soft if (rv) { mpt_prt(mpt, "failed to read SPI Port Page 1\n"); } else { + mpt2host_config_page_scsi_port_1(&mpt->mpt_port_page1); mpt_lprt(mpt, MPT_PRT_DEBUG, "SPI Port Page 1: Configuration %x OnBusTimerValue %x\n", mpt->mpt_port_page1.Configuration, @@ -1008,6 +1013,7 @@ mpt_read_config_info_spi(struct mpt_soft "Port Page 2: Flags %x Settings %x\n", mpt->mpt_port_page2.PortFlags, mpt->mpt_port_page2.PortSettings); + mpt2host_config_page_scsi_port_2(&mpt->mpt_port_page2); for (i = 0; i < 16; i++) { mpt_lprt(mpt, MPT_PRT_NEGOTIATION, " Port Page 2 Tgt %d: timo %x SF %x Flags %x\n", @@ -1026,6 +1032,7 @@ mpt_read_config_info_spi(struct mpt_soft "cannot read SPI Target %d Device Page 0\n", i); continue; } + mpt2host_config_page_scsi_device_0(&mpt->mpt_dev_page0[i]); mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "target %d page 0: Negotiated Params %x Information %x\n", i, mpt->mpt_dev_page0[i].NegotiatedParameters, @@ -1039,6 +1046,7 @@ mpt_read_config_info_spi(struct mpt_soft "cannot read SPI Target %d Device Page 1\n", i); continue; } + mpt2host_config_page_scsi_device_1(&mpt->mpt_dev_page1[i]); mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "target %d page 1: Requested Params %x Configuration %x\n", i, mpt->mpt_dev_page1[i].RequestedParameters, @@ -1068,6 +1076,7 @@ mpt_set_initial_config_spi(struct mpt_so "be %x\n", mpt->mpt_port_page1.Configuration, pp1val); tmp = mpt->mpt_port_page1; tmp.Configuration = pp1val; + host2mpt_config_page_scsi_port_1(&tmp); error = mpt_write_cur_cfg_page(mpt, 0, &tmp.Header, sizeof(tmp), FALSE, 5000); if (error) { @@ -1078,6 +1087,7 @@ mpt_set_initial_config_spi(struct mpt_so if (error) { return (-1); } + mpt2host_config_page_scsi_port_1(&tmp); if (tmp.Configuration != pp1val) { mpt_prt(mpt, "failed to reset SPI Port Page 1 Config value\n"); @@ -1432,7 +1442,8 @@ bad: memset(se, 0, sizeof (*se)); se->Address.Low = htole32(dm_segs->ds_addr & 0xffffffff); if (sizeof(bus_addr_t) > 4) { - se->Address.High = ((uint64_t) dm_segs->ds_addr) >> 32; + se->Address.High = + htole32(((uint64_t)dm_segs->ds_addr) >> 32); } MPI_pSGE_SET_LENGTH(se, dm_segs->ds_len); tf = flags; @@ -1507,9 +1518,9 @@ bad: chain_list_addr += cur_off; if (sizeof (bus_addr_t) > 4) { ce->Address.High = - htole32((uint32_t) ((uint64_t)chain_list_addr >> 32)); + htole32(((uint64_t)chain_list_addr) >> 32); } - ce->Address.Low = htole32((uint32_t) chain_list_addr); + ce->Address.Low = htole32(chain_list_addr & 0xffffffff); ce->Flags = MPI_SGE_FLAGS_CHAIN_ELEMENT | MPI_SGE_FLAGS_64_BIT_ADDRESSING; @@ -1536,6 +1547,7 @@ bad: ce->Length = (this_seg_lim - seg) * sizeof (SGE_SIMPLE64); } + ce->Length = htole16(ce->Length); /* * Fill in the chain list SGE elements with our segment data. @@ -1546,7 +1558,8 @@ bad: */ while (seg < this_seg_lim) { memset(se, 0, sizeof (*se)); - se->Address.Low = htole32(dm_segs->ds_addr); + se->Address.Low = htole32(dm_segs->ds_addr & + 0xffffffff); if (sizeof (bus_addr_t) > 4) { se->Address.High = htole32(((uint64_t)dm_segs->ds_addr) >> 32); @@ -1830,7 +1843,7 @@ bad: uint32_t tf; memset(se, 0,sizeof (*se)); - se->Address = dm_segs->ds_addr; + se->Address = htole32(dm_segs->ds_addr); @@ -1908,7 +1921,7 @@ bad: - ce->Address = chain_list_addr; + ce->Address = htole32(chain_list_addr); ce->Flags = MPI_SGE_FLAGS_CHAIN_ELEMENT; @@ -1935,6 +1948,7 @@ bad: ce->Length = (this_seg_lim - seg) * sizeof (SGE_SIMPLE32); } + ce->Length = htole16(ce->Length); /* * Fill in the chain list SGE elements with our segment data. @@ -1945,7 +1959,7 @@ bad: */ while (seg < this_seg_lim) { memset(se, 0, sizeof (*se)); - se->Address = dm_segs->ds_addr; + se->Address = htole32(dm_segs->ds_addr); @@ -2193,6 +2207,7 @@ mpt_start(struct cam_sim *sim, union ccb mpt_req->Control |= MPI_SCSIIO_CONTROL_NO_DISCONNECT; } } + mpt_req->Control = htole32(mpt_req->Control); /* Copy the scsi command block into place */ if ((ccb->ccb_h.flags & CAM_CDB_POINTER) != 0) { @@ -2317,7 +2332,7 @@ mpt_bus_reset(struct mpt_softc *mpt, tar error = mpt_wait_req(mpt, mpt->tmf_req, REQ_STATE_DONE, REQ_STATE_DONE, sleep_ok, 5000); - status = mpt->tmf_req->IOCStatus; + status = le16toh(mpt->tmf_req->IOCStatus); response = mpt->tmf_req->ResponseCode; mpt->tmf_req->state = REQ_STATE_FREE; @@ -2524,10 +2539,11 @@ mpt_cam_event(struct mpt_softc *mpt, req struct cam_sim *sim; struct cam_path *tmppath; struct ccb_relsim crs; - PTR_EVENT_DATA_QUEUE_FULL pqf = - (PTR_EVENT_DATA_QUEUE_FULL) msg->Data; + PTR_EVENT_DATA_QUEUE_FULL pqf; lun_id_t lun_id; + pqf = (PTR_EVENT_DATA_QUEUE_FULL)msg->Data; + pqf->CurrentDepth = le16toh(pqf->CurrentDepth); mpt_prt(mpt, "QUEUE FULL EVENT: Bus 0x%02x Target 0x%02x Depth " "%d\n", pqf->Bus, pqf->TargetID, pqf->CurrentDepth); if (mpt->phydisk_sim) { @@ -3086,9 +3102,10 @@ mpt_scsi_reply_frame_handler(struct mpt_ && (ccb->ccb_h.flags & (CAM_SENSE_PHYS | CAM_SENSE_PTR)) == 0) { ccb->ccb_h.status |= CAM_AUTOSNS_VALID; ccb->csio.sense_resid = - ccb->csio.sense_len - scsi_io_reply->SenseCount; + ccb->csio.sense_len - le32toh(scsi_io_reply->SenseCount); bcopy(req->sense_vbuf, &ccb->csio.sense_data, - min(ccb->csio.sense_len, scsi_io_reply->SenseCount)); + min(ccb->csio.sense_len, + le32toh(scsi_io_reply->SenseCount))); } if ((sstate & MPI_SCSI_STATE_QUEUE_TAG_REJECTED) != 0) { @@ -3776,6 +3793,8 @@ mpt_get_spi_settings(struct mpt_softc *m mpt_prt(mpt, "can't get tgt %d config page 0\n", tgt); return (rv); } + mpt2host_config_page_scsi_device_0(&tmp); + MPTLOCK_2_CAMLOCK(mpt); mpt_lprt(mpt, MPT_PRT_DEBUG, "mpt_get_spi_settings[%d]: current NP %x Info %x\n", tgt, @@ -3905,6 +3924,7 @@ mpt_update_spi_config(struct mpt_softc * "mpt_update_spi_config[%d].page1: Requested Params 0x%08x\n", tgt, mpt->mpt_dev_page1[tgt].RequestedParameters); tmp = mpt->mpt_dev_page1[tgt]; + host2mpt_config_page_scsi_device_1(&tmp); rv = mpt_write_cur_cfg_page(mpt, tgt, &tmp.Header, sizeof(tmp), FALSE, 5000); if (rv) { @@ -4156,7 +4176,7 @@ mpt_recover_commands(struct mpt_softc *m error = mpt_wait_req(mpt, mpt->tmf_req, REQ_STATE_DONE, REQ_STATE_DONE, TRUE, 500); - status = mpt->tmf_req->IOCStatus; + status = le16toh(mpt->tmf_req->IOCStatus); response = mpt->tmf_req->ResponseCode; mpt->tmf_req->state = REQ_STATE_FREE; Modified: head/sys/dev/mpt/mpt_raid.c ============================================================================== --- head/sys/dev/mpt/mpt_raid.c Wed Jan 7 21:36:24 2009 (r186877) +++ head/sys/dev/mpt/mpt_raid.c Wed Jan 7 21:52:47 2009 (r186878) @@ -564,7 +564,7 @@ mpt_raid_reply_frame_handler(struct mpt_ action_result = REQ_TO_RAID_ACTION_RESULT(req); memcpy(&action_result->action_data, &reply->ActionData, sizeof(action_result->action_data)); - action_result->action_status = reply->ActionStatus; + action_result->action_status = le16toh(reply->ActionStatus); return (TRUE); } @@ -583,7 +583,7 @@ mpt_issue_raid_req(struct mpt_softc *mpt rap = req->req_vbuf; memset(rap, 0, sizeof *rap); rap->Action = Action; - rap->ActionDataWord = ActionDataWord; + rap->ActionDataWord = htole32(ActionDataWord); rap->Function = MPI_FUNCTION_RAID_ACTION; rap->VolumeID = vol->config_page->VolumeID; rap->VolumeBus = vol->config_page->VolumeBus; @@ -592,12 +592,13 @@ mpt_issue_raid_req(struct mpt_softc *mpt else rap->PhysDiskNum = 0xFF; se = (SGE_SIMPLE32 *)&rap->ActionDataSGE; - se->Address = addr; + se->Address = htole32(addr); MPI_pSGE_SET_LENGTH(se, len); MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT | MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER | MPI_SGE_FLAGS_END_OF_LIST | write ? MPI_SGE_FLAGS_HOST_TO_IOC : MPI_SGE_FLAGS_IOC_TO_HOST)); + se->FlagsLength = htole32(se->FlagsLength); rap->MsgContext = htole32(req->index | raid_handler_id); mpt_check_doorbell(mpt); @@ -1226,6 +1227,7 @@ mpt_refresh_raid_disk(struct mpt_softc * mpt_prt(mpt, "mpt_refresh_raid_disk: " "Failed to read RAID Disk Page(%d)\n", ioc_disk->PhysDiskNum); + mpt2host_config_page_raid_phys_disk_0(&mpt_disk->config_page); } static void @@ -1354,6 +1356,7 @@ mpt_refresh_raid_data(struct mpt_softc * "mpt_refresh_raid_data: Failed to read IOC Page 3\n"); return (-1); } + mpt2host_config_page_ioc3(mpt->ioc_page3); ioc_disk = mpt->ioc_page3->PhysDisk; ioc_last_disk = ioc_disk + mpt->ioc_page3->NumPhysDisks; @@ -1384,6 +1387,7 @@ mpt_refresh_raid_data(struct mpt_softc * "Failed to read IOC Page 2\n"); return (-1); } + mpt2host_config_page_ioc2(mpt->ioc_page2); ioc_vol = mpt->ioc_page2->RaidVolume; ioc_last_vol = ioc_vol + mpt->ioc_page2->NumActiveVolumes; Modified: head/sys/dev/mpt/mpt_user.c ============================================================================== --- head/sys/dev/mpt/mpt_user.c Wed Jan 7 21:36:24 2009 (r186877) +++ head/sys/dev/mpt/mpt_user.c Wed Jan 7 21:52:47 2009 (r186878) @@ -256,7 +256,7 @@ mpt_user_read_cfg_header(struct mpt_soft params.PageLength = 0; params.PageNumber = page_req->header.PageNumber; params.PageType = page_req->header.PageType; - params.PageAddress = page_req->page_address; + params.PageAddress = le32toh(page_req->page_address); error = mpt_issue_cfg_req(mpt, req, ¶ms, /*addr*/0, /*len*/0, TRUE, 5000); if (error != 0) { @@ -270,7 +270,7 @@ mpt_user_read_cfg_header(struct mpt_soft return (ETIMEDOUT); } - page_req->ioc_status = req->IOCStatus; + page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) { cfgp = req->req_vbuf; bcopy(&cfgp->Header, &page_req->header, @@ -301,15 +301,15 @@ mpt_user_read_cfg_page(struct mpt_softc params.PageLength = hdr->PageLength; params.PageNumber = hdr->PageNumber; params.PageType = hdr->PageType & MPI_CONFIG_PAGETYPE_MASK; - params.PageAddress = page_req->page_address; + params.PageAddress = le32toh(page_req->page_address); error = mpt_issue_cfg_req(mpt, req, ¶ms, mpt_page->paddr, - page_req->len, TRUE, 5000); + le32toh(page_req->len), TRUE, 5000); if (error != 0) { mpt_prt(mpt, "mpt_user_read_cfg_page timed out\n"); return (ETIMEDOUT); } - page_req->ioc_status = req->IOCStatus; + page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_POSTREAD); @@ -337,7 +337,7 @@ mpt_user_read_extcfg_header(struct mpt_s params.PageLength = 0; params.PageNumber = ext_page_req->header.PageNumber; params.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; - params.PageAddress = ext_page_req->page_address; + params.PageAddress = le32toh(ext_page_req->page_address); params.ExtPageType = ext_page_req->header.ExtPageType; params.ExtPageLength = 0; error = mpt_issue_cfg_req(mpt, req, ¶ms, /*addr*/0, /*len*/0, @@ -353,7 +353,7 @@ mpt_user_read_extcfg_header(struct mpt_s return (ETIMEDOUT); } - ext_page_req->ioc_status = req->IOCStatus; + ext_page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) { cfgp = req->req_vbuf; ext_page_req->header.PageVersion = cfgp->Header.PageVersion; @@ -387,17 +387,17 @@ mpt_user_read_extcfg_page(struct mpt_sof params.PageLength = 0; params.PageNumber = hdr->PageNumber; params.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; - params.PageAddress = ext_page_req->page_address; + params.PageAddress = le32toh(ext_page_req->page_address); params.ExtPageType = hdr->ExtPageType; params.ExtPageLength = hdr->ExtPageLength; error = mpt_issue_cfg_req(mpt, req, ¶ms, mpt_page->paddr, - ext_page_req->len, TRUE, 5000); + le32toh(ext_page_req->len), TRUE, 5000); if (error != 0) { mpt_prt(mpt, "mpt_user_read_extcfg_page timed out\n"); return (ETIMEDOUT); } - ext_page_req->ioc_status = req->IOCStatus; + ext_page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_POSTREAD); @@ -446,7 +446,7 @@ mpt_user_write_cfg_page(struct mpt_softc params.PageVersion = hdr->PageVersion; params.PageLength = hdr->PageLength; params.PageNumber = hdr->PageNumber; - params.PageAddress = page_req->page_address; + params.PageAddress = le32toh(page_req->page_address); #if 0 /* Restore stripped out attributes */ hdr->PageType |= hdr_attr; @@ -455,13 +455,13 @@ mpt_user_write_cfg_page(struct mpt_softc params.PageType = hdr->PageType; #endif error = mpt_issue_cfg_req(mpt, req, ¶ms, mpt_page->paddr, - page_req->len, TRUE, 5000); + le32toh(page_req->len), TRUE, 5000); if (error != 0) { mpt_prt(mpt, "mpt_write_cfg_page timed out\n"); return (ETIMEDOUT); } - page_req->ioc_status = req->IOCStatus; + page_req->ioc_status = htole16(req->IOCStatus); mpt_free_request(mpt, req); return (0); } @@ -536,14 +536,15 @@ mpt_user_raid_action(struct mpt_softc *m if (mpt_page->vaddr != NULL && raid_act->len != 0) { bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_PREWRITE); - se->Address = mpt_page->paddr; - MPI_pSGE_SET_LENGTH(se, raid_act->len); + se->Address = htole32(mpt_page->paddr); + MPI_pSGE_SET_LENGTH(se, le32toh(raid_act->len)); MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT | MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER | MPI_SGE_FLAGS_END_OF_LIST | raid_act->write ? MPI_SGE_FLAGS_HOST_TO_IOC : MPI_SGE_FLAGS_IOC_TO_HOST)); } + se->FlagsLength = htole32(se->FlagsLength); rap->MsgContext = htole32(req->index | user_handler_id); mpt_check_doorbell(mpt); @@ -559,7 +560,7 @@ mpt_user_raid_action(struct mpt_softc *m return (error); } - raid_act->ioc_status = req->IOCStatus; + raid_act->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) != MPI_IOCSTATUS_SUCCESS) { mpt_free_request(mpt, req); return (0); From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 23:30:27 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 152A1106566B; Wed, 7 Jan 2009 23:30:27 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04FFF8FC1E; Wed, 7 Jan 2009 23:30:27 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07NUQkv002685; Wed, 7 Jan 2009 23:30:26 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07NUQPZ002684; Wed, 7 Jan 2009 23:30:26 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901072330.n07NUQPZ002684@svn.freebsd.org> From: Sam Leffler Date: Wed, 7 Jan 2009 23:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186879 - head/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 23:30:27 -0000 Author: sam Date: Wed Jan 7 23:30:26 2009 New Revision: 186879 URL: http://svn.freebsd.org/changeset/base/186879 Log: correct fixed rate handling; the rixmap was changed a while back to be indexed by the ieee rate code Modified: head/sys/dev/ath/ath_rate/sample/sample.c Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Wed Jan 7 21:52:47 2009 (r186878) +++ head/sys/dev/ath/ath_rate/sample/sample.c Wed Jan 7 23:30:26 2009 (r186879) @@ -754,23 +754,18 @@ ath_rate_ctl_reset(struct ath_softc *sc, sn->static_rix = -1; if (tp != NULL && tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { /* - * A fixed rate is to be used; ic_fixed_rate is the - * IEEE code for this rate (sans basic bit). Convert this - * to the index into the negotiated rate set for - * the node. + * A fixed rate is to be used; ucastrate is the IEEE code + * for this rate (sans basic bit). Check this against the + * negotiated rate set for the node. Note the fixed rate + * may not be available for various reasons so we only + * setup the static rate index if the lookup is successful. + * XXX handle MCS */ - /* NB: the rate set is assumed sorted */ - srate = ni->ni_rates.rs_nrates - 1; - for (; srate >= 0 && RATE(srate) != tp->ucastrate; srate--) - ; - /* - * The fixed rate may not be available due to races - * and mode settings. Also orphaned nodes created in - * adhoc mode may not have any rate set so this lookup - * can fail. - */ - if (srate >= 0) - sn->static_rix = sc->sc_rixmap[srate]; + for (srate = ni->ni_rates.rs_nrates - 1; srate >= 0; srate--) + if (RATE(srate) == tp->ucastrate) { + sn->static_rix = sc->sc_rixmap[tp->ucastrate]; + break; + } } /* From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 00:45:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 136D2106566C; Thu, 8 Jan 2009 00:45:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02AEC8FC12; Thu, 8 Jan 2009 00:45:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n080jlwr004299; Thu, 8 Jan 2009 00:45:47 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n080jlfQ004298; Thu, 8 Jan 2009 00:45:47 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901080045.n080jlfQ004298@svn.freebsd.org> From: Warner Losh Date: Thu, 8 Jan 2009 00:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186882 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 00:45:48 -0000 Author: imp Date: Thu Jan 8 00:45:47 2009 New Revision: 186882 URL: http://svn.freebsd.org/changeset/base/186882 Log: Make it possible to override the number of retries for the CD media. When trying to read scratched or damaged CDs and DVDs, the default mechanism is sub-optimal. Programs like ddrescue do much better if you turn off retries entirely, since their algorithms are designed scan big areas fast, then winnow the areas down. Turning off retries speeds these programs up by as much as 20x, since the drive is able to 'stream past' many small errors... The sysctl/tunable kern.cam.cd.retry_count controls this. That defaults to '4' (for a total of 5 attempts). Setting to 0 turns off all retry attempts. Reviewed by: scottl@ Modified: head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Thu Jan 8 00:31:48 2009 (r186881) +++ head/sys/cam/scsi/scsi_cd.c Thu Jan 8 00:45:47 2009 (r186882) @@ -292,6 +292,9 @@ static struct periph_driver cddriver = PERIPHDRIVER_DECLARE(cd, cddriver); +#ifndef CD_DEFAULT_RETRY +#define CD_DEFAULT_RETRY 4 +#endif #ifndef CHANGER_MIN_BUSY_SECONDS #define CHANGER_MIN_BUSY_SECONDS 5 #endif @@ -299,11 +302,15 @@ PERIPHDRIVER_DECLARE(cd, cddriver); #define CHANGER_MAX_BUSY_SECONDS 15 #endif +static int cd_retry_count = CD_DEFAULT_RETRY; static int changer_min_busy_seconds = CHANGER_MIN_BUSY_SECONDS; static int changer_max_busy_seconds = CHANGER_MAX_BUSY_SECONDS; SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver"); SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, "CD Changer"); +SYSCTL_INT(_kern_cam_cd, OID_AUTO, retry_count, CTLFLAG_RW, + &cd_retry_count, 0, "Normal I/O retry count"); +TUNABLE_INT("kern.cam.cd.retry_count", &cd_retry_count); SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, min_busy_seconds, CTLFLAG_RW, &changer_min_busy_seconds, 0, "Minimum changer scheduling quantum"); TUNABLE_INT("kern.cam.cd.changer.min_busy_seconds", &changer_min_busy_seconds); @@ -1454,7 +1461,7 @@ cdstart(struct cam_periph *periph, union devstat_start_transaction_bio(softc->disk->d_devstat, bp); scsi_read_write(&start_ccb->csio, - /*retries*/4, + /*retries*/cd_retry_count, /* cbfcnp */ cddone, MSG_SIMPLE_Q_TAG, /* read */bp->bio_cmd == BIO_READ, From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 04:26:44 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2622106566C; Thu, 8 Jan 2009 04:26:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B095A8FC0C; Thu, 8 Jan 2009 04:26:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n084QiSS008674; Thu, 8 Jan 2009 04:26:44 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n084QiEj008673; Thu, 8 Jan 2009 04:26:44 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200901080426.n084QiEj008673@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 8 Jan 2009 04:26:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186884 - head/sys/dev/fxp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 04:26:45 -0000 Author: yongari Date: Thu Jan 8 04:26:44 2009 New Revision: 186884 URL: http://svn.freebsd.org/changeset/base/186884 Log: Always check whether dma map is valid before unloading the map. When fxp(4) intializes Rx buffers for the first time, there is no loaded dma map so attempting to unload it is an invalid operation. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Thu Jan 8 02:41:40 2009 (r186883) +++ head/sys/dev/fxp/if_fxp.c Thu Jan 8 04:26:44 2009 (r186884) @@ -2545,7 +2545,8 @@ fxp_new_rfabuf(struct fxp_softc *sc, str return (error); } - bus_dmamap_unload(sc->fxp_mtag, rxp->rx_map); + if (rxp->rx_mbuf != NULL) + bus_dmamap_unload(sc->fxp_mtag, rxp->rx_map); tmp_map = sc->spare_map; sc->spare_map = rxp->rx_map; rxp->rx_map = tmp_map; From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 05:10:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8CFE106566B; Thu, 8 Jan 2009 05:10:03 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A69CC8FC18; Thu, 8 Jan 2009 05:10:03 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n085A3ji009496; Thu, 8 Jan 2009 05:10:03 GMT (envelope-from takawata@svn.freebsd.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n085A3eO009494; Thu, 8 Jan 2009 05:10:03 GMT (envelope-from takawata@svn.freebsd.org) Message-Id: <200901080510.n085A3eO009494@svn.freebsd.org> From: Takanori Watanabe Date: Thu, 8 Jan 2009 05:10:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186885 - head/sys/dev/usb2/serial X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 05:10:04 -0000 Author: takawata Date: Thu Jan 8 05:10:03 2009 New Revision: 186885 URL: http://svn.freebsd.org/changeset/base/186885 Log: Make ufoma2 driver work. 1.Sync TD on close to ensure USB request in close callback issued. 2.Add sysctls to indicate device role. 3.Enable handsfree port support. Now modem port and obex port works well. Handsfree port works but not with good response. Modified: head/sys/dev/usb2/serial/ufoma2.c head/sys/dev/usb2/serial/usb2_serial.c Modified: head/sys/dev/usb2/serial/ufoma2.c ============================================================================== --- head/sys/dev/usb2/serial/ufoma2.c Thu Jan 8 04:26:44 2009 (r186884) +++ head/sys/dev/usb2/serial/ufoma2.c Thu Jan 8 05:10:03 2009 (r186885) @@ -2,6 +2,7 @@ #include __FBSDID("$FreeBSD$"); +#define UFOMA_HANDSFREE /*- * Copyright (c) 2005, Takanori Watanabe @@ -101,6 +102,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include typedef struct ufoma_mobile_acm_descriptor { uint8_t bFunctionLength; @@ -217,6 +220,12 @@ static void ufoma_stop_read(struct usb2_ static void ufoma_start_write(struct usb2_com_softc *); static void ufoma_stop_write(struct usb2_com_softc *); +/*sysctl stuff*/ +static int ufoma_sysctl_support(SYSCTL_HANDLER_ARGS); +static int ufoma_sysctl_current(SYSCTL_HANDLER_ARGS); +static int ufoma_sysctl_open(SYSCTL_HANDLER_ARGS); + + static const struct usb2_config ufoma_ctrl_config[UFOMA_CTRL_ENDPT_MAX] = { @@ -380,6 +389,9 @@ ufoma_attach(device_t dev) struct ufoma_softc *sc = device_get_softc(dev); struct usb2_config_descriptor *cd; struct usb2_interface_descriptor *id; + struct sysctl_ctx_list *sctx; + struct sysctl_oid *soid; + usb2_mcpc_acm_descriptor *mad; uint8_t elements; int32_t error; @@ -459,6 +471,23 @@ ufoma_attach(device_t dev) DPRINTF("usb2_com_attach failed\n"); goto detach; } + /*Sysctls*/ + sctx = device_get_sysctl_ctx(dev); + soid = device_get_sysctl_tree(dev); + + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "supportmode", + CTLFLAG_RD|CTLTYPE_STRING, sc, 0, ufoma_sysctl_support, + "A", "Supporting port role"); + + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "currentmode", + CTLFLAG_RD|CTLTYPE_STRING, sc, 0, ufoma_sysctl_current, + "A", "Current port role"); + + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "openmode", + CTLFLAG_RW|CTLTYPE_STRING, sc, 0, ufoma_sysctl_open, + "A", "Mode to transit when port is opened"); + + return (0); /* success */ detach: @@ -910,7 +939,8 @@ ufoma_cfg_set_break(struct usb2_com_soft struct usb2_device_request req; uint16_t wValue; - if (sc->sc_is_pseudo) { + if (sc->sc_is_pseudo || + (sc->sc_currentmode == UMCPC_ACM_MODE_OBEX)) { return; } if (!(sc->sc_acm_cap & USB_CDC_ACM_HAS_BREAK)) { @@ -1181,3 +1211,113 @@ ufoma_stop_write(struct usb2_com_softc * usb2_transfer_stop(sc->sc_bulk_xfer[0]); } } + +struct umcpc_modetostr_tab{ + int mode; + char *str; +}umcpc_modetostr_tab[]={ + {UMCPC_ACM_MODE_DEACTIVATED, "deactivated"}, + {UMCPC_ACM_MODE_MODEM, "modem"}, + {UMCPC_ACM_MODE_ATCOMMAND, "handsfree"}, + {UMCPC_ACM_MODE_OBEX, "obex"}, + {UMCPC_ACM_MODE_VENDOR1, "vendor1"}, + {UMCPC_ACM_MODE_VENDOR2, "vendor2"}, + {UMCPC_ACM_MODE_UNLINKED, "unlinked"}, + {0, NULL} +}; + +static char *ufoma_mode_to_str(int mode) +{ + int i; + for(i = 0 ;umcpc_modetostr_tab[i].str != NULL; i++){ + if(umcpc_modetostr_tab[i].mode == mode){ + return umcpc_modetostr_tab[i].str; + } + } + return NULL; +} + +static int ufoma_str_to_mode(char *str) +{ + int i; + for(i = 0 ;umcpc_modetostr_tab[i].str != NULL; i++){ + if(strcmp(str, umcpc_modetostr_tab[i].str)==0){ + return umcpc_modetostr_tab[i].mode; + } + } + return -1; +} + +static int ufoma_sysctl_support(SYSCTL_HANDLER_ARGS) +{ + struct ufoma_softc *sc = (struct ufoma_softc *)oidp->oid_arg1; + struct sbuf sb; + int i; + char *mode; + + sbuf_new(&sb, NULL, 1, SBUF_AUTOEXTEND); + for(i = 1; i < sc->sc_modetable[0]; i++){ + mode = ufoma_mode_to_str(sc->sc_modetable[i]); + if(mode !=NULL){ + sbuf_cat(&sb, mode); + }else{ + sbuf_printf(&sb, "(%02x)", sc->sc_modetable[i]); + } + if(i < (sc->sc_modetable[0]-1)) + sbuf_cat(&sb, ","); + } + sbuf_trim(&sb); + sbuf_finish(&sb); + sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); + sbuf_delete(&sb); + + return 0; +} +static int ufoma_sysctl_current(SYSCTL_HANDLER_ARGS) +{ + struct ufoma_softc *sc = (struct ufoma_softc *)oidp->oid_arg1; + char *mode; + char subbuf[]="(XXX)"; + mode = ufoma_mode_to_str(sc->sc_currentmode); + if(!mode){ + mode = subbuf; + snprintf(subbuf, sizeof(subbuf), "(%02x)", sc->sc_currentmode); + } + sysctl_handle_string(oidp, mode, strlen(mode), req); + + return 0; + +} +static int ufoma_sysctl_open(SYSCTL_HANDLER_ARGS) +{ + struct ufoma_softc *sc = (struct ufoma_softc *)oidp->oid_arg1; + char *mode; + char subbuf[40]; + int newmode; + int error; + int i; + + mode = ufoma_mode_to_str(sc->sc_modetoactivate); + if(mode){ + strncpy(subbuf, mode, sizeof(subbuf)); + }else{ + snprintf(subbuf, sizeof(subbuf), "(%02x)", sc->sc_modetoactivate); + } + error = sysctl_handle_string(oidp, subbuf, sizeof(subbuf), req); + if(error != 0 || req->newptr == NULL){ + return error; + } + + if((newmode = ufoma_str_to_mode(subbuf)) == -1){ + return EINVAL; + } + + for(i = 1 ; i < sc->sc_modetable[0] ; i++){ + if(sc->sc_modetable[i] == newmode){ + sc->sc_modetoactivate = newmode; + return 0; + } + } + + return EINVAL; +} Modified: head/sys/dev/usb2/serial/usb2_serial.c ============================================================================== --- head/sys/dev/usb2/serial/usb2_serial.c Thu Jan 8 04:26:44 2009 (r186884) +++ head/sys/dev/usb2/serial/usb2_serial.c Thu Jan 8 05:10:03 2009 (r186885) @@ -588,7 +588,8 @@ static void usb2_com_close(struct tty *tp) { struct usb2_com_softc *sc = tty_softc(tp); - + struct usb2_com_super_softc *ssc = sc->sc_super; + mtx_assert(sc->sc_parent_mtx, MA_OWNED); DPRINTF("tp=%p\n", tp); @@ -600,6 +601,7 @@ usb2_com_close(struct tty *tp) usb2_com_shutdown(sc); usb2_com_queue_command(sc, &usb2_com_cfg_close, 0); + usb2_config_td_sync(&ssc->sc_config_td); sc->sc_flag &= ~(UCOM_FLAG_HL_READY | UCOM_FLAG_WR_START | From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 06:12:04 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10E20106564A; Thu, 8 Jan 2009 06:12:04 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 000688FC12; Thu, 8 Jan 2009 06:12:03 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n086C3pD010634; Thu, 8 Jan 2009 06:12:03 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n086C3ZR010633; Thu, 8 Jan 2009 06:12:03 GMT (envelope-from das@svn.freebsd.org) Message-Id: <200901080612.n086C3ZR010633@svn.freebsd.org> From: David Schultz Date: Thu, 8 Jan 2009 06:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186886 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 06:12:04 -0000 Author: das Date: Thu Jan 8 06:12:03 2009 New Revision: 186886 URL: http://svn.freebsd.org/changeset/base/186886 Log: Fix the types of INFINITY and NAN, which were broken in r131851. They should both be floats, not doubles. PR: 127795 Submitted by: Christoph Mallon MFC after: 2 weeks Modified: head/lib/msun/src/math.h Modified: head/lib/msun/src/math.h ============================================================================== --- head/lib/msun/src/math.h Thu Jan 8 05:10:03 2009 (r186885) +++ head/lib/msun/src/math.h Thu Jan 8 06:12:03 2009 (r186886) @@ -55,8 +55,8 @@ extern const union __nan_un { #ifdef __MATH_BUILTIN_CONSTANTS #define HUGE_VALF __builtin_huge_valf() #define HUGE_VALL __builtin_huge_vall() -#define INFINITY __builtin_inf() -#define NAN __builtin_nan("") +#define INFINITY __builtin_inff() +#define NAN __builtin_nanf("") #else #define HUGE_VALF (float)HUGE_VAL #define HUGE_VALL (long double)HUGE_VAL From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 06:38:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4241B106567A; Thu, 8 Jan 2009 06:38:07 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30A628FC14; Thu, 8 Jan 2009 06:38:07 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n086c7vq011110; Thu, 8 Jan 2009 06:38:07 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n086c7pq011109; Thu, 8 Jan 2009 06:38:07 GMT (envelope-from das@svn.freebsd.org) Message-Id: <200901080638.n086c7pq011109@svn.freebsd.org> From: David Schultz Date: Thu, 8 Jan 2009 06:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186887 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 06:38:08 -0000 Author: das Date: Thu Jan 8 06:38:06 2009 New Revision: 186887 URL: http://svn.freebsd.org/changeset/base/186887 Log: Set the error indicator on an attempt to write to a read-only stream. PR: 127335 MFC after: 2 weeks Modified: head/lib/libc/stdio/wsetup.c Modified: head/lib/libc/stdio/wsetup.c ============================================================================== --- head/lib/libc/stdio/wsetup.c Thu Jan 8 06:12:03 2009 (r186886) +++ head/lib/libc/stdio/wsetup.c Thu Jan 8 06:38:06 2009 (r186887) @@ -60,6 +60,7 @@ __swsetup(fp) if ((fp->_flags & __SWR) == 0) { if ((fp->_flags & __SRW) == 0) { errno = EBADF; + fp->_flags |= __SERR; return (EOF); } if (fp->_flags & __SRD) { From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 10:16:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31AFC106567E; Thu, 8 Jan 2009 10:16:03 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F3C48FC1F; Thu, 8 Jan 2009 10:16:03 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08AG3C6019653; Thu, 8 Jan 2009 10:16:03 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08AG3Np019652; Thu, 8 Jan 2009 10:16:03 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081016.n08AG3Np019652@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 10:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186891 - head/sys/cam X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 10:16:04 -0000 Author: raj Date: Thu Jan 8 10:16:02 2009 New Revision: 186891 URL: http://svn.freebsd.org/changeset/base/186891 Log: cam: Retry TEST UNIT READY command if not successful. This fixes problems with discovering some USB devices that are very slow to respond during initialisation. When a USB device is inserted, CAM performs the sequence: 1) INQUIRY 2) INQUIRY (second time with other parameters) 3) TEST UNIT READY 4) READ CAPACITY Before this change CAM didn't check if TEST UNIT READY was successful and went on blindly to the next state and sent READ CAPACITY. If the device was still not ready by then, CAM ended with error message. This patch adds checking for the status of TEST UNIT READY command and retrying up to 10 times with 0.5 sec interval. Submitted by: Grzegorz Bernacki gjb ! semihalf dot com Reviewed by: scottl Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Jan 8 09:50:20 2009 (r186890) +++ head/sys/cam/cam_xpt.c Thu Jan 8 10:16:02 2009 (r186891) @@ -5611,7 +5611,7 @@ probestart(struct cam_periph *periph, un case PROBE_DV_EXIT: { scsi_test_unit_ready(csio, - /*retries*/4, + /*retries*/10, probedone, MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, @@ -6218,6 +6218,13 @@ probedone(struct cam_periph *periph, uni break; } case PROBE_TUR_FOR_NEGOTIATION: + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + DELAY(500000); + if (cam_periph_error(done_ccb, 0, SF_RETRY_UA, + NULL) == ERESTART) + return; + } + /* FALLTHROUGH */ case PROBE_DV_EXIT: if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 11:09:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DB78106568C; Thu, 8 Jan 2009 11:09:28 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B0908FC19; Thu, 8 Jan 2009 11:09:28 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08B9SZ9020772; Thu, 8 Jan 2009 11:09:28 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08B9SE7020770; Thu, 8 Jan 2009 11:09:28 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081109.n08B9SE7020770@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 11:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186892 - head/sys/dev/mge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 11:09:29 -0000 Author: raj Date: Thu Jan 8 11:09:27 2009 New Revision: 186892 URL: http://svn.freebsd.org/changeset/base/186892 Log: Handle mge(4) chip revision differences at run-time rather then compile time, which is more flexible for future revisions, and lets eliminate some #defines and compile conditionals. Obtained from: Semihalf Modified: head/sys/dev/mge/if_mge.c head/sys/dev/mge/if_mgevar.h Modified: head/sys/dev/mge/if_mge.c ============================================================================== --- head/sys/dev/mge/if_mge.c Thu Jan 8 10:16:02 2009 (r186891) +++ head/sys/dev/mge/if_mge.c Thu Jan 8 11:09:27 2009 (r186892) @@ -69,14 +69,11 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) -#define MGE_VER2 1 -#endif - #define MV_PHY_ADDR_BASE 8 #include #include +#include #include "miibus_if.h" @@ -103,6 +100,10 @@ static void mge_start_locked(struct ifne static void mge_watchdog(struct mge_softc *sc); static int mge_ioctl(struct ifnet *ifp, u_long command, caddr_t data); +static uint32_t mge_tfut_ipg(uint32_t val, int ver); +static uint32_t mge_rx_ipg(uint32_t val, int ver); +static void mge_ver_params(struct mge_softc *sc); + static void mge_intrs_ctrl(struct mge_softc *sc, int enable); static void mge_intr_rx(void *arg); static void mge_intr_rx_locked(struct mge_softc *sc, int count); @@ -206,6 +207,57 @@ mge_get_mac_address(struct mge_softc *sc addr[5] = (mac_l & 0x000000ff); } +static uint32_t +mge_tfut_ipg(uint32_t val, int ver) +{ + + switch (ver) { + case 1: + return ((val & 0x3fff) << 4); + case 2: + default: + return ((val & 0xffff) << 4); + } +} + +static uint32_t +mge_rx_ipg(uint32_t val, int ver) +{ + + switch (ver) { + case 1: + return ((val & 0x3fff) << 8); + case 2: + default: + return (((val & 0x8000) << 10) | ((val & 0x7fff) << 7)); + } +} + +static void +mge_ver_params(struct mge_softc *sc) +{ + uint32_t d, r; + + soc_id(&d, &r); + if (d == MV_DEV_88F6281 || d == MV_DEV_MV78100) { + sc->mge_ver = 2; + sc->mge_mtu = 0x4e8; + sc->mge_tfut_ipg_max = 0xFFFF; + sc->mge_rx_ipg_max = 0xFFFF; + sc->mge_tx_arb_cfg = 0xFC0000FF; + sc->mge_tx_tok_cfg = 0xFFFF7FFF; + sc->mge_tx_tok_cnt = 0x3FFFFFFF; + } else { + sc->mge_ver = 1; + sc->mge_mtu = 0x458; + sc->mge_tfut_ipg_max = 0x3FFF; + sc->mge_rx_ipg_max = 0x3FFF; + sc->mge_tx_arb_cfg = 0x000000FF; + sc->mge_tx_tok_cfg = 0x3FFFFFFF; + sc->mge_tx_tok_cnt = 0x3FFFFFFF; + } +} + static void mge_set_mac_address(struct mge_softc *sc) { @@ -564,6 +616,9 @@ mge_attach(device_t dev) if (device_get_unit(dev) == 0) sc_mge0 = sc; + /* Set chip version-dependent parameters */ + mge_ver_params(sc); + /* Initialize mutexes */ mtx_init(&sc->transmit_lock, device_get_nameunit(dev), "mge TX lock", MTX_DEF); mtx_init(&sc->receive_lock, device_get_nameunit(dev), "mge RX lock", MTX_DEF); @@ -797,23 +852,25 @@ mge_init_locked(void *arg) /* Setup multicast filters */ mge_setup_multicast(sc); -#if defined(MGE_VER2) - MGE_WRITE(sc, MGE_PORT_SERIAL_CTRL1, MGE_RGMII_EN); - MGE_WRITE(sc, MGE_FIXED_PRIO_CONF, MGE_FIXED_PRIO_EN(0)); -#endif + if (sc->mge_ver == 2) { + MGE_WRITE(sc, MGE_PORT_SERIAL_CTRL1, MGE_RGMII_EN); + MGE_WRITE(sc, MGE_FIXED_PRIO_CONF, MGE_FIXED_PRIO_EN(0)); + } + /* Initialize TX queue configuration registers */ - MGE_WRITE(sc, MGE_TX_TOKEN_COUNT(0), MGE_TX_TOKEN_Q0_DFLT); - MGE_WRITE(sc, MGE_TX_TOKEN_CONF(0), MGE_TX_TOKEN_Q0_DFLT); - MGE_WRITE(sc, MGE_TX_ARBITER_CONF(0), MGE_TX_ARB_Q0_DFLT); + MGE_WRITE(sc, MGE_TX_TOKEN_COUNT(0), sc->mge_tx_tok_cnt); + MGE_WRITE(sc, MGE_TX_TOKEN_CONF(0), sc->mge_tx_tok_cfg); + MGE_WRITE(sc, MGE_TX_ARBITER_CONF(0), sc->mge_tx_arb_cfg); + /* Clear TX queue configuration registers for unused queues */ for (i = 1; i < 7; i++) { - MGE_WRITE(sc, MGE_TX_TOKEN_COUNT(i), MGE_TX_TOKEN_Q1_7_DFLT); - MGE_WRITE(sc, MGE_TX_TOKEN_CONF(i), MGE_TX_TOKEN_Q1_7_DFLT); - MGE_WRITE(sc, MGE_TX_ARBITER_CONF(i), MGE_TX_ARB_Q1_7_DFLT); + MGE_WRITE(sc, MGE_TX_TOKEN_COUNT(i), 0); + MGE_WRITE(sc, MGE_TX_TOKEN_CONF(i), 0); + MGE_WRITE(sc, MGE_TX_ARBITER_CONF(i), 0); } /* Set default MTU */ - MGE_WRITE(sc, MGE_MTU, MGE_MTU_DEFAULT); + MGE_WRITE(sc, sc->mge_mtu, 0); /* Port configuration */ MGE_WRITE(sc, MGE_PORT_CONFIG, @@ -1688,12 +1745,12 @@ mge_set_rxic(struct mge_softc *sc) { uint32_t reg; - if (sc->rx_ic_time > MGE_SDMA_RX_IPG_MAX) - sc->rx_ic_time = MGE_SDMA_RX_IPG_MAX; + if (sc->rx_ic_time > sc->mge_rx_ipg_max) + sc->rx_ic_time = sc->mge_rx_ipg_max; reg = MGE_READ(sc, MGE_SDMA_CONFIG); - reg &= ~MGE_SDMA_RX_IPG(MGE_SDMA_RX_IPG_MAX); - reg |= MGE_SDMA_RX_IPG(sc->rx_ic_time); + reg &= ~mge_rx_ipg(sc->mge_rx_ipg_max, sc->mge_ver); + reg |= mge_rx_ipg(sc->rx_ic_time, sc->mge_ver); MGE_WRITE(sc, MGE_SDMA_CONFIG, reg); } @@ -1702,12 +1759,12 @@ mge_set_txic(struct mge_softc *sc) { uint32_t reg; - if (sc->tx_ic_time > MGE_TX_FIFO_URGENT_TRSH_IPG_MAX) - sc->tx_ic_time = MGE_TX_FIFO_URGENT_TRSH_IPG_MAX; + if (sc->tx_ic_time > sc->mge_tfut_ipg_max) + sc->tx_ic_time = sc->mge_tfut_ipg_max; reg = MGE_READ(sc, MGE_TX_FIFO_URGENT_TRSH); - reg &= ~MGE_TX_FIFO_URGENT_TRSH_IPG(MGE_TX_FIFO_URGENT_TRSH_IPG_MAX); - reg |= MGE_TX_FIFO_URGENT_TRSH_IPG(sc->tx_ic_time); + reg &= ~mge_tfut_ipg(sc->mge_tfut_ipg_max, sc->mge_ver); + reg |= mge_tfut_ipg(sc->tx_ic_time, sc->mge_ver); MGE_WRITE(sc, MGE_TX_FIFO_URGENT_TRSH, reg); } @@ -1715,9 +1772,10 @@ static int mge_sysctl_ic(SYSCTL_HANDLER_ARGS) { struct mge_softc *sc = (struct mge_softc *)arg1; - uint32_t time = (arg2 == MGE_IC_RX) ? sc->rx_ic_time : sc->tx_ic_time; + uint32_t time; int error; + time = (arg2 == MGE_IC_RX) ? sc->rx_ic_time : sc->tx_ic_time; error = sysctl_handle_int(oidp, &time, 0, req); if (error != 0) return(error); Modified: head/sys/dev/mge/if_mgevar.h ============================================================================== --- head/sys/dev/mge/if_mgevar.h Thu Jan 8 10:16:02 2009 (r186891) +++ head/sys/dev/mge/if_mgevar.h Thu Jan 8 11:09:27 2009 (r186892) @@ -91,6 +91,14 @@ struct mge_softc { uint32_t tx_ic_time; struct mge_desc_wrapper mge_tx_desc[MGE_TX_DESC_NUM]; struct mge_desc_wrapper mge_rx_desc[MGE_RX_DESC_NUM]; + + uint32_t mge_tfut_ipg_max; /* TX FIFO Urgent Threshold */ + uint32_t mge_rx_ipg_max; + uint32_t mge_tx_arb_cfg; + uint32_t mge_tx_tok_cfg; + uint32_t mge_tx_tok_cnt; + uint16_t mge_mtu; + int mge_ver; }; @@ -183,15 +191,6 @@ struct mge_softc { #define MGE_SDMA_RX_BYTE_SWAP (1 << 4) #define MGE_SDMA_TX_BYTE_SWAP (1 << 5) #define MGE_SDMA_DESC_SWAP_MODE (1 << 6) -#if defined(MGE_VER2) -#define MGE_SDMA_RX_IPG_MAX 0xFFFF -#define MGE_SDMA_RX_IPG(val) ((((val) & 0x8000) << 10) | \ - (((val) & 0x7fff) << 7)) -#else -#define MGE_SDMA_RX_IPG_MAX 0x3FFF -#define MGE_SDMA_RX_IPG(val) (((val) & 0x3fff) << 8) -#endif - #define MGE_PORT_SERIAL_CTRL 0x43c #define PORT_SERIAL_ENABLE (1 << 0) /* serial port enable */ @@ -248,13 +247,6 @@ struct mge_softc { #define MGE_COLLISION_LIMIT(val) (((val) & 0x3f) << 16) #define MGE_DROP_ODD_PREAMBLE (1 << 22) -#if defined(MGE_VER2) -#define MGE_MTU 0x4e8 -#else -#define MGE_MTU 0x458 -#endif -#define MGE_MTU_DEFAULT 0x0 - #define MGE_PORT_INT_CAUSE 0x460 #define MGE_PORT_INT_MASK 0x468 #define MGE_PORT_INT_RX (1 << 0) @@ -277,13 +269,6 @@ struct mge_softc { #define MGE_RX_FIFO_URGENT_TRSH 0x470 #define MGE_TX_FIFO_URGENT_TRSH 0x474 -#if defined(MGE_VER2) -#define MGE_TX_FIFO_URGENT_TRSH_IPG_MAX 0xFFFF -#define MGE_TX_FIFO_URGENT_TRSH_IPG(vl) (((vl) & 0xFFFF) << 4) -#else -#define MGE_TX_FIFO_URGENT_TRSH_IPG_MAX 0x3FFF -#define MGE_TX_FIFO_URGENT_TRSH_IPG(vl) (((vl) & 0x3FFF) << 4) -#endif #define MGE_FIXED_PRIO_CONF 0x4dc #define MGE_FIXED_PRIO_EN(q) (1 << (q)) @@ -300,12 +285,7 @@ struct mge_softc { #define MGE_TX_TOKEN_COUNT(q) (0x700 + ((q)<<4)) #define MGE_TX_TOKEN_CONF(q) (0x704 + ((q)<<4)) -#define MGE_TX_TOKEN_Q0_DFLT 0x3fffffff -#define MGE_TX_TOKEN_Q1_7_DFLT 0x0 - #define MGE_TX_ARBITER_CONF(q) (0x704 + ((q)<<4)) -#define MGE_TX_ARB_Q0_DFLT 0xff -#define MGE_TX_ARB_Q1_7_DFLT 0x0 #define MGE_MCAST_REG_NUMBER 64 #define MGE_DA_FILTER_SPEC_MCAST(i) (0x1400 + ((i) << 2)) From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 12:22:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BCAF106564A; Thu, 8 Jan 2009 12:22:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89AA78FC08; Thu, 8 Jan 2009 12:22:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08CMbTo022168; Thu, 8 Jan 2009 12:22:37 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08CMbeR022167; Thu, 8 Jan 2009 12:22:37 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901081222.n08CMbeR022167@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 8 Jan 2009 12:22:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186894 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 12:22:38 -0000 Author: bz Date: Thu Jan 8 12:22:37 2009 New Revision: 186894 URL: http://svn.freebsd.org/changeset/base/186894 Log: Document that with r186854 we started using KMODOWN/KMODGRP for the kernel as well and no longer only for modules. Reviewed by: kib, antoine MFC after: 26 days Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Thu Jan 8 12:10:11 2009 (r186893) +++ head/share/mk/bsd.own.mk Thu Jan 8 12:22:37 2009 (r186894) @@ -44,9 +44,9 @@ # KMODDIR Base path for loadable kernel modules # (see kld(4)). [/boot/kernel] # -# KMODOWN KLD owner. [${BINOWN}] +# KMODOWN Kernel and KLD owner. [${BINOWN}] # -# KMODGRP KLD group. [${BINGRP}] +# KMODGRP Kernel and KLD group. [${BINGRP}] # # KMODMODE KLD mode. [${BINMODE}] # From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 12:47:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6AE5106564A; Thu, 8 Jan 2009 12:47:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 943138FC16; Thu, 8 Jan 2009 12:47:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08ClUra022669; Thu, 8 Jan 2009 12:47:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08ClUT2022668; Thu, 8 Jan 2009 12:47:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901081247.n08ClUT2022668@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Jan 2009 12:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186896 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 12:47:31 -0000 Author: kib Date: Thu Jan 8 12:47:30 2009 New Revision: 186896 URL: http://svn.freebsd.org/changeset/base/186896 Log: Do not call namei() while having another user-controlled vnode locked. Lookup could attempt to recursively lock that vnode. Do not call vn_start_write(V_WAIT) while vnode is locked, this may result in a deadlock with suspension. vfs_busy() the mountpoint before dropping vnode lock for vnode that was used to look up the mountpoint, to prevent unmount in between. Reported and tested by: pho Reviewed by: rwatson MFC after: 3 weeks Modified: head/sys/kern/vfs_extattr.c Modified: head/sys/kern/vfs_extattr.c ============================================================================== --- head/sys/kern/vfs_extattr.c Thu Jan 8 12:39:40 2009 (r186895) +++ head/sys/kern/vfs_extattr.c Thu Jan 8 12:47:30 2009 (r186896) @@ -87,52 +87,65 @@ extattrctl(td, uap) AUDIT_ARG(text, attrname); vfslocked = fnvfslocked = 0; - /* - * uap->filename is not always defined. If it is, grab a vnode lock, - * which VFS_EXTATTRCTL() will later release. - */ + mp = NULL; filename_vp = NULL; if (uap->filename != NULL) { - NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKLEAF | - AUDITVNODE2, UIO_USERSPACE, uap->filename, td); + NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | AUDITVNODE2, + UIO_USERSPACE, uap->filename, td); error = namei(&nd); if (error) return (error); fnvfslocked = NDHASGIANT(&nd); filename_vp = nd.ni_vp; - NDFREE(&nd, NDF_NO_VP_RELE | NDF_NO_VP_UNLOCK); + NDFREE(&nd, NDF_NO_VP_RELE); } /* uap->path is always defined. */ - NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | AUDITVNODE1, UIO_USERSPACE, - uap->path, td); + NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKLEAF | AUDITVNODE1, + UIO_USERSPACE, uap->path, td); error = namei(&nd); - if (error) { - if (filename_vp != NULL) - vput(filename_vp); + if (error) goto out; - } vfslocked = NDHASGIANT(&nd); mp = nd.ni_vp->v_mount; - error = vn_start_write(nd.ni_vp, &mp_writable, V_WAIT | PCATCH); - NDFREE(&nd, 0); + error = vfs_busy(mp, 0); if (error) { - if (filename_vp != NULL) - vput(filename_vp); + NDFREE(&nd, 0); + mp = NULL; goto out; } + VOP_UNLOCK(nd.ni_vp, 0); + error = vn_start_write(nd.ni_vp, &mp_writable, V_WAIT | PCATCH); + NDFREE(&nd, NDF_NO_VP_UNLOCK); + if (error) + goto out; + if (filename_vp != NULL) { + /* + * uap->filename is not always defined. If it is, + * grab a vnode lock, which VFS_EXTATTRCTL() will + * later release. + */ + error = vn_lock(filename_vp, LK_EXCLUSIVE); + if (error) { + vn_finished_write(mp_writable); + goto out; + } + } error = VFS_EXTATTRCTL(mp, uap->cmd, filename_vp, uap->attrnamespace, uap->attrname != NULL ? attrname : NULL, td); vn_finished_write(mp_writable); +out: + if (mp != NULL) + vfs_unbusy(mp); + /* * VFS_EXTATTRCTL will have unlocked, but not de-ref'd, filename_vp, * so vrele it if it is defined. */ if (filename_vp != NULL) vrele(filename_vp); -out: VFS_UNLOCK_GIANT(fnvfslocked); VFS_UNLOCK_GIANT(vfslocked); return (error); From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 12:48:27 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCD3B1065677; Thu, 8 Jan 2009 12:48:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAF1F8FC12; Thu, 8 Jan 2009 12:48:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08CmRLn022726; Thu, 8 Jan 2009 12:48:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08CmR7N022725; Thu, 8 Jan 2009 12:48:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901081248.n08CmR7N022725@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Jan 2009 12:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186897 - head/sys/ufs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 12:48:28 -0000 Author: kib Date: Thu Jan 8 12:48:27 2009 New Revision: 186897 URL: http://svn.freebsd.org/changeset/base/186897 Log: If unmount of the ffs mp failed, reinitialize the extended attributes for the mp, and restart them if autostart is enabled. Reported and tested by: pho Reviewed by: rwatson MFC after: 3 weeks Modified: head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Thu Jan 8 12:47:30 2009 (r186896) +++ head/sys/ufs/ffs/ffs_vfsops.c Thu Jan 8 12:48:27 2009 (r186897) @@ -1030,6 +1030,9 @@ ffs_unmount(mp, mntflags, td) struct ufsmount *ump = VFSTOUFS(mp); struct fs *fs; int error, flags, susp; +#ifdef UFS_EXTATTR + int e_restart; +#endif flags = 0; fs = ump->um_fs; @@ -1043,8 +1046,10 @@ ffs_unmount(mp, mntflags, td) if (error != EOPNOTSUPP) printf("ffs_unmount: ufs_extattr_stop returned %d\n", error); + e_restart = 0; } else { ufs_extattr_uepm_destroy(&ump->um_extattr); + e_restart = 1; } #endif if (susp) { @@ -1121,6 +1126,15 @@ fail: vfs_write_resume(mp); vn_start_write(NULL, &mp, V_WAIT); } +#ifdef UFS_EXTATTR + if (e_restart) { + ufs_extattr_uepm_init(&ump->um_extattr); +#ifdef UFS_EXTATTR_AUTOSTART + (void) ufs_extattr_autostart(mp, td); +#endif + } +#endif + return (error); } From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 12:49:55 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2607106566C; Thu, 8 Jan 2009 12:49:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90B798FC12; Thu, 8 Jan 2009 12:49:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08CntwF022848; Thu, 8 Jan 2009 12:49:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08CntaV022847; Thu, 8 Jan 2009 12:49:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901081249.n08CntaV022847@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Jan 2009 12:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186898 - head/sys/ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 12:49:56 -0000 Author: kib Date: Thu Jan 8 12:49:55 2009 New Revision: 186898 URL: http://svn.freebsd.org/changeset/base/186898 Log: Lock the uepm_lock around the autostart of extattrs. Reported and tested by: pho Reviewed by: rwatson MFC after: 3 weeks Modified: head/sys/ufs/ufs/ufs_extattr.c Modified: head/sys/ufs/ufs/ufs_extattr.c ============================================================================== --- head/sys/ufs/ufs/ufs_extattr.c Thu Jan 8 12:48:27 2009 (r186897) +++ head/sys/ufs/ufs/ufs_extattr.c Thu Jan 8 12:49:55 2009 (r186898) @@ -93,6 +93,10 @@ static int ufs_extattr_set(struct vnode struct thread *td); static int ufs_extattr_rm(struct vnode *vp, int attrnamespace, const char *name, struct ucred *cred, struct thread *td); +static int ufs_extattr_autostart_locked(struct mount *mp, + struct thread *td); +static int ufs_extattr_start_locked(struct ufsmount *ump, + struct thread *td); /* * Per-FS attribute lock protecting attribute operations. @@ -208,24 +212,22 @@ ufs_extattr_start(struct mount *mp, stru ump = VFSTOUFS(mp); ufs_extattr_uepm_lock(ump, td); + error = ufs_extattr_start_locked(ump, td); + ufs_extattr_uepm_unlock(ump, td); + return (error); +} - if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_INITIALIZED)) { - error = EOPNOTSUPP; - goto unlock; - } - if (ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED) { - error = EBUSY; - goto unlock; - } +static int +ufs_extattr_start_locked(struct ufsmount *ump, struct thread *td) +{ + if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_INITIALIZED)) + return (EOPNOTSUPP); + if (ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED) + return (EBUSY); ump->um_extattr.uepm_flags |= UFS_EXTATTR_UEPM_STARTED; - ump->um_extattr.uepm_ucred = crhold(td->td_ucred); - -unlock: - ufs_extattr_uepm_unlock(ump, td); - - return (error); + return (0); } #ifdef UFS_EXTATTR_AUTOSTART @@ -448,6 +450,19 @@ ufs_extattr_iterate_directory(struct ufs int ufs_extattr_autostart(struct mount *mp, struct thread *td) { + struct ufsmount *ump; + int error; + + ump = VFSTOUFS(mp); + ufs_extattr_uepm_lock(ump, td); + error = ufs_extattr_autostart_locked(mp, td); + ufs_extattr_uepm_unlock(ump, td); + return (error); +} + +static int +ufs_extattr_autostart_locked(struct mount *mp, struct thread *td) +{ struct vnode *rvp, *attr_dvp, *attr_system_dvp, *attr_user_dvp; struct ufsmount *ump = VFSTOUFS(mp); int error; @@ -491,7 +506,7 @@ ufs_extattr_autostart(struct mount *mp, goto return_vput_attr_dvp; } - error = ufs_extattr_start(mp, td); + error = ufs_extattr_start_locked(ump, td); if (error) { printf("ufs_extattr_autostart: ufs_extattr_start failed (%d)\n", error); From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 13:20:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A42B106566B; Thu, 8 Jan 2009 13:20:29 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 175628FC1C; Thu, 8 Jan 2009 13:20:29 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08DKSZ6023488; Thu, 8 Jan 2009 13:20:28 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08DKS0w023483; Thu, 8 Jan 2009 13:20:28 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081320.n08DKS0w023483@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 13:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186899 - in head/sys/arm/mv: . discovery kirkwood orion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 13:20:30 -0000 Author: raj Date: Thu Jan 8 13:20:28 2009 New Revision: 186899 URL: http://svn.freebsd.org/changeset/base/186899 Log: Adjust Marvell SOC support for A0 chip revision. - Clean up TCLK handling so that it's dynamically recognized depending on registers settings or chip version/revision. Update registers definitions. - Teach SOC ident routine about A0 (initial silicon version for general audience) Obtained from: Marvell, Semihalf Modified: head/sys/arm/mv/common.c head/sys/arm/mv/discovery/discovery.c head/sys/arm/mv/kirkwood/kirkwood.c head/sys/arm/mv/mvreg.h head/sys/arm/mv/orion/orion.c Modified: head/sys/arm/mv/common.c ============================================================================== --- head/sys/arm/mv/common.c Thu Jan 8 12:49:55 2009 (r186898) +++ head/sys/arm/mv/common.c Thu Jan 8 13:20:28 2009 (r186899) @@ -104,17 +104,6 @@ soc_power_ctrl_get(uint32_t mask) return (mask); } -uint32_t -get_tclk(void) -{ - -#if defined(SOC_MV_DISCOVERY) - return (TCLK_200MHZ); -#else - return (TCLK_166MHZ); -#endif -} - void soc_id(uint32_t *dev, uint32_t *rev) { @@ -165,6 +154,10 @@ soc_identify(void) break; case MV_DEV_88F6281: dev = "Marvell 88F6281"; + if (r == 0) + rev = "Z0"; + else if (r == 2) + rev = "A0"; break; case MV_DEV_MV78100: dev = "Marvell MV78100"; Modified: head/sys/arm/mv/discovery/discovery.c ============================================================================== --- head/sys/arm/mv/discovery/discovery.c Thu Jan 8 12:49:55 2009 (r186898) +++ head/sys/arm/mv/discovery/discovery.c Thu Jan 8 13:20:28 2009 (r186899) @@ -226,3 +226,25 @@ const struct decode_win idma_win_tbl[] = }; const struct decode_win *idma_wins = idma_win_tbl; int idma_wins_no = sizeof(idma_win_tbl) / sizeof(struct decode_win); + +uint32_t +get_tclk(void) +{ + uint32_t sar; + + /* + * On Discovery TCLK is can be configured to 166 MHz or 200 MHz. + * Current setting is read from Sample At Reset register. + */ + sar = bus_space_read_4(obio_tag, MV_MPP_BASE, SAMPLE_AT_RESET_HI); + sar = (sar & TCLK_MASK) >> TCLK_SHIFT; + + switch (sar) { + case 0: + return (TCLK_166MHZ); + case 1: + return (TCLK_200MHZ); + default: + panic("Unknown TCLK settings!"); + } +} Modified: head/sys/arm/mv/kirkwood/kirkwood.c ============================================================================== --- head/sys/arm/mv/kirkwood/kirkwood.c Thu Jan 8 12:49:55 2009 (r186898) +++ head/sys/arm/mv/kirkwood/kirkwood.c Thu Jan 8 13:20:28 2009 (r186899) @@ -150,3 +150,21 @@ const struct decode_win cpu_win_tbl[] = }; const struct decode_win *cpu_wins = cpu_win_tbl; int cpu_wins_no = sizeof(cpu_win_tbl) / sizeof(struct decode_win); + +uint32_t +get_tclk(void) +{ + uint32_t dev, rev; + + /* + * On Kirkwood TCLK is not configurable and depends on silicon + * revision: + * - A0 has TCLK hardcoded to 200 MHz. + * - Z0 and others have TCLK hardcoded to 166 MHz. + */ + soc_id(&dev, &rev); + if (dev == MV_DEV_88F6281 && rev == 2) + return (TCLK_200MHZ); + + return (TCLK_166MHZ); +} Modified: head/sys/arm/mv/mvreg.h ============================================================================== --- head/sys/arm/mv/mvreg.h Thu Jan 8 12:49:55 2009 (r186898) +++ head/sys/arm/mv/mvreg.h Thu Jan 8 13:20:28 2009 (r186899) @@ -405,15 +405,29 @@ /* * MPP */ +#if defined(SOC_MV_ORION) #define MPP_CONTROL0 0x00 #define MPP_CONTROL1 0x04 #define MPP_CONTROL2 0x50 -#define DEVICE_MULTIPLEX 0x08 +#elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) +#define MPP_CONTROL0 0x00 +#define MPP_CONTROL1 0x04 +#define MPP_CONTROL2 0x08 +#define MPP_CONTROL3 0x0C +#define MPP_CONTROL4 0x10 +#define MPP_CONTROL5 0x14 +#define MPP_CONTROL6 0x18 +#else +#error SOC_MV_XX not defined +#endif #if defined(SOC_MV_ORION) #define SAMPLE_AT_RESET 0x10 -#elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) +#elif defined(SOC_MV_KIRKWOOD) #define SAMPLE_AT_RESET 0x30 +#elif defined(SOC_MV_DISCOVERY) +#define SAMPLE_AT_RESET_LO 0x30 +#define SAMPLE_AT_RESET_HI 0x34 #else #error SOC_MV_XX not defined #endif @@ -421,14 +435,12 @@ /* * Clocks */ -#ifdef SOC_MV_ORION -#define TCLK_MASK 0x300 -#define TCLK_SHIFT 0x8 -#elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) -#define TCLK_MASK 0x30000 -#define TCLK_SHIFT 0x10 -#else -#error SOC_MV_XX not defined +#if defined(SOC_MV_ORION) +#define TCLK_MASK 0x00000300 +#define TCLK_SHIFT 0x08 +#elif defined(SOC_MV_DISCOVERY) +#define TCLK_MASK 0x00000180 +#define TCLK_SHIFT 0x07 #endif #define TCLK_100MHZ 100000000 Modified: head/sys/arm/mv/orion/orion.c ============================================================================== --- head/sys/arm/mv/orion/orion.c Thu Jan 8 12:49:55 2009 (r186898) +++ head/sys/arm/mv/orion/orion.c Thu Jan 8 13:20:28 2009 (r186899) @@ -167,3 +167,24 @@ const struct decode_win idma_win_tbl[] = }; const struct decode_win *idma_wins = idma_win_tbl; int idma_wins_no = sizeof(idma_win_tbl) / sizeof(struct decode_win); + +uint32_t +get_tclk(void) +{ + uint32_t sar; + + /* + * On Orion TCLK is can be configured to 150 MHz or 166 MHz. + * Current setting is read from Sample At Reset register. + */ + sar = bus_space_read_4(obio_tag, MV_MPP_BASE, SAMPLE_AT_RESET); + sar = (sar & TCLK_MASK) >> TCLK_SHIFT; + switch (sar) { + case 1: + return (TCLK_150MHZ); + case 2: + return (TCLK_166MHZ); + default: + panic("Unknown TCLK settings!"); + } +} From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 13:24:26 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21CA2106566B; Thu, 8 Jan 2009 13:24:26 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 103DE8FC0A; Thu, 8 Jan 2009 13:24:26 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08DOPZL023599; Thu, 8 Jan 2009 13:24:25 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08DOP1F023598; Thu, 8 Jan 2009 13:24:25 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081324.n08DOP1F023598@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 13:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186900 - head/sys/dev/uart X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 13:24:26 -0000 Author: raj Date: Thu Jan 8 13:24:25 2009 New Revision: 186900 URL: http://svn.freebsd.org/changeset/base/186900 Log: De-hard code UART speed setting for Marvell SOCs when hw.uart.console is not specified. Instead, let uart(4) fall back to whatever speed firmware has set. Modified: head/sys/dev/uart/uart_cpu_mv.c Modified: head/sys/dev/uart/uart_cpu_mv.c ============================================================================== --- head/sys/dev/uart/uart_cpu_mv.c Thu Jan 8 13:20:28 2009 (r186899) +++ head/sys/dev/uart/uart_cpu_mv.c Thu Jan 8 13:24:25 2009 (r186900) @@ -53,6 +53,7 @@ bus_space_tag_t uart_bus_space_mem; int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { + return ((b1->bsh == b2->bsh && b1->bst == b2->bst) ? 1 : 0); } @@ -77,7 +78,7 @@ uart_cpu_getdev(int devtype, struct uart 0, &di->bas.bsh) != 0) return (ENXIO); - di->baudrate = 115200; + di->baudrate = 0; di->bas.regshft = 2; di->bas.rclk = get_tclk(); di->databits = 8; From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 13:25:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 390BD1065670; Thu, 8 Jan 2009 13:25:23 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 278708FC16; Thu, 8 Jan 2009 13:25:23 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08DPNYs023655; Thu, 8 Jan 2009 13:25:23 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08DPNCi023654; Thu, 8 Jan 2009 13:25:23 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081325.n08DPNCi023654@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 13:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186901 - head/sys/arm/mv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 13:25:23 -0000 Author: raj Date: Thu Jan 8 13:25:22 2009 New Revision: 186901 URL: http://svn.freebsd.org/changeset/base/186901 Log: Minor style(9) corrections. Modified: head/sys/arm/mv/gpio.c Modified: head/sys/arm/mv/gpio.c ============================================================================== --- head/sys/arm/mv/gpio.c Thu Jan 8 13:24:25 2009 (r186900) +++ head/sys/arm/mv/gpio.c Thu Jan 8 13:25:22 2009 (r186901) @@ -113,8 +113,8 @@ mv_gpio_probe(device_t dev) static int mv_gpio_attach(device_t dev) { - int error, i; - struct mv_gpio_softc *sc; + int error, i; + struct mv_gpio_softc *sc; uint32_t dev_id, rev_id; sc = (struct mv_gpio_softc *)device_get_softc(dev); @@ -219,7 +219,7 @@ mv_gpio_intr(void *arg) * GPIO interrupt handling */ -static struct intr_event *gpio_events[MV_GPIO_MAX_NPINS]; +static struct intr_event *gpio_events[MV_GPIO_MAX_NPINS]; int mv_gpio_setup_intrhandler(const char *name, driver_filter_t *filt, @@ -243,8 +243,8 @@ mv_gpio_setup_intrhandler(const char *na gpio_events[pin] = event; } - intr_event_add_handler(event, name, filt, hand, arg, intr_priority(flags), - flags, cookiep); + intr_event_add_handler(event, name, filt, hand, arg, + intr_priority(flags), flags, cookiep); return (0); } @@ -277,7 +277,7 @@ mv_gpio_intr_unmask(int pin) static void mv_gpio_intr_handler(int pin) { - struct intr_event *event; + struct intr_event *event; event = gpio_events[pin]; if (event == NULL || TAILQ_EMPTY(&event->ie_handlers)) From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 13:32:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0648E10656DB; Thu, 8 Jan 2009 13:32:09 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A74C8FC13; Thu, 8 Jan 2009 13:32:08 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08DW8K1023798; Thu, 8 Jan 2009 13:32:08 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08DW8Is023797; Thu, 8 Jan 2009 13:32:08 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081332.n08DW8Is023797@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 13:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186902 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 13:32:10 -0000 Author: raj Date: Thu Jan 8 13:32:08 2009 New Revision: 186902 URL: http://svn.freebsd.org/changeset/base/186902 Log: Provide handler for USB controller error interrupts for Marvell EHCI device. Obtained from: Semihalf Modified: head/sys/dev/usb/ehci_mbus.c Modified: head/sys/dev/usb/ehci_mbus.c ============================================================================== --- head/sys/dev/usb/ehci_mbus.c Thu Jan 8 13:25:22 2009 (r186901) +++ head/sys/dev/usb/ehci_mbus.c Thu Jan 8 13:32:08 2009 (r186902) @@ -73,6 +73,19 @@ static device_shutdown_t ehci_mbus_shutd static device_suspend_t ehci_mbus_suspend; static device_resume_t ehci_mbus_resume; +static int err_intr(void *arg); + +struct resource *irq_err; +void *ih_err; + +#define USB_BRIDGE_INTR_CAUSE 0x210 +#define USB_BRIDGE_INTR_MASK 0x214 + +#define MV_USB_ADDR_DECODE_ERR (1 << 0) +#define MV_USB_HOST_UNDERFLOW (1 << 1) +#define MV_USB_HOST_OVERFLOW (1 << 2) +#define MV_USB_DEVICE_UNDERFLOW (1 << 3) + static int ehci_mbus_suspend(device_t self) { @@ -157,6 +170,15 @@ ehci_mbus_attach(device_t self) device_get_name(self)); sc->sc_size = MV_USB_SIZE - MV_USB_HOST_OFST; + rid = 0; + irq_err = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE); + if (irq_err == NULL) { + device_printf(self, "Could not allocate error irq\n"); + ehci_mbus_detach(self); + return (ENXIO); + } + /* * Notice: Marvell EHCI controller has TWO interrupt lines, so make sure to * use the correct rid for the main one (controller interrupt) -- @@ -181,6 +203,19 @@ ehci_mbus_attach(device_t self) sprintf(sc->sc_vendor, "Marvell"); sc->sc_id_vendor = EHCI_VENDORID_MRVL; + err = bus_setup_intr(self, irq_err, INTR_FAST | INTR_TYPE_BIO, + err_intr, NULL, sc, &ih_err); + if (err) { + device_printf(self, "Could not setup error irq, %d\n", err); + ih_err = NULL; + ehci_mbus_detach(self); + return (ENXIO); + } + + EWRITE4(sc, USB_BRIDGE_INTR_MASK, MV_USB_ADDR_DECODE_ERR | + MV_USB_HOST_UNDERFLOW | MV_USB_HOST_OVERFLOW | + MV_USB_DEVICE_UNDERFLOW); + err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO, NULL, (driver_intr_t*)ehci_intr, sc, &sc->ih); if (err) { @@ -277,6 +312,17 @@ ehci_mbus_detach(device_t self) err); sc->ih = NULL; } + EWRITE4(sc, USB_BRIDGE_INTR_MASK, 0); + + if (irq_err && ih_err) { + err = bus_teardown_intr(self, irq_err, ih_err); + + if (err) + device_printf(self, "Could not tear down irq, %d\n", + err); + ih_err = NULL; + } + if (sc->sc_bus.bdev) { device_delete_child(self, sc->sc_bus.bdev); sc->sc_bus.bdev = NULL; @@ -285,6 +331,10 @@ ehci_mbus_detach(device_t self) bus_release_resource(self, SYS_RES_IRQ, 0, sc->irq_res); sc->irq_res = NULL; } + if (irq_err) { + bus_release_resource(self, SYS_RES_IRQ, 1, irq_err); + irq_err = NULL; + } if (sc->io_res) { bus_release_resource(self, SYS_RES_MEMORY, 0, sc->io_res); sc->io_res = NULL; @@ -294,6 +344,32 @@ ehci_mbus_detach(device_t self) return (0); } +static int +err_intr(void *arg) +{ + ehci_softc_t *sc = arg; + unsigned int cause; + + cause = EREAD4(sc, USB_BRIDGE_INTR_CAUSE); + if (cause) { + printf("IRQ ERR: cause: 0x%08x\n", cause); + if (cause & MV_USB_ADDR_DECODE_ERR) + printf("IRQ ERR: Address decoding error\n"); + if (cause & MV_USB_HOST_UNDERFLOW) + printf("IRQ ERR: USB Host Underflow\n"); + if (cause & MV_USB_HOST_OVERFLOW) + printf("IRQ ERR: USB Host Overflow\n"); + if (cause & MV_USB_DEVICE_UNDERFLOW) + printf("IRQ ERR: USB Device Underflow\n"); + if (cause & ~(MV_USB_ADDR_DECODE_ERR | MV_USB_HOST_UNDERFLOW | + MV_USB_HOST_OVERFLOW | MV_USB_DEVICE_UNDERFLOW)) + printf("IRQ ERR: Unknown error\n"); + + EWRITE4(sc, USB_BRIDGE_INTR_CAUSE, 0); + } + return (FILTER_HANDLED); +} + static device_method_t ehci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ehci_mbus_probe), From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 15:20:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C6A21065670; Thu, 8 Jan 2009 15:20:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A9F58FC08; Thu, 8 Jan 2009 15:20:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08FKW0r025880; Thu, 8 Jan 2009 15:20:32 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08FKWDG025879; Thu, 8 Jan 2009 15:20:32 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901081520.n08FKWDG025879@svn.freebsd.org> From: Warner Losh Date: Thu, 8 Jan 2009 15:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186903 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 15:20:33 -0000 Author: imp Date: Thu Jan 8 15:20:32 2009 New Revision: 186903 URL: http://svn.freebsd.org/changeset/base/186903 Log: First cut at documenting hw.cam.cd.retry_count. Moved kern.cam.cd.%d.minimum_cmd_size to new SYSCTL VARIABLES section. Modified: head/share/man/man4/cd.4 Modified: head/share/man/man4/cd.4 ============================================================================== --- head/share/man/man4/cd.4 Thu Jan 8 13:32:08 2009 (r186902) +++ head/share/man/man4/cd.4 Thu Jan 8 15:20:32 2009 (r186903) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2003 +.Dd January 8, 2009 .Dt CD 4 .Os .Sh NAME @@ -370,43 +370,6 @@ Some work is planned to support some of the more common `broken' .Tn CD-ROM drives; however, this is not yet under way. -.Pp -The -.Nm -driver attempts to automatically determine whether the drive it is talking -to supports 6 byte or 10 byte MODE SENSE/MODE SELECT operations. -Many -.Tn SCSI -drives only support 6 byte commands, and -.Tn ATAPI -drives only support 10 byte commands. -The -.Nm -driver first attempts to determine whether the protocol in use typically -supports 6 byte commands by issuing a CAM Path Inquiry CCB. -It will then default to 6 byte or 10 byte commands as appropriate. -After that, the -.Nm -driver defaults to using 6 byte commands (assuming the protocol the drive -speaks claims to support 6 byte commands), until one fails with a -.Tn SCSI -ILLEGAL REQUEST error. -Then it tries the 10 byte version of the command to -see if that works instead. -Users can change the default via per-drive -sysctl variables and loader tunables. -The variable names are the same in -both instances: -.Pp -.Va kern.cam.cd.%d.minimum_cmd_size -.Pp -Where -.Dq %d -is the unit number of the drive in question. -Valid minimum command sizes -are 6 and 10. -Any value above 6 will be rounded to 10, and any value below -6 will be rounded to 6. .Sh CHANGER OPERATION This driver has built-in support for LUN-based CD changers. A LUN-based CD @@ -466,6 +429,63 @@ probe messages for the various LUNs of t while the boot process is going on. This is normal, and is caused by the changer scheduling code. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width 12 +.It kern.cam.cd.retry_count +.Pp +This variable determines how many times the +.Nm +driver will retry a READ or WRITE command. +This does not affect the number of retries used during probe time or for +the +.Nm +driver dump routine. +This value currently defaults to 4. +.It kern.cam.cd.%d.minimum_cmd_size +.Pp +The +.Nm +driver attempts to automatically determine whether the drive it is talking +to supports 6 byte or 10 byte MODE SENSE/MODE SELECT operations. +Many +.Tn SCSI +drives only support 6 byte commands, and +.Tn ATAPI +drives only support 10 byte commands. +The +.Nm +driver first attempts to determine whether the protocol in use typically +supports 6 byte commands by issuing a CAM Path Inquiry CCB. +It will then default to 6 byte or 10 byte commands as appropriate. +After that, the +.Nm +driver defaults to using 6 byte commands (assuming the protocol the drive +speaks claims to support 6 byte commands), until one fails with a +.Tn SCSI +ILLEGAL REQUEST error. +Then it tries the 10 byte version of the command to +see if that works instead. +Users can change the default via per-drive +sysctl variables and loader tunables. +Where +.Dq %d +is the unit number of the drive in question. +Valid minimum command sizes +are 6 and 10. +Any value above 6 will be rounded to 10, and any value below +6 will be rounded to 6. +.It kern.cam.cd.changer.min_busy_seconds +.It kern.cam.cd.changer.max_busy_seconds +.Pp +Tune how long individual LUNs are 'locked' for I/O operations to +optimize changer operation. +See CHANGER OPERATION section for information on how to use these items. +.El .Sh FILES .Bl -tag -width /dev/cd[0-9][a-h] -compact .It Pa /dev/cd[0-9][a-h] From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 17:12:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28BB01065883; Thu, 8 Jan 2009 17:12:48 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10DD78FC30; Thu, 8 Jan 2009 17:12:48 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08HCmYd028063; Thu, 8 Jan 2009 17:12:48 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08HClhX028057; Thu, 8 Jan 2009 17:12:47 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901081712.n08HClhX028057@svn.freebsd.org> From: Sam Leffler Date: Thu, 8 Jan 2009 17:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186904 - in head: sbin/ifconfig sys/conf sys/dev/ath sys/net80211 tools/tools/ath/athdebug tools/tools/ath/athstats usr.sbin/wlandebug X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 17:12:51 -0000 Author: sam Date: Thu Jan 8 17:12:47 2009 New Revision: 186904 URL: http://svn.freebsd.org/changeset/base/186904 Log: TDMA support for long distance point-to-point links using ath devices: o add net80211 support for a tdma vap that is built on top of the existing adhoc-demo support o add tdma scheduling of frame transmission to the ath driver; it's conceivable other devices might be capable of this too in which case they can make use of the 802.11 protocol additions etc. o add minor bits to user tools that need to know: ifconfig to setup and configure, new statistics in athstats, and new debug mask bits While the architecture can support >2 slots in a TDMA BSS the current design is intended (and tested) for only 2 slots. Sponsored by: Intel Added: head/sys/net80211/ieee80211_tdma.c (contents, props changed) head/sys/net80211/ieee80211_tdma.h (contents, props changed) Modified: head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/ifieee80211.c head/sys/conf/files head/sys/conf/options head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athioctl.h head/sys/dev/ath/if_athvar.h head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211.h head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_ddb.c head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_input.c head/sys/net80211/ieee80211_input.h head/sys/net80211/ieee80211_ioctl.c head/sys/net80211/ieee80211_ioctl.h head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_node.h head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_proto.h head/sys/net80211/ieee80211_scan.h head/sys/net80211/ieee80211_scan_sta.c head/sys/net80211/ieee80211_var.h head/tools/tools/ath/athdebug/athdebug.c head/tools/tools/ath/athstats/Makefile head/tools/tools/ath/athstats/athstats.c head/tools/tools/ath/athstats/main.c head/usr.sbin/wlandebug/wlandebug.c Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Thu Jan 8 15:20:32 2009 (r186903) +++ head/sbin/ifconfig/ifconfig.8 Thu Jan 8 17:12:47 2009 (r186904) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd October 19, 2008 +.Dd January 7, 2009 .Dt IFCONFIG 8 .Os .Sh NAME @@ -610,9 +610,15 @@ is one of (or .Cm hostap ), .Cm wds , +.Cm tdma , and .Cm monitor . The operating mode of a cloned interface cannot be changed. +The +.Cm tdma +mode is actually implemented as an +.Cm adhoc-demo +interface with special properties. .It Cm wlanbssid Ar bssid The 802.11 mac address to use for the bssid. This must be specified at create time for a legacy @@ -1530,6 +1536,60 @@ hexadecimal when preceded by .Ql 0x . Additionally, the SSID may be cleared by setting it to .Ql - . +.It Cm tdmaslot Ar slot +When operating with TDMA, use the specified +.Ar slot +configuration. +The +.Ar slot +is a number between 0 and the maximum number of slots in the BSS. +Note that a station configured as slot 0 is a master and +will broadcast beacon frames advertising the BSS; +stations configured to use other slots will always +scan to locate a master before they ever transmit. +By default +.Cm tdmaslot +is set to 1. +.It Cm tdmaslotcnt Ar cnt +When operating with TDMA, setup a BSS with +.Ar cnt +slots. +The slot count may be at most 8. +The current implementation is only tested with two stations +(i.e. point to point applications). +This setting is only meaningful when a station is configured as slot 0; +other stations adopt this setting from the BSS they join. +By default +.Cm tdmaslotcnt +is set to 2. +.It Cm tdmaslotlen Ar len +When operating with TDMA, setup a BSS such that each station has a slot +.Ar len +microseconds long. +The slot length must be at least 150 microseconds (1/8 TU) +and no more than 65 milliseconds. +Note that setting too small a slot length may result in poor channel +bandwidth utilization due to factors such as timer granularity and +guard time. +This setting is only meaningful when a station is configured as slot 0; +other stations adopt this setting from the BSS they join. +By default +.Cm tdmaslotlen +is set to 10 milliseconds. +.It Cm tdmabintval Ar intval +When operating with TDMA, setup a BSS such that beacons are transmitted every +.Ar intval +superframes to synchronize the TDMA slot timing. +A superframe is defined as the number of slots times the slot length; e.g. +a BSS with two slots of 10 milliseconds has a 20 millisecond superframe. +The beacon interval may not be zero. +A lower setting of +.Cm tdmabintval +causes the timers to be resynchronized more often; this can be help if +significant timer drift is observed. +By default +.Cm tdmabintval +is set to 5. .It Cm tsn When operating as an access point with WPA/802.11i allow legacy stations to associate using static key WEP and open authentication. Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Thu Jan 8 15:20:32 2009 (r186903) +++ head/sbin/ifconfig/ifieee80211.c Thu Jan 8 17:12:47 2009 (r186904) @@ -1711,6 +1711,30 @@ set80211rifs(const char *val, int d, int set80211(s, IEEE80211_IOC_RIFS, d, 0, NULL); } +static +DECL_CMD_FUNC(set80211tdmaslot, val, d) +{ + set80211(s, IEEE80211_IOC_TDMA_SLOT, atoi(val), 0, NULL); +} + +static +DECL_CMD_FUNC(set80211tdmaslotcnt, val, d) +{ + set80211(s, IEEE80211_IOC_TDMA_SLOTCNT, atoi(val), 0, NULL); +} + +static +DECL_CMD_FUNC(set80211tdmaslotlen, val, d) +{ + set80211(s, IEEE80211_IOC_TDMA_SLOTLEN, atoi(val), 0, NULL); +} + +static +DECL_CMD_FUNC(set80211tdmabintval, val, d) +{ + set80211(s, IEEE80211_IOC_TDMA_BINTERVAL, atoi(val), 0, NULL); +} + static int regdomain_sort(const void *a, const void *b) { @@ -2558,6 +2582,22 @@ printwpsie(const char *tag, const u_int8 #undef N } +static void +printtdmaie(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen) +{ + printf("%s", tag); + if (verbose && ielen >= sizeof(struct ieee80211_tdma_param)) { + const struct ieee80211_tdma_param *tdma = + (const struct ieee80211_tdma_param *) ie; + + /* XXX tstamp */ + printf("", + tdma->tdma_version, tdma->tdma_slot, tdma->tdma_slotcnt, + LE_READ_2(&tdma->tdma_slotlen), tdma->tdma_bintval, + tdma->tdma_inuse[0]); + } +} + /* * Copy the ssid string contents into buf, truncating to fit. If the * ssid is entirely printable then just copy intact. Otherwise convert @@ -2681,6 +2721,12 @@ isatherosoui(const u_int8_t *frm) } static __inline int +istdmaoui(const uint8_t *frm) +{ + return frm[1] > 3 && LE_READ_4(frm+2) == ((TDMA_OUI_TYPE<<24)|TDMA_OUI); +} + +static __inline int iswpsoui(const uint8_t *frm) { return frm[1] > 3 && LE_READ_4(frm+2) == ((WPS_OUI_TYPE<<24)|WPA_OUI); @@ -2749,6 +2795,8 @@ printies(const u_int8_t *vp, int ielen, printathie(" ATH", vp, 2+vp[1], maxcols); else if (iswpsoui(vp)) printwpsie(" WPS", vp, 2+vp[1], maxcols); + else if (istdmaoui(vp)) + printtdmaie(" TDMA", vp, 2+vp[1], maxcols); else if (verbose) printie(" VEN", vp, 2+vp[1], maxcols); break; @@ -3192,7 +3240,7 @@ list_keys(int s) "\20\1STA\7FF\10TURBOP\11IBSS\12PMGT" \ "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \ "\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ - "\37TXFRAG" + "\37TXFRAG\40TDMA" #define IEEE80211_CRYPTO_BITS \ "\20\1WEP\2TKIP\3AES\4AES_CCM\5TKIPMIC\6CKIP\12PMGT" @@ -4263,7 +4311,16 @@ end: } } - if (get80211val(s, IEEE80211_IOC_BEACON_INTERVAL, &val) != -1) { + if (opmode == IEEE80211_M_AHDEMO) { + if (get80211val(s, IEEE80211_IOC_TDMA_SLOT, &val) != -1) + LINE_CHECK("tdmaslot %u", val); + if (get80211val(s, IEEE80211_IOC_TDMA_SLOTCNT, &val) != -1) + LINE_CHECK("tdmaslotcnt %u", val); + if (get80211val(s, IEEE80211_IOC_TDMA_SLOTLEN, &val) != -1) + LINE_CHECK("tdmaslotlen %u", val); + if (get80211val(s, IEEE80211_IOC_TDMA_BINTERVAL, &val) != -1) + LINE_CHECK("tdmabintval %u", val); + } else if (get80211val(s, IEEE80211_IOC_BEACON_INTERVAL, &val) != -1) { /* XXX default define not visible */ if (val != 100 || verbose) LINE_CHECK("bintval %u", val); @@ -4486,7 +4543,10 @@ DECL_CMD_FUNC(set80211clone_wlanmode, ar params.icp_opmode = IEEE80211_M_WDS; else if (iseq(arg, "monitor")) params.icp_opmode = IEEE80211_M_MONITOR; - else + else if (iseq(arg, "tdma")) { + params.icp_opmode = IEEE80211_M_AHDEMO; + params.icp_flags |= IEEE80211_CLONE_TDMA; + } else errx(1, "Don't know to create %s for %s", arg, name); clone_setcallback(wlan_create); #undef iseq @@ -4662,6 +4722,11 @@ static struct cmd ieee80211_cmds[] = { /* XXX for testing */ DEF_CMD_ARG("chanswitch", set80211chanswitch), + DEF_CMD_ARG("tdmaslot", set80211tdmaslot), + DEF_CMD_ARG("tdmaslotcnt", set80211tdmaslotcnt), + DEF_CMD_ARG("tdmaslotlen", set80211tdmaslotlen), + DEF_CMD_ARG("tdmabintval", set80211tdmabintval), + /* vap cloning support */ DEF_CLONE_CMD_ARG("wlanaddr", set80211clone_wlanaddr), DEF_CLONE_CMD_ARG("wlanbssid", set80211clone_wlanbssid), Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jan 8 15:20:32 2009 (r186903) +++ head/sys/conf/files Thu Jan 8 17:12:47 2009 (r186904) @@ -2232,6 +2232,7 @@ net80211/ieee80211_rssadapt.c optional w net80211/ieee80211_scan.c optional wlan net80211/ieee80211_scan_sta.c optional wlan net80211/ieee80211_sta.c optional wlan +net80211/ieee80211_tdma.c optional wlan net80211/ieee80211_wds.c optional wlan net80211/ieee80211_xauth.c optional wlan_xauth netatalk/aarp.c optional netatalk Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Jan 8 15:20:32 2009 (r186903) +++ head/sys/conf/options Thu Jan 8 17:12:47 2009 (r186904) @@ -741,6 +741,7 @@ ATH_TXBUF opt_ath.h ATH_RXBUF opt_ath.h ATH_DIAGAPI opt_ath.h ATH_TX99_DIAG opt_ath.h +ATH_SUPPORT_TDMA opt_ath.h # options for the Atheros hal AH_SUPPORT_AR5416 opt_ah.h @@ -784,6 +785,15 @@ INTR_FILTER IEEE80211_DEBUG opt_wlan.h IEEE80211_DEBUG_REFCNT opt_wlan.h IEEE80211_AMPDU_AGE opt_wlan.h +IEEE80211_SUPPORT_TDMA opt_wlan.h + +# 802.11 TDMA support +TDMA_SLOTLEN_DEFAULT opt_tdma.h +TDMA_SLOTCNT_DEFAULT opt_tdma.h +TDMA_BINTVAL_DEFAULT opt_tdma.h +TDMA_TXRATE_11B_DEFAULT opt_tdma.h +TDMA_TXRATE_11G_DEFAULT opt_tdma.h +TDMA_TXRATE_11A_DEFAULT opt_tdma.h # Virtualize the network stack VIMAGE opt_global.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Thu Jan 8 15:20:32 2009 (r186903) +++ head/sys/dev/ath/if_ath.c Thu Jan 8 17:12:47 2009 (r186904) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -68,6 +68,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef ATH_SUPPORT_TDMA +#include +#endif #include @@ -216,6 +219,50 @@ static int ath_raw_xmit(struct ieee80211 static void ath_bpfattach(struct ath_softc *); static void ath_announce(struct ath_softc *); +#ifdef ATH_SUPPORT_TDMA +static void ath_tdma_settimers(struct ath_softc *sc, u_int32_t nexttbtt, + u_int32_t bintval); +static void ath_tdma_bintvalsetup(struct ath_softc *sc, + const struct ieee80211_tdma_state *tdma); +static void ath_tdma_config(struct ath_softc *sc, struct ieee80211vap *vap); +static void ath_tdma_update(struct ieee80211_node *ni, + const struct ieee80211_tdma_param *tdma); +static void ath_tdma_beacon_send(struct ath_softc *sc, + struct ieee80211vap *vap); + +static __inline void +ath_hal_setcca(struct ath_hal *ah, int ena) +{ + /* + * NB: fill me in; this is not provided by default because disabling + * CCA in most locales violates regulatory. + */ +} + +static __inline int +ath_hal_getcca(struct ath_hal *ah) +{ + u_int32_t diag; + if (ath_hal_getcapability(ah, HAL_CAP_DIAG, 0, &diag) != HAL_OK) + return 1; + return ((diag & 0x500000) == 0); +} + +#define TDMA_EP_MULTIPLIER (1<<10) /* pow2 to optimize out * and / */ +#define TDMA_LPF_LEN 6 +#define TDMA_DUMMY_MARKER 0x127 +#define TDMA_EP_MUL(x, mul) ((x) * (mul)) +#define TDMA_IN(x) (TDMA_EP_MUL((x), TDMA_EP_MULTIPLIER)) +#define TDMA_LPF(x, y, len) \ + ((x != TDMA_DUMMY_MARKER) ? (((x) * ((len)-1) + (y)) / (len)) : (y)) +#define TDMA_SAMPLE(x, y) do { \ + x = TDMA_LPF((x), TDMA_IN(y), TDMA_LPF_LEN); \ +} while (0) +#define TDMA_EP_RND(x,mul) \ + ((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul)) +#define TDMA_AVG(x) TDMA_EP_RND(x, TDMA_EP_MULTIPLIER) +#endif /* ATH_SUPPORT_TDMA */ + SYSCTL_DECL(_hw_ath); /* XXX validate sysctl values */ @@ -260,6 +307,8 @@ enum { ATH_DEBUG_LED = 0x00100000, /* led management */ ATH_DEBUG_FF = 0x00200000, /* fast frames */ ATH_DEBUG_DFS = 0x00400000, /* DFS processing */ + ATH_DEBUG_TDMA = 0x00800000, /* TDMA processing */ + ATH_DEBUG_TDMA_TIMER = 0x01000000, /* TDMA timer processing */ ATH_DEBUG_REGDOMAIN = 0x02000000, /* regulatory processing */ ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */ ATH_DEBUG_ANY = 0xffffffff @@ -615,7 +664,12 @@ ath_attach(u_int16_t devid, struct ath_s wmodes = ath_hal_getwirelessmodes(ah, ic->ic_regdomain.country); if (wmodes & (HAL_MODE_108G|HAL_MODE_TURBO)) ic->ic_caps |= IEEE80211_C_TURBOP; - +#ifdef ATH_SUPPORT_TDMA + if (ath_hal_macversion(ah) > 0x78) { + ic->ic_caps |= IEEE80211_C_TDMA; /* capable of TDMA */ + ic->ic_tdma_update = ath_tdma_update; + } +#endif /* * Indicate we need the 802.11 header padded to a * 32-bit boundary for 4-address and QoS frames. @@ -824,10 +878,9 @@ ath_vap_create(struct ieee80211com *ic, */ flags |= IEEE80211_CLONE_NOBEACONS; } - if (flags & IEEE80211_CLONE_NOBEACONS) { - sc->sc_swbmiss = 1; + if (flags & IEEE80211_CLONE_NOBEACONS) ic_opmode = IEEE80211_M_HOSTAP; - } else + else ic_opmode = opmode; break; case IEEE80211_M_IBSS: @@ -840,7 +893,13 @@ ath_vap_create(struct ieee80211com *ic, needbeacon = 1; break; case IEEE80211_M_AHDEMO: +#ifdef ATH_SUPPORT_TDMA + if (flags & IEEE80211_CLONE_TDMA) { + needbeacon = 1; + flags |= IEEE80211_CLONE_NOBEACONS; + } /* fall thru... */ +#endif case IEEE80211_M_MONITOR: if (sc->sc_nvaps != 0 && ic->ic_opmode != opmode) { /* XXX not right for monitor mode */ @@ -959,6 +1018,18 @@ ath_vap_create(struct ieee80211com *ic, sc->sc_opmode = HAL_M_STA; break; case IEEE80211_M_AHDEMO: +#ifdef ATH_SUPPORT_TDMA + if (vap->iv_caps & IEEE80211_C_TDMA) { + sc->sc_tdma = 1; + /* NB: disable tsf adjust */ + sc->sc_stagbeacons = 0; + } + /* + * NB: adhoc demo mode is a pseudo mode; to the hal it's + * just ap mode. + */ + /* fall thru... */ +#endif case IEEE80211_M_HOSTAP: sc->sc_opmode = HAL_M_HOSTAP; break; @@ -975,6 +1046,12 @@ ath_vap_create(struct ieee80211com *ic, */ ath_hal_settsfadjust(sc->sc_ah, sc->sc_stagbeacons); } + if (flags & IEEE80211_CLONE_NOBEACONS) { + /* + * Enable s/w beacon miss handling. + */ + sc->sc_swbmiss = 1; + } ATH_UNLOCK(sc); /* complete setup */ @@ -1047,6 +1124,13 @@ ath_vap_delete(struct ieee80211vap *vap) } if (vap->iv_opmode != IEEE80211_M_WDS) sc->sc_nvaps--; +#ifdef ATH_SUPPORT_TDMA + /* TDMA operation ceases when the last vap is destroyed */ + if (sc->sc_tdma && sc->sc_nvaps == 0) { + sc->sc_tdma = 0; + sc->sc_swbmiss = 0; + } +#endif ATH_UNLOCK(sc); free(avp, M_80211_VAP); @@ -1198,7 +1282,20 @@ ath_intr(void *arg) * this is too slow to meet timing constraints * under load. */ - ath_beacon_proc(sc, 0); +#ifdef ATH_SUPPORT_TDMA + if (sc->sc_tdma) { + if (sc->sc_tdmaswba == 0) { + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211vap *vap = + TAILQ_FIRST(&ic->ic_vaps); + ath_tdma_beacon_send(sc, vap); + sc->sc_tdmaswba = + vap->iv_tdma->tdma_bintval; + } else + sc->sc_tdmaswba--; + } else +#endif + ath_beacon_proc(sc, 0); } if (status & HAL_INT_RXEOL) { /* @@ -1581,8 +1678,14 @@ ath_reset(struct ifnet *ifp) * might change as a result. */ ath_chan_change(sc, ic->ic_curchan); - if (sc->sc_beacons) - ath_beacon_config(sc, NULL); /* restart beacons */ + if (sc->sc_beacons) { +#ifdef ATH_SUPPORT_TDMA + if (sc->sc_tdma) + ath_tdma_config(sc, NULL); + else +#endif + ath_beacon_config(sc, NULL); /* restart beacons */ + } ath_hal_intrset(ah, sc->sc_imask); ath_start(ifp); /* restart xmit */ @@ -1688,7 +1791,7 @@ ath_ff_stageq_flush(struct ath_softc *sc } ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bf, bf_list); ATH_TXBUF_UNLOCK(sc); } } @@ -1829,7 +1932,7 @@ ath_ff_check(struct ath_softc *sc, struc * Return bfstaged to the free list. */ ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bfstaged, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bfstaged, bf_list); ATH_TXBUF_UNLOCK(sc); return m; /* ready to go */ @@ -1902,7 +2005,7 @@ ath_ff_check(struct ath_softc *sc, struc } ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bfstaged, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bfstaged, bf_list); ATH_TXBUF_UNLOCK(sc); } else { #if 0 @@ -1925,6 +2028,45 @@ ath_ff_check(struct ath_softc *sc, struc return m; } +static struct ath_buf * +_ath_getbuf_locked(struct ath_softc *sc) +{ + struct ath_buf *bf; + + ATH_TXBUF_LOCK_ASSERT(sc); + + bf = STAILQ_FIRST(&sc->sc_txbuf); + if (bf != NULL && (bf->bf_flags & ATH_BUF_BUSY) == 0) + STAILQ_REMOVE_HEAD(&sc->sc_txbuf, bf_list); + else + bf = NULL; + if (bf == NULL) { + DPRINTF(sc, ATH_DEBUG_XMIT, "%s: %s\n", __func__, + STAILQ_FIRST(&sc->sc_txbuf) == NULL ? + "out of xmit buffers" : "xmit buffer busy"); + sc->sc_stats.ast_tx_nobuf++; + } + return bf; +} + +static struct ath_buf * +ath_getbuf(struct ath_softc *sc) +{ + struct ath_buf *bf; + + ATH_TXBUF_LOCK(sc); + bf = _ath_getbuf_locked(sc); + if (bf == NULL) { + struct ifnet *ifp = sc->sc_ifp; + + DPRINTF(sc, ATH_DEBUG_XMIT, "%s: stop queue\n", __func__); + sc->sc_stats.ast_tx_qstop++; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + } + ATH_TXBUF_UNLOCK(sc); + return bf; +} + /* * Cleanup driver resources when we run out of buffers * while processing fragments; return the tx buffers @@ -1941,7 +2083,7 @@ ath_txfrag_cleanup(struct ath_softc *sc, STAILQ_FOREACH_SAFE(bf, frags, bf_list, next) { /* NB: bf assumed clean */ STAILQ_REMOVE_HEAD(frags, bf_list); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bf, bf_list); ieee80211_node_decref(ni); } } @@ -1960,12 +2102,11 @@ ath_txfrag_setup(struct ath_softc *sc, a ATH_TXBUF_LOCK(sc); for (m = m0->m_nextpkt; m != NULL; m = m->m_nextpkt) { - bf = STAILQ_FIRST(&sc->sc_txbuf); + bf = _ath_getbuf_locked(sc); if (bf == NULL) { /* out of buffers, cleanup */ ath_txfrag_cleanup(sc, frags, ni); break; } - STAILQ_REMOVE_HEAD(&sc->sc_txbuf, bf_list); ieee80211_node_incref(ni); STAILQ_INSERT_TAIL(frags, bf, bf_list); } @@ -1992,23 +2133,14 @@ ath_start(struct ifnet *ifp) /* * Grab a TX buffer and associated resources. */ - ATH_TXBUF_LOCK(sc); - bf = STAILQ_FIRST(&sc->sc_txbuf); - if (bf != NULL) - STAILQ_REMOVE_HEAD(&sc->sc_txbuf, bf_list); - ATH_TXBUF_UNLOCK(sc); - if (bf == NULL) { - DPRINTF(sc, ATH_DEBUG_XMIT, "%s: out of xmit buffers\n", - __func__); - sc->sc_stats.ast_tx_qstop++; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; + bf = ath_getbuf(sc); + if (bf == NULL) break; - } IFQ_DEQUEUE(&ifp->if_snd, m); if (m == NULL) { ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bf, bf_list); ATH_TXBUF_UNLOCK(sc); break; } @@ -2082,7 +2214,7 @@ ath_start(struct ifnet *ifp) bf->bf_m = NULL; bf->bf_node = NULL; ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bf, bf_list); ath_txfrag_cleanup(sc, &frags, ni); ATH_TXBUF_UNLOCK(sc); if (ni != NULL) @@ -4215,6 +4347,9 @@ rx_accept: /* * Sending station is known, dispatch directly. */ +#ifdef ATH_SUPPORT_TDMA + sc->sc_tdmars = rs; +#endif type = ieee80211_input(ni, m, rs->rs_rssi, nf, rs->rs_tstamp); ieee80211_free_node(ni); @@ -4387,10 +4522,48 @@ ath_txq_update(struct ath_softc *sc, int HAL_TXQ_INFO qi; ath_hal_gettxqueueprops(ah, txq->axq_qnum, &qi); - qi.tqi_aifs = wmep->wmep_aifsn; - qi.tqi_cwmin = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmin); - qi.tqi_cwmax = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmax); - qi.tqi_burstTime = ATH_TXOP_TO_US(wmep->wmep_txopLimit); +#ifdef ATH_SUPPORT_TDMA + if (sc->sc_tdma) { + /* + * AIFS is zero so there's no pre-transmit wait. The + * burst time defines the slot duration and is configured + * via sysctl. The QCU is setup to not do post-xmit + * back off, lockout all lower-priority QCU's, and fire + * off the DMA beacon alert timer which is setup based + * on the slot configuration. + */ + qi.tqi_qflags = HAL_TXQ_TXOKINT_ENABLE + | HAL_TXQ_TXERRINT_ENABLE + | HAL_TXQ_TXURNINT_ENABLE + | HAL_TXQ_TXEOLINT_ENABLE + | HAL_TXQ_DBA_GATED + | HAL_TXQ_BACKOFF_DISABLE + | HAL_TXQ_ARB_LOCKOUT_GLOBAL + ; + qi.tqi_aifs = 0; + /* XXX +dbaprep? */ + qi.tqi_readyTime = sc->sc_tdmaslotlen; + qi.tqi_burstTime = qi.tqi_readyTime; + } else { +#endif + qi.tqi_qflags = HAL_TXQ_TXOKINT_ENABLE + | HAL_TXQ_TXERRINT_ENABLE + | HAL_TXQ_TXDESCINT_ENABLE + | HAL_TXQ_TXURNINT_ENABLE + ; + qi.tqi_aifs = wmep->wmep_aifsn; + qi.tqi_cwmin = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmin); + qi.tqi_cwmax = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmax); + qi.tqi_readyTime = 0; + qi.tqi_burstTime = ATH_TXOP_TO_US(wmep->wmep_txopLimit); +#ifdef ATH_SUPPORT_TDMA + } +#endif + + DPRINTF(sc, ATH_DEBUG_RESET, + "%s: Q%u qflags 0x%x aifs %u cwmin %u cwmax %u burstTime %u\n", + __func__, txq->axq_qnum, qi.tqi_qflags, + qi.tqi_aifs, qi.tqi_cwmin, qi.tqi_cwmax, qi.tqi_burstTime); if (!ath_hal_settxqueueprops(ah, txq->axq_qnum, &qi)) { if_printf(ifp, "unable to update hardware queue " @@ -4570,13 +4743,71 @@ ath_tx_handoff(struct ath_softc *sc, str * to avoid possible races. */ ATH_TXQ_LOCK(txq); + KASSERT((bf->bf_flags & ATH_BUF_BUSY) == 0, + ("busy status 0x%x", bf->bf_flags)); if (txq->axq_qnum != ATH_TXQ_SWQ) { +#ifdef ATH_SUPPORT_TDMA + int qbusy; + + ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); + qbusy = ath_hal_txqenabled(ah, txq->axq_qnum); + if (txq->axq_link == NULL) { + /* + * Be careful writing the address to TXDP. If + * the tx q is enabled then this write will be + * ignored. Normally this is not an issue but + * when tdma is in use and the q is beacon gated + * this race can occur. If the q is busy then + * defer the work to later--either when another + * packet comes along or when we prepare a beacon + * frame at SWBA. + */ + if (!qbusy) { + ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); + txq->axq_flags &= ~ATH_TXQ_PUTPENDING; + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: TXDP[%u] = %p (%p) depth %d\n", + __func__, txq->axq_qnum, + (caddr_t)bf->bf_daddr, bf->bf_desc, + txq->axq_depth); + } else { + txq->axq_flags |= ATH_TXQ_PUTPENDING; + DPRINTF(sc, ATH_DEBUG_TDMA | ATH_DEBUG_XMIT, + "%s: Q%u busy, defer enable\n", __func__, + txq->axq_qnum); + } + } else { + *txq->axq_link = bf->bf_daddr; + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: link[%u](%p)=%p (%p) depth %d\n", __func__, + txq->axq_qnum, txq->axq_link, + (caddr_t)bf->bf_daddr, bf->bf_desc, txq->axq_depth); + if ((txq->axq_flags & ATH_TXQ_PUTPENDING) && !qbusy) { + /* + * The q was busy when we previously tried + * to write the address of the first buffer + * in the chain. Since it's not busy now + * handle this chore. We are certain the + * buffer at the front is the right one since + * axq_link is NULL only when the buffer list + * is/was empty. + */ + ath_hal_puttxbuf(ah, txq->axq_qnum, + STAILQ_FIRST(&txq->axq_q)->bf_daddr); + txq->axq_flags &= ~ATH_TXQ_PUTPENDING; + DPRINTF(sc, ATH_DEBUG_TDMA | ATH_DEBUG_XMIT, + "%s: Q%u restarted\n", __func__, + txq->axq_qnum); + } + } +#else ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); if (txq->axq_link == NULL) { ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); DPRINTF(sc, ATH_DEBUG_XMIT, - "%s: TXDP[%u] = %p (%p) depth %d\n", __func__, - txq->axq_qnum, (caddr_t)bf->bf_daddr, bf->bf_desc, + "%s: TXDP[%u] = %p (%p) depth %d\n", + __func__, txq->axq_qnum, + (caddr_t)bf->bf_daddr, bf->bf_desc, txq->axq_depth); } else { *txq->axq_link = bf->bf_daddr; @@ -4585,6 +4816,7 @@ ath_tx_handoff(struct ath_softc *sc, str txq->axq_qnum, txq->axq_link, (caddr_t)bf->bf_daddr, bf->bf_desc, txq->axq_depth); } +#endif /* ATH_SUPPORT_TDMA */ txq->axq_link = &bf->bf_desc[bf->bf_nseg - 1].ds_link; ath_hal_txstart(ah, txq->axq_qnum); } else { @@ -4819,6 +5051,15 @@ ath_tx_start(struct ath_softc *sc, struc } if (flags & HAL_TXDESC_NOACK) /* NB: avoid double counting */ sc->sc_stats.ast_tx_noack++; +#ifdef ATH_SUPPORT_TDMA + if (sc->sc_tdma && (flags & HAL_TXDESC_NOACK) == 0) { + DPRINTF(sc, ATH_DEBUG_XMIT, "%s: ACK required w/ TDMA\n", + __func__); + /* XXX statistic */ + ath_freetx(m0); + return EIO; + } +#endif /* * If 802.11g protection is enabled, determine whether @@ -5017,7 +5258,7 @@ ath_tx_processq(struct ath_softc *sc, st struct ath_hal *ah = sc->sc_ah; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - struct ath_buf *bf; + struct ath_buf *bf, *last; struct ath_desc *ds, *ds0; struct ath_tx_status *ts; struct ieee80211_node *ni; @@ -5052,7 +5293,18 @@ ath_tx_processq(struct ath_softc *sc, st break; } ATH_TXQ_REMOVE_HEAD(txq, bf_list); +#ifdef ATH_SUPPORT_TDMA + if (txq->axq_depth > 0) { + /* + * More frames follow. Mark the buffer busy + * so it's not re-used while the hardware may + * still re-read the link field in the descriptor. + */ + bf->bf_flags |= ATH_BUF_BUSY; + } else +#else if (txq->axq_depth == 0) +#endif txq->axq_link = NULL; ATH_TXQ_UNLOCK(txq); @@ -5128,6 +5380,9 @@ ath_tx_processq(struct ath_softc *sc, st bf->bf_node = NULL; ATH_TXBUF_LOCK(sc); + last = STAILQ_LAST(&sc->sc_txbuf, ath_buf, bf_list); + if (last != NULL) + last->bf_flags &= ~ATH_BUF_BUSY; STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); ATH_TXBUF_UNLOCK(sc); } @@ -5250,6 +5505,11 @@ ath_tx_draintxq(struct ath_softc *sc, st * NB: this assumes output has been stopped and * we do not need to block ath_tx_proc */ + ATH_TXBUF_LOCK(sc); + bf = STAILQ_LAST(&sc->sc_txbuf, ath_buf, bf_list); + if (bf != NULL) + bf->bf_flags &= ~ATH_BUF_BUSY; + ATH_TXBUF_UNLOCK(sc); for (ix = 0;; ix++) { ATH_TXQ_LOCK(txq); bf = STAILQ_FIRST(&txq->axq_q); @@ -5284,6 +5544,7 @@ ath_tx_draintxq(struct ath_softc *sc, st } m_freem(bf->bf_m); bf->bf_m = NULL; + bf->bf_flags &= ~ATH_BUF_BUSY; ATH_TXBUF_LOCK(sc); STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); @@ -5760,6 +6021,12 @@ ath_newstate(struct ieee80211vap *vap, e ni->ni_capinfo, ieee80211_chan2ieee(ic, ic->ic_curchan)); switch (vap->iv_opmode) { +#ifdef ATH_SUPPORT_TDMA + case IEEE80211_M_AHDEMO: + if ((vap->iv_caps & IEEE80211_C_TDMA) == 0) + break; + /* fall thru... */ +#endif case IEEE80211_M_HOSTAP: case IEEE80211_M_IBSS: /* @@ -5788,7 +6055,12 @@ ath_newstate(struct ieee80211vap *vap, e ni->ni_tstamp.tsf != 0) { sc->sc_syncbeacon = 1; } else if (!sc->sc_beacons) { - ath_beacon_config(sc, vap); +#ifdef ATH_SUPPORT_TDMA + if (vap->iv_caps & IEEE80211_C_TDMA) + ath_tdma_config(sc, vap); + else +#endif + ath_beacon_config(sc, vap); sc->sc_beacons = 1; } break; @@ -5851,6 +6123,9 @@ ath_newstate(struct ieee80211vap *vap, e taskqueue_block(sc->sc_tq); sc->sc_beacons = 0; } +#ifdef ATH_SUPPORT_TDMA + ath_hal_setcca(ah, AH_TRUE); +#endif } bad: return error; @@ -6500,6 +6775,10 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, sc->sc_stats.ast_rx_packets = ifp->if_ipackets; sc->sc_stats.ast_tx_rssi = ATH_RSSI(sc->sc_halstats.ns_avgtxrssi); sc->sc_stats.ast_rx_rssi = ATH_RSSI(sc->sc_halstats.ns_avgrssi); +#ifdef ATH_SUPPORT_TDMA + sc->sc_stats.ast_tdma_tsfadjp = TDMA_AVG(sc->sc_avgtsfdeltap); + sc->sc_stats.ast_tdma_tsfadjm = TDMA_AVG(sc->sc_avgtsfdeltam); +#endif rt = sc->sc_currates; /* XXX HT rates */ sc->sc_stats.ast_tx_rate = @@ -6876,6 +7155,24 @@ ath_sysctlattach(struct ath_softc *sc) SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "monpass", CTLFLAG_RW, &sc->sc_monpass, 0, "mask of error frames to pass when monitoring"); +#ifdef ATH_SUPPORT_TDMA + if (ath_hal_macversion(ah) > 0x78) { + sc->sc_tdmadbaprep = 2; + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "dbaprep", CTLFLAG_RW, &sc->sc_tdmadbaprep, 0, + "TDMA DBA preparation time"); + sc->sc_tdmaswbaprep = 10; + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "swbaprep", CTLFLAG_RW, &sc->sc_tdmaswbaprep, 0, + "TDMA SWBA preparation time"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "guardtime", CTLFLAG_RW, &sc->sc_tdmaguard, 0, + "TDMA slot guard time"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "superframe", CTLFLAG_RD, &sc->sc_tdmabintval, 0, + "TDMA calculated super frame"); + } +#endif } static void @@ -7123,16 +7420,8 @@ ath_raw_xmit(struct ieee80211_node *ni, /* * Grab a TX buffer and associated resources. */ - ATH_TXBUF_LOCK(sc); - bf = STAILQ_FIRST(&sc->sc_txbuf); - if (bf != NULL) - STAILQ_REMOVE_HEAD(&sc->sc_txbuf, bf_list); - ATH_TXBUF_UNLOCK(sc); + bf = ath_getbuf(sc); if (bf == NULL) { - DPRINTF(sc, ATH_DEBUG_XMIT, "%s: out of xmit buffers\n", - __func__); - sc->sc_stats.ast_tx_qstop++; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; ieee80211_free_node(ni); m_freem(m); return ENOBUFS; @@ -7162,7 +7451,7 @@ ath_raw_xmit(struct ieee80211_node *ni, bad: ifp->if_oerrors++; ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bf, bf_list); ATH_TXBUF_UNLOCK(sc); ieee80211_free_node(ni); return EIO; /* XXX */ @@ -7220,3 +7509,364 @@ ath_announce(struct ath_softc *sc) if_printf(ifp, "using %u tx buffers\n", ath_txbuf); #undef HAL_MODE_DUALBAND } + +#ifdef ATH_SUPPORT_TDMA +static __inline uint32_t +ath_hal_getnexttbtt(struct ath_hal *ah) +{ +#define AR_TIMER0 0x8028 + return OS_REG_READ(ah, AR_TIMER0); +} + +static __inline void +ath_hal_adjusttsf(struct ath_hal *ah, int32_t tsfdelta) +{ + /* XXX handle wrap/overflow */ + OS_REG_WRITE(ah, AR_TSF_L32, OS_REG_READ(ah, AR_TSF_L32) + tsfdelta); +} + +static void +ath_tdma_settimers(struct ath_softc *sc, u_int32_t nexttbtt, u_int32_t bintval) +{ + struct ath_hal *ah = sc->sc_ah; + HAL_BEACON_TIMERS bt; + + bt.bt_intval = bintval | HAL_BEACON_ENA; + bt.bt_nexttbtt = nexttbtt; + bt.bt_nextdba = (nexttbtt<<3) - sc->sc_tdmadbaprep; + bt.bt_nextswba = (nexttbtt<<3) - sc->sc_tdmaswbaprep; + bt.bt_nextatim = nexttbtt+1; + ath_hal_beaconsettimers(ah, &bt); +} + +/* + * Calculate the beacon interval. This is periodic in the + * superframe for the bss. We assume each station is configured + * identically wrt transmit rate so the guard time we calculate + * above will be the same on all stations. Note we need to + * factor in the xmit time because the hardware will schedule + * a frame for transmit if the start of the frame is within + * the burst time. When we get hardware that properly kills + * frames in the PCU we can reduce/eliminate the guard time. + * + * Roundup to 1024 is so we have 1 TU buffer in the guard time + * to deal with the granularity of the nexttbtt timer. 11n MAC's + * with 1us timer granularity should allow us to reduce/eliminate + * this. + */ +static void +ath_tdma_bintvalsetup(struct ath_softc *sc, + const struct ieee80211_tdma_state *tdma) +{ + /* copy from vap state (XXX check all vaps have same value?) */ + sc->sc_tdmaslotlen = tdma->tdma_slotlen; + sc->sc_tdmabintcnt = tdma->tdma_bintval; + + sc->sc_tdmabintval = roundup((sc->sc_tdmaslotlen+sc->sc_tdmaguard) * + tdma->tdma_slotcnt, 1024); + sc->sc_tdmabintval >>= 10; /* TSF -> TU */ + if (sc->sc_tdmabintval & 1) + sc->sc_tdmabintval++; + + if (tdma->tdma_slot == 0) { + /* + * Only slot 0 beacons; other slots respond. + */ + sc->sc_imask |= HAL_INT_SWBA; + sc->sc_tdmaswba = 0; /* beacon immediately */ + } else { + /* XXX all vaps must be slot 0 or slot !0 */ + sc->sc_imask &= ~HAL_INT_SWBA; + } +} + +/* + * Max 802.11 overhead. This assumes no 4-address frames and + * the encapsulation done by ieee80211_encap (llc). We also + * include potential crypto overhead. + */ +#define IEEE80211_MAXOVERHEAD \ + (sizeof(struct ieee80211_qosframe) \ + + sizeof(struct llc) \ + + IEEE80211_ADDR_LEN \ + + IEEE80211_WEP_IVLEN \ + + IEEE80211_WEP_KIDLEN \ + + IEEE80211_WEP_CRCLEN \ + + IEEE80211_WEP_MICLEN \ + + IEEE80211_CRC_LEN) + +/* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 17:26:51 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC31510657CA; Thu, 8 Jan 2009 17:26:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 976518FC18; Thu, 8 Jan 2009 17:26:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08HQpN5028359; Thu, 8 Jan 2009 17:26:51 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08HQpub028356; Thu, 8 Jan 2009 17:26:51 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200901081726.n08HQpub028356@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 8 Jan 2009 17:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186905 - in head/sys: cam dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 17:26:54 -0000 Author: trasz Date: Thu Jan 8 17:26:51 2009 New Revision: 186905 URL: http://svn.freebsd.org/changeset/base/186905 Log: Make "kldunload atapicam" return EBUSY instead of deadlocking when a device created by atapicam is being kept opened or mounted. This is probably just a temporary solution until we invent something better. Reviewed by: scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Reported by: Jaakko Heinonen Modified: head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt_sim.h head/sys/dev/ata/atapi-cam.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Jan 8 17:12:47 2009 (r186904) +++ head/sys/cam/cam_xpt.c Thu Jan 8 17:26:51 2009 (r186905) @@ -2642,6 +2642,39 @@ xptbustraverse(struct cam_eb *start_bus, return(retval); } +int +xpt_sim_opened(struct cam_sim *sim) +{ + struct cam_eb *bus; + struct cam_et *target; + struct cam_ed *device; + struct cam_periph *periph; + + KASSERT(sim->refcount >= 1, ("sim->refcount >= 1")); + mtx_assert(sim->mtx, MA_OWNED); + + mtx_lock(&xsoftc.xpt_topo_lock); + TAILQ_FOREACH(bus, &xsoftc.xpt_busses, links) { + if (bus->sim != sim) + continue; + + TAILQ_FOREACH(target, &bus->et_entries, links) { + TAILQ_FOREACH(device, &target->ed_entries, links) { + SLIST_FOREACH(periph, &device->periphs, + periph_links) { + if (periph->refcount > 0) { + mtx_unlock(&xsoftc.xpt_topo_lock); + return (1); + } + } + } + } + } + + mtx_unlock(&xsoftc.xpt_topo_lock); + return (0); +} + static int xpttargettraverse(struct cam_eb *bus, struct cam_et *start_target, xpt_targetfunc_t *tr_func, void *arg) @@ -4277,7 +4310,7 @@ xpt_release_ccb(union ccb *free_ccb) * for this new bus and places it in the array of busses and assigns * it a path_id. The path_id may be influenced by "hard wiring" * information specified by the user. Once interrupt services are - * availible, the bus will be probed. + * available, the bus will be probed. */ int32_t xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) Modified: head/sys/cam/cam_xpt_sim.h ============================================================================== --- head/sys/cam/cam_xpt_sim.h Thu Jan 8 17:12:47 2009 (r186904) +++ head/sys/cam/cam_xpt_sim.h Thu Jan 8 17:26:51 2009 (r186905) @@ -45,6 +45,7 @@ void xpt_release_simq(struct cam_sim *s u_int32_t xpt_freeze_devq(struct cam_path *path, u_int count); void xpt_release_devq(struct cam_path *path, u_int count, int run_queue); +int xpt_sim_opened(struct cam_sim *sim); void xpt_done(union ccb *done_ccb); #endif Modified: head/sys/dev/ata/atapi-cam.c ============================================================================== --- head/sys/dev/ata/atapi-cam.c Thu Jan 8 17:12:47 2009 (r186904) +++ head/sys/dev/ata/atapi-cam.c Thu Jan 8 17:26:51 2009 (r186905) @@ -254,6 +254,10 @@ atapi_cam_detach(device_t dev) struct atapi_xpt_softc *scp = device_get_softc(dev); mtx_lock(&scp->state_lock); + if (xpt_sim_opened(scp->sim)) { + mtx_unlock(&scp->state_lock); + return (EBUSY); + } xpt_freeze_simq(scp->sim, 1 /*count*/); scp->flags |= DETACHING; mtx_unlock(&scp->state_lock); From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 17:47:45 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 652C81065670; Thu, 8 Jan 2009 17:47:45 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 535FC8FC1C; Thu, 8 Jan 2009 17:47:45 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08Hljqs028759; Thu, 8 Jan 2009 17:47:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08HljBb028758; Thu, 8 Jan 2009 17:47:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200901081747.n08HljBb028758@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 8 Jan 2009 17:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186906 - head/sys/dev/adb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 17:47:45 -0000 Author: nwhitehorn Date: Thu Jan 8 17:47:45 2009 New Revision: 186906 URL: http://svn.freebsd.org/changeset/base/186906 Log: Improve the AT keyboard emulation of the ADB keyboard driver, by supporting an AT-like K_RAW mode instead of just K_CODE. This has the effect of making the arrow keys on ADB keyboards work in X11. Copied from: sunkbd(4) Modified: head/sys/dev/adb/adb_kbd.c Modified: head/sys/dev/adb/adb_kbd.c ============================================================================== --- head/sys/dev/adb/adb_kbd.c Thu Jan 8 17:26:51 2009 (r186905) +++ head/sys/dev/adb/adb_kbd.c Thu Jan 8 17:47:45 2009 (r186906) @@ -72,6 +72,9 @@ struct adb_kbd_softc { int have_led_control; uint8_t buffer[8]; +#ifdef AKBD_EMULATE_ATKBD + uint8_t at_buffered_char[2]; +#endif volatile int buffers; struct callout sc_repeater; @@ -105,6 +108,17 @@ static devclass_t adb_kbd_devclass; DRIVER_MODULE(akbd, adb, adb_kbd_driver, adb_kbd_devclass, 0, 0); +#ifdef AKBD_EMULATE_ATKBD + +#define SCAN_PRESS 0x000 +#define SCAN_RELEASE 0x080 +#define SCAN_PREFIX_E0 0x100 +#define SCAN_PREFIX_E1 0x200 +#define SCAN_PREFIX_CTL 0x400 +#define SCAN_PREFIX_SHIFT 0x800 +#define SCAN_PREFIX (SCAN_PREFIX_E0 | SCAN_PREFIX_E1 | \ + SCAN_PREFIX_CTL | SCAN_PREFIX_SHIFT) + static const uint8_t adb_to_at_scancode_map[128] = { 30, 31, 32, 33, 35, 34, 44, 45, 46, 47, 0, 48, 16, 17, 18, 19, 21, 20, 2, 3, 4, 5, 7, 6, 13, 10, 8, 12, 9, 11, 27, 24, 22, 26, 23, 25, 28, 38, 36, 40, 37, 39, 43, @@ -114,6 +128,47 @@ static const uint8_t adb_to_at_scancode_ 66, 67, 0, 87, 0, 105, 0, 70, 0, 68, 0, 88, 0, 107, 102, 94, 96, 103, 62, 99, 60, 101, 59, 54, 93, 90, 0, 0 }; +static int +keycode2scancode(int keycode, int shift, int up) +{ + static const int scan[] = { + /* KP enter, right ctrl, KP divide */ + 0x1c , 0x1d , 0x35 , + /* print screen */ + 0x37 | SCAN_PREFIX_SHIFT, + /* right alt, home, up, page up, left, right, end */ + 0x38, 0x47, 0x48, 0x49, 0x4b, 0x4d, 0x4f, + /* down, page down, insert, delete */ + 0x50, 0x51, 0x52, 0x53, + /* pause/break (see also below) */ + 0x46, + /* + * MS: left window, right window, menu + * also Sun: left meta, right meta, compose + */ + 0x5b, 0x5c, 0x5d, + /* Sun type 6 USB */ + /* help, stop, again, props, undo, front, copy */ + 0x68, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, + /* open, paste, find, cut, audiomute, audiolower, audioraise */ + 0x64, 0x65, 0x66, 0x67, 0x25, 0x1f, 0x1e, + /* power */ + 0x20 + }; + int scancode; + + scancode = keycode; + if ((keycode >= 89) && (keycode < 89 + sizeof(scan) / sizeof(scan[0]))) + scancode = scan[keycode - 89] | SCAN_PREFIX_E0; + /* pause/break */ + if ((keycode == 104) && !(shift & CTLS)) + scancode = 0x45 | SCAN_PREFIX_E1 | SCAN_PREFIX_CTL; + if (shift & SHIFTS) + scancode &= ~SCAN_PREFIX_SHIFT; + return (scancode | (up ? SCAN_RELEASE : SCAN_PRESS)); +} +#endif + /* keyboard driver declaration */ static int akbd_configure(int flags); static kbd_probe_t akbd_probe; @@ -468,6 +523,13 @@ akbd_check(keyboard_t *kbd) sc = (struct adb_kbd_softc *)(kbd); mtx_lock(&sc->sc_mutex); +#ifdef AKBD_EMULATE_ATKBD + if (sc->at_buffered_char[0]) { + mtx_unlock(&sc->sc_mutex); + return (TRUE); + } +#endif + if (sc->buffers > 0) { mtx_unlock(&sc->sc_mutex); return (TRUE); @@ -481,36 +543,89 @@ static u_int akbd_read_char(keyboard_t *kbd, int wait) { struct adb_kbd_softc *sc; - uint8_t adb_code, final_scancode; + uint16_t key; + uint8_t adb_code; int i; sc = (struct adb_kbd_softc *)(kbd); mtx_lock(&sc->sc_mutex); - if (!sc->buffers && wait) - cv_wait(&sc->sc_cv,&sc->sc_mutex); - if (!sc->buffers) { - mtx_unlock(&sc->sc_mutex); - return (0); +#if defined(AKBD_EMULATE_ATKBD) + if (sc->sc_mode == K_RAW && sc->at_buffered_char[0]) { + key = sc->at_buffered_char[0]; + if (key & SCAN_PREFIX) { + sc->at_buffered_char[0] = key & ~SCAN_PREFIX; + key = (key & SCAN_PREFIX_E0) ? 0xe0 : 0xe1; + } else { + sc->at_buffered_char[0] = sc->at_buffered_char[1]; + sc->at_buffered_char[1] = 0; } - adb_code = sc->buffer[0]; + mtx_unlock(&sc->sc_mutex); - for (i = 1; i < sc->buffers; i++) - sc->buffer[i-1] = sc->buffer[i]; + return (key); + } +#endif - sc->buffers--; - mtx_unlock(&sc->sc_mutex); + if (!sc->buffers && wait) + cv_wait(&sc->sc_cv,&sc->sc_mutex); + + if (!sc->buffers) { + mtx_unlock(&sc->sc_mutex); + return (0); + } + + adb_code = sc->buffer[0]; + + for (i = 1; i < sc->buffers; i++) + sc->buffer[i-1] = sc->buffer[i]; + + sc->buffers--; #ifdef AKBD_EMULATE_ATKBD - final_scancode = adb_to_at_scancode_map[adb_code & 0x7f]; - final_scancode |= adb_code & 0x80; + key = adb_to_at_scancode_map[adb_code & 0x7f]; + if (sc->sc_mode == K_CODE) { + /* Add the key-release bit */ + key |= adb_code & 0x80; + } else if (sc->sc_mode == K_RAW) { + /* + * In the raw case, we have to emulate the gross + * variable-length AT keyboard thing. Since this code + * is copied from sunkbd, which is the same code + * as ukbd, it might be nice to have this centralized. + */ + + key = keycode2scancode(key, + 0, adb_code & 0x80); + + if (key & SCAN_PREFIX) { + if (key & SCAN_PREFIX_CTL) { + sc->at_buffered_char[0] = + 0x1d | (key & SCAN_RELEASE); + sc->at_buffered_char[1] = + key & ~SCAN_PREFIX; + } else if (key & SCAN_PREFIX_SHIFT) { + sc->at_buffered_char[0] = + 0x2a | (key & SCAN_RELEASE); + sc->at_buffered_char[1] = + key & ~SCAN_PREFIX_SHIFT; + } else { + sc->at_buffered_char[0] = + key & ~SCAN_PREFIX; + sc->at_buffered_char[1] = 0; + } + + key = (key & SCAN_PREFIX_E0) ? 0xe0 : 0xe1; + } + } #else - final_scancode = adb_code; + key = adb_code; #endif - return (final_scancode); + mtx_unlock(&sc->sc_mutex); + + return (key); } static int @@ -648,6 +763,20 @@ static int akbd_lock(keyboard_t *kbd, in static void akbd_clear_state(keyboard_t *kbd) { + struct adb_kbd_softc *sc; + + sc = (struct adb_kbd_softc *)(kbd); + + mtx_lock(&sc->sc_mutex); + + sc->buffers = 0; + callout_stop(&sc->sc_repeater); + +#if defined(AKBD_EMULATE_ATKBD) + sc->at_buffered_char[0] = 0; + sc->at_buffered_char[1] = 0; +#endif + mtx_unlock(&sc->sc_mutex); } static int akbd_get_state(keyboard_t *kbd, void *buf, size_t len) From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 17:51:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24F331065688; Thu, 8 Jan 2009 17:51:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13CAE8FC18; Thu, 8 Jan 2009 17:51:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08HpFLb028867; Thu, 8 Jan 2009 17:51:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08HpFV3028866; Thu, 8 Jan 2009 17:51:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901081751.n08HpFV3028866@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 Jan 2009 17:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186907 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 17:51:17 -0000 Author: mav Date: Thu Jan 8 17:51:15 2009 New Revision: 186907 URL: http://svn.freebsd.org/changeset/base/186907 Log: Mark ng_vjc node as FORCE_WRITER to protect slcompress state. I think it can be the reason of livelock in netgraph reported by some mpd users. MFC after: 3 days Modified: head/sys/netgraph/ng_vjc.c Modified: head/sys/netgraph/ng_vjc.c ============================================================================== --- head/sys/netgraph/ng_vjc.c Thu Jan 8 17:47:45 2009 (r186906) +++ head/sys/netgraph/ng_vjc.c Thu Jan 8 17:51:15 2009 (r186907) @@ -249,6 +249,9 @@ ng_vjc_constructor(node_p node) NG_NODE_SET_PRIVATE(node, priv); + /* slcompress is not thread-safe. Protect it's state here. */ + NG_NODE_FORCE_WRITER(node); + /* Done */ return (0); } From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 17:51:45 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF17610656EF; Thu, 8 Jan 2009 17:51:44 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id A172D8FC18; Thu, 8 Jan 2009 17:51:44 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 9446A9CB1B7; Thu, 8 Jan 2009 18:32:00 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MXxeRE04APgT; Thu, 8 Jan 2009 18:31:49 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 055009CB22D; Thu, 8 Jan 2009 18:31:49 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id n08HVm0M049751; Thu, 8 Jan 2009 18:31:48 +0100 (CET) (envelope-from rdivacky) Date: Thu, 8 Jan 2009 18:31:48 +0100 From: Roman Divacky To: Edward Tomasz Napierala Message-ID: <20090108173148.GA49697@freebsd.org> References: <200901081726.n08HQpub028356@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200901081726.n08HQpub028356@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186905 - in head/sys: cam dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 17:51:48 -0000 On Thu, Jan 08, 2009 at 05:26:51PM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Thu Jan 8 17:26:51 2009 > New Revision: 186905 > URL: http://svn.freebsd.org/changeset/base/186905 > > Log: > Make "kldunload atapicam" return EBUSY instead of deadlocking when a device > created by atapicam is being kept opened or mounted. This is probably just > a temporary solution until we invent something better. I'd put the comment about this being temporary into the code itself... From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 18:31:43 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA0D21065674; Thu, 8 Jan 2009 18:31:43 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B67648FC13; Thu, 8 Jan 2009 18:31:43 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08IVhmr030436; Thu, 8 Jan 2009 18:31:43 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08IVhP7030429; Thu, 8 Jan 2009 18:31:43 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081831.n08IVhP7030429@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 18:31:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186909 - in head/sys/arm/mv: . discovery kirkwood orion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 18:31:44 -0000 Author: raj Date: Thu Jan 8 18:31:43 2009 New Revision: 186909 URL: http://svn.freebsd.org/changeset/base/186909 Log: Improve and extend Marvell SOCs platform code. - Allow for setting per platform MPP/GPIO configuration in the kernel, so that we can override all settings firmware might set. - Set decode windows for the remaining on-chip peripherals: CESA, SATA and XOR. - Improve handling of USB controllers so that all port are available on the given SOC/platform (e.g. up to three on DB-78xxx), this includes rework of USB decode windows set-up. - Other minor fixes and cosmetics. Obtained from: Semihalf Modified: head/sys/arm/mv/common.c head/sys/arm/mv/discovery/db78xxx.c head/sys/arm/mv/discovery/discovery.c head/sys/arm/mv/gpio.c head/sys/arm/mv/kirkwood/db88f6xxx.c head/sys/arm/mv/kirkwood/kirkwood.c head/sys/arm/mv/mv_machdep.c head/sys/arm/mv/mvreg.h head/sys/arm/mv/mvvar.h head/sys/arm/mv/obio.c head/sys/arm/mv/orion/db88f5xxx.c head/sys/arm/mv/orion/orion.c Modified: head/sys/arm/mv/common.c ============================================================================== --- head/sys/arm/mv/common.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/common.c Thu Jan 8 18:31:43 2009 (r186909) @@ -46,13 +46,19 @@ static int decode_win_cpu_valid(void); static int decode_win_usb_valid(void); static int decode_win_eth_valid(void); static int decode_win_pcie_valid(void); +static int decode_win_sata_valid(void); +static int decode_win_cesa_valid(void); static void decode_win_cpu_setup(void); -static void decode_win_usb_setup(uint32_t ctrl); +static void decode_win_usb_setup(void); static void decode_win_eth_setup(uint32_t base); static void decode_win_pcie_setup(uint32_t base); +static void decode_win_sata_setup(void); +static void decode_win_cesa_setup(void); + +static void decode_win_cesa_dump(void); +static void decode_win_usb_dump(void); -static uint32_t dev, rev; static uint32_t used_cpu_wins; uint32_t @@ -81,6 +87,7 @@ cpu_reset(void) uint32_t cpu_extra_feat(void) { + uint32_t dev, rev; uint32_t ef = 0; soc_id(&dev, &rev); @@ -178,22 +185,27 @@ soc_identify(void) int soc_decode_win(void) { + uint32_t dev, rev; /* Retrieve our ID: some windows facilities vary between SoC models */ soc_id(&dev, &rev); if (decode_win_cpu_valid() != 1 || decode_win_usb_valid() != 1 || decode_win_eth_valid() != 1 || decode_win_idma_valid() != 1 || - decode_win_pcie_valid() != 1) + decode_win_pcie_valid() != 1 || decode_win_sata_valid() != 1 || + decode_win_cesa_valid() != 1) return(-1); decode_win_cpu_setup(); - decode_win_usb_setup(MV_USB0_BASE); + decode_win_usb_setup(); decode_win_eth_setup(MV_ETH0_BASE); if (dev == MV_DEV_MV78100) decode_win_eth_setup(MV_ETH1_BASE); + if (dev == MV_DEV_88F6281 || dev == MV_DEV_MV78100) + decode_win_cesa_setup(); decode_win_idma_setup(); + decode_win_xor_setup(); if (dev == MV_DEV_MV78100) { decode_win_pcie_setup(MV_PCIE00_BASE); @@ -207,7 +219,8 @@ soc_decode_win(void) } else decode_win_pcie_setup(MV_PCIE_BASE); - /* TODO set up decode wins for SATA */ + if (dev != MV_DEV_88F5281) + decode_win_sata_setup(); return (0); } @@ -227,10 +240,15 @@ WIN_REG_IDX_WR(win_cpu, remap_h, MV_WIN_ WIN_REG_IDX_RD(ddr, br, MV_WIN_DDR_BASE, MV_DDR_CADR_BASE) WIN_REG_IDX_RD(ddr, sz, MV_WIN_DDR_SIZE, MV_DDR_CADR_BASE) -WIN_REG_IDX_RD(win_usb, cr, MV_WIN_USB_CTRL, MV_USB_AWR_BASE) -WIN_REG_IDX_RD(win_usb, br, MV_WIN_USB_BASE, MV_USB_AWR_BASE) -WIN_REG_IDX_WR(win_usb, cr, MV_WIN_USB_CTRL, MV_USB_AWR_BASE) -WIN_REG_IDX_WR(win_usb, br, MV_WIN_USB_BASE, MV_USB_AWR_BASE) +WIN_REG_IDX_RD2(win_usb, cr, MV_WIN_USB_CTRL, MV_USB_AWR_BASE) +WIN_REG_IDX_RD2(win_usb, br, MV_WIN_USB_BASE, MV_USB_AWR_BASE) +WIN_REG_IDX_WR2(win_usb, cr, MV_WIN_USB_CTRL, MV_USB_AWR_BASE) +WIN_REG_IDX_WR2(win_usb, br, MV_WIN_USB_BASE, MV_USB_AWR_BASE) + +WIN_REG_IDX_RD(win_cesa, cr, MV_WIN_CESA_CTRL, MV_CESA_BASE) +WIN_REG_IDX_RD(win_cesa, br, MV_WIN_CESA_BASE, MV_CESA_BASE) +WIN_REG_IDX_WR(win_cesa, cr, MV_WIN_CESA_CTRL, MV_CESA_BASE) +WIN_REG_IDX_WR(win_cesa, br, MV_WIN_CESA_BASE, MV_CESA_BASE) WIN_REG_BASE_IDX_RD(win_eth, br, MV_WIN_ETH_BASE) WIN_REG_BASE_IDX_RD(win_eth, sz, MV_WIN_ETH_SIZE) @@ -238,6 +256,16 @@ WIN_REG_BASE_IDX_RD(win_eth, har, MV_WIN WIN_REG_BASE_IDX_WR(win_eth, br, MV_WIN_ETH_BASE) WIN_REG_BASE_IDX_WR(win_eth, sz, MV_WIN_ETH_SIZE) WIN_REG_BASE_IDX_WR(win_eth, har, MV_WIN_ETH_REMAP) + +WIN_REG_IDX_RD2(win_xor, br, MV_WIN_XOR_BASE, MV_XOR_BASE) +WIN_REG_IDX_RD2(win_xor, sz, MV_WIN_XOR_SIZE, MV_XOR_BASE) +WIN_REG_IDX_RD2(win_xor, har, MV_WIN_XOR_REMAP, MV_XOR_BASE) +WIN_REG_IDX_RD2(win_xor, ctrl, MV_WIN_XOR_CTRL, MV_XOR_BASE) +WIN_REG_IDX_WR2(win_xor, br, MV_WIN_XOR_BASE, MV_XOR_BASE) +WIN_REG_IDX_WR2(win_xor, sz, MV_WIN_XOR_SIZE, MV_XOR_BASE) +WIN_REG_IDX_WR2(win_xor, har, MV_WIN_XOR_REMAP, MV_XOR_BASE) +WIN_REG_IDX_WR2(win_xor, ctrl, MV_WIN_XOR_CTRL, MV_XOR_BASE) + WIN_REG_BASE_RD(win_eth, bare, 0x290) WIN_REG_BASE_RD(win_eth, epap, 0x294) WIN_REG_BASE_WR(win_eth, bare, 0x290) @@ -262,12 +290,18 @@ WIN_REG_IDX_WR(win_idma, cap, MV_WIN_IDM WIN_REG_RD(win_idma, bare, 0xa80, MV_IDMA_BASE) WIN_REG_WR(win_idma, bare, 0xa80, MV_IDMA_BASE) +WIN_REG_IDX_RD(win_sata, cr, MV_WIN_SATA_CTRL, MV_SATAHC_BASE); +WIN_REG_IDX_RD(win_sata, br, MV_WIN_SATA_BASE, MV_SATAHC_BASE); +WIN_REG_IDX_WR(win_sata, cr, MV_WIN_SATA_CTRL, MV_SATAHC_BASE); +WIN_REG_IDX_WR(win_sata, br, MV_WIN_SATA_BASE, MV_SATAHC_BASE); + /************************************************************************** * Decode windows helper routines **************************************************************************/ void soc_dump_decode_win(void) { + uint32_t dev, rev; int i; soc_id(&dev, &rev); @@ -290,10 +324,6 @@ soc_dump_decode_win(void) for (i = 0; i < MV_WIN_DDR_MAX; i++) printf("DDR CS#%d: b 0x%08x, s 0x%08x\n", i, ddr_br_read(i), ddr_sz_read(i)); - - for (i = 0; i < MV_WIN_USB_MAX; i++) - printf("USB window#%d: c 0x%08x, b 0x%08x\n", i, - win_usb_cr_read(i), win_usb_br_read(i)); for (i = 0; i < MV_WIN_ETH_MAX; i++) { printf("ETH window#%d: b 0x%08x, s 0x%08x", i, @@ -311,6 +341,8 @@ soc_dump_decode_win(void) win_eth_epap_read(MV_ETH0_BASE)); decode_win_idma_dump(); + decode_win_cesa_dump(); + decode_win_usb_dump(); printf("\n"); } @@ -320,6 +352,9 @@ soc_dump_decode_win(void) int win_cpu_can_remap(int i) { + uint32_t dev, rev; + + soc_id(&dev, &rev); /* Depending on the SoC certain windows have remap capability */ if ((dev == MV_DEV_88F5182 && i < 2) || @@ -549,42 +584,69 @@ decode_win_usb_valid(void) return (decode_win_can_cover_ddr(MV_WIN_USB_MAX)); } +static __inline int +usb_max_ports(void) +{ + uint32_t dev, rev; + + soc_id(&dev, &rev); + return (dev == MV_DEV_MV78100 ? 3 : 1); +} + +static void +decode_win_usb_dump(void) +{ + int i, p, m; + + m = usb_max_ports(); + for (p = 0; p < m; p++) + for (i = 0; i < MV_WIN_USB_MAX; i++) + printf("USB window#%d: c 0x%08x, b 0x%08x\n", i, + win_usb_cr_read(i, p), win_usb_br_read(i, p)); +} + /* * Set USB decode windows. */ static void -decode_win_usb_setup(uint32_t ctrl) +decode_win_usb_setup(void) { uint32_t br, cr; - int i, j; + int i, j, p, m; - /* Disable and clear all USB windows */ - for (i = 0; i < MV_WIN_USB_MAX; i++) { - win_usb_cr_write(i, 0); - win_usb_br_write(i, 0); - } - - /* Only access to active DRAM banks is required */ - for (i = 0; i < MV_WIN_DDR_MAX; i++) - if (ddr_is_active(i)) { - br = ddr_base(i); - /* - * XXX for 6281 we should handle Mbus write burst limit - * field in the ctrl reg - */ - cr = (((ddr_size(i) - 1) & 0xffff0000) | - (ddr_attr(i) << 8) | (ddr_target(i) << 4) | 1); + /* Disable and clear all USB windows for all ports */ + m = usb_max_ports(); + for (p = 0; p < m; p++) { + + for (i = 0; i < MV_WIN_USB_MAX; i++) { + win_usb_cr_write(i, p, 0); + win_usb_br_write(i, p, 0); + } - /* Set the first free USB window */ - for (j = 0; j < MV_WIN_USB_MAX; j++) { - if (win_usb_cr_read(j) & 0x1) - continue; + /* Only access to active DRAM banks is required */ + for (i = 0; i < MV_WIN_DDR_MAX; i++) { + if (ddr_is_active(i)) { + br = ddr_base(i); + /* + * XXX for 6281 we should handle Mbus write + * burst limit field in the ctrl reg + */ + cr = (((ddr_size(i) - 1) & 0xffff0000) | + (ddr_attr(i) << 8) | + (ddr_target(i) << 4) | 1); + + /* Set the first free USB window */ + for (j = 0; j < MV_WIN_USB_MAX; j++) { + if (win_usb_cr_read(j, p) & 0x1) + continue; - win_usb_br_write(j, br); - win_usb_cr_write(j, cr); - break; + win_usb_br_write(j, p, br); + win_usb_cr_write(j, p, cr); + break; + } } } + } } /************************************************************************** @@ -934,7 +996,7 @@ decode_win_idma_valid(void) j = decode_win_overlap(i, idma_wins_no, &idma_wins[0]); if (j >= 0) { printf("IDMA window#%d: (0x%08x - 0x%08x) overlaps " - "with " "#%d (0x%08x - 0x%08x)\n", i, b, e, j, + "with #%d (0x%08x - 0x%08x)\n", i, b, e, j, idma_wins[j].base, idma_wins[j].base + idma_wins[j].size - 1); rv = 0; @@ -983,3 +1045,413 @@ decode_win_idma_dump(void) { } #endif + +/************************************************************************** + * XOR windows routines + **************************************************************************/ +#if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) +static int +xor_ctrl_read(int i, int c, int e) +{ + uint32_t v; + v = win_xor_ctrl_read(c, e); + v &= (1 << i); + + return (v >> i); +} + +static void +xor_ctrl_write(int i, int c, int e, int val) +{ + uint32_t v; + + v = win_xor_ctrl_read(c, e); + v &= ~(1 << i); + v |= (val << i); + win_xor_ctrl_write(c, e, v); +} + +/* + * Set channel protection 'val' for window 'w' on channel 'c' + */ + +static void +xor_chan_write(int c, int e, int w, int val) +{ + uint32_t v; + + v = win_xor_ctrl_read(c, e); + v &= ~(0x3 << (w * 2 + 16)); + v |= (val << (w * 2 + 16)); + win_xor_ctrl_write(c, e, v); +} + +/* + * Set protection 'val' on all channels for window 'w' on engine 'e' + */ +static void +xor_set_prot(int w, int e, int val) +{ + int c; + + for (c = 0; c < MV_XOR_CHAN_MAX; c++) + xor_chan_write(c, e, w, val); +} + +static int +win_xor_can_remap(int i) +{ + + /* XOR decode windows 0-3 have remap capability */ + if (i < 4) + return (1); + + return (0); +} + +static __inline int +xor_max_eng(void) +{ + uint32_t dev, rev; + + soc_id(&dev, &rev); + return ((dev == MV_DEV_88F6281) ? 2 : + (dev == MV_DEV_MV78100) ? 1 : 0); +} + +static void +xor_active_dram(int c, int e, int *window) +{ + uint32_t br, sz; + int i, m, w; + + /* + * Set up access to all active DRAM banks + */ + m = xor_max_eng(); + for (i = 0; i < m; i++) + if (ddr_is_active(i)) { + br = ddr_base(i) | (ddr_attr(i) << 8) | + ddr_target(i); + sz = ((ddr_size(i) - 1) & 0xffff0000); + + /* Place DDR entries in non-remapped windows */ + for (w = 0; w < MV_WIN_XOR_MAX; w++) + if (win_xor_can_remap(w) != 1 && + (xor_ctrl_read(w, c, e) == 0) && + w > *window) { + /* Configure window */ + win_xor_br_write(w, e, br); + win_xor_sz_write(w, e, sz); + + /* Set protection RW on all channels */ + xor_set_prot(w, e, 0x3); + + /* Enable window */ + xor_ctrl_write(w, c, e, 1); + (*window)++; + break; + } + } +} + +void +decode_win_xor_setup(void) +{ + uint32_t br, sz; + int i, j, z, e = 1, m, window; + + /* + * Disable and clear all XOR windows, revoke protection for all + * channels + */ + m = xor_max_eng(); + for (j = 0; j < m; j++, e--) { + + /* Number of non-remaped windows */ + window = MV_XOR_NON_REMAP - 1; + + for (i = 0; i < MV_WIN_XOR_MAX; i++) { + win_xor_br_write(i, e, 0); + win_xor_sz_write(i, e, 0); + } + + if (win_xor_can_remap(i) == 1) + win_xor_har_write(i, e, 0); + + for (i = 0; i < MV_XOR_CHAN_MAX; i++) { + win_xor_ctrl_write(i, e, 0); + xor_active_dram(i, e, &window); + } + + /* + * Remaining targets -- from a statically defined table + */ + for (i = 0; i < xor_wins_no; i++) + if (xor_wins[i].target > 0) { + br = (xor_wins[i].base & 0xffff0000) | + (xor_wins[i].attr << 8) | + xor_wins[i].target; + sz = ((xor_wins[i].size - 1) & 0xffff0000); + + /* Set the first free XOR window */ + for (z = 0; z < MV_WIN_XOR_MAX; z++) { + if (xor_ctrl_read(z, 0, e) && + xor_ctrl_read(z, 1, e)) + continue; + + /* Configure window */ + win_xor_br_write(z, e, br); + win_xor_sz_write(z, e, sz); + if (win_xor_can_remap(z) && + xor_wins[z].remap >= 0) + win_xor_har_write(z, e, + xor_wins[z].remap); + + /* Set protection RW on all channels */ + xor_set_prot(z, e, 0x3); + + /* Enable window */ + xor_ctrl_write(z, 0, e, 1); + xor_ctrl_write(z, 1, e, 1); + break; + } + } + } +} + +int +decode_win_xor_valid(void) +{ + const struct decode_win *wintab; + int c, i, j, rv; + uint32_t b, e, s; + + if (xor_wins_no > MV_WIN_XOR_MAX) { + printf("XOR windows: too many entries: %d\n", xor_wins_no); + return (-1); + } + for (i = 0, c = 0; i < MV_WIN_DDR_MAX; i++) + if (ddr_is_active(i)) + c++; + + if (xor_wins_no > (MV_WIN_XOR_MAX - c)) { + printf("XOR windows: too many entries: %d, available: %d\n", + xor_wins_no, MV_WIN_IDMA_MAX - c); + return (-1); + } + + wintab = xor_wins; + rv = 1; + for (i = 0; i < xor_wins_no; i++, wintab++) { + + if (wintab->target == 0) { + printf("XOR window#%d: DDR target window is not " + "supposed to be reprogrammed!\n", i); + rv = 0; + } + + if (wintab->remap >= 0 && win_cpu_can_remap(i) != 1) { + printf("XOR window#%d: not capable of remapping, but " + "val 0x%08x defined\n", i, wintab->remap); + rv = 0; + } + + s = wintab->size; + b = wintab->base; + e = b + s - 1; + if (s > (0xFFFFFFFF - b + 1)) { + /* + * XXX this boundary check should account for 64bit + * and remapping.. + */ + printf("XOR window#%d: no space for size 0x%08x at " + "0x%08x\n", i, s, b); + rv = 0; + continue; + } + + j = decode_win_overlap(i, xor_wins_no, &xor_wins[0]); + if (j >= 0) { + printf("XOR window#%d: (0x%08x - 0x%08x) overlaps " + "with #%d (0x%08x - 0x%08x)\n", i, b, e, j, + xor_wins[j].base, + xor_wins[j].base + xor_wins[j].size - 1); + rv = 0; + } + } + + return (rv); +} + +void +decode_win_xor_dump(void) +{ + int i, j; + int e = 1; + + for (j = 0; j < xor_max_eng(); j++, e--) { + for (i = 0; i < MV_WIN_XOR_MAX; i++) { + printf("XOR window#%d: b 0x%08x, s 0x%08x", i, + win_xor_br_read(i, e), win_xor_sz_read(i, e)); + + if (win_xor_can_remap(i)) + printf(", ha 0x%08x", win_xor_har_read(i, e)); + + printf("\n"); + } + for (i = 0; i < MV_XOR_CHAN_MAX; i++) + printf("XOR control#%d: 0x%08x\n", i, + win_xor_ctrl_read(i, e)); + } +} + +#else +/* Provide dummy functions to satisfy the build for SoCs not equipped with XOR */ +int +decode_win_xor_valid(void) +{ + + return (1); +} + +void +decode_win_xor_setup(void) +{ +} + +void +decode_win_xor_dump(void) +{ +} +#endif + +/************************************************************************** + * CESA TDMA windows routines + **************************************************************************/ +#if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) +/* + * Dump CESA TDMA decode windows. + */ +static void +decode_win_cesa_dump(void) +{ + int i; + + for (i = 0; i < MV_WIN_CESA_MAX; i++) + printf("CESA window#%d: c 0x%08x, b 0x%08x\n", i, + win_cesa_cr_read(i), win_cesa_br_read(i)); +} + + +/* + * Set CESA TDMA decode windows. + */ +static void +decode_win_cesa_setup(void) +{ + uint32_t br, cr; + int i, j; + + /* Disable and clear all CESA windows */ + for (i = 0; i < MV_WIN_CESA_MAX; i++) { + win_cesa_cr_write(i, 0); + win_cesa_br_write(i, 0); + } + + /* Only access to active DRAM banks is required. */ + for (i = 0; i < MV_WIN_DDR_MAX; i++) + if (ddr_is_active(i)) { + br = ddr_base(i); + cr = (((ddr_size(i) - 1) & 0xffff0000) | + (ddr_attr(i) << 8) | (ddr_target(i) << 4) | 1); + + /* Set the first available CESA window */ + for (j = 0; j < MV_WIN_CESA_MAX; j++) { + if (win_cesa_cr_read(j) & 0x1) + continue; + + win_cesa_br_write(j, br); + win_cesa_cr_write(j, cr); + break; + } + } +} + +/* + * Check CESA TDMA decode windows. + */ +static int +decode_win_cesa_valid(void) +{ + + return (decode_win_can_cover_ddr(MV_WIN_CESA_MAX)); +} +#else + +/* + * Provide dummy functions to satisfy the build for SoCs not equipped with + * CESA + */ + +int +decode_win_cesa_valid(void) +{ + + return (1); +} + +void +decode_win_cesa_setup(void) +{ +} + +void +decode_win_cesa_dump(void) +{ +} +#endif + +/************************************************************************** + * SATA windows routines + **************************************************************************/ +static void +decode_win_sata_setup(void) +{ + uint32_t cr, br; + int i, j; + + for (i = 0; i < MV_WIN_SATA_MAX; i++) { + win_sata_cr_write(i, 0); + win_sata_br_write(i, 0); + } + + for (i = 0; i < MV_WIN_DDR_MAX; i++) + if (ddr_is_active(i)) { + cr = ((ddr_size(i) - 1) & 0xffff0000) | + (ddr_attr(i) << 8) | (ddr_target(i) << 4) | 1; + br = ddr_base(i); + + /* Use the first available SATA window */ + for (j = 0; j < MV_WIN_SATA_MAX; j++) { + if ((win_sata_cr_read(j) & 1) != 0) + continue; + + win_sata_br_write(j, br); + win_sata_cr_write(j, cr); + break; + } + } +} + +static int +decode_win_sata_valid(void) +{ + uint32_t dev, rev; + + soc_id(&dev, &rev); + if (dev == MV_DEV_88F5281) + return (1); + + return (decode_win_can_cover_ddr(MV_WIN_SATA_MAX)); +} Modified: head/sys/arm/mv/discovery/db78xxx.c ============================================================================== --- head/sys/arm/mv/discovery/db78xxx.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/discovery/db78xxx.c Thu Jan 8 18:31:43 2009 (r186909) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -99,6 +100,10 @@ static const struct pmap_devmap pmap_dev { 0, 0, 0, 0, 0, } }; +const struct gpio_config mv_gpio_config[] = { + { -1, -1, -1 } +}; + int platform_pmap_init(void) { @@ -109,6 +114,52 @@ platform_pmap_init(void) return (0); } +void +platform_mpp_init(void) +{ + + /* + * MPP Configuration for DB-78100-BP + * + * MPP[0]: GE1_TXCLK + * MPP[1]: GE1_TXCTL + * MPP[2]: GE1_RXCTL + * MPP[3]: GE1_RXCLK + * MPP[4]: GE1_TXD[0] + * MPP[5]: GE1_TXD[1] + * MPP[6]: GE1_TXD[2] + * MPP[7]: GE1_TXD[3] + * MPP[8]: GE1_RXD[0] + * MPP[9]: GE1_RXD[1] + * MPP[10]: GE1_RXD[2] + * MPP[11]: GE1_RXD[3] + * MPP[13]: SYSRST_OUTn + * MPP[14]: SATA1_ACT + * MPP[15]: SATA0_ACT + * MPP[16]: UA2_TXD + * MPP[17]: UA2_RXD + * MPP[18]: + * MPP[19]: + * MPP[20]: + * MPP[21]: + * MPP[22]: UA3_TXD + * MPP[23]: UA3_RXD + * MPP[48]: + * MPP[49]: + * + * Others: GPIO + * + * entries are not documented, not on the schematics etc. + */ + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL0, 0x22222222); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL1, 0x33302222); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL2, 0x44333344); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL3, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL4, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL5, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL6, 0x0000FFFF); +} + static void platform_identify(void *dummy) { @@ -121,7 +172,3 @@ platform_identify(void *dummy) */ } SYSINIT(platform_identify, SI_SUB_CPU, SI_ORDER_SECOND, platform_identify, NULL); - -/* - * TODO routine setting GPIO/MPP pins - */ Modified: head/sys/arm/mv/discovery/discovery.c ============================================================================== --- head/sys/arm/mv/discovery/discovery.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/discovery/discovery.c Thu Jan 8 18:31:43 2009 (r186909) @@ -103,6 +103,16 @@ struct obio_device obio_devices[] = { { -1 }, CPU_PM_CTRL_USB0 | CPU_PM_CTRL_USB1 | CPU_PM_CTRL_USB2 }, + { "ehci", MV_USB1_BASE, MV_USB_SIZE, + { MV_INT_USB_ERR, MV_INT_USB1, -1 }, + { -1 }, + CPU_PM_CTRL_USB0 | CPU_PM_CTRL_USB1 | CPU_PM_CTRL_USB2 + }, + { "ehci", MV_USB2_BASE, MV_USB_SIZE, + { MV_INT_USB_ERR, MV_INT_USB2, -1 }, + { -1 }, + CPU_PM_CTRL_USB0 | CPU_PM_CTRL_USB1 | CPU_PM_CTRL_USB2 + }, { "mge", MV_ETH0_BASE, MV_ETH_SIZE, { MV_INT_GBERX, MV_INT_GBETX, MV_INT_GBEMISC, MV_INT_GBESUM, MV_INT_GBE_ERR, -1 }, @@ -177,7 +187,7 @@ const struct obio_pci mv_pci_info[] = { { 0, 0, 0 } }; -struct resource_spec mv_gpio_spec[] = { +struct resource_spec mv_gpio_res[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, { SYS_RES_IRQ, 1, RF_ACTIVE }, @@ -186,7 +196,7 @@ struct resource_spec mv_gpio_spec[] = { { -1, 0 } }; -struct resource_spec mv_xor_spec[] = { +struct resource_spec mv_xor_res[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, { SYS_RES_IRQ, 1, RF_ACTIVE }, @@ -206,6 +216,9 @@ const struct decode_win cpu_win_tbl[] = /* Device bus CS2 */ { 1, 0x3b, MV_DEV_CS2_PHYS_BASE, MV_DEV_CS2_SIZE, -1 }, + + /* CESA */ + { 9, 0x01, MV_CESA_SRAM_PHYS_BASE, MV_CESA_SRAM_SIZE, -1 }, }; const struct decode_win *cpu_wins = cpu_win_tbl; int cpu_wins_no = sizeof(cpu_win_tbl) / sizeof(struct decode_win); @@ -227,6 +240,14 @@ const struct decode_win idma_win_tbl[] = const struct decode_win *idma_wins = idma_win_tbl; int idma_wins_no = sizeof(idma_win_tbl) / sizeof(struct decode_win); +const struct decode_win xor_win_tbl[] = { + /* PCIE MEM */ + { 4, 0xE8, _MV_PCIE_MEM_PHYS(0), _MV_PCIE_MEM_SIZE, -1}, + { 4, 0xD8, _MV_PCIE_MEM_PHYS(1), _MV_PCIE_MEM_SIZE, -1}, +}; +const struct decode_win *xor_wins = xor_win_tbl; +int xor_wins_no = sizeof(xor_win_tbl) / sizeof(struct decode_win); + uint32_t get_tclk(void) { Modified: head/sys/arm/mv/gpio.c ============================================================================== --- head/sys/arm/mv/gpio.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/gpio.c Thu Jan 8 18:31:43 2009 (r186909) @@ -62,7 +62,7 @@ struct mv_gpio_softc { uint8_t use_high; }; -extern struct resource_spec mv_gpio_spec[]; +extern struct resource_spec mv_gpio_res[]; static struct mv_gpio_softc *mv_gpio_softc = NULL; static uint32_t gpio_setup[MV_GPIO_MAX_NPINS]; @@ -143,7 +143,7 @@ mv_gpio_attach(device_t dev) return (ENXIO); } - error = bus_alloc_resources(dev, mv_gpio_spec, sc->res); + error = bus_alloc_resources(dev, mv_gpio_res, sc->res); if (error) { device_printf(dev, "could not allocate resources\n"); return (ENXIO); @@ -171,21 +171,33 @@ mv_gpio_attach(device_t dev) INTR_TYPE_MISC | INTR_FAST, (driver_filter_t *)mv_gpio_intr, NULL, sc, &sc->ih_cookie[i]) != 0) { - bus_release_resources(dev, mv_gpio_spec, sc->res); + bus_release_resources(dev, mv_gpio_res, sc->res); device_printf(dev, "could not set up intr %d\n", i); return (ENXIO); } } + /* Setup GPIO lines */ + for (i = 0; mv_gpio_config[i].gc_gpio >= 0; i++) { + mv_gpio_configure(mv_gpio_config[i].gc_gpio, + mv_gpio_config[i].gc_flags, ~0u); + + if (mv_gpio_config[i].gc_output < 0) + mv_gpio_out_en(mv_gpio_config[i].gc_gpio, 0); + else + mv_gpio_out(mv_gpio_config[i].gc_gpio, + mv_gpio_config[i].gc_output, 1); + } + return (0); } static void mv_gpio_intr(void *arg) { - uint32_t int_cause, gpio_val; - uint32_t int_cause_hi, gpio_val_hi = 0; - int i; + uint32_t int_cause, gpio_val; + uint32_t int_cause_hi, gpio_val_hi = 0; + int i; int_cause = mv_gpio_reg_read(GPIO_INT_CAUSE); gpio_val = mv_gpio_reg_read(GPIO_DATA_IN); @@ -295,8 +307,8 @@ mv_gpio_configure(uint32_t pin, uint32_t if (mask & MV_GPIO_BLINK) mv_gpio_blink(pin, flags & MV_GPIO_BLINK); - if (mask & MV_GPIO_POLARITY) - mv_gpio_polarity(pin, flags & MV_GPIO_POLARITY); + if (mask & MV_GPIO_POLAR_LOW) + mv_gpio_polarity(pin, flags & MV_GPIO_POLAR_LOW); if (mask & MV_GPIO_EDGE) mv_gpio_edge(pin, flags & MV_GPIO_EDGE); if (mask & MV_GPIO_LEVEL) Modified: head/sys/arm/mv/kirkwood/db88f6xxx.c ============================================================================== --- head/sys/arm/mv/kirkwood/db88f6xxx.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/kirkwood/db88f6xxx.c Thu Jan 8 18:31:43 2009 (r186909) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -99,6 +100,10 @@ static const struct pmap_devmap pmap_dev { 0, 0, 0, 0, 0, } }; +const struct gpio_config mv_gpio_config[] = { + { -1, -1, -1 } +}; + int platform_pmap_init(void) { @@ -109,6 +114,47 @@ platform_pmap_init(void) return (0); } +void +platform_mpp_init(void) +{ + + /* + * MPP configuration for DB-88F6281-BP and DB-88F6281-BP-A + * + * MPP[0]: NF_IO[2] + * MPP[1]: NF_IO[3] + * MPP[2]: NF_IO[4] + * MPP[3]: NF_IO[5] + * MPP[4]: NF_IO[6] + * MPP[5]: NF_IO[7] + * MPP[6]: SYSRST_OUTn + * MPP[7]: SPI_SCn + * MPP[8]: TW_SDA + * MPP[9]: TW_SCK + * MPP[10]: UA0_TXD + * MPP[11]: UA0_RXD + * MPP[12]: SD_CLK + * MPP[13]: SD_CMD + * MPP[14]: SD_D[0] + * MPP[15]: SD_D[1] + * MPP[16]: SD_D[2] + * MPP[17]: SD_D[3] + * MPP[18]: NF_IO[0] + * MPP[19]: NF_IO[1] + * MPP[20]: SATA1_AC + * MPP[21]: SATA0_AC + * + * Others: GPIO + */ + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL0, 0x21111111); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL1, 0x11113311); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL2, 0x00551111); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL3, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL4, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL5, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL6, 0x00000000); +} + static void platform_identify(void *dummy) { @@ -121,7 +167,3 @@ platform_identify(void *dummy) */ } SYSINIT(platform_identify, SI_SUB_CPU, SI_ORDER_SECOND, platform_identify, NULL); - -/* - * TODO routine setting GPIO/MPP pins - */ Modified: head/sys/arm/mv/kirkwood/kirkwood.c ============================================================================== --- head/sys/arm/mv/kirkwood/kirkwood.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/kirkwood/kirkwood.c Thu Jan 8 18:31:43 2009 (r186909) @@ -112,7 +112,7 @@ const struct obio_pci mv_pci_info[] = { { 0, 0, 0 } }; -struct resource_spec mv_gpio_spec[] = { +struct resource_spec mv_gpio_res[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, { SYS_RES_IRQ, 1, RF_ACTIVE }, @@ -124,7 +124,7 @@ struct resource_spec mv_gpio_spec[] = { { -1, 0 } }; -struct resource_spec mv_xor_spec[] = { +struct resource_spec mv_xor_res[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, { SYS_RES_IRQ, 1, RF_ACTIVE }, @@ -147,10 +147,21 @@ const struct decode_win cpu_win_tbl[] = /* Device bus CS2 */ { 1, 0x1b, MV_DEV_CS2_PHYS_BASE, MV_DEV_CS2_SIZE, -1 }, + + /* CESA */ + { 3, 0x00, MV_CESA_SRAM_PHYS_BASE, MV_CESA_SRAM_SIZE, -1 }, + }; const struct decode_win *cpu_wins = cpu_win_tbl; int cpu_wins_no = sizeof(cpu_win_tbl) / sizeof(struct decode_win); +const struct decode_win xor_win_tbl[] = { + /* PCIE MEM */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 19:13:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 535111065673; Thu, 8 Jan 2009 19:13:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41CEE8FC16; Thu, 8 Jan 2009 19:13:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08JDZns031310; Thu, 8 Jan 2009 19:13:35 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08JDZvK031309; Thu, 8 Jan 2009 19:13:35 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200901081913.n08JDZvK031309@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 8 Jan 2009 19:13:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186911 - head/sys/fs/devfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 19:13:35 -0000 Author: trasz Date: Thu Jan 8 19:13:34 2009 New Revision: 186911 URL: http://svn.freebsd.org/changeset/base/186911 Log: Don't panic with "vinvalbuf: dirty bufs" when the mounted device that was being written to goes away. Reviewed by: kib, scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Thu Jan 8 18:34:19 2009 (r186910) +++ head/sys/fs/devfs/devfs_vnops.c Thu Jan 8 19:13:34 2009 (r186911) @@ -540,12 +540,28 @@ devfs_close_f(struct file *fp, struct th return (error); } -/* ARGSUSED */ static int devfs_fsync(struct vop_fsync_args *ap) { - if (!vn_isdisk(ap->a_vp, NULL)) + int error; + struct bufobj *bo; + struct devfs_dirent *de; + + if (!vn_isdisk(ap->a_vp, &error)) { + bo = &ap->a_vp->v_bufobj; + de = ap->a_vp->v_data; + if (error == ENXIO && bo->bo_dirty.bv_cnt > 0) { + printf("Device %s went missing before all of the data " + "could be written to it; expect data loss.\n", + de->de_dirent->d_name); + + error = vop_stdfsync(ap); + if (bo->bo_dirty.bv_cnt != 0 || error != 0) + panic("devfs_fsync: vop_stdfsync failed."); + } + return (0); + } return (vop_stdfsync(ap)); } From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 19:43:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06D98106564A; Thu, 8 Jan 2009 19:43:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9A108FC13; Thu, 8 Jan 2009 19:43:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08JhlU1031901; Thu, 8 Jan 2009 19:43:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08JhlNG031900; Thu, 8 Jan 2009 19:43:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901081943.n08JhlNG031900@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 Jan 2009 19:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186912 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 19:43:48 -0000 Author: mav Date: Thu Jan 8 19:43:47 2009 New Revision: 186912 URL: http://svn.freebsd.org/changeset/base/186912 Log: Add external connector jack color into widget names. It should help users to identify them while reading verbose messages. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Thu Jan 8 19:13:34 2009 (r186911) +++ head/sys/dev/sound/pci/hda/hdac.c Thu Jan 8 19:43:47 2009 (r186912) @@ -2443,9 +2443,10 @@ hdac_widget_pin_parse(struct hdac_widget { struct hdac_softc *sc = w->devinfo->codec->sc; uint32_t config, pincap; - const char *devstr, *connstr; + const char *devstr; nid_t cad = w->devinfo->codec->cad; nid_t nid = w->nid; + int conn, color; config = hdac_widget_pin_getconfig(w); w->wclass.pin.config = config; @@ -2467,13 +2468,19 @@ hdac_widget_pin_parse(struct hdac_widget devstr = HDA_DEVS[(config & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) >> HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT]; - connstr = HDA_CONNS[(config & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) >> - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT]; + conn = (config & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) >> + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT; + color = (config & HDA_CONFIG_DEFAULTCONF_COLOR_MASK) >> + HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT; strlcat(w->name, ": ", sizeof(w->name)); strlcat(w->name, devstr, sizeof(w->name)); strlcat(w->name, " (", sizeof(w->name)); - strlcat(w->name, connstr, sizeof(w->name)); + if (conn == 0 && color != 0 && color != 15) { + strlcat(w->name, HDA_COLORS[color], sizeof(w->name)); + strlcat(w->name, " ", sizeof(w->name)); + } + strlcat(w->name, HDA_CONNS[conn], sizeof(w->name)); strlcat(w->name, ")", sizeof(w->name)); } From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 21:29:40 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97BD51065716; Thu, 8 Jan 2009 21:29:40 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5095E8FC18; Thu, 8 Jan 2009 21:29:40 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08LTeDI033887; Thu, 8 Jan 2009 21:29:40 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08LTefd033886; Thu, 8 Jan 2009 21:29:40 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901082129.n08LTefd033886@svn.freebsd.org> From: Christian Brueffer Date: Thu, 8 Jan 2009 21:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186913 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 21:29:41 -0000 Author: brueffer Date: Thu Jan 8 21:29:40 2009 New Revision: 186913 URL: http://svn.freebsd.org/changeset/base/186913 Log: Language cleanup. Modified: head/share/man/man9/insmntque.9 Modified: head/share/man/man9/insmntque.9 ============================================================================== --- head/share/man/man9/insmntque.9 Thu Jan 8 19:43:47 2009 (r186912) +++ head/share/man/man9/insmntque.9 Thu Jan 8 21:29:40 2009 (r186913) @@ -46,7 +46,7 @@ The function associates a vnode with a mount. This includes updating .Va v_mount -for the vnode, and inserting the vnode into the mounts vnode list. +for the vnode, and inserting the vnode into the mount's vnode list. .Pp The mount reference count is incremented for each vnode added to the mount, and that reference is decremented by @@ -75,13 +75,14 @@ The .Fa dtr_arg argument is the second, supplying any additional context needed. .Sh RETURN VALUES +The .Fn insmntque -will always return 0, unless the file system is currently being unmounted +function will always return 0, unless the file system is currently being unmounted in which case it may return .Dv EBUSY . -The +Also, .Fn insmntque -function may be forced to insert the vnode into the mount's vnode list +may be forced to insert the vnode into the mount's vnode list by setting the .Va VV_FORCEINSMQ flag in the vnode From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 23:27:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA8011065794; Thu, 8 Jan 2009 23:27:59 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B89E08FC25; Thu, 8 Jan 2009 23:27:59 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08NRx4V036337; Thu, 8 Jan 2009 23:27:59 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08NRxde036336; Thu, 8 Jan 2009 23:27:59 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200901082327.n08NRxde036336@svn.freebsd.org> From: Giorgos Keramidas Date: Thu, 8 Jan 2009 23:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186916 - head/etc/defaults X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 23:28:00 -0000 Author: keramida (doc committer) Date: Thu Jan 8 23:27:59 2009 New Revision: 186916 URL: http://svn.freebsd.org/changeset/base/186916 Log: The description of the various securelevels has moved to the security.7 manpage a while ago. MFC after: 1 week Modified: head/etc/defaults/rc.conf Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Thu Jan 8 22:32:35 2009 (r186915) +++ head/etc/defaults/rc.conf Thu Jan 8 23:27:59 2009 (r186916) @@ -570,7 +570,7 @@ ldconfig_local_dirs="/usr/local/libdata/ ldconfig_local32_dirs="/usr/local/libdata/ldconfig32" # Local directories with 32-bit compatibility ldconfig # configuration files. -kern_securelevel_enable="NO" # kernel security level (see init(8)), +kern_securelevel_enable="NO" # kernel security level (see security(7)) kern_securelevel="-1" # range: -1..3 ; `-1' is the most insecure # Note that setting securelevel to 0 will result # in the system booting with securelevel set to 1, as From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 23:50:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04879106566C; Thu, 8 Jan 2009 23:50:33 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E72EC8FC1A; Thu, 8 Jan 2009 23:50:32 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08NoWlw036812; Thu, 8 Jan 2009 23:50:32 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08NoWNo036811; Thu, 8 Jan 2009 23:50:32 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200901082350.n08NoWNo036811@svn.freebsd.org> From: Giorgos Keramidas Date: Thu, 8 Jan 2009 23:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186917 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 23:50:33 -0000 Author: keramida (doc committer) Date: Thu Jan 8 23:50:32 2009 New Revision: 186917 URL: http://svn.freebsd.org/changeset/base/186917 Log: The description of the various securelevels has moved to the security.7 manpage a while ago. MFC after: 1 week Noticed by: simon Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Thu Jan 8 23:27:59 2009 (r186916) +++ head/share/man/man5/rc.conf.5 Thu Jan 8 23:50:32 2009 (r186917) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 24, 2008 +.Dd January 9, 2009 .Dt RC.CONF 5 .Os .Sh NAME @@ -3188,7 +3188,7 @@ The allowed range of ranges from \-1 (the compile time default) to 3 (the most secure). See -.Xr init 8 +.Xr security 7 for the list of possible security levels and their effect on system operation. .It Va sshd_program @@ -3987,6 +3987,7 @@ Default .Xr motd 5 , .Xr newsyslog.conf 5 , .Xr pf.conf 5 , +.Xr security 7 , .Xr accton 8 , .Xr amd 8 , .Xr apm 8 , From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 02:31:52 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45ECF1065673; Fri, 9 Jan 2009 02:31:52 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3458A8FC0C; Fri, 9 Jan 2009 02:31:52 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n092Vqta040142; Fri, 9 Jan 2009 02:31:52 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n092Vqgx040141; Fri, 9 Jan 2009 02:31:52 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <200901090231.n092Vqgx040141@svn.freebsd.org> From: Weongyo Jeong Date: Fri, 9 Jan 2009 02:31:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186919 - head/sys/dev/if_ndis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 02:31:53 -0000 Author: weongyo Date: Fri Jan 9 02:31:51 2009 New Revision: 186919 URL: http://svn.freebsd.org/changeset/base/186919 Log: fix a typo to set the 48Mbps data rate. PR: kern/130189 Submitted by: Paul B. Mahol Reviewed by: sam MFC after: 3 weeks Modified: head/sys/dev/if_ndis/if_ndis.c Modified: head/sys/dev/if_ndis/if_ndis.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis.c Fri Jan 9 01:47:24 2009 (r186918) +++ head/sys/dev/if_ndis/if_ndis.c Fri Jan 9 02:31:51 2009 (r186919) @@ -855,13 +855,13 @@ nonettypes: IEEE80211_RATE_BASIC|22); } if (isset(ic->ic_modecaps, IEEE80211_MODE_11G)) { - TESTSETRATE(IEEE80211_MODE_11G, 47); + TESTSETRATE(IEEE80211_MODE_11G, 48); TESTSETRATE(IEEE80211_MODE_11G, 72); TESTSETRATE(IEEE80211_MODE_11G, 96); TESTSETRATE(IEEE80211_MODE_11G, 108); } if (isset(ic->ic_modecaps, IEEE80211_MODE_11A)) { - TESTSETRATE(IEEE80211_MODE_11A, 47); + TESTSETRATE(IEEE80211_MODE_11A, 48); TESTSETRATE(IEEE80211_MODE_11A, 72); TESTSETRATE(IEEE80211_MODE_11A, 96); TESTSETRATE(IEEE80211_MODE_11A, 108); From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 03:04:10 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5440106564A for ; Fri, 9 Jan 2009 03:04:10 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from mail-out2.fuse.net (mail-out2.fuse.net [216.68.8.171]) by mx1.freebsd.org (Postfix) with ESMTP id A3BFC8FC13 for ; Fri, 9 Jan 2009 03:04:10 +0000 (UTC) (envelope-from cokane@FreeBSD.org) X-CNFS-Analysis: v=1.0 c=1 a=_RjqrDncAWMA:10 a=llEIekAKCuIA:10 a=LkYvsgB9u1MH7Ao0BLhsLg==:17 a=6I5d2MoRAAAA:8 a=ZPOgkqBvq_U8iTBhmyQA:9 a=SColOreYJS5iDMCLvAjBbBEMkOQA:4 a=dXjOxITDGsYA:10 a=LY0hPdMaydYA:10 a=X4X0yLm8SS1P9oBeTCAA:9 a=-yyTi50cmerUm02O0E7IKLK4jWMA:4 a=rPt6xJ-oxjAA:10 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Received: from [74.215.227.9] ([74.215.227.9:50984] helo=discordia) by mail-out2.fuse.net (ecelerity 2.1.1.22 r(17669)) with ESMTP id 5E/ED-17809-D9EB6694 for ; Thu, 08 Jan 2009 22:04:10 -0500 Received: by discordia (Postfix, from userid 103) id B97441DB2FA; Thu, 8 Jan 2009 22:03:57 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.1.8-gr1 (2007-02-13) on discordia X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, UPPERCASE_25_50 autolearn=ham version=3.1.8-gr1 Received: from [172.31.1.6] (unknown [172.31.1.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by discordia (Postfix) with ESMTP id 51A8D1DB2F9; Thu, 8 Jan 2009 22:03:51 -0500 (EST) From: Coleman Kane To: Weongyo Jeong In-Reply-To: <200901090231.n092Vqgx040141@svn.freebsd.org> References: <200901090231.n092Vqgx040141@svn.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-BEtkzVjedcvQUgEss/8g" Organization: FreeBSD Project Date: Thu, 08 Jan 2009 22:03:48 -0500 Message-Id: <1231470228.1762.2.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186919 - head/sys/dev/if_ndis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 03:04:11 -0000 --=-BEtkzVjedcvQUgEss/8g Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2009-01-09 at 02:31 +0000, Weongyo Jeong wrote: > Author: weongyo > Date: Fri Jan 9 02:31:51 2009 > New Revision: 186919 > URL: http://svn.freebsd.org/changeset/base/186919 >=20 > Log: > fix a typo to set the 48Mbps data rate. > =20 > PR: kern/130189 > Submitted by: Paul B. Mahol > Reviewed by: sam > MFC after: 3 weeks >=20 > Modified: > head/sys/dev/if_ndis/if_ndis.c >=20 > Modified: head/sys/dev/if_ndis/if_ndis.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/if_ndis/if_ndis.c Fri Jan 9 01:47:24 2009 (r186918) > +++ head/sys/dev/if_ndis/if_ndis.c Fri Jan 9 02:31:51 2009 (r186919) > @@ -855,13 +855,13 @@ nonettypes: > IEEE80211_RATE_BASIC|22); > } > if (isset(ic->ic_modecaps, IEEE80211_MODE_11G)) { > - TESTSETRATE(IEEE80211_MODE_11G, 47); > + TESTSETRATE(IEEE80211_MODE_11G, 48); > TESTSETRATE(IEEE80211_MODE_11G, 72); > TESTSETRATE(IEEE80211_MODE_11G, 96); > TESTSETRATE(IEEE80211_MODE_11G, 108); > } > if (isset(ic->ic_modecaps, IEEE80211_MODE_11A)) { > - TESTSETRATE(IEEE80211_MODE_11A, 47); > + TESTSETRATE(IEEE80211_MODE_11A, 48); > TESTSETRATE(IEEE80211_MODE_11A, 72); > TESTSETRATE(IEEE80211_MODE_11A, 96); > TESTSETRATE(IEEE80211_MODE_11A, 108); >=20 Good catch! --=20 Coleman Kane --=-BEtkzVjedcvQUgEss/8g Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAklmvo4ACgkQcMSxQcXat5f/uACeIXpwIbNnK26/lHYY6tcW9D9F asYAoIP0HZNOaQcj2PWUgxRoYOmJCBhO =Cq2f -----END PGP SIGNATURE----- --=-BEtkzVjedcvQUgEss/8g-- From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 03:52:12 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDF341065674; Fri, 9 Jan 2009 03:52:12 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC69D8FC14; Fri, 9 Jan 2009 03:52:12 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n093qCxP042089; Fri, 9 Jan 2009 03:52:12 GMT (envelope-from murray@svn.freebsd.org) Received: (from murray@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n093qCoj042088; Fri, 9 Jan 2009 03:52:12 GMT (envelope-from murray@svn.freebsd.org) Message-Id: <200901090352.n093qCoj042088@svn.freebsd.org> From: Murray Stokely Date: Fri, 9 Jan 2009 03:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186921 - head/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 03:52:13 -0000 Author: murray Date: Fri Jan 9 03:52:12 2009 New Revision: 186921 URL: http://svn.freebsd.org/changeset/base/186921 Log: Note new fetch if-modified-since support in the userland section, and update copyright to 2009. M article.sgml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jan 9 03:42:41 2009 (r186920) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jan 9 03:52:12 2009 (r186921) @@ -29,6 +29,7 @@ 2006 2007 2008 + 2009 The &os; Documentation Project @@ -347,6 +348,12 @@ The &man.fdopendir.3; library function has been added. + The &man.fetch.3; library now support HTTP 1.1 + If-Modified-Since behavior. The &man.fetch.1; program now + supports + which will only download the specified HTTP URL if the content + is newer than filename. + &man.find.1; has been enhanced by the addition of a number of primaries that were present in GNU find but not &os; &man.find.1;. From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 04:38:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9665106564A; Fri, 9 Jan 2009 04:38:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D72488FC13; Fri, 9 Jan 2009 04:38:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n094cM3f042932; Fri, 9 Jan 2009 04:38:22 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n094cMAX042929; Fri, 9 Jan 2009 04:38:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901090438.n094cMAX042929@svn.freebsd.org> From: Andrew Thompson Date: Fri, 9 Jan 2009 04:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186922 - in head/sys/dev: usb usb2/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 04:38:23 -0000 Author: thompsa Date: Fri Jan 9 04:38:22 2009 New Revision: 186922 URL: http://svn.freebsd.org/changeset/base/186922 Log: Readd the Alcor Transcend device which is referenced in usb2/storage/umass2.c, regenerate the usb2 dev tables for the scanner additions while I am here. Modified: head/sys/dev/usb/usbdevs head/sys/dev/usb2/include/usb2_devid.h head/sys/dev/usb2/include/usb2_devtable.h Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Jan 9 03:52:12 2009 (r186921) +++ head/sys/dev/usb/usbdevs Fri Jan 9 04:38:22 2009 (r186922) @@ -808,6 +808,7 @@ product AKS USBHASP 0x0001 USB-HASP 0.0 /* Alcor Micro, Inc. products */ product ALCOR2 KBD_HUB 0x2802 Kbd Hub +product ALCOR TRANSCEND 0x6387 Transcend JetFlash Drive product ALCOR MA_KBD_HUB 0x9213 MacAlly Kbd Hub product ALCOR AU9814 0x9215 AU9814 Hub product ALCOR UMCR_9361 0x9361 USB Multimedia Card Reader Modified: head/sys/dev/usb2/include/usb2_devid.h ============================================================================== --- head/sys/dev/usb2/include/usb2_devid.h Fri Jan 9 03:52:12 2009 (r186921) +++ head/sys/dev/usb2/include/usb2_devid.h Fri Jan 9 04:38:22 2009 (r186922) @@ -4,7 +4,7 @@ * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * FreeBSD: src/sys/dev/usb/usbdevs,v 1.390 2008/12/23 13:09:17 remko Exp + * FreeBSD: head/sys/dev/usb/usbdevs 186651 2008-12-31 14:25:14Z luigi */ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ @@ -1247,12 +1247,18 @@ #define USB_PRODUCT_EPSON_CX5400 0x0808 /* CX5400 scanner */ #define USB_PRODUCT_EPSON_3500 0x080e /* CX-3500/3600/3650 MFP */ #define USB_PRODUCT_EPSON_RX425 0x080f /* Stylus Photo RX425 scanner */ -#define USB_PRODUCT_EPSON_4800 0x0819 /* CX4800 MP scanner */ -#define USB_PRODUCT_EPSON_4200 0x0820 /* CX4200 MP scanner */ -#define USB_PRODUCT_EPSON_5000 0x082b /* DX-50x0 MFP scanner */ -#define USB_PRODUCT_EPSON_6000 0x082e /* DX-60x0 MFP scanner */ -#define USB_PRODUCT_EPSON_DX7400 0x0838 /* DX7400/CX7300 scanner */ -#define USB_PRODUCT_EPSON_DX8400 0x0839 /* DX8400 scanner */ +#define USB_PRODUCT_EPSON_DX3800 0x0818 /* CX3700/CX3800/DX38x0 MFP scanner */ +#define USB_PRODUCT_EPSON_4800 0x0819 /* CX4700/CX4800/DX48x0 MFP scanner */ +#define USB_PRODUCT_EPSON_4200 0x0820 /* CX4100/CX4200/DX4200 MFP scanner */ +#define USB_PRODUCT_EPSON_5000 0x082b /* CX4900/CX5000/DX50x0 MFP scanner */ +#define USB_PRODUCT_EPSON_6000 0x082e /* CX5900/CX6000/DX60x0 MFP scanner */ +#define USB_PRODUCT_EPSON_DX4000 0x082f /* DX4000 MFP scanner */ +#define USB_PRODUCT_EPSON_DX7400 0x0838 /* CX7300/CX7400/DX7400 MFP scanner */ +#define USB_PRODUCT_EPSON_DX8400 0x0839 /* CX8300/CX8400/DX8400 MFP scanner */ +#define USB_PRODUCT_EPSON_SX100 0x0841 /* SX100/NX100 MFP scanner */ +#define USB_PRODUCT_EPSON_NX300 0x0848 /* NX300 MFP scanner */ +#define USB_PRODUCT_EPSON_SX200 0x0849 /* SX200/SX205 MFP scanner */ +#define USB_PRODUCT_EPSON_SX400 0x084a /* SX400/NX400/TX400 MFP scanner */ /* e-TEK Labs products */ #define USB_PRODUCT_ETEK_1COM 0x8007 /* Serial */ Modified: head/sys/dev/usb2/include/usb2_devtable.h ============================================================================== --- head/sys/dev/usb2/include/usb2_devtable.h Fri Jan 9 03:52:12 2009 (r186921) +++ head/sys/dev/usb2/include/usb2_devtable.h Fri Jan 9 04:38:22 2009 (r186922) @@ -4,7 +4,7 @@ * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * FreeBSD: src/sys/dev/usb/usbdevs,v 1.390 2008/12/23 13:09:17 remko Exp + * FreeBSD: head/sys/dev/usb/usbdevs 186651 2008-12-31 14:25:14Z luigi */ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ @@ -2357,40 +2357,76 @@ const struct usb_knowndev usb_knowndevs[ "Stylus Photo RX425 scanner", }, { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX3800, + 0, + "Seiko Epson", + "CX3700/CX3800/DX38x0 MFP scanner", + }, + { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_4800, 0, "Seiko Epson", - "CX4800 MP scanner", + "CX4700/CX4800/DX48x0 MFP scanner", }, { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_4200, 0, "Seiko Epson", - "CX4200 MP scanner", + "CX4100/CX4200/DX4200 MFP scanner", }, { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_5000, 0, "Seiko Epson", - "DX-50x0 MFP scanner", + "CX4900/CX5000/DX50x0 MFP scanner", }, { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_6000, 0, "Seiko Epson", - "DX-60x0 MFP scanner", + "CX5900/CX6000/DX60x0 MFP scanner", + }, + { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX4000, + 0, + "Seiko Epson", + "DX4000 MFP scanner", }, { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX7400, 0, "Seiko Epson", - "DX7400/CX7300 scanner", + "CX7300/CX7400/DX7400 MFP scanner", }, { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX8400, 0, "Seiko Epson", - "DX8400 scanner", + "CX8300/CX8400/DX8400 MFP scanner", + }, + { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_SX100, + 0, + "Seiko Epson", + "SX100/NX100 MFP scanner", + }, + { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_NX300, + 0, + "Seiko Epson", + "NX300 MFP scanner", + }, + { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_SX200, + 0, + "Seiko Epson", + "SX200/SX205 MFP scanner", + }, + { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_SX400, + 0, + "Seiko Epson", + "SX400/NX400/TX400 MFP scanner", }, { USB_VENDOR_ETEK, USB_PRODUCT_ETEK_1COM, From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 10:20:51 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FD07106564A; Fri, 9 Jan 2009 10:20:51 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D2208FC18; Fri, 9 Jan 2009 10:20:51 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09AKprC049622; Fri, 9 Jan 2009 10:20:51 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09AKpRa049618; Fri, 9 Jan 2009 10:20:51 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901091020.n09AKpRa049618@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 9 Jan 2009 10:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186932 - in head/sys/arm/mv: . orion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 10:20:52 -0000 Author: raj Date: Fri Jan 9 10:20:51 2009 New Revision: 186932 URL: http://svn.freebsd.org/changeset/base/186932 Log: Improve Marvell SOCs PCI/PCIE driver. - Provide dedicated rmans for MEM and IO resources. - Convert PCI IRQ routing info into a table (from callback approach), provide config data for alternative DB- boards. - Fix a wrong boundary check error in pcib_mbus_init_bar() Obtained from: Semihalf Modified: head/sys/arm/mv/mv_pci.c head/sys/arm/mv/mvvar.h head/sys/arm/mv/orion/db88f5xxx.c head/sys/arm/mv/orion/orion.c Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Fri Jan 9 10:16:19 2009 (r186931) +++ head/sys/arm/mv/mv_pci.c Fri Jan 9 10:20:51 2009 (r186932) @@ -95,10 +95,12 @@ __FBSDID("$FreeBSD$"); struct pcib_mbus_softc { device_t sc_dev; + struct rman sc_iomem_rman; bus_addr_t sc_iomem_base; bus_addr_t sc_iomem_size; bus_addr_t sc_iomem_alloc; /* Next allocation. */ + struct rman sc_ioport_rman; bus_addr_t sc_ioport_base; bus_addr_t sc_ioport_size; bus_addr_t sc_ioport_alloc; /* Next allocation. */ @@ -521,12 +523,39 @@ pcib_mbus_attach(device_t self) sc->sc_ioport_size = sc->sc_info->op_io_size; sc->sc_ioport_alloc = sc->sc_info->op_io_base; + sc->sc_iomem_rman.rm_type = RMAN_ARRAY; + err = rman_init(&sc->sc_iomem_rman); + if (err) + return (err); + + sc->sc_ioport_rman.rm_type = RMAN_ARRAY; + err = rman_init(&sc->sc_ioport_rman); + if (err) { + rman_fini(&sc->sc_iomem_rman); + return (err); + } + + err = rman_manage_region(&sc->sc_iomem_rman, sc->sc_iomem_base, + sc->sc_iomem_base + sc->sc_iomem_size - 1); + if (err) + goto error; + + err = rman_manage_region(&sc->sc_ioport_rman, sc->sc_ioport_base, + sc->sc_ioport_base + sc->sc_ioport_size - 1); + if (err) + goto error; + err = pcib_mbus_init(sc, sc->sc_busnr, pcib_mbus_maxslots(sc->sc_dev)); if (err) - return(err); + goto error; device_add_child(self, "pci", -1); return (bus_generic_attach(self)); + +error: + rman_fini(&sc->sc_iomem_rman); + rman_fini(&sc->sc_ioport_rman); + return (err); } static int @@ -570,7 +599,7 @@ pcib_mbus_init_bar(struct pcib_mbus_soft return (width); addr = (*allocp + mask) & ~mask; - if ((*allocp = addr + size) >= limit) + if ((*allocp = addr + size) > limit) return (-1); if (bootverbose) @@ -634,8 +663,10 @@ static int pcib_mbus_init_resources(struct pcib_mbus_softc *sc, int bus, int slot, int func, int hdrtype) { + const struct obio_pci_irq_map *map = sc->sc_info->op_pci_irq_map; int maxbar = (hdrtype & PCIM_HDRTYPE) ? 0 : 6; - int bar = 0, irq, pin, i; + int bar = 0, irq = -1; + int pin, i; /* Program the base address registers */ while (bar < maxbar) { @@ -652,8 +683,14 @@ pcib_mbus_init_resources(struct pcib_mbu pin = pcib_mbus_read_config(sc->sc_dev, bus, slot, func, PCIR_INTPIN, 1); - if (sc->sc_info->op_get_irq != NULL) - irq = sc->sc_info->op_get_irq(bus, slot, func, pin); + if (map != NULL) + while (map->opim_irq >= 0) { + if ((map->opim_slot == slot || map->opim_slot < 0) && + (map->opim_pin == pin || map->opim_pin < 0)) + irq = map->opim_irq; + + map++; + } else irq = sc->sc_info->op_irq; @@ -728,9 +765,37 @@ static struct resource * pcib_mbus_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { + struct pcib_mbus_softc *sc = device_get_softc(dev); + struct rman *rm = NULL; + struct resource *res; - return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, - type, rid, start, end, count, flags)); + switch (type) { + case SYS_RES_IOPORT: + rm = &sc->sc_ioport_rman; + break; + case SYS_RES_MEMORY: + rm = &sc->sc_iomem_rman; + break; + default: + return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, + type, rid, start, end, count, flags)); + }; + + res = rman_reserve_resource(rm, start, end, count, flags, child); + if (res == NULL) + return (NULL); + + rman_set_rid(res, *rid); + rman_set_bustag(res, obio_tag); + rman_set_bushandle(res, start); + + if (flags & RF_ACTIVE) + if (bus_activate_resource(child, type, *rid, res)) { + rman_release_resource(res); + return (NULL); + } + + return (res); } static int @@ -738,8 +803,11 @@ pcib_mbus_release_resource(device_t dev, struct resource *res) { - return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child, - type, rid, res)); + if (type != SYS_RES_IOPORT && type != SYS_RES_MEMORY) + return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child, + type, rid, res)); + + return (rman_release_resource(res)); } static int Modified: head/sys/arm/mv/mvvar.h ============================================================================== --- head/sys/arm/mv/mvvar.h Fri Jan 9 10:16:19 2009 (r186931) +++ head/sys/arm/mv/mvvar.h Fri Jan 9 10:20:51 2009 (r186932) @@ -63,7 +63,11 @@ struct obio_device { struct resource_list od_resources; }; -typedef int (*obio_get_irq_t)(u_int bus, u_int slot, u_int func, u_int pin); +struct obio_pci_irq_map { + int opim_slot; + int opim_pin; + int opim_irq; +}; struct obio_pci { int op_type; @@ -82,8 +86,8 @@ struct obio_pci { int op_mem_win_target; int op_mem_win_attr; - obio_get_irq_t op_get_irq; /* IRQ Mapping callback */ - int op_irq; /* used if callback is NULL */ + const struct obio_pci_irq_map *op_pci_irq_map; + int op_irq; /* used if IRQ map table is NULL */ }; struct gpio_config { Modified: head/sys/arm/mv/orion/db88f5xxx.c ============================================================================== --- head/sys/arm/mv/orion/db88f5xxx.c Fri Jan 9 10:16:19 2009 (r186931) +++ head/sys/arm/mv/orion/db88f5xxx.c Fri Jan 9 10:20:51 2009 (r186932) @@ -123,35 +123,32 @@ static const struct pmap_devmap pmap_dev { 0, 0, 0, 0, 0, } }; -int platform_pci_get_irq(u_int bus, u_int slot, u_int func, u_int pin) -{ - int irq; - - switch (slot) { - case 7: - irq = GPIO2IRQ(12); /* GPIO 0 for DB-88F5182 */ - break; /* GPIO 12 for DB-88F5281 */ - case 8: - case 9: - irq = GPIO2IRQ(13); /* GPIO 1 for DB-88F5182 */ - break; /* GPIO 13 for DB-88F5281 */ - default: - irq = -1; - break; - }; +/* + * The pci_irq_map table consists of 3 columns: + * - PCI slot number (less than zero means ANY). + * - PCI IRQ pin (less than zero means ANY). + * - PCI IRQ (less than zero marks end of table). + * + * IRQ number from the first matching entry is used to configure PCI device + */ - /* - * XXX This isn't the right place to setup GPIO, but it makes sure - * that PCI works on 5XXX targets where U-Boot doesn't set up the GPIO - * correctly to handle PCI IRQs (e.g., on 5182). This code will go - * away once we set up GPIO in a generic way in a proper place (TBD). - */ - if (irq >= 0) - mv_gpio_configure(IRQ2GPIO(irq), MV_GPIO_POLAR_LOW | - MV_GPIO_LEVEL, ~0u); +/* PCI IRQ Map for DB-88F5281 */ +const struct obio_pci_irq_map pci_irq_map[] = { + { 7, -1, GPIO2IRQ(12) }, + { 8, -1, GPIO2IRQ(13) }, + { 9, -1, GPIO2IRQ(13) }, + { -1, -1, -1 } +}; - return (irq); -} +#if 0 +/* PCI IRQ Map for DB-88F5182 */ +const struct obio_pci_irq_map pci_irq_map[] = { + { 7, -1, GPIO2IRQ(0) }, + { 8, -1, GPIO2IRQ(1) }, + { 9, -1, GPIO2IRQ(1) }, + { -1, -1, -1 } +}; +#endif /* * mv_gpio_config row structure: Modified: head/sys/arm/mv/orion/orion.c ============================================================================== --- head/sys/arm/mv/orion/orion.c Fri Jan 9 10:16:19 2009 (r186931) +++ head/sys/arm/mv/orion/orion.c Fri Jan 9 10:20:51 2009 (r186932) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include -extern int platform_pci_get_irq(u_int bus, u_int slot, u_int func, u_int pin); +extern const struct obio_pci_irq_map pci_irq_map[]; struct obio_device obio_devices[] = { { "ic", MV_IC_BASE, MV_IC_SIZE, @@ -106,7 +106,7 @@ const struct obio_pci mv_pci_info[] = { MV_PCI_BASE, MV_PCI_SIZE, MV_PCI_IO_BASE, MV_PCI_IO_SIZE, 3, 0x51, MV_PCI_MEM_BASE, MV_PCI_MEM_SIZE, 3, 0x59, - platform_pci_get_irq, -1 + pci_irq_map, -1 }, { 0, 0, 0 } From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 10:45:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 998BB106567C; Fri, 9 Jan 2009 10:45:04 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1A1F8FC19; Fri, 9 Jan 2009 10:45:04 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Aj4lE054121; Fri, 9 Jan 2009 10:45:04 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Aj4Nt054117; Fri, 9 Jan 2009 10:45:04 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901091045.n09Aj4Nt054117@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 9 Jan 2009 10:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186933 - in head/sys/arm: arm include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 10:45:06 -0000 Author: raj Date: Fri Jan 9 10:45:04 2009 New Revision: 186933 URL: http://svn.freebsd.org/changeset/base/186933 Log: Fix confusing naming of Marvell ARM CPU specific routines. - The contents of 'feroceon_cpufuncs' dispatch table was really dedicated for the new Sheeva CPU (in 88F6xxx and MV-78xxx SOCs), and NOT Feroceon. - Feroceon CPU (in 88F5xxx SOCs) appears as a regular ARM926EJ-S core and does not require dedicated routines. This will be accompanied by a file rename commit. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm_feroceon.S head/sys/arm/arm/elf_trampoline.c head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Fri Jan 9 10:20:51 2009 (r186932) +++ head/sys/arm/arm/cpufunc.c Fri Jan 9 10:45:04 2009 (r186933) @@ -358,7 +358,7 @@ struct cpu_functions armv5_ec_cpufuncs = }; -struct cpu_functions feroceon_cpufuncs = { +struct cpu_functions sheeva_cpufuncs = { /* CPU functions */ cpufunc_id, /* id */ @@ -368,7 +368,7 @@ struct cpu_functions feroceon_cpufuncs = cpufunc_control, /* control */ cpufunc_domains, /* Domain */ - feroceon_setttb, /* Setttb */ + sheeva_setttb, /* Setttb */ cpufunc_faultstatus, /* Faultstatus */ cpufunc_faultaddress, /* Faultaddress */ @@ -387,17 +387,17 @@ struct cpu_functions feroceon_cpufuncs = armv5_ec_icache_sync_range, /* icache_sync_range */ armv5_ec_dcache_wbinv_all, /* dcache_wbinv_all */ - feroceon_dcache_wbinv_range, /* dcache_wbinv_range */ - feroceon_dcache_inv_range, /* dcache_inv_range */ - feroceon_dcache_wb_range, /* dcache_wb_range */ + sheeva_dcache_wbinv_range, /* dcache_wbinv_range */ + sheeva_dcache_inv_range, /* dcache_inv_range */ + sheeva_dcache_wb_range, /* dcache_wb_range */ armv5_ec_idcache_wbinv_all, /* idcache_wbinv_all */ - feroceon_idcache_wbinv_range, /* idcache_wbinv_all */ + sheeva_idcache_wbinv_range, /* idcache_wbinv_all */ - feroceon_l2cache_wbinv_all, /* l2cache_wbinv_all */ - feroceon_l2cache_wbinv_range, /* l2cache_wbinv_range */ - feroceon_l2cache_inv_range, /* l2cache_inv_range */ - feroceon_l2cache_wb_range, /* l2cache_wb_range */ + sheeva_l2cache_wbinv_all, /* l2cache_wbinv_all */ + sheeva_l2cache_wbinv_range, /* l2cache_wbinv_range */ + sheeva_l2cache_inv_range, /* l2cache_inv_range */ + sheeva_l2cache_wb_range, /* l2cache_wb_range */ /* Other functions */ @@ -1000,7 +1000,7 @@ set_cpufuncs() cputype == CPU_ID_MV88FR571_VD || cputype == CPU_ID_MV88FR571_41) { - cpufuncs = feroceon_cpufuncs; + cpufuncs = sheeva_cpufuncs; /* * Workaround for Marvell MV78100 CPU: Cache prefetch * mechanism may affect the cache coherency validity, @@ -1011,12 +1011,12 @@ set_cpufuncs() */ if (cputype == CPU_ID_MV88FR571_VD || cputype == CPU_ID_MV88FR571_41) { - feroceon_control_ext(0xffffffff, + sheeva_control_ext(0xffffffff, FC_DCACHE_STREAM_EN | FC_WR_ALLOC_EN | FC_BRANCH_TARG_BUF_DIS | FC_L2CACHE_EN | FC_L2_PREF_DIS); } else { - feroceon_control_ext(0xffffffff, + sheeva_control_ext(0xffffffff, FC_DCACHE_STREAM_EN | FC_WR_ALLOC_EN | FC_BRANCH_TARG_BUF_DIS | FC_L2CACHE_EN); } Modified: head/sys/arm/arm/cpufunc_asm_feroceon.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_feroceon.S Fri Jan 9 10:20:51 2009 (r186932) +++ head/sys/arm/arm/cpufunc_asm_feroceon.S Fri Jan 9 10:45:04 2009 (r186933) @@ -34,12 +34,12 @@ __FBSDID("$FreeBSD$"); #include -.Lferoceon_cache_line_size: +.Lsheeva_cache_line_size: .word _C_LABEL(arm_pdcache_line_size) -.Lferoceon_asm_page_mask: +.Lsheeva_asm_page_mask: .word _C_LABEL(PAGE_MASK) -ENTRY(feroceon_setttb) +ENTRY(sheeva_setttb) /* Disable irqs */ mrs r2, cpsr orr r3, r2, #I32_bit | F32_bit @@ -63,11 +63,11 @@ ENTRY(feroceon_setttb) mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ RET -ENTRY(feroceon_dcache_wbinv_range) +ENTRY(sheeva_dcache_wbinv_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -76,7 +76,7 @@ ENTRY(feroceon_dcache_wbinv_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -105,11 +105,11 @@ ENTRY(feroceon_dcache_wbinv_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_idcache_wbinv_range) +ENTRY(sheeva_idcache_wbinv_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -118,7 +118,7 @@ ENTRY(feroceon_idcache_wbinv_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -136,7 +136,7 @@ ENTRY(feroceon_idcache_wbinv_range) msr cpsr_c, lr /* Invalidate and clean icache line by line */ - ldr r3, .Lferoceon_cache_line_size + ldr r3, .Lsheeva_cache_line_size ldr r3, [r3] 2: mcr p15, 0, r0, c7, c5, 1 @@ -156,11 +156,11 @@ ENTRY(feroceon_idcache_wbinv_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_dcache_inv_range) +ENTRY(sheeva_dcache_inv_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -169,7 +169,7 @@ ENTRY(feroceon_dcache_inv_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -198,11 +198,11 @@ ENTRY(feroceon_dcache_inv_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_dcache_wb_range) +ENTRY(sheeva_dcache_wb_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -211,7 +211,7 @@ ENTRY(feroceon_dcache_wb_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -240,11 +240,11 @@ ENTRY(feroceon_dcache_wb_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_l2cache_wbinv_range) +ENTRY(sheeva_l2cache_wbinv_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -253,7 +253,7 @@ ENTRY(feroceon_l2cache_wbinv_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -284,11 +284,11 @@ ENTRY(feroceon_l2cache_wbinv_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_l2cache_inv_range) +ENTRY(sheeva_l2cache_inv_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -297,7 +297,7 @@ ENTRY(feroceon_l2cache_inv_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -326,11 +326,11 @@ ENTRY(feroceon_l2cache_inv_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_l2cache_wb_range) +ENTRY(sheeva_l2cache_wb_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -339,7 +339,7 @@ ENTRY(feroceon_l2cache_wb_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -368,14 +368,14 @@ ENTRY(feroceon_l2cache_wb_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_l2cache_wbinv_all) +ENTRY(sheeva_l2cache_wbinv_all) mov r0, #0 mcr p15, 1, r0, c15, c9, 0 /* Clean L2 */ mcr p15, 1, r0, c15, c11, 0 /* Invalidate L2 */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET -ENTRY(feroceon_control_ext) +ENTRY(sheeva_control_ext) mrc p15, 1, r3, c15, c1, 0 /* Read the control register */ bic r2, r3, r0 /* Clear bits */ eor r2, r2, r1 /* XOR bits */ Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Fri Jan 9 10:20:51 2009 (r186932) +++ head/sys/arm/arm/elf_trampoline.c Fri Jan 9 10:45:04 2009 (r186933) @@ -74,7 +74,7 @@ void __startC(void); #ifdef CPU_XSCALE_81342 #define cpu_l2cache_wbinv_all xscalec3_l2cache_purge #elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) -#define cpu_l2cache_wbinv_all feroceon_l2cache_wbinv_all +#define cpu_l2cache_wbinv_all sheeva_l2cache_wbinv_all #else #define cpu_l2cache_wbinv_all() #endif Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Fri Jan 9 10:20:51 2009 (r186932) +++ head/sys/arm/include/cpufunc.h Fri Jan 9 10:45:04 2009 (r186933) @@ -377,17 +377,17 @@ extern unsigned arm10_dcache_sets_inc; extern unsigned arm10_dcache_index_max; extern unsigned arm10_dcache_index_inc; -u_int feroceon_control_ext (u_int, u_int); -void feroceon_setttb (u_int); -void feroceon_dcache_wbinv_range (vm_offset_t, vm_size_t); -void feroceon_dcache_inv_range (vm_offset_t, vm_size_t); -void feroceon_dcache_wb_range (vm_offset_t, vm_size_t); -void feroceon_idcache_wbinv_range (vm_offset_t, vm_size_t); - -void feroceon_l2cache_wbinv_range (vm_offset_t, vm_size_t); -void feroceon_l2cache_inv_range (vm_offset_t, vm_size_t); -void feroceon_l2cache_wb_range (vm_offset_t, vm_size_t); -void feroceon_l2cache_wbinv_all (void); +u_int sheeva_control_ext (u_int, u_int); +void sheeva_setttb (u_int); +void sheeva_dcache_wbinv_range (vm_offset_t, vm_size_t); +void sheeva_dcache_inv_range (vm_offset_t, vm_size_t); +void sheeva_dcache_wb_range (vm_offset_t, vm_size_t); +void sheeva_idcache_wbinv_range (vm_offset_t, vm_size_t); + +void sheeva_l2cache_wbinv_range (vm_offset_t, vm_size_t); +void sheeva_l2cache_inv_range (vm_offset_t, vm_size_t); +void sheeva_l2cache_wb_range (vm_offset_t, vm_size_t); +void sheeva_l2cache_wbinv_all (void); #endif #ifdef CPU_ARM11 From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 10:55:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15800106564A; Fri, 9 Jan 2009 10:55:33 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C18058FC08; Fri, 9 Jan 2009 10:55:33 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09AtXVx054389; Fri, 9 Jan 2009 10:55:33 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09AtXxs054386; Fri, 9 Jan 2009 10:55:33 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901091055.n09AtXxs054386@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 9 Jan 2009 10:55:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186934 - in head/sys: arm/arm arm/mv conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 10:55:34 -0000 Author: raj Date: Fri Jan 9 10:55:33 2009 New Revision: 186934 URL: http://svn.freebsd.org/changeset/base/186934 Log: Rename Marvell ARM CPU specific file according to r186933. Added: head/sys/arm/arm/cpufunc_asm_sheeva.S (props changed) - copied unchanged from r186933, head/sys/arm/arm/cpufunc_asm_feroceon.S Deleted: head/sys/arm/arm/cpufunc_asm_feroceon.S Modified: head/sys/arm/mv/files.mv head/sys/conf/Makefile.arm Copied: head/sys/arm/arm/cpufunc_asm_sheeva.S (from r186933, head/sys/arm/arm/cpufunc_asm_feroceon.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/cpufunc_asm_sheeva.S Fri Jan 9 10:55:33 2009 (r186934, copy of r186933, head/sys/arm/arm/cpufunc_asm_feroceon.S) @@ -0,0 +1,386 @@ +/*- + * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. + * All rights reserved. + * + * Developed by Semihalf. + * + * 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. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of MARVELL nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +.Lsheeva_cache_line_size: + .word _C_LABEL(arm_pdcache_line_size) +.Lsheeva_asm_page_mask: + .word _C_LABEL(PAGE_MASK) + +ENTRY(sheeva_setttb) + /* Disable irqs */ + mrs r2, cpsr + orr r3, r2, #I32_bit | F32_bit + msr cpsr_c, r3 + + mov r1, #0 + mcr p15, 0, r1, c7, c5, 0 /* Invalidate ICache */ +1: mrc p15, 0, r15, c7, c14, 3 /* Test, clean and invalidate DCache */ + bne 1b /* More to do? */ + + mcr p15, 1, r1, c15, c9, 0 /* Clean L2 */ + mcr p15, 1, r1, c15, c11, 0 /* Invalidate L2 */ + + /* Reenable irqs */ + msr cpsr_c, r2 + + mcr p15, 0, r1, c7, c10, 4 /* drain the write buffer */ + + mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ + + mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ + RET + +ENTRY(sheeva_dcache_wbinv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ + mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_idcache_wbinv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ + mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + /* Invalidate and clean icache line by line */ + ldr r3, .Lsheeva_cache_line_size + ldr r3, [r3] +2: + mcr p15, 0, r0, c7, c5, 1 + add r0, r0, r3 + cmp r2, r0 + bhi 2b + + add r0, r2, #1 + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_dcache_inv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c14, 0 /* Inv zone start address */ + mcr p15, 5, r2, c15, c14, 1 /* Inv zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_dcache_wb_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c13, 0 /* Clean zone start address */ + mcr p15, 5, r2, c15, c13, 1 /* Clean zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_wbinv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ + mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ + mcr p15, 1, r0, c15, c11, 4 /* Inv L2 zone start address */ + mcr p15, 1, r2, c15, c11, 5 /* Inv L2 zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_inv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 1, r0, c15, c11, 4 /* Inv L2 zone start address */ + mcr p15, 1, r2, c15, c11, 5 /* Inv L2 zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_wb_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ + mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_wbinv_all) + mov r0, #0 + mcr p15, 1, r0, c15, c9, 0 /* Clean L2 */ + mcr p15, 1, r0, c15, c11, 0 /* Invalidate L2 */ + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + RET + +ENTRY(sheeva_control_ext) + mrc p15, 1, r3, c15, c1, 0 /* Read the control register */ + bic r2, r3, r0 /* Clear bits */ + eor r2, r2, r1 /* XOR bits */ + + teq r2, r3 /* Only write if there is a change */ + mcrne p15, 1, r2, c15, c1, 0 /* Write new control register */ + mov r0, r3 /* Return old value */ + RET Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Fri Jan 9 10:45:04 2009 (r186933) +++ head/sys/arm/mv/files.mv Fri Jan 9 10:55:33 2009 (r186934) @@ -15,7 +15,7 @@ arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_armv5_ec.S standard -arm/arm/cpufunc_asm_feroceon.S standard +arm/arm/cpufunc_asm_sheeva.S standard arm/arm/irq_dispatch.S standard arm/mv/bus_space.c standard Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Fri Jan 9 10:45:04 2009 (r186933) +++ head/sys/conf/Makefile.arm Fri Jan 9 10:55:33 2009 (r186934) @@ -73,7 +73,7 @@ FILES_CPU_FUNC = $S/$M/$M/cpufunc_asm_ar $S/$M/$M/cpufunc_asm_sa1.S $S/$M/$M/cpufunc_asm_arm10.S \ $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \ $S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S \ - $S/$M/$M/cpufunc_asm_feroceon.S + $S/$M/$M/cpufunc_asm_sheeva.S KERNEL_EXTRA=trampoline KERNEL_EXTRA_INSTALL=kernel.gz.tramp trampoline: ${KERNEL_KO}.tramp From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 10:59:00 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38DEB106564A; Fri, 9 Jan 2009 10:59:00 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27BE28FC16; Fri, 9 Jan 2009 10:59:00 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Ax0Se054488; Fri, 9 Jan 2009 10:59:00 GMT (envelope-from harti@svn.freebsd.org) Received: (from harti@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Ax0f8054487; Fri, 9 Jan 2009 10:59:00 GMT (envelope-from harti@svn.freebsd.org) Message-Id: <200901091059.n09Ax0f8054487@svn.freebsd.org> From: Hartmut Brandt Date: Fri, 9 Jan 2009 10:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186935 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 10:59:00 -0000 Author: harti Date: Fri Jan 9 10:58:59 2009 New Revision: 186935 URL: http://svn.freebsd.org/changeset/base/186935 Log: Set a minimum of information in the routing message (like version and type) so that generic routing message parsing code can parse the messages for L2 info that are retrieved via the sysctl interface. Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Fri Jan 9 10:55:33 2009 (r186934) +++ head/sys/netinet/in.c Fri Jan 9 10:58:59 2009 (r186935) @@ -1201,6 +1201,10 @@ in_lltable_dump(struct lltable *llt, str */ bzero(&arpc, sizeof(arpc)); arpc.rtm.rtm_msglen = sizeof(arpc); + arpc.rtm.rtm_version = RTM_VERSION; + arpc.rtm.rtm_type = RTM_GET; + arpc.rtm.rtm_flags = RTF_UP; + arpc.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY; arpc.sin.sin_family = AF_INET; arpc.sin.sin_len = sizeof(arpc.sin); arpc.sin.sin_addr.s_addr = SIN(lle)->sin_addr.s_addr; From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 11:45:13 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A7D010656C0; Fri, 9 Jan 2009 11:45:13 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 892F18FC0C; Fri, 9 Jan 2009 11:45:13 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09BjDmL055726; Fri, 9 Jan 2009 11:45:13 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09BjD82055725; Fri, 9 Jan 2009 11:45:13 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <200901091145.n09BjD82055725@svn.freebsd.org> From: Poul-Henning Kamp Date: Fri, 9 Jan 2009 11:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186941 - head/lib/libmd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:45:14 -0000 Author: phk Date: Fri Jan 9 11:45:13 2009 New Revision: 186941 URL: http://svn.freebsd.org/changeset/base/186941 Log: Remove reference to no longer existing document. Spotted by: Bjoern Voigt Modified: head/lib/libmd/mdX.3 Modified: head/lib/libmd/mdX.3 ============================================================================== --- head/lib/libmd/mdX.3 Fri Jan 9 11:44:22 2009 (r186940) +++ head/lib/libmd/mdX.3 Fri Jan 9 11:45:13 2009 (r186941) @@ -164,11 +164,6 @@ argument is non-null it must point to at .%O RFC 1321 .Re .Rs -.%A RSA Laboratories -.%T Frequently Asked Questions About today's Cryptography -.%O \& -.Re -.Rs .%A H. Dobbertin .%T Alf Swindles Ann .%J CryptoBytes From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 11:45:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 585F71065673; Fri, 9 Jan 2009 11:45:46 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 460A38FC14; Fri, 9 Jan 2009 11:45:46 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09BjkuX055778; Fri, 9 Jan 2009 11:45:46 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Bjjll055772; Fri, 9 Jan 2009 11:45:45 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901091145.n09Bjjll055772@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 11:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186942 - in head/contrib/bind9: . lib/dns lib/isc/unix X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:45:47 -0000 Author: dougb Date: Fri Jan 9 11:45:45 2009 New Revision: 186942 URL: http://svn.freebsd.org/changeset/base/186942 Log: Merge from vendor/bind9/dist as of the 9.4.3-P1 import Modified: head/contrib/bind9/ (props changed) head/contrib/bind9/CHANGES head/contrib/bind9/lib/dns/api head/contrib/bind9/lib/dns/openssldsa_link.c head/contrib/bind9/lib/dns/opensslrsa_link.c head/contrib/bind9/lib/isc/unix/socket.c head/contrib/bind9/version Modified: head/contrib/bind9/CHANGES ============================================================================== --- head/contrib/bind9/CHANGES Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/CHANGES Fri Jan 9 11:45:45 2009 (r186942) @@ -1,3 +1,11 @@ + --- 9.4.3-P1 released --- + +2522. [security] Handle -1 from DSA_do_verify(). + +2498. [bug] Removed a bogus function argument used with + ISC_SOCKET_USE_POLLWATCH: it could cause compiler + warning or crash named with the debug 1 level + of logging. [RT #18917] --- 9.4.3 released --- Modified: head/contrib/bind9/lib/dns/api ============================================================================== --- head/contrib/bind9/lib/dns/api Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/lib/dns/api Fri Jan 9 11:45:45 2009 (r186942) @@ -1,3 +1,3 @@ LIBINTERFACE = 36 -LIBREVISION = 1 +LIBREVISION = 2 LIBAGE = 0 Modified: head/contrib/bind9/lib/dns/openssldsa_link.c ============================================================================== --- head/contrib/bind9/lib/dns/openssldsa_link.c Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/lib/dns/openssldsa_link.c Fri Jan 9 11:45:45 2009 (r186942) @@ -16,7 +16,7 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: openssldsa_link.c,v 1.1.6.9 2007/08/28 07:20:04 tbox Exp $ */ +/* $Id: openssldsa_link.c,v 1.1.6.9.28.1 2008/12/24 00:21:22 marka Exp $ */ #ifdef OPENSSL @@ -133,7 +133,7 @@ openssldsa_verify(dst_context_t *dctx, c status = DSA_do_verify(digest, ISC_SHA1_DIGESTLENGTH, dsasig, dsa); DSA_SIG_free(dsasig); - if (status == 0) + if (status != 1) return (dst__openssl_toresult(DST_R_VERIFYFAILURE)); return (ISC_R_SUCCESS); Modified: head/contrib/bind9/lib/dns/opensslrsa_link.c ============================================================================== --- head/contrib/bind9/lib/dns/opensslrsa_link.c Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/lib/dns/opensslrsa_link.c Fri Jan 9 11:45:45 2009 (r186942) @@ -17,7 +17,7 @@ /* * Principal Author: Brian Wellington - * $Id: opensslrsa_link.c,v 1.1.6.11 2006/11/07 21:28:49 marka Exp $ + * $Id: opensslrsa_link.c,v 1.1.6.11.58.1 2008/12/24 00:21:22 marka Exp $ */ #ifdef OPENSSL @@ -246,7 +246,7 @@ opensslrsa_verify(dst_context_t *dctx, c status = RSA_verify(type, digest, digestlen, sig->base, RSA_size(rsa), rsa); - if (status == 0) + if (status != 1) return (dst__openssl_toresult(DST_R_VERIFYFAILURE)); return (ISC_R_SUCCESS); Modified: head/contrib/bind9/lib/isc/unix/socket.c ============================================================================== --- head/contrib/bind9/lib/isc/unix/socket.c Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/lib/isc/unix/socket.c Fri Jan 9 11:45:45 2009 (r186942) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.237.18.56 2008/11/12 03:58:36 marka Exp $ */ +/* $Id: socket.c,v 1.237.18.56.2.1 2008/12/23 00:14:34 marka Exp $ */ /*! \file */ @@ -501,7 +501,7 @@ FIX_IPV6_RECVPKTINFO(isc_socket_t *sock) if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, (void *)&on, sizeof(on)) < 0) { - + UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d, IPV6_RECVPKTINFO) " "%s: %s", sock->fd, @@ -3163,7 +3163,6 @@ watcher(void *uap) { ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(1), - ISC_LOG_INFO, "unexpected POLL timeout"); } pollstate = poll_active; @@ -4902,7 +4901,7 @@ isc_socket_ipv6only(isc_socket_t *sock, if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&onoff, sizeof(int)) < 0) { char strbuf[ISC_STRERRORSIZE]; - + UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d, IPV6_V6ONLY) " "%s: %s", sock->fd, Modified: head/contrib/bind9/version ============================================================================== --- head/contrib/bind9/version Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/version Fri Jan 9 11:45:45 2009 (r186942) @@ -1,4 +1,4 @@ -# $Id: version,v 1.29.134.23 2008/11/12 04:17:12 marka Exp $ +# $Id: version,v 1.29.134.23.2.1 2008/12/24 00:21:22 marka Exp $ # # This file must follow /bin/sh rules. It is imported directly via # configure. @@ -6,5 +6,5 @@ MAJORVER=9 MINORVER=4 PATCHVER=3 -RELEASETYPE= -RELEASEVER= +RELEASETYPE=-P +RELEASEVER=1 From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 12:38:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0640106566C; Fri, 9 Jan 2009 12:38:41 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EFC98FC16; Fri, 9 Jan 2009 12:38:41 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09CcfKC057003; Fri, 9 Jan 2009 12:38:41 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09CcfVZ057002; Fri, 9 Jan 2009 12:38:41 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901091238.n09CcfVZ057002@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 9 Jan 2009 12:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186947 - head/sys/arm/mv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 12:38:42 -0000 Author: raj Date: Fri Jan 9 12:38:41 2009 New Revision: 186947 URL: http://svn.freebsd.org/changeset/base/186947 Log: Check PCIE link status before accessing the bus. Some 88F5182-based systems (Linkstation) have problems when PCIE is accessed without any peripherals present. Modified: head/sys/arm/mv/mv_pci.c Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Fri Jan 9 12:17:37 2009 (r186946) +++ head/sys/arm/mv/mv_pci.c Fri Jan 9 12:38:41 2009 (r186947) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #define PCIE_REG_STATUS 0x1A04 #define PCIE_REG_IRQ_MASK 0x1910 +#define STATUS_LINK_DOWN 1 #define STATUS_BUS_OFFS 8 #define STATUS_BUS_MASK (0xFF << STATUS_BUS_OFFS) #define STATUS_DEV_OFFS 16 @@ -436,6 +437,8 @@ pcib_mbus_probe(device_t self) P2P_CONF_DEV_OFFS; } else { val = bus_space_read_4(sc->sc_bst, sc->sc_bsh, PCIE_REG_STATUS); + if (val & STATUS_LINK_DOWN) + goto out; bus = sc->sc_busnr = (val & STATUS_BUS_MASK) >> STATUS_BUS_OFFS; dev = sc->sc_devnr = (val & STATUS_DEV_MASK) >> STATUS_DEV_OFFS; } From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 13:06:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 436F610656F1; Fri, 9 Jan 2009 13:06:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3119F8FC1B; Fri, 9 Jan 2009 13:06:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09D6v8l057546; Fri, 9 Jan 2009 13:06:57 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09D6vcB057544; Fri, 9 Jan 2009 13:06:57 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901091306.n09D6vcB057544@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 9 Jan 2009 13:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186948 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 13:06:58 -0000 Author: bz Date: Fri Jan 9 13:06:56 2009 New Revision: 186948 URL: http://svn.freebsd.org/changeset/base/186948 Log: Make SIOCGIFADDR and related, as well as SIOCGIFADDR_IN6 and related jail-aware. Up to now we returned the first address of the interface for SIOCGIFADDR w/o an ifr_addr in the query. This caused problems for programs querying for an address but running inside a jail, as the address returned usually did not belong to the jail. Like for v6, if there was an ifr_addr given on v4, you could probe for more addresses on the interfaces that you were not allowed to see from inside a jail. Return an error (EADDRNOTAVAIL) in that case now unless the address is on the given interface and valid for the jail. PR: kern/114325 Reviewed by: rwatson MFC after: 4 weeks Modified: head/sys/netinet/in.c head/sys/netinet6/in6.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Fri Jan 9 12:38:41 2009 (r186947) +++ head/sys/netinet/in.c Fri Jan 9 13:06:56 2009 (r186948) @@ -41,7 +41,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -261,13 +263,19 @@ in_control(struct socket *so, u_long cmd LIST_FOREACH(iap, INADDR_HASH(dst.s_addr), ia_hash) if (iap->ia_ifp == ifp && iap->ia_addr.sin_addr.s_addr == dst.s_addr) { - ia = iap; + if (td == NULL || prison_check_ip4( + td->td_ucred, &dst)) + ia = iap; break; } if (ia == NULL) TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { iap = ifatoia(ifa); if (iap->ia_addr.sin_family == AF_INET) { + if (td != NULL && + !prison_check_ip4(td->td_ucred, + &iap->ia_addr.sin_addr)) + continue; ia = iap; break; } Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Fri Jan 9 12:38:41 2009 (r186947) +++ head/sys/netinet6/in6.c Fri Jan 9 13:06:56 2009 (r186948) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -329,6 +330,9 @@ in6_control(struct socket *so, u_long cm error = in6_setscope(&sa6->sin6_addr, ifp, NULL); if (error != 0) return (error); + if (td != NULL && !prison_check_ip6(td->td_ucred, + &sa6->sin6_addr)) + return (EADDRNOTAVAIL); ia = in6ifa_ifpwithaddr(ifp, &sa6->sin6_addr); } else ia = NULL; From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 13:10:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 813D2106568F; Fri, 9 Jan 2009 13:10:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 385CD8FC1C; Fri, 9 Jan 2009 13:10:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id AF06A41C64A; Fri, 9 Jan 2009 14:10:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id 1EWkTRm6vIsc; Fri, 9 Jan 2009 14:10:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 55C7041C62D; Fri, 9 Jan 2009 14:10:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 1AEB04448DD; Fri, 9 Jan 2009 13:08:50 +0000 (UTC) Date: Fri, 9 Jan 2009 13:08:49 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <200901091306.n09D6vcB057544@svn.freebsd.org> Message-ID: <20090109130811.E45399@maildrop.int.zabbadoz.net> References: <200901091306.n09D6vcB057544@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r186948 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 13:10:08 -0000 On Fri, 9 Jan 2009, Bjoern A. Zeeb wrote: > Author: bz > Date: Fri Jan 9 13:06:56 2009 > New Revision: 186948 > URL: http://svn.freebsd.org/changeset/base/186948 > > Log: > Make SIOCGIFADDR and related, as well as SIOCGIFADDR_IN6 and related > jail-aware. Up to now we returned the first address of the interface > for SIOCGIFADDR w/o an ifr_addr in the query. This caused problems for > programs querying for an address but running inside a jail, as the > address returned usually did not belong to the jail. One of the programs hitting this is Samba btw. > Like for v6, if there was an ifr_addr given on v4, you could probe > for more addresses on the interfaces that you were not allowed to see > from inside a jail. Return an error (EADDRNOTAVAIL) in that case > now unless the address is on the given interface and valid for the > jail. > > PR: kern/114325 > Reviewed by: rwatson > MFC after: 4 weeks > > Modified: > head/sys/netinet/in.c > head/sys/netinet6/in6.c -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 14:41:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 214E31065672; Fri, 9 Jan 2009 14:41:37 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F8B18FC08; Fri, 9 Jan 2009 14:41:37 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09EfaN3059606; Fri, 9 Jan 2009 14:41:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09EfaZn059605; Fri, 9 Jan 2009 14:41:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901091441.n09EfaZn059605@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 Jan 2009 14:41:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186953 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 14:41:37 -0000 Author: brueffer Date: Fri Jan 9 14:41:36 2009 New Revision: 186953 URL: http://svn.freebsd.org/changeset/base/186953 Log: DEBUG_REDZONE needs DDB which needs KDB. PR: 130324 Submitted by: Jaakko Heinonen MFC after: 3 days Modified: head/share/man/man9/redzone.9 Modified: head/share/man/man9/redzone.9 ============================================================================== --- head/share/man/man9/redzone.9 Fri Jan 9 14:35:55 2009 (r186952) +++ head/share/man/man9/redzone.9 Fri Jan 9 14:41:36 2009 (r186953) @@ -24,13 +24,15 @@ .\" .\" $FreeBSD$ .\" -.Dd January 31, 2006 +.Dd January 9, 2009 .Dt REDZONE 9 .Os .Sh NAME .Nm RedZone .Nd "buffer corruptions detector" .Sh SYNOPSIS +.Cd "options KDB" +.Cd "options DDB" .Cd "options DEBUG_REDZONE" .Sh DESCRIPTION .Nm From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 16:02:20 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30CB0106564A; Fri, 9 Jan 2009 16:02:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ED298FC0A; Fri, 9 Jan 2009 16:02:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09G2Jme061170; Fri, 9 Jan 2009 16:02:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09G2Jj1061164; Fri, 9 Jan 2009 16:02:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200901091602.n09G2Jj1061164@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Jan 2009 16:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:02:20 -0000 Author: adrian Date: Fri Jan 9 16:02:19 2009 New Revision: 186955 URL: http://svn.freebsd.org/changeset/base/186955 Log: Implement a new IP option (not compiled/enabled by default) to allow applications to specify a non-local IP address when bind()'ing a socket to a local endpoint. This allows applications to spoof the client IP address of connections if (obviously!) they somehow are able to receive the traffic normally destined to said clients. This patch doesn't include any changes to ipfw or the bridging code to redirect the client traffic through the PCB checks so TCP gets a shot at it. The normal behaviour is that packets with a non-local destination IP address are not handled locally. This can be dealth with some IPFW hackery; modifications to IPFW to make this less hacky will occur in subsequent commmits. Thanks to Julian Elischer and others at Ironport. This work was approved and donated before Cisco acquired them. Obtained from: Julian Elischer and others MFC after: 2 weeks Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/netinet/in.h head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/ip_output.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/conf/NOTES Fri Jan 9 16:02:19 2009 (r186955) @@ -633,6 +633,14 @@ options ALTQ_PRIQ # Priority Queueing options ALTQ_NOPCC # Required if the TSC is unusable options ALTQ_DEBUG +# IP optional behaviour. +# IP_NONLOCALBIND disables the check that bind() usually makes that the +# Address is one that is assigned to an interface on this machine. +# It allows transparent proxies to pretend to be other machines. +# How the packet GET to that machine is a problem solved elsewhere, +# smart routers, ipfw fwd, etc. +options IP_NONLOCALBIND #Allow impersonation for proxies. + # netgraph(4). Enable the base netgraph code with the NETGRAPH option. # Individual node types can be enabled with the corresponding option # listed below; however, this is not strictly necessary as netgraph Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/conf/options Fri Jan 9 16:02:19 2009 (r186955) @@ -392,6 +392,7 @@ IPFIREWALL_VERBOSE opt_ipfw.h IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h IPSEC opt_ipsec.h IPSEC_DEBUG opt_ipsec.h +IP_NONLOCALBIND opt_inet.h IPSEC_FILTERTUNNEL opt_ipsec.h IPSTEALTH IPX Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/netinet/in.h Fri Jan 9 16:02:19 2009 (r186955) @@ -441,6 +441,7 @@ __END_DECLS #define IP_FAITH 22 /* bool; accept FAITH'ed connections */ #define IP_ONESBCAST 23 /* bool: send all-ones broadcast */ +#define IP_NONLOCALOK 24 /* allow bind to spoof other machines */ #define IP_FW_TABLE_ADD 40 /* add entry */ #define IP_FW_TABLE_DEL 41 /* delete entry */ Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/netinet/in_pcb.c Fri Jan 9 16:02:19 2009 (r186955) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_inet.h" #include "opt_ipsec.h" #include "opt_inet6.h" #include "opt_mac.h" @@ -346,7 +347,11 @@ in_pcbbind_setup(struct inpcb *inp, stru } else if (sin->sin_addr.s_addr != INADDR_ANY) { sin->sin_port = 0; /* yech... */ bzero(&sin->sin_zero, sizeof(sin->sin_zero)); - if (ifa_ifwithaddr((struct sockaddr *)sin) == 0) + if ( +#if defined(IP_NONLOCALBIND) + ((inp->inp_flags & INP_NONLOCALOK) == 0) && +#endif + (ifa_ifwithaddr((struct sockaddr *)sin) == 0)) return (EADDRNOTAVAIL); } laddr = sin->sin_addr; Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/netinet/in_pcb.h Fri Jan 9 16:02:19 2009 (r186955) @@ -411,6 +411,8 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_FAITH 0x200 /* accept FAITH'ed connections */ #define INP_RECVTTL 0x400 /* receive incoming IP TTL */ #define INP_DONTFRAG 0x800 /* don't fragment packet */ +#define INP_NONLOCALOK 0x1000 /* Allow bind to spoof any address */ + /* - requires options IP_NONLOCALBIND */ #define IN6P_IPV6_V6ONLY 0x008000 /* restrict AF_INET6 socket for v6 */ Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/netinet/ip_output.c Fri Jan 9 16:02:19 2009 (r186955) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ipfw.h" +#include "opt_inet.h" #include "opt_ipsec.h" #include "opt_mac.h" #include "opt_mbuf_stress_test.h" @@ -95,6 +96,12 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, mbuf_ &mbuf_frag_size, 0, "Fragment outgoing mbufs to this size"); #endif +#if defined(IP_NONLOCALBIND) +static int ip_nonlocalok = 0; +SYSCTL_INT(_net_inet_ip, OID_AUTO, nonlocalok, + CTLFLAG_RW|CTLFLAG_SECURE, &ip_nonlocalok, 0, ""); +#endif + static void ip_mloopback (struct ifnet *, struct mbuf *, struct sockaddr_in *, int); @@ -866,6 +873,13 @@ ip_ctloutput(struct socket *so, struct s return (error); } +#if defined(IP_NONLOCALBIND) + case IP_NONLOCALOK: + if (! ip_nonlocalok) { + error = ENOPROTOOPT; + break; + } +#endif case IP_TOS: case IP_TTL: case IP_MINTTL: @@ -937,6 +951,11 @@ ip_ctloutput(struct socket *so, struct s case IP_DONTFRAG: OPTSET(INP_DONTFRAG); break; +#if defined(IP_NONLOCALBIND) + case IP_NONLOCALOK: + OPTSET(INP_NONLOCALOK); + break; +#endif } break; #undef OPTSET From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 16:22:32 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0D6E10657E0; Fri, 9 Jan 2009 16:22:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FBE88FC13; Fri, 9 Jan 2009 16:22:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09GMWs9061581; Fri, 9 Jan 2009 16:22:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09GMWFp061580; Fri, 9 Jan 2009 16:22:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901091622.n09GMWFp061580@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 9 Jan 2009 16:22:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186956 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:22:33 -0000 Author: bz Date: Fri Jan 9 16:22:32 2009 New Revision: 186956 URL: http://svn.freebsd.org/changeset/base/186956 Log: Take the cred from curthread rather than curproc as curproc would need locking but the credential from curthread (usually) never changes. Discussed with: jhb MFC after: 2 weeks Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Fri Jan 9 16:02:19 2009 (r186955) +++ head/sys/net/rtsock.c Fri Jan 9 16:22:32 2009 (r186956) @@ -1344,7 +1344,7 @@ done: return (error); } -int +static int sysctl_ifmalist(int af, struct walkarg *w) { INIT_VNET_NET(curvnet); @@ -1365,8 +1365,8 @@ sysctl_ifmalist(int af, struct walkarg * TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (af && af != ifma->ifma_addr->sa_family) continue; - if (jailed(curproc->p_ucred) && - !prison_if(curproc->p_ucred, ifma->ifma_addr)) + if (jailed(curthread->td_ucred) && + !prison_if(curthread->td_ucred, ifma->ifma_addr)) continue; info.rti_info[RTAX_IFA] = ifma->ifma_addr; info.rti_info[RTAX_GATEWAY] = From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 16:24:10 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C65B10656CC; Fri, 9 Jan 2009 16:24:10 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A3D38FC13; Fri, 9 Jan 2009 16:24:10 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09GOAlK061654; Fri, 9 Jan 2009 16:24:10 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09GOAd2061653; Fri, 9 Jan 2009 16:24:10 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901091624.n09GOAd2061653@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 9 Jan 2009 16:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186957 - head/lib/libc/string stable/7/lib/libc/string X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:24:12 -0000 Author: ru Date: Fri Jan 9 16:24:10 2009 New Revision: 186957 URL: http://svn.freebsd.org/changeset/base/186957 Log: Sort MLINKS. Modified: head/lib/libc/string/Makefile.inc Changes in other areas also in this revision: Modified: stable/7/lib/libc/string/Makefile.inc Modified: head/lib/libc/string/Makefile.inc ============================================================================== --- head/lib/libc/string/Makefile.inc Fri Jan 9 16:22:32 2009 (r186956) +++ head/lib/libc/string/Makefile.inc Fri Jan 9 16:24:10 2009 (r186957) @@ -35,34 +35,45 @@ MAN+= bcmp.3 bcopy.3 bstring.3 bzero.3 f strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 wcscoll.3 wcstok.3 \ wcswidth.3 wcsxfrm.3 wmemchr.3 -MLINKS+=ffs.3 ffsl.3 -MLINKS+=ffs.3 fls.3 -MLINKS+=ffs.3 flsl.3 -MLINKS+=ffs.3 ffsll.3 -MLINKS+=ffs.3 flsll.3 +MLINKS+=ffs.3 ffsl.3 \ + ffs.3 ffsll.3 \ + ffs.3 fls.3 \ + ffs.3 flsl.3 \ + ffs.3 flsll.3 MLINKS+=index.3 rindex.3 MLINKS+=memchr.3 memrchr.3 MLINKS+=strcasecmp.3 strncasecmp.3 MLINKS+=strcat.3 strncat.3 MLINKS+=strchr.3 strrchr.3 MLINKS+=strcmp.3 strncmp.3 -MLINKS+=strcpy.3 stpcpy.3 +MLINKS+=strcpy.3 stpcpy.3 \ + strcpy.3 strncpy.3 MLINKS+=strdup.3 strndup.3 -MLINKS+=strcpy.3 strncpy.3 -MLINKS+=strerror.3 perror.3 strerror.3 sys_errlist.3 strerror.3 sys_nerr.3 -MLINKS+=strerror.3 strerror_r.3 +MLINKS+=strerror.3 perror.3 \ + strerror.3 strerror_r.3 \ + strerror.3 sys_errlist.3 \ + strerror.3 sys_nerr.3 MLINKS+=strlcpy.3 strlcat.3 +MLINKS+=strstr.3 strcasestr.3 \ + strstr.3 strnstr.3 MLINKS+=strtok.3 strtok_r.3 -MLINKS+=strstr.3 strcasestr.3 -MLINKS+=strstr.3 strnstr.3 -MLINKS+=wmemchr.3 wmemcmp.3 wmemchr.3 wmemcpy.3 \ - wmemchr.3 wmemmove.3 wmemchr.3 wmemset.3 \ - wmemchr.3 wcscat.3 wmemchr.3 wcschr.3 \ - wmemchr.3 wcscmp.3 wmemchr.3 wcscpy.3 \ - wmemchr.3 wcscspn.3 wmemchr.3 wcsdup.3 \ +MLINKS+=wmemchr.3 wcscat.3 \ + wmemchr.3 wcschr.3 \ + wmemchr.3 wcscmp.3 \ + wmemchr.3 wcscpy.3 \ + wmemchr.3 wcscspn.3 \ + wmemchr.3 wcsdup.3 \ wmemchr.3 wcslcat.3 \ - wmemchr.3 wcslcpy.3 wmemchr.3 wcslen.3 \ - wmemchr.3 wcsncat.3 wmemchr.3 wcsncmp.3 \ - wmemchr.3 wcsncpy.3 wmemchr.3 wcspbrk.3 \ - wmemchr.3 wcsrchr.3 wmemchr.3 wcsspn.3 \ - wmemchr.3 wcsstr.3 + wmemchr.3 wcslcpy.3 \ + wmemchr.3 wcslen.3 \ + wmemchr.3 wcsncat.3 \ + wmemchr.3 wcsncmp.3 \ + wmemchr.3 wcsncpy.3 \ + wmemchr.3 wcspbrk.3 \ + wmemchr.3 wcsrchr.3 \ + wmemchr.3 wcsspn.3 \ + wmemchr.3 wcsstr.3 \ + wmemchr.3 wmemcmp.3 \ + wmemchr.3 wmemcpy.3 \ + wmemchr.3 wmemmove.3 \ + wmemchr.3 wmemset.3 From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 16:25:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 489781065734; Fri, 9 Jan 2009 16:25:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 594F28FC24; Fri, 9 Jan 2009 16:25:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id BD88941C64C; Fri, 9 Jan 2009 17:25:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id 7kZgFqBh10br; Fri, 9 Jan 2009 17:25:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 6B73341C670; Fri, 9 Jan 2009 17:25:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id CC3E34448DD; Fri, 9 Jan 2009 16:24:11 +0000 (UTC) Date: Fri, 9 Jan 2009 16:24:11 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <200901091622.n09GMWFp061580@svn.freebsd.org> Message-ID: <20090109162328.W45399@maildrop.int.zabbadoz.net> References: <200901091622.n09GMWFp061580@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r186956 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:25:10 -0000 On Fri, 9 Jan 2009, Bjoern A. Zeeb wrote: > Author: bz > Date: Fri Jan 9 16:22:32 2009 > New Revision: 186956 > URL: http://svn.freebsd.org/changeset/base/186956 > > Log: > Take the cred from curthread rather than curproc as curproc would need > locking but the credential from curthread (usually) never changes. While there declare the static function static there as well. > Discussed with: jhb > MFC after: 2 weeks > > Modified: > head/sys/net/rtsock.c > > Modified: head/sys/net/rtsock.c > ============================================================================== > --- head/sys/net/rtsock.c Fri Jan 9 16:02:19 2009 (r186955) > +++ head/sys/net/rtsock.c Fri Jan 9 16:22:32 2009 (r186956) > @@ -1344,7 +1344,7 @@ done: > return (error); > } > > -int > +static int > sysctl_ifmalist(int af, struct walkarg *w) > { > INIT_VNET_NET(curvnet); > @@ -1365,8 +1365,8 @@ sysctl_ifmalist(int af, struct walkarg * > TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { > if (af && af != ifma->ifma_addr->sa_family) > continue; > - if (jailed(curproc->p_ucred) && > - !prison_if(curproc->p_ucred, ifma->ifma_addr)) > + if (jailed(curthread->td_ucred) && > + !prison_if(curthread->td_ucred, ifma->ifma_addr)) > continue; > info.rti_info[RTAX_IFA] = ifma->ifma_addr; > info.rti_info[RTAX_GATEWAY] = > -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 17:02:13 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 524291065670 for ; Fri, 9 Jan 2009 17:02:13 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id D71658FC0A for ; Fri, 9 Jan 2009 17:02:12 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-067-249-182.pools.arcor-ip.net [88.67.249.182]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1LLKkN1etE-0000MY; Fri, 09 Jan 2009 18:02:11 +0100 Received: (qmail 28558 invoked from network); 9 Jan 2009 17:02:11 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by mx.laiers.local with SMTP; 9 Jan 2009 17:02:11 -0000 From: Max Laier Organization: FreeBSD To: Adrian Chadd Date: Fri, 9 Jan 2009 18:02:09 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <200901091602.n09G2Jj1061164@svn.freebsd.org> In-Reply-To: <200901091602.n09G2Jj1061164@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901091802.10287.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19YzXSsdidjXJrFuhkImU9nGiINzrYsEhslIII aD37XKreo0VCauq5Au2f1hj9agRLbNKmkORXolX6PXhu92lKYE iv8GCwMEveQluTGMt4VRQ== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:02:13 -0000 On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: > Author: adrian > Date: Fri Jan 9 16:02:19 2009 > New Revision: 186955 > URL: http://svn.freebsd.org/changeset/base/186955 > > Log: > Implement a new IP option (not compiled/enabled by default) to allow > applications to specify a non-local IP address when bind()'ing a socket > to a local endpoint. That's a *socket* option ... you had me very worried there for a moment ;) I don't quite see why you'd hide these under a build time option - having the sysctl defaulting to off under CTLFLAG_SECURE seems good enough - if people disagree - make it a boot time tuneable, but I certainly don't see why you should have to rebuild the kernel for a minor thing like this. It certainly isn't performance critical. Some nit picking below ... > Modified: head/sys/netinet/in_pcb.c > @@ -346,7 +347,11 @@ in_pcbbind_setup(struct inpcb *inp, stru > } else if (sin->sin_addr.s_addr != INADDR_ANY) { > sin->sin_port = 0; /* yech... */ > bzero(&sin->sin_zero, sizeof(sin->sin_zero)); > - if (ifa_ifwithaddr((struct sockaddr *)sin) == 0) > + if ( > +#if defined(IP_NONLOCALBIND) > + ((inp->inp_flags & INP_NONLOCALOK) == 0) && > +#endif > + (ifa_ifwithaddr((struct sockaddr *)sin) == 0)) > return (EADDRNOTAVAIL); > } > laddr = sin->sin_addr; This logic is really hard to get a first glance. Esp. the not NON...OK part. Maybe a comment is called for here - or is this just me being confused? > Modified: head/sys/netinet/ip_output.c > @@ -866,6 +873,13 @@ ip_ctloutput(struct socket *so, struct s > return (error); > } > > +#if defined(IP_NONLOCALBIND) > + case IP_NONLOCALOK: > + if (! ip_nonlocalok) { > + error = ENOPROTOOPT; > + break; > + } > +#endif Indentation is off here. And you should add a /* FALLTHROUGH */ comment to make it clear that this is intended. > case IP_TOS: > case IP_TTL: > case IP_MINTTL: -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 17:16:19 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFCDE106566C; Fri, 9 Jan 2009 17:16:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBE528FC17; Fri, 9 Jan 2009 17:16:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09HGIXq062769; Fri, 9 Jan 2009 17:16:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09HGIYN062768; Fri, 9 Jan 2009 17:16:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200901091716.n09HGIYN062768@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Jan 2009 17:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186959 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:16:21 -0000 Author: adrian Date: Fri Jan 9 17:16:18 2009 New Revision: 186959 URL: http://svn.freebsd.org/changeset/base/186959 Log: Comment some potentially confusing logic. Nitpicking by: mlaier MFC after: 2 weeks Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Jan 9 16:37:29 2009 (r186958) +++ head/sys/netinet/in_pcb.c Fri Jan 9 17:16:18 2009 (r186959) @@ -347,6 +347,11 @@ in_pcbbind_setup(struct inpcb *inp, stru } else if (sin->sin_addr.s_addr != INADDR_ANY) { sin->sin_port = 0; /* yech... */ bzero(&sin->sin_zero, sizeof(sin->sin_zero)); + /* + * Is the address a local IP address? + * If INP_NONLOCALOK is set, then the socket may be bound + * to any local endpoint address. + */ if ( #if defined(IP_NONLOCALBIND) ((inp->inp_flags & INP_NONLOCALOK) == 0) && From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 17:18:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CA97106566C; Fri, 9 Jan 2009 17:18:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BBE28FC16; Fri, 9 Jan 2009 17:18:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09HIHV4062852; Fri, 9 Jan 2009 17:18:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09HIHqM062851; Fri, 9 Jan 2009 17:18:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200901091718.n09HIHqM062851@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Jan 2009 17:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186960 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:18:18 -0000 Author: adrian Date: Fri Jan 9 17:18:17 2009 New Revision: 186960 URL: http://svn.freebsd.org/changeset/base/186960 Log: Better comment what the socket option does. Thanks to Sam Leffler for suggesting this. Modified: head/sys/netinet/in.h Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Fri Jan 9 17:16:18 2009 (r186959) +++ head/sys/netinet/in.h Fri Jan 9 17:18:17 2009 (r186960) @@ -441,7 +441,8 @@ __END_DECLS #define IP_FAITH 22 /* bool; accept FAITH'ed connections */ #define IP_ONESBCAST 23 /* bool: send all-ones broadcast */ -#define IP_NONLOCALOK 24 /* allow bind to spoof other machines */ +#define IP_NONLOCALOK 24 /* bool: allow bind to spoof non-local addresses; + requires kernel compile option IP_NONLOCALBIND */ #define IP_FW_TABLE_ADD 40 /* add entry */ #define IP_FW_TABLE_DEL 41 /* delete entry */ From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 17:21:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D87210656C1; Fri, 9 Jan 2009 17:21:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C2BF8FC0A; Fri, 9 Jan 2009 17:21:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09HLMPX062962; Fri, 9 Jan 2009 17:21:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09HLMYP062961; Fri, 9 Jan 2009 17:21:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200901091721.n09HLMYP062961@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Jan 2009 17:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186961 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:21:23 -0000 Author: adrian Date: Fri Jan 9 17:21:22 2009 New Revision: 186961 URL: http://svn.freebsd.org/changeset/base/186961 Log: Fix indentation; add FALLTHROUGH. Thanks Max! Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Jan 9 17:18:17 2009 (r186960) +++ head/sys/netinet/ip_output.c Fri Jan 9 17:21:22 2009 (r186961) @@ -876,9 +876,10 @@ ip_ctloutput(struct socket *so, struct s #if defined(IP_NONLOCALBIND) case IP_NONLOCALOK: if (! ip_nonlocalok) { - error = ENOPROTOOPT; - break; - } + error = ENOPROTOOPT; + break; + } + /* FALLTHROUGH */ #endif case IP_TOS: case IP_TTL: From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 17:56:53 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0173106566B; Fri, 9 Jan 2009 17:56:53 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 93B8E8FC12; Fri, 9 Jan 2009 17:56:53 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 09:47:27 -0800 Message-ID: <49678DAE.5000903@elischer.org> Date: Fri, 09 Jan 2009 09:47:26 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Adrian Chadd References: <200901091716.n09HGIYN062768@svn.freebsd.org> In-Reply-To: <200901091716.n09HGIYN062768@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186959 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:56:54 -0000 Adrian Chadd wrote: > Author: adrian > Date: Fri Jan 9 17:16:18 2009 > New Revision: 186959 > URL: http://svn.freebsd.org/changeset/base/186959 > > Log: > Comment some potentially confusing logic. > > Nitpicking by: mlaier > > MFC after: 2 weeks > > Modified: > head/sys/netinet/in_pcb.c > > Modified: head/sys/netinet/in_pcb.c > ============================================================================== > --- head/sys/netinet/in_pcb.c Fri Jan 9 16:37:29 2009 (r186958) > +++ head/sys/netinet/in_pcb.c Fri Jan 9 17:16:18 2009 (r186959) > @@ -347,6 +347,11 @@ in_pcbbind_setup(struct inpcb *inp, stru > } else if (sin->sin_addr.s_addr != INADDR_ANY) { > sin->sin_port = 0; /* yech... */ > bzero(&sin->sin_zero, sizeof(sin->sin_zero)); > + /* > + * Is the address a local IP address? > + * If INP_NONLOCALOK is set, then the socket may be bound > + * to any local endpoint address. ^ NON or "any address, local or not" > + */ > if ( > #if defined(IP_NONLOCALBIND) > ((inp->inp_flags & INP_NONLOCALOK) == 0) && From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 18:09:02 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7CE110657B2 for ; Fri, 9 Jan 2009 18:09:02 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.9]) by mx1.freebsd.org (Postfix) with ESMTP id 77BA18FC13 for ; Fri, 9 Jan 2009 18:09:02 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-053-050.pools.arcor-ip.net [88.66.53.50]) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis) id 0MKxQS-1LLLn31HEN-0005z3; Fri, 09 Jan 2009 19:09:01 +0100 Received: (qmail 29354 invoked from network); 9 Jan 2009 18:09:00 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by laiers.local with SMTP; 9 Jan 2009 18:09:00 -0000 From: Max Laier Organization: FreeBSD To: Julian Elischer Date: Fri, 9 Jan 2009 19:08:59 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> <49678D5E.3030600@elischer.org> In-Reply-To: <49678D5E.3030600@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901091909.00457.max@love2party.net> X-Provags-ID: V01U2FsdGVkX18WEbIoGNVgWDDk0VkPc1TWMwUe+W09Qo5BI2L S/ZbQuVWGwkWN8guLs+7OvyQSq2fXci7v63RtyOPPgJTqk/5MW azHhlnuNMKfYOQn9aDZKA== Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:09:03 -0000 On Friday 09 January 2009 18:46:06 Julian Elischer wrote: > Max Laier wrote: > > On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: > >> Author: adrian > >> Date: Fri Jan 9 16:02:19 2009 > >> New Revision: 186955 > >> URL: http://svn.freebsd.org/changeset/base/186955 > >> > >> Log: > >> Implement a new IP option (not compiled/enabled by default) to allow > >> applications to specify a non-local IP address when bind()'ing a > >> socket to a local endpoint. > > > > That's a *socket* option ... you had me very worried there for a moment > > ;) I don't quite see why you'd hide these under a build time option - > > having the sysctl defaulting to off under CTLFLAG_SECURE seems good > > enough - if people disagree - make it a boot time tuneable, but I > > certainly don't see why you should have to rebuild the kernel for a minor > > thing like this. It certainly isn't performance critical. > > because it can be a big security hole and you do not want people to > have it available on the average machine. > Also because purists complained about it. > You'll notice that the compile option enables the sysctl, > which is used to turn on and off the capacity to do this per socket. > so the admin can disable it, but I felt a lot more comfortable having > it not compiled in by default. Speaking of disabling it ... setting the sysctl to 0 is not really enough to do that. One would also have to walk through the active sockets and GC any that are bound to nonlocal addresses to really disable it ... or do we rely on tcpdrop or the like to do that manually? Of course it would make sense to have something like this: start tproxy, bind forwarding ports, disable sysctl, raise securelevel In addition, should there be a priv(9) check in ip_ctloutput? -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 18:14:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14D941065674; Fri, 9 Jan 2009 18:14:25 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id DB1148FC0C; Fri, 9 Jan 2009 18:14:24 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 09:46:08 -0800 Message-ID: <49678D5E.3030600@elischer.org> Date: Fri, 09 Jan 2009 09:46:06 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Max Laier References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> In-Reply-To: <200901091802.10287.max@love2party.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:14:25 -0000 Max Laier wrote: > On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: >> Author: adrian >> Date: Fri Jan 9 16:02:19 2009 >> New Revision: 186955 >> URL: http://svn.freebsd.org/changeset/base/186955 >> >> Log: >> Implement a new IP option (not compiled/enabled by default) to allow >> applications to specify a non-local IP address when bind()'ing a socket >> to a local endpoint. > > That's a *socket* option ... you had me very worried there for a moment ;) I > don't quite see why you'd hide these under a build time option - having the > sysctl defaulting to off under CTLFLAG_SECURE seems good enough - if people > disagree - make it a boot time tuneable, but I certainly don't see why you > should have to rebuild the kernel for a minor thing like this. It certainly > isn't performance critical. because it can be a big security hole and you do not want people to have it available on the average machine. Also because purists complained about it. You'll notice that the compile option enables the sysctl, which is used to turn on and off the capacity to do this per socket. so the admin can disable it, but I felt a lot more comfortable having it not compiled in by default. > > Some nit picking below ... > >> Modified: head/sys/netinet/in_pcb.c >> @@ -346,7 +347,11 @@ in_pcbbind_setup(struct inpcb *inp, stru >> } else if (sin->sin_addr.s_addr != INADDR_ANY) { >> sin->sin_port = 0; /* yech... */ >> bzero(&sin->sin_zero, sizeof(sin->sin_zero)); >> - if (ifa_ifwithaddr((struct sockaddr *)sin) == 0) >> + if ( >> +#if defined(IP_NONLOCALBIND) >> + ((inp->inp_flags & INP_NONLOCALOK) == 0) && >> +#endif >> + (ifa_ifwithaddr((struct sockaddr *)sin) == 0)) >> return (EADDRNOTAVAIL); >> } >> laddr = sin->sin_addr; > > This logic is really hard to get a first glance. Esp. the not NON...OK part. > Maybe a comment is called for here - or is this just me being confused? I think it's just you :-) "NONLOCAL" is one word > >> Modified: head/sys/netinet/ip_output.c >> @@ -866,6 +873,13 @@ ip_ctloutput(struct socket *so, struct s >> return (error); >> } >> >> +#if defined(IP_NONLOCALBIND) >> + case IP_NONLOCALOK: >> + if (! ip_nonlocalok) { >> + error = ENOPROTOOPT; >> + break; >> + } >> +#endif > From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 18:28:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C15EF106564A; Fri, 9 Jan 2009 18:28:08 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 9D8E98FC13; Fri, 9 Jan 2009 18:28:08 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 10:28:08 -0800 Message-ID: <49679737.60709@elischer.org> Date: Fri, 09 Jan 2009 10:28:07 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Max Laier References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> <49678D5E.3030600@elischer.org> <200901091909.00457.max@love2party.net> In-Reply-To: <200901091909.00457.max@love2party.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:28:09 -0000 Max Laier wrote: > On Friday 09 January 2009 18:46:06 Julian Elischer wrote: >> Max Laier wrote: >>> On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: >>>> Author: adrian >>>> Date: Fri Jan 9 16:02:19 2009 >>>> New Revision: 186955 >>>> URL: http://svn.freebsd.org/changeset/base/186955 >>>> >>>> Log: >>>> Implement a new IP option (not compiled/enabled by default) to allow >>>> applications to specify a non-local IP address when bind()'ing a >>>> socket to a local endpoint. >>> That's a *socket* option ... you had me very worried there for a moment >>> ;) I don't quite see why you'd hide these under a build time option - >>> having the sysctl defaulting to off under CTLFLAG_SECURE seems good >>> enough - if people disagree - make it a boot time tuneable, but I >>> certainly don't see why you should have to rebuild the kernel for a minor >>> thing like this. It certainly isn't performance critical. >> because it can be a big security hole and you do not want people to >> have it available on the average machine. >> Also because purists complained about it. >> You'll notice that the compile option enables the sysctl, >> which is used to turn on and off the capacity to do this per socket. >> so the admin can disable it, but I felt a lot more comfortable having >> it not compiled in by default. > > Speaking of disabling it ... setting the sysctl to 0 is not really enough to > do that. One would also have to walk through the active sockets and GC any > that are bound to nonlocal addresses to really disable it ... or do we rely on > tcpdrop or the like to do that manually? Of course it would make sense to > have something like this: start tproxy, bind forwarding ports, disable > sysctl, raise securelevel exactly, we disable NEW connections. It's not done with securelevel but possibly because I didn't think of it.. I'm not worried about existing connections... > > In addition, should there be a priv(9) check in ip_ctloutput? I was thinking about that.. possibly. (in fact probably) > From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 18:38:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 644581065690; Fri, 9 Jan 2009 18:38:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52E598FC17; Fri, 9 Jan 2009 18:38:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Icv4B065200; Fri, 9 Jan 2009 18:38:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Icv7m065199; Fri, 9 Jan 2009 18:38:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200901091838.n09Icv7m065199@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Jan 2009 18:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186963 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:38:58 -0000 Author: adrian Date: Fri Jan 9 18:38:57 2009 New Revision: 186963 URL: http://svn.freebsd.org/changeset/base/186963 Log: Fix fat-fingered comment. Noticed-by: julian Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Jan 9 18:08:50 2009 (r186962) +++ head/sys/netinet/in_pcb.c Fri Jan 9 18:38:57 2009 (r186963) @@ -350,7 +350,7 @@ in_pcbbind_setup(struct inpcb *inp, stru /* * Is the address a local IP address? * If INP_NONLOCALOK is set, then the socket may be bound - * to any local endpoint address. + * to any endpoint address, local or not. */ if ( #if defined(IP_NONLOCALBIND) From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 18:52:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29276106567C for ; Fri, 9 Jan 2009 18:52:05 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id CCE7A8FC17 for ; Fri, 9 Jan 2009 18:52:04 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5605874qwb.7 for ; Fri, 09 Jan 2009 10:52:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=jD83dOw5TM9WZXBvLcAX3OSVZhFNCqQ/7YZG5kyEABc=; b=QYmv4YZrU4zIYKxbdarAQ6b/NYjcPZEq8vWYhHWCgnhdL9MaXY6fgqmYZ4iywBp836 mx7ARO+iTf1vjvRy5A0157lU8UNjY3gCT3WSeqbsasM9ML+x6oXR3+Z9wfxak1vnNbGy eku8D/Yv5X3kpY87Jp7+v9++QAN0zKWG5YCf0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=l6dhf9R43M16wxB5JxnYRLiCeF4Rhq/yXOcWqyXn2SsXtJbQqs7kqYb+lXH6Q2FQHl db74xMuD7rjLFW/B2bB9NVemZyeysddFDS7UXoUJmjbnqVXE8HdswZUTNmIJj9ooWX3F Nk56D32ZzD8agKY9CZK3/ZNE4LdzPgfzfNGcg= Received: by 10.214.114.8 with SMTP id m8mr23148363qac.294.1231525751521; Fri, 09 Jan 2009 10:29:11 -0800 (PST) Received: by 10.214.81.13 with HTTP; Fri, 9 Jan 2009 10:29:11 -0800 (PST) Message-ID: Date: Fri, 9 Jan 2009 13:29:11 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Max Laier" In-Reply-To: <200901091909.00457.max@love2party.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> <49678D5E.3030600@elischer.org> <200901091909.00457.max@love2party.net> X-Google-Sender-Auth: e69b9ba7a8b5fe1b Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:52:06 -0000 2009/1/9 Max Laier : > Speaking of disabling it ... setting the sysctl to 0 is not really enough to > do that. One would also have to walk through the active sockets and GC any > that are bound to nonlocal addresses to really disable it ... or do we rely on > tcpdrop or the like to do that manually? Of course it would make sense to > have something like this: start tproxy, bind forwarding ports, disable > sysctl, raise securelevel > > In addition, should there be a priv(9) check in ip_ctloutput? For which priv? Surely you don't really want people running services as root? :) gnn and I talked about this a bit on IRC, and I was waiting for rwatson to come online before posting a followup. Linux's implementation of this stuff uses the CAP_NET_ADMIN capability to define whether a process can do this or not. So users would start Squid as root, Squid would acquire CAP_NET_ADMIN, drop root, and then use it whenever required. Also, this is an option set on bind() on an outbound socket, not a listen() socket. You'd bind() to the client IP you're pretending to be, then connect() to the server destination. You can't raise securelevel/disable sysctl in the way you described. Adrian From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 19:02:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AF4810657C6; Fri, 9 Jan 2009 19:02:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1365B8FC1B; Fri, 9 Jan 2009 19:02:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 9FBCE46B32; Fri, 9 Jan 2009 14:02:34 -0500 (EST) Date: Fri, 9 Jan 2009 19:02:34 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Julian Elischer In-Reply-To: <49678D5E.3030600@elischer.org> Message-ID: References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> <49678D5E.3030600@elischer.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Max Laier , Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 19:02:35 -0000 On Fri, 9 Jan 2009, Julian Elischer wrote: > Max Laier wrote: >> On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: >>> Author: adrian Date: Fri Jan 9 16:02:19 2009 New Revision: 186955 URL: >>> http://svn.freebsd.org/changeset/base/186955 >>> >>> Log: >>> Implement a new IP option (not compiled/enabled by default) to allow >>> applications to specify a non-local IP address when bind()'ing a socket >>> to a local endpoint. >> >> That's a *socket* option ... you had me very worried there for a moment ;) >> I don't quite see why you'd hide these under a build time option - having >> the sysctl defaulting to off under CTLFLAG_SECURE seems good enough - if >> people disagree - make it a boot time tuneable, but I certainly don't see >> why you should have to rebuild the kernel for a minor thing like this. It >> certainly isn't performance critical. > > because it can be a big security hole and you do not want people to have it > available on the average machine. Also because purists complained about it. > You'll notice that the compile option enables the sysctl, which is used to > turn on and off the capacity to do this per socket. so the admin can disable > it, but I felt a lot more comfortable having it not compiled in by default. At the risk of turning something simply that has for unknown reasons taken a half dozen commits to get right into something that takes a half dozen plus one: the security stuff in this commit is really weird. I'd prefer this socket option: (1) Not be a kernel option, since the last thing we need is yet more conditionally compiled edge cases (2) Require privilege by default, ideally a new privilege (3) If it's desirable to make it easily accessible without privilege on some systems, add a sysctl that controls whether privilege is required. This would make it available in GENERIC, default to requiring root, but allow that to be tweaked easily in the same way we require privilege to bind low port numbers by default, but using sysctls can tune the policy to something useful in more specific environments. There's been talk of adding a fine-grained privilege model to FreeBSD 8.0 so that specific privileges could be granted in a more general way, but that hasn't happened yet. It's also possible to do that already using a custom MAC policy since MAC policy modules can tune the privilege model to add and remove privileges for processes in a granular way. But only if this operation is assigned a specific privilege. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 19:08:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2FA510656D0 for ; Fri, 9 Jan 2009 19:08:08 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by mx1.freebsd.org (Postfix) with ESMTP id 81E158FC21 for ; Fri, 9 Jan 2009 19:08:08 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-053-050.pools.arcor-ip.net [88.66.53.50]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1LLMiF0yqV-000684; Fri, 09 Jan 2009 20:08:07 +0100 Received: (qmail 30180 invoked from network); 9 Jan 2009 19:08:06 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by mx.laiers.local with SMTP; 9 Jan 2009 19:08:06 -0000 From: Max Laier Organization: FreeBSD To: "Adrian Chadd" Date: Fri, 9 Jan 2009 20:08:05 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091909.00457.max@love2party.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901092008.06049.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19UjRukYTMk8JsNwqIJ77efSldNfEI4IGK/opD uJDDWIdbxqjQR8cJSrwQOfImj9WG7UpU+GMn8IM4CW7L1xdV38 R+FZgBXJbjarucFaFttww== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 19:08:09 -0000 On Friday 09 January 2009 19:29:11 Adrian Chadd wrote: > 2009/1/9 Max Laier : > > Speaking of disabling it ... setting the sysctl to 0 is not really enough > > to do that. One would also have to walk through the active sockets and > > GC any that are bound to nonlocal addresses to really disable it ... or > > do we rely on tcpdrop or the like to do that manually? Of course it > > would make sense to have something like this: start tproxy, bind > > forwarding ports, disable sysctl, raise securelevel > > > > In addition, should there be a priv(9) check in ip_ctloutput? > > For which priv? Surely you don't really want people running services as > root? :) You don't want your normal user to be able to bind to foreign addresses either. If you need to create sockets over and over again you use privilege separation as done in OpenBSD. > gnn and I talked about this a bit on IRC, and I was waiting for > rwatson to come online before posting a followup. Linux's > implementation of this stuff uses the CAP_NET_ADMIN capability to > define whether a process can do this or not. So users would start > Squid as root, Squid would acquire CAP_NET_ADMIN, drop root, and then > use it whenever required. > > Also, this is an option set on bind() on an outbound socket, not a > listen() socket. You'd bind() to the client IP you're pretending to > be, then connect() to the server destination. You can't raise > securelevel/disable sysctl in the way you described. I see ... though there is no restriction in your code yet that would prevent one from using it on a listen() socket. Can you hold off on further commits until we reach a consensus about how this should be done? This is getting a bit messy for my taste. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 19:11:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C10C0106566B; Fri, 9 Jan 2009 19:11:01 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 972298FC0A; Fri, 9 Jan 2009 19:11:01 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 11:11:00 -0800 Message-ID: <4967A144.7070703@elischer.org> Date: Fri, 09 Jan 2009 11:11:00 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Robert Watson References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> <49678D5E.3030600@elischer.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Max Laier , Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 19:11:02 -0000 Robert Watson wrote: > On Fri, 9 Jan 2009, Julian Elischer wrote: > >> Max Laier wrote: >>> On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: >>>> Author: adrian Date: Fri Jan 9 16:02:19 2009 New Revision: 186955 >>>> URL: http://svn.freebsd.org/changeset/base/186955 >>>> >>>> Log: >>>> Implement a new IP option (not compiled/enabled by default) to allow >>>> applications to specify a non-local IP address when bind()'ing a >>>> socket >>>> to a local endpoint. >>> >>> That's a *socket* option ... you had me very worried there for a >>> moment ;) I don't quite see why you'd hide these under a build time >>> option - having the sysctl defaulting to off under CTLFLAG_SECURE >>> seems good enough - if people disagree - make it a boot time >>> tuneable, but I certainly don't see why you should have to rebuild >>> the kernel for a minor thing like this. It certainly isn't >>> performance critical. >> >> because it can be a big security hole and you do not want people to >> have it available on the average machine. Also because purists >> complained about it. You'll notice that the compile option enables the >> sysctl, which is used to turn on and off the capacity to do this per >> socket. so the admin can disable it, but I felt a lot more comfortable >> having it not compiled in by default. > > At the risk of turning something simply that has for unknown reasons > taken a half dozen commits to get right into something that takes a half > dozen plus one: the security stuff in this commit is really weird. I'd > prefer this socket option: > > (1) Not be a kernel option, since the last thing we need is yet more > conditionally compiled edge cases it's been my experience that things that upset old hands and purists should be options until they get used to it.. also it does add some code.. not much but bloat is bloat. > > (2) Require privilege by default, ideally a new privilege Actually I agree... ther are actually two places privs could be applied. on the sysctl (then anyone can do the socket option, but the machine is an acknowledged proxy host). on the socket option (then only root can start a proxy which may not be what is wanted). in the ironport code the whole thing is just a #if 0 > > (3) If it's desirable to make it easily accessible without privilege on > some > systems, add a sysctl that controls whether privilege is required. > > This would make it available in GENERIC, default to requiring root, but > allow that to be tweaked easily in the same way we require privilege to > bind low port numbers by default, but using sysctls can tune the policy > to something useful in more specific environments. > > There's been talk of adding a fine-grained privilege model to FreeBSD > 8.0 so that specific privileges could be granted in a more general way, > but that hasn't happened yet. It's also possible to do that already > using a custom MAC policy since MAC policy modules can tune the > privilege model to add and remove privileges for processes in a granular > way. But only if this operation is assigned a specific privilege. > > Robert N M Watson > Computer Laboratory > University of Cambridge From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 19:42:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30CE8106566C; Fri, 9 Jan 2009 19:42:56 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id B81108FC0A; Fri, 9 Jan 2009 19:42:54 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from [172.16.129.134] (fw.axelero.hu [195.228.243.120]) by people.fsn.hu (Postfix) with ESMTP id 8D82FA79D6; Fri, 9 Jan 2009 20:26:57 +0100 (CET) Message-ID: <4967A500.30205@fsn.hu> Date: Fri, 09 Jan 2009 20:26:56 +0100 From: Attila Nagy User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> In-Reply-To: <200901091602.n09G2Jj1061164@svn.freebsd.org> X-Stationery: 0.4.8.12 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (people.fsn.hu [0.0.0.0]); Fri, 09 Jan 2009 20:26:57 +0100 (CET) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 19:42:56 -0000 Hello, Adrian Chadd wrote: > Author: adrian > Date: Fri Jan 9 16:02:19 2009 > New Revision: 186955 > URL: http://svn.freebsd.org/changeset/base/186955 > > Log: > Implement a new IP option (not compiled/enabled by default) to allow > applications to specify a non-local IP address when bind()'ing a socket > to a local endpoint. > > This allows applications to spoof the client IP address of connections > if (obviously!) they somehow are able to receive the traffic normally > destined to said clients. > > This patch doesn't include any changes to ipfw or the bridging code to > redirect the client traffic through the PCB checks so TCP gets a shot > at it. The normal behaviour is that packets with a non-local destination > IP address are not handled locally. This can be dealth with some IPFW hackery; > modifications to IPFW to make this less hacky will occur in subsequent > commmits. > > Thanks to Julian Elischer and others at Ironport. This work was approved > and donated before Cisco acquired them. > > Obtained from: Julian Elischer and others > MFC after: 2 weeks > Wouldn't it be better to implement existing interfaces for that? OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 19:49:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F22AA1065673; Fri, 9 Jan 2009 19:49:33 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E02008FC17; Fri, 9 Jan 2009 19:49:33 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09JnW9a066582; Fri, 9 Jan 2009 19:49:32 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09JnWA6066581; Fri, 9 Jan 2009 19:49:32 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901091949.n09JnWA6066581@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 Jan 2009 19:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186965 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 19:49:34 -0000 Author: brueffer Date: Fri Jan 9 19:49:32 2009 New Revision: 186965 URL: http://svn.freebsd.org/changeset/base/186965 Log: Recognize et(4), igb(4), iwn(4), ixgbe(4) and nxge(4) devices. Correct some minor whitespace in the ae(4) entry. Reported by: Mars G Miro Approved by: rwatson (mentor) MFC after: 1 week Modified: head/usr.sbin/sysinstall/devices.c Modified: head/usr.sbin/sysinstall/devices.c ============================================================================== --- head/usr.sbin/sysinstall/devices.c Fri Jan 9 19:45:06 2009 (r186964) +++ head/usr.sbin/sysinstall/devices.c Fri Jan 9 19:49:32 2009 (r186965) @@ -89,7 +89,7 @@ static struct _devname { DISK("mfid%d", "LSI MegaRAID SAS array", 4), FLOPPY("fd%d", "floppy drive unit A", 4), SERIAL("cuad%d", "%s on device %s (COM%d)", 16), - NETWORK("ae", "Attansic/Atheros L2 FastEthernet"), + NETWORK("ae", "Attansic/Atheros L2 Fast Ethernet"), NETWORK("age", "Attansic/Atheros L1 Gigabit Ethernet"), NETWORK("ale", "Atheros AR8121/AR8113/AR8114 PCIe Ethernet"), NETWORK("an", "Aironet 4500/4800 802.11 wireless adapter"), @@ -111,14 +111,18 @@ static struct _devname { NETWORK("ed", "Novell NE1000/2000; 3C503; NE2000-compatible PCMCIA"), NETWORK("ep", "3Com 3C509 Ethernet card/3C589 PCMCIA"), NETWORK("em", "Intel(R) PRO/1000 Ethernet card"), + NETWORK("et", "Agere ET1310 based PCI Express Gigabit Ethernet card"), NETWORK("ex", "Intel EtherExpress Pro/10 Ethernet card"), NETWORK("fe", "Fujitsu MB86960A/MB86965A Ethernet card"), NETWORK("gem", "Apple GMAC or Sun ERI/GEM Ethernet adapter"), NETWORK("hme", "Sun HME (Happy Meal Ethernet) Ethernet adapter"), NETWORK("ie", "AT&T StarLAN 10 and EN100; 3Com 3C507; NI5210"), + NETWORK("igb", "Intel(R) PRO/1000 PCI Express Gigabit Ethernet card"), NETWORK("ipw", "Intel PRO/Wireless 2100 IEEE 802.11 adapter"), NETWORK("iwi", "Intel PRO/Wireless 2200BG/2225BG/2915ABG adapter"), + NETWORK("iwn", "Intel Wireless WiFi Link 4965AGN IEEE 802.11n adapter"), NETWORK("ixgb", "Intel(R) PRO/10Gb Ethernet card"), + NETWORK("ixgbe", "Intel(R) PRO/10Gb Ethernet card"), NETWORK("jme", "JMicron JMC250 Gigabit/JMC260 Fast Ethernet"), NETWORK("kue", "Kawasaki LSI USB Ethernet adapter"), NETWORK("le", "AMD Am7900 LANCE or Am79C9xx PCnet Ethernet adapter"), @@ -129,6 +133,7 @@ static struct _devname { NETWORK("nfe", "NVIDIA nForce MCP Ethernet"), NETWORK("nge", "NatSemi PCI Gigabit Ethernet card"), NETWORK("nve", "NVIDIA nForce MCP Ethernet"), + NETWORK("nxge", "Neterion Xframe 10GbE Server/Storage adapter"), NETWORK("pcn", "AMD Am79c79x PCI Ethernet card"), NETWORK("ral", "Ralink Technology IEEE 802.11 wireless adapter"), NETWORK("ray", "Raytheon Raylink 802.11 wireless adapter"), From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 20:02:53 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0B451065675; Fri, 9 Jan 2009 20:02:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 3D6508FC16; Fri, 9 Jan 2009 20:02:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5626333qwb.7 for ; Fri, 09 Jan 2009 12:02:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=MGOF4TTUu6TliLz3ddtjwfvMNIcUlWlkqaJwhHoTPs4=; b=BpyrQMowcDu+SMPtCDSiCZVpXWPpAnijLi4IqFbMViqCc+M9EJcA+p6PEcw33CCLSk AUm9hRK6bfoXRu0W/I67+trOFpqjBHCqH/5QzxBK/a3kiY4Q0b4D7fSOD2h56ncgarzx 3+W8vwSH93k8E+wyjXoy2uJJJnRO4t4dw5nFE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=OKuEVpqqvZPlzpmFqp+ipzSMenaSSnL2/68qnPS5LMF1ZY1dDBVoBnireHeT9tTb07 bfeBu4234XeZkoMXKVOBL6SfozKRUHQxTxmx7xMjvH2LTuVYgc82wuFBNpBDr/x2jaF9 96HBTnf3hHdn3pQcdwyUPLnkjzDUIrzUZS0Hs= Received: by 10.214.216.5 with SMTP id o5mr23320027qag.229.1231531372603; Fri, 09 Jan 2009 12:02:52 -0800 (PST) Received: by 10.214.81.13 with HTTP; Fri, 9 Jan 2009 12:02:52 -0800 (PST) Message-ID: Date: Fri, 9 Jan 2009 15:02:52 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Attila Nagy" In-Reply-To: <4967A500.30205@fsn.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> X-Google-Sender-Auth: bf8a3ae4b0dc2c01 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:02:54 -0000 I wasn't even aware of the existance of this interface. I'll check it out. Thing is, this is a socket layer option, rather than what I've committed which is a netinet layer option. Anyway, I'll check it out. I'm happy to fiddle with things if others' would like it. Adrian 2009/1/9 Attila Nagy : > Hello, > > Adrian Chadd wrote: >> >> Author: adrian >> Date: Fri Jan 9 16:02:19 2009 >> New Revision: 186955 >> URL: http://svn.freebsd.org/changeset/base/186955 >> >> Log: >> Implement a new IP option (not compiled/enabled by default) to allow >> applications to specify a non-local IP address when bind()'ing a socket >> to a local endpoint. >> This allows applications to spoof the client IP address of connections >> if (obviously!) they somehow are able to receive the traffic normally >> destined to said clients. >> This patch doesn't include any changes to ipfw or the bridging code to >> redirect the client traffic through the PCB checks so TCP gets a shot >> at it. The normal behaviour is that packets with a non-local destination >> IP address are not handled locally. This can be dealth with some IPFW >> hackery; >> modifications to IPFW to make this less hacky will occur in subsequent >> commmits. >> Thanks to Julian Elischer and others at Ironport. This work was >> approved >> and donated before Cisco acquired them. >> Obtained from: Julian Elischer and others >> MFC after: 2 weeks >> > > Wouldn't it be better to implement existing interfaces for that? > OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: > http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b > > From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 20:43:06 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CECBF10657B7; Fri, 9 Jan 2009 20:43:06 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id AFAB98FC26; Fri, 9 Jan 2009 20:43:06 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 12:43:06 -0800 Message-ID: <4967B6D9.90001@elischer.org> Date: Fri, 09 Jan 2009 12:43:05 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Attila Nagy References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> In-Reply-To: <4967A500.30205@fsn.hu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:43:09 -0000 Attila Nagy wrote: > Hello, > > Adrian Chadd wrote: >> Author: adrian >> Date: Fri Jan 9 16:02:19 2009 >> New Revision: 186955 >> URL: http://svn.freebsd.org/changeset/base/186955 >> >> Log: >> Implement a new IP option (not compiled/enabled by default) to allow >> applications to specify a non-local IP address when bind()'ing a socket >> to a local endpoint. >> This allows applications to spoof the client IP address of >> connections >> if (obviously!) they somehow are able to receive the traffic normally >> destined to said clients. >> This patch doesn't include any changes to ipfw or the bridging >> code to >> redirect the client traffic through the PCB checks so TCP gets a shot >> at it. The normal behaviour is that packets with a non-local >> destination >> IP address are not handled locally. This can be dealth with some >> IPFW hackery; >> modifications to IPFW to make this less hacky will occur in subsequent >> commmits. >> Thanks to Julian Elischer and others at Ironport. This work was >> approved >> and donated before Cisco acquired them. >> Obtained from: Julian Elischer and others >> MFC after: 2 weeks >> > Wouldn't it be better to implement existing interfaces for that? > OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: > http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b good point From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 21:39:45 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0222A106564A; Fri, 9 Jan 2009 21:39:45 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3B0E8FC16; Fri, 9 Jan 2009 21:39:44 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09LdiaR069635; Fri, 9 Jan 2009 21:39:44 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09LdiVA069626; Fri, 9 Jan 2009 21:39:44 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901092139.n09LdiVA069626@svn.freebsd.org> From: Sam Leffler Date: Fri, 9 Jan 2009 21:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186979 - in head/tools/tools/nanobsd/gateworks: . Files Files/root cfg cfg/ssh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 21:39:45 -0000 Author: sam Date: Fri Jan 9 21:39:44 2009 New Revision: 186979 URL: http://svn.freebsd.org/changeset/base/186979 Log: example configurations for cross-building to Gateworks 2348 and 2358 boards; probably needs cleanups to be less specific to my needs/uses MFC after: 2 weeks Added: head/tools/tools/nanobsd/gateworks/ head/tools/tools/nanobsd/gateworks/Files/ (props changed) head/tools/tools/nanobsd/gateworks/Files/root/ (props changed) head/tools/tools/nanobsd/gateworks/Files/root/.profile (contents, props changed) head/tools/tools/nanobsd/gateworks/G2348 (contents, props changed) head/tools/tools/nanobsd/gateworks/G2358 (contents, props changed) head/tools/tools/nanobsd/gateworks/avila (contents, props changed) head/tools/tools/nanobsd/gateworks/cambria (contents, props changed) head/tools/tools/nanobsd/gateworks/cfg/ (props changed) head/tools/tools/nanobsd/gateworks/cfg/motd (contents, props changed) head/tools/tools/nanobsd/gateworks/cfg/rc.conf (contents, props changed) head/tools/tools/nanobsd/gateworks/cfg/ssh/ (props changed) head/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config (contents, props changed) head/tools/tools/nanobsd/gateworks/common (contents, props changed) Added: head/tools/tools/nanobsd/gateworks/Files/root/.profile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/Files/root/.profile Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,15 @@ +# $FreeBSD: src/etc/root/dot.profile,v 1.21 2007/05/29 06:33:10 dougb Exp $ +# +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin +export PATH +HOME=/root; export HOME +TERM=${TERM:-cons25}; export TERM +PAGER=more; export PAGER + +#set -o vi +set -o emacs +if [ `id -u` = 0 ]; then + PS1="`hostname -s`# " +else + PS1="`hostname -s`% " +fi Added: head/tools/tools/nanobsd/gateworks/G2348 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/G2348 Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,120 @@ +# +# Gateworks Avila IXP425 XScale board +# kernel configuration file for FreeBSD/arm +# +# $FreeBSD$ + +machine arm +ident G2348 + +include "../xscale/ixp425/std.ixp425" +include "../xscale/ixp425/std.avila" +options XSCALE_CACHE_READ_WRITE_ALLOCATE +#options ARM_USE_SMALL_ALLOC +hints "AVILA.hints" +makeoptions MODULES_OVERRIDE="" + +# NB: patched by boot2 to reflect boot/root partition +options ROOTDEVNAME=\"ufs:ad0s1\" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions CONF_CFLAGS=-mcpu=xscale + +options HZ=100 +options DEVICE_POLLING + +# Debugging for use in -current +options KDB +options DDB #Enable the kernel debugger +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +options SCHED_4BSD #4BSD scheduler +#options PREEMPTION + +options INET #InterNETworking +#options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +#options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options NFSCLIENT #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options KTRACE #ktrace(1) support +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +#options VERBOSE_SYSINIT + +#device saarm + +device pci +device uart + +# I2C Bus +device iicbus +device iicbb +device iic + +device ixpiic +device ixpwdog # watchdog timer +device ds1672 # DS1672 on I2C bus +device ad7418 # AD7418 on I2C bus + +device avila_led + +device ata +device atadisk # ATA disk drives +device avila_ata # Gateworks CF/IDE support + +device npe # Network Processing Engine +device npe_fw +device firmware +device qmgr # Q Manager (required by npe) +device miibus # NB: required by npe +device ether +device bpf + +device pty +device loop +device if_bridge + +device md +device random # Entropy device + +# Wireless NIC cards +device wlan # 802.11 support +options IEEE80211_DEBUG # enable debugging msgs +options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support + +device ath # Atheros pci/cardbus NIC's +device ath_rate_sample # SampleRate tx rate control for ath +options ATH_DEBUG # enable athdebug msgs +options ATH_DIAGAPI # enable api for athregs + +device ath_hal # Atheros HAL (includes binary component) +options AH_DEBUG +#options AH_ASSERT +options AH_SUPPORT_AR5416 + +#device crypto +#device cryptodev +#device hifn # NB: Soekris minipci card known to work + +device usb +options USB_DEBUG +device uhci +device ohci +device ehci +device ugen +device umass +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) Added: head/tools/tools/nanobsd/gateworks/G2358 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/G2358 Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,121 @@ +# +# Gateworks Cambria IXP435 XScale board +# kernel configuration file for FreeBSD/arm +# +# $FreeBSD$ + +machine arm +ident G2358 + +include "../xscale/ixp425/std.ixp435" +include "../xscale/ixp425/std.avila" +options XSCALE_CACHE_READ_WRITE_ALLOCATE +#options ARM_USE_SMALL_ALLOC +hints "CAMBRIA.hints" +makeoptions MODULES_OVERRIDE="" + +# NB: patched by boot2 to reflect boot/root partition +options ROOTDEVNAME=\"ufs:ad0s1\" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions CONF_CFLAGS=-mcpu=xscale + +options HZ=100 +options DEVICE_POLLING + +# Debugging for use in -current +options KDB +options DDB #Enable the kernel debugger +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +options SCHED_4BSD #4BSD scheduler +#options PREEMPTION + +options INET #InterNETworking +#options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +#options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options NFSCLIENT #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options KTRACE #ktrace(1) support +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +#options VERBOSE_SYSINIT + +#device saarm + +device pci +device uart + +# I2C Bus +device iicbus +device iicbb +device iic + +device ixpiic +device ixpwdog # watchdog timer +device ds1672 # DS1672 on I2C bus +device ad7418 # AD7418 on I2C bus + +device cambria_led +device cambria_fled + +device ata +device atadisk # ATA disk drives +device avila_ata # Gateworks CF/IDE support + +device npe # Network Processing Engine +device npe_fw +device firmware +device qmgr # Q Manager (required by npe) +device miibus # NB: required by npe +device ether +device bpf + +device pty +device loop +device if_bridge + +device md +device random # Entropy device + +# Wireless NIC cards +device wlan # 802.11 support +options IEEE80211_DEBUG # enable debugging msgs +options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support + +device ath # Atheros pci/cardbus NIC's +device ath_rate_sample # SampleRate tx rate control for ath +options ATH_DEBUG # enable athdebug msgs +options ATH_DIAGAPI # enable api for athregs + +device ath_hal # Atheros HAL (includes binary component) +options AH_DEBUG +#options AH_ASSERT +options AH_SUPPORT_AR5416 + +#device crypto +#device cryptodev +#device hifn # NB: Soekris minipci card known to work + +device usb +options USB_DEBUG +device uhci +device ohci +device ehci +device ugen +device umass +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) Added: head/tools/tools/nanobsd/gateworks/avila ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/avila Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +NANO_NAME="avila" +NANO_SRC=`pwd | sed 's/.tools.tools.nanobsd.*//'` +NANO_KERNEL="G2348" + +NANO_IMAGES=1 +FlashDevice Sandisk 64 + +. common Added: head/tools/tools/nanobsd/gateworks/cambria ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/cambria Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +NANO_NAME="cambria" +NANO_SRC=`pwd | sed 's/.tools.tools.nanobsd.*//'` +NANO_KERNEL="G2358" + +NANO_IMAGES=1 +FlashDevice Sandisk 64 + +. common Added: head/tools/tools/nanobsd/gateworks/cfg/motd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/cfg/motd Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1 @@ +FreeBSD 7.1-PRERELEASE (G2348) #1: Fri Sep 26 14:37:41 PDT 2008 Added: head/tools/tools/nanobsd/gateworks/cfg/rc.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/cfg/rc.conf Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,24 @@ +#!/bin/sh + +hostname="avila" +ifconfig_npe0="DHCP" +background_dhclient_npe0="YES" # Start dhcp client in the background. +#ifconfig_npe1="DHCP" +background_dhclient_npe1="YES" # Start dhcp client in the background. + +wlans_ath0="wlan0" + +sshd_enable="YES" +nfs_client_enable="YES" + +sendmail_enable="NO" # Run the sendmail inbound daemon (YES/NO). +sendmail_submit_enable="NO" # Start a localhost-only MTA for mail submission +sendmail_outbound_enable="NO" # Dequeue stuck mail (YES/NO). +sendmail_msp_queue_enable="NO" # Dequeue stuck clientmqueue mail (YES/NO). + +dumpdev="NO" # Device to crashdump to (device name, AUTO, or NO). +background_fsck="NO" + +harvest_interrupt="NO" # Entropy device harvests interrupt randomness +harvest_ethernet="NO" # Entropy device harvests ethernet randomness +harvest_p_to_p="NO" # Entropy device harvests point-to-point randomness Added: head/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,126 @@ +# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ +# $FreeBSD: src/crypto/openssh/sshd_config,v 1.48 2008/08/01 02:48:36 des Exp $ + +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. + +# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options change a +# default value. + +# Note that some of FreeBSD's defaults differ from OpenBSD's, and +# FreeBSD has a few additional options. + +#VersionAddendum FreeBSD-20080801 + +#Port 22 +#Protocol 2 +#AddressFamily any +#ListenAddress 0.0.0.0 +#ListenAddress :: + +# Disable legacy (protocol version 1) support in the server for new +# installations. In future the default will change to require explicit +# activation of protocol 1 +Protocol 2 + +# HostKey for protocol version 1 +#HostKey /etc/ssh/ssh_host_key +# HostKeys for protocol version 2 +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_dsa_key + +# Lifetime and size of ephemeral version 1 server key +#KeyRegenerationInterval 1h +#ServerKeyBits 1024 + +# Logging +# obsoletes QuietMode and FascistLogging +#SyslogFacility AUTH +#LogLevel INFO + +# Authentication: + +#LoginGraceTime 2m +PermitRootLogin yes +#StrictModes yes +#MaxAuthTries 6 +#MaxSessions 10 + +#RSAAuthentication yes +#PubkeyAuthentication yes +#AuthorizedKeysFile .ssh/authorized_keys + +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#RhostsRSAAuthentication no +# similar for protocol version 2 +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# RhostsRSAAuthentication and HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes + +# Change to yes to enable built-in password authentication. +PasswordAuthentication yes +PermitEmptyPasswords yes + +# Change to no to disable PAM authentication +ChallengeResponseAuthentication no + +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no + +# GSSAPI options +#GSSAPIAuthentication no +#GSSAPICleanupCredentials yes + +# Set this to 'no' to disable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +#UsePAM yes + +#AllowAgentForwarding yes +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding yes +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PrintMotd yes +#PrintLastLog yes +#TCPKeepAlive yes +#UseLogin no +#UsePrivilegeSeparation yes +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#UseDNS yes +#PidFile /var/run/sshd.pid +#MaxStartups 10 +#PermitTunnel no +#ChrootDirectory none + +# no default banner path +#Banner none + +# override default of no subsystems +Subsystem sftp /usr/libexec/sftp-server + +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# ForceCommand cvs server Added: head/tools/tools/nanobsd/gateworks/common ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/common Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,346 @@ +# $FreeBSD$ + +NANO_CFGDIR=${NANO_SRC}/${NANO_TOOLS}/gateworks/cfg +test -d ${NANO_CFGDIR} || NANO_CFGDIR=/var/empty +NANO_PMAKE="make" # NB: disable -j 3 + +NANO_ARCH=arm +TARGET_CPUTYPE=xscale; export TARGET_CPUTYPE # XXX +TARGET_BIG_ENDIAN=true; export TARGET_BIG_ENDIAN # XXX + +NANO_CUSTOMIZE="cust_allow_ssh_root" + +clean_usr_local() +{ + LOCAL_DIR=${NANO_WORLDDIR}/usr/local + pprint 2 "Clean and create world directory (${LOCAL_DIR})" + if rm -rf ${LOCAL_DIR}/ > /dev/null 2>&1 ; then + true + else + chflags -R noschg ${LOCAL_DIR}/ + rm -rf ${LOCAL_DIR}/ + fi + for f in bin etc lib libdata libexec sbin share; do + mkdir -p ${LOCAL_DIR}/$f + done +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE clean_usr_local" + +cust_install_machine_files() +{ + echo "cd ${NANO_TOOLS}/gateworks/Files" + cd ${NANO_TOOLS}/gateworks/Files + find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE cust_install_files cust_install_machine_files" + +buildenv() +{ + cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF} \ + DESTDIR=${NANO_WORLDDIR} make buildenv +} + +net80211_tools() +{ + for f in wlanstats wlanwds wlanwatch; do + echo "(cd tools/tools/net80211/$f; make $1)"; + done | buildenv +} +net80211_clean_tools() +{ + net80211_tools "clean" +} +net80211_build_tools() +{ + net80211_tools "" +} +net80211_install_tools() +{ + net80211_tools "install" +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_clean_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_build_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_install_tools" + +ath_clean_tools() +{ + echo "cd tools/tools/ath; make clean" | buildenv +} +ath_build_tools() +{ + echo "cd tools/tools/ath; make" | buildenv +} +ath_install_tools() +{ + echo "cd tools/tools/ath; make install" | buildenv +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_clean_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_build_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_install_tools" + +NANO_MAKEFS="makefs -B big \ + -o bsize=4096,fsize=512,density=8192,optimization=space" +export NANO_MAKEFS + +# NB: leave c++ enabled so devd can be built +CONF_BUILD=" +WITHOUT_ACPI=true +WITHOUT_ATM=true +WITHOUT_AUDIT=true +WITHOUT_BIND_DNSSEC=true +WITHOUT_BIND_ETC=true +WITHOUT_BIND_LIBS_LWRES=true +WITHOUT_BLUETOOTH=true +WITHOUT_CALENDAR=true +WITHOUT_CDDL=true +WITHOUT_CVS=true +WITHOUT_DICT=true +WITHOUT_EXAMPLES=true +WITHOUT_FORTRAN=true +WITHOUT_GAMES=true +WITHOUT_GCOV=true +WITHOUT_GPIB=true +WITHOUT_HTML=true +WITHOUT_I4B=true +WITHOUT_INET6=true +WITHOUT_INFO=true +WITHOUT_IPFILTER=true +WITHOUT_IPX=true +WITHOUT_KERBEROS=true +WITHOUT_LIBKSE=true +WITHOUT_LOCALES=true +WITHOUT_LPR=true +WITHOUT_MAN=true +WITHOUT_NETCAT=true +WITHOUT_NIS=true +WITHOUT_NLS=true +WITHOUT_NS_CACHING=true +WITHOUT_OBJC=true +WITHOUT_PROFILE=true +WITHOUT_RCMDS=true +WITHOUT_RCS=true +WITHOUT_RESCUE=true +WITHOUT_SENDMAIL=true +WITHOUT_SHAREDOCS=true +WITHOUT_SSP=true +WITHOUT_SYSCONS=true +WITHOUT_TCSH=true +" +CONF_INSTALL="$CONF_BUILD +WITHOUT_TOOLCHAIN=true +WITHOUT_INSTALLLIB=true +" + +# NB: override to suppress install of kernel.symbols +install_kernel() +{ + pprint 2 "install kernel" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.ik" + + cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ + INSTALL_NODEBUG=true \ + DESTDIR=${NANO_WORLDDIR} \ + __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ + > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 +} + +# NB: override to force / on s1 instead of s1a +setup_nanobsd_etc() +{ + pprint 2 "configure nanobsd /etc" + + ( + cd ${NANO_WORLDDIR} + + # create diskless marker file + touch etc/diskless + + # Make root filesystem R/O by default + echo "root_rw_mount=NO" >> etc/defaults/rc.conf + + # save config file for scripts + echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf + + echo "/dev/${NANO_DRIVE}s1 / ufs ro 1 1" > etc/fstab + echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab + mkdir -p cfg + ) +} + +create_arm_diskimage() +{ + pprint 2 "build diskimage" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.di" + + ( + echo "NANO_MEDIASIZE: $NANO_MEDIASIZE" + echo "NANO_IMAGES: $NANO_IMAGES" + echo "NANO_SECTS: $NANO_SECTS" + echo "NANO_HEADS: $NANO_HEADS" + echo "NANO_CODESIZE: $NANO_CODESIZE" + echo "NANO_CONFSIZE: $NANO_CONFSIZE" + echo "NANO_DATASIZE: $NANO_DATASIZE" + + echo $NANO_MEDIASIZE $NANO_IMAGES \ + $NANO_SECTS $NANO_HEADS \ + $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE | + awk ' + { + printf "# %s\n", $0 + + # size of cylinder in sectors + cs = $3 * $4 + + # number of full cylinders on media + cyl = int ($1 / cs) + + # output fdisk geometry spec, truncate cyls to 1023 + if (cyl <= 1023) + print "g c" cyl " h" $4 " s" $3 + else + print "g c" 1023 " h" $4 " s" $3 + + if ($7 > 0) { + # size of data partition in full cylinders + dsl = int (($7 + cs - 1) / cs) + } else { + dsl = 0; + } + + # size of config partition in full cylinders + csl = int (($6 + cs - 1) / cs) + + if ($5 == 0) { + # size of image partition(s) in full cylinders + isl = int ((cyl - dsl - csl) / $2) + } else { + isl = int (($5 + cs - 1) / cs) + } + + # First image partition start at second track + print "p 1 165 " $3, isl * cs - $3 + c = isl * cs; + + # Second image partition (if any) also starts offset one + # track to keep them identical. + if ($2 > 1) { + print "p 2 165 " $3 + c, isl * cs - $3 + c += isl * cs; + } + + # Config partition starts at cylinder boundary. + print "p 3 165 " c, csl * cs + c += csl * cs + + # Data partition (if any) starts at cylinder boundary. + if ($7 > 0) { + print "p 4 165 " c, dsl * cs + } else if ($7 < 0 && $1 > c) { + print "p 4 165 " c, $1 - c + } else if ($1 < c) { + print "Disk space overcommitted by", \ + c - $1, "sectors" > "/dev/stderr" + exit 2 + } + + # Force slice 1 to be marked active. This is necessary + # for booting the image from a USB device to work. + print "a 1" + } + ' > ${MAKEOBJDIRPREFIX}/_.fdisk + + IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} + BS=${NANO_SECTS}b + + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + else + echo ""; echo "Creating md backing file ${IMG} ..." + _c=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` + pprint 2 "dd if=/dev/zero of=${IMG} bs=${BS} count=${_c}" + dd if=/dev/zero of=${IMG} bs=${BS} count=${_c} + pprint 2 "mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} -y ${NANO_HEADS}" + MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + fi + + trap "mdconfig -d -u $MD" 1 2 15 EXIT + + echo ""; echo "Write partition table ..." + FDISK=${MAKEOBJDIRPREFIX}/_.fdisk + pprint 2 "fdisk -i -f ${FDISK} ${MD}" + fdisk -i -f ${FDISK} ${MD} + pprint 2 "fdisk ${MD}" + fdisk ${MD} + + # Create first image + IMG1=${NANO_DISKIMGDIR}/_.disk.image1 + echo ""; echo "Create first image ${IMG1} ..." + SIZE=`awk '/^p 1/ { print $5 "b" }' ${FDISK}` + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR}" + ${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR} + pprint 2 "dd if=${IMG1} of=/dev/${MD}s1 bs=${BS}" + dd if=${IMG1} of=/dev/${MD}s1 bs=${BS} + + if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then + IMG2=${NANO_DISKIMGDIR}/_.disk.image2 + echo ""; echo "Create second image ${IMG2}..." + for f in ${NANO_WORLDDIR}/etc/fstab ${NANO_WORLDDIR}/conf/base/etc/fstab + do + sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/g" $f + done + + SIZE=`awk '/^p 2/ { print $5 "b" }' ${FDISK}` + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR}" + ${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR} + pprint 2 "dd if=${IMG2} of=/dev/${MD}s2 bs=${BS}" + dd if=${IMG2} of=/dev/${MD}s2 bs=${BS} + fi + + # Create Config slice + CFG=${NANO_DISKIMGDIR}/_.disk.cfg + echo ""; echo "Creating config partition ${CFG}..." + SIZE=`awk '/^p 3/ { print $5 "b" }' ${FDISK}` + # XXX: fill from where ? + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR}" + ${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR} + pprint 2 "dd if=${CFG} of=/dev/${MD}s3 bs=${BS}" + dd if=${CFG} of=/dev/${MD}s3 bs=${BS} + pprint 2 "rm ${CFG}" + rm ${CFG}; CFG= # NB: disable printing below + + # Create Data slice, if any. + if [ $NANO_DATASIZE -gt 0 ] ; then + DATA=${NANO_DISKIMGDIR}/_.disk.data + echo ""; echo "Creating data partition ${DATA}..." + SIZE=`awk '/^p 4/ { print $5 "b" }' ${FDISK}` + # XXX: fill from where ? + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty" + ${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty + pprint 2 "dd if=${DATA} of=/dev/${MD}s4 bs=${BS}" + dd if=${DATA} of=/dev/${MD}s4 bs=${BS} + pprint 2 "rm ${DATA}" + rm ${DATA}; DATA= # NB: disable printing below + fi + + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + echo "Writing out _.disk.full..." + dd if=/dev/${MD} of=${IMG} bs=${BS} + fi + + echo "" + echo "Completed images in:" + echo "" + echo "Full disk: ${IMG}" + echo "Primary partition: ${IMG1}" + test "${IMG2}" && echo "2ndary partition: ${IMG2}" + test "${CFG}" && echo "/cfg partition: ${CFG}" + test "${DATA}" && echo "/data partition: ${DATA}" + echo "" + echo "Use dd if= of=/dev/ bs=${BS} to transfer an" + echo "image to bootable media /dev/." + ) > ${MAKEOBJDIRPREFIX}/_.di 2>&1 +} From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 21:44:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EA111065675; Fri, 9 Jan 2009 21:44:29 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id 2597B8FC16; Fri, 9 Jan 2009 21:44:27 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from [172.27.51.2] (fw.axelero.hu [195.228.243.120]) by people.fsn.hu (Postfix) with ESMTP id EBE70A7CEC; Fri, 9 Jan 2009 22:44:25 +0100 (CET) Message-ID: <4967C539.2060803@fsn.hu> Date: Fri, 09 Jan 2009 22:44:25 +0100 From: Attila Nagy User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Julian Elischer References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> In-Reply-To: <4967B6D9.90001@elischer.org> X-Stationery: 0.4.8.12 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (people.fsn.hu [0.0.0.0]); Fri, 09 Jan 2009 22:44:26 +0100 (CET) Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 21:44:30 -0000 Julian Elischer wrote: > Attila Nagy wrote: >> Hello, >> >> Adrian Chadd wrote: >>> Author: adrian >>> Date: Fri Jan 9 16:02:19 2009 >>> New Revision: 186955 >>> URL: http://svn.freebsd.org/changeset/base/186955 >>> >>> Log: >>> Implement a new IP option (not compiled/enabled by default) to allow >>> applications to specify a non-local IP address when bind()'ing a >>> socket >>> to a local endpoint. >>> This allows applications to spoof the client IP address of >>> connections >>> if (obviously!) they somehow are able to receive the traffic normally >>> destined to said clients. >>> This patch doesn't include any changes to ipfw or the bridging >>> code to >>> redirect the client traffic through the PCB checks so TCP gets a shot >>> at it. The normal behaviour is that packets with a non-local >>> destination >>> IP address are not handled locally. This can be dealth with some >>> IPFW hackery; >>> modifications to IPFW to make this less hacky will occur in >>> subsequent >>> commmits. >>> Thanks to Julian Elischer and others at Ironport. This work was >>> approved >>> and donated before Cisco acquired them. >>> Obtained from: Julian Elischer and others >>> MFC after: 2 weeks >>> >> Wouldn't it be better to implement existing interfaces for that? >> OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: >> http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b > > good point BTW, it also makes easier to port OpenBSD's relayd (and of course other applications relying on this). pf has some related changes there too, which helps programs to use this feature. From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 21:57:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CC811065672; Fri, 9 Jan 2009 21:57:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B7A08FC0A; Fri, 9 Jan 2009 21:57:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09LvnHR070064; Fri, 9 Jan 2009 21:57:49 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09LvnG4070060; Fri, 9 Jan 2009 21:57:49 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901092157.n09LvnG4070060@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 9 Jan 2009 21:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186980 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 21:57:50 -0000 Author: bz Date: Fri Jan 9 21:57:49 2009 New Revision: 186980 URL: http://svn.freebsd.org/changeset/base/186980 Log: Restrict arp, ndp and theoretically the FIB listing (if not read with libkvm) to the addresses of a prison, when inside a jail. [1] As the patch from the PR was pre-'new-arp', add checks to the llt_dump handlers as well. While touching RTM_GET in route_output(), consistently use curthread credentials rather than the creds from the socket there. [2] PR: kern/68189 Submitted by: Mark Delany [1] Discussed with: rwatson [2] Reviewed by: rwatson MFC after: 4 weeks Modified: head/sys/net/rtsock.c head/sys/netinet/in.c head/sys/netinet6/in6.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Fri Jan 9 21:39:44 2009 (r186979) +++ head/sys/net/rtsock.c Fri Jan 9 21:57:49 2009 (r186980) @@ -611,6 +611,12 @@ route_output(struct mbuf *m, struct sock case RTM_GET: report: RT_LOCK_ASSERT(rt); + if (jailed(curthread->td_ucred) && + ((rt->rt_flags & RTF_HOST) == 0 || + !prison_if(curthread->td_ucred, rt_key(rt)))) { + RT_UNLOCK(rt); + senderr(ESRCH); + } info.rti_info[RTAX_DST] = rt_key(rt); info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; info.rti_info[RTAX_NETMASK] = rt_mask(rt); @@ -620,10 +626,10 @@ route_output(struct mbuf *m, struct sock if (ifp) { info.rti_info[RTAX_IFP] = ifp->if_addr->ifa_addr; - if (jailed(so->so_cred)) { + if (jailed(curthread->td_ucred)) { error = rtm_get_jailed( &info, ifp, rt, &saun, - so->so_cred); + curthread->td_ucred); if (error != 0) { RT_UNLOCK(rt); senderr(ESRCH); @@ -1256,6 +1262,10 @@ sysctl_dumpentry(struct radix_node *rn, if (w->w_op == NET_RT_FLAGS && !(rt->rt_flags & w->w_arg)) return 0; + if (jailed(w->w_req->td->td_ucred) && + ((rt->rt_flags & RTF_HOST) == 0 || + !prison_if(w->w_req->td->td_ucred, rt_key(rt)))) + return (0); bzero((caddr_t)&info, sizeof(info)); info.rti_info[RTAX_DST] = rt_key(rt); info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Fri Jan 9 21:39:44 2009 (r186979) +++ head/sys/netinet/in.c Fri Jan 9 21:57:49 2009 (r186980) @@ -1201,6 +1201,10 @@ in_lltable_dump(struct lltable *llt, str /* skip deleted entries */ if ((lle->la_flags & (LLE_DELETED|LLE_VALID)) != LLE_VALID) continue; + /* Skip if jailed and not a valid IP of the prison. */ + if (jailed(wr->td->td_ucred) && + !prison_if(wr->td->td_ucred, L3_ADDR(lle))) + continue; /* * produce a msg made of: * struct rt_msghdr; Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Fri Jan 9 21:39:44 2009 (r186979) +++ head/sys/netinet6/in6.c Fri Jan 9 21:57:49 2009 (r186980) @@ -2240,6 +2240,10 @@ in6_lltable_dump(struct lltable *llt, st /* skip deleted or invalid entries */ if ((lle->la_flags & (LLE_DELETED|LLE_VALID)) != LLE_VALID) continue; + /* Skip if jailed and not a valid IP of the prison. */ + if (jailed(wr->td->td_ucred) && + !prison_if(wr->td->td_ucred, L3_ADDR(lle))) + continue; /* * produce a msg made of: * struct rt_msghdr; From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 22:00:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C51FA106567B; Fri, 9 Jan 2009 22:00:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 9E3DF8FC0A; Fri, 9 Jan 2009 22:00:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 3C0B341C650; Fri, 9 Jan 2009 23:00:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id NXuApMfAW58e; Fri, 9 Jan 2009 23:00:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id A75D641C64A; Fri, 9 Jan 2009 23:00:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id CB2CB4448DD; Fri, 9 Jan 2009 21:59:53 +0000 (UTC) Date: Fri, 9 Jan 2009 21:59:53 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <200901092157.n09LvnG4070060@svn.freebsd.org> Message-ID: <20090109215851.B45399@maildrop.int.zabbadoz.net> References: <200901092157.n09LvnG4070060@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r186980 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:00:22 -0000 On Fri, 9 Jan 2009, Bjoern A. Zeeb wrote: > Author: bz > Date: Fri Jan 9 21:57:49 2009 > New Revision: 186980 > URL: http://svn.freebsd.org/changeset/base/186980 > > Log: > Restrict arp, ndp and theoretically the FIB listing (if not > read with libkvm) to the addresses of a prison, when inside a > jail. [1] > As the patch from the PR was pre-'new-arp', add checks to the > llt_dump handlers as well. > > While touching RTM_GET in route_output(), consistently use > curthread credentials rather than the creds from the socket > there. [2] > > PR: kern/68189 > Submitted by: Mark Delany [1] That should have been: Submitted by: Uwe Doering [1] > Discussed with: rwatson [2] > Reviewed by: rwatson > MFC after: 4 weeks > > Modified: > head/sys/net/rtsock.c > head/sys/netinet/in.c > head/sys/netinet6/in6.c > > Modified: head/sys/net/rtsock.c > ============================================================================== > --- head/sys/net/rtsock.c Fri Jan 9 21:39:44 2009 (r186979) > +++ head/sys/net/rtsock.c Fri Jan 9 21:57:49 2009 (r186980) > @@ -611,6 +611,12 @@ route_output(struct mbuf *m, struct sock > case RTM_GET: > report: > RT_LOCK_ASSERT(rt); > + if (jailed(curthread->td_ucred) && > + ((rt->rt_flags & RTF_HOST) == 0 || > + !prison_if(curthread->td_ucred, rt_key(rt)))) { > + RT_UNLOCK(rt); > + senderr(ESRCH); > + } > info.rti_info[RTAX_DST] = rt_key(rt); > info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; > info.rti_info[RTAX_NETMASK] = rt_mask(rt); > @@ -620,10 +626,10 @@ route_output(struct mbuf *m, struct sock > if (ifp) { > info.rti_info[RTAX_IFP] = > ifp->if_addr->ifa_addr; > - if (jailed(so->so_cred)) { > + if (jailed(curthread->td_ucred)) { > error = rtm_get_jailed( > &info, ifp, rt, &saun, > - so->so_cred); > + curthread->td_ucred); > if (error != 0) { > RT_UNLOCK(rt); > senderr(ESRCH); > @@ -1256,6 +1262,10 @@ sysctl_dumpentry(struct radix_node *rn, > > if (w->w_op == NET_RT_FLAGS && !(rt->rt_flags & w->w_arg)) > return 0; > + if (jailed(w->w_req->td->td_ucred) && > + ((rt->rt_flags & RTF_HOST) == 0 || > + !prison_if(w->w_req->td->td_ucred, rt_key(rt)))) > + return (0); > bzero((caddr_t)&info, sizeof(info)); > info.rti_info[RTAX_DST] = rt_key(rt); > info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; > > Modified: head/sys/netinet/in.c > ============================================================================== > --- head/sys/netinet/in.c Fri Jan 9 21:39:44 2009 (r186979) > +++ head/sys/netinet/in.c Fri Jan 9 21:57:49 2009 (r186980) > @@ -1201,6 +1201,10 @@ in_lltable_dump(struct lltable *llt, str > /* skip deleted entries */ > if ((lle->la_flags & (LLE_DELETED|LLE_VALID)) != LLE_VALID) > continue; > + /* Skip if jailed and not a valid IP of the prison. */ > + if (jailed(wr->td->td_ucred) && > + !prison_if(wr->td->td_ucred, L3_ADDR(lle))) > + continue; > /* > * produce a msg made of: > * struct rt_msghdr; > > Modified: head/sys/netinet6/in6.c > ============================================================================== > --- head/sys/netinet6/in6.c Fri Jan 9 21:39:44 2009 (r186979) > +++ head/sys/netinet6/in6.c Fri Jan 9 21:57:49 2009 (r186980) > @@ -2240,6 +2240,10 @@ in6_lltable_dump(struct lltable *llt, st > /* skip deleted or invalid entries */ > if ((lle->la_flags & (LLE_DELETED|LLE_VALID)) != LLE_VALID) > continue; > + /* Skip if jailed and not a valid IP of the prison. */ > + if (jailed(wr->td->td_ucred) && > + !prison_if(wr->td->td_ucred, L3_ADDR(lle))) > + continue; > /* > * produce a msg made of: > * struct rt_msghdr; > -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 22:06:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B29E3106568F; Fri, 9 Jan 2009 22:06:48 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1B668FC0C; Fri, 9 Jan 2009 22:06:48 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09M6mEY070420; Fri, 9 Jan 2009 22:06:48 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09M6mun070419; Fri, 9 Jan 2009 22:06:48 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200901092206.n09M6mun070419@svn.freebsd.org> From: Joe Marcus Clarke Date: Fri, 9 Jan 2009 22:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186981 - head/sys/fs/pseudofs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:06:49 -0000 Author: marcus (doc,ports committer) Date: Fri Jan 9 22:06:48 2009 New Revision: 186981 URL: http://svn.freebsd.org/changeset/base/186981 Log: Fix a deadlock which can occur due to a pseudofs vnode not getting unlocked. Reported by: Richard Todd Reviewed by: kib Approved by: kib Modified: head/sys/fs/pseudofs/pseudofs_vncache.c Modified: head/sys/fs/pseudofs/pseudofs_vncache.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vncache.c Fri Jan 9 21:57:49 2009 (r186980) +++ head/sys/fs/pseudofs/pseudofs_vncache.c Fri Jan 9 22:06:48 2009 (r186981) @@ -212,6 +212,7 @@ retry2: if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, curthread) == 0) { ++pfs_vncache_hits; vgone(*vpp); + vput(*vpp); *vpp = vp; cache_purge(vp); return (0); From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 22:11:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 070031065838; Fri, 9 Jan 2009 22:11:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id 0CF758FC0C; Fri, 9 Jan 2009 22:11:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5660550qwb.7 for ; Fri, 09 Jan 2009 14:11:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=TJ7x4uFTpR9AehwXscAezm1/I5SqS4MBPENbvFQZABI=; b=PLp4tofNuvBtR3sgXTll/GtKNmkKf282LkzCdq+DQjJEnFnstanL99e3Nh8I0+sSmy P2GAeSiEVfmMwSMO8+3mjfNiFrs0VJEQrngS870TYKISIurQdKo8qGr9XYNB7/VNSdPL MR3kthEx1qRkt0JRTGwvV12ZVSzfGwHAMegvY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=FN6RX58XatVCCQ6guY4oSVNdAGzAg7eOnP0H0NfgT+RvDTmDGsCwB++sPsF5/Xkfj9 n2ly4iST9hiV8X9BeFq20v5Ulu9xUWUIW6CGBPf5GOyymAbWPMQcNVja/gaE04R7J6Z6 6CdHmt7Ldfb6jCB7BSHzY7XmX34veCdoI6G0I= Received: by 10.215.40.10 with SMTP id s10mr235907qaj.39.1231539070306; Fri, 09 Jan 2009 14:11:10 -0800 (PST) Received: by 10.214.81.13 with HTTP; Fri, 9 Jan 2009 14:11:10 -0800 (PST) Message-ID: Date: Fri, 9 Jan 2009 17:11:10 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Attila Nagy" In-Reply-To: <4967C539.2060803@fsn.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> X-Google-Sender-Auth: 1c24ce4daaba03db Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:11:28 -0000 Well, they can be used mostly interchangably - they socket option is just implemented at a different layer. Porting should be a case of a simple #ifdef. :) I wonder what pf changes are needed.. Adrian 2009/1/9 Attila Nagy : > Julian Elischer wrote: >> >> Attila Nagy wrote: >>> >>> Hello, >>> >>> Adrian Chadd wrote: >>>> >>>> Author: adrian >>>> Date: Fri Jan 9 16:02:19 2009 >>>> New Revision: 186955 >>>> URL: http://svn.freebsd.org/changeset/base/186955 >>>> >>>> Log: >>>> Implement a new IP option (not compiled/enabled by default) to allow >>>> applications to specify a non-local IP address when bind()'ing a socket >>>> to a local endpoint. >>>> This allows applications to spoof the client IP address of >>>> connections >>>> if (obviously!) they somehow are able to receive the traffic normally >>>> destined to said clients. >>>> This patch doesn't include any changes to ipfw or the bridging code >>>> to >>>> redirect the client traffic through the PCB checks so TCP gets a shot >>>> at it. The normal behaviour is that packets with a non-local >>>> destination >>>> IP address are not handled locally. This can be dealth with some IPFW >>>> hackery; >>>> modifications to IPFW to make this less hacky will occur in subsequent >>>> commmits. >>>> Thanks to Julian Elischer and others at Ironport. This work was >>>> approved >>>> and donated before Cisco acquired them. >>>> Obtained from: Julian Elischer and others >>>> MFC after: 2 weeks >>>> >>> >>> Wouldn't it be better to implement existing interfaces for that? >>> OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: >>> http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b >> >> good point > > BTW, it also makes easier to port OpenBSD's relayd (and of course other > applications relying on this). pf has some related changes there too, which > helps programs to use this feature. > From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 22:35:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7E841065672; Fri, 9 Jan 2009 22:35:25 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C74A18FC14; Fri, 9 Jan 2009 22:35:25 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09MZPa8071071; Fri, 9 Jan 2009 22:35:25 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09MZP1e071070; Fri, 9 Jan 2009 22:35:25 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901092235.n09MZP1e071070@svn.freebsd.org> From: Sam Leffler Date: Fri, 9 Jan 2009 22:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186984 - head/sys/modules/iwnfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:35:26 -0000 Author: sam Date: Fri Jan 9 22:35:25 2009 New Revision: 186984 URL: http://svn.freebsd.org/changeset/base/186984 Log: remove license ack requirement; this was never needed Reviewed by: core Modified: head/sys/modules/iwnfw/Makefile Modified: head/sys/modules/iwnfw/Makefile ============================================================================== --- head/sys/modules/iwnfw/Makefile Fri Jan 9 22:19:48 2009 (r186983) +++ head/sys/modules/iwnfw/Makefile Fri Jan 9 22:35:25 2009 (r186984) @@ -4,7 +4,6 @@ KMOD= iwnfw FIRMWS= iwlwifi-4965-4.44.17.fw:iwnfw:44417 -FIRMWARE_LICENSE= intel_iwn CLEANFILES= iwlwifi-4965-4.44.17.fw From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 23:58:00 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A946106566B; Fri, 9 Jan 2009 23:58:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29BB58FC14; Fri, 9 Jan 2009 23:58:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Nw0KW072762; Fri, 9 Jan 2009 23:58:00 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Nw0Ar072761; Fri, 9 Jan 2009 23:58:00 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901092358.n09Nw0Ar072761@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 9 Jan 2009 23:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186986 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 23:58:00 -0000 Author: bz Date: Fri Jan 9 23:57:59 2009 New Revision: 186986 URL: http://svn.freebsd.org/changeset/base/186986 Log: Rather than using the cred from curthread, take it from the thread referenced in the sysctl req argument. Reviewed by: rwatson MFC after: 2 weeks Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Fri Jan 9 23:54:15 2009 (r186985) +++ head/sys/net/rtsock.c Fri Jan 9 23:57:59 2009 (r186986) @@ -1326,8 +1326,8 @@ sysctl_iflist(int af, struct walkarg *w) while ((ifa = TAILQ_NEXT(ifa, ifa_link)) != NULL) { if (af && af != ifa->ifa_addr->sa_family) continue; - if (jailed(curthread->td_ucred) && - !prison_if(curthread->td_ucred, ifa->ifa_addr)) + if (jailed(w->w_req->td->td_ucred) && + !prison_if(w->w_req->td->td_ucred, ifa->ifa_addr)) continue; info.rti_info[RTAX_IFA] = ifa->ifa_addr; info.rti_info[RTAX_NETMASK] = ifa->ifa_netmask; @@ -1375,8 +1375,8 @@ sysctl_ifmalist(int af, struct walkarg * TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (af && af != ifma->ifma_addr->sa_family) continue; - if (jailed(curthread->td_ucred) && - !prison_if(curthread->td_ucred, ifma->ifma_addr)) + if (jailed(w->w_req->td->td_ucred) && + !prison_if(w->w_req->td->td_ucred, ifma->ifma_addr)) continue; info.rti_info[RTAX_IFA] = ifma->ifma_addr; info.rti_info[RTAX_GATEWAY] = @@ -1457,7 +1457,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) * take care of routing entries */ for (error = 0; error == 0 && i <= lim; i++) - if ((rnh = V_rt_tables[curthread->td_proc->p_fibnum][i]) != NULL) { + if ((rnh = V_rt_tables[req->td->td_proc->p_fibnum][i]) != NULL) { RADIX_NODE_HEAD_LOCK(rnh); error = rnh->rnh_walktree(rnh, sysctl_dumpentry, &w); From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 04:35:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0C4E1065679; Sat, 10 Jan 2009 04:35:07 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 822638FC08; Sat, 10 Jan 2009 04:35:07 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 20:06:33 -0800 Message-ID: <49681EC8.2040408@elischer.org> Date: Fri, 09 Jan 2009 20:06:32 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 04:35:08 -0000 Adrian Chadd wrote: > I wasn't even aware of the existance of this interface. I'll check it out. > > Thing is, this is a socket layer option, rather than what I've > committed which is a netinet layer option. > > Anyway, I'll check it out. I'm happy to fiddle with things if others' > would like it. > remember that the behaviour needs to last longer than the socket does.. once the socket is removed you should still be sending RSTs or whatever until the fin-wait2 (and other) states have wrapped up. so that is why I keep the info in teh inp. > > > Adrian > > 2009/1/9 Attila Nagy : >> Hello, >> >> Adrian Chadd wrote: >>> Author: adrian >>> Date: Fri Jan 9 16:02:19 2009 >>> New Revision: 186955 >>> URL: http://svn.freebsd.org/changeset/base/186955 >>> >>> Log: >>> Implement a new IP option (not compiled/enabled by default) to allow >>> applications to specify a non-local IP address when bind()'ing a socket >>> to a local endpoint. >>> This allows applications to spoof the client IP address of connections >>> if (obviously!) they somehow are able to receive the traffic normally >>> destined to said clients. >>> This patch doesn't include any changes to ipfw or the bridging code to >>> redirect the client traffic through the PCB checks so TCP gets a shot >>> at it. The normal behaviour is that packets with a non-local destination >>> IP address are not handled locally. This can be dealth with some IPFW >>> hackery; >>> modifications to IPFW to make this less hacky will occur in subsequent >>> commmits. >>> Thanks to Julian Elischer and others at Ironport. This work was >>> approved >>> and donated before Cisco acquired them. >>> Obtained from: Julian Elischer and others >>> MFC after: 2 weeks >>> >> Wouldn't it be better to implement existing interfaces for that? >> OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: >> http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b >> >> From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 09:17:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2675D1065673; Sat, 10 Jan 2009 09:17:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 142288FC13; Sat, 10 Jan 2009 09:17:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A9HGEc085307; Sat, 10 Jan 2009 09:17:16 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A9HGVD085301; Sat, 10 Jan 2009 09:17:16 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901100917.n0A9HGVD085301@svn.freebsd.org> From: Robert Watson Date: Sat, 10 Jan 2009 09:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187014 - in head/sys/security: mac mac_biba mac_lomac mac_mls mac_stub mac_test X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 09:17:17 -0000 Author: rwatson Date: Sat Jan 10 09:17:16 2009 New Revision: 187014 URL: http://svn.freebsd.org/changeset/base/187014 Log: Use MPC_OBJECT_IP6Q to indicate labeling of struct ip6q rather than MPC_OBJECT_IPQ; it was already defined, just not used. Obtained from: TrustedBSD Project Sponsored by: Apple, Inc. Modified: head/sys/security/mac/mac_inet6.c head/sys/security/mac_biba/mac_biba.c head/sys/security/mac_lomac/mac_lomac.c head/sys/security/mac_mls/mac_mls.c head/sys/security/mac_stub/mac_stub.c head/sys/security/mac_test/mac_test.c Modified: head/sys/security/mac/mac_inet6.c ============================================================================== --- head/sys/security/mac/mac_inet6.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac/mac_inet6.c Sat Jan 10 09:17:16 2009 (r187014) @@ -80,7 +80,7 @@ int mac_ip6q_init(struct ip6q *q6, int flag) { - if (mac_labeled & MPC_OBJECT_IPQ) { + if (mac_labeled & MPC_OBJECT_IP6Q) { q6->ip6q_label = mac_ip6q_label_alloc(flag); if (q6->ip6q_label == NULL) return (ENOMEM); Modified: head/sys/security/mac_biba/mac_biba.c ============================================================================== --- head/sys/security/mac_biba/mac_biba.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac_biba/mac_biba.c Sat Jan 10 09:17:16 2009 (r187014) @@ -3553,6 +3553,7 @@ static struct mac_policy_ops mac_biba_op MPC_OBJECT_DEVFS | \ MPC_OBJECT_MBUF | \ MPC_OBJECT_IPQ | \ + MPC_OBJECT_IP6Q | \ MPC_OBJECT_IFNET | \ MPC_OBJECT_BPFDESC | \ MPC_OBJECT_PIPE | \ Modified: head/sys/security/mac_lomac/mac_lomac.c ============================================================================== --- head/sys/security/mac_lomac/mac_lomac.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac_lomac/mac_lomac.c Sat Jan 10 09:17:16 2009 (r187014) @@ -3060,6 +3060,7 @@ static struct mac_policy_ops lomac_ops = MPC_OBJECT_DEVFS | \ MPC_OBJECT_MBUF | \ MPC_OBJECT_IPQ | \ + MPC_OBJECT_IP6Q | \ MPC_OBJECT_IFNET | \ MPC_OBJECT_BPFDESC | \ MPC_OBJECT_PIPE | \ Modified: head/sys/security/mac_mls/mac_mls.c ============================================================================== --- head/sys/security/mac_mls/mac_mls.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac_mls/mac_mls.c Sat Jan 10 09:17:16 2009 (r187014) @@ -3170,6 +3170,7 @@ static struct mac_policy_ops mls_ops = MPC_OBJECT_DEVFS | \ MPC_OBJECT_MBUF | \ MPC_OBJECT_IPQ | \ + MPC_OBJECT_IP6Q | \ MPC_OBJECT_IFNET | \ MPC_OBJECT_BPFDESC | \ MPC_OBJECT_PIPE | \ Modified: head/sys/security/mac_stub/mac_stub.c ============================================================================== --- head/sys/security/mac_stub/mac_stub.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac_stub/mac_stub.c Sat Jan 10 09:17:16 2009 (r187014) @@ -1808,6 +1808,7 @@ static struct mac_policy_ops stub_ops = MPC_OBJECT_DEVFS | \ MPC_OBJECT_MBUF | \ MPC_OBJECT_IPQ | \ + MPC_OBJECT_IP6Q | \ MPC_OBJECT_IFNET | \ MPC_OBJECT_BPFDESC | \ MPC_OBJECT_PIPE | \ Modified: head/sys/security/mac_test/mac_test.c ============================================================================== --- head/sys/security/mac_test/mac_test.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac_test/mac_test.c Sat Jan 10 09:17:16 2009 (r187014) @@ -3147,6 +3147,7 @@ static struct mac_policy_ops test_ops = MPC_OBJECT_DEVFS | \ MPC_OBJECT_MBUF | \ MPC_OBJECT_IPQ | \ + MPC_OBJECT_IP6Q | \ MPC_OBJECT_IFNET | \ MPC_OBJECT_BPFDESC | \ MPC_OBJECT_PIPE | \ From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 09:28:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C34F0106566C; Sat, 10 Jan 2009 09:28:23 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id E57FA8FC0C; Sat, 10 Jan 2009 09:28:21 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from [172.27.51.2] (fw.axelero.hu [195.228.243.120]) by people.fsn.hu (Postfix) with ESMTP id 7F2FDA6E31; Sat, 10 Jan 2009 10:28:18 +0100 (CET) Message-ID: <49686A30.4000205@fsn.hu> Date: Sat, 10 Jan 2009 10:28:16 +0100 From: Attila Nagy User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> In-Reply-To: X-Stationery: 0.4.8.12 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (people.fsn.hu [0.0.0.0]); Sat, 10 Jan 2009 10:28:20 +0100 (CET) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 09:28:24 -0000 Hello, pf and relayd changes... http://marc.info/?l=openbsd-cvs&m=121030115209292&w=2 http://marc.info/?l=openbsd-cvs&m=121320866832670&w=2 (sorry, I don't know a better way to link to these changes, the commit logs contain the affected files and their log message, so they can be looked up in the cvsweb, or in the CVS via the dates) ...and divert-* in the pf.conf manual: http://www.openbsd.org/cgi-bin/man.cgi?query=pf.conf /divert-to/ /port/ Used to redirect packets to a local socket bound to /host/ and /port/. The packets will not be modified, so getsockname(2) on the socket will return the original destination address of the packet. /divert-reply/ Used to receive replies for sockets that are bound to addresses which are not local to the machine. See setsockopt(2) for informa- tion on how to bind these sockets. Adrian Chadd wrote: > Well, they can be used mostly interchangably - they socket option is > just implemented at a different layer. > > Porting should be a case of a simple #ifdef. :) > > I wonder what pf changes are needed.. > > > Adrian > > 2009/1/9 Attila Nagy : > >> Julian Elischer wrote: >> >>> Attila Nagy wrote: >>> >>>> Hello, >>>> >>>> Adrian Chadd wrote: >>>> >>>>> Author: adrian >>>>> Date: Fri Jan 9 16:02:19 2009 >>>>> New Revision: 186955 >>>>> URL: http://svn.freebsd.org/changeset/base/186955 >>>>> >>>>> Log: >>>>> Implement a new IP option (not compiled/enabled by default) to allow >>>>> applications to specify a non-local IP address when bind()'ing a socket >>>>> to a local endpoint. >>>>> This allows applications to spoof the client IP address of >>>>> connections >>>>> if (obviously!) they somehow are able to receive the traffic normally >>>>> destined to said clients. >>>>> This patch doesn't include any changes to ipfw or the bridging code >>>>> to >>>>> redirect the client traffic through the PCB checks so TCP gets a shot >>>>> at it. The normal behaviour is that packets with a non-local >>>>> destination >>>>> IP address are not handled locally. This can be dealth with some IPFW >>>>> hackery; >>>>> modifications to IPFW to make this less hacky will occur in subsequent >>>>> commmits. >>>>> Thanks to Julian Elischer and others at Ironport. This work was >>>>> approved >>>>> and donated before Cisco acquired them. >>>>> Obtained from: Julian Elischer and others >>>>> MFC after: 2 weeks >>>>> >>>>> >>>> Wouldn't it be better to implement existing interfaces for that? >>>> OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: >>>> http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b >>>> >>> good point >>> >> BTW, it also makes easier to port OpenBSD's relayd (and of course other >> applications relying on this). pf has some related changes there too, which >> helps programs to use this feature. >> >> > _______________________________________________ > 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-unsubscribe@freebsd.org" > From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 10:28:43 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7B92106564A; Sat, 10 Jan 2009 10:28:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B03CC8FC13; Sat, 10 Jan 2009 10:28:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 4E6FD46B23; Sat, 10 Jan 2009 05:28:43 -0500 (EST) Date: Sat, 10 Jan 2009 10:28:43 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Attila Nagy In-Reply-To: <49686A30.4000205@fsn.hu> Message-ID: References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 10:28:44 -0000 On Sat, 10 Jan 2009, Attila Nagy wrote: >> Well, they can be used mostly interchangably - they socket option is just >> implemented at a different layer. >> >> Porting should be a case of a simple #ifdef. :) > > I wonder what pf changes are needed.. I think Julian's analysis, that this is more of an inet option than a socket-layer option, seems more appropriate to me, the benefits of portability in adopting the API used by OpenBSD/BSDI/etc seem more compelling. We should make sure that, if we move to the socket option used on those systems, we block setting it on non-supporting protocols, or confusion will result. In particular, Adrian's change only modified IPv4, not IPv6, so until it's implemented on IPv6 it shouldn't be possible to set the option. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 10:58:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E80A1065672; Sat, 10 Jan 2009 10:58:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDF3A8FC18; Sat, 10 Jan 2009 10:58:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AAwf7V095572; Sat, 10 Jan 2009 10:58:41 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AAwfVB095558; Sat, 10 Jan 2009 10:58:41 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901101058.n0AAwfVB095558@svn.freebsd.org> From: Robert Watson Date: Sat, 10 Jan 2009 10:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187016 - in head/sys/security: mac mac_biba mac_bsdextended mac_ifoff mac_lomac mac_mls mac_none mac_partition mac_portacl mac_seeotheruids mac_stub mac_test X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 10:58:42 -0000 Author: rwatson Date: Sat Jan 10 10:58:41 2009 New Revision: 187016 URL: http://svn.freebsd.org/changeset/base/187016 Log: Rather than having MAC policies explicitly declare what object types they label, derive that information implicitly from the set of label initializers in their policy operations set. This avoids a possible class of programmer errors, while retaining the structure that allows us to avoid allocating labels for objects that don't need them. As before, we regenerate a global mask of labeled objects each time a policy is loaded or unloaded, stored in mac_labeled. Discussed with: csjp Suggested by: Jacques Vidrine Obtained from: TrustedBSD Project Sponsored by: Apple, Inc. Modified: head/sys/security/mac/mac_framework.c head/sys/security/mac/mac_internal.h head/sys/security/mac/mac_policy.h head/sys/security/mac_biba/mac_biba.c head/sys/security/mac_bsdextended/mac_bsdextended.c head/sys/security/mac_ifoff/mac_ifoff.c head/sys/security/mac_lomac/mac_lomac.c head/sys/security/mac_mls/mac_mls.c head/sys/security/mac_none/mac_none.c head/sys/security/mac_partition/mac_partition.c head/sys/security/mac_portacl/mac_portacl.c head/sys/security/mac_seeotheruids/mac_seeotheruids.c head/sys/security/mac_stub/mac_stub.c head/sys/security/mac_test/mac_test.c Modified: head/sys/security/mac/mac_framework.c ============================================================================== --- head/sys/security/mac/mac_framework.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac/mac_framework.c Sat Jan 10 10:58:41 2009 (r187016) @@ -3,7 +3,7 @@ * Copyright (c) 2001 Ilmar S. Habibulin * Copyright (c) 2001-2005 Networks Associates Technology, Inc. * Copyright (c) 2005-2006 SPARTA, Inc. - * Copyright (c) 2008 Apple Inc. + * Copyright (c) 2008-2009 Apple Inc. * All rights reserved. * * This software was developed by Robert Watson and Ilmar Habibulin for the @@ -329,10 +329,48 @@ mac_late_init(void) } /* - * After the policy list has changed, walk the list to update any global - * flags. Currently, we support only one flag, and it's conditionally - * defined; as a result, the entire function is conditional. Eventually, the - * #else case might also iterate across the policies. + * Given a policy, derive from its set of non-NULL label init methods what + * object types the policy is interested in. + */ +static uint64_t +mac_policy_getlabeled(struct mac_policy_conf *mpc) +{ + uint64_t labeled; + +#define MPC_FLAG(method, flag) \ + if (mpc->mpc_ops->mpo_ ## method != NULL) \ + labeled |= (flag); \ + + labeled = 0; + MPC_FLAG(cred_init_label, MPC_OBJECT_CRED); + MPC_FLAG(proc_init_label, MPC_OBJECT_PROC); + MPC_FLAG(vnode_init_label, MPC_OBJECT_VNODE); + MPC_FLAG(inpcb_init_label, MPC_OBJECT_INPCB); + MPC_FLAG(socket_init_label, MPC_OBJECT_SOCKET); + MPC_FLAG(devfs_init_label, MPC_OBJECT_DEVFS); + MPC_FLAG(mbuf_init_label, MPC_OBJECT_MBUF); + MPC_FLAG(ipq_init_label, MPC_OBJECT_IPQ); + MPC_FLAG(ifnet_init_label, MPC_OBJECT_IFNET); + MPC_FLAG(bpfdesc_init_label, MPC_OBJECT_BPFDESC); + MPC_FLAG(pipe_init_label, MPC_OBJECT_PIPE); + MPC_FLAG(mount_init_label, MPC_OBJECT_MOUNT); + MPC_FLAG(posixsem_init_label, MPC_OBJECT_POSIXSEM); + MPC_FLAG(posixshm_init_label, MPC_OBJECT_POSIXSHM); + MPC_FLAG(sysvmsg_init_label, MPC_OBJECT_SYSVMSG); + MPC_FLAG(sysvmsq_init_label, MPC_OBJECT_SYSVMSQ); + MPC_FLAG(sysvsem_init_label, MPC_OBJECT_SYSVSEM); + MPC_FLAG(sysvshm_init_label, MPC_OBJECT_SYSVSHM); + MPC_FLAG(syncache_init_label, MPC_OBJECT_SYNCACHE); + MPC_FLAG(ip6q_init_label, MPC_OBJECT_IP6Q); + +#undef MPC_FLAG + return (labeled); +} + +/* + * When policies are loaded or unloaded, walk the list of registered policies + * and built mac_labeled, a bitmask representing the union of all objects + * requiring labels across all policies. */ static void mac_policy_updateflags(void) @@ -343,9 +381,9 @@ mac_policy_updateflags(void) mac_labeled = 0; LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) - mac_labeled |= mpc->mpc_labeled; + mac_labeled |= mac_policy_getlabeled(mpc); LIST_FOREACH(mpc, &mac_policy_list, mpc_list) - mac_labeled |= mpc->mpc_labeled; + mac_labeled |= mac_policy_getlabeled(mpc); } static int Modified: head/sys/security/mac/mac_internal.h ============================================================================== --- head/sys/security/mac/mac_internal.h Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac/mac_internal.h Sat Jan 10 10:58:41 2009 (r187016) @@ -4,6 +4,7 @@ * Copyright (c) 2001-2004 Networks Associates Technology, Inc. * Copyright (c) 2006 nCircle Network Security, Inc. * Copyright (c) 2006 SPARTA, Inc. + * Copyright (c) 2009 Apple, Inc. * All rights reserved. * * This software was developed by Robert Watson and Ilmar Habibulin for the @@ -83,6 +84,34 @@ struct label { intptr_t l_perpolicy[MAC_MAX_SLOTS]; }; + +/* + * Flags for mac_labeled, a bitmask of object types need across the union of + * all policies currently registered with the MAC Framework, used to key + * whether or not labels are allocated and constructors for the type are + * invoked. + */ +#define MPC_OBJECT_CRED 0x0000000000000001 +#define MPC_OBJECT_PROC 0x0000000000000002 +#define MPC_OBJECT_VNODE 0x0000000000000004 +#define MPC_OBJECT_INPCB 0x0000000000000008 +#define MPC_OBJECT_SOCKET 0x0000000000000010 +#define MPC_OBJECT_DEVFS 0x0000000000000020 +#define MPC_OBJECT_MBUF 0x0000000000000040 +#define MPC_OBJECT_IPQ 0x0000000000000080 +#define MPC_OBJECT_IFNET 0x0000000000000100 +#define MPC_OBJECT_BPFDESC 0x0000000000000200 +#define MPC_OBJECT_PIPE 0x0000000000000400 +#define MPC_OBJECT_MOUNT 0x0000000000000800 +#define MPC_OBJECT_POSIXSEM 0x0000000000001000 +#define MPC_OBJECT_POSIXSHM 0x0000000000002000 +#define MPC_OBJECT_SYSVMSG 0x0000000000004000 +#define MPC_OBJECT_SYSVMSQ 0x0000000000008000 +#define MPC_OBJECT_SYSVSEM 0x0000000000010000 +#define MPC_OBJECT_SYSVSHM 0x0000000000020000 +#define MPC_OBJECT_SYNCACHE 0x0000000000040000 +#define MPC_OBJECT_IP6Q 0x0000000000080000 + /* * MAC Framework global variables. */ Modified: head/sys/security/mac/mac_policy.h ============================================================================== --- head/sys/security/mac/mac_policy.h Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac/mac_policy.h Sat Jan 10 10:58:41 2009 (r187016) @@ -956,9 +956,9 @@ struct mac_policy_conf { int *mpc_field_off; /* security field */ int mpc_runtime_flags; /* flags */ int _mpc_spare1; /* Spare. */ - uint64_t mpc_labeled; /* Labeled objects. */ uint64_t _mpc_spare2; /* Spare. */ - void *_mpc_spare3; /* Spare. */ + uint64_t _mpc_spare3; /* Spare. */ + void *_mpc_spare4; /* Spare. */ LIST_ENTRY(mac_policy_conf) mpc_list; /* global list */ }; @@ -969,31 +969,6 @@ struct mac_policy_conf { /* Flags for the mpc_runtime_flags field. */ #define MPC_RUNTIME_FLAG_REGISTERED 0x00000001 -/* - * Flags for mpc_labeled declaring which objects should have labels allocated - * for them by the MAC Framework. - */ -#define MPC_OBJECT_CRED 0x0000000000000001 -#define MPC_OBJECT_PROC 0x0000000000000002 -#define MPC_OBJECT_VNODE 0x0000000000000004 -#define MPC_OBJECT_INPCB 0x0000000000000008 -#define MPC_OBJECT_SOCKET 0x0000000000000010 -#define MPC_OBJECT_DEVFS 0x0000000000000020 -#define MPC_OBJECT_MBUF 0x0000000000000040 -#define MPC_OBJECT_IPQ 0x0000000000000080 -#define MPC_OBJECT_IFNET 0x0000000000000100 -#define MPC_OBJECT_BPFDESC 0x0000000000000200 -#define MPC_OBJECT_PIPE 0x0000000000000400 -#define MPC_OBJECT_MOUNT 0x0000000000000800 -#define MPC_OBJECT_POSIXSEM 0x0000000000001000 -#define MPC_OBJECT_POSIXSHM 0x0000000000002000 -#define MPC_OBJECT_SYSVMSG 0x0000000000004000 -#define MPC_OBJECT_SYSVMSQ 0x0000000000008000 -#define MPC_OBJECT_SYSVSEM 0x0000000000010000 -#define MPC_OBJECT_SYSVSHM 0x0000000000020000 -#define MPC_OBJECT_SYNCACHE 0x0000000000040000 -#define MPC_OBJECT_IP6Q 0x0000000000080000 - /*- * The TrustedBSD MAC Framework has a major version number, MAC_VERSION, * which defines the ABI of the Framework present in the kernel (and depended @@ -1009,15 +984,13 @@ struct mac_policy_conf { */ #define MAC_VERSION 4 -#define MAC_POLICY_SET(mpops, mpname, mpfullname, mpflags, privdata_wanted, \ - labeled) \ +#define MAC_POLICY_SET(mpops, mpname, mpfullname, mpflags, privdata_wanted) \ static struct mac_policy_conf mpname##_mac_policy_conf = { \ .mpc_name = #mpname, \ .mpc_fullname = mpfullname, \ .mpc_ops = mpops, \ .mpc_loadtime_flags = mpflags, \ .mpc_field_off = privdata_wanted, \ - .mpc_labeled = labeled, \ }; \ static moduledata_t mpname##_mod = { \ #mpname, \ Modified: head/sys/security/mac_biba/mac_biba.c ============================================================================== --- head/sys/security/mac_biba/mac_biba.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_biba/mac_biba.c Sat Jan 10 10:58:41 2009 (r187016) @@ -3545,26 +3545,5 @@ static struct mac_policy_ops mac_biba_op .mpo_vnode_setlabel_extattr = biba_vnode_setlabel_extattr, }; -#define BIBA_OBJECTS (MPC_OBJECT_CRED | \ - /* MPC_OBJECT_PROC | */ \ - MPC_OBJECT_VNODE | \ - MPC_OBJECT_INPCB | \ - MPC_OBJECT_SOCKET | \ - MPC_OBJECT_DEVFS | \ - MPC_OBJECT_MBUF | \ - MPC_OBJECT_IPQ | \ - MPC_OBJECT_IP6Q | \ - MPC_OBJECT_IFNET | \ - MPC_OBJECT_BPFDESC | \ - MPC_OBJECT_PIPE | \ - MPC_OBJECT_MOUNT | \ - MPC_OBJECT_POSIXSEM | \ - /* MPC_OBJECT_POSIXSHM | */ \ - MPC_OBJECT_SYSVMSG | \ - MPC_OBJECT_SYSVMSQ | \ - MPC_OBJECT_SYSVSEM | \ - MPC_OBJECT_SYSVSHM | \ - MPC_OBJECT_SYNCACHE) - MAC_POLICY_SET(&mac_biba_ops, mac_biba, "TrustedBSD MAC/Biba", - MPC_LOADTIME_FLAG_NOTLATE, &biba_slot, BIBA_OBJECTS); + MPC_LOADTIME_FLAG_NOTLATE, &biba_slot); Modified: head/sys/security/mac_bsdextended/mac_bsdextended.c ============================================================================== --- head/sys/security/mac_bsdextended/mac_bsdextended.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_bsdextended/mac_bsdextended.c Sat Jan 10 10:58:41 2009 (r187016) @@ -523,4 +523,4 @@ static struct mac_policy_ops ugidfw_ops }; MAC_POLICY_SET(&ugidfw_ops, mac_bsdextended, "TrustedBSD MAC/BSD Extended", - MPC_LOADTIME_FLAG_UNLOADOK, NULL, 0); + MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_ifoff/mac_ifoff.c ============================================================================== --- head/sys/security/mac_ifoff/mac_ifoff.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_ifoff/mac_ifoff.c Sat Jan 10 10:58:41 2009 (r187016) @@ -170,4 +170,4 @@ static struct mac_policy_ops ifoff_ops = }; MAC_POLICY_SET(&ifoff_ops, mac_ifoff, "TrustedBSD MAC/ifoff", - MPC_LOADTIME_FLAG_UNLOADOK, NULL, 0); + MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_lomac/mac_lomac.c ============================================================================== --- head/sys/security/mac_lomac/mac_lomac.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_lomac/mac_lomac.c Sat Jan 10 10:58:41 2009 (r187016) @@ -3052,26 +3052,5 @@ static struct mac_policy_ops lomac_ops = .mpo_vnode_setlabel_extattr = lomac_vnode_setlabel_extattr, }; -#define LOMAC_OBJECTS (MPC_OBJECT_CRED | \ - /* MPC_OBJECT_PROC | */ \ - MPC_OBJECT_VNODE | \ - MPC_OBJECT_INPCB | \ - MPC_OBJECT_SOCKET | \ - MPC_OBJECT_DEVFS | \ - MPC_OBJECT_MBUF | \ - MPC_OBJECT_IPQ | \ - MPC_OBJECT_IP6Q | \ - MPC_OBJECT_IFNET | \ - MPC_OBJECT_BPFDESC | \ - MPC_OBJECT_PIPE | \ - MPC_OBJECT_MOUNT | \ - /* MPC_OBJECT_POSIXSEM | */ \ - /* MPC_OBJECT_POSIXSHM | */ \ - /* MPC_OBJECT_SYSVMSG | */ \ - /* MPC_OBJECT_SYSVMSQ | */ \ - /* MPC_OBJECT_SYSVSEM | */ \ - /* MPC_OBJECT_SYSVSHM | */ \ - MPC_OBJECT_SYNCACHE) - MAC_POLICY_SET(&lomac_ops, mac_lomac, "TrustedBSD MAC/LOMAC", - MPC_LOADTIME_FLAG_NOTLATE, &lomac_slot, LOMAC_OBJECTS); + MPC_LOADTIME_FLAG_NOTLATE, &lomac_slot); Modified: head/sys/security/mac_mls/mac_mls.c ============================================================================== --- head/sys/security/mac_mls/mac_mls.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_mls/mac_mls.c Sat Jan 10 10:58:41 2009 (r187016) @@ -3162,26 +3162,5 @@ static struct mac_policy_ops mls_ops = .mpo_vnode_setlabel_extattr = mls_vnode_setlabel_extattr, }; -#define MLS_OBJECTS (MPC_OBJECT_CRED | \ - /* MPC_OBJECT_PROC | */ \ - MPC_OBJECT_VNODE | \ - MPC_OBJECT_INPCB | \ - MPC_OBJECT_SOCKET | \ - MPC_OBJECT_DEVFS | \ - MPC_OBJECT_MBUF | \ - MPC_OBJECT_IPQ | \ - MPC_OBJECT_IP6Q | \ - MPC_OBJECT_IFNET | \ - MPC_OBJECT_BPFDESC | \ - MPC_OBJECT_PIPE | \ - MPC_OBJECT_MOUNT | \ - MPC_OBJECT_POSIXSEM | \ - /* MPC_OBJECT_POSIXSHM | */ \ - MPC_OBJECT_SYSVMSG | \ - MPC_OBJECT_SYSVMSQ | \ - MPC_OBJECT_SYSVSEM | \ - MPC_OBJECT_SYSVSHM | \ - MPC_OBJECT_SYNCACHE) - MAC_POLICY_SET(&mls_ops, mac_mls, "TrustedBSD MAC/MLS", - MPC_LOADTIME_FLAG_NOTLATE, &mls_slot, MLS_OBJECTS); + MPC_LOADTIME_FLAG_NOTLATE, &mls_slot); Modified: head/sys/security/mac_none/mac_none.c ============================================================================== --- head/sys/security/mac_none/mac_none.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_none/mac_none.c Sat Jan 10 10:58:41 2009 (r187016) @@ -53,4 +53,4 @@ static struct mac_policy_ops none_ops = }; MAC_POLICY_SET(&none_ops, mac_none, "TrustedBSD MAC/None", - MPC_LOADTIME_FLAG_UNLOADOK, NULL, 0); + MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_partition/mac_partition.c ============================================================================== --- head/sys/security/mac_partition/mac_partition.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_partition/mac_partition.c Sat Jan 10 10:58:41 2009 (r187016) @@ -316,4 +316,4 @@ static struct mac_policy_ops partition_o }; MAC_POLICY_SET(&partition_ops, mac_partition, "TrustedBSD MAC/Partition", - MPC_LOADTIME_FLAG_UNLOADOK, &partition_slot, MPC_OBJECT_CRED); + MPC_LOADTIME_FLAG_UNLOADOK, &partition_slot); Modified: head/sys/security/mac_portacl/mac_portacl.c ============================================================================== --- head/sys/security/mac_portacl/mac_portacl.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_portacl/mac_portacl.c Sat Jan 10 10:58:41 2009 (r187016) @@ -490,4 +490,4 @@ static struct mac_policy_ops portacl_ops }; MAC_POLICY_SET(&portacl_ops, mac_portacl, "TrustedBSD MAC/portacl", - MPC_LOADTIME_FLAG_UNLOADOK, NULL, 0); + MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_seeotheruids/mac_seeotheruids.c ============================================================================== --- head/sys/security/mac_seeotheruids/mac_seeotheruids.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_seeotheruids/mac_seeotheruids.c Sat Jan 10 10:58:41 2009 (r187016) @@ -186,4 +186,4 @@ static struct mac_policy_ops seeotheruid }; MAC_POLICY_SET(&seeotheruids_ops, mac_seeotheruids, - "TrustedBSD MAC/seeotheruids", MPC_LOADTIME_FLAG_UNLOADOK, NULL, 0); + "TrustedBSD MAC/seeotheruids", MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_stub/mac_stub.c ============================================================================== --- head/sys/security/mac_stub/mac_stub.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_stub/mac_stub.c Sat Jan 10 10:58:41 2009 (r187016) @@ -1800,26 +1800,5 @@ static struct mac_policy_ops stub_ops = .mpo_vnode_setlabel_extattr = stub_vnode_setlabel_extattr, }; -#define STUB_OBJECTS (MPC_OBJECT_CRED | \ - /* XXX: MPC_OBJECT_PROC | */ \ - MPC_OBJECT_VNODE | \ - MPC_OBJECT_INPCB | \ - MPC_OBJECT_SOCKET | \ - MPC_OBJECT_DEVFS | \ - MPC_OBJECT_MBUF | \ - MPC_OBJECT_IPQ | \ - MPC_OBJECT_IP6Q | \ - MPC_OBJECT_IFNET | \ - MPC_OBJECT_BPFDESC | \ - MPC_OBJECT_PIPE | \ - MPC_OBJECT_MOUNT | \ - MPC_OBJECT_POSIXSEM | \ - MPC_OBJECT_POSIXSHM | \ - MPC_OBJECT_SYSVMSG | \ - MPC_OBJECT_SYSVMSQ | \ - MPC_OBJECT_SYSVSEM | \ - MPC_OBJECT_SYSVSHM | \ - MPC_OBJECT_SYNCACHE) - MAC_POLICY_SET(&stub_ops, mac_stub, "TrustedBSD MAC/Stub", - MPC_LOADTIME_FLAG_UNLOADOK, NULL, STUB_OBJECTS); + MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_test/mac_test.c ============================================================================== --- head/sys/security/mac_test/mac_test.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_test/mac_test.c Sat Jan 10 10:58:41 2009 (r187016) @@ -3139,26 +3139,5 @@ static struct mac_policy_ops test_ops = .mpo_vnode_setlabel_extattr = test_vnode_setlabel_extattr, }; -#define TEST_OBJECTS (MPC_OBJECT_CRED | \ - MPC_OBJECT_PROC | \ - MPC_OBJECT_VNODE | \ - MPC_OBJECT_INPCB | \ - MPC_OBJECT_SOCKET | \ - MPC_OBJECT_DEVFS | \ - MPC_OBJECT_MBUF | \ - MPC_OBJECT_IPQ | \ - MPC_OBJECT_IP6Q | \ - MPC_OBJECT_IFNET | \ - MPC_OBJECT_BPFDESC | \ - MPC_OBJECT_PIPE | \ - MPC_OBJECT_MOUNT | \ - MPC_OBJECT_POSIXSEM | \ - MPC_OBJECT_POSIXSHM | \ - MPC_OBJECT_SYSVMSG | \ - MPC_OBJECT_SYSVMSQ | \ - MPC_OBJECT_SYSVSEM | \ - MPC_OBJECT_SYSVSHM | \ - MPC_OBJECT_SYNCACHE) - MAC_POLICY_SET(&test_ops, mac_test, "TrustedBSD MAC/Test", - MPC_LOADTIME_FLAG_UNLOADOK, &test_slot, TEST_OBJECTS); + MPC_LOADTIME_FLAG_UNLOADOK, &test_slot); From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 12:39:13 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21277106573D; Sat, 10 Jan 2009 12:39:13 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F0368FC1A; Sat, 10 Jan 2009 12:39:13 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ACdCCb097480; Sat, 10 Jan 2009 12:39:12 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ACdCDx097479; Sat, 10 Jan 2009 12:39:12 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901101239.n0ACdCDx097479@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 10 Jan 2009 12:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187018 - head/usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 12:39:14 -0000 Author: ru Date: Sat Jan 10 12:39:12 2009 New Revision: 187018 URL: http://svn.freebsd.org/changeset/base/187018 Log: Fix crash with "netstat -m -N foo". PR: bin/124724 MFC after: 3 days Modified: head/usr.bin/netstat/main.c Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Sat Jan 10 11:45:47 2009 (r187017) +++ head/usr.bin/netstat/main.c Sat Jan 10 12:39:12 2009 (r187018) @@ -507,7 +507,7 @@ main(int argc, char *argv[]) exit(0); } if (mflag) { - if (memf != NULL) { + if (!live) { if (kread(0, NULL, 0) == 0) mbpr(kvmd, nl[N_MBSTAT].n_value); } else From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 12:47:22 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B333E1065675; Sat, 10 Jan 2009 12:47:22 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A15EE8FC08; Sat, 10 Jan 2009 12:47:22 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AClMBn097689; Sat, 10 Jan 2009 12:47:22 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AClMtO097688; Sat, 10 Jan 2009 12:47:22 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200901101247.n0AClMtO097688@svn.freebsd.org> From: Tom Rhodes Date: Sat, 10 Jan 2009 12:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187019 - head/usr.bin/csplit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 12:47:23 -0000 Author: trhodes Date: Sat Jan 10 12:47:22 2009 New Revision: 187019 URL: http://svn.freebsd.org/changeset/base/187019 Log: A bit of rewording for clarity, taken from OpenBSD. Submitted by: jmc@OpenBSD.org Modified: head/usr.bin/csplit/csplit.1 Modified: head/usr.bin/csplit/csplit.1 ============================================================================== --- head/usr.bin/csplit/csplit.1 Sat Jan 10 12:39:12 2009 (r187018) +++ head/usr.bin/csplit/csplit.1 Sat Jan 10 12:47:22 2009 (r187019) @@ -51,22 +51,39 @@ a dash .Nm reads from standard input. .Pp +Files are created with a prefix of +.Dq xx +and two decimal digits. +The size of each file is written to standard output +as it is created. +If an error occurs whilst files are being created, +or a +.Dv HUP , +.Dv INT , +or +.Dv TERM +signal is received, +all files previously written are removed. +.Pp The options are as follows: .Bl -tag -width indent .It Fl f Ar prefix -Give created files names beginning with -.Ar prefix . -The default is +Create file names beginning with +.Ar prefix , +instead of .Dq Pa xx . .It Fl k -Do not remove output files. +Do not remove previously created files if an error occurs or a +.Dv HUP , +.Dv INT , +or +.Dv TERM +signal is received. .It Fl n Ar number -Use +Create file names beginning with .Ar number -of decimal digits after the -.Ar prefix -to form the file name. -The default is 2. +of decimal digits after the prefix, +instead of 2. .It Fl s Do not write the size of each output file to standard output as it is created. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 14:14:00 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5E31106564A; Sat, 10 Jan 2009 14:14:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2D3F8FC17; Sat, 10 Jan 2009 14:14:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AEE0P8099375; Sat, 10 Jan 2009 14:14:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AEE0J3099373; Sat, 10 Jan 2009 14:14:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901101414.n0AEE0J3099373@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 14:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187020 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 14:14:01 -0000 Author: mav Date: Sat Jan 10 14:14:00 2009 New Revision: 187020 URL: http://svn.freebsd.org/changeset/base/187020 Log: Add one more bunch of controller and codec IDs. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Sat Jan 10 12:47:22 2009 (r187019) +++ head/sys/dev/sound/pci/hda/hdac.c Sat Jan 10 14:14:00 2009 (r187020) @@ -149,6 +149,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) #define HDA_INTEL_82801J HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) +#define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56) #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) @@ -178,6 +179,19 @@ SND_DECLARE_FILE("$FreeBSD$"); #define ATI_VENDORID 0x1002 #define HDA_ATI_SB450 HDA_MODEL_CONSTRUCT(ATI, 0x437b) #define HDA_ATI_SB600 HDA_MODEL_CONSTRUCT(ATI, 0x4383) +#define HDA_ATI_RS600 HDA_MODEL_CONSTRUCT(ATI, 0x793b) +#define HDA_ATI_RS690 HDA_MODEL_CONSTRUCT(ATI, 0x7919) +#define HDA_ATI_RS780 HDA_MODEL_CONSTRUCT(ATI, 0x960f) +#define HDA_ATI_R600 HDA_MODEL_CONSTRUCT(ATI, 0xaa00) +#define HDA_ATI_RV630 HDA_MODEL_CONSTRUCT(ATI, 0xaa08) +#define HDA_ATI_RV610 HDA_MODEL_CONSTRUCT(ATI, 0xaa10) +#define HDA_ATI_RV670 HDA_MODEL_CONSTRUCT(ATI, 0xaa18) +#define HDA_ATI_RV635 HDA_MODEL_CONSTRUCT(ATI, 0xaa20) +#define HDA_ATI_RV620 HDA_MODEL_CONSTRUCT(ATI, 0xaa28) +#define HDA_ATI_RV770 HDA_MODEL_CONSTRUCT(ATI, 0xaa30) +#define HDA_ATI_RV730 HDA_MODEL_CONSTRUCT(ATI, 0xaa38) +#define HDA_ATI_RV710 HDA_MODEL_CONSTRUCT(ATI, 0xaa40) +#define HDA_ATI_RV740 HDA_MODEL_CONSTRUCT(ATI, 0xaa48) #define HDA_ATI_ALL HDA_MODEL_CONSTRUCT(ATI, 0xffff) /* VIA */ @@ -469,6 +483,7 @@ static const struct { { HDA_INTEL_82801H, "Intel 82801H" }, { HDA_INTEL_82801I, "Intel 82801I" }, { HDA_INTEL_82801J, "Intel 82801J" }, + { HDA_INTEL_PCH, "Intel PCH" }, { HDA_INTEL_SCH, "Intel SCH" }, { HDA_NVIDIA_MCP51, "NVidia MCP51" }, { HDA_NVIDIA_MCP55, "NVidia MCP55" }, @@ -488,8 +503,20 @@ static const struct { { HDA_NVIDIA_MCP79_2, "NVidia MCP79" }, { HDA_NVIDIA_MCP79_3, "NVidia MCP79" }, { HDA_NVIDIA_MCP79_4, "NVidia MCP79" }, - { HDA_ATI_SB450, "ATI SB450" }, - { HDA_ATI_SB600, "ATI SB600" }, + { HDA_ATI_SB450, "ATI SB450" }, + { HDA_ATI_SB600, "ATI SB600" }, + { HDA_ATI_RS600, "ATI RS600" }, + { HDA_ATI_RS690, "ATI RS690" }, + { HDA_ATI_RS780, "ATI RS780" }, + { HDA_ATI_R600, "ATI R600" }, + { HDA_ATI_RV610, "ATI RV610" }, + { HDA_ATI_RV620, "ATI RV620" }, + { HDA_ATI_RV630, "ATI RV630" }, + { HDA_ATI_RV635, "ATI RV635" }, + { HDA_ATI_RV710, "ATI RV710" }, + { HDA_ATI_RV730, "ATI RV730" }, + { HDA_ATI_RV740, "ATI RV740" }, + { HDA_ATI_RV770, "ATI RV770" }, { HDA_VIA_VT82XX, "VIA VT8251/8237A" }, { HDA_SIS_966, "SiS 966" }, { HDA_ULI_M5461, "ULI M5461" }, @@ -671,6 +698,7 @@ static const struct { /* Silicon Image */ #define SII_VENDORID 0x1095 +#define HDA_CODEC_SII1390 HDA_CODEC_CONSTRUCT(SII, 0x1390) #define HDA_CODEC_SII1392 HDA_CODEC_CONSTRUCT(SII, 0x1392) #define HDA_CODEC_SIIXXXX HDA_CODEC_CONSTRUCT(SII, 0xffff) @@ -706,6 +734,22 @@ static const struct { #define HDA_CODEC_VT1708B_5 HDA_CODEC_CONSTRUCT(VIA, 0xe725) #define HDA_CODEC_VT1708B_6 HDA_CODEC_CONSTRUCT(VIA, 0xe726) #define HDA_CODEC_VT1708B_7 HDA_CODEC_CONSTRUCT(VIA, 0xe727) +#define HDA_CODEC_VT1708S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0397) +#define HDA_CODEC_VT1708S_1 HDA_CODEC_CONSTRUCT(VIA, 0x1397) +#define HDA_CODEC_VT1708S_2 HDA_CODEC_CONSTRUCT(VIA, 0x2397) +#define HDA_CODEC_VT1708S_3 HDA_CODEC_CONSTRUCT(VIA, 0x3397) +#define HDA_CODEC_VT1708S_4 HDA_CODEC_CONSTRUCT(VIA, 0x4397) +#define HDA_CODEC_VT1708S_5 HDA_CODEC_CONSTRUCT(VIA, 0x5397) +#define HDA_CODEC_VT1708S_6 HDA_CODEC_CONSTRUCT(VIA, 0x6397) +#define HDA_CODEC_VT1708S_7 HDA_CODEC_CONSTRUCT(VIA, 0x7397) +#define HDA_CODEC_VT1702_0 HDA_CODEC_CONSTRUCT(VIA, 0x0398) +#define HDA_CODEC_VT1702_1 HDA_CODEC_CONSTRUCT(VIA, 0x1398) +#define HDA_CODEC_VT1702_2 HDA_CODEC_CONSTRUCT(VIA, 0x2398) +#define HDA_CODEC_VT1702_3 HDA_CODEC_CONSTRUCT(VIA, 0x3398) +#define HDA_CODEC_VT1702_4 HDA_CODEC_CONSTRUCT(VIA, 0x4398) +#define HDA_CODEC_VT1702_5 HDA_CODEC_CONSTRUCT(VIA, 0x5398) +#define HDA_CODEC_VT1702_6 HDA_CODEC_CONSTRUCT(VIA, 0x6398) +#define HDA_CODEC_VT1702_7 HDA_CODEC_CONSTRUCT(VIA, 0x7398) #define HDA_CODEC_VTXXXX HDA_CODEC_CONSTRUCT(VIA, 0xffff) /* ATI */ @@ -716,9 +760,16 @@ static const struct { #define HDA_CODEC_ATIXXXX HDA_CODEC_CONSTRUCT(ATI, 0xffff) /* NVIDIA */ +#define HDA_CODEC_NVIDIAMCP78 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0002) +#define HDA_CODEC_NVIDIAMCP7A HDA_CODEC_CONSTRUCT(NVIDIA, 0x0007) +#define HDA_CODEC_NVIDIAMCP67 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0067) #define HDA_CODEC_NVIDIAXXXX HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff) /* INTEL */ +#define HDA_CODEC_INTELG45_1 HDA_CODEC_CONSTRUCT(INTEL, 0x2801) +#define HDA_CODEC_INTELG45_2 HDA_CODEC_CONSTRUCT(INTEL, 0x2802) +#define HDA_CODEC_INTELG45_3 HDA_CODEC_CONSTRUCT(INTEL, 0x2803) +#define HDA_CODEC_INTELG45_4 HDA_CODEC_CONSTRUCT(INTEL, 0x29fb) #define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff) /* Codecs */ @@ -833,10 +884,34 @@ static const struct { { HDA_CODEC_VT1708B_5, "VIA VT1708B_5" }, { HDA_CODEC_VT1708B_6, "VIA VT1708B_6" }, { HDA_CODEC_VT1708B_7, "VIA VT1708B_7" }, + { HDA_CODEC_VT1708S_0, "VIA VT1708S_0" }, + { HDA_CODEC_VT1708S_1, "VIA VT1708S_1" }, + { HDA_CODEC_VT1708S_2, "VIA VT1708S_2" }, + { HDA_CODEC_VT1708S_3, "VIA VT1708S_3" }, + { HDA_CODEC_VT1708S_4, "VIA VT1708S_4" }, + { HDA_CODEC_VT1708S_5, "VIA VT1708S_5" }, + { HDA_CODEC_VT1708S_6, "VIA VT1708S_6" }, + { HDA_CODEC_VT1708S_7, "VIA VT1708S_7" }, + { HDA_CODEC_VT1702_0, "VIA VT1702_0" }, + { HDA_CODEC_VT1702_1, "VIA VT1702_1" }, + { HDA_CODEC_VT1702_2, "VIA VT1702_2" }, + { HDA_CODEC_VT1702_3, "VIA VT1702_3" }, + { HDA_CODEC_VT1702_4, "VIA VT1702_4" }, + { HDA_CODEC_VT1702_5, "VIA VT1702_5" }, + { HDA_CODEC_VT1702_6, "VIA VT1702_6" }, + { HDA_CODEC_VT1702_7, "VIA VT1702_7" }, { HDA_CODEC_ATIRS600_1,"ATI RS600 HDMI" }, { HDA_CODEC_ATIRS600_2,"ATI RS600 HDMI" }, { HDA_CODEC_ATIRS690, "ATI RS690/780 HDMI" }, { HDA_CODEC_ATIR6XX, "ATI R6xx HDMI" }, + { HDA_CODEC_NVIDIAMCP67, "NVidia MCP67 HDMI" }, + { HDA_CODEC_NVIDIAMCP78, "NVidia MCP78 HDMI" }, + { HDA_CODEC_NVIDIAMCP7A, "NVidia MCP7A HDMI" }, + { HDA_CODEC_INTELG45_1, "Intel G45 HDMI" }, + { HDA_CODEC_INTELG45_2, "Intel G45 HDMI" }, + { HDA_CODEC_INTELG45_3, "Intel G45 HDMI" }, + { HDA_CODEC_INTELG45_4, "Intel G45 HDMI" }, + { HDA_CODEC_SII1390, "Silicon Image SiI1390 HDMI" }, { HDA_CODEC_SII1392, "Silicon Image SiI1392 HDMI" }, /* Unknown codec */ { HDA_CODEC_ALCXXXX, "Realtek (Unknown)" }, From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 16:24:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96554106566B; Sat, 10 Jan 2009 16:24:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71F908FC16; Sat, 10 Jan 2009 16:24:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AGOwK2003082; Sat, 10 Jan 2009 16:24:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AGOwUW003080; Sat, 10 Jan 2009 16:24:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901101624.n0AGOwUW003080@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 10 Jan 2009 16:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187024 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 16:25:00 -0000 Author: kib Date: Sat Jan 10 16:24:58 2009 New Revision: 187024 URL: http://svn.freebsd.org/changeset/base/187024 Log: Correct description for the Marvell 88SE6101. Submitted by: Andriy Gapon MFC after: 3 days Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Sat Jan 10 16:19:38 2009 (r187023) +++ head/share/misc/pci_vendors Sat Jan 10 16:24:58 2009 (r187024) @@ -4606,7 +4606,7 @@ 6041 MV88SX6041 Marvell Technology Group Ltd. MV88SX6041 4-port SATA II PCI-X Controller (rev 03) 6042 MV88SX6042 4-port SATA II PCI-X Controller 6081 MV88SX6081 8-port SATA II PCI-X Controller - 6101 6101 SATA2 Controller + 6101 MV88SX6101 1-port UltraATA/133 Controller 6111 6111 SATA2 Controller 6120 6120 SATA2 Controller 6121 6121 SATA2 Controller From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 17:17:19 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 234F610656C7; Sat, 10 Jan 2009 17:17:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 103C98FC16; Sat, 10 Jan 2009 17:17:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AHHIA5004168; Sat, 10 Jan 2009 17:17:18 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AHHIMM004165; Sat, 10 Jan 2009 17:17:18 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200901101717.n0AHHIMM004165@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 10 Jan 2009 17:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187027 - in head: sbin/mdconfig sys/dev/md X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 17:17:20 -0000 Author: trasz Date: Sat Jan 10 17:17:18 2009 New Revision: 187027 URL: http://svn.freebsd.org/changeset/base/187027 Log: Add the possibility to specify "-o force" with "mdconfig -du". Reviewed by: scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Modified: head/sbin/mdconfig/mdconfig.8 head/sbin/mdconfig/mdconfig.c head/sys/dev/md/md.c Modified: head/sbin/mdconfig/mdconfig.8 ============================================================================== --- head/sbin/mdconfig/mdconfig.8 Sat Jan 10 16:57:22 2009 (r187026) +++ head/sbin/mdconfig/mdconfig.8 Sat Jan 10 17:17:18 2009 (r187027) @@ -62,6 +62,7 @@ .Nm .Fl d .Fl u Ar unit +.Op Fl o Oo Cm no Oc Ns Ar force .Nm .Fl l .Op Fl n Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Sat Jan 10 16:57:22 2009 (r187026) +++ head/sbin/mdconfig/mdconfig.c Sat Jan 10 17:17:18 2009 (r187027) @@ -58,7 +58,7 @@ usage() "usage: mdconfig -a -t type [-n] [-o [no]option] ... [-f file]\n" " [-s size] [-S sectorsize] [-u unit]\n" " [-x sectors/track] [-y heads/cyl]\n" -" mdconfig -d -u unit\n" +" mdconfig -d -u unit [-o [no]force]\n" " mdconfig -l [-v] [-n] [-u unit]\n"); fprintf(stderr, "\t\ttype = {malloc, preload, vnode, swap}\n"); fprintf(stderr, "\t\toption = {cluster, compress, reserve}\n"); @@ -160,6 +160,16 @@ main(int argc, char **argv) close(fd); break; case 'o': + if (action == DETACH) { + if (!strcmp(optarg, "force")) + mdio.md_options |= MD_FORCE; + else if (!strcmp(optarg, "noforce")) + mdio.md_options &= ~MD_FORCE; + else + errx(1, "Unknown option: %s.", optarg); + break; + } + if (cmdline != 2) usage(); if (!strcmp(optarg, "async")) Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Sat Jan 10 16:57:22 2009 (r187026) +++ head/sys/dev/md/md.c Sat Jan 10 17:17:18 2009 (r187027) @@ -1133,13 +1133,15 @@ xmdctlioctl(struct cdev *dev, u_long cmd mdinit(sc); return (0); case MDIOCDETACH: - if (mdio->md_mediasize != 0 || mdio->md_options != 0) + if (mdio->md_mediasize != 0 || + (mdio->md_options & ~MD_FORCE) != 0) return (EINVAL); sc = mdfind(mdio->md_unit); if (sc == NULL) return (ENOENT); - if (sc->opencount != 0 && !(sc->flags & MD_FORCE)) + if (sc->opencount != 0 && !(sc->flags & MD_FORCE) && + !(mdio->md_options & MD_FORCE)) return (EBUSY); return (mddestroy(sc, td)); case MDIOCQUERY: From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 17:22:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61ECF106564A; Sat, 10 Jan 2009 17:22:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED398FC08; Sat, 10 Jan 2009 17:22:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AHMoAK004333; Sat, 10 Jan 2009 17:22:50 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AHMngQ004327; Sat, 10 Jan 2009 17:22:49 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200901101722.n0AHMngQ004327@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 10 Jan 2009 17:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187028 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 17:22:51 -0000 Author: trasz Date: Sat Jan 10 17:22:49 2009 New Revision: 187028 URL: http://svn.freebsd.org/changeset/base/187028 Log: Don't call destroy_dev(9) with a mutex held. While here, shuffle things around so the periph destructors look alike. Based on a patch by Jaakko Heinonen. Submitted by: Jaakko Heinonen Reviewed by: scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Modified: head/sys/cam/scsi/scsi_ch.c head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_pt.c head/sys/cam/scsi/scsi_sa.c head/sys/cam/scsi/scsi_ses.c head/sys/cam/scsi/scsi_sg.c Modified: head/sys/cam/scsi/scsi_ch.c ============================================================================== --- head/sys/cam/scsi/scsi_ch.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_ch.c Sat Jan 10 17:22:49 2009 (r187028) @@ -262,9 +262,11 @@ chcleanup(struct cam_periph *periph) softc = (struct ch_softc *)periph->softc; + xpt_print(periph->path, "removing device entry\n"); devstat_remove_entry(softc->device_stats); + cam_periph_unlock(periph); destroy_dev(softc->dev); - xpt_print(periph->path, "removing device entry\n"); + cam_periph_lock(periph); free(softc, M_DEVBUF); } Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_pass.c Sat Jan 10 17:22:49 2009 (r187028) @@ -165,13 +165,12 @@ passcleanup(struct cam_periph *periph) softc = (struct pass_softc *)periph->softc; + if (bootverbose) + xpt_print(periph->path, "removing device entry\n"); devstat_remove_entry(softc->device_stats); - + cam_periph_unlock(periph); destroy_dev(softc->dev); - - if (bootverbose) { - xpt_print(periph->path, "removing device entry\n"); - } + cam_periph_lock(periph); free(softc, M_DEVBUF); } Modified: head/sys/cam/scsi/scsi_pt.c ============================================================================== --- head/sys/cam/scsi/scsi_pt.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_pt.c Sat Jan 10 17:22:49 2009 (r187028) @@ -342,11 +342,11 @@ ptdtor(struct cam_periph *periph) softc = (struct pt_softc *)periph->softc; + xpt_print(periph->path, "removing device entry\n"); devstat_remove_entry(softc->device_stats); - + cam_periph_unlock(periph); destroy_dev(softc->dev); - - xpt_print(periph->path, "removing device entry\n"); + cam_periph_lock(periph); free(softc, M_DEVBUF); } Modified: head/sys/cam/scsi/scsi_sa.c ============================================================================== --- head/sys/cam/scsi/scsi_sa.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_sa.c Sat Jan 10 17:22:49 2009 (r187028) @@ -1377,17 +1377,16 @@ sacleanup(struct cam_periph *periph) softc = (struct sa_softc *)periph->softc; + xpt_print(periph->path, "removing device entry\n"); devstat_remove_entry(softc->device_stats); - + cam_periph_unlock(periph); destroy_dev(softc->devs.ctl_dev); - for (i = 0; i < SA_NUM_MODES; i++) { destroy_dev(softc->devs.mode_devs[i].r_dev); destroy_dev(softc->devs.mode_devs[i].nr_dev); destroy_dev(softc->devs.mode_devs[i].er_dev); } - - xpt_print(periph->path, "removing device entry\n"); + cam_periph_lock(periph); free(softc, M_SCSISA); } Modified: head/sys/cam/scsi/scsi_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_ses.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_ses.c Sat Jan 10 17:22:49 2009 (r187028) @@ -227,9 +227,10 @@ sescleanup(struct cam_periph *periph) softc = (struct ses_softc *)periph->softc; - destroy_dev(softc->ses_dev); - xpt_print(periph->path, "removing device entry\n"); + cam_periph_unlock(periph); + destroy_dev(softc->ses_dev); + cam_periph_lock(periph); free(softc, M_SCSISES); } Modified: head/sys/cam/scsi/scsi_sg.c ============================================================================== --- head/sys/cam/scsi/scsi_sg.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_sg.c Sat Jan 10 17:22:49 2009 (r187028) @@ -200,11 +200,12 @@ sgcleanup(struct cam_periph *periph) struct sg_softc *softc; softc = (struct sg_softc *)periph->softc; + if (bootverbose) + xpt_print(periph->path, "removing device entry\n"); devstat_remove_entry(softc->device_stats); + cam_periph_unlock(periph); destroy_dev(softc->dev); - if (bootverbose) { - xpt_print(periph->path, "removing device entry\n"); - } + cam_periph_lock(periph); free(softc, M_DEVBUF); } From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 18:12:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85F65106566B; Sat, 10 Jan 2009 18:12:30 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id E7AD28FC1A; Sat, 10 Jan 2009 18:12:29 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5819166qwb.7 for ; Sat, 10 Jan 2009 10:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=MkeSfbO1IvA5SXEriz6h6E2zm02957qp66teFbzS1Rw=; b=ehz91Bh1SY0mVNBEoundjxkSREbZkl82zOP5gLHkVYv3rJQ0GwXIfYm13b0oGu3Ybu GnwzR/vil9S/W7e5Ncr4zNVf0cY3ODAH78nTtEI/YuExuhjgQqw292y5viPy83v0hXxF Fx8IWWJuwFis1uwY5yIFTiHoHkbLx1MzL4l8Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=R0ynSkoMwz4FgVrEU6ErO11pjPP7k0vVmFqgnecWnpraX3iFDAcSKoOuIQiOFLGwYo A8a/8FJ1XBmBBHWFvWORSbMVmeiZ9fqzYtsy/Fs2MESlP5V4BM/CyFa0DQm5TKVMFoXV WcoknsJIOczAw7Ula9vkQfKcNrpLhmHci+yow= Received: by 10.214.150.19 with SMTP id x19mr8462387qad.172.1231611149300; Sat, 10 Jan 2009 10:12:29 -0800 (PST) Received: by 10.214.81.13 with HTTP; Sat, 10 Jan 2009 10:12:29 -0800 (PST) Message-ID: Date: Sat, 10 Jan 2009 13:12:29 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Robert Watson" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> X-Google-Sender-Auth: 1b56d306f2eb726c Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 18:12:31 -0000 2009/1/10 Robert Watson : > I think Julian's analysis, that this is more of an inet option than a > socket-layer option, seems more appropriate to me, the benefits of > portability in adopting the API used by OpenBSD/BSDI/etc seem more > compelling. We should make sure that, if we move to the socket option used > on those systems, we block setting it on non-supporting protocols, or > confusion will result. In particular, Adrian's change only modified IPv4, > not IPv6, so until it's implemented on IPv6 it shouldn't be possible to set > the option. I'm happy to (eventually) also implement the BSDI API once I actually spend time looking at what the difference in behaviours are. If we're lucky, the only difference is where the socket option hooks in and the actual network behaviour is the same. (Meanwhile, I think I have to go off and implement this particular behaviour in Squid, and see if the OpenBSD support indeed does function as advertised.) Adrian From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 18:19:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 425621065672; Sat, 10 Jan 2009 18:19:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F4C28FC08; Sat, 10 Jan 2009 18:19:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AIJNfT005441; Sat, 10 Jan 2009 18:19:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AIJMsP005436; Sat, 10 Jan 2009 18:19:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901101819.n0AIJMsP005436@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 18:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187030 - in head/sys: dev/sound/pcm sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 18:19:23 -0000 Author: mav Date: Sat Jan 10 18:19:22 2009 New Revision: 187030 URL: http://svn.freebsd.org/changeset/base/187030 Log: Import some new constants and structures fields from OSSv4. Implement some OSSv4 ioctls to make ossinfo tool work and print something reasonable. Modified: head/sys/dev/sound/pcm/dsp.c head/sys/dev/sound/pcm/mixer.c head/sys/dev/sound/pcm/sound.c head/sys/dev/sound/pcm/sound.h head/sys/sys/soundcard.h Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Sat Jan 10 17:56:50 2009 (r187029) +++ head/sys/dev/sound/pcm/dsp.c Sat Jan 10 18:19:22 2009 (r187030) @@ -814,7 +814,12 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd case SNDCTL_SYSINFO: sound_oss_sysinfo((oss_sysinfo *)arg); break; + case SNDCTL_CARDINFO: + ret = sound_oss_card_info((oss_card_info *)arg); + break; case SNDCTL_AUDIOINFO: + case SNDCTL_AUDIOINFO_EX: + case SNDCTL_ENGINEINFO: ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg); break; case SNDCTL_MIXERINFO: @@ -1370,9 +1375,9 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd case SNDCTL_DSP_GETCAPS: pcm_lock(d); - *arg_i = DSP_CAP_REALTIME | DSP_CAP_MMAP | DSP_CAP_TRIGGER; + *arg_i = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER; if (rdch && wrch && !(dsp_get_flags(i_dev) & SD_F_SIMPLEX)) - *arg_i |= DSP_CAP_DUPLEX; + *arg_i |= PCM_CAP_DUPLEX; pcm_unlock(d); break; @@ -1770,18 +1775,6 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd break; #if 0 /** - * @note The SNDCTL_CARDINFO ioctl was omitted per 4Front developer - * documentation. "The usability of this call is very limited. It's - * provided only for completeness of the API. OSS API doesn't have - * any concept of card. Any information returned by this ioctl calld - * is reserved exclusively for the utility programs included in the - * OSS package. Applications should not try to use for this - * information in any ways." - */ - case SNDCTL_CARDINFO: - ret = EINVAL; - break; - /** * @note The S/PDIF interface ioctls, @c SNDCTL_DSP_READCTL and * @c SNDCTL_DSP_WRITECTL have been omitted at the suggestion of * 4Front Technologies. @@ -2282,13 +2275,14 @@ dsp_oss_audioinfo(struct cdev *i_dev, os /* * These flags stolen from SNDCTL_DSP_GETCAPS handler. * Note, however, that a single channel operates in - * only one direction, so DSP_CAP_DUPLEX is out. + * only one direction, so PCM_CAP_DUPLEX is out. */ /** * @todo @c SNDCTL_AUDIOINFO::caps - Make drivers keep * these in pcmchan::caps? */ - ai->caps = DSP_CAP_REALTIME | DSP_CAP_MMAP | DSP_CAP_TRIGGER; + ai->caps = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER | + ((ch->direction == PCMDIR_PLAY) ? PCM_CAP_OUTPUT : PCM_CAP_INPUT); /* * Collect formats supported @b natively by the @@ -2369,7 +2363,11 @@ dsp_oss_audioinfo(struct cdev *i_dev, os for (i = 0; i < ai->nrates; i++) ai->rates[i] = rates[i]; + + ai->next_play_engine = 0; + ai->next_rec_engine = 0; +printf("flags: %08x %d\n", ch->flags, ai->busy); CHN_UNLOCK(ch); } Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Sat Jan 10 17:56:50 2009 (r187029) +++ head/sys/dev/sound/pcm/mixer.c Sat Jan 10 18:19:22 2009 (r187030) @@ -1022,6 +1022,27 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo int ret, *arg_i = (int *)arg; int v = -1, j = cmd & 0xff; + /* + * Certain ioctls may be made on any type of device (audio, mixer, + * and MIDI). Handle those special cases here. + */ + if (IOCGROUP(cmd) == 'X') { + switch (cmd) { + case SNDCTL_SYSINFO: + sound_oss_sysinfo((oss_sysinfo *)arg); + return (0); + case SNDCTL_CARDINFO: + return (sound_oss_card_info((oss_card_info *)arg)); + case SNDCTL_AUDIOINFO: + case SNDCTL_AUDIOINFO_EX: + case SNDCTL_ENGINEINFO: + return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg)); + case SNDCTL_MIXERINFO: + return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg)); + } + return (ENXIO); + } + m = i_dev->si_drv1; if (m == NULL) @@ -1033,11 +1054,6 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo return (EBADF); } - if (cmd == SNDCTL_MIXERINFO) { - snd_mtxunlock(m->lock); - return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg)); - } - if ((cmd & MIXER_WRITE(0)) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC) ret = mixer_setrecsrc(m, *arg_i); @@ -1075,15 +1091,6 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo switch (cmd) { /** @todo Double check return values, error codes. */ - case SNDCTL_SYSINFO: - snd_mtxunlock(m->lock); - sound_oss_sysinfo((oss_sysinfo *)arg); - return (ret); - break; - case SNDCTL_AUDIOINFO: - snd_mtxunlock(m->lock); - return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg)); - break; case SNDCTL_DSP_GET_RECSRC_NAMES: bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo)); break; Modified: head/sys/dev/sound/pcm/sound.c ============================================================================== --- head/sys/dev/sound/pcm/sound.c Sat Jan 10 17:56:50 2009 (r187029) +++ head/sys/dev/sound/pcm/sound.c Sat Jan 10 18:19:22 2009 (r187030) @@ -1493,6 +1493,38 @@ sound_oss_sysinfo(oss_sysinfo *si) si->filler[i] = -1; } +int +sound_oss_card_info(oss_card_info *si) +{ + struct snddev_info *d; + int i, ncards; + + ncards = 0; + + for (i = 0; pcm_devclass != NULL && + i < devclass_get_maxunit(pcm_devclass); i++) { + d = devclass_get_softc(pcm_devclass, i); + if (!PCM_REGISTERED(d)) + continue; + + if (ncards++ != si->card) + continue; + + mtx_assert(d->lock, MA_NOTOWNED); + pcm_lock(d); + + strlcpy(si->shortname, device_get_nameunit(d->dev), + sizeof(si->shortname)); + strlcpy(si->longname, device_get_desc(d->dev), + sizeof(si->longname)); + strlcpy(si->hw_info, d->status, sizeof(si->hw_info)); + si->intr_count = si->ack_count = 0; + pcm_unlock(d); + return (0); + } + return (ENXIO); +} + /************************************************************************/ static int Modified: head/sys/dev/sound/pcm/sound.h ============================================================================== --- head/sys/dev/sound/pcm/sound.h Sat Jan 10 17:56:50 2009 (r187029) +++ head/sys/dev/sound/pcm/sound.h Sat Jan 10 18:19:22 2009 (r187030) @@ -601,6 +601,7 @@ struct snddev_info { }; void sound_oss_sysinfo(oss_sysinfo *); +int sound_oss_card_info(oss_card_info *); #ifdef PCM_DEBUG_MTX #define pcm_lock(d) mtx_lock(((struct snddev_info *)(d))->lock) Modified: head/sys/sys/soundcard.h ============================================================================== --- head/sys/sys/soundcard.h Sat Jan 10 17:56:50 2009 (r187029) +++ head/sys/sys/soundcard.h Sat Jan 10 18:19:22 2009 (r187030) @@ -801,18 +801,91 @@ typedef struct audio_buf_info { #define SNDCTL_DSP_NONBLOCK _IO ('P',14) #define SNDCTL_DSP_GETCAPS _IOR ('P',15, int) -#define DSP_CAP_REVISION 0x000000ff /* revision level (0 to 255) */ -#define DSP_CAP_DUPLEX 0x00000100 /* Full duplex record/playback */ -#define DSP_CAP_REALTIME 0x00000200 /* Real time capability */ -#define DSP_CAP_BATCH 0x00000400 - /* - * Device has some kind of internal buffers which may - * cause some delays and decrease precision of timing - */ -#define DSP_CAP_COPROC 0x00000800 - /* Has a coprocessor, sometimes it's a DSP but usually not */ -#define DSP_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */ -#define DSP_CAP_MMAP 0x00002000 /* Supports mmap() */ +# define PCM_CAP_REVISION 0x000000ff /* Bits for revision level (0 to 255) */ +# define PCM_CAP_DUPLEX 0x00000100 /* Full duplex record/playback */ +# define PCM_CAP_REALTIME 0x00000200 /* Not in use */ +# define PCM_CAP_BATCH 0x00000400 /* Device has some kind of */ + /* internal buffers which may */ + /* cause some delays and */ + /* decrease precision of timing */ +# define PCM_CAP_COPROC 0x00000800 /* Has a coprocessor */ + /* Sometimes it's a DSP */ + /* but usually not */ +# define PCM_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */ +# define PCM_CAP_MMAP 0x00002000 /* Supports mmap() */ +# define PCM_CAP_MULTI 0x00004000 /* Supports multiple open */ +# define PCM_CAP_BIND 0x00008000 /* Supports binding to front/rear/center/lfe */ +# define PCM_CAP_INPUT 0x00010000 /* Supports recording */ +# define PCM_CAP_OUTPUT 0x00020000 /* Supports playback */ +# define PCM_CAP_VIRTUAL 0x00040000 /* Virtual device */ +/* 0x00040000 and 0x00080000 reserved for future use */ + +/* Analog/digital control capabilities */ +# define PCM_CAP_ANALOGOUT 0x00100000 +# define PCM_CAP_ANALOGIN 0x00200000 +# define PCM_CAP_DIGITALOUT 0x00400000 +# define PCM_CAP_DIGITALIN 0x00800000 +# define PCM_CAP_ADMASK 0x00f00000 +/* + * NOTE! (capabilities & PCM_CAP_ADMASK)==0 means just that the + * digital/analog interface control features are not supported by the + * device/driver. However the device still supports analog, digital or + * both inputs/outputs (depending on the device). See the OSS Programmer's + * Guide for full details. + */ +# define PCM_CAP_SPECIAL 0x01000000 /* Not for ordinary "multimedia" use */ +# define PCM_CAP_SHADOW 0x00000000 /* OBSOLETE */ + +/* + * Preferred channel usage. These bits can be used to + * give recommendations to the application. Used by few drivers. + * For example if ((caps & DSP_CH_MASK) == DSP_CH_MONO) means that + * the device works best in mono mode. However it doesn't necessarily mean + * that the device cannot be used in stereo. These bits should only be used + * by special applications such as multi track hard disk recorders to find + * out the initial setup. However the user should be able to override this + * selection. + * + * To find out which modes are actually supported the application should + * try to select them using SNDCTL_DSP_CHANNELS. + */ +# define DSP_CH_MASK 0x06000000 /* Mask */ +# define DSP_CH_ANY 0x00000000 /* No preferred mode */ +# define DSP_CH_MONO 0x02000000 +# define DSP_CH_STEREO 0x04000000 +# define DSP_CH_MULTI 0x06000000 /* More than two channels */ + +# define PCM_CAP_HIDDEN 0x08000000 /* Hidden device */ +# define PCM_CAP_FREERATE 0x10000000 +# define PCM_CAP_MODEM 0x20000000 /* Modem device */ +# define PCM_CAP_DEFAULT 0x40000000 /* "Default" device */ + +/* + * The PCM_CAP_* capability names were known as DSP_CAP_* prior OSS 4.0 + * so it's necessary to define the older names too. + */ +#define DSP_CAP_ADMASK PCM_CAP_ADMASK +#define DSP_CAP_ANALOGIN PCM_CAP_ANALOGIN +#define DSP_CAP_ANALOGOUT PCM_CAP_ANALOGOUT +#define DSP_CAP_BATCH PCM_CAP_BATCH +#define DSP_CAP_BIND PCM_CAP_BIND +#define DSP_CAP_COPROC PCM_CAP_COPROC +#define DSP_CAP_DEFAULT PCM_CAP_DEFAULT +#define DSP_CAP_DIGITALIN PCM_CAP_DIGITALIN +#define DSP_CAP_DIGITALOUT PCM_CAP_DIGITALOUT +#define DSP_CAP_DUPLEX PCM_CAP_DUPLEX +#define DSP_CAP_FREERATE PCM_CAP_FREERATE +#define DSP_CAP_HIDDEN PCM_CAP_HIDDEN +#define DSP_CAP_INPUT PCM_CAP_INPUT +#define DSP_CAP_MMAP PCM_CAP_MMAP +#define DSP_CAP_MODEM PCM_CAP_MODEM +#define DSP_CAP_MULTI PCM_CAP_MULTI +#define DSP_CAP_OUTPUT PCM_CAP_OUTPUT +#define DSP_CAP_REALTIME PCM_CAP_REALTIME +#define DSP_CAP_REVISION PCM_CAP_REVISION +#define DSP_CAP_SHADOW PCM_CAP_SHADOW +#define DSP_CAP_TRIGGER PCM_CAP_TRIGGER +#define DSP_CAP_VIRTUAL PCM_CAP_VIRTUAL /* * What do these function do ? @@ -1785,7 +1858,9 @@ typedef struct oss_audioinfo int latency; /* In usecs, -1=unknown */ oss_devnode_t devnode; /* Device special file name (inside /dev) */ - int filler[186]; + int next_play_engine; + int next_rec_engine; + int filler[184]; } oss_audioinfo; typedef struct oss_mixerinfo @@ -1851,7 +1926,9 @@ typedef struct oss_card_info char shortname[16]; char longname[128]; int flags; - int filler[256]; + char hw_info[400]; + int intr_count, ack_count; + int filler[154]; } oss_card_info; #define SNDCTL_SYSINFO _IOR ('X', 1, oss_sysinfo) @@ -1868,6 +1945,8 @@ typedef struct oss_card_info #define SNDCTL_MIDIINFO _IOWR('X', 9, oss_midi_info) #define SNDCTL_MIXERINFO _IOWR('X',10, oss_mixerinfo) #define SNDCTL_CARDINFO _IOWR('X',11, oss_card_info) +#define SNDCTL_ENGINEINFO _IOWR('X',12, oss_audioinfo) +#define SNDCTL_AUDIOINFO_EX _IOWR('X',13, oss_audioinfo) /* * Few more "globally" available ioctl calls. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 18:28:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64EF41065674; Sat, 10 Jan 2009 18:28:11 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id 6A2EE8FC18; Sat, 10 Jan 2009 18:28:08 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from [172.27.51.2] (fw.axelero.hu [195.228.243.120]) by people.fsn.hu (Postfix) with ESMTP id 02028A7A01; Sat, 10 Jan 2009 19:28:05 +0100 (CET) Message-ID: <4968E8B4.9090309@fsn.hu> Date: Sat, 10 Jan 2009 19:28:04 +0100 From: Attila Nagy User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> In-Reply-To: X-Stationery: 0.4.8.12 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (people.fsn.hu [0.0.0.0]); Sat, 10 Jan 2009 19:28:07 +0100 (CET) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 18:28:11 -0000 Adrian Chadd wrote: > 2009/1/10 Robert Watson : > > >> I think Julian's analysis, that this is more of an inet option than a >> socket-layer option, seems more appropriate to me, the benefits of >> portability in adopting the API used by OpenBSD/BSDI/etc seem more >> compelling. We should make sure that, if we move to the socket option used >> on those systems, we block setting it on non-supporting protocols, or >> confusion will result. In particular, Adrian's change only modified IPv4, >> not IPv6, so until it's implemented on IPv6 it shouldn't be possible to set >> the option. >> > > I'm happy to (eventually) also implement the BSDI API once I actually > spend time looking at what the difference in behaviours are. If we're > lucky, the only difference is where the socket option hooks in and the > actual network behaviour is the same. > > (Meanwhile, I think I have to go off and implement this particular > behaviour in Squid, and see if the OpenBSD support indeed does > function as advertised.) > BTW, I'm eagerly waiting for somebody to implement this transparency into nginx, which can act as a reverse proxy with built-in perl logic. :) That way FreeBSD could be used as a highly flexible transparent reverse HTTP proxy. Do you know anything else which can do that now with an easy API (accessible from high level languages like perl or python)? From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 18:51:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B9A01065674; Sat, 10 Jan 2009 18:51:09 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id D19BF8FC19; Sat, 10 Jan 2009 18:51:08 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so4158724yxb.13 for ; Sat, 10 Jan 2009 10:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; bh=e2yHQ7zaohB8oOHZUhQExktsITTV6eK6PmANAjTOltk=; b=HFvj3vF8GBzkZLzlQ4r9C3edE5sCvd359Gx7AaolvaBOPcN0X3768f3T9rEypZAsk2 yqCSjhhJ8KkJNGc3C5UTwKO18BdYjcA7HyfD4gCiGqYiaWEaRQ0HaQ8EryLowYEPGdqA pxT8j5SZzDnac5oMYmcKVbl9g373wXCbo1J6w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date:cc; b=bZDr7jl5tLhYbbQm3tHpJBJ8qmXllRj8dOme9cQNO7PrFcudYwpLOHOf3V2y6nRUK/ JFcmuHA1wYy8CBJ+fofypwSZsW0JiSvVeFoCHTH8kpn8Mor7HcF/B/3MftgjMj0zYi2h 6Lgx8pv7dKh6SMcZJA/f24BHSbkrDPBjfI5bc= Received: by 10.100.105.9 with SMTP id d9mr14387129anc.142.1231613467867; Sat, 10 Jan 2009 10:51:07 -0800 (PST) Received: from ?10.98.171.71? ([32.157.62.101]) by mx.google.com with ESMTPS id b32sm1542208ana.14.2009.01.10.10.51.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 10 Jan 2009 10:51:06 -0800 (PST) References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> <4968E8B4.9090309@fsn.hu> Message-Id: From: Garrett Cooper To: Attila Nagy In-Reply-To: <4968E8B4.9090309@fsn.hu> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (5G77) Mime-Version: 1.0 (iPhone Mail 5G77) Date: Sat, 10 Jan 2009 10:50:57 -0800 Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Robert Watson , Julian Elischer , "svn-src-head@freebsd.org" Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 18:51:10 -0000 On Jan 10, 2009, at 10:28, Attila Nagy wrote: > Adrian Chadd wrote: >> 2009/1/10 Robert Watson : >> >> >>> I think Julian's analysis, that this is more of an inet option >>> than a >>> socket-layer option, seems more appropriate to me, the benefits of >>> portability in adopting the API used by OpenBSD/BSDI/etc seem more >>> compelling. We should make sure that, if we move to the socket >>> option used >>> on those systems, we block setting it on non-supporting protocols, >>> or >>> confusion will result. In particular, Adrian's change only >>> modified IPv4, >>> not IPv6, so until it's implemented on IPv6 it shouldn't be >>> possible to set >>> the option. >>> >> >> I'm happy to (eventually) also implement the BSDI API once I actually >> spend time looking at what the difference in behaviours are. If we're >> lucky, the only difference is where the socket option hooks in and >> the >> actual network behaviour is the same. >> >> (Meanwhile, I think I have to go off and implement this particular >> behaviour in Squid, and see if the OpenBSD support indeed does >> function as advertised.) >> > BTW, I'm eagerly waiting for somebody to implement this transparency > into nginx, which can act as a reverse proxy with built-in perl > logic. :) > That way FreeBSD could be used as a highly flexible transparent > reverse HTTP proxy. > > Do you know anything else which can do that now with an easy API > (accessible from high level languages like perl or python)? I'm not sure why something like an extension with swig wouldn't be the best avenue to solve the high-level language support problem... -Garrett From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 19:01:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 161DC1065670; Sat, 10 Jan 2009 19:01:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04D358FC19; Sat, 10 Jan 2009 19:01:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AJ1T4X006339; Sat, 10 Jan 2009 19:01:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AJ1TKs006338; Sat, 10 Jan 2009 19:01:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901101901.n0AJ1TKs006338@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 19:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187032 - head/sys/dev/sound/pcm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 19:01:30 -0000 Author: mav Date: Sat Jan 10 19:01:29 2009 New Revision: 187032 URL: http://svn.freebsd.org/changeset/base/187032 Log: Remove debug slipped with the previous commit. Modified: head/sys/dev/sound/pcm/dsp.c Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Sat Jan 10 19:00:17 2009 (r187031) +++ head/sys/dev/sound/pcm/dsp.c Sat Jan 10 19:01:29 2009 (r187032) @@ -2367,7 +2367,6 @@ dsp_oss_audioinfo(struct cdev *i_dev, os ai->next_play_engine = 0; ai->next_rec_engine = 0; -printf("flags: %08x %d\n", ch->flags, ai->busy); CHN_UNLOCK(ch); } From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 19:38:19 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60B0E1065673; Sat, 10 Jan 2009 19:38:19 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 3BA0A8FC1C; Sat, 10 Jan 2009 19:38:18 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 10 Jan 2009 11:38:16 -0800 Message-ID: <4968F927.1010206@elischer.org> Date: Sat, 10 Jan 2009 11:38:15 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 19:38:19 -0000 Adrian Chadd wrote: > 2009/1/10 Robert Watson : > >> I think Julian's analysis, that this is more of an inet option than a >> socket-layer option, seems more appropriate to me, the benefits of >> portability in adopting the API used by OpenBSD/BSDI/etc seem more >> compelling. We should make sure that, if we move to the socket option used >> on those systems, we block setting it on non-supporting protocols, or >> confusion will result. In particular, Adrian's change only modified IPv4, >> not IPv6, so until it's implemented on IPv6 it shouldn't be possible to set >> the option. actually I think i'm wrong in one way.. (I had been up 2 days) I was mixing in my mind two things.. the action of 'bind' whiuch this patch is about, and the action of accepting packets destined for other addresses, which is what the as yet unchecked in part.. the 'for-me' ipfw option is about. bind() of course can not be done after the socket has gone away so I don't know what I was thinking when I said that. However the protocol has the code that makes the decision as to whether the address is bindable or not, which is why I did it the way I did.. so in hte end it is still a toss up as to whether this should be a protocol or socket layer option, as ultimately the protocol has to (not) do the work. > > I'm happy to (eventually) also implement the BSDI API once I actually > spend time looking at what the difference in behaviours are. If we're > lucky, the only difference is where the socket option hooks in and the > actual network behaviour is the same. > > (Meanwhile, I think I have to go off and implement this particular > behaviour in Squid, and see if the OpenBSD support indeed does > function as advertised.) > > > > Adrian From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 19:40:20 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B539A1065670; Sat, 10 Jan 2009 19:40:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id 1945F8FC0A; Sat, 10 Jan 2009 19:40:19 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5836407qwb.7 for ; Sat, 10 Jan 2009 11:40:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=EU2Ia1C9O/cqIGmSXDS2eqWl9ldqvwWkAmUtJDmit3k=; b=MiimVvbYEj5GpIAaEaXIX9jiY3S6Qs9vAbF/g29fdnDQxxAgSe/qrsbVVxCbKnM8Ko bSGxQ1HgW8VVAh0q390wqfCCFwYFowFTgMyhKC3vxTMZ+ZqdY4i5sU+oy3G+Jhi376Br 68mBnpdEjV7euuH3Mrbp58cNFmJ+iekZ5nIsg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=dDqq4p3QOQKy8Yc1bDhzNCpMfG7Ehd3ul53RHdAkZb7FyiC5GXX7NO8a/35REHYFKT iExyL0ect+oli4UOMabPATu4nbGuVfcI+n/cJSCUjZiV+UnAJGVu6XF2/i9Iuq+cgS4w IQtAFP6pGX80rD/BSfij12n57vAl0abdpYkIk= Received: by 10.214.80.20 with SMTP id d20mr7292151qab.62.1231616419316; Sat, 10 Jan 2009 11:40:19 -0800 (PST) Received: by 10.214.81.13 with HTTP; Sat, 10 Jan 2009 11:40:19 -0800 (PST) Message-ID: Date: Sat, 10 Jan 2009 14:40:19 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Attila Nagy" In-Reply-To: <4968E8B4.9090309@fsn.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> <4968E8B4.9090309@fsn.hu> X-Google-Sender-Auth: 54ced42e2eb0b001 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 19:40:21 -0000 2009/1/10 Attila Nagy : > BTW, I'm eagerly waiting for somebody to implement this transparency into > nginx, which can act as a reverse proxy with built-in perl logic. :) > That way FreeBSD could be used as a highly flexible transparent reverse HTTP > proxy. > > Do you know anything else which can do that now with an easy API (accessible > from high level languages like perl or python)? Heh. Well, my -eventual- aim with Squid/Cacheboy may make this sort of stuff possible, but with lua and not perl. Lots of work to do before that happens though. Of course, the problem with transparency is doing it -right-, and this patch is about 1% of the total work required to solve all the problems so people don't "notice broken stuff".. Adrian From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 20:33:02 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AEA91065672; Sat, 10 Jan 2009 20:33:02 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 45EB68FC13; Sat, 10 Jan 2009 20:33:02 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 10 Jan 2009 12:33:02 -0800 Message-ID: <496905FC.2030706@elischer.org> Date: Sat, 10 Jan 2009 12:33:00 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> <4968E8B4.9090309@fsn.hu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 20:33:02 -0000 Adrian Chadd wrote: > 2009/1/10 Attila Nagy : > > >> BTW, I'm eagerly waiting for somebody to implement this transparency into >> nginx, which can act as a reverse proxy with built-in perl logic. :) >> That way FreeBSD could be used as a highly flexible transparent reverse HTTP >> proxy. >> >> Do you know anything else which can do that now with an easy API (accessible >> from high level languages like perl or python)? > > Heh. Well, my -eventual- aim with Squid/Cacheboy may make this sort of > stuff possible, but with lua and not perl. Lots of work to do before > that happens though. > > Of course, the problem with transparency is doing it -right-, and this > patch is about 1% of the total work required to solve all the problems > so people don't "notice broken stuff".. > ah, but it's the FIRST 1% :-) > > > Adrian From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 20:49:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 000D3106566C; Sat, 10 Jan 2009 20:49:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2FBC8FC0A; Sat, 10 Jan 2009 20:49:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AKnFMV008428; Sat, 10 Jan 2009 20:49:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AKnFP6008427; Sat, 10 Jan 2009 20:49:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901102049.n0AKnFP6008427@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 20:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187034 - head/sys/dev/sound/pcm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 20:49:16 -0000 Author: mav Date: Sat Jan 10 20:49:15 2009 New Revision: 187034 URL: http://svn.freebsd.org/changeset/base/187034 Log: Make devnode include full device path. This makes OSSv4 osstest tool work. Modified: head/sys/dev/sound/pcm/dsp.c Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Sat Jan 10 19:03:35 2009 (r187033) +++ head/sys/dev/sound/pcm/dsp.c Sat Jan 10 20:49:15 2009 (r187034) @@ -2339,7 +2339,8 @@ dsp_oss_audioinfo(struct cdev *i_dev, os * @c real_device - OSSv4 docs: "Obsolete." */ ai->real_device = -1; - strlcpy(ai->devnode, devname, sizeof(ai->devnode)); + strlcpy(ai->devnode, "/dev/", sizeof(ai->devnode)); + strlcat(ai->devnode, devname, sizeof(ai->devnode)); ai->enabled = device_is_attached(d->dev) ? 1 : 0; /** * @note From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 20:54:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77890106566B; Sat, 10 Jan 2009 20:54:47 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6597F8FC0A; Sat, 10 Jan 2009 20:54:47 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AKsl0e008553; Sat, 10 Jan 2009 20:54:47 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AKslsw008552; Sat, 10 Jan 2009 20:54:47 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901102054.n0AKslsw008552@svn.freebsd.org> From: "David E. O'Brien" Date: Sat, 10 Jan 2009 20:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187035 - head/sbin/mount X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 20:54:48 -0000 Author: obrien Date: Sat Jan 10 20:54:47 2009 New Revision: 187035 URL: http://svn.freebsd.org/changeset/base/187035 Log: Explicitly check each mount argv building assignment for buffer over flowing. Reviewed by: imp (earlier version of patch) Modified: head/sbin/mount/mount.c Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Sat Jan 10 20:49:15 2009 (r187034) +++ head/sbin/mount/mount.c Sat Jan 10 20:54:47 2009 (r187035) @@ -68,16 +68,21 @@ static const char rcsid[] = #define MOUNT_META_OPTION_FSTAB "fstab" #define MOUNT_META_OPTION_CURRENT "current" -#define MAX_ARGS 100 - int debug, fstab_style, verbose; +#define MAX_ARGS 100 +struct cpa { + char *a[MAX_ARGS]; + ssize_t m; + int c; +}; + char *catopt(char *, const char *); struct statfs *getmntpt(const char *); int hasopt(const char *, const char *); int ismounted(struct fstab *, struct statfs *, int); int isremountable(const char *); -void mangle(char *, int *, char *[]); +void mangle(char *, struct cpa *); char *update_options(char *, char *, int); int mountfs(const char *, const char *, const char *, int, const char *, const char *); @@ -499,12 +504,20 @@ hasopt(const char *mntopts, const char * return (found); } +static void +append_arg(struct cpa *sa, char *arg) +{ + if (sa->c >= sa->m) + errx(1, "Cannot process more than %zd mount arguments", sa->m); + + sa->a[++sa->c] = arg; +} + int mountfs(const char *vfstype, const char *spec, const char *name, int flags, const char *options, const char *mntopts) { - static int argc; - char *argv[MAX_ARGS]; + struct cpa mnt_argv; struct statfs sf; int i, ret; char *optbuf, execname[PATH_MAX], mntpath[PATH_MAX]; @@ -542,32 +555,29 @@ mountfs(const char *vfstype, const char /* Construct the name of the appropriate mount command */ (void)snprintf(execname, sizeof(execname), "mount_%s", vfstype); - argc = 0; - argv[argc++] = execname; - mangle(optbuf, &argc, argv); - argv[argc++] = strdup(spec); - argv[argc++] = strdup(name); - argv[argc] = NULL; - - if (MAX_ARGS <= argc ) - errx(1, "Cannot process more than %d mount arguments", - MAX_ARGS); + mnt_argv.m = MAX_ARGS; + mnt_argv.c = -1; + append_arg(&mnt_argv, execname); + mangle(optbuf, &mnt_argv); + append_arg(&mnt_argv, strdup(spec)); + append_arg(&mnt_argv, strdup(name)); + append_arg(&mnt_argv, NULL); if (debug) { if (use_mountprog(vfstype)) printf("exec: mount_%s", vfstype); else printf("mount -t %s", vfstype); - for (i = 1; i < argc; i++) - (void)printf(" %s", argv[i]); + for (i = 1; i < mnt_argv.c; i++) + (void)printf(" %s", mnt_argv.a[i]); (void)printf("\n"); return (0); } if (use_mountprog(vfstype)) { - ret = exec_mountprog(name, execname, argv); + ret = exec_mountprog(name, execname, mnt_argv.a); } else { - ret = mount_fs(vfstype, argc, argv); + ret = mount_fs(vfstype, mnt_argv.c, mnt_argv.a); } free(optbuf); @@ -670,12 +680,10 @@ catopt(char *s0, const char *s1) } void -mangle(char *options, int *argcp, char *argv[]) +mangle(char *options, struct cpa *a) { char *p, *s; - int argc; - argc = *argcp; for (s = options; (p = strsep(&s, ",")) != NULL;) if (*p != '\0') { if (strcmp(p, "noauto") == 0) { @@ -707,19 +715,17 @@ mangle(char *options, int *argcp, char * sizeof(groupquotaeq) - 1) == 0) { continue; } else if (*p == '-') { - argv[argc++] = p; + append_arg(a, p); p = strchr(p, '='); if (p != NULL) { *p = '\0'; - argv[argc++] = p+1; + append_arg(a, p + 1); } } else { - argv[argc++] = strdup("-o"); - argv[argc++] = p; + append_arg(a, strdup("-o")); + append_arg(a, p); } } - - *argcp = argc; } From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 21:29:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EE911065676 for ; Sat, 10 Jan 2009 21:29:58 +0000 (UTC) (envelope-from joao.barros@gmail.com) Received: from mail-bw0-f20.google.com (mail-bw0-f20.google.com [209.85.218.20]) by mx1.freebsd.org (Postfix) with ESMTP id BCE2C8FC0C for ; Sat, 10 Jan 2009 21:29:57 +0000 (UTC) (envelope-from joao.barros@gmail.com) Received: by bwz13 with SMTP id 13so4222384bwz.19 for ; Sat, 10 Jan 2009 13:29:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=s9AweqxWM7uW+9xVm7JhANGZenJdHE5qwqm6YPjXSNY=; b=bYMQNHrvGxgAgOdmvkmtLgNwpNI6+7m/KegzY+QCQKEyO4Msb7sEVRHMvA4RAqSlQ/ pn5o+3n/GAORa4LJzwlB68fxzKIATnKZnHLAMNzbMcT7foq5Opd8UT0BuERlfBEawq28 be3+pzYVZQY7JfgtTAD1mt0lGaQhkPcffRBaA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=K3IjCuzh8iGxS+aGJXXJlqGKcyBkKFejath9tgOhuQT9uHQb9jFR+9UWPR8OJHsAxA E/7PuzlrdgtdbnuH4QaXAmFj47epD9ALNoPoiS63HZQjkcGMpeFhySZzLogsYZvX5aJF KRhGqMnhMV+dwkA3EhdFr384W0n78yO4caZhk= Received: by 10.181.208.11 with SMTP id k11mr10282063bkq.180.1231621649580; Sat, 10 Jan 2009 13:07:29 -0800 (PST) Received: by 10.180.234.7 with HTTP; Sat, 10 Jan 2009 13:07:29 -0800 (PST) Message-ID: <70e8236f0901101307i39d4aacfr254b079f15d3e84a@mail.gmail.com> Date: Sat, 10 Jan 2009 21:07:29 +0000 From: "=?ISO-8859-1?Q?Jo=E3o_Barros?=" To: "Konstantin Belousov" In-Reply-To: <200901101624.n0AGOwUW003080@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901101624.n0AGOwUW003080@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r187024 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 21:29:59 -0000 On Sat, Jan 10, 2009 at 4:24 PM, Konstantin Belousov wrote: > Author: kib > Date: Sat Jan 10 16:24:58 2009 > New Revision: 187024 > URL: http://svn.freebsd.org/changeset/base/187024 > > Log: > Correct description for the Marvell 88SE6101. > > Submitted by: Andriy Gapon > MFC after: 3 days > > Modified: > head/share/misc/pci_vendors > > Modified: head/share/misc/pci_vendors > ============================================================================== > --- head/share/misc/pci_vendors Sat Jan 10 16:19:38 2009 (r187023) > +++ head/share/misc/pci_vendors Sat Jan 10 16:24:58 2009 (r187024) > @@ -4606,7 +4606,7 @@ > 6041 MV88SX6041 Marvell Technology Group Ltd. MV88SX6041 4-port SATA II PCI-X Controller (rev 03) > 6042 MV88SX6042 4-port SATA II PCI-X Controller > 6081 MV88SX6081 8-port SATA II PCI-X Controller > - 6101 6101 SATA2 Controller > + 6101 MV88SX6101 1-port UltraATA/133 Controller > 6111 6111 SATA2 Controller > 6120 6120 SATA2 Controller > 6121 6121 SATA2 Controller Could you please do the same for the 6121? Please see http://svn.freebsd.org/viewvc/base?view=revision&revision=185268 Thank you :-) -- Joao Barros From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 21:38:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0256D1065677; Sat, 10 Jan 2009 21:38:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E52EE8FC1B; Sat, 10 Jan 2009 21:38:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ALcbAa009422; Sat, 10 Jan 2009 21:38:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ALcbRe009421; Sat, 10 Jan 2009 21:38:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901102138.n0ALcbRe009421@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 21:38:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187036 - head/sys/dev/sound/pcm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 21:38:38 -0000 Author: mav Date: Sat Jan 10 21:38:37 2009 New Revision: 187036 URL: http://svn.freebsd.org/changeset/base/187036 Log: OSS tools expect EINVAL for unsupported ioctls, but not ENXIO. Modified: head/sys/dev/sound/pcm/mixer.c Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Sat Jan 10 20:54:47 2009 (r187035) +++ head/sys/dev/sound/pcm/mixer.c Sat Jan 10 21:38:37 2009 (r187036) @@ -1040,7 +1040,7 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo case SNDCTL_MIXERINFO: return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg)); } - return (ENXIO); + return (EINVAL); } m = i_dev->si_drv1; @@ -1090,7 +1090,6 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo ret = 0; switch (cmd) { - /** @todo Double check return values, error codes. */ case SNDCTL_DSP_GET_RECSRC_NAMES: bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo)); break; @@ -1104,7 +1103,7 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo *arg_i = SOUND_VERSION; break; default: - ret = ENXIO; + ret = EINVAL; break; } From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 21:50:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 144BF1065674; Sat, 10 Jan 2009 21:50:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id AB8938FC1F; Sat, 10 Jan 2009 21:50:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LLlir-000BiY-MZ; Sat, 10 Jan 2009 23:50:25 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n0ALoMpo021797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 10 Jan 2009 23:50:23 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n0ALoMdX025326; Sat, 10 Jan 2009 23:50:22 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n0ALoMM8025305; Sat, 10 Jan 2009 23:50:22 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 10 Jan 2009 23:50:22 +0200 From: Kostik Belousov To: Jo?o Barros Message-ID: <20090110215022.GO93900@deviant.kiev.zoral.com.ua> References: <200901101624.n0AGOwUW003080@svn.freebsd.org> <70e8236f0901101307i39d4aacfr254b079f15d3e84a@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PxiMezDaJQClLw92" Content-Disposition: inline In-Reply-To: <70e8236f0901101307i39d4aacfr254b079f15d3e84a@mail.gmail.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LLlir-000BiY-MZ 3d5b7d4cb3531042b12544e6db5b6093 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r187024 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 21:50:28 -0000 --PxiMezDaJQClLw92 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jan 10, 2009 at 09:07:29PM +0000, Jo?o Barros wrote: > Could you please do the same for the 6121? > Please see http://svn.freebsd.org/viewvc/base?view=revision&revision=185268 If you provide the patch for the pci_vendors, I will commit it. I have no idea what is the proper descriptive line for the device, and I do not want to interpret our ATA tables to compile the line. --PxiMezDaJQClLw92 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklpGB0ACgkQC3+MBN1Mb4h5IQCfVwxtHd8KcOsGCJV588wYkMlj ZgcAnA2/yyTW685fyXyeCjgHVJU7hGGX =oqDk -----END PGP SIGNATURE----- --PxiMezDaJQClLw92-- From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 21:53:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62F04106566B; Sat, 10 Jan 2009 21:53:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6C91F8FC19; Sat, 10 Jan 2009 21:53:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 231321349; Sat, 10 Jan 2009 23:53:21 +0200 Message-ID: <496918D5.4080905@FreeBSD.org> Date: Sat, 10 Jan 2009 23:53:25 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.17 (X11/20081029) MIME-Version: 1.0 To: Kostik Belousov References: <200901101624.n0AGOwUW003080@svn.freebsd.org> <70e8236f0901101307i39d4aacfr254b079f15d3e84a@mail.gmail.com> <20090110215022.GO93900@deviant.kiev.zoral.com.ua> In-Reply-To: <20090110215022.GO93900@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Jo?o Barros , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r187024 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 21:53:24 -0000 Kostik Belousov wrote: > On Sat, Jan 10, 2009 at 09:07:29PM +0000, Jo?o Barros wrote: >> Could you please do the same for the 6121? >> Please see http://svn.freebsd.org/viewvc/base?view=revision&revision=185268 > > If you provide the patch for the pci_vendors, I will commit it. I have > no idea what is the proper descriptive line for the device, and I do > not want to interpret our ATA tables to compile the line. This is autogenerated file. It is bad idea to touch it by hands. I would better submit fixes to the sites from which it is generated. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:48:12 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60DC7106564A; Sat, 10 Jan 2009 22:48:12 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F6AF8FC08; Sat, 10 Jan 2009 22:48:12 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AMmCFJ010722; Sat, 10 Jan 2009 22:48:12 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AMmC0D010721; Sat, 10 Jan 2009 22:48:12 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901102248.n0AMmC0D010721@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 10 Jan 2009 22:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187037 - head/usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 22:48:12 -0000 Author: ru Date: Sat Jan 10 22:48:12 2009 New Revision: 187037 URL: http://svn.freebsd.org/changeset/base/187037 Log: Fix markup and spelling. Modified: head/usr.bin/netstat/netstat.1 Modified: head/usr.bin/netstat/netstat.1 ============================================================================== --- head/usr.bin/netstat/netstat.1 Sat Jan 10 21:38:37 2009 (r187036) +++ head/usr.bin/netstat/netstat.1 Sat Jan 10 22:48:12 2009 (r187037) @@ -32,7 +32,7 @@ .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd June 10, 2007 +.Dd May 16, 2008 .Dt NETSTAT 1 .Os .Sh NAME @@ -460,12 +460,15 @@ For more information about these flags, .Pp The .Fl x -flag causes netstat to output all the information recorded about data -stored in the socket buffers. The fields are: +flag causes +.Nm +to output all the information recorded about data +stored in the socket buffers. +The fields are: .Bl -column ".Li R-MBUF" .It Li R-MBUF Ta Number of mbufs in the receive queue. .It Li S-MBUF Ta Number of mbufs in the send queue. -.It Li R-CLUS Ta Number of clusters, of any type, in the recieve +.It Li R-CLUS Ta Number of clusters, of any type, in the receive queue. .It Li S-CLUS Ta Number of clusters, of any type, in the send queue. .It Li R-HIWA Ta Receive buffer high water mark, in bytes. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:49:02 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61C74106566C; Sat, 10 Jan 2009 22:49:02 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 509708FC14; Sat, 10 Jan 2009 22:49:02 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AMn2EF010778; Sat, 10 Jan 2009 22:49:02 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AMn2rv010777; Sat, 10 Jan 2009 22:49:02 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901102249.n0AMn2rv010777@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 10 Jan 2009 22:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187038 - head/usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 22:49:03 -0000 Author: ru Date: Sat Jan 10 22:49:02 2009 New Revision: 187038 URL: http://svn.freebsd.org/changeset/base/187038 Log: Fix usage() with SYNOPSIS. Modified: head/usr.bin/netstat/main.c Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Sat Jan 10 22:48:12 2009 (r187037) +++ head/usr.bin/netstat/main.c Sat Jan 10 22:49:02 2009 (r187038) @@ -770,17 +770,18 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", -"usage: netstat [-AaLnSW] [-f protocol_family | -p protocol]\n" +"usage: netstat [-AaLnSWx] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", -" netstat -i | -I interface [-abdhnt] [-f address_family]\n" +" netstat -i | -I interface [-abdhntW] [-f address_family]\n" " [-M core] [-N system]", " netstat -w wait [-I interface] [-d] [-M core] [-N system]", -" netstat -s [-s] [-z] [-f protocol_family | -p protocol] [-M core]", +" netstat -s [-s] [-z] [-f protocol_family | -p protocol]\n" +" [-M core] [-N system]", " netstat -i | -I interface -s [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -m [-M core] [-N system]", -" netstat -B [ -I interface]", -" netstat -r [-AenW] [-f address_family] [-M core] [-N system]", +" netstat -B [-I interface]", +" netstat -r [-AanW] [-f address_family] [-M core] [-N system]", " netstat -rs [-s] [-M core] [-N system]", " netstat -g [-W] [-f address_family] [-M core] [-N system]", " netstat -gs [-s] [-f address_family] [-M core] [-N system]"); From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 23:33:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D923F106566C; Sat, 10 Jan 2009 23:33:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AF6A58FC16; Sat, 10 Jan 2009 23:33:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 5009846B32; Sat, 10 Jan 2009 18:33:17 -0500 (EST) Date: Sat, 10 Jan 2009 23:33:17 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Adrian Chadd In-Reply-To: Message-ID: References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 23:33:18 -0000 On Sat, 10 Jan 2009, Adrian Chadd wrote: > 2009/1/10 Robert Watson : > >> I think Julian's analysis, that this is more of an inet option than a >> socket-layer option, seems more appropriate to me, the benefits of >> portability in adopting the API used by OpenBSD/BSDI/etc seem more >> compelling. We should make sure that, if we move to the socket option used >> on those systems, we block setting it on non-supporting protocols, or >> confusion will result. In particular, Adrian's change only modified IPv4, >> not IPv6, so until it's implemented on IPv6 it shouldn't be possible to set >> the option. > > I'm happy to (eventually) also implement the BSDI API once I actually spend > time looking at what the difference in behaviours are. If we're lucky, the > only difference is where the socket option hooks in and the actual network > behaviour is the same. > > (Meanwhile, I think I have to go off and implement this particular behaviour > in Squid, and see if the OpenBSD support indeed does function as > advertised.) If the API turns out to be effectly semantically the same, or better, then I think the suggestion is to entirely replace, rather than supplement, the socket option you just added with it. There's no point in having pointlessly divergent APIs where it can be avoided. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 23:35:12 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0D92106564A; Sat, 10 Jan 2009 23:35:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 50B868FC16; Sat, 10 Jan 2009 23:35:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5870981qwb.7 for ; Sat, 10 Jan 2009 15:35:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=WF8TFPwZEnW+k9ggWM3TCO8IZUsVYGVwv/Ukdugkqs4=; b=bdg1zrEfPck6ReovNsr6yTl6r+I4wXnfnE2VBPFYeWV3us+ikuj3RXlBFQzyJh+jPL WDZjQXNr83IrlnrsTwQ+bPAzFD6NhysATY9buzlJeg7FomWGU2k+54p4lbgE3ZbJSnLS nqqoyTD2e3KmNun0wTbc4SgSPj4OtJULPOpDk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=T328oSKWGLtWUW7WZdKpXCXxSBv7hMZCBySUvdU5AiYgarIywwut0hgjEtZDq+JJj2 BuJQkn7YugSCkwfBwWp1YQzfTiTGz4VeQhmXL/z7jzoGx6XQ7SGj+PQFVLfVgti16NfM Wh3KvlpUTX11KF6LWqAeTrN1v13qeXsBzaon8= Received: by 10.214.11.11 with SMTP id 11mr24086563qak.308.1231630511767; Sat, 10 Jan 2009 15:35:11 -0800 (PST) Received: by 10.214.81.13 with HTTP; Sat, 10 Jan 2009 15:35:11 -0800 (PST) Message-ID: Date: Sat, 10 Jan 2009 18:35:11 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Robert Watson" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> X-Google-Sender-Auth: 148f1030c9c29b9d Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 23:35:13 -0000 2009/1/10 Robert Watson : > If the API turns out to be effectly semantically the same, or better, then I > think the suggestion is to entirely replace, rather than supplement, the > socket option you just added with it. There's no point in having > pointlessly divergent APIs where it can be avoided. I'll look into it. Adrian From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 23:50:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C5E01065670; Sat, 10 Jan 2009 23:50:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A6AF8FC19; Sat, 10 Jan 2009 23:50:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ANoNgs011966; Sat, 10 Jan 2009 23:50:23 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ANoN3F011965; Sat, 10 Jan 2009 23:50:23 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901102350.n0ANoN3F011965@svn.freebsd.org> From: Robert Watson Date: Sat, 10 Jan 2009 23:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187039 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 23:50:23 -0000 Author: rwatson Date: Sat Jan 10 23:50:23 2009 New Revision: 187039 URL: http://svn.freebsd.org/changeset/base/187039 Log: Do invoke mac_ifnet_check_transmit() and mac_ifnet_create_mbuf() in the loopback and synthetic loopback code so that packets are access control checked and relabeled. Previously, the MAC Framework enforced that packets sent over the loopback weren't relabeled, but this will allow policies to make explicit choices about how and whether to relabel packets on the loopback. Also, for SIMPLEX devices, this produces more consistent behavior for looped back packets to the local MAC address by labeling those packets as coming from the interface. Discussed with: csjp Obtained from: TrustedBSD Project Modified: head/sys/net/if_loop.c Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Sat Jan 10 22:49:02 2009 (r187038) +++ head/sys/net/if_loop.c Sat Jan 10 23:50:23 2009 (r187039) @@ -38,6 +38,7 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipx.h" +#include "opt_mac.h" #include #include @@ -82,6 +83,8 @@ #include #endif +#include + #ifdef TINY_LOMTU #define LOMTU (1024+512) #elif defined(LARGE_LOMTU) @@ -176,9 +179,20 @@ looutput(struct ifnet *ifp, struct mbuf struct rtentry *rt) { u_int32_t af; +#ifdef MAC + int error; +#endif M_ASSERTPKTHDR(m); /* check if we have the packet header */ +#ifdef MAC + error = mac_ifnet_check_transmit(ifp, m); + if (error) { + m_freem(m); + return (error); + } +#endif + if (rt && rt->rt_flags & (RTF_REJECT|RTF_BLACKHOLE)) { m_freem(m); return (rt->rt_flags & RTF_BLACKHOLE ? 0 : @@ -230,6 +244,10 @@ if_simloop(struct ifnet *ifp, struct mbu m_tag_delete_nonpersistent(m); m->m_pkthdr.rcvif = ifp; +#ifdef MAC + mac_ifnet_create_mbuf(ifp, m); +#endif + /* * Let BPF see incoming packet in the following manner: * - Emulated packet loopback for a simplex interface