From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 00:08: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 D27171065672; Sun, 11 Oct 2009 00:08:55 +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 C1D6F8FC0A; Sun, 11 Oct 2009 00:08:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9B08t8P095924; Sun, 11 Oct 2009 00:08:55 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9B08tQc095922; Sun, 11 Oct 2009 00:08:55 GMT (envelope-from das@svn.freebsd.org) Message-Id: <200910110008.n9B08tQc095922@svn.freebsd.org> From: David Schultz Date: Sun, 11 Oct 2009 00:08: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: r197949 - 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: Sun, 11 Oct 2009 00:08:55 -0000 Author: das Date: Sun Oct 11 00:08:55 2009 New Revision: 197949 URL: http://svn.freebsd.org/changeset/base/197949 Log: Document errno codes added in r144530. Modified: head/lib/libc/sys/intro.2 Modified: head/lib/libc/sys/intro.2 ============================================================================== --- head/lib/libc/sys/intro.2 Sat Oct 10 22:29:34 2009 (r197948) +++ head/lib/libc/sys/intro.2 Sun Oct 11 00:08:55 2009 (r197949) @@ -456,6 +456,14 @@ The specified extended attribute does no .It Er 88 EDOOFUS Em "Programming error" . A function or API is being abused in a way which could only be detected at run-time. +.It Er 89 EBADMSG Em "Bad message" . +A corrupted message was detected. +.It Er 90 EMULTIHOP Em "Multihop attempted" . +This error code is unused, but present for compatibility with other systems. +.It Er 91 ENOLINK Em "Link has been severed" . +This error code is unused, but present for compatibility with other systems. +.It Er 92 EPROTO Em "Protocol error" . +A device or socket encountered an unrecoverable protocol error. .It Er 93 ENOTCAPABLE Em "Capabilities insufficient" . An operation on a capability file descriptor requires greater privilege than the capability allows. From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 01:51: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 35A9B106566B; Sun, 11 Oct 2009 01:51:36 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24DE28FC0A; Sun, 11 Oct 2009 01:51:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9B1paxm097789; Sun, 11 Oct 2009 01:51:36 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9B1panj097787; Sun, 11 Oct 2009 01:51:36 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200910110151.n9B1panj097787@svn.freebsd.org> From: Robert Noland Date: Sun, 11 Oct 2009 01:51: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: r197950 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 11 Oct 2009 01:51:36 -0000 Author: rnoland Date: Sun Oct 11 01:51:35 2009 New Revision: 197950 URL: http://svn.freebsd.org/changeset/base/197950 Log: Add pci id's for Intel G41 chipset Submitted by: Artyom Mirgorodsky MFC after: 3 days Modified: head/sys/dev/agp/agp_i810.c Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Sun Oct 11 00:08:55 2009 (r197949) +++ head/sys/dev/agp/agp_i810.c Sun Oct 11 01:51:35 2009 (r197950) @@ -175,6 +175,8 @@ static const struct agp_i810_match { "Intel Q45 SVGA controller"}, {0x2E228086, CHIP_G4X, 0x00020000, "Intel G45 SVGA controller"}, + {0x2E328086, CHIP_G4X, 0x00020000, + "Intel G41 SVGA controller"}, {0, 0, 0, NULL} }; From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 01:54: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 7E94E106568D; Sun, 11 Oct 2009 01:54:01 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D8C38FC20; Sun, 11 Oct 2009 01:54:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9B1s1kT097870; Sun, 11 Oct 2009 01:54:01 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9B1s1lw097867; Sun, 11 Oct 2009 01:54:01 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200910110154.n9B1s1lw097867@svn.freebsd.org> From: Robert Noland Date: Sun, 11 Oct 2009 01:54: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: r197951 - head/sys/dev/drm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 11 Oct 2009 01:54:01 -0000 Author: rnoland Date: Sun Oct 11 01:54:00 2009 New Revision: 197951 URL: http://svn.freebsd.org/changeset/base/197951 Log: Add support for Intel G41 chipset Submitted by: Artyom Mirgorodsky MFC after: 3 days Modified: head/sys/dev/drm/drm_pciids.h head/sys/dev/drm/i915_drv.h Modified: head/sys/dev/drm/drm_pciids.h ============================================================================== --- head/sys/dev/drm/drm_pciids.h Sun Oct 11 01:51:35 2009 (r197950) +++ head/sys/dev/drm/drm_pciids.h Sun Oct 11 01:54:00 2009 (r197951) @@ -552,6 +552,7 @@ {0x8086, 0x2E02, CHIP_I9XX|CHIP_I965, "Intel Integrated Graphics Device"}, \ {0x8086, 0x2E12, CHIP_I9XX|CHIP_I965, "Intel Q45/Q43"}, \ {0x8086, 0x2E22, CHIP_I9XX|CHIP_I965, "Intel G45/G43"}, \ + {0x8086, 0x2E32, CHIP_I9XX|CHIP_I965, "Intel G41"}, \ {0, 0, 0, NULL} #define imagine_PCI_IDS \ Modified: head/sys/dev/drm/i915_drv.h ============================================================================== --- head/sys/dev/drm/i915_drv.h Sun Oct 11 01:51:35 2009 (r197950) +++ head/sys/dev/drm/i915_drv.h Sun Oct 11 01:54:00 2009 (r197951) @@ -644,7 +644,8 @@ extern int i915_wait_ring(struct drm_dev (dev)->pci_device == 0x2A42 || \ (dev)->pci_device == 0x2E02 || \ (dev)->pci_device == 0x2E12 || \ - (dev)->pci_device == 0x2E22) + (dev)->pci_device == 0x2E22 || \ + (dev)->pci_device == 0x2E32) #define IS_I965GM(dev) ((dev)->pci_device == 0x2A02) @@ -653,6 +654,7 @@ extern int i915_wait_ring(struct drm_dev #define IS_G4X(dev) ((dev)->pci_device == 0x2E02 || \ (dev)->pci_device == 0x2E12 || \ (dev)->pci_device == 0x2E22 || \ + (dev)->pci_device == 0x2E32 || \ IS_GM45(dev)) #define IS_G33(dev) ((dev)->pci_device == 0x29C2 || \ From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 05:59: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 CFE47106566B; Sun, 11 Oct 2009 05:59:43 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD01A8FC0A; Sun, 11 Oct 2009 05:59:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9B5xhCv002544; Sun, 11 Oct 2009 05:59:43 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9B5xhNg002528; Sun, 11 Oct 2009 05:59:43 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200910110559.n9B5xhNg002528@svn.freebsd.org> From: Julian Elischer Date: Sun, 11 Oct 2009 05:59: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: r197952 - in head/sys: net netgraph netinet netinet/ipfw 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, 11 Oct 2009 05:59:43 -0000 Author: julian Date: Sun Oct 11 05:59:43 2009 New Revision: 197952 URL: http://svn.freebsd.org/changeset/base/197952 Log: Virtualize the pfil hooks so that different jails may chose different packet filters. ALso allows ipfw to be enabled on on ejail and disabled on another. In 8.0 it's a global setting. Sitting aroung in tree waiting to commit for: 2 months MFC after: 2 months Modified: head/sys/net/if_bridge.c head/sys/net/if_ethersubr.c head/sys/net/pfil.c head/sys/netgraph/ng_bridge.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet/ip_var.h head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_pfil.c head/sys/netinet/raw_ip.c head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_output.c head/sys/netinet6/ip6_var.h Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/net/if_bridge.c Sun Oct 11 05:59:43 2009 (r197952) @@ -109,6 +109,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* for struct arpcom */ #include @@ -1800,9 +1801,9 @@ bridge_dummynet(struct mbuf *m, struct i return; } - if (PFIL_HOOKED(&inet_pfil_hook) + if (PFIL_HOOKED(&V_inet_pfil_hook) #ifdef INET6 - || PFIL_HOOKED(&inet6_pfil_hook) + || PFIL_HOOKED(&V_inet6_pfil_hook) #endif ) { if (bridge_pfil(&m, sc->sc_ifp, ifp, PFIL_OUT) != 0) @@ -2062,9 +2063,9 @@ bridge_forward(struct bridge_softc *sc, ETHER_BPF_MTAP(ifp, m); /* run the packet filter */ - if (PFIL_HOOKED(&inet_pfil_hook) + if (PFIL_HOOKED(&V_inet_pfil_hook) #ifdef INET6 - || PFIL_HOOKED(&inet6_pfil_hook) + || PFIL_HOOKED(&V_inet6_pfil_hook) #endif ) { BRIDGE_UNLOCK(sc); @@ -2102,9 +2103,9 @@ bridge_forward(struct bridge_softc *sc, BRIDGE_UNLOCK(sc); - if (PFIL_HOOKED(&inet_pfil_hook) + if (PFIL_HOOKED(&V_inet_pfil_hook) #ifdef INET6 - || PFIL_HOOKED(&inet6_pfil_hook) + || PFIL_HOOKED(&V_inet6_pfil_hook) #endif ) { if (bridge_pfil(&m, ifp, dst_if, PFIL_OUT) != 0) @@ -2243,7 +2244,7 @@ bridge_input(struct ifnet *ifp, struct m #ifdef INET6 # define OR_PFIL_HOOKED_INET6 \ - || PFIL_HOOKED(&inet6_pfil_hook) + || PFIL_HOOKED(&V_inet6_pfil_hook) #else # define OR_PFIL_HOOKED_INET6 #endif @@ -2260,7 +2261,7 @@ bridge_input(struct ifnet *ifp, struct m iface->if_ipackets++; \ /* Filter on the physical interface. */ \ if (pfil_local_phys && \ - (PFIL_HOOKED(&inet_pfil_hook) \ + (PFIL_HOOKED(&V_inet_pfil_hook) \ OR_PFIL_HOOKED_INET6)) { \ if (bridge_pfil(&m, NULL, ifp, \ PFIL_IN) != 0 || m == NULL) { \ @@ -2349,9 +2350,9 @@ bridge_broadcast(struct bridge_softc *sc } /* Filter on the bridge interface before broadcasting */ - if (runfilt && (PFIL_HOOKED(&inet_pfil_hook) + if (runfilt && (PFIL_HOOKED(&V_inet_pfil_hook) #ifdef INET6 - || PFIL_HOOKED(&inet6_pfil_hook) + || PFIL_HOOKED(&V_inet6_pfil_hook) #endif )) { if (bridge_pfil(&m, sc->sc_ifp, NULL, PFIL_OUT) != 0) @@ -2396,9 +2397,9 @@ bridge_broadcast(struct bridge_softc *sc * pointer so we do not redundantly filter on the bridge for * each interface we broadcast on. */ - if (runfilt && (PFIL_HOOKED(&inet_pfil_hook) + if (runfilt && (PFIL_HOOKED(&V_inet_pfil_hook) #ifdef INET6 - || PFIL_HOOKED(&inet6_pfil_hook) + || PFIL_HOOKED(&V_inet6_pfil_hook) #endif )) { if (used == 0) { @@ -3037,7 +3038,7 @@ bridge_pfil(struct mbuf **mp, struct ifn goto bad; } - if (ip_fw_chk_ptr && pfil_ipfw != 0 && dir == PFIL_OUT && ifp != NULL) { + if (V_ip_fw_chk_ptr && pfil_ipfw != 0 && dir == PFIL_OUT && ifp != NULL) { struct dn_pkt_tag *dn_tag; error = -1; @@ -3057,7 +3058,7 @@ bridge_pfil(struct mbuf **mp, struct ifn args.next_hop = NULL; args.eh = &eh2; args.inp = NULL; /* used by ipfw uid/gid/jail rules */ - i = ip_fw_chk_ptr(&args); + i = V_ip_fw_chk_ptr(&args); *mp = args.m; if (*mp == NULL) @@ -3109,21 +3110,21 @@ ipfwpass: * in_if -> bridge_if -> out_if */ if (pfil_bridge && dir == PFIL_OUT && bifp != NULL) - error = pfil_run_hooks(&inet_pfil_hook, mp, bifp, + error = pfil_run_hooks(&V_inet_pfil_hook, mp, bifp, dir, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; if (pfil_member && ifp != NULL) - error = pfil_run_hooks(&inet_pfil_hook, mp, ifp, + error = pfil_run_hooks(&V_inet_pfil_hook, mp, ifp, dir, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; if (pfil_bridge && dir == PFIL_IN && bifp != NULL) - error = pfil_run_hooks(&inet_pfil_hook, mp, bifp, + error = pfil_run_hooks(&V_inet_pfil_hook, mp, bifp, dir, NULL); if (*mp == NULL || error != 0) /* filter may consume */ @@ -3163,21 +3164,21 @@ ipfwpass: #ifdef INET6 case ETHERTYPE_IPV6: if (pfil_bridge && dir == PFIL_OUT && bifp != NULL) - error = pfil_run_hooks(&inet6_pfil_hook, mp, bifp, + error = pfil_run_hooks(&V_inet6_pfil_hook, mp, bifp, dir, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; if (pfil_member && ifp != NULL) - error = pfil_run_hooks(&inet6_pfil_hook, mp, ifp, + error = pfil_run_hooks(&V_inet6_pfil_hook, mp, ifp, dir, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; if (pfil_bridge && dir == PFIL_IN && bifp != NULL) - error = pfil_run_hooks(&inet6_pfil_hook, mp, bifp, + error = pfil_run_hooks(&V_inet6_pfil_hook, mp, bifp, dir, NULL); break; #endif Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/net/if_ethersubr.c Sun Oct 11 05:59:43 2009 (r197952) @@ -434,7 +434,7 @@ ether_output_frame(struct ifnet *ifp, st { #if defined(INET) || defined(INET6) - if (ip_fw_chk_ptr && V_ether_ipfw != 0) { + if (V_ip_fw_chk_ptr && V_ether_ipfw != 0) { if (ether_ipfw_chk(&m, ifp, 0) == 0) { if (m) { m_freem(m); @@ -502,7 +502,7 @@ ether_ipfw_chk(struct mbuf **m0, struct args.next_hop = NULL; /* we do not support forward yet */ args.eh = &save_eh; /* MAC header for bridged/MAC packets */ args.inp = NULL; /* used by ipfw uid/gid/jail rules */ - i = ip_fw_chk_ptr(&args); + i = V_ip_fw_chk_ptr(&args); m = args.m; if (m != NULL) { /* @@ -775,7 +775,7 @@ ether_demux(struct ifnet *ifp, struct mb * Allow dummynet and/or ipfw to claim the frame. * Do not do this for PROMISC frames in case we are re-entered. */ - if (ip_fw_chk_ptr && V_ether_ipfw != 0 && !(m->m_flags & M_PROMISC)) { + if (V_ip_fw_chk_ptr && V_ether_ipfw != 0 && !(m->m_flags & M_PROMISC)) { if (ether_ipfw_chk(&m, NULL, 0) == 0) { if (m) m_freem(m); /* dropped; free mbuf chain */ Modified: head/sys/net/pfil.c ============================================================================== --- head/sys/net/pfil.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/net/pfil.c Sun Oct 11 05:59:43 2009 (r197952) @@ -56,8 +56,9 @@ static int pfil_list_add(pfil_list_t *, static int pfil_list_remove(pfil_list_t *, int (*)(void *, struct mbuf **, struct ifnet *, int, struct inpcb *), void *); -LIST_HEAD(, pfil_head) pfil_head_list = - LIST_HEAD_INITIALIZER(&pfil_head_list); +LIST_HEAD(pfilheadhead, pfil_head); +VNET_DEFINE(struct pfilheadhead, pfil_head_list); +#define V_pfil_head_list VNET(pfil_head_list) /* * pfil_run_hooks() runs the specified packet filter hooks. @@ -97,7 +98,7 @@ pfil_head_register(struct pfil_head *ph) struct pfil_head *lph; PFIL_LIST_LOCK(); - LIST_FOREACH(lph, &pfil_head_list, ph_list) { + LIST_FOREACH(lph, &V_pfil_head_list, ph_list) { if (ph->ph_type == lph->ph_type && ph->ph_un.phu_val == lph->ph_un.phu_val) { PFIL_LIST_UNLOCK(); @@ -108,7 +109,7 @@ pfil_head_register(struct pfil_head *ph) ph->ph_nhooks = 0; TAILQ_INIT(&ph->ph_in); TAILQ_INIT(&ph->ph_out); - LIST_INSERT_HEAD(&pfil_head_list, ph, ph_list); + LIST_INSERT_HEAD(&V_pfil_head_list, ph, ph_list); PFIL_LIST_UNLOCK(); return (0); } @@ -143,7 +144,7 @@ pfil_head_get(int type, u_long val) struct pfil_head *ph; PFIL_LIST_LOCK(); - LIST_FOREACH(ph, &pfil_head_list, ph_list) + LIST_FOREACH(ph, &V_pfil_head_list, ph_list) if (ph->ph_type == type && ph->ph_un.phu_val == val) break; PFIL_LIST_UNLOCK(); @@ -284,3 +285,45 @@ pfil_list_remove(pfil_list_t *list, } return ENOENT; } + +/**************** + * Stuff that must be initialized for every instance + * (including the first of course). + */ +static int +vnet_pfil_init(const void *unused) +{ + LIST_INIT(&V_pfil_head_list); + return (0); +} + +/*********************** + * Called for the removal of each instance. + */ +static int +vnet_pfil_uninit(const void *unused) +{ + /* XXX should panic if list is not empty */ + return 0; +} + +/* Define startup order. */ +#define PFIL_SYSINIT_ORDER SI_SUB_PROTO_BEGIN +#define PFIL_MODEVENT_ORDER (SI_ORDER_FIRST) /* On boot slot in here. */ +#define PFIL_VNET_ORDER (PFIL_MODEVENT_ORDER + 2) /* Later still. */ + +/* + * Starting up. + * VNET_SYSINIT is called for each existing vnet and each new vnet. + */ +VNET_SYSINIT(vnet_pfil_init, PFIL_SYSINIT_ORDER, PFIL_VNET_ORDER, + vnet_pfil_init, NULL); + +/* + * Closing up shop. These are done in REVERSE ORDER, + * Not called on reboot. + * VNET_SYSUNINIT is called for each exiting vnet as it exits. + */ +VNET_SYSUNINIT(vnet_pfil_uninit, PFIL_SYSINIT_ORDER, PFIL_VNET_ORDER, + vnet_pfil_uninit, NULL); + Modified: head/sys/netgraph/ng_bridge.c ============================================================================== --- head/sys/netgraph/ng_bridge.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netgraph/ng_bridge.c Sun Oct 11 05:59:43 2009 (r197952) @@ -634,7 +634,7 @@ ng_bridge_rcvdata(hook_p hook, item_p it /* Run packet through ipfw processing, if enabled */ #if 0 - if (priv->conf.ipfw[linkNum] && V_fw_enable && ip_fw_chk_ptr != NULL) { + if (priv->conf.ipfw[linkNum] && V_fw_enable && V_ip_fw_chk_ptr != NULL) { /* XXX not implemented yet */ } #endif Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netinet/ip_fastfwd.c Sun Oct 11 05:59:43 2009 (r197952) @@ -351,10 +351,11 @@ ip_fastforward(struct mbuf *m) /* * Run through list of ipfilter hooks for input packets */ - if (!PFIL_HOOKED(&inet_pfil_hook)) + if (!PFIL_HOOKED(&V_inet_pfil_hook)) goto passin; - if (pfil_run_hooks(&inet_pfil_hook, &m, m->m_pkthdr.rcvif, PFIL_IN, NULL) || + if (pfil_run_hooks( + &V_inet_pfil_hook, &m, m->m_pkthdr.rcvif, PFIL_IN, NULL) || m == NULL) goto drop; @@ -438,10 +439,10 @@ passin: /* * Run through list of hooks for output packets. */ - if (!PFIL_HOOKED(&inet_pfil_hook)) + if (!PFIL_HOOKED(&V_inet_pfil_hook)) goto passout; - if (pfil_run_hooks(&inet_pfil_hook, &m, ifp, PFIL_OUT, NULL) || m == NULL) { + if (pfil_run_hooks(&V_inet_pfil_hook, &m, ifp, PFIL_OUT, NULL) || m == NULL) { goto drop; } Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netinet/ip_input.c Sun Oct 11 05:59:43 2009 (r197952) @@ -170,7 +170,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, &VNET_NAME(ip_checkinterface), 0, "Verify packet arrives on correct interface"); -struct pfil_head inet_pfil_hook; /* Packet filter hooks */ +VNET_DEFINE(struct pfil_head, inet_pfil_hook); /* Packet filter hooks */ static struct netisr_handler ip_nh = { .nh_name = "ip", @@ -318,6 +318,13 @@ ip_init(void) NULL, UMA_ALIGN_PTR, 0); maxnipq_update(); + /* Initialize packet filter hooks. */ + V_inet_pfil_hook.ph_type = PFIL_TYPE_AF; + V_inet_pfil_hook.ph_af = AF_INET; + if ((i = pfil_head_register(&V_inet_pfil_hook)) != 0) + printf("%s: WARNING: unable to register pfil hook, " + "error %d\n", __func__, i); + #ifdef FLOWTABLE TUNABLE_INT_FETCH("net.inet.ip.output_flowtable_size", &V_ip_output_flowtable_size); @@ -348,13 +355,6 @@ ip_init(void) ip_protox[pr->pr_protocol] = pr - inetsw; } - /* Initialize packet filter hooks. */ - inet_pfil_hook.ph_type = PFIL_TYPE_AF; - inet_pfil_hook.ph_af = AF_INET; - if ((i = pfil_head_register(&inet_pfil_hook)) != 0) - printf("%s: WARNING: unable to register pfil hook, " - "error %d\n", __func__, i); - /* Start ipport_tick. */ callout_init(&ipport_tick_callout, CALLOUT_MPSAFE); callout_reset(&ipport_tick_callout, 1, ipport_tick, NULL); @@ -510,11 +510,11 @@ tooshort: */ /* Jump over all PFIL processing if hooks are not active. */ - if (!PFIL_HOOKED(&inet_pfil_hook)) + if (!PFIL_HOOKED(&V_inet_pfil_hook)) goto passin; odst = ip->ip_dst; - if (pfil_run_hooks(&inet_pfil_hook, &m, ifp, PFIL_IN, NULL) != 0) + if (pfil_run_hooks(&V_inet_pfil_hook, &m, ifp, PFIL_IN, NULL) != 0) return; if (m == NULL) /* consumed by filter */ return; Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netinet/ip_output.c Sun Oct 11 05:59:43 2009 (r197952) @@ -489,12 +489,12 @@ sendit: #endif /* IPSEC */ /* Jump over all PFIL processing if hooks are not active. */ - if (!PFIL_HOOKED(&inet_pfil_hook)) + if (!PFIL_HOOKED(&V_inet_pfil_hook)) goto passout; /* Run through list of hooks for output packets. */ odst.s_addr = ip->ip_dst.s_addr; - error = pfil_run_hooks(&inet_pfil_hook, &m, ifp, PFIL_OUT, inp); + error = pfil_run_hooks(&V_inet_pfil_hook, &m, ifp, PFIL_OUT, inp); if (error != 0 || m == NULL) goto done; Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netinet/ip_var.h Sun Oct 11 05:59:43 2009 (r197952) @@ -244,14 +244,20 @@ extern int (*ip_rsvp_vif)(struct socket extern void (*ip_rsvp_force_done)(struct socket *); extern void (*rsvp_input_p)(struct mbuf *m, int off); -extern struct pfil_head inet_pfil_hook; /* packet filter hooks */ +VNET_DECLARE(struct pfil_head, inet_pfil_hook); /* packet filter hooks */ +#define V_inet_pfil_hook VNET(inet_pfil_hook) void in_delayed_cksum(struct mbuf *m); /* ipfw and dummynet hooks. Most are declared in raw_ip.c */ struct ip_fw_args; -extern int (*ip_fw_chk_ptr)(struct ip_fw_args *args); -extern int (*ip_fw_ctl_ptr)(struct sockopt *); +typedef int (*ip_fw_chk_ptr_t)(struct ip_fw_args *args); +typedef int (*ip_fw_ctl_ptr_t)(struct sockopt *); +VNET_DECLARE(ip_fw_chk_ptr_t, ip_fw_chk_ptr); +VNET_DECLARE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr); +#define V_ip_fw_chk_ptr VNET(ip_fw_chk_ptr) +#define V_ip_fw_ctl_ptr VNET(ip_fw_ctl_ptr) + extern int (*ip_dn_ctl_ptr)(struct sockopt *); extern int (*ip_dn_io_ptr)(struct mbuf **m, int dir, struct ip_fw_args *fwa); extern void (*ip_dn_ruledel_ptr)(void *); /* in ip_fw2.c */ Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netinet/ipfw/ip_fw2.c Sun Oct 11 05:59:43 2009 (r197952) @@ -2495,6 +2495,10 @@ do { \ } IPFW_RLOCK(chain); + if (! V_ipfw_vnet_ready) { /* shutting down, leave NOW. */ + IPFW_RUNLOCK(chain); + return (IP_FW_PASS); /* accept */ + } mtag = m_tag_find(m, PACKET_TAG_DIVERT, NULL); if (args->rule) { /* @@ -4637,29 +4641,21 @@ ipfw_init(void) printf("limited to %d packets/entry by default\n", V_verbose_limit); - /* - * Hook us up to pfil. - * Eventually pfil will be per vnet. - */ - if ((error = ipfw_hook()) != 0) { - printf("ipfw_hook() error\n"); - return (error); - } -#ifdef INET6 - if ((error = ipfw6_hook()) != 0) { - printf("ipfw6_hook() error\n"); - return (error); - } -#endif - /* - * Other things that are only done the first time. - * (now that we are guaranteed of success). - */ - ip_fw_ctl_ptr = ipfw_ctl; - ip_fw_chk_ptr = ipfw_chk; return (error); } +/********************** + * Called for the removal of the last instance only on module unload. + */ +static void +ipfw_destroy(void) +{ + + uma_zdestroy(ipfw_dyn_rule_zone); + IPFW_DYN_LOCK_DESTROY(); + printf("IP firewall unloaded\n"); +} + /**************** * Stuff that must be initialized for every instance * (including the first of course). @@ -4743,19 +4739,30 @@ vnet_ipfw_init(const void *unused) /* First set up some values that are compile time options */ V_ipfw_vnet_ready = 1; /* Open for business */ - return (0); -} -/********************** - * Called for the removal of the last instance only on module unload. - */ -static void -ipfw_destroy(void) -{ + /* Hook up the raw inputs */ + V_ip_fw_ctl_ptr = ipfw_ctl; + V_ip_fw_chk_ptr = ipfw_chk; - uma_zdestroy(ipfw_dyn_rule_zone); - IPFW_DYN_LOCK_DESTROY(); - printf("IP firewall unloaded\n"); + /* + * Hook us up to pfil. + */ + if (V_fw_enable) { + if ((error = ipfw_hook()) != 0) { + printf("ipfw_hook() error\n"); + return (error); + } + } +#ifdef INET6 + if (V_fw6_enable) { + if ((error = ipfw6_hook()) != 0) { + printf("ipfw6_hook() error\n"); + /* XXX should we unhook everything else? */ + return (error); + } + } +#endif + return (0); } /*********************** @@ -4767,9 +4774,18 @@ vnet_ipfw_uninit(const void *unused) struct ip_fw *reap; V_ipfw_vnet_ready = 0; /* tell new callers to go away */ - callout_drain(&V_ipfw_timeout); + ipfw_unhook(); +#ifdef INET6 + ipfw6_unhook(); +#endif + /* layer2 and other entrypoints still come in this way. */ + V_ip_fw_chk_ptr = NULL; + V_ip_fw_ctl_ptr = NULL; + IPFW_WLOCK(&V_layer3_chain); /* We wait on the wlock here until the last user leaves */ + IPFW_WUNLOCK(&V_layer3_chain); IPFW_WLOCK(&V_layer3_chain); + callout_drain(&V_ipfw_timeout); flush_tables(&V_layer3_chain); V_layer3_chain.reap = NULL; free_chain(&V_layer3_chain, 1 /* kill default rule */); @@ -4803,21 +4819,10 @@ ipfw_modevent(module_t mod, int type, vo /* Called once at module load or * system boot if compiled in. */ break; - case MOD_UNLOAD: - break; case MOD_QUIESCE: - /* Yes, the unhooks can return errors, we can safely ignore - * them. Eventually these will be done per jail as they - * shut down. We will wait on each vnet's l3 lock as existing - * callers go away. - */ - ipfw_unhook(); -#ifdef INET6 - ipfw6_unhook(); -#endif - /* layer2 and other entrypoints still come in this way. */ - ip_fw_chk_ptr = NULL; - ip_fw_ctl_ptr = NULL; + /* Called before unload. May veto unloading. */ + break; + case MOD_UNLOAD: /* Called during unload. */ break; case MOD_SHUTDOWN: @@ -4866,4 +4871,3 @@ SYSUNINIT(ipfw_destroy, IPFW_SI_SUB_FIRE VNET_SYSUNINIT(vnet_ipfw_uninit, IPFW_SI_SUB_FIREWALL, IPFW_VNET_ORDER, vnet_ipfw_uninit, NULL); - Modified: head/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_pfil.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netinet/ipfw/ip_fw_pfil.c Sun Oct 11 05:59:43 2009 (r197952) @@ -515,42 +515,54 @@ ipfw6_unhook(void) int ipfw_chg_hook(SYSCTL_HANDLER_ARGS) { - int enable = *(int *)arg1; + int enable; + int oldenable; int error; -#ifdef VIMAGE /* Since enabling is global, only let base do it. */ - if (! IS_DEFAULT_VNET(curvnet)) - return (EPERM); + if (arg1 == &VNET_NAME(fw_enable)) { + enable = V_fw_enable; + } +#ifdef INET6 + else if (arg1 == &VNET_NAME(fw6_enable)) { + enable = V_fw6_enable; + } #endif + else + return (EINVAL); + + oldenable = enable; + error = sysctl_handle_int(oidp, &enable, 0, req); + if (error) return (error); enable = (enable) ? 1 : 0; - if (enable == *(int *)arg1) + if (enable == oldenable) return (0); - if (arg1 == &V_fw_enable) { + if (arg1 == &VNET_NAME(fw_enable)) { if (enable) error = ipfw_hook(); else error = ipfw_unhook(); + if (error) + return (error); + V_fw_enable = enable; } #ifdef INET6 - if (arg1 == &V_fw6_enable) { + else if (arg1 == &VNET_NAME(fw6_enable)) { if (enable) error = ipfw6_hook(); else error = ipfw6_unhook(); + if (error) + return (error); + V_fw6_enable = enable; } #endif - if (error) - return (error); - - *(int *)arg1 = enable; - return (0); } Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netinet/raw_ip.c Sun Oct 11 05:59:43 2009 (r197952) @@ -84,9 +84,9 @@ VNET_DEFINE(struct inpcbinfo, ripcbinfo) * The data hooks are not used here but it is convenient * to keep them all in one place. */ -int (*ip_fw_ctl_ptr)(struct sockopt *) = NULL; +VNET_DEFINE(ip_fw_chk_ptr_t, ip_fw_chk_ptr) = NULL; +VNET_DEFINE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr) = NULL; int (*ip_dn_ctl_ptr)(struct sockopt *) = NULL; -int (*ip_fw_chk_ptr)(struct ip_fw_args *args) = NULL; int (*ip_dn_io_ptr)(struct mbuf **m, int dir, struct ip_fw_args *fwa) = NULL; /* @@ -523,8 +523,8 @@ rip_ctloutput(struct socket *so, struct case IP_FW_TABLE_LIST: case IP_FW_NAT_GET_CONFIG: case IP_FW_NAT_GET_LOG: - if (ip_fw_ctl_ptr != NULL) - error = ip_fw_ctl_ptr(sopt); + if (V_ip_fw_ctl_ptr != NULL) + error = V_ip_fw_ctl_ptr(sopt); else error = ENOPROTOOPT; break; @@ -584,8 +584,8 @@ rip_ctloutput(struct socket *so, struct case IP_FW_TABLE_FLUSH: case IP_FW_NAT_CFG: case IP_FW_NAT_DEL: - if (ip_fw_ctl_ptr != NULL) - error = ip_fw_ctl_ptr(sopt); + if (V_ip_fw_ctl_ptr != NULL) + error = V_ip_fw_ctl_ptr(sopt); else error = ENOPROTOOPT; break; Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netinet6/ip6_forward.c Sun Oct 11 05:59:43 2009 (r197952) @@ -551,11 +551,11 @@ skip_routing: in6_clearscope(&ip6->ip6_dst); /* Jump over all PFIL processing if hooks are not active. */ - if (!PFIL_HOOKED(&inet6_pfil_hook)) + if (!PFIL_HOOKED(&V_inet6_pfil_hook)) goto pass; /* Run through list of hooks for output packets. */ - error = pfil_run_hooks(&inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT, NULL); + error = pfil_run_hooks(&V_inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT, NULL); if (error != 0) goto senderr; if (m == NULL) Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netinet6/ip6_input.c Sun Oct 11 05:59:43 2009 (r197952) @@ -152,7 +152,7 @@ VNET_DECLARE(int, udp6_recvspace); struct rwlock in6_ifaddr_lock; RW_SYSINIT(in6_ifaddr_lock, &in6_ifaddr_lock, "in6_ifaddr_lock"); -struct pfil_head inet6_pfil_hook; +VNET_DEFINE (struct pfil_head, inet6_pfil_hook); static void ip6_init2(void *); static struct ip6aux *ip6_setdstifaddr(struct mbuf *, struct in6_ifaddr *); @@ -247,6 +247,13 @@ ip6_init(void) V_ip6_desync_factor = arc4random() % MAX_TEMP_DESYNC_FACTOR; + /* Initialize packet filter hooks. */ + V_inet6_pfil_hook.ph_type = PFIL_TYPE_AF; + V_inet6_pfil_hook.ph_af = AF_INET6; + if ((i = pfil_head_register(&V_inet6_pfil_hook)) != 0) + printf("%s: WARNING: unable to register pfil hook, " + "error %d\n", __func__, i); + /* Skip global initialization stuff for non-default instances. */ if (!IS_DEFAULT_VNET(curvnet)) return; @@ -275,13 +282,6 @@ ip6_init(void) ip6_protox[pr->pr_protocol] = pr - inet6sw; } - /* Initialize packet filter hooks. */ - inet6_pfil_hook.ph_type = PFIL_TYPE_AF; - inet6_pfil_hook.ph_af = AF_INET6; - if ((i = pfil_head_register(&inet6_pfil_hook)) != 0) - printf("%s: WARNING: unable to register pfil hook, " - "error %d\n", __func__, i); - netisr_register(&ip6_nh); } @@ -515,10 +515,11 @@ ip6_input(struct mbuf *m) odst = ip6->ip6_dst; /* Jump over all PFIL processing if hooks are not active. */ - if (!PFIL_HOOKED(&inet6_pfil_hook)) + if (!PFIL_HOOKED(&V_inet6_pfil_hook)) goto passin; - if (pfil_run_hooks(&inet6_pfil_hook, &m, m->m_pkthdr.rcvif, PFIL_IN, NULL)) + if (pfil_run_hooks(&V_inet6_pfil_hook, &m, + m->m_pkthdr.rcvif, PFIL_IN, NULL)) return; if (m == NULL) /* consumed by filter */ return; Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netinet6/ip6_output.c Sun Oct 11 05:59:43 2009 (r197952) @@ -805,12 +805,12 @@ again: } /* Jump over all PFIL processing if hooks are not active. */ - if (!PFIL_HOOKED(&inet6_pfil_hook)) + if (!PFIL_HOOKED(&V_inet6_pfil_hook)) goto passout; odst = ip6->ip6_dst; /* Run through list of hooks for output packets. */ - error = pfil_run_hooks(&inet6_pfil_hook, &m, ifp, PFIL_OUT, inp); + error = pfil_run_hooks(&V_inet6_pfil_hook, &m, ifp, PFIL_OUT, inp); if (error != 0 || m == NULL) goto done; ip6 = mtod(m, struct ip6_hdr *); Modified: head/sys/netinet6/ip6_var.h ============================================================================== --- head/sys/netinet6/ip6_var.h Sun Oct 11 01:54:00 2009 (r197951) +++ head/sys/netinet6/ip6_var.h Sun Oct 11 05:59:43 2009 (r197952) @@ -358,7 +358,8 @@ VNET_DECLARE(int, ip6_use_defzone); /* W #endif #define V_ip6_use_defzone VNET(ip6_use_defzone) -extern struct pfil_head inet6_pfil_hook; /* packet filter hooks */ +VNET_DECLARE (struct pfil_head, inet6_pfil_hook); /* packet filter hooks */ +#define V_inet6_pfil_hook VNET(inet6_pfil_hook) extern struct pr_usrreqs rip6_usrreqs; struct sockopt; From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 07:03: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 1FBF1106566B; Sun, 11 Oct 2009 07:03:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E04F8FC15; Sun, 11 Oct 2009 07:03:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9B73u3G003726; Sun, 11 Oct 2009 07:03:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9B73uSs003722; Sun, 11 Oct 2009 07:03:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200910110703.n9B73uSs003722@svn.freebsd.org> From: Xin LI Date: Sun, 11 Oct 2009 07:03: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: r197953 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 11 Oct 2009 07:03:57 -0000 Author: delphij Date: Sun Oct 11 07:03:56 2009 New Revision: 197953 URL: http://svn.freebsd.org/changeset/base/197953 Log: Add locking around access to parent node, and bail out when the parent node is already freed rather than panicking the system. PR: kern/122038 Submitted by: gk Tested by: pho MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Sun Oct 11 05:59:43 2009 (r197952) +++ head/sys/fs/tmpfs/tmpfs.h Sun Oct 11 07:03:56 2009 (r197953) @@ -303,10 +303,30 @@ LIST_HEAD(tmpfs_node_list, tmpfs_node); #define TMPFS_NODE_LOCK(node) mtx_lock(&(node)->tn_interlock) #define TMPFS_NODE_UNLOCK(node) mtx_unlock(&(node)->tn_interlock) -#define TMPFS_NODE_MTX(node) (&(node)->tn_interlock) +#define TMPFS_NODE_MTX(node) (&(node)->tn_interlock) + +#ifdef INVARIANTS +#define TMPFS_ASSERT_LOCKED(node) do { \ + MPASS(node != NULL); \ + MPASS(node->tn_vnode != NULL); \ + if (!VOP_ISLOCKED(node->tn_vnode) && \ + !mtx_owned(TMPFS_NODE_MTX(node))) \ + panic("tmpfs: node is not locked: %p", node); \ + } while (0) +#define TMPFS_ASSERT_ELOCKED(node) do { \ + MPASS((node) != NULL); \ + MPASS((node)->tn_vnode != NULL); \ + mtx_assert(TMPFS_NODE_MTX(node), MA_OWNED); \ + ASSERT_VOP_LOCKED((node)->tn_vnode, "tmpfs"); \ + } while (0) +#else +#define TMPFS_ASSERT_LOCKED(node) (void)0 +#define TMPFS_ASSERT_ELOCKED(node) (void)0 +#endif #define TMPFS_VNODE_ALLOCATING 1 #define TMPFS_VNODE_WANT 2 +#define TMPFS_VNODE_DOOMED 4 /* --------------------------------------------------------------------- */ /* Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Sun Oct 11 05:59:43 2009 (r197952) +++ head/sys/fs/tmpfs/tmpfs_subr.c Sun Oct 11 07:03:56 2009 (r197953) @@ -124,7 +124,9 @@ tmpfs_alloc_node(struct tmpfs_mount *tmp nnode->tn_dir.tn_readdir_lastn = 0; nnode->tn_dir.tn_readdir_lastp = NULL; nnode->tn_links++; + TMPFS_NODE_LOCK(nnode->tn_dir.tn_parent); nnode->tn_dir.tn_parent->tn_links++; + TMPFS_NODE_UNLOCK(nnode->tn_dir.tn_parent); break; case VFIFO: @@ -187,6 +189,7 @@ tmpfs_free_node(struct tmpfs_mount *tmp, #ifdef INVARIANTS TMPFS_NODE_LOCK(node); MPASS(node->tn_vnode == NULL); + MPASS((node->tn_vpstate & TMPFS_VNODE_ALLOCATING) == 0); TMPFS_NODE_UNLOCK(node); #endif @@ -312,6 +315,7 @@ tmpfs_alloc_vp(struct mount *mp, struct loop: TMPFS_NODE_LOCK(node); if ((vp = node->tn_vnode) != NULL) { + MPASS((node->tn_vpstate & TMPFS_VNODE_DOOMED) == 0); VI_LOCK(vp); TMPFS_NODE_UNLOCK(node); vholdl(vp); @@ -330,6 +334,14 @@ loop: goto out; } + if ((node->tn_vpstate & TMPFS_VNODE_DOOMED) || + (node->tn_type == VDIR && node->tn_dir.tn_parent == NULL)) { + TMPFS_NODE_UNLOCK(node); + error = ENOENT; + vp = NULL; + goto out; + } + /* * otherwise lock the vp list while we call getnewvnode * since that can block. @@ -375,6 +387,7 @@ loop: vp->v_op = &tmpfs_fifoop_entries; break; case VDIR: + MPASS(node->tn_dir.tn_parent != NULL); if (node->tn_dir.tn_parent == node) vp->v_vflag |= VV_ROOT; break; @@ -428,10 +441,9 @@ tmpfs_free_vp(struct vnode *vp) node = VP_TO_TMPFS_NODE(vp); - TMPFS_NODE_LOCK(node); + mtx_assert(TMPFS_NODE_MTX(node), MA_OWNED); node->tn_vnode = NULL; vp->v_data = NULL; - TMPFS_NODE_UNLOCK(node); } /* --------------------------------------------------------------------- */ @@ -653,7 +665,18 @@ tmpfs_dir_getdotdotdent(struct tmpfs_nod TMPFS_VALIDATE_DIR(node); MPASS(uio->uio_offset == TMPFS_DIRCOOKIE_DOTDOT); + /* + * Return ENOENT if the current node is already removed. + */ + TMPFS_ASSERT_LOCKED(node); + if (node->tn_dir.tn_parent == NULL) { + return (ENOENT); + } + + TMPFS_NODE_LOCK(node->tn_dir.tn_parent); dent.d_fileno = node->tn_dir.tn_parent->tn_id; + TMPFS_NODE_UNLOCK(node->tn_dir.tn_parent); + dent.d_type = DT_DIR; dent.d_namlen = 2; dent.d_name[0] = '.'; Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Sun Oct 11 05:59:43 2009 (r197952) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Sun Oct 11 07:03:56 2009 (r197953) @@ -87,6 +87,11 @@ tmpfs_lookup(struct vop_cachedlookup_arg dnode->tn_dir.tn_parent == dnode, !(cnp->cn_flags & ISDOTDOT))); + TMPFS_ASSERT_LOCKED(dnode); + if (dnode->tn_dir.tn_parent == NULL) { + error = ENOENT; + goto out; + } if (cnp->cn_flags & ISDOTDOT) { int ltype = 0; @@ -914,6 +919,7 @@ tmpfs_rename(struct vop_rename_args *v) char *newname; int error; struct tmpfs_dirent *de; + struct tmpfs_mount *tmp; struct tmpfs_node *fdnode; struct tmpfs_node *fnode; struct tmpfs_node *tnode; @@ -934,6 +940,7 @@ tmpfs_rename(struct vop_rename_args *v) goto out; } + tmp = VFS_TO_TMPFS(tdvp->v_mount); tdnode = VP_TO_TMPFS_DIR(tdvp); /* If source and target are the same file, there is nothing to do. */ @@ -1018,25 +1025,63 @@ tmpfs_rename(struct vop_rename_args *v) * directory being moved. Otherwise, we'd end up * with stale nodes. */ n = tdnode; + /* TMPFS_LOCK garanties that no nodes are freed while + * traversing the list. Nodes can only be marked as + * removed: tn_parent == NULL. */ + TMPFS_LOCK(tmp); + TMPFS_NODE_LOCK(n); while (n != n->tn_dir.tn_parent) { + struct tmpfs_node *parent; + if (n == fnode) { + TMPFS_NODE_UNLOCK(n); + TMPFS_UNLOCK(tmp); error = EINVAL; if (newname != NULL) free(newname, M_TMPFSNAME); goto out_locked; } - n = n->tn_dir.tn_parent; + parent = n->tn_dir.tn_parent; + TMPFS_NODE_UNLOCK(n); + if (parent == NULL) { + n = NULL; + break; + } + TMPFS_NODE_LOCK(parent); + if (parent->tn_dir.tn_parent == NULL) { + TMPFS_NODE_UNLOCK(parent); + n = NULL; + break; + } + n = parent; + } + TMPFS_UNLOCK(tmp); + if (n == NULL) { + error = EINVAL; + if (newname != NULL) + free(newname, M_TMPFSNAME); + goto out_locked; } + TMPFS_NODE_UNLOCK(n); /* Adjust the parent pointer. */ TMPFS_VALIDATE_DIR(fnode); + TMPFS_NODE_LOCK(de->td_node); de->td_node->tn_dir.tn_parent = tdnode; + TMPFS_NODE_UNLOCK(de->td_node); /* As a result of changing the target of the '..' * entry, the link count of the source and target * directories has to be adjusted. */ - fdnode->tn_links--; + TMPFS_NODE_LOCK(tdnode); + TMPFS_ASSERT_LOCKED(tdnode); tdnode->tn_links++; + TMPFS_NODE_UNLOCK(tdnode); + + TMPFS_NODE_LOCK(fdnode); + TMPFS_ASSERT_LOCKED(fdnode); + fdnode->tn_links--; + TMPFS_NODE_UNLOCK(fdnode); } /* Do the move: just remove the entry from the source directory @@ -1163,15 +1208,26 @@ tmpfs_rmdir(struct vop_rmdir_args *v) goto out; } + /* Detach the directory entry from the directory (dnode). */ tmpfs_dir_detach(dvp, de); + /* No vnode should be allocated for this entry from this point */ + TMPFS_NODE_LOCK(node); + TMPFS_ASSERT_ELOCKED(node); node->tn_links--; + node->tn_dir.tn_parent = NULL; node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | \ TMPFS_NODE_MODIFIED; - node->tn_dir.tn_parent->tn_links--; - node->tn_dir.tn_parent->tn_status |= TMPFS_NODE_ACCESSED | \ + + TMPFS_NODE_UNLOCK(node); + + TMPFS_NODE_LOCK(dnode); + TMPFS_ASSERT_ELOCKED(dnode); + dnode->tn_links--; + dnode->tn_status |= TMPFS_NODE_ACCESSED | \ TMPFS_NODE_CHANGED | TMPFS_NODE_MODIFIED; + TMPFS_NODE_UNLOCK(dnode); cache_purge(dvp); cache_purge(vp); @@ -1359,13 +1415,21 @@ tmpfs_reclaim(struct vop_reclaim_args *v vnode_destroy_vobject(vp); cache_purge(vp); + + TMPFS_NODE_LOCK(node); + TMPFS_ASSERT_ELOCKED(node); tmpfs_free_vp(vp); /* If the node referenced by this vnode was deleted by the user, * we must free its associated data structures (now that the vnode * is being reclaimed). */ - if (node->tn_links == 0) + if (node->tn_links == 0 && + (node->tn_vpstate & TMPFS_VNODE_ALLOCATING) == 0) { + node->tn_vpstate = TMPFS_VNODE_DOOMED; + TMPFS_NODE_UNLOCK(node); tmpfs_free_node(tmp, node); + } else + TMPFS_NODE_UNLOCK(node); MPASS(vp->v_data == NULL); return 0; From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 12:23: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 C2AB81065670; Sun, 11 Oct 2009 12:23:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1DCA8FC08; Sun, 11 Oct 2009 12:23:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BCNua3011107; Sun, 11 Oct 2009 12:23:56 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9BCNuTp011104; Sun, 11 Oct 2009 12:23:56 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <200910111223.n9BCNuTp011104@svn.freebsd.org> From: Michael Tuexen Date: Sun, 11 Oct 2009 12:23: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: r197955 - 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: Sun, 11 Oct 2009 12:23:56 -0000 Author: tuexen Date: Sun Oct 11 12:23:56 2009 New Revision: 197955 URL: http://svn.freebsd.org/changeset/base/197955 Log: Fix a race condition where a mutex was destroyed while sleeping on it. Found while analyzing a report from julian. It might fix his bug. Approved by: rrs (mentor) MFC after: 3 days Modified: head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Sun Oct 11 11:00:14 2009 (r197954) +++ head/sys/netinet/sctp_bsd_addr.c Sun Oct 11 12:23:56 2009 (r197955) @@ -97,6 +97,7 @@ sctp_iterator_thread(void *v) &SCTP_BASE_INFO(ipi_iterator_wq_mtx), 0, "waiting_for_work", 0); if (SCTP_BASE_INFO(threads_must_exit)) { + SCTP_IPI_ITERATOR_WQ_DESTROY(); kthread_exit(); } sctp_iterator_worker(); Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Oct 11 11:00:14 2009 (r197954) +++ head/sys/netinet/sctp_pcb.c Sun Oct 11 12:23:56 2009 (r197955) @@ -5616,7 +5616,6 @@ sctp_pcb_finish(void) SCTP_IP_PKTLOG_DESTROY(); #endif - SCTP_IPI_ITERATOR_WQ_DESTROY(); SCTP_IPI_ADDR_DESTROY(); SCTP_ITERATOR_LOCK_DESTROY(); SCTP_STATLOG_DESTROY(); From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 12:32: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 8C954106568F; Sun, 11 Oct 2009 12:32:26 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6203A8FC0C; Sun, 11 Oct 2009 12:32:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BCWQfH011302; Sun, 11 Oct 2009 12:32:26 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9BCWQfE011299; Sun, 11 Oct 2009 12:32:26 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <200910111232.n9BCWQfE011299@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 11 Oct 2009 12:32: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: r197956 - head/usr.bin/systat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 11 Oct 2009 12:32:26 -0000 Author: jh Date: Sun Oct 11 12:32:25 2009 New Revision: 197956 URL: http://svn.freebsd.org/changeset/base/197956 Log: - Catch SIGHUP to perform cleanup before exiting. - Exit if getch() returns with an error other than EINTR. Otherwise systat(1) may get stuck in an infinite loop if it doesn't receive SIGHUP when terminal closes. [1] - Remove attempt to clear stdio error indicators. getch() doesn't use stdio, making it useless. [2] - Remove unneeded masking of getch() return value. [2] PR: bin/107171 Reviewed by: bde Approved by: trasz (mentor) Obtained from: OpenBSD [1] Suggested by: bde [2] MFC after: 1 month Modified: head/usr.bin/systat/keyboard.c head/usr.bin/systat/main.c Modified: head/usr.bin/systat/keyboard.c ============================================================================== --- head/usr.bin/systat/keyboard.c Sun Oct 11 12:23:56 2009 (r197955) +++ head/usr.bin/systat/keyboard.c Sun Oct 11 12:32:25 2009 (r197956) @@ -39,8 +39,10 @@ __FBSDID("$FreeBSD$"); static const char sccsid[] = "@(#)keyboard.c 8.1 (Berkeley) 6/6/93"; #endif +#include #include #include +#include #include #include "systat.h" @@ -57,10 +59,11 @@ keyboard(void) move(CMDLINE, 0); do { refresh(); - ch = getch() & 0177; - if (ch == 0177 && ferror(stdin)) { - clearerr(stdin); - continue; + ch = getch(); + if (ch == ERR) { + if (errno == EINTR) + continue; + exit(1); } if (ch >= 'A' && ch <= 'Z') ch += 'a' - 'A'; Modified: head/usr.bin/systat/main.c ============================================================================== --- head/usr.bin/systat/main.c Sun Oct 11 12:23:56 2009 (r197955) +++ head/usr.bin/systat/main.c Sun Oct 11 12:32:25 2009 (r197956) @@ -133,6 +133,7 @@ main(int argc, char **argv) exit(1); } } + signal(SIGHUP, die); signal(SIGINT, die); signal(SIGQUIT, die); signal(SIGTERM, die); From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 14:27: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 79A86106566B; Sun, 11 Oct 2009 14:27:33 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F9F28FC0C; Sun, 11 Oct 2009 14:27:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BERX5W013481; Sun, 11 Oct 2009 14:27:33 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9BERXkE013479; Sun, 11 Oct 2009 14:27:33 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200910111427.n9BERXkE013479@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 11 Oct 2009 14:27: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: r197957 - head/crypto/openssh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 11 Oct 2009 14:27:33 -0000 Author: des Date: Sun Oct 11 14:27:33 2009 New Revision: 197957 URL: http://svn.freebsd.org/changeset/base/197957 Log: Remove dupe. Modified: head/crypto/openssh/sshd_config Modified: head/crypto/openssh/sshd_config ============================================================================== --- head/crypto/openssh/sshd_config Sun Oct 11 12:32:25 2009 (r197956) +++ head/crypto/openssh/sshd_config Sun Oct 11 14:27:33 2009 (r197957) @@ -17,7 +17,6 @@ #VersionAddendum FreeBSD-20091001 #Port 22 -#Protocol 2 #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress :: From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 16:23: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 BC393106566B; Sun, 11 Oct 2009 16:23:11 +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 AB4F88FC15; Sun, 11 Oct 2009 16:23:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BGNBR8015889; Sun, 11 Oct 2009 16:23:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9BGNBlG015888; Sun, 11 Oct 2009 16:23:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910111623.n9BGNBlG015888@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Oct 2009 16:23: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: r197958 - 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: Sun, 11 Oct 2009 16:23:11 -0000 Author: kib Date: Sun Oct 11 16:23:11 2009 New Revision: 197958 URL: http://svn.freebsd.org/changeset/base/197958 Log: In nanosleep(2), note that the calling thread is put to sleep, not the whole process. Also explicitely name the parameter that specifies sleep interval. Modified: head/lib/libc/sys/nanosleep.2 Modified: head/lib/libc/sys/nanosleep.2 ============================================================================== --- head/lib/libc/sys/nanosleep.2 Sun Oct 11 14:27:33 2009 (r197957) +++ head/lib/libc/sys/nanosleep.2 Sun Oct 11 16:23:11 2009 (r197958) @@ -47,7 +47,9 @@ The .Fn nanosleep system call -causes the process to sleep for the specified time. +causes the calling thread to sleep until the time interval specified by +.Fa rqtp +has elapsed. An unmasked signal will cause it to terminate the sleep early, regardless of the .Dv SA_RESTART From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 16:41: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 BD63A1065676; Sun, 11 Oct 2009 16:41:39 +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 AC3EB8FC14; Sun, 11 Oct 2009 16:41:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BGfd06016424; Sun, 11 Oct 2009 16:41:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9BGfd3d016422; Sun, 11 Oct 2009 16:41:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200910111641.n9BGfd3d016422@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 11 Oct 2009 16:41: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: r197961 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 11 Oct 2009 16:41:39 -0000 Author: nwhitehorn Date: Sun Oct 11 16:41:39 2009 New Revision: 197961 URL: http://svn.freebsd.org/changeset/base/197961 Log: Correct a typo here and actually save DSISR instead of overwriting it. Modified: head/sys/powerpc/aim/trap_subr.S Modified: head/sys/powerpc/aim/trap_subr.S ============================================================================== --- head/sys/powerpc/aim/trap_subr.S Sun Oct 11 16:39:16 2009 (r197960) +++ head/sys/powerpc/aim/trap_subr.S Sun Oct 11 16:41:39 2009 (r197961) @@ -451,7 +451,7 @@ disitrap: lwz %r30,(PC_TEMPSAVE+CPUSAVE_AIM_DAR)(%r1) /* get DAR */ stw %r30,(PC_DBSAVE +CPUSAVE_AIM_DAR)(%r1) /* save DAR */ lwz %r30,(PC_TEMPSAVE+CPUSAVE_AIM_DSISR)(%r1) /* get DSISR */ - lwz %r30,(PC_DBSAVE +CPUSAVE_AIM_DSISR)(%r1) /* save DSISR */ + stw %r30,(PC_DBSAVE +CPUSAVE_AIM_DSISR)(%r1) /* save DSISR */ lwz %r30,(PC_DISISAVE+CPUSAVE_R28)(%r1) /* get r28 */ stw %r30,(PC_DBSAVE +CPUSAVE_R28)(%r1) /* save r28 */ lwz %r31,(PC_DISISAVE+CPUSAVE_R29)(%r1) /* get r29 */ From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 16:44: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 0B8031065672; Sun, 11 Oct 2009 16:44:58 +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 541988FC17; Sun, 11 Oct 2009 16:44:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BGiwbT016520; Sun, 11 Oct 2009 16:44:58 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9BGiwgj016518; Sun, 11 Oct 2009 16:44:58 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200910111644.n9BGiwgj016518@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 11 Oct 2009 16:44: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: r197962 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 11 Oct 2009 16:44:59 -0000 Author: nwhitehorn Date: Sun Oct 11 16:44:58 2009 New Revision: 197962 URL: http://svn.freebsd.org/changeset/base/197962 Log: Correct another typo. Actually save the condition register instead of overwriting r12 by mistake. Modified: head/sys/powerpc/aim/swtch.S Modified: head/sys/powerpc/aim/swtch.S ============================================================================== --- head/sys/powerpc/aim/swtch.S Sun Oct 11 16:41:39 2009 (r197961) +++ head/sys/powerpc/aim/swtch.S Sun Oct 11 16:44:58 2009 (r197962) @@ -171,7 +171,7 @@ ENTRY(savectx) mr %r12,%r2 stmw %r12,PCB_CONTEXT(%r3) /* Save the non-volatile GP regs */ mfcr %r4 /* Save the condition register */ - stw %r4,PCB_CONTEXT(%r3) + stw %r4,PCB_CR(%r3) blr /* From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 16: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 220B61065693; Sun, 11 Oct 2009 16:49:31 +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 95A5E8FC14; Sun, 11 Oct 2009 16:49:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BGnUgp016714; Sun, 11 Oct 2009 16:49:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9BGnUmJ016709; Sun, 11 Oct 2009 16:49:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910111649.n9BGnUmJ016709@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Oct 2009 16: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: r197963 - in head/sys: kern 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, 11 Oct 2009 16:49:31 -0000 Author: kib Date: Sun Oct 11 16:49:30 2009 New Revision: 197963 URL: http://svn.freebsd.org/changeset/base/197963 Log: Currently, when signal is delivered to the process and there is a thread not blocking the signal, signal is placed on the thread sigqueue. If the selected thread is in kernel executing thr_exit() or sigprocmask() syscalls, then signal might be not delivered to usermode for arbitrary amount of time, and for exiting thread it is lost. Put process-directed signals to the process queue unconditionally, selecting the thread to deliver the signal only by the thread returning to usermode, since only then the thread can handle delivery of signal reliably. For exiting thread or thread that has blocked some signals, check whether the newly blocked signal is queued for the process, and try to find a thread to wakeup for delivery, in reschedule_signal(). For exiting thread, assume that all signals are blocked. Change cursig() and postsig() to look both into the thread and process signal queues. When there is a signal that thread returning to usermode could consume, TDF_NEEDSIGCHK flag is not neccessary set now. Do unlocked read of p_siglist and p_pendingcnt to check for queued signals. Note that thread that has a signal unblocked might get spurious wakeup and EINTR from the interruptible system call now, due to the possibility of being selected by reschedule_signals(), while other thread returned to usermode earlier and removed the signal from process queue. This should not cause compliance issues, since the thread has not blocked a signal and thus should be ready to receive it anyway. Reported by: Justin Teller Reviewed by: davidxu, jilles MFC after: 1 month Modified: head/sys/kern/kern_sig.c head/sys/kern/kern_thr.c head/sys/kern/subr_trap.c head/sys/sys/signalvar.h Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sun Oct 11 16:44:58 2009 (r197962) +++ head/sys/kern/kern_sig.c Sun Oct 11 16:49:30 2009 (r197963) @@ -220,6 +220,8 @@ static int sigproptbl[NSIG] = { SA_KILL|SA_PROC, /* SIGUSR2 */ }; +static void reschedule_signals(struct proc *p, sigset_t block); + static void sigqueue_start(void) { @@ -581,20 +583,11 @@ void signotify(struct thread *td) { struct proc *p; - sigset_t set; p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); - /* - * If our mask changed we may have to move signal that were - * previously masked by all threads to our sigqueue. - */ - set = p->p_sigqueue.sq_signals; - SIGSETNAND(set, td->td_sigmask); - if (! SIGISEMPTY(set)) - sigqueue_move_set(&p->p_sigqueue, &td->td_sigqueue, &set); if (SIGPENDING(td)) { thread_lock(td); td->td_flags |= TDF_NEEDSIGCHK | TDF_ASTPENDING; @@ -976,24 +969,28 @@ execsigs(struct proc *p) * Manipulate signal mask. */ int -kern_sigprocmask(td, how, set, oset, old) - struct thread *td; - int how; - sigset_t *set, *oset; - int old; +kern_sigprocmask(struct thread *td, int how, sigset_t *set, sigset_t *oset, + int old) { + sigset_t new_block, oset1; + struct proc *p; int error; - PROC_LOCK(td->td_proc); + p = td->td_proc; + PROC_LOCK(p); if (oset != NULL) *oset = td->td_sigmask; error = 0; + SIGEMPTYSET(new_block); if (set != NULL) { switch (how) { case SIG_BLOCK: SIG_CANTMASK(*set); + oset1 = td->td_sigmask; SIGSETOR(td->td_sigmask, *set); + new_block = td->td_sigmask; + SIGSETNAND(new_block, oset1); break; case SIG_UNBLOCK: SIGSETNAND(td->td_sigmask, *set); @@ -1001,10 +998,13 @@ kern_sigprocmask(td, how, set, oset, old break; case SIG_SETMASK: SIG_CANTMASK(*set); + oset1 = td->td_sigmask; if (old) SIGSETLO(td->td_sigmask, *set); else td->td_sigmask = *set; + new_block = td->td_sigmask; + SIGSETNAND(new_block, oset1); signotify(td); break; default: @@ -1012,7 +1012,20 @@ kern_sigprocmask(td, how, set, oset, old break; } } - PROC_UNLOCK(td->td_proc); + + /* + * The new_block set contains signals that were not previosly + * blocked, but are blocked now. + * + * In case we block any signal that was not previously blocked + * for td, and process has the signal pending, try to schedule + * signal delivery to some thread that does not block the signal, + * possibly waking it up. + */ + if (p->p_numthreads != 1) + reschedule_signals(p, new_block); + + PROC_UNLOCK(p); return (error); } @@ -1985,17 +1998,9 @@ tdsignal(struct proc *p, struct thread * KNOTE_LOCKED(&p->p_klist, NOTE_SIGNAL | sig); prop = sigprop(sig); - /* - * If the signal is blocked and not destined for this thread, then - * assign it to the process so that we can find it later in the first - * thread that unblocks it. Otherwise, assign it to this thread now. - */ if (td == NULL) { td = sigtd(p, sig, prop); - if (SIGISMEMBER(td->td_sigmask, sig)) - sigqueue = &p->p_sigqueue; - else - sigqueue = &td->td_sigqueue; + sigqueue = &p->p_sigqueue; } else { KASSERT(td->td_proc == p, ("invalid thread")); sigqueue = &td->td_sigqueue; @@ -2392,6 +2397,62 @@ stopme: return (td->td_xsig); } +static void +reschedule_signals(struct proc *p, sigset_t block) +{ + struct sigacts *ps; + struct thread *td; + int i; + + PROC_LOCK_ASSERT(p, MA_OWNED); + + ps = p->p_sigacts; + for (i = 1; !SIGISEMPTY(block); i++) { + if (!SIGISMEMBER(block, i)) + continue; + SIGDELSET(block, i); + if (!SIGISMEMBER(p->p_siglist, i)) + continue; + + td = sigtd(p, i, 0); + signotify(td); + mtx_lock(&ps->ps_mtx); + if (p->p_flag & P_TRACED || SIGISMEMBER(ps->ps_sigcatch, i)) + tdsigwakeup(td, i, SIG_CATCH, + (SIGISMEMBER(ps->ps_sigintr, i) ? EINTR : + ERESTART)); + mtx_unlock(&ps->ps_mtx); + } +} + +void +tdsigcleanup(struct thread *td) +{ + struct proc *p; + sigset_t unblocked; + + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + + sigqueue_flush(&td->td_sigqueue); + if (p->p_numthreads == 1) + return; + + /* + * Since we cannot handle signals, notify signal post code + * about this by filling the sigmask. + * + * Also, if needed, wake up thread(s) that do not block the + * same signals as the exiting thread, since the thread might + * have been selected for delivery and woken up. + */ + SIGFILLSET(unblocked); + SIGSETNAND(unblocked, td->td_sigmask); + SIGFILLSET(td->td_sigmask); + reschedule_signals(p, unblocked); + +} + /* * If the current process has received a signal (should be caught or cause * termination, should interrupt current syscall), return the signal number. @@ -2409,8 +2470,9 @@ issignal(struct thread *td, int stop_all { struct proc *p; struct sigacts *ps; + struct sigqueue *queue; sigset_t sigpending; - int sig, prop, newsig; + int sig, prop, newsig, signo; p = td->td_proc; ps = p->p_sigacts; @@ -2420,6 +2482,7 @@ issignal(struct thread *td, int stop_all int traced = (p->p_flag & P_TRACED) || (p->p_stops & S_SIG); sigpending = td->td_sigqueue.sq_signals; + SIGSETOR(sigpending, p->p_sigqueue.sq_signals); SIGSETNAND(sigpending, td->td_sigmask); if (p->p_flag & P_PPWAIT) @@ -2440,6 +2503,7 @@ issignal(struct thread *td, int stop_all */ if (SIGISMEMBER(ps->ps_sigignore, sig) && (traced == 0)) { sigqueue_delete(&td->td_sigqueue, sig); + sigqueue_delete(&p->p_sigqueue, sig); continue; } if (p->p_flag & P_TRACED && (p->p_flag & P_PPWAIT) == 0) { @@ -2452,12 +2516,18 @@ issignal(struct thread *td, int stop_all if (sig != newsig) { ksiginfo_t ksi; + + queue = &td->td_sigqueue; /* * clear old signal. * XXX shrug off debugger, it causes siginfo to * be thrown away. */ - sigqueue_get(&td->td_sigqueue, sig, &ksi); + if (sigqueue_get(queue, sig, &ksi) == 0) { + queue = &p->p_sigqueue; + signo = sigqueue_get(queue, sig, &ksi); + KASSERT(signo == sig, ("signo != sig")); + } /* * If parent wants us to take the signal, @@ -2472,7 +2542,7 @@ issignal(struct thread *td, int stop_all * Put the new signal into td_sigqueue. If the * signal is being masked, look for other signals. */ - SIGADDSET(td->td_sigqueue.sq_signals, sig); + SIGADDSET(queue->sq_signals, sig); if (SIGISMEMBER(td->td_sigmask, sig)) continue; signotify(td); @@ -2567,6 +2637,7 @@ issignal(struct thread *td, int stop_all return (sig); } sigqueue_delete(&td->td_sigqueue, sig); /* take the signal! */ + sigqueue_delete(&p->p_sigqueue, sig); } /* NOTREACHED */ } @@ -2613,7 +2684,9 @@ postsig(sig) ps = p->p_sigacts; mtx_assert(&ps->ps_mtx, MA_OWNED); ksiginfo_init(&ksi); - sigqueue_get(&td->td_sigqueue, sig, &ksi); + if (sigqueue_get(&td->td_sigqueue, sig, &ksi) == 0 && + sigqueue_get(&p->p_sigqueue, sig, &ksi) == 0) + return; ksi.ksi_signo = sig; if (ksi.ksi_code == SI_TIMER) itimer_accept(p, ksi.ksi_timerid, &ksi); Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Sun Oct 11 16:44:58 2009 (r197962) +++ head/sys/kern/kern_thr.c Sun Oct 11 16:49:30 2009 (r197963) @@ -282,7 +282,7 @@ thr_exit(struct thread *td, struct thr_e } PROC_LOCK(p); - sigqueue_flush(&td->td_sigqueue); + tdsigcleanup(td); PROC_SLOCK(p); /* Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Sun Oct 11 16:44:58 2009 (r197962) +++ head/sys/kern/subr_trap.c Sun Oct 11 16:49:30 2009 (r197963) @@ -90,6 +90,7 @@ userret(struct thread *td, struct trapfr CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, td->td_name); +#if 0 #ifdef DIAGNOSTIC /* Check that we called signotify() enough. */ PROC_LOCK(p); @@ -100,6 +101,7 @@ userret(struct thread *td, struct trapfr thread_unlock(td); PROC_UNLOCK(p); #endif +#endif #ifdef KTRACE KTRUSERRET(td); #endif @@ -218,7 +220,14 @@ ast(struct trapframe *framep) ktrcsw(0, 1); #endif } - if (flags & TDF_NEEDSIGCHK) { + + /* + * Check for signals. Unlocked reads of p_pendingcnt or + * p_siglist might cause process-directed signal to be handled + * later. + */ + if (flags & TDF_NEEDSIGCHK || p->p_pendingcnt > 0 || + !SIGISEMPTY(p->p_siglist)) { PROC_LOCK(p); mtx_lock(&p->p_sigacts->ps_mtx); while ((sig = cursig(td, SIG_STOP_ALLOWED)) != 0) Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Sun Oct 11 16:44:58 2009 (r197962) +++ head/sys/sys/signalvar.h Sun Oct 11 16:49:30 2009 (r197963) @@ -252,9 +252,10 @@ typedef struct sigqueue { /* Return nonzero if process p has an unmasked pending signal. */ #define SIGPENDING(td) \ - (!SIGISEMPTY((td)->td_siglist) && \ - !sigsetmasked(&(td)->td_siglist, &(td)->td_sigmask)) - + ((!SIGISEMPTY((td)->td_siglist) && \ + !sigsetmasked(&(td)->td_siglist, &(td)->td_sigmask)) || \ + (!SIGISEMPTY((td)->td_proc->p_siglist) && \ + !sigsetmasked(&(td)->td_proc->p_siglist, &(td)->td_sigmask))) /* * Return the value of the pseudo-expression ((*set & ~*mask) != 0). This * is an optimized version of SIGISEMPTY() on a temporary variable @@ -336,6 +337,7 @@ void sigexit(struct thread *td, int sign int sig_ffs(sigset_t *set); void siginit(struct proc *p); void signotify(struct thread *td); +void tdsigcleanup(struct thread *td); int tdsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi); void trapsignal(struct thread *td, ksiginfo_t *); From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 17:04: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 62E591065672; Sun, 11 Oct 2009 17:04:14 +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 502328FC15; Sun, 11 Oct 2009 17:04:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BH4DZT017948; Sun, 11 Oct 2009 17:04:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9BH4DMu017945; Sun, 11 Oct 2009 17:04:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910111704.n9BH4DMu017945@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Oct 2009 17:04: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: r197965 - in head/tools/regression/sigqueue: sigqtest1 sigqtest2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 11 Oct 2009 17:04:14 -0000 Author: kib Date: Sun Oct 11 17:04:13 2009 New Revision: 197965 URL: http://svn.freebsd.org/changeset/base/197965 Log: Tweaks for sigqueue tests: - slightly adjust code for style, sort headers. - in sigqtest2, print received signals, to make it easy to see why test failed. - in sigqtest2, job_control_test(), cover a race by adding sleep after child stopped itself to allow for SIGCHLD due to stop and exit to not be coalesced. MFC after: 2 weeks Modified: head/tools/regression/sigqueue/sigqtest1/sigqtest1.c head/tools/regression/sigqueue/sigqtest2/sigqtest2.c Modified: head/tools/regression/sigqueue/sigqtest1/sigqtest1.c ============================================================================== --- head/tools/regression/sigqueue/sigqtest1/sigqtest1.c Sun Oct 11 16:52:24 2009 (r197964) +++ head/tools/regression/sigqueue/sigqtest1/sigqtest1.c Sun Oct 11 17:04:13 2009 (r197965) @@ -1,12 +1,14 @@ /* $FreeBSD$ */ -#include -#include #include #include +#include +#include +#include int received; -void handler(int sig, siginfo_t *si, void *ctx) +void +handler(int sig, siginfo_t *si, void *ctx) { if (si->si_code != SI_QUEUE) errx(1, "si_code != SI_QUEUE"); @@ -15,7 +17,8 @@ void handler(int sig, siginfo_t *si, voi received++; } -int main() +int +main() { struct sigaction sa; union sigval val; Modified: head/tools/regression/sigqueue/sigqtest2/sigqtest2.c ============================================================================== --- head/tools/regression/sigqueue/sigqtest2/sigqtest2.c Sun Oct 11 16:52:24 2009 (r197964) +++ head/tools/regression/sigqueue/sigqtest2/sigqtest2.c Sun Oct 11 17:04:13 2009 (r197965) @@ -1,24 +1,29 @@ /* $FreeBSD$ */ -#include -#include -#include -#include #include #include +#include +#include +#include +#include +#include +#include int stop_received; int exit_received; int cont_received; -void job_handler(int sig, siginfo_t *si, void *ctx) +void +job_handler(int sig, siginfo_t *si, void *ctx) { int status; int ret; if (si->si_code == CLD_STOPPED) { + printf("%d: stop received\n", si->si_pid); stop_received = 1; kill(si->si_pid, SIGCONT); } else if (si->si_code == CLD_EXITED) { + printf("%d: exit received\n", si->si_pid); ret = waitpid(si->si_pid, &status, 0); if (ret == -1) errx(1, "waitpid"); @@ -26,11 +31,13 @@ void job_handler(int sig, siginfo_t *si, errx(1, "!WIFEXITED(status)"); exit_received = 1; } else if (si->si_code == CLD_CONTINUED) { + printf("%d: cont received\n", si->si_pid); cont_received = 1; } } -void job_control_test() +void +job_control_test(void) { struct sigaction sa; pid_t pid; @@ -43,9 +50,12 @@ void job_control_test() stop_received = 0; cont_received = 0; exit_received = 0; + fflush(stdout); pid = fork(); if (pid == 0) { + printf("child %d\n", getpid()); kill(getpid(), SIGSTOP); + sleep(2); exit(1); } @@ -60,11 +70,13 @@ void job_control_test() printf("job control test OK.\n"); } -void rtsig_handler(int sig, siginfo_t *si, void *ctx) +void +rtsig_handler(int sig, siginfo_t *si, void *ctx) { } -int main() +int +main() { struct sigaction sa; sigset_t set; From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 20:19: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 32E09106568D; Sun, 11 Oct 2009 20:19:46 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21D478FC1E; Sun, 11 Oct 2009 20:19:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BKJjp1028242; Sun, 11 Oct 2009 20:19:45 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9BKJjM1028235; Sun, 11 Oct 2009 20:19:45 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200910112019.n9BKJjM1028235@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 11 Oct 2009 20:19: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: r197968 - in head/lib: libc/include libc/sys libthr libthr/thread X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 11 Oct 2009 20:19:46 -0000 Author: jilles Date: Sun Oct 11 20:19:45 2009 New Revision: 197968 URL: http://svn.freebsd.org/changeset/base/197968 Log: Make openat(2) a cancellation point. This is required by POSIX and matches open(2). Reviewed by: kib, jhb MFC after: 1 month Modified: head/lib/libc/include/namespace.h head/lib/libc/include/un-namespace.h head/lib/libc/sys/Symbol.map head/lib/libthr/pthread.map head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_syscalls.c Modified: head/lib/libc/include/namespace.h ============================================================================== --- head/lib/libc/include/namespace.h Sun Oct 11 18:21:55 2009 (r197967) +++ head/lib/libc/include/namespace.h Sun Oct 11 20:19:45 2009 (r197968) @@ -80,6 +80,7 @@ #define listen _listen #define nanosleep _nanosleep #define open _open +#define openat _openat #define poll _poll #define pthread_atfork _pthread_atfork #define pthread_attr_destroy _pthread_attr_destroy Modified: head/lib/libc/include/un-namespace.h ============================================================================== --- head/lib/libc/include/un-namespace.h Sun Oct 11 18:21:55 2009 (r197967) +++ head/lib/libc/include/un-namespace.h Sun Oct 11 20:19:45 2009 (r197968) @@ -61,6 +61,7 @@ #undef listen #undef nanosleep #undef open +#undef openat #undef poll #undef pthread_atfork #undef pthread_attr_destroy Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Sun Oct 11 18:21:55 2009 (r197967) +++ head/lib/libc/sys/Symbol.map Sun Oct 11 20:19:45 2009 (r197968) @@ -769,6 +769,8 @@ FBSDprivate_1.0 { __sys_olio_listio; _open; __sys_open; + _openat; + __sys_openat; _pathconf; __sys_pathconf; _pipe; Modified: head/lib/libthr/pthread.map ============================================================================== --- head/lib/libthr/pthread.map Sun Oct 11 18:21:55 2009 (r197967) +++ head/lib/libthr/pthread.map Sun Oct 11 20:19:45 2009 (r197968) @@ -195,6 +195,7 @@ FBSDprivate_1.0 { __msync; __nanosleep; __open; + __openat; __poll; __pthread_cond_timedwait; __pthread_cond_wait; @@ -406,3 +407,7 @@ FBSD_1.1 { pthread_mutex_setspinloops_np; pthread_mutex_setyieldloops_np; }; + +FBSD_1.2 { + openat; +}; Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Sun Oct 11 18:21:55 2009 (r197967) +++ head/lib/libthr/thread/thr_private.h Sun Oct 11 20:19:45 2009 (r197968) @@ -668,6 +668,7 @@ void _pthread_cleanup_pop(int); #ifdef _SYS_FCNTL_H_ int __sys_fcntl(int, int, ...); int __sys_open(const char *, int, ...); +int __sys_openat(int, const char *, int, ...); #endif /* #include */ Modified: head/lib/libthr/thread/thr_syscalls.c ============================================================================== --- head/lib/libthr/thread/thr_syscalls.c Sun Oct 11 18:21:55 2009 (r197967) +++ head/lib/libthr/thread/thr_syscalls.c Sun Oct 11 20:19:45 2009 (r197968) @@ -139,6 +139,7 @@ int __fsync(int); int __msync(void *, size_t, int); int __nanosleep(const struct timespec *, struct timespec *); int __open(const char *, int,...); +int __openat(int, const char *, int,...); int __poll(struct pollfd *, unsigned int, int); ssize_t __read(int, void *buf, size_t); ssize_t __readv(int, const struct iovec *, int); @@ -341,6 +342,33 @@ __open(const char *path, int flags,...) return ret; } +__weak_reference(__openat, openat); + +int +__openat(int fd, const char *path, int flags, ...) +{ + struct pthread *curthread = _get_curthread(); + int ret; + int mode = 0; + va_list ap; + + _thr_cancel_enter(curthread); + + /* Check if the file is being created: */ + if (flags & O_CREAT) { + /* Get the creation mode: */ + va_start(ap, flags); + mode = va_arg(ap, int); + va_end(ap); + } + + ret = __sys_openat(fd, path, flags, mode); + + _thr_cancel_leave(curthread); + + return ret; +} + __weak_reference(__poll, poll); int From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 20:42: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 90E71106568B; Sun, 11 Oct 2009 20:42:27 +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 809158FC12; Sun, 11 Oct 2009 20:42:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BKgR7v029989; Sun, 11 Oct 2009 20:42:27 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9BKgRCQ029985; Sun, 11 Oct 2009 20:42:27 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200910112042.n9BKgRCQ029985@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 11 Oct 2009 20:42: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: r197969 - 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: Sun, 11 Oct 2009 20:42:27 -0000 Author: marcel Date: Sun Oct 11 20:42:26 2009 New Revision: 197969 URL: http://svn.freebsd.org/changeset/base/197969 Log: Scan for option ROMs on i386 and amd64 only. Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Oct 11 20:19:45 2009 (r197968) +++ head/sys/conf/files Sun Oct 11 20:42:26 2009 (r197969) @@ -1919,7 +1919,6 @@ gnu/fs/reiserfs/reiserfs_vnops.c optiona isa/isa_if.m standard isa/isa_common.c optional isa isa/isahint.c optional isa -isa/orm.c optional isa isa/pnp.c optional isa isapnp isa/pnpparse.c optional isa isapnp fs/cd9660/cd9660_bmap.c optional cd9660 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Sun Oct 11 20:19:45 2009 (r197968) +++ head/sys/conf/files.amd64 Sun Oct 11 20:42:26 2009 (r197969) @@ -228,6 +228,7 @@ dev/syscons/scvtb.c optional sc dev/uart/uart_cpu_amd64.c optional uart dev/wpi/if_wpi.c optional wpi isa/atrtc.c standard +isa/orm.c optional isa isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/link_elf_obj.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Sun Oct 11 20:19:45 2009 (r197968) +++ head/sys/conf/files.i386 Sun Oct 11 20:42:26 2009 (r197969) @@ -362,6 +362,7 @@ i386/svr4/svr4_locore.s optional compat i386/svr4/svr4_machdep.c optional compat_svr4 # isa/atrtc.c optional atpic +isa/orm.c optional isa isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/imgact_aout.c optional compat_aout From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 20:55: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 936731065676; Sun, 11 Oct 2009 20:55:09 +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 6E4278FC1A; Sun, 11 Oct 2009 20:55:09 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 2138F46B1A; Sun, 11 Oct 2009 16:55:09 -0400 (EDT) Date: Sun, 11 Oct 2009 21:55:09 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: David Schultz In-Reply-To: <200910110008.n9B08tQc095922@svn.freebsd.org> Message-ID: References: <200910110008.n9B08tQc095922@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: r197949 - 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: Sun, 11 Oct 2009 20:55:09 -0000 On Sun, 11 Oct 2009, David Schultz wrote: > Log: > Document errno codes added in r144530. Thanks! Seeing this MFC'd for 8.0 wouldn't be such a bad thing either. Robert > Modified: > head/lib/libc/sys/intro.2 > > Modified: head/lib/libc/sys/intro.2 > ============================================================================== > --- head/lib/libc/sys/intro.2 Sat Oct 10 22:29:34 2009 (r197948) > +++ head/lib/libc/sys/intro.2 Sun Oct 11 00:08:55 2009 (r197949) > @@ -456,6 +456,14 @@ The specified extended attribute does no > .It Er 88 EDOOFUS Em "Programming error" . > A function or API is being abused in a way which could only be detected > at run-time. > +.It Er 89 EBADMSG Em "Bad message" . > +A corrupted message was detected. > +.It Er 90 EMULTIHOP Em "Multihop attempted" . > +This error code is unused, but present for compatibility with other systems. > +.It Er 91 ENOLINK Em "Link has been severed" . > +This error code is unused, but present for compatibility with other systems. > +.It Er 92 EPROTO Em "Protocol error" . > +A device or socket encountered an unrecoverable protocol error. > .It Er 93 ENOTCAPABLE Em "Capabilities insufficient" . > An operation on a capability file descriptor requires greater privilege than > the capability allows. > From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 10:08: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 114CF1065670; Mon, 12 Oct 2009 10:08:59 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F37BF8FC1E; Mon, 12 Oct 2009 10:08:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CA8w55052980; Mon, 12 Oct 2009 10:08:58 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CA8wId052976; Mon, 12 Oct 2009 10:08:58 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200910121008.n9CA8wId052976@svn.freebsd.org> From: Rui Paulo Date: Mon, 12 Oct 2009 10:08: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: r197975 - 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: Mon, 12 Oct 2009 10:08:59 -0000 Author: rpaulo Date: Mon Oct 12 10:08:58 2009 New Revision: 197975 URL: http://svn.freebsd.org/changeset/base/197975 Log: Another 3.03 draft bit that I missed in the previous 802.11s stack update. The Mesh Configuration IE has changed quite a bit. Refactor the code to handle this change. MFC after: 3 days Modified: head/sys/net80211/ieee80211_hwmp.c head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_mesh.h Modified: head/sys/net80211/ieee80211_hwmp.c ============================================================================== --- head/sys/net80211/ieee80211_hwmp.c Mon Oct 12 07:29:50 2009 (r197974) +++ head/sys/net80211/ieee80211_hwmp.c Mon Oct 12 10:08:58 2009 (r197975) @@ -192,7 +192,7 @@ static ieee80211_recv_action_func hwmp_r static struct ieee80211_mesh_proto_path mesh_proto_hwmp = { .mpp_descr = "HWMP", - .mpp_ie = IEEE80211_MESHCONF_HWMP, + .mpp_ie = IEEE80211_MESHCONF_PATH_HWMP, .mpp_discover = hwmp_discover, .mpp_peerdown = hwmp_peerdown, .mpp_vattach = hwmp_vattach, Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Mon Oct 12 07:29:50 2009 (r197974) +++ head/sys/net80211/ieee80211_mesh.c Mon Oct 12 10:08:58 2009 (r197975) @@ -132,7 +132,7 @@ static ieee80211_send_action_func mesh_s static const struct ieee80211_mesh_proto_metric mesh_metric_airtime = { .mpm_descr = "AIRTIME", - .mpm_ie = IEEE80211_MESHCONF_AIRTIME, + .mpm_ie = IEEE80211_MESHCONF_METRIC_AIRTIME, .mpm_metric = mesh_airtime_calc, }; @@ -344,18 +344,18 @@ int ieee80211_mesh_register_proto_path(const struct ieee80211_mesh_proto_path *mpp) { int i, firstempty = -1; - static const uint8_t emptyie[4] = { 0, 0, 0, 0 }; for (i = 0; i < N(mesh_proto_paths); i++) { - if (memcmp(mpp->mpp_ie, mesh_proto_paths[i].mpp_ie, 4) == 0) + if (strncmp(mpp->mpp_descr, mesh_proto_paths[i].mpp_descr, + IEEE80211_MESH_PROTO_DSZ) == 0) return EEXIST; - if (memcmp(mesh_proto_paths[i].mpp_ie, emptyie, 4) == 0 && - firstempty == -1) + if (!mesh_proto_paths[i].mpp_active && firstempty == -1) firstempty = i; } if (firstempty < 0) return ENOSPC; memcpy(&mesh_proto_paths[firstempty], mpp, sizeof(*mpp)); + mesh_proto_paths[firstempty].mpp_active = 1; return 0; } @@ -364,18 +364,18 @@ ieee80211_mesh_register_proto_metric(con ieee80211_mesh_proto_metric *mpm) { int i, firstempty = -1; - static const uint8_t emptyie[4] = { 0, 0, 0, 0 }; for (i = 0; i < N(mesh_proto_metrics); i++) { - if (memcmp(mpm->mpm_ie, mesh_proto_metrics[i].mpm_ie, 4) == 0) + if (strncmp(mpm->mpm_descr, mesh_proto_metrics[i].mpm_descr, + IEEE80211_MESH_PROTO_DSZ) == 0) return EEXIST; - if (memcmp(mesh_proto_metrics[i].mpm_ie, emptyie, 4) == 0 && - firstempty == -1) + if (!mesh_proto_metrics[i].mpm_active && firstempty == -1) firstempty = i; } if (firstempty < 0) return ENOSPC; memcpy(&mesh_proto_metrics[firstempty], mpm, sizeof(*mpm)); + mesh_proto_metrics[firstempty].mpm_active = 1; return 0; } @@ -2282,51 +2282,40 @@ mesh_verify_meshid(struct ieee80211vap * static int mesh_verify_meshconf(struct ieee80211vap *vap, const uint8_t *ie) { - static const uint8_t null[4] = IEEE80211_MESHCONF_NULL; const struct ieee80211_meshconf_ie *meshconf = (const struct ieee80211_meshconf_ie *) ie; const struct ieee80211_mesh_state *ms = vap->iv_mesh; if (meshconf == NULL) return 1; - if (meshconf->conf_ver != IEEE80211_MESHCONF_VERSION) { + if (meshconf->conf_pselid != ms->ms_ppath->mpp_ie) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, - "wrong mesh conf version: %d\n", meshconf->conf_ver); + "unknown path selection algorithm: 0x%x\n", + meshconf->conf_pselid); return 1; } - if (memcmp(meshconf->conf_pselid, ms->ms_ppath->mpp_ie, 4) != 0) { + if (meshconf->conf_pmetid != ms->ms_pmetric->mpm_ie) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, - "unknown path selection algorithm: 0x%x%x%x%x\n", - meshconf->conf_pselid[0], meshconf->conf_pselid[1], - meshconf->conf_pselid[2], meshconf->conf_pselid[3]); + "unknown path metric algorithm: 0x%x\n", + meshconf->conf_pmetid); return 1; } - if (memcmp(meshconf->conf_pmetid, ms->ms_pmetric->mpm_ie, 4) != 0) { + if (meshconf->conf_ccid != 0) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, - "unknown path metric algorithm: 0x%x%x%x%x\n", - meshconf->conf_pmetid[0], meshconf->conf_pmetid[1], - meshconf->conf_pmetid[2], meshconf->conf_pmetid[3]); + "unknown congestion control algorithm: 0x%x\n", + meshconf->conf_ccid); return 1; } - if (memcmp(meshconf->conf_ccid, null, 4) != 0) { + if (meshconf->conf_syncid != IEEE80211_MESHCONF_SYNC_NEIGHOFF) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, - "unknown congestion sig algorithm: 0x%x%x%x%x\n", - meshconf->conf_ccid[0], meshconf->conf_ccid[1], - meshconf->conf_ccid[2], meshconf->conf_ccid[3]); + "unknown sync algorithm: 0x%x\n", + meshconf->conf_syncid); return 1; } - if (memcmp(meshconf->conf_syncid, null, 4) != 0) { + if (meshconf->conf_authid != 0) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, - "unknown sync algorithm: 0x%x%x%x%x\n", - meshconf->conf_syncid[0], meshconf->conf_syncid[1], - meshconf->conf_syncid[2], meshconf->conf_syncid[3]); - return 1; - } - if (memcmp(meshconf->conf_authid, null, 4) != 0) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, - "unknown auth auth algorithm: 0x%x%x%x%x\n", - meshconf->conf_pselid[0], meshconf->conf_pselid[1], - meshconf->conf_pselid[2], meshconf->conf_pselid[3]); + "unknown auth auth algorithm: 0x%x\n", + meshconf->conf_pselid); return 1; } /* Not accepting peers */ @@ -2394,24 +2383,16 @@ uint8_t * ieee80211_add_meshconf(uint8_t *frm, struct ieee80211vap *vap) { const struct ieee80211_mesh_state *ms = vap->iv_mesh; - static const uint8_t null[4] = IEEE80211_MESHCONF_NULL; KASSERT(vap->iv_opmode == IEEE80211_M_MBSS, ("not a MBSS vap")); *frm++ = IEEE80211_ELEMID_MESHCONF; *frm++ = sizeof(struct ieee80211_meshconf_ie) - 2; - *frm++ = IEEE80211_MESHCONF_VERSION; - memcpy(frm, ms->ms_ppath->mpp_ie, 4); /* path selection */ - frm += 4; - memcpy(frm, ms->ms_pmetric->mpm_ie, 4); /* link metric */ - frm += 4; - /* XXX null for now */ - memcpy(frm, null, 4); /* congestion control */ - frm += 4; - memcpy(frm, null, 4); /* sync */ - frm += 4; - memcpy(frm, null, 4); /* auth */ - frm += 4; + *frm++ = ms->ms_ppath->mpp_ie; /* path selection */ + *frm++ = ms->ms_pmetric->mpm_ie; /* link metric */ + *frm++ = IEEE80211_MESHCONF_CC_DISABLED; + *frm++ = IEEE80211_MESHCONF_SYNC_NEIGHOFF; + *frm++ = IEEE80211_MESHCONF_AUTH_DISABLED; /* NB: set the number of neighbors before the rest */ *frm = (ms->ms_neighbors > 15 ? 15 : ms->ms_neighbors) << 1; if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL) @@ -2440,7 +2421,7 @@ ieee80211_add_meshpeer(uint8_t *frm, uin *frm++ = IEEE80211_ELEMID_MESHPEER; switch (subtype) { case IEEE80211_MESH_PEER_LINK_OPEN: - *frm++ = 6; /* length */ + frm++ = 6; /* length */ memcpy(frm, meshpeerproto, 4); frm += 4; ADDSHORT(frm, localid); /* local ID */ Modified: head/sys/net80211/ieee80211_mesh.h ============================================================================== --- head/sys/net80211/ieee80211_mesh.h Mon Oct 12 07:29:50 2009 (r197974) +++ head/sys/net80211/ieee80211_mesh.h Mon Oct 12 10:08:58 2009 (r197975) @@ -43,47 +43,27 @@ struct ieee80211_meshconf_ie { uint8_t conf_ie; /* IEEE80211_ELEMID_MESHCONF */ uint8_t conf_len; - uint8_t conf_ver; - uint8_t conf_pselid[4]; /* Active Path Sel. Proto. ID */ - uint8_t conf_pmetid[4]; /* APS Metric Identifier */ - uint8_t conf_ccid[4]; /* Congestion Control Mode ID */ - uint8_t conf_syncid[4]; /* Sync. Protocol ID */ - uint8_t conf_authid[4]; /* Auth. Protocol ID */ + uint8_t conf_pselid; /* Active Path Sel. Proto. ID */ + uint8_t conf_pmetid; /* Active Metric Identifier */ + uint8_t conf_ccid; /* Congestion Control Mode ID */ + uint8_t conf_syncid; /* Sync. Protocol ID */ + uint8_t conf_authid; /* Auth. Protocol ID */ uint8_t conf_form; /* Formation Information */ uint8_t conf_cap; } __packed; -#define IEEE80211_MESHCONF_VERSION 1 -/* Null Protocol */ -#define IEEE80211_MESHCONF_NULL_OUI 0x00, 0x0f, 0xac -#define IEEE80211_MESHCONF_NULL_VALUE 0xff -#define IEEE80211_MESHCONF_NULL { IEEE80211_MESHCONF_NULL_OUI, \ - IEEE80211_MESHCONF_NULL_VALUE } /* Hybrid Wireless Mesh Protocol */ -#define IEEE80211_MESHCONF_HWMP_OUI 0x00, 0x0f, 0xac -#define IEEE80211_MESHCONF_HWMP_VALUE 0x00 -#define IEEE80211_MESHCONF_HWMP { IEEE80211_MESHCONF_HWMP_OUI, \ - IEEE80211_MESHCONF_HWMP_VALUE } +#define IEEE80211_MESHCONF_PATH_HWMP 0x00 /* Airtime Link Metric */ -#define IEEE80211_MESHCONF_AIRTIME_OUI 0x00, 0x0f, 0xac -#define IEEE80211_MESHCONF_AIRTIME_VALUE 0x00 -#define IEEE80211_MESHCONF_AIRTIME { IEEE80211_MESHCONF_AIRTIME_OUI, \ - IEEE80211_MESHCONF_AIRTIME_VALUE } -/* Congestion Control Signaling */ -#define IEEE80211_MESHCONF_CCSIG_OUI 0x00, 0x0f, 0xac -#define IEEE80211_MESHCONF_CCSIG_VALUE 0x00 -#define IEEE80211_MESHCONF_CCSIG { IEEE80211_MESHCONF_CCSIG_OUI,\ - IEEE80211_MESHCONF_CCSIG_VALUE } +#define IEEE80211_MESHCONF_METRIC_AIRTIME 0x00 +/* Congestion Control */ +#define IEEE80211_MESHCONF_CC_DISABLED 0x00 +#define IEEE80211_MESHCONF_CC_SIG 0x01 /* Neighbour Offset */ -#define IEEE80211_MESHCONF_NEIGHOFF_OUI 0x00, 0x0f, 0xac -#define IEEE80211_MESHCONF_NEIGHOFF_VALUE 0x00 -#define IEEE80211_MESHCONF_NEIGHOFF { IEEE80211_MESHCONF_NEIGHOFF_OUI, \ - IEEE80211_MESHCONF_NEIGHOFF_VALUE } +#define IEEE80211_MESHCONF_SYNC_NEIGHOFF 0x00 +#define IEEE80211_MESHCONF_AUTH_DISABLED 0x00 /* Simultaneous Authenticaction of Equals */ -#define IEEE80211_MESHCONF_SAE_OUI 0x00, 0x0f, 0xac -#define IEEE80211_MESHCONF_SAE_VALUE 0x01 -#define IEEE80211_MESHCONF_SAE { IEEE80211_MESHCONF_SAE_OUI, \ - IEEE80211_MESHCONF_SAE_VALUE } +#define IEEE80211_MESHCONF_AUTH_SAE 0x01 #define IEEE80211_MESHCONF_FORM_MP 0x01 /* Connected to Portal */ #define IEEE80211_MESHCONF_FORM_NNEIGH_MASK 0x04 /* Number of Neighbours */ #define IEEE80211_MESHCONF_CAP_AP 0x01 /* Accepting Peers */ @@ -390,8 +370,9 @@ struct ieee80211_mesh_route { */ enum ieee80211_state; struct ieee80211_mesh_proto_path { + uint8_t mpp_active; char mpp_descr[IEEE80211_MESH_PROTO_DSZ]; - uint8_t mpp_ie[4]; + uint8_t mpp_ie; struct ieee80211_node * (*mpp_discover)(struct ieee80211vap *, const uint8_t [IEEE80211_ADDR_LEN], @@ -411,8 +392,9 @@ struct ieee80211_mesh_proto_path { * Mesh Link Metric Report Protocol. */ struct ieee80211_mesh_proto_metric { + uint8_t mpm_active; char mpm_descr[IEEE80211_MESH_PROTO_DSZ]; - uint8_t mpm_ie[4]; + uint8_t mpm_ie; uint32_t (*mpm_metric)(struct ieee80211_node *); }; From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 10:09: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 CF57C1065696; Mon, 12 Oct 2009 10:09:48 +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 BEE1C8FC18; Mon, 12 Oct 2009 10:09:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CA9mdQ053033; Mon, 12 Oct 2009 10:09:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CA9mMm053031; Mon, 12 Oct 2009 10:09:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910121009.n9CA9mMm053031@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Oct 2009 10:09: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: r197976 - 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: Mon, 12 Oct 2009 10:09:48 -0000 Author: kib Date: Mon Oct 12 10:09:48 2009 New Revision: 197976 URL: http://svn.freebsd.org/changeset/base/197976 Log: Fix typo. Submitted by: rdivacky MFC after: 1 month Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Oct 12 10:08:58 2009 (r197975) +++ head/sys/kern/kern_sig.c Mon Oct 12 10:09:48 2009 (r197976) @@ -1014,7 +1014,7 @@ kern_sigprocmask(struct thread *td, int } /* - * The new_block set contains signals that were not previosly + * The new_block set contains signals that were not previously * blocked, but are blocked now. * * In case we block any signal that was not previously blocked From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 10:30: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 91401106572F; Mon, 12 Oct 2009 10:30:15 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 805BA8FC1D; Mon, 12 Oct 2009 10:30:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CAUFVj053421; Mon, 12 Oct 2009 10:30:15 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CAUFUK053419; Mon, 12 Oct 2009 10:30:15 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200910121030.n9CAUFUK053419@svn.freebsd.org> From: Rui Paulo Date: Mon, 12 Oct 2009 10:30: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: r197977 - 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: Mon, 12 Oct 2009 10:30:15 -0000 Author: rpaulo Date: Mon Oct 12 10:30:15 2009 New Revision: 197977 URL: http://svn.freebsd.org/changeset/base/197977 Log: Fix a wrong initialization that snuck in the latest commit. MFC after: 3 days Modified: head/sys/net80211/ieee80211_mesh.c Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Mon Oct 12 10:09:48 2009 (r197976) +++ head/sys/net80211/ieee80211_mesh.c Mon Oct 12 10:30:15 2009 (r197977) @@ -2421,7 +2421,7 @@ ieee80211_add_meshpeer(uint8_t *frm, uin *frm++ = IEEE80211_ELEMID_MESHPEER; switch (subtype) { case IEEE80211_MESH_PEER_LINK_OPEN: - frm++ = 6; /* length */ + *frm++ = 6; /* length */ memcpy(frm, meshpeerproto, 4); frm += 4; ADDSHORT(frm, localid); /* local ID */ From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 10:54: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 11BEE106566B; Mon, 12 Oct 2009 10:54:03 +0000 (UTC) (envelope-from alan.bsd@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 6100A8FC08; Mon, 12 Oct 2009 10:54:02 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so401648qwd.7 for ; Mon, 12 Oct 2009 03:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2Ruxpq6iG6Hw4sQCg3Z6/rISXsbmrYu3Xx/vJYuTx3g=; b=n3Kac3L5wNt/yXSct3HDnJ4fFsyq7X5x62FWmTsjICLnPbBDvOx4QtT0A9mxWT3unb VvWI3MbS9dlw5+XKrdf/CCHIhvxIzmoGbm+75F8K6XfQpmNCBoma/1ugV8YGrfrbqn4O cvxLSIsCZ676oJwdoVkTOJUk+383i5gPA6+Wo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=pfiPEP6ewSTOaKzVhMGC8+V13Dtz2e4M8ufzKV+JaM+rsIZMWvhC8wKPkhKz2zjGol jLy2uhlTk5UqFwrZQXqONJlnfLTcGqYTSLzKgIr/wDwi4L8+ENHz6SWKZ3kHbaSs/5T2 nxmusFP67k9pC3fIBoodGX8z5OzaerbrjiuFs= MIME-Version: 1.0 Received: by 10.224.33.195 with SMTP id i3mr4573903qad.386.1255343297232; Mon, 12 Oct 2009 03:28:17 -0700 (PDT) In-Reply-To: References: <200910110008.n9B08tQc095922@svn.freebsd.org> Date: Mon, 12 Oct 2009 07:28:17 -0300 Message-ID: From: "Alan R. S. Bueno" To: Robert Watson , David Schultz Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r197949 - 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, 12 Oct 2009 10:54:03 -0000 On Sun, Oct 11, 2009 at 5:55 PM, Robert Watson wrote: > > On Sun, 11 Oct 2009, David Schultz wrote: > >> Log: >> =A0Document errno codes added in r144530. > > Thanks! =A0Seeing this MFC'd for 8.0 wouldn't be such a bad thing either. > > Robert > > > >> Modified: >> =A0head/lib/libc/sys/intro.2 >> >> Modified: head/lib/libc/sys/intro.2 >> >> =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/lib/libc/sys/intro.2 =A0 Sat Oct 10 22:29:34 2009 =A0 =A0 =A0 = =A0(r197948) >> +++ head/lib/libc/sys/intro.2 =A0 Sun Oct 11 00:08:55 2009 =A0 =A0 =A0 = =A0(r197949) >> @@ -456,6 +456,14 @@ The specified extended attribute does no >> .It Er 88 EDOOFUS Em "Programming error" . >> A function or API is being abused in a way which could only be detected >> at run-time. >> +.It Er 89 EBADMSG Em "Bad message" . >> +A corrupted message was detected. >> +.It Er 90 EMULTIHOP Em "Multihop attempted" . >> +This error code is unused, but present for compatibility with other >> systems. >> +.It Er 91 ENOLINK Em "Link has been severed" . >> +This error code is unused, but present for compatibility with other >> systems. >> +.It Er 92 EPROTO Em "Protocol error" . >> +A device or socket encountered an unrecoverable protocol error. >> .It Er 93 ENOTCAPABLE Em "Capabilities insufficient" . >> An operation on a capability file descriptor requires greater privilege >> than >> the capability allows. >> Hi, That modification also imply modifying the template NLS catalog and the translations (or maybe translators should be advised to update their files (I don't know if they are aware of the change)). The patch to C.msg: Index: C.msg =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 RCS file: /home/ncvs/src/lib/libc/nls/C.msg,v retrieving revision 1.1 diff -u -r1.1 C.msg --- C.msg 27 Feb 2005 17:59:39 -0000 1.1 +++ C.msg 12 Oct 2009 10:14:33 -0000 @@ -181,6 +181,16 @@ 87 Attribute not found $ EDOOFUS 88 Programming error +$ EBADMSG +89 Bad message +$ EMULTIHOP +90 Multihop attempted +$ ENOLINK +91 Link has been severed +$ EPROTO +92 Protocol error +$ ENOTCAPABLE +93 Capabilities insufficient $ $ strsignal() support catalog $ Thanks! From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 14:51: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 09F93106566B; Mon, 12 Oct 2009 14:51:20 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3D468FC17; Mon, 12 Oct 2009 14:51:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CEpJST070289; Mon, 12 Oct 2009 14:51:19 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CEpJb4070288; Mon, 12 Oct 2009 14:51:19 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200910121451.n9CEpJb4070288@svn.freebsd.org> From: Rui Paulo Date: Mon, 12 Oct 2009 14:51: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: r197980 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 12 Oct 2009 14:51:20 -0000 Author: rpaulo Date: Mon Oct 12 14:51:19 2009 New Revision: 197980 URL: http://svn.freebsd.org/changeset/base/197980 Log: Update for latest 802.11s changes in meshconf format. MFC after: 3 days Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon Oct 12 12:54:34 2009 (r197979) +++ head/sbin/ifconfig/ifieee80211.c Mon Oct 12 14:51:19 2009 (r197980) @@ -2624,25 +2624,31 @@ do { \ if (verbose) { const struct ieee80211_meshconf_ie *mconf = (const struct ieee80211_meshconf_ie *)ie; - const uint8_t null[4] = IEEE80211_MESHCONF_NULL; - const uint8_t hwmp[4] = IEEE80211_MESHCONF_HWMP; - const uint8_t airtime[4] = IEEE80211_MESHCONF_AIRTIME; - const uint8_t ccsig[4] = IEEE80211_MESHCONF_CCSIG; - const uint8_t sae[4] = IEEE80211_MESHCONF_SAE; - const uint8_t neighoff[4] = IEEE80211_MESHCONF_SAE; - printf("conf_ver); - MATCHOUI(mconf->conf_pselid, hwmp, "HWMP"); + printf("conf_pselid == IEEE80211_MESHCONF_PATH_HWMP) + printf("HWMP"); + else + printf("UNKNOWN"); printf(" LINK:"); - MATCHOUI(mconf->conf_pmetid, airtime, "AIRTIME"); + if (mconf->conf_pmetid == IEEE80211_MESHCONF_METRIC_AIRTIME) + printf("AIRTIME"); + else + printf("UNKNOWN"); printf(" CONGESTION:"); - MATCHOUI(mconf->conf_ccid, ccsig, "SIG"); - MATCHOUI(mconf->conf_ccid, null, "NULL"); + if (mconf->conf_ccid == IEEE80211_MESHCONF_CC_DISABLED) + printf("DISABLED"); + else + printf("UNKNOWN"); printf(" SYNC:"); - MATCHOUI(mconf->conf_syncid, neighoff, "NEIGHOFF"); - MATCHOUI(mconf->conf_syncid, null, "NULL"); + if (mconf->conf_syncid == IEEE80211_MESHCONF_SYNC_NEIGHOFF) + printf("NEIGHOFF"); + else + printf("UNKNOWN"); printf(" AUTH:"); - MATCHOUI(mconf->conf_authid, sae, "SAE"); - MATCHOUI(mconf->conf_authid, null, "NULL"); + if (mconf->conf_authid == IEEE80211_MESHCONF_AUTH_DISABLED) + printf("DISABLED"); + else + printf("UNKNOWN"); printf(" FORM:0x%x CAPS:0x%x>", mconf->conf_form, mconf->conf_cap); } From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 15:49: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 0A9201065676; Mon, 12 Oct 2009 15:49:49 +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 EE32E8FC1A; Mon, 12 Oct 2009 15:49:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CFnm4W073873; Mon, 12 Oct 2009 15:49:48 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CFnm9Q073871; Mon, 12 Oct 2009 15:49:48 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200910121549.n9CFnm9Q073871@svn.freebsd.org> From: Joseph Koshy Date: Mon, 12 Oct 2009 15:49: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: r197983 - 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: Mon, 12 Oct 2009 15:49:49 -0000 Author: jkoshy Date: Mon Oct 12 15:49:48 2009 New Revision: 197983 URL: http://svn.freebsd.org/changeset/base/197983 Log: Improve the description of sysctl "kern.sugid_coredump". Submitted by: Mel Flynn on -hackers Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Oct 12 15:46:17 2009 (r197982) +++ head/sys/kern/kern_sig.c Mon Oct 12 15:49:48 2009 (r197983) @@ -162,7 +162,7 @@ SYSINIT(signal, SI_SUB_P1003_1B, SI_ORDE int sugid_coredump; SYSCTL_INT(_kern, OID_AUTO, sugid_coredump, CTLFLAG_RW, - &sugid_coredump, 0, "Enable coredumping set user/group ID processes"); + &sugid_coredump, 0, "Allow setuid and setgid processes to dump core"); static int do_coredump = 1; SYSCTL_INT(_kern, OID_AUTO, coredump, CTLFLAG_RW, From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 17:10: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 7C2671065672; Mon, 12 Oct 2009 17:10:51 +0000 (UTC) (envelope-from bland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BC298FC13; Mon, 12 Oct 2009 17:10:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CHApWa078524; Mon, 12 Oct 2009 17:10:51 GMT (envelope-from bland@svn.freebsd.org) Received: (from bland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CHApOl078521; Mon, 12 Oct 2009 17:10:51 GMT (envelope-from bland@svn.freebsd.org) Message-Id: <200910121710.n9CHApOl078521@svn.freebsd.org> From: Alexander Nedotsukov Date: Mon, 12 Oct 2009 17:10: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: r197995 - in head/kerberos5/lib: libgssapi_krb5 libgssapi_spnego X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 12 Oct 2009 17:10:51 -0000 Author: bland (ports committer) Date: Mon Oct 12 17:10:51 2009 New Revision: 197995 URL: http://svn.freebsd.org/changeset/base/197995 Log: Link GSS mechanics modules against libgssapi so they will not fail due unresolved symbol errors when in turn libgssapi was loaded with RTLD_LOCAL flag set (which is the default). Reviewed by: dfr, jhb MFC after: 3 days Modified: head/kerberos5/lib/libgssapi_krb5/Makefile head/kerberos5/lib/libgssapi_spnego/Makefile Modified: head/kerberos5/lib/libgssapi_krb5/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_krb5/Makefile Mon Oct 12 17:09:35 2009 (r197994) +++ head/kerberos5/lib/libgssapi_krb5/Makefile Mon Oct 12 17:10:51 2009 (r197995) @@ -2,8 +2,8 @@ LIB= gssapi_krb5 LDFLAGS= -Wl,-Bsymbolic -LDADD= -lkrb5 -lhx509 -lcrypto -lroken -lasn1 -lcom_err -lcrypt -DPADD= ${LIBKRB5} ${LIBHX509} ${LIBCRYPTO} ${LIBROKEN} ${LIBASN1} \ +LDADD= -lgssapi -lkrb5 -lhx509 -lcrypto -lroken -lasn1 -lcom_err -lcrypt +DPADD= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBCRYPTO} ${LIBROKEN} ${LIBASN1} \ ${LIBCOM_ERR} ${LIBCRYPT} INCS= ${KRB5DIR}/lib/gssapi/gssapi/gssapi_krb5.h Modified: head/kerberos5/lib/libgssapi_spnego/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_spnego/Makefile Mon Oct 12 17:09:35 2009 (r197994) +++ head/kerberos5/lib/libgssapi_spnego/Makefile Mon Oct 12 17:10:51 2009 (r197995) @@ -2,8 +2,8 @@ LIB= gssapi_spnego LDFLAGS= -Wl,-Bsymbolic -LDADD= -lasn1 -DPADD= ${LIBASN1} +LDADD= -lgssapi -lasn1 +DPADD= ${LIBGSSAPI} ${LIBASN1} SRCS= accept_sec_context.c \ compat.c \ From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 17:45: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 BD16C1065670; Mon, 12 Oct 2009 17:45:28 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 304C18FC17; Mon, 12 Oct 2009 17:45:27 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAIMH00qDaFvH/2dsb2JhbADXFYQtBA X-IronPort-AV: E=Sophos;i="4.44,547,1249272000"; d="scan'208";a="51344971" Received: from danube.cs.uoguelph.ca ([131.104.91.199]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 12 Oct 2009 13:45:26 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by danube.cs.uoguelph.ca (Postfix) with ESMTP id 5D6071084124; Mon, 12 Oct 2009 13:45:26 -0400 (EDT) X-Virus-Scanned: amavisd-new at danube.cs.uoguelph.ca Received: from danube.cs.uoguelph.ca ([127.0.0.1]) by localhost (danube.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uCtxZepkrNAW; Mon, 12 Oct 2009 13:45:25 -0400 (EDT) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by danube.cs.uoguelph.ca (Postfix) with ESMTP id 9927510840BD; Mon, 12 Oct 2009 13:45:25 -0400 (EDT) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n9CHppd03241; Mon, 12 Oct 2009 13:51:51 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Mon, 12 Oct 2009 13:51:51 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Alexander Nedotsukov In-Reply-To: <200910121710.n9CHApOl078521@svn.freebsd.org> Message-ID: References: <200910121710.n9CHApOl078521@svn.freebsd.org> 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: r197995 - in head/kerberos5/lib: libgssapi_krb5 libgssapi_spnego X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 12 Oct 2009 17:45:28 -0000 On Mon, 12 Oct 2009, Alexander Nedotsukov wrote: > Author: bland (ports committer) > Date: Mon Oct 12 17:10:51 2009 > New Revision: 197995 > URL: http://svn.freebsd.org/changeset/base/197995 > > Log: > Link GSS mechanics modules against libgssapi so they will not fail due > unresolved symbol errors when in turn libgssapi was loaded with RTLD_LOCAL > flag set (which is the default). > Thanks a lot for dealing with this, rick From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 18:54: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 E8211106568D; Mon, 12 Oct 2009 18:54:02 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8AE08FC0C; Mon, 12 Oct 2009 18:54:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CIs2sG080744; Mon, 12 Oct 2009 18:54:02 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CIs2hg080743; Mon, 12 Oct 2009 18:54:02 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200910121854.n9CIs2hg080743@svn.freebsd.org> From: Hiroki Sato Date: Mon, 12 Oct 2009 18:54: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: r197996 - 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: Mon, 12 Oct 2009 18:54:03 -0000 Author: hrs Date: Mon Oct 12 18:54:02 2009 New Revision: 197996 URL: http://svn.freebsd.org/changeset/base/197996 Log: - Do not assign a link-local address when ND6_IFF_IFDISABLED. Adding a tentative address is useless. - Comment out a confused warning message when in6_ifattach_linklocal() fails. This can occur when the interface does not support ioctl(SIOCAIFADDR) (interfaces associated with 802.11 wireless network device drivers, for example). Modified: head/sys/netinet6/in6_ifattach.c Modified: head/sys/netinet6/in6_ifattach.c ============================================================================== --- head/sys/netinet6/in6_ifattach.c Mon Oct 12 17:10:51 2009 (r197995) +++ head/sys/netinet6/in6_ifattach.c Mon Oct 12 18:54:02 2009 (r197996) @@ -751,16 +751,19 @@ in6_ifattach(struct ifnet *ifp, struct i * assign a link-local address, if there's none. */ if (ifp->if_type != IFT_BRIDGE && + !(ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) && ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) { int error; ia = in6ifa_ifpforlinklocal(ifp, 0); if (ia == NULL) { error = in6_ifattach_linklocal(ifp, altifp); +#if 0 if (error) log(LOG_NOTICE, "in6_ifattach_linklocal: " "failed to add a link-local addr to %s\n", if_name(ifp)); +#endif } else ifa_free(&ia->ia_ifa); } From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 18:58: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 3E4A3106566B; Mon, 12 Oct 2009 18:58: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 2EAE88FC16; Mon, 12 Oct 2009 18:58:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CIwh21080883; Mon, 12 Oct 2009 18:58:43 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CIwhCx080881; Mon, 12 Oct 2009 18:58:43 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200910121858.n9CIwhCx080881@svn.freebsd.org> From: Robert Watson Date: Mon, 12 Oct 2009 18:58: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: r197997 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 12 Oct 2009 18:58:43 -0000 Author: rwatson Date: Mon Oct 12 18:58:42 2009 New Revision: 197997 URL: http://svn.freebsd.org/changeset/base/197997 Log: Add a MODULE_DEPEND() on the NFS client from dtnfsclient so that dtnfsclient can access NFS client symbols. MFC after: 3 days Discussed with: kib Reported by: markm Modified: head/sys/nfsclient/nfs_kdtrace.c Modified: head/sys/nfsclient/nfs_kdtrace.c ============================================================================== --- head/sys/nfsclient/nfs_kdtrace.c Mon Oct 12 18:54:02 2009 (r197996) +++ head/sys/nfsclient/nfs_kdtrace.c Mon Oct 12 18:58:42 2009 (r197997) @@ -543,3 +543,4 @@ DEV_MODULE(dtnfsclient, dtnfsclient_mode MODULE_VERSION(dtnfsclient, 1); MODULE_DEPEND(dtnfsclient, dtrace, 1, 1, 1); MODULE_DEPEND(dtnfsclient, opensolaris, 1, 1, 1); +MODULE_DEPEND(dtnfsclient, nfs, 1, 1, 1); From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 18:59: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 02CCF1065672; Mon, 12 Oct 2009 18:59:32 +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 E76748FC26; Mon, 12 Oct 2009 18:59:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CIxVXs080934; Mon, 12 Oct 2009 18:59:31 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CIxVfa080932; Mon, 12 Oct 2009 18:59:31 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200910121859.n9CIxVfa080932@svn.freebsd.org> From: Robert Watson Date: Mon, 12 Oct 2009 18:59:31 +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: r197998 - head/sys/modules/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 12 Oct 2009 18:59:32 -0000 Author: rwatson Date: Mon Oct 12 18:59:31 2009 New Revision: 197998 URL: http://svn.freebsd.org/changeset/base/197998 Log: Export DTrace symbols from nfsclient so that dtnfsclient can get to them. This fixes DTrace with nfsclient built as a module. MFC after: 3 days Reported by: markm Modified: head/sys/modules/nfsclient/Makefile Modified: head/sys/modules/nfsclient/Makefile ============================================================================== --- head/sys/modules/nfsclient/Makefile Mon Oct 12 18:58:42 2009 (r197997) +++ head/sys/modules/nfsclient/Makefile Mon Oct 12 18:59:31 2009 (r197998) @@ -41,4 +41,14 @@ NFS_ROOT= 1 SRCS+= nfs_diskless.c .endif +EXPORT_SYMS= \ + dtrace_nfsclient_accesscache_flush_done_probe \ + dtrace_nfsclient_accesscache_get_hit_probe \ + dtrace_nfsclient_accesscache_get_miss_probe \ + dtrace_nfsclient_accesscache_load_done_probe \ + nfsclient_accesscache_flush_done_id \ + nfsclient_accesscache_get_hit_id \ + nfsclient_accesscache_get_miss_id \ + nfsclient_accesscache_load_done_id + .include From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 19:19: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 6860610656C0; Mon, 12 Oct 2009 19:19:09 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58B5A8FC0C; Mon, 12 Oct 2009 19:19:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CJJ9XU083157; Mon, 12 Oct 2009 19:19:09 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CJJ9LW083155; Mon, 12 Oct 2009 19:19:09 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200910121919.n9CJJ9LW083155@svn.freebsd.org> From: Hiroki Sato Date: Mon, 12 Oct 2009 19:19: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: r197999 - head/sys/dev/usb/input X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 12 Oct 2009 19:19:09 -0000 Author: hrs Date: Mon Oct 12 19:19:08 2009 New Revision: 197999 URL: http://svn.freebsd.org/changeset/base/197999 Log: Fix the 106/109 USB Japanese keyboard "underscore" issue. Sun Type 6 USB keyboard support added in rev 1.46 conflicted with some scan codes used in Japanese keyboards because the scan code conversion routine was ambiguous for the overlapped codes. PR: ports/134005 Submitted by: YAMASHIRO Jun Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Mon Oct 12 18:59:31 2009 (r197998) +++ head/sys/dev/usb/input/ukbd.c Mon Oct 12 19:19:08 2009 (r197999) @@ -247,8 +247,8 @@ static const uint8_t ukbd_trtab[256] = { NN, NN, NN, NN, NN, NN, NN, NN, /* 68 - 6F */ NN, NN, NN, NN, 115, 108, 111, 113, /* 70 - 77 */ 109, 110, 112, 118, 114, 116, 117, 119, /* 78 - 7F */ - 121, 120, NN, NN, NN, NN, NN, 115, /* 80 - 87 */ - 112, 125, 121, 123, NN, NN, NN, NN, /* 88 - 8F */ + 121, 120, NN, NN, NN, NN, NN, 123, /* 80 - 87 */ + 124, 125, 126, 127, 128, NN, NN, NN, /* 88 - 8F */ NN, NN, NN, NN, NN, NN, NN, NN, /* 90 - 97 */ NN, NN, NN, NN, NN, NN, NN, NN, /* 98 - 9F */ NN, NN, NN, NN, NN, NN, NN, NN, /* A0 - A7 */ @@ -1636,20 +1636,59 @@ static int ukbd_key2scan(struct ukbd_softc *sc, int code, int shift, int up) { static const int scan[] = { - 0x1c, 0x1d, 0x35, - 0x37 | SCAN_PREFIX_SHIFT, /* PrintScreen */ - 0x38, 0x47, 0x48, 0x49, 0x4b, 0x4d, 0x4f, - 0x50, 0x51, 0x52, 0x53, - 0x46, /* XXX Pause/Break */ - 0x5b, 0x5c, 0x5d, + /* 89 */ + 0x11c, /* Enter */ + /* 90-99 */ + 0x11d, /* Ctrl-R */ + 0x135, /* Divide */ + 0x137 | SCAN_PREFIX_SHIFT, /* PrintScreen */ + 0x138, /* Alt-R */ + 0x147, /* Home */ + 0x148, /* Up */ + 0x149, /* PageUp */ + 0x14b, /* Left */ + 0x14d, /* Right */ + 0x14f, /* End */ + /* 100-109 */ + 0x150, /* Down */ + 0x151, /* PageDown */ + 0x152, /* Insert */ + 0x153, /* Delete */ + 0x146, /* XXX Pause/Break */ + 0x15b, /* Win_L(Super_L) */ + 0x15c, /* Win_R(Super_R) */ + 0x15d, /* Application(Menu) */ + /* SUN TYPE 6 USB KEYBOARD */ - 0x68, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, - 0x64, 0x65, 0x66, 0x67, 0x25, 0x1f, 0x1e, - 0x20, + 0x168, /* Sun Type 6 Help */ + 0x15e, /* Sun Type 6 Stop */ + /* 110 - 119 */ + 0x15f, /* Sun Type 6 Again */ + 0x160, /* Sun Type 6 Props */ + 0x161, /* Sun Type 6 Undo */ + 0x162, /* Sun Type 6 Front */ + 0x163, /* Sun Type 6 Copy */ + 0x164, /* Sun Type 6 Open */ + 0x165, /* Sun Type 6 Paste */ + 0x166, /* Sun Type 6 Find */ + 0x167, /* Sun Type 6 Cut */ + 0x125, /* Sun Type 6 Mute */ + /* 120 - 128 */ + 0x11f, /* Sun Type 6 VolumeDown */ + 0x11e, /* Sun Type 6 VolumeUp */ + 0x120, /* Sun Type 6 PowerDown */ + + /* Japanese 106/109 keyboard */ + 0x73, /* Keyboard Intl' 1 (backslash / underscore) */ + 0x70, /* Keyboard Intl' 2 (Katakana / Hiragana) */ + 0x7d, /* Keyboard Intl' 3 (Yen sign) (Not using in jp106/109) */ + 0x79, /* Keyboard Intl' 4 (Henkan) */ + 0x7b, /* Keyboard Intl' 5 (Muhenkan) */ + 0x5c, /* Keyboard Intl' 6 (Keypad ,) (For PC-9821 layout) */ }; if ((code >= 89) && (code < (89 + (sizeof(scan) / sizeof(scan[0]))))) { - code = scan[code - 89] | SCAN_PREFIX_E0; + code = scan[code - 89]; } /* Pause/Break */ if ((code == 104) && (!(shift & (MOD_CONTROL_L | MOD_CONTROL_R)))) { From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 21:10: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 16110106568B; Mon, 12 Oct 2009 21:10:29 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05FB58FC26; Mon, 12 Oct 2009 21:10:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CLASL6085942; Mon, 12 Oct 2009 21:10:28 GMT (envelope-from markm@svn.freebsd.org) Received: (from markm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CLASd4085940; Mon, 12 Oct 2009 21:10:28 GMT (envelope-from markm@svn.freebsd.org) Message-Id: <200910122110.n9CLASd4085940@svn.freebsd.org> From: Mark Murray Date: Mon, 12 Oct 2009 21:10: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: r198005 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 12 Oct 2009 21:10:29 -0000 Author: markm Date: Mon Oct 12 21:10:28 2009 New Revision: 198005 URL: http://svn.freebsd.org/changeset/base/198005 Log: We haven't installed usbdevs for many moons now, and it doesn't work any more anyway. Add it to the "obsolete" list. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Oct 12 21:08:38 2009 (r198004) +++ head/ObsoleteFiles.inc Mon Oct 12 21:10:28 2009 (r198005) @@ -503,6 +503,8 @@ OLD_FILES+=usr/include/dev/usb/usb_quirk OLD_FILES+=usr/include/dev/usb/usbcdc.h OLD_FILES+=usr/include/dev/usb/usbdivar.h OLD_FILES+=usr/include/dev/usb/uxb360gp_rdesc.h +OLD_FILES+=usr/sbin/usbdevs +OLD_FILES+=usr/share/man/man8/usbdevs.8.gz # 20090203: removal of pccard header files OLD_FILES+=usr/include/pccard/cardinfo.h OLD_FILES+=usr/include/pccard/cis.h From owner-svn-src-head@FreeBSD.ORG Mon Oct 12 21:11: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 7B65A1065672; Mon, 12 Oct 2009 21:11:50 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B1168FC1B; Mon, 12 Oct 2009 21:11:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9CLBoT4086013; Mon, 12 Oct 2009 21:11:50 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9CLBoDn086011; Mon, 12 Oct 2009 21:11:50 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200910122111.n9CLBoDn086011@svn.freebsd.org> From: Hiroki Sato Date: Mon, 12 Oct 2009 21:11:50 +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: r198006 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 12 Oct 2009 21:11:50 -0000 Author: hrs Date: Mon Oct 12 21:11:50 2009 New Revision: 198006 URL: http://svn.freebsd.org/changeset/base/198006 Log: Use printb() to display the "nd6 options=" line. Modified: head/sbin/ifconfig/af_nd6.c Modified: head/sbin/ifconfig/af_nd6.c ============================================================================== --- head/sbin/ifconfig/af_nd6.c Mon Oct 12 21:10:28 2009 (r198005) +++ head/sbin/ifconfig/af_nd6.c Mon Oct 12 21:11:50 2009 (r198006) @@ -56,17 +56,9 @@ static const char rcsid[] = #include "ifconfig.h" #define MAX_SYSCTL_TRY 5 - -static struct nd6_opt_list { - const char *label; - u_int mask; -} nd6_opts[] = { - { "IFDISABLED", ND6_IFF_IFDISABLED, }, - { "PERFORMNUD", ND6_IFF_PERFORMNUD, }, - { "ACCEPT_RTADV", ND6_IFF_ACCEPT_RTADV, }, - { "PREFER_SOURCE", ND6_IFF_PREFER_SOURCE, }, - { "AUTO_LINKLOCAL", ND6_IFF_AUTO_LINKLOCAL, }, -}; +#define ND6BITS "\020\001PERFORMNUD\002ACCEPT_RTADV\003PREFER_SOURCE" \ + "\004IFDISABLED\005DONT_SET_IFROUTE\006AUTO_LINKLOCAL" \ + "\020DEFAULTIF" static int isnd6defif(int); void setnd6flags(const char *, int, int, const struct afswtch *); @@ -153,9 +145,8 @@ nd6_status(int s) char *buf, *next; int mib[6], ntry; int s6; - int i, error; + int error; int isinet6, isdefif; - int nopts; /* Check if the interface has at least one IPv6 address. */ mib[0] = CTL_NET; @@ -220,22 +211,9 @@ nd6_status(int s) close(s6); if (nd.ndi.flags == 0 && !isdefif) return; - - nopts = 0; - printf("\tnd6 options=%d<", nd.ndi.flags); - for (i=0; i < sizeof(nd6_opts)/sizeof(nd6_opts[0]); i++) { - if (nd.ndi.flags & nd6_opts[i].mask) { - if (nopts++) - printf(","); - printf("%s", nd6_opts[i].label); - } - } - if (isdefif) { - if (nopts) - printf(","); - printf("DEFAULTIF"); - } - printf(">\n"); + printb("\tnd6 options", + (unsigned int)(nd.ndi.flags | (isdefif << 15)), ND6BITS); + putchar('\n'); } static struct afswtch af_nd6 = { From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 05:38: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 A366C1065672; Tue, 13 Oct 2009 05:38:08 +0000 (UTC) (envelope-from bland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91F428FC17; Tue, 13 Oct 2009 05:38:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9D5c8A0096087; Tue, 13 Oct 2009 05:38:08 GMT (envelope-from bland@svn.freebsd.org) Received: (from bland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9D5c8vb096085; Tue, 13 Oct 2009 05:38:08 GMT (envelope-from bland@svn.freebsd.org) Message-Id: <200910130538.n9D5c8vb096085@svn.freebsd.org> From: Alexander Nedotsukov Date: Tue, 13 Oct 2009 05:38: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: r198020 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 05:38:08 -0000 Author: bland (ports committer) Date: Tue Oct 13 05:38:08 2009 New Revision: 198020 URL: http://svn.freebsd.org/changeset/base/198020 Log: Chase dependency changes in libgssapi_krb5 module introruced by revision r197995. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Oct 13 05:05:54 2009 (r198019) +++ head/Makefile.inc1 Tue Oct 13 05:38:08 2009 (r198020) @@ -1122,7 +1122,7 @@ lib/libradius__L secure/lib/libssl__L: s _secure_lib_libssh= secure/lib/libssh secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L .if ${MK_KERBEROS} != "no" -kerberos5/lib/libgssapi_krb5__L: kerberos5/lib/libkrb5__L \ +kerberos5/lib/libgssapi_krb5__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libmd__L kerberos5/lib/libroken__L secure/lib/libcrypto__L \ lib/libcrypt__L From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 06:25: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 A4054106568F; Tue, 13 Oct 2009 06:25:53 +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 91FC28FC1B; Tue, 13 Oct 2009 06:25:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9D6PrrM097019; Tue, 13 Oct 2009 06:25:53 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9D6Prka097018; Tue, 13 Oct 2009 06:25:53 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200910130625.n9D6Prka097018@svn.freebsd.org> From: Ed Schouten Date: Tue, 13 Oct 2009 06:25: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: r198021 - head/games/number X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 06:25:53 -0000 Author: ed Date: Tue Oct 13 06:25:53 2009 New Revision: 198021 URL: http://svn.freebsd.org/changeset/base/198021 Log: Make number(6) build with WARNS=6. Modified: head/games/number/Makefile head/games/number/number.c Modified: head/games/number/Makefile ============================================================================== --- head/games/number/Makefile Tue Oct 13 05:38:08 2009 (r198020) +++ head/games/number/Makefile Tue Oct 13 06:25:53 2009 (r198021) @@ -4,4 +4,6 @@ PROG= number MAN= number.6 +WARNS?= 6 + .include Modified: head/games/number/number.c ============================================================================== --- head/games/number/number.c Tue Oct 13 05:38:08 2009 (r198020) +++ head/games/number/number.c Tue Oct 13 06:25:53 2009 (r198021) @@ -88,9 +88,7 @@ void usage(void); int lflag; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, first; char line[256]; @@ -275,7 +273,7 @@ void pfract(len) int len; { - static char *pref[] = { "", "ten-", "hundred-" }; + static char const * const pref[] = { "", "ten-", "hundred-" }; switch(len) { case 1: From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 08:08: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 55280106566B; Tue, 13 Oct 2009 08:08:16 +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 B68CC8FC15; Tue, 13 Oct 2009 08:08:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9D5Mggn095723; Mon, 12 Oct 2009 23:22:42 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 12 Oct 2009 23:22:51 -0600 (MDT) Message-Id: <20091012.232251.420437707.imp@bsdimp.com> To: marcel@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200910112042.n9BKgRCQ029985@svn.freebsd.org> References: <200910112042.n9BKgRCQ029985@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: r197969 - 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, 13 Oct 2009 08:08:17 -0000 In message: <200910112042.n9BKgRCQ029985@svn.freebsd.org> Marcel Moolenaar writes: : Author: marcel : Date: Sun Oct 11 20:42:26 2009 : New Revision: 197969 : URL: http://svn.freebsd.org/changeset/base/197969 : : Log: : Scan for option ROMs on i386 and amd64 only. Why? They should be scanned for on any system with a real isa bus... Warner : Modified: : head/sys/conf/files : head/sys/conf/files.amd64 : head/sys/conf/files.i386 : : Modified: head/sys/conf/files : ============================================================================== : --- head/sys/conf/files Sun Oct 11 20:19:45 2009 (r197968) : +++ head/sys/conf/files Sun Oct 11 20:42:26 2009 (r197969) : @@ -1919,7 +1919,6 @@ gnu/fs/reiserfs/reiserfs_vnops.c optiona : isa/isa_if.m standard : isa/isa_common.c optional isa : isa/isahint.c optional isa : -isa/orm.c optional isa : isa/pnp.c optional isa isapnp : isa/pnpparse.c optional isa isapnp : fs/cd9660/cd9660_bmap.c optional cd9660 : : Modified: head/sys/conf/files.amd64 : ============================================================================== : --- head/sys/conf/files.amd64 Sun Oct 11 20:19:45 2009 (r197968) : +++ head/sys/conf/files.amd64 Sun Oct 11 20:42:26 2009 (r197969) : @@ -228,6 +228,7 @@ dev/syscons/scvtb.c optional sc : dev/uart/uart_cpu_amd64.c optional uart : dev/wpi/if_wpi.c optional wpi : isa/atrtc.c standard : +isa/orm.c optional isa : isa/syscons_isa.c optional sc : isa/vga_isa.c optional vga : kern/link_elf_obj.c standard : : Modified: head/sys/conf/files.i386 : ============================================================================== : --- head/sys/conf/files.i386 Sun Oct 11 20:19:45 2009 (r197968) : +++ head/sys/conf/files.i386 Sun Oct 11 20:42:26 2009 (r197969) : @@ -362,6 +362,7 @@ i386/svr4/svr4_locore.s optional compat : i386/svr4/svr4_machdep.c optional compat_svr4 : # : isa/atrtc.c optional atpic : +isa/orm.c optional isa : isa/syscons_isa.c optional sc : isa/vga_isa.c optional vga : kern/imgact_aout.c optional compat_aout : From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 09:21: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 CBDFE106566B; Tue, 13 Oct 2009 09:21:20 +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 B9BCE8FC16; Tue, 13 Oct 2009 09:21:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9D9LKPw000325; Tue, 13 Oct 2009 09:21:20 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9D9LKPJ000323; Tue, 13 Oct 2009 09:21:20 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200910130921.n9D9LKPJ000323@svn.freebsd.org> From: Robert Watson Date: Tue, 13 Oct 2009 09:21:20 +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: r198024 - head/sys/modules/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 09:21:20 -0000 Author: rwatson Date: Tue Oct 13 09:21:20 2009 New Revision: 198024 URL: http://svn.freebsd.org/changeset/base/198024 Log: EXPORT_SYMS is not, in fact, required, for a dependent module to access non-static symbols in a module they depend on, so remove dtrace symbols from nfsclient's EXPORT_SYMS again. Suggested by: jhb Modified: head/sys/modules/nfsclient/Makefile Modified: head/sys/modules/nfsclient/Makefile ============================================================================== --- head/sys/modules/nfsclient/Makefile Tue Oct 13 09:21:15 2009 (r198023) +++ head/sys/modules/nfsclient/Makefile Tue Oct 13 09:21:20 2009 (r198024) @@ -41,14 +41,4 @@ NFS_ROOT= 1 SRCS+= nfs_diskless.c .endif -EXPORT_SYMS= \ - dtrace_nfsclient_accesscache_flush_done_probe \ - dtrace_nfsclient_accesscache_get_hit_probe \ - dtrace_nfsclient_accesscache_get_miss_probe \ - dtrace_nfsclient_accesscache_load_done_probe \ - nfsclient_accesscache_flush_done_id \ - nfsclient_accesscache_get_hit_id \ - nfsclient_accesscache_get_miss_id \ - nfsclient_accesscache_load_done_id - .include From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 10:43: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 B3C2C106566B; Tue, 13 Oct 2009 10:43:17 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A26548FC14; Tue, 13 Oct 2009 10:43:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DAhHL7003653; Tue, 13 Oct 2009 10:43:17 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DAhH2a003651; Tue, 13 Oct 2009 10:43:17 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200910131043.n9DAhH2a003651@svn.freebsd.org> From: Rui Paulo Date: Tue, 13 Oct 2009 10:43: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: r198027 - 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: Tue, 13 Oct 2009 10:43:17 -0000 Author: rpaulo Date: Tue Oct 13 10:43:17 2009 New Revision: 198027 URL: http://svn.freebsd.org/changeset/base/198027 Log: Properly initialize the mesh conf capabilities byte. MFC after: 2 days Modified: head/sys/net80211/ieee80211_mesh.c Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Tue Oct 13 10:14:38 2009 (r198026) +++ head/sys/net80211/ieee80211_mesh.c Tue Oct 13 10:43:17 2009 (r198027) @@ -2398,6 +2398,7 @@ ieee80211_add_meshconf(uint8_t *frm, str if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL) *frm |= IEEE80211_MESHCONF_FORM_MP; frm += 1; + *frm = 0; if (ms->ms_flags & IEEE80211_MESHFLAGS_AP) *frm |= IEEE80211_MESHCONF_CAP_AP; if (ms->ms_flags & IEEE80211_MESHFLAGS_FWD) From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 12:23: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 52368106568B; Tue, 13 Oct 2009 12:23:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41A758FC08; Tue, 13 Oct 2009 12:23:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DCNT1u005586; Tue, 13 Oct 2009 12:23:29 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DCNTM6005585; Tue, 13 Oct 2009 12:23:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910131223.n9DCNTM6005585@svn.freebsd.org> From: John Baldwin Date: Tue, 13 Oct 2009 12:23: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: r198028 - head/sys/dev/ppbus X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 12:23:29 -0000 Author: jhb Date: Tue Oct 13 12:23:28 2009 New Revision: 198028 URL: http://svn.freebsd.org/changeset/base/198028 Log: Correct a copy/paste bug in a comment. lptclose() checks once a second to see if the ppc hardware has gone idle rather than four times a second. Modified: head/sys/dev/ppbus/lpt.c Modified: head/sys/dev/ppbus/lpt.c ============================================================================== --- head/sys/dev/ppbus/lpt.c Tue Oct 13 10:43:17 2009 (r198027) +++ head/sys/dev/ppbus/lpt.c Tue Oct 13 12:23:28 2009 (r198028) @@ -624,7 +624,7 @@ lptclose(struct cdev *dev, int flags, in while ((ppb_rstr(ppbus) & (LPS_SEL|LPS_OUT|LPS_NBSY|LPS_NERR)) != (LPS_SEL|LPS_NBSY|LPS_NERR) || sc->sc_xfercnt) - /* wait 1/4 second, give up if we get a signal */ + /* wait 1 second, give up if we get a signal */ if (ppb_sleep(ppbus, lptdev, LPPRI | PCATCH, "lpclose", hz) != EWOULDBLOCK) break; From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 12:56: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 F3EA91065679; Tue, 13 Oct 2009 12:56:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E309E8FC08; Tue, 13 Oct 2009 12:56:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DCuN76006193; Tue, 13 Oct 2009 12:56:23 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DCuN5x006191; Tue, 13 Oct 2009 12:56:23 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200910131256.n9DCuN5x006191@svn.freebsd.org> From: Ed Maste Date: Tue, 13 Oct 2009 12:56: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: r198029 - head/usr.sbin/ntp/doc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 12:56:24 -0000 Author: emaste Date: Tue Oct 13 12:56:23 2009 New Revision: 198029 URL: http://svn.freebsd.org/changeset/base/198029 Log: Correct typo: thetime -> the time PR: docs/139447 Submitted by: Guido Falsi mad at madpilot dot net Modified: head/usr.sbin/ntp/doc/ntpd.8 Modified: head/usr.sbin/ntp/doc/ntpd.8 ============================================================================== --- head/usr.sbin/ntp/doc/ntpd.8 Tue Oct 13 12:23:28 2009 (r198028) +++ head/usr.sbin/ntp/doc/ntpd.8 Tue Oct 13 12:56:23 2009 (r198029) @@ -121,7 +121,7 @@ Normally, .Nm exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. -This option allows thetime to be set to any value without restriction; +This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, .Nm From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 14:42: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 BA1801065754; Tue, 13 Oct 2009 14:42:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8BF4F8FC13; Tue, 13 Oct 2009 14:42:13 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3E6C546B03; Tue, 13 Oct 2009 10:42:13 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 870738A020; Tue, 13 Oct 2009 10:42:12 -0400 (EDT) From: John Baldwin To: Robert Watson Date: Tue, 13 Oct 2009 09:06:02 -0400 User-Agent: KMail/1.9.7 References: <200910130921.n9D9LKPJ000323@svn.freebsd.org> In-Reply-To: <200910130921.n9D9LKPJ000323@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910130906.02860.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 13 Oct 2009 10:42:12 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198024 - head/sys/modules/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 14:42:13 -0000 On Tuesday 13 October 2009 5:21:20 am Robert Watson wrote: > Author: rwatson > Date: Tue Oct 13 09:21:20 2009 > New Revision: 198024 > URL: http://svn.freebsd.org/changeset/base/198024 > > Log: > EXPORT_SYMS is not, in fact, required, for a dependent module to access > non-static symbols in a module they depend on, so remove dtrace symbols > from nfsclient's EXPORT_SYMS again. > > Suggested by: jhb Arguably, though, this is due to bugs that we should try to fix in 9.0. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 15:01: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 4B6BC106566B; Tue, 13 Oct 2009 15:01:11 +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 255ED8FC1F; Tue, 13 Oct 2009 15:01:11 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id B26D346B03; Tue, 13 Oct 2009 11:01:10 -0400 (EDT) Date: Tue, 13 Oct 2009 16:01:10 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <200910130906.02860.jhb@freebsd.org> Message-ID: References: <200910130921.n9D9LKPJ000323@svn.freebsd.org> <200910130906.02860.jhb@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: r198024 - head/sys/modules/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 15:01:11 -0000 On Tue, 13 Oct 2009, John Baldwin wrote: > On Tuesday 13 October 2009 5:21:20 am Robert Watson wrote: >> Author: rwatson >> Date: Tue Oct 13 09:21:20 2009 >> New Revision: 198024 >> URL: http://svn.freebsd.org/changeset/base/198024 >> >> Log: >> EXPORT_SYMS is not, in fact, required, for a dependent module to access >> non-static symbols in a module they depend on, so remove dtrace symbols >> from nfsclient's EXPORT_SYMS again. >> >> Suggested by: jhb > > Arguably, though, this is due to bugs that we should try to fix in 9.0. Heh. OK. :-) Robert From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 16:00: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 4460C1065695; Tue, 13 Oct 2009 16:00:13 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout027.mac.com (asmtpout027.mac.com [17.148.16.102]) by mx1.freebsd.org (Postfix) with ESMTP id 2D7CE8FC18; Tue, 13 Oct 2009 16:00:13 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed Received: from macbook-pro.lan.xcllnt.net (mail.xcllnt.net [75.101.29.67]) by asmtp027.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KRG00E7VN3H6O80@asmtp027.mac.com>; Tue, 13 Oct 2009 08:59:43 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <20091012.232251.420437707.imp@bsdimp.com> Date: Tue, 13 Oct 2009 08:59:42 -0700 Message-id: References: <200910112042.n9BKgRCQ029985@svn.freebsd.org> <20091012.232251.420437707.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, marcel@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r197969 - 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, 13 Oct 2009 16:00:13 -0000 On Oct 12, 2009, at 10:22 PM, M. Warner Losh wrote: > In message: <200910112042.n9BKgRCQ029985@svn.freebsd.org> > Marcel Moolenaar writes: > : Author: marcel > : Date: Sun Oct 11 20:42:26 2009 > : New Revision: 197969 > : URL: http://svn.freebsd.org/changeset/base/197969 > : > : Log: > : Scan for option ROMs on i386 and amd64 only. > > Why? They should be scanned for on any system with a real isa bus... Other than i386, those are? -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 17:57: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 6EBB11065692; Tue, 13 Oct 2009 17:57:06 +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 5E08C8FC1A; Tue, 13 Oct 2009 17:57:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DHv6WT012332; Tue, 13 Oct 2009 17:57:06 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DHv6Cp012330; Tue, 13 Oct 2009 17:57:06 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200910131757.n9DHv6Cp012330@svn.freebsd.org> From: Robert Watson Date: Tue, 13 Oct 2009 17:57:06 +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: r198040 - head/lib/libc/nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 17:57:06 -0000 Author: rwatson Date: Tue Oct 13 17:57:06 2009 New Revision: 198040 URL: http://svn.freebsd.org/changeset/base/198040 Log: Add C message catalogue entries for newer errnos: EBADMSG, EMULTIHOP, ENOLINK, EPROTO, ENOTCAPABLE. Submitted by: Alan R. S. Bueno MFC after: 3 days (most) Modified: head/lib/libc/nls/C.msg Modified: head/lib/libc/nls/C.msg ============================================================================== --- head/lib/libc/nls/C.msg Tue Oct 13 17:56:48 2009 (r198039) +++ head/lib/libc/nls/C.msg Tue Oct 13 17:57:06 2009 (r198040) @@ -181,6 +181,16 @@ $ ENOATTR 87 Attribute not found $ EDOOFUS 88 Programming error +$ EBADMSG +89 Bad message +$ EMULTIHOP +90 Multihop attempted +$ ENOLINK +91 Link has been severed +$ EPROTO +92 Protocol error +$ ENOTCAPABLE +93 Capabilities insufficient $ $ strsignal() support catalog $ From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 18:07: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 4460E1065679; Tue, 13 Oct 2009 18:07:32 +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 1C4FD8FC13; Tue, 13 Oct 2009 18:07:32 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 95EAA46B2C; Tue, 13 Oct 2009 14:07:31 -0400 (EDT) Date: Tue, 13 Oct 2009 19:07:31 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "Alan R. S. Bueno" In-Reply-To: Message-ID: References: <200910110008.n9B08tQc095922@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, David Schultz , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r197949 - 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, 13 Oct 2009 18:07:32 -0000 On Mon, 12 Oct 2009, Alan R. S. Bueno wrote: > That modification also imply modifying the template NLS catalog and the > translations (or maybe translators should be advised to update their files > (I don't know if they are aware of the change)). I wasn't aware I needed to do this, and have now merged your patch, thanks! (David: I also commited the descriptions of the errnos you added). Robert > > The patch to C.msg: > > Index: C.msg > =================================================================== > RCS file: /home/ncvs/src/lib/libc/nls/C.msg,v > retrieving revision 1.1 > diff -u -r1.1 C.msg > --- C.msg 27 Feb 2005 17:59:39 -0000 1.1 > +++ C.msg 12 Oct 2009 10:14:33 -0000 > @@ -181,6 +181,16 @@ > 87 Attribute not found > $ EDOOFUS > 88 Programming error > +$ EBADMSG > +89 Bad message > +$ EMULTIHOP > +90 Multihop attempted > +$ ENOLINK > +91 Link has been severed > +$ EPROTO > +92 Protocol error > +$ ENOTCAPABLE > +93 Capabilities insufficient > $ > $ strsignal() support catalog > $ > > > Thanks! > From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 18:07: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 B509F106566B; Tue, 13 Oct 2009 18:07:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4C0A8FC13; Tue, 13 Oct 2009 18:07:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DI7uQK012588; Tue, 13 Oct 2009 18:07:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DI7upT012586; Tue, 13 Oct 2009 18:07:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910131807.n9DI7upT012586@svn.freebsd.org> From: John Baldwin Date: Tue, 13 Oct 2009 18:07: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: r198041 - head/sys/modules/ubser X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 18:07:56 -0000 Author: jhb Date: Tue Oct 13 18:07:56 2009 New Revision: 198041 URL: http://svn.freebsd.org/changeset/base/198041 Log: Fix this module so it at least builds. Note that it isn't hooked up to the build however, and ubser(4) is also not present in any kernel configs (including NOTES). Modified: head/sys/modules/ubser/Makefile Modified: head/sys/modules/ubser/Makefile ============================================================================== --- head/sys/modules/ubser/Makefile Tue Oct 13 17:57:06 2009 (r198040) +++ head/sys/modules/ubser/Makefile Tue Oct 13 18:07:56 2009 (r198041) @@ -1,9 +1,9 @@ # $FreeBSD$ S= ${.CURDIR}/../.. -.PATH: $S/dev/usb +.PATH: $S/dev/usb/serial KMOD= ubser -SRCS= ubser.c ubser.h opt_usb.h device_if.h bus_if.h usbdevs.h +SRCS= ubser.c opt_usb.h device_if.h bus_if.h usbdevs.h .include From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 19:02: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 02125106568B; Tue, 13 Oct 2009 19:02:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4D168FC17; Tue, 13 Oct 2009 19:02:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DJ23M8013755; Tue, 13 Oct 2009 19:02:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DJ23tg013751; Tue, 13 Oct 2009 19:02:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910131902.n9DJ23tg013751@svn.freebsd.org> From: John Baldwin Date: Tue, 13 Oct 2009 19:02: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: r198043 - in head/sys: amd64/conf i386/conf pc98/conf sparc64/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, 13 Oct 2009 19:02:04 -0000 Author: jhb Date: Tue Oct 13 19:02:03 2009 New Revision: 198043 URL: http://svn.freebsd.org/changeset/base/198043 Log: Move the USB wireless drivers down into their own section next to the USB ethernet drivers. Submitted by: Glen Barber glen.j.barber @ gmail MFC after: 1 month Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/pc98/conf/GENERIC head/sys/sparc64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Tue Oct 13 18:09:15 2009 (r198042) +++ head/sys/amd64/conf/GENERIC Tue Oct 13 19:02:03 2009 (r198043) @@ -297,10 +297,6 @@ device ukbd # Keyboard device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse -device rum # Ralink Technology RT2501USB wireless NICs -device uath # Atheros AR5523 wireless NICs -device ural # Ralink Technology RT2500USB wireless NICs -device zyd # ZyDAS zb1211/zb1211b wireless NICs device urio # Diamond Rio 500 MP3 player # USB Serial devices device uark # Technologies ARK3116 based serial adapters @@ -319,6 +315,11 @@ device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet device rue # RealTek RTL8150 USB Ethernet device udav # Davicom DM9601E USB +# USB Wireless +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zb1211/zb1211b wireless NICs # FireWire support device firewire # FireWire bus code Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Tue Oct 13 18:09:15 2009 (r198042) +++ head/sys/i386/conf/GENERIC Tue Oct 13 19:02:03 2009 (r198043) @@ -310,10 +310,6 @@ device ukbd # Keyboard device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse -device rum # Ralink Technology RT2501USB wireless NICs -device ural # Ralink Technology RT2500USB wireless NICs -device uath # Atheros AR5523 wireless NICs -device zyd # ZyDAS zb1211/zb1211b wireless NICs device urio # Diamond Rio 500 MP3 player # USB Serial devices device u3g # USB-based 3G modems (Option, Huawei, Sierra) @@ -333,6 +329,11 @@ device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet device rue # RealTek RTL8150 USB Ethernet device udav # Davicom DM9601E USB +# USB Wireless +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zb1211/zb1211b wireless NICs # FireWire support device firewire # FireWire bus code Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Tue Oct 13 18:09:15 2009 (r198042) +++ head/sys/pc98/conf/GENERIC Tue Oct 13 19:02:03 2009 (r198043) @@ -264,10 +264,6 @@ device bpf # Berkeley packet filter #device ulpt # Printer #device umass # Disks/Mass storage - Requires scbus and da #device ums # Mouse -#device rum # Ralink Technology RT2501USB wireless NICs -#device uath # Atheros AR5523 wireless NICs -#device ural # Ralink Technology RT2500USB wireless NICs -#device zyd # ZyDAS zb1211/zb1211b wireless NICs #device urio # Diamond Rio 500 MP3 player # USB Serial devices #device uark # Technologies ARK3116 based serial adapters @@ -287,6 +283,11 @@ device bpf # Berkeley packet filter #device kue # Kawasaki LSI USB Ethernet #device rue # RealTek RTL8150 USB Ethernet #device udav # Davicom DM9601E USB +# USB Wireless +#device rum # Ralink Technology RT2501USB wireless NICs +#device uath # Atheros AR5523 wireless NICs +#device ural # Ralink Technology RT2500USB wireless NICs +#device zyd # ZyDAS zb1211/zb1211b wireless NICs # FireWire support #device firewire # FireWire bus code Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Tue Oct 13 18:09:15 2009 (r198042) +++ head/sys/sparc64/conf/GENERIC Tue Oct 13 19:02:03 2009 (r198043) @@ -239,10 +239,6 @@ device ukbd # Keyboard device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse -device rum # Ralink Technology RT2501USB wireless NICs -device uath # Atheros AR5523 wireless NICs -device ural # Ralink Technology RT2500USB wireless NICs -device zyd # ZyDAS zb1211/zb1211b wireless NICs device urio # Diamond Rio 500 MP3 player # USB Serial devices device uark # Technologies ARK3116 based serial adapters @@ -261,6 +257,11 @@ device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet device rue # RealTek RTL8150 USB Ethernet device udav # Davicom DM9601E USB +# USB Wireless +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zb1211/zb1211b wireless NICs # FireWire support device firewire # FireWire bus code From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 19:04: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 96AAC106566B; Tue, 13 Oct 2009 19:04:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85E198FC19; Tue, 13 Oct 2009 19:04:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DJ41KV013820; Tue, 13 Oct 2009 19:04:01 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DJ41QC013817; Tue, 13 Oct 2009 19:04:01 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910131904.n9DJ41QC013817@svn.freebsd.org> From: John Baldwin Date: Tue, 13 Oct 2009 19:04: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: r198044 - head/sys/arm/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, 13 Oct 2009 19:04:01 -0000 Author: jhb Date: Tue Oct 13 19:04:01 2009 New Revision: 198044 URL: http://svn.freebsd.org/changeset/base/198044 Log: Sync with other GENERIC kernel configs: - Move USB serial drivers earlier to match their placement in other kernel configs. - Add descriptions to various USB drivers. - Move the USB wireless drivers into a new section. - Add ulscom to the list of USB serial drivers. Modified: head/sys/arm/conf/HL200 head/sys/arm/conf/KB920X Modified: head/sys/arm/conf/HL200 ============================================================================== --- head/sys/arm/conf/HL200 Tue Oct 13 19:02:03 2009 (r198043) +++ head/sys/arm/conf/HL200 Tue Oct 13 19:04:01 2009 (r198044) @@ -100,9 +100,17 @@ device usb # USB Bus (required) device uhid # "Human Interface Devices" device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da -device ural # Ralink Technology RT2500USB wireless NICs -device rum # Ralink Technology RT2501USB wireless NICs device urio # Diamond Rio 500 MP3 player +# USB Serial devices +device uark # Technologies ARK3116 based serial adapters +device ubsa # Belkin F5U103 and compatible serial adapters +#device ubser # not yet converted. +device uftdi # For FTDI usb serial adapters +device uipaq # Some WinCE based devices +device uplcom # Prolific PL-2303 serial adapters +device uslcom # SI Labs CP2101/CP2102 serial adapters +device uvisor # Visor and Palm devices +device uvscom # USB serial support for DDI pocket's PHS # USB Ethernet, requires miibus device miibus device aue # ADMtek USB Ethernet @@ -111,16 +119,12 @@ device cdce # Generic USB over Etherne device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet device rue # RealTek RTL8150 USB Ethernet -device udav -# usb serial -device uark -device ubsa -#device ubser # not yet converted. -device uftdi -device uipaq -device uplcom -device uvisor -device uvscom +device udav # Davicom DM9601E USB +# USB Wireless +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zb1211/zb1211b wireless NICs # SCSI peripherals device scbus # SCSI bus (required for SCSI) device da # Direct Access (disks) Modified: head/sys/arm/conf/KB920X ============================================================================== --- head/sys/arm/conf/KB920X Tue Oct 13 19:02:03 2009 (r198043) +++ head/sys/arm/conf/KB920X Tue Oct 13 19:04:01 2009 (r198044) @@ -101,9 +101,16 @@ device usb # USB Bus (required) device uhid # "Human Interface Devices" device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da -device ural # Ralink Technology RT2500USB wireless NICs -device rum # Ralink Technology RT2501USB wireless NICs device urio # Diamond Rio 500 MP3 player +# USB Serial devices +device uark # Technologies ARK3116 based serial adapters +device ubsa # Belkin F5U103 and compatible serial adapters +device uftdi # For FTDI usb serial adapters +device uipaq # Some WinCE based devices +device uplcom # Prolific PL-2303 serial adapters +device uslcom # SI Labs CP2101/CP2102 serial adapters +device uvisor # Visor and Palm devices +device uvscom # USB serial support for DDI pocket's PHS # USB Ethernet, requires miibus device miibus device aue # ADMtek USB Ethernet @@ -112,15 +119,12 @@ device cdce # Generic USB over Etherne device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet device rue # RealTek RTL8150 USB Ethernet -device udav -# usb serial -device uark -device ubsa -device uftdi -device uipaq -device uplcom -device uvisor -device uvscom +device udav # Davicom DM9601E USB +# USB Wireless +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zb1211/zb1211b wireless NICs # SCSI peripherals device scbus # SCSI bus (required for SCSI) device da # Direct Access (disks) From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 19:24: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 2D36B10656AE; Tue, 13 Oct 2009 19:24:02 +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 DB68A8FC23; Tue, 13 Oct 2009 19:24:01 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id n9DJ32GR064678; Tue, 13 Oct 2009 15:03:02 -0400 (EDT) (envelope-from das@freebsd.org) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id n9DJ32PU064677; Tue, 13 Oct 2009 15:03:02 -0400 (EDT) (envelope-from das@freebsd.org) Date: Tue, 13 Oct 2009 15:03:02 -0400 From: David Schultz To: Robert Watson Message-ID: <20091013190302.GA64666@zim.MIT.EDU> Mail-Followup-To: Robert Watson , "Alan R. S. Bueno" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <200910110008.n9B08tQc095922@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "Alan R. S. Bueno" Subject: Re: svn commit: r197949 - 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, 13 Oct 2009 19:24:02 -0000 On Tue, Oct 13, 2009, Robert Watson wrote: > > On Mon, 12 Oct 2009, Alan R. S. Bueno wrote: > > >That modification also imply modifying the template NLS catalog and the > >translations (or maybe translators should be advised to update their files > >(I don't know if they are aware of the change)). > > I wasn't aware I needed to do this, and have now merged your patch, thanks! > (David: I also commited the descriptions of the errnos you added). Thanks! I believe the NLS catalogs actually being built and used is a relatively recent development. From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 20:09: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 B906B106568F for ; Tue, 13 Oct 2009 20:09:03 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id 6EF5A8FC18 for ; Tue, 13 Oct 2009 20:09:03 +0000 (UTC) Received: from c83-255-48-78.bredband.comhem.se ([83.255.48.78]:56697 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1MxnfS-0005UY-5N for svn-src-head@FreeBSD.org; Tue, 13 Oct 2009 22:08:25 +0200 Received: (qmail 48508 invoked from network); 13 Oct 2009 22:08:20 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 13 Oct 2009 22:08:20 +0200 Received: (qmail 84764 invoked by uid 1001); 13 Oct 2009 22:08:20 +0200 Date: Tue, 13 Oct 2009 22:08:20 +0200 From: Erik Trulsson To: Marcel Moolenaar Message-ID: <20091013200820.GA84594@owl.midgard.homeip.net> References: <200910112042.n9BKgRCQ029985@svn.freebsd.org> <20091012.232251.420437707.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Originating-IP: 83.255.48.78 X-Scan-Result: No virus found in message 1MxnfS-0005UY-5N. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1MxnfS-0005UY-5N 5e45da77b64cdc24354708ec2a691512 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, marcel@FreeBSD.org, "M. Warner Losh" , src-committers@FreeBSD.org Subject: Re: svn commit: r197969 - 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, 13 Oct 2009 20:09:03 -0000 On Tue, Oct 13, 2009 at 08:59:42AM -0700, Marcel Moolenaar wrote: > > On Oct 12, 2009, at 10:22 PM, M. Warner Losh wrote: > > > In message: <200910112042.n9BKgRCQ029985@svn.freebsd.org> > > Marcel Moolenaar writes: > > : Author: marcel > > : Date: Sun Oct 11 20:42:26 2009 > > : New Revision: 197969 > > : URL: http://svn.freebsd.org/changeset/base/197969 > > : > > : Log: > > : Scan for option ROMs on i386 and amd64 only. > > > > Why? They should be scanned for on any system with a real isa bus... > > Other than i386, those are? Well, I know that there were machines using Alpha and PowerPC processors (and MIPS, and PA-RISC, and ...) that provided real (E)ISA-slots. Those might not count though since recent releases of FreeBSD have dropped support for Alpha, and the relevant PowerPC (etc.) machines have probably never been supported by FreeBSD. For machines that are currently supported by FreeBSD and which provides ISA-slots it is probably only the i386 architecture that qualifies. (There might also be some motherboard out there that has ISA-slots and supports amd64-capable CPUs but one will have to look fairly hard to find one.) -- Erik Trulsson ertr1013@student.uu.se From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 20:22: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 ECEF11065672; Tue, 13 Oct 2009 20:22:12 +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 DB4EA8FC0C; Tue, 13 Oct 2009 20:22:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DKMCKP015464; Tue, 13 Oct 2009 20:22:12 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DKMCsE015462; Tue, 13 Oct 2009 20:22:12 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200910132022.n9DKMCsE015462@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 13 Oct 2009 20:22: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: r198049 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 20:22:13 -0000 Author: bz Date: Tue Oct 13 20:22:12 2009 New Revision: 198049 URL: http://svn.freebsd.org/changeset/base/198049 Log: Immediately after clearing a pending callout that didn't make it due to the lock we hold, disable interrupts, and announce to the firmware that we are shutting down. Especially do this before disabling blocks. This makes some types of machines with asf enabled no longer hang upon boot, when we start configuring the interface. PR: i386/96382, kern/100410, kern/122252, kern/116328 Reported by: erwin Hardware provided by: TDC A/S Reviewed by: stas Tested by: stas Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Oct 13 20:21:17 2009 (r198048) +++ head/sys/dev/bge/if_bge.c Tue Oct 13 20:22:12 2009 (r198049) @@ -4270,6 +4270,16 @@ bge_stop(struct bge_softc *sc) callout_stop(&sc->bge_stat_ch); + /* Disable host interrupts. */ + BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR); + bge_writembx(sc, BGE_MBX_IRQ0_LO, 1); + + /* + * Tell firmware we're shutting down. + */ + bge_stop_fw(sc); + bge_sig_pre_reset(sc, BGE_RESET_STOP); + /* * Disable all of the receiver blocks. */ @@ -4309,16 +4319,6 @@ bge_stop(struct bge_softc *sc) BGE_CLRBIT(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE); } - /* Disable host interrupts. */ - BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR); - bge_writembx(sc, BGE_MBX_IRQ0_LO, 1); - - /* - * Tell firmware we're shutting down. - */ - - bge_stop_fw(sc); - bge_sig_pre_reset(sc, BGE_RESET_STOP); bge_reset(sc); bge_sig_legacy(sc, BGE_RESET_STOP); bge_sig_post_reset(sc, BGE_RESET_STOP); From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 20:29: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 2A2671065670; Tue, 13 Oct 2009 20:29:15 +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 18E9A8FC08; Tue, 13 Oct 2009 20:29:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DKTE47015702; Tue, 13 Oct 2009 20:29:14 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DKTEJE015700; Tue, 13 Oct 2009 20:29:14 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200910132029.n9DKTEJE015700@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 13 Oct 2009 20:29:14 +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: r198050 - 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: Tue, 13 Oct 2009 20:29:15 -0000 Author: bz Date: Tue Oct 13 20:29:14 2009 New Revision: 198050 URL: http://svn.freebsd.org/changeset/base/198050 Log: Compare pointer to NULL rather than 0. MFC after: 1 month Modified: head/sys/netinet/ip_icmp.c Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Tue Oct 13 20:22:12 2009 (r198049) +++ head/sys/netinet/ip_icmp.c Tue Oct 13 20:29:14 2009 (r198050) @@ -367,7 +367,7 @@ icmp_input(struct mbuf *m, int off) goto freeit; } i = hlen + min(icmplen, ICMP_ADVLENMIN); - if (m->m_len < i && (m = m_pullup(m, i)) == 0) { + if (m->m_len < i && (m = m_pullup(m, i)) == NULL) { ICMPSTAT_INC(icps_tooshort); return; } From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 20:42: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 AE2E7106568D; Tue, 13 Oct 2009 20:42:22 +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 2B9CF8FC08; Tue, 13 Oct 2009 20:42:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n9DKgJBQ078118; Wed, 14 Oct 2009 00:42:19 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Wed, 14 Oct 2009 00:42:19 +0400 (MSD) From: Dmitry Morozovsky To: Erik Trulsson In-Reply-To: <20091013200820.GA84594@owl.midgard.homeip.net> Message-ID: References: <200910112042.n9BKgRCQ029985@svn.freebsd.org> <20091012.232251.420437707.imp@bsdimp.com> <20091013200820.GA84594@owl.midgard.homeip.net> 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.2.3 (woozle.rinet.ru [0.0.0.0]); Wed, 14 Oct 2009 00:42:19 +0400 (MSD) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , marcel@freebsd.org, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r197969 - 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, 13 Oct 2009 20:42:22 -0000 On Tue, 13 Oct 2009, Erik Trulsson wrote: ET> (There might also be some motherboard out there that has ISA-slots and ET> supports amd64-capable CPUs but one will have to look fairly hard to find ET> one.) Oh, I would love to see at least a photo of such a beast ;-) (As for my experience, the highest CPU on a mobo with [E]ISA slots were Intel Pentium, or similar AMD K6) ;-P -- 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 Tue Oct 13 20:58: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 4FD421065679; Tue, 13 Oct 2009 20:58:23 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DBF58FC1B; Tue, 13 Oct 2009 20:58:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DKwMdt016463; Tue, 13 Oct 2009 20:58:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DKwMoW016461; Tue, 13 Oct 2009 20:58:22 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200910132058.n9DKwMoW016461@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 13 Oct 2009 20:58: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: r198053 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 20:58:23 -0000 Author: jilles Date: Tue Oct 13 20:58:22 2009 New Revision: 198053 URL: http://svn.freebsd.org/changeset/base/198053 Log: Make getcwd(3) faster, simpler and more compliant using *at syscalls. It is no longer necessary to construct long paths consisting of repeated "../" which may be slow to process and may exceed PATH_MAX. Modified: head/lib/libc/gen/getcwd.c Modified: head/lib/libc/gen/getcwd.c ============================================================================== --- head/lib/libc/gen/getcwd.c Tue Oct 13 20:48:05 2009 (r198052) +++ head/lib/libc/gen/getcwd.c Tue Oct 13 20:58:22 2009 (r198053) @@ -62,13 +62,14 @@ getcwd(pt, size) dev_t dev; ino_t ino; int first; - char *bpt, *bup; + char *bpt; struct stat s; dev_t root_dev; ino_t root_ino; - size_t ptsize, upsize; + size_t ptsize; int save_errno; - char *ept, *eup, *up, c; + char *ept, c; + int fd; /* * If no buffer specified by the user, allocate one as necessary. @@ -106,18 +107,6 @@ getcwd(pt, size) bpt = ept - 1; *bpt = '\0'; - /* - * Allocate 1024 bytes for the string of "../"'s. - * Should always be enough. If it's not, allocate - * as necessary. Special case the first stat, it's ".", not "..". - */ - if ((up = malloc(upsize = 1024)) == NULL) - goto err; - eup = up + upsize; - bup = up; - up[0] = '.'; - up[1] = '\0'; - /* Save root values, so know when to stop. */ if (stat("/", &s)) goto err; @@ -128,7 +117,7 @@ getcwd(pt, size) for (first = 1;; first = 0) { /* Stat the current level. */ - if (lstat(up, &s)) + if (dir != NULL ? _fstat(dirfd(dir), &s) : lstat(".", &s)) goto err; /* Save current node values. */ @@ -144,32 +133,22 @@ getcwd(pt, size) * been that way and stuff would probably break. */ bcopy(bpt, pt, ept - bpt); - free(up); + if (dir) + (void) closedir(dir); return (pt); } - /* - * Build pointer to the parent directory, allocating memory - * as necessary. Max length is 3 for "../", the largest - * possible component name, plus a trailing NUL. - */ - while (bup + 3 + MAXNAMLEN + 1 >= eup) { - if ((up = reallocf(up, upsize *= 2)) == NULL) - goto err; - bup = up; - eup = up + upsize; - } - *bup++ = '.'; - *bup++ = '.'; - *bup = '\0'; - /* Open and stat parent directory. */ - if (!(dir = opendir(up)) || _fstat(dirfd(dir), &s)) + fd = _openat(dir != NULL ? dirfd(dir) : AT_FDCWD, + "..", O_RDONLY); + if (fd == -1) goto err; - - /* Add trailing slash for next directory. */ - *bup++ = '/'; - *bup = '\0'; + if (dir) + (void) closedir(dir); + if (!(dir = fdopendir(fd)) || _fstat(dirfd(dir), &s)) { + _close(fd); + goto err; + } /* * If it's a mount point, have to stat each element because @@ -190,10 +169,10 @@ getcwd(pt, size) goto notfound; if (ISDOT(dp)) continue; - bcopy(dp->d_name, bup, dp->d_namlen + 1); /* Save the first error for later. */ - if (lstat(up, &s)) { + if (fstatat(dirfd(dir), dp->d_name, &s, + AT_SYMLINK_NOFOLLOW)) { if (!save_errno) save_errno = errno; errno = 0; @@ -227,11 +206,6 @@ getcwd(pt, size) *--bpt = '/'; bpt -= dp->d_namlen; bcopy(dp->d_name, bpt, dp->d_namlen); - (void) closedir(dir); - dir = NULL; - - /* Truncate any file name. */ - *bup = '\0'; } notfound: @@ -250,7 +224,6 @@ err: free(pt); if (dir) (void) closedir(dir); - free(up); errno = save_errno; return (NULL); From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 21:04:07 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 10E5B1065676; Tue, 13 Oct 2009 21:04:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Dmitry Morozovsky Date: Tue, 13 Oct 2009 17:03:45 -0400 User-Agent: KMail/1.6.2 References: <200910112042.n9BKgRCQ029985@svn.freebsd.org> <20091013200820.GA84594@owl.midgard.homeip.net> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200910131703.50700.jkim@FreeBSD.org> Cc: Erik Trulsson , marcel@FreeBSD.org, svn-src-all@FreeBSD.org, Marcel Moolenaar , src-committers@FreeBSD.org, svn-src-head@FreeBSD.org, "M. Warner Losh" Subject: Re: svn commit: r197969 - 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, 13 Oct 2009 21:04:07 -0000 On Tuesday 13 October 2009 04:42 pm, Dmitry Morozovsky wrote: > On Tue, 13 Oct 2009, Erik Trulsson wrote: > > ET> (There might also be some motherboard out there that has > ISA-slots and ET> supports amd64-capable CPUs but one will have to > look fairly hard to find ET> one.) > > Oh, I would love to see at least a photo of such a beast ;-) > > (As for my experience, the highest CPU on a mobo with [E]ISA slots > were Intel Pentium, or similar AMD K6) Physical ISA slots on motherboard may be hard to find item these days but PCI-to-ISA bridge boards exist and should work on any architecture, at least theoretically. :-) Jung-uk Kim From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 21:18: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 A5EBF106566B; Tue, 13 Oct 2009 21:18:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 77B778FC12; Tue, 13 Oct 2009 21:18:34 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2988446B03; Tue, 13 Oct 2009 17:18:34 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 617B68A01D; Tue, 13 Oct 2009 17:18:33 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Tue, 13 Oct 2009 15:10:47 -0400 User-Agent: KMail/1.9.7 References: <200910131904.n9DJ41QC013817@svn.freebsd.org> In-Reply-To: <200910131904.n9DJ41QC013817@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910131510.48144.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 13 Oct 2009 17:18:33 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r198044 - head/sys/arm/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, 13 Oct 2009 21:18:34 -0000 On Tuesday 13 October 2009 3:04:01 pm John Baldwin wrote: > Author: jhb > Date: Tue Oct 13 19:04:01 2009 > New Revision: 198044 > URL: http://svn.freebsd.org/changeset/base/198044 > > Log: > Sync with other GENERIC kernel configs: > - Move USB serial drivers earlier to match their placement in other kernel > configs. > - Add descriptions to various USB drivers. > - Move the USB wireless drivers into a new section. > - Add ulscom to the list of USB serial drivers. I do wonder if it is time to have some files like 'sys/conf/std.usb.serial' that list all the USB serial drivers so that we only have one list of instead of N to ease future maintenance. Similiar arguments could be made for 'std.usb.wireless' and 'std.usb.ethernet' perhaps. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 21:28: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 6185F10656AA; Tue, 13 Oct 2009 21:28:02 +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 1A42D8FC17; Tue, 13 Oct 2009 21:28:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9DHW3xC009025; Tue, 13 Oct 2009 11:32:03 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 13 Oct 2009 11:32:13 -0600 (MDT) Message-Id: <20091013.113213.1449397633.imp@bsdimp.com> To: xcllnt@mac.com From: "M. Warner Losh" In-Reply-To: References: <200910112042.n9BKgRCQ029985@svn.freebsd.org> <20091012.232251.420437707.imp@bsdimp.com> 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, marcel@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r197969 - 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, 13 Oct 2009 21:28:02 -0000 In message: Marcel Moolenaar writes: : : On Oct 12, 2009, at 10:22 PM, M. Warner Losh wrote: : : > In message: <200910112042.n9BKgRCQ029985@svn.freebsd.org> : > Marcel Moolenaar writes: : > : Author: marcel : > : Date: Sun Oct 11 20:42:26 2009 : > : New Revision: 197969 : > : URL: http://svn.freebsd.org/changeset/base/197969 : > : : > : Log: : > : Scan for option ROMs on i386 and amd64 only. : > : > Why? They should be scanned for on any system with a real isa bus... : : Other than i386, those are? So other than i386 and amd64, what systems use the isa device? Warner From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 21:51: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 082EA106568F; Tue, 13 Oct 2009 21:51:51 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAF008FC1C; Tue, 13 Oct 2009 21:51:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DLpoHi017649; Tue, 13 Oct 2009 21:51:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DLpo1A017647; Tue, 13 Oct 2009 21:51:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200910132151.n9DLpo1A017647@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 13 Oct 2009 21:51:50 +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: r198056 - head/bin/ls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 13 Oct 2009 21:51:51 -0000 Author: jilles Date: Tue Oct 13 21:51:50 2009 New Revision: 198056 URL: http://svn.freebsd.org/changeset/base/198056 Log: ls: Make -p not inhibit following symlinks. According to the man page, when neither -H/-L nor -F/-d/-l are given, -H is implied. This agrees with POSIX, GNU ls and Solaris ls. This means that -p, although it is very similar to -F, does not prevent the implicit following of symlinks. PR: standards/128546 Modified: head/bin/ls/ls.c Modified: head/bin/ls/ls.c ============================================================================== --- head/bin/ls/ls.c Tue Oct 13 21:28:51 2009 (r198055) +++ head/bin/ls/ls.c Tue Oct 13 21:51:50 2009 (r198056) @@ -399,7 +399,7 @@ main(int argc, char *argv[]) * If not -F, -d or -l options, follow any symbolic links listed on * the command line. */ - if (!f_longform && !f_listdir && !f_type) + if (!f_longform && !f_listdir && (!f_type || f_slash)) fts_options |= FTS_COMFOLLOW; /* From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 22:02: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 A2F481065672; Tue, 13 Oct 2009 22:02:23 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout024.mac.com (asmtpout024.mac.com [17.148.16.99]) by mx1.freebsd.org (Postfix) with ESMTP id 8B76F8FC18; Tue, 13 Oct 2009 22:02:23 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from [172.24.241.207] (natint3.juniper.net [66.129.224.36]) by asmtp024.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KRH00JWK3UJ2130@asmtp024.mac.com>; Tue, 13 Oct 2009 15:01:32 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <20091013.113213.1449397633.imp@bsdimp.com> Date: Tue, 13 Oct 2009 15:01:31 -0700 Message-id: <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> References: <200910112042.n9BKgRCQ029985@svn.freebsd.org> <20091012.232251.420437707.imp@bsdimp.com> <20091013.113213.1449397633.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r197969 - 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, 13 Oct 2009 22:02:23 -0000 On Oct 13, 2009, at 10:32 AM, M. Warner Losh wrote: > : > Why? They should be scanned for on any system with a real isa > bus... > : > : Other than i386, those are? > > So other than i386 and amd64, what systems use the isa device? I interpret the lack of answer as: none. isa(4) is usable on various architectures where the southbridge contains a LPC or similar. The MPC8555 CDS, for example, has a VIA southbridge that we need to talk to in order to get to the ATPIC for dealing with the nested interrupt. isa(4) is the device for this, but isaorm is causing kernel panics simply because the memory between 0xC0000 and 0x100000 is not reserved for ISA option ROMs. Likewise for Itanium, sparc64, etc... In short: scanning for option ROMs is not possible in all cases where ISA compatibility is provided. -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 22:12: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 2C6CF1065679 for ; Tue, 13 Oct 2009 22:12:21 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id D1FD08FC17 for ; Tue, 13 Oct 2009 22:12:20 +0000 (UTC) Received: from c83-255-48-78.bredband.comhem.se ([83.255.48.78]:63865 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1MxpZy-0003fh-6I for svn-src-head@freebsd.org; Wed, 14 Oct 2009 00:10:53 +0200 Received: (qmail 49144 invoked from network); 14 Oct 2009 00:04:07 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 14 Oct 2009 00:04:07 +0200 Received: (qmail 85347 invoked by uid 1001); 14 Oct 2009 00:04:07 +0200 Date: Wed, 14 Oct 2009 00:04:07 +0200 From: Erik Trulsson To: Dmitry Morozovsky Message-ID: <20091013220407.GA85173@owl.midgard.homeip.net> References: <200910112042.n9BKgRCQ029985@svn.freebsd.org> <20091012.232251.420437707.imp@bsdimp.com> <20091013200820.GA84594@owl.midgard.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Originating-IP: 83.255.48.78 X-Scan-Result: No virus found in message 1MxpZy-0003fh-6I. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1MxpZy-0003fh-6I 2280fa0cfc7f27b03fc858933dabfffd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , marcel@freebsd.org, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r197969 - 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, 13 Oct 2009 22:12:21 -0000 On Wed, Oct 14, 2009 at 12:42:19AM +0400, Dmitry Morozovsky wrote: > On Tue, 13 Oct 2009, Erik Trulsson wrote: > > ET> (There might also be some motherboard out there that has ISA-slots and > ET> supports amd64-capable CPUs but one will have to look fairly hard to find > ET> one.) > > Oh, I would love to see at least a photo of such a beast ;-) Turned out to Actually be surprisingly easy to find with Google. Take a good look: http://www.ibase.com.tw/2009/mb945.htmL That motherboard supports modern Core2{Quad,Duo} CPUs and has an ISA-slot. > > (As for my experience, the highest CPU on a mobo with [E]ISA slots were Intel > Pentium, or similar AMD K6) The most modern mainboard with an ISA-slot that I have actually held in my own hands supports dual Pentium-III (Socket 370) CPUs. I know that there also exist mainboards for Pentium-4 (Socket 478) and Athlon (Socket A) CPUs that have ISA-slots. -- Erik Trulsson ertr1013@student.uu.se From owner-svn-src-head@FreeBSD.ORG Tue Oct 13 22:37: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 B3B4A1065670 for ; Tue, 13 Oct 2009 22:37:53 +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 331108FC1A for ; Tue, 13 Oct 2009 22:37:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n9DMbmOe080508; Wed, 14 Oct 2009 02:37:48 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Wed, 14 Oct 2009 02:37:48 +0400 (MSD) From: Dmitry Morozovsky To: Erik Trulsson In-Reply-To: <20091013220407.GA85173@owl.midgard.homeip.net> Message-ID: References: <200910112042.n9BKgRCQ029985@svn.freebsd.org> <20091012.232251.420437707.imp@bsdimp.com> <20091013200820.GA84594@owl.midgard.homeip.net> <20091013220407.GA85173@owl.midgard.homeip.net> 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.2.3 (woozle.rinet.ru [0.0.0.0]); Wed, 14 Oct 2009 02:37:48 +0400 (MSD) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , marcel@freebsd.org, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r197969 - 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, 13 Oct 2009 22:37:53 -0000 On Wed, 14 Oct 2009, Erik Trulsson wrote: ET> > ET> (There might also be some motherboard out there that has ISA-slots and ET> > ET> supports amd64-capable CPUs but one will have to look fairly hard to find ET> > ET> one.) ET> > ET> > Oh, I would love to see at least a photo of such a beast ;-) ET> ET> Turned out to Actually be surprisingly easy to find with Google. Take a good look: ET> ET> http://www.ibase.com.tw/2009/mb945.htmL ET> ET> That motherboard supports modern Core2{Quad,Duo} CPUs and has an ISA-slot. Yes, embedded/industrial needs are quite different from usual/casual; I totally forgot about these areas. ET> > (As for my experience, the highest CPU on a mobo with [E]ISA slots were Intel ET> > Pentium, or similar AMD K6) ET> ET> The most modern mainboard with an ISA-slot that I have actually held in my own ET> hands supports dual Pentium-III (Socket 370) CPUs. ET> ET> I know that there also exist mainboards for Pentium-4 (Socket 478) and ET> Athlon (Socket A) CPUs that have ISA-slots. Well, there avoid me; however, I vaguely remember i686 (aka PentiumPro[tm]) servers with EISA in our colleagues' office back in late 90's... -- 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 Wed Oct 14 02:49: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 27F60106566B; Wed, 14 Oct 2009 02:49:41 +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 DC4FA8FC12; Wed, 14 Oct 2009 02:49:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9E27V7x016011; Tue, 13 Oct 2009 20:07:31 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 13 Oct 2009 20:07:41 -0600 (MDT) Message-Id: <20091013.200741.1973690373.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <200910131510.48144.jhb@freebsd.org> References: <200910131904.n9DJ41QC013817@svn.freebsd.org> <200910131510.48144.jhb@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: r198044 - head/sys/arm/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, 14 Oct 2009 02:49:41 -0000 In message: <200910131510.48144.jhb@freebsd.org> John Baldwin writes: : On Tuesday 13 October 2009 3:04:01 pm John Baldwin wrote: : > Author: jhb : > Date: Tue Oct 13 19:04:01 2009 : > New Revision: 198044 : > URL: http://svn.freebsd.org/changeset/base/198044 : > : > Log: : > Sync with other GENERIC kernel configs: : > - Move USB serial drivers earlier to match their placement in other kernel : > configs. : > - Add descriptions to various USB drivers. : > - Move the USB wireless drivers into a new section. : > - Add ulscom to the list of USB serial drivers. : : I do wonder if it is time to have some files like 'sys/conf/std.usb.serial' : that list all the USB serial drivers so that we only have one list of instead : of N to ease future maintenance. Similiar arguments could be made : for 'std.usb.wireless' and 'std.usb.ethernet' perhaps. I've tried this in the past... Having multiple attributes in the filename helps. but std.ethernet likely is a bad idea since that means it needs to include usb.ethernet and you can't easily exclude usb. I've often thought that it would be cool to tag each device with one or more attributes so we could easily include all devices with the attribute, and also be able to report attribute based things... Warner From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 02:49: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 101681065676; Wed, 14 Oct 2009 02:49:42 +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 C2E6A8FC14; Wed, 14 Oct 2009 02:49:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9E069sE014592; Tue, 13 Oct 2009 18:06:09 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 13 Oct 2009 18:06:20 -0600 (MDT) Message-Id: <20091013.180620.-1542634329.imp@bsdimp.com> To: xcllnt@mac.com From: "M. Warner Losh" In-Reply-To: <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> References: <20091013.113213.1449397633.imp@bsdimp.com> <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> 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: r197969 - 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, 14 Oct 2009 02:49:42 -0000 In message: <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> Marcel Moolenaar writes: : : On Oct 13, 2009, at 10:32 AM, M. Warner Losh wrote: : > : > Why? They should be scanned for on any system with a real isa : > bus... : > : : > : Other than i386, those are? : > : > So other than i386 and amd64, what systems use the isa device? : : I interpret the lack of answer as: none. : : isa(4) is usable on various architectures where the southbridge : contains a LPC or similar. The MPC8555 CDS, for example, has a : VIA southbridge that we need to talk to in order to get to the : ATPIC for dealing with the nested interrupt. isa(4) is the device : for this, but isaorm is causing kernel panics simply because : the memory between 0xC0000 and 0x100000 is not reserved for ISA : option ROMs. Likewise for Itanium, sparc64, etc... Does this mean that the memory cycles on the I/O bus isn't supported for these architectures? Or that it is and we just don't implement it in the platform specific interfaces for it? The memory space is reserved for any system that has a ISA bus, but it might not be at physical address 0xc0000, etc. : In short: scanning for option ROMs is not possible in all cases : where ISA compatibility is provided. Why is that? The platform specific code needs to implement the necessary hooks to support this. Warner From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 02:49: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 440A11065672; Wed, 14 Oct 2009 02:49:44 +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 0315F8FC17; Wed, 14 Oct 2009 02:49:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9E07DgY014612; Tue, 13 Oct 2009 18:07:13 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 13 Oct 2009 18:07:23 -0600 (MDT) Message-Id: <20091013.180723.126931106.imp@bsdimp.com> To: marck@rinet.ru From: "M. Warner Losh" In-Reply-To: References: <20091013200820.GA84594@owl.midgard.homeip.net> 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: ertr1013@student.uu.se, src-committers@freebsd.org, svn-src-all@freebsd.org, xcllnt@mac.com, marcel@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 02:49:44 -0000 In message: Dmitry Morozovsky writes: : On Tue, 13 Oct 2009, Erik Trulsson wrote: : : ET> (There might also be some motherboard out there that has ISA-slots and : ET> supports amd64-capable CPUs but one will have to look fairly hard to find : ET> one.) : : Oh, I would love to see at least a photo of such a beast ;-) : : (As for my experience, the highest CPU on a mobo with [E]ISA slots were Intel : Pentium, or similar AMD K6) I have a MIPS-base PC that has EISA slots on it... Deskstation rPC44 with a R4400PC CPU... There's a number of ARM boards that have PC-104 expansion bus as well. The Cirrus logic boards from embeddedarm.com are but one example. Warner From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 02:49: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 CB3D6106568F for ; Wed, 14 Oct 2009 02:49:56 +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 875298FC08 for ; Wed, 14 Oct 2009 02:49:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9E03WYd014525; Tue, 13 Oct 2009 18:03:32 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 13 Oct 2009 18:03:42 -0600 (MDT) Message-Id: <20091013.180342.-905862086.imp@bsdimp.com> To: jkim@freebsd.org From: "M. Warner Losh" In-Reply-To: <200910131703.50700.jkim@FreeBSD.org> References: <20091013200820.GA84594@owl.midgard.homeip.net> <200910131703.50700.jkim@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: ertr1013@student.uu.se, marcel@freebsd.org, svn-src-all@freebsd.org, xcllnt@mac.com, marck@rinet.ru, src-committers@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 02:49:56 -0000 In message: <200910131703.50700.jkim@FreeBSD.org> Jung-uk Kim writes: : On Tuesday 13 October 2009 04:42 pm, Dmitry Morozovsky wrote: : > On Tue, 13 Oct 2009, Erik Trulsson wrote: : > : > ET> (There might also be some motherboard out there that has : > ISA-slots and ET> supports amd64-capable CPUs but one will have to : > look fairly hard to find ET> one.) : > : > Oh, I would love to see at least a photo of such a beast ;-) : > : > (As for my experience, the highest CPU on a mobo with [E]ISA slots : > were Intel Pentium, or similar AMD K6) : : Physical ISA slots on motherboard may be hard to find item these days : but PCI-to-ISA bridge boards exist and should work on any : architecture, at least theoretically. :-) The code in question is scannign for expansion ROMs on a ISA connected card. These ROMs are x86 code, but that's not relevant to the scanning of the bus for them since the card will decode those memory ranges even if the host CPU can't execute the code. Warner From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 03: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 0C622106566B; Wed, 14 Oct 2009 03:35:25 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout023.mac.com (asmtpout023.mac.com [17.148.16.98]) by mx1.freebsd.org (Postfix) with ESMTP id E8FC68FC1A; Wed, 14 Oct 2009 03:35:24 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed Received: from macbook-pro.lan.xcllnt.net (mail.xcllnt.net [75.101.29.67]) by asmtp023.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KRH005HMJAY5D90@asmtp023.mac.com>; Tue, 13 Oct 2009 20:35:23 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <20091013.180620.-1542634329.imp@bsdimp.com> Date: Tue, 13 Oct 2009 20:35:21 -0700 Message-id: References: <20091013.113213.1449397633.imp@bsdimp.com> <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> <20091013.180620.-1542634329.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 03:35:25 -0000 On Oct 13, 2009, at 5:06 PM, M. Warner Losh wrote: > In message: <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> > Marcel Moolenaar writes: > : > : On Oct 13, 2009, at 10:32 AM, M. Warner Losh wrote: > : > : > Why? They should be scanned for on any system with a real isa > : > bus... > : > : > : > : Other than i386, those are? > : > > : > So other than i386 and amd64, what systems use the isa device? > : > : I interpret the lack of answer as: none. > : > : isa(4) is usable on various architectures where the southbridge > : contains a LPC or similar. The MPC8555 CDS, for example, has a > : VIA southbridge that we need to talk to in order to get to the > : ATPIC for dealing with the nested interrupt. isa(4) is the device > : for this, but isaorm is causing kernel panics simply because > : the memory between 0xC0000 and 0x100000 is not reserved for ISA > : option ROMs. Likewise for Itanium, sparc64, etc... > > Does this mean that the memory cycles on the I/O bus isn't supported > for these architectures? Correct. > Or that it is and we just don't implement it > in the platform specific interfaces for it? No. > The memory space is > reserved for any system that has a ISA bus, but it might not be at > physical address 0xc0000, etc. It's uncommon to have an actual ISA bus and even more uncommon that the option ROM is actually being used. > : In short: scanning for option ROMs is not possible in all cases > : where ISA compatibility is provided. > > Why is that? The platform specific code needs to implement the > necessary hooks to support this. There are no hooks to implement. If there is any FreeBSD supported board that actually needs to have the option ROMs scanned by orm(4), then we can always make it conditional upon ``device isa_orm''. Making it dependent on isa(4) is causing real problems and my change limits the use of orm(4) to platforms where it can possibly have any chance of being useful -- provided orm(4) is changed to do something useful. -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 04:05: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 5BF56106566B; Wed, 14 Oct 2009 04:05:10 +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 0C6948FC2E; Wed, 14 Oct 2009 04:05:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9E440AV017813; Tue, 13 Oct 2009 22:04:00 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 13 Oct 2009 22:04:11 -0600 (MDT) Message-Id: <20091013.220411.-432748090.imp@bsdimp.com> To: xcllnt@mac.com From: "M. Warner Losh" In-Reply-To: References: <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> <20091013.180620.-1542634329.imp@bsdimp.com> 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: r197969 - 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, 14 Oct 2009 04:05:10 -0000 In message: Marcel Moolenaar writes: : : On Oct 13, 2009, at 5:06 PM, M. Warner Losh wrote: : : > In message: <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> : > Marcel Moolenaar writes: : > : : > : On Oct 13, 2009, at 10:32 AM, M. Warner Losh wrote: : > : > : > Why? They should be scanned for on any system with a real isa : > : > bus... : > : > : : > : > : Other than i386, those are? : > : > : > : > So other than i386 and amd64, what systems use the isa device? : > : : > : I interpret the lack of answer as: none. : > : : > : isa(4) is usable on various architectures where the southbridge : > : contains a LPC or similar. The MPC8555 CDS, for example, has a : > : VIA southbridge that we need to talk to in order to get to the : > : ATPIC for dealing with the nested interrupt. isa(4) is the device : > : for this, but isaorm is causing kernel panics simply because : > : the memory between 0xC0000 and 0x100000 is not reserved for ISA : > : option ROMs. Likewise for Itanium, sparc64, etc... : > : > Does this mean that the memory cycles on the I/O bus isn't supported : > for these architectures? : : Correct. Then it isn't an ISA bus. : > Or that it is and we just don't implement it : > in the platform specific interfaces for it? : : No. Then they aren't real ISA buses. : > The memory space is : > reserved for any system that has a ISA bus, but it might not be at : > physical address 0xc0000, etc. : : It's uncommon to have an actual ISA bus and even more uncommon : that the option ROM is actually being used. ISA memory ranges are quite common on actual cards. : > : In short: scanning for option ROMs is not possible in all cases : > : where ISA compatibility is provided. : > : > Why is that? The platform specific code needs to implement the : > necessary hooks to support this. : : There are no hooks to implement. If there is any FreeBSD supported : board that actually needs to have the option ROMs scanned by orm(4), FreeBSD does support boards that need to have option ROMs scanned. Every PC made today even has them. Today they are primarily video BIOS that's being scanned. They are also on SCSI controllers and can be on network cards. FreeBSD still has support for all these devices. All PC Cards, even those in CardBus slots, need to have this functionality to avoid mapping their CIS on top of a ROM that may be there. : then we can always make it conditional upon ``device isa_orm''. Making : it dependent on isa(4) is causing real problems and my change limits : the use of orm(4) to platforms where it can possibly have any chance : of being useful -- provided orm(4) is changed to do something useful. Every system that has an ISA bus needs to have it scanned for the ROMs. It is part of the ISA specification. If there are variants that don't have any way to create memory bus cycles on the ISA bus, then we need some systemic way to cope. Remove orm is a half-assed kludge since it breaks ISA PNP boards that have memory ranges, for example. So let's fix this right, and avoid yet another kludge like the one you've committed. And this time, let's talk about the fix rather than doing a drive-by? Warner From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 04:39: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 19B101065676; Wed, 14 Oct 2009 04:39: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 BB2178FC13; Wed, 14 Oct 2009 04:39:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9E4YmMZ018130; Tue, 13 Oct 2009 22:34:48 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 13 Oct 2009 22:34:59 -0600 (MDT) Message-Id: <20091013.223459.-957891176.imp@bsdimp.com> To: xcllnt@mac.com From: "M. Warner Losh" In-Reply-To: References: <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> <20091013.180620.-1542634329.imp@bsdimp.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Oct_13_22_34_59_2009_081)--" Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 04:39:11 -0000 ----Next_Part(Tue_Oct_13_22_34_59_2009_081)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In message: Marcel Moolenaar writes: : : On Oct 13, 2009, at 5:06 PM, M. Warner Losh wrote: : : > In message: <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> : > Marcel Moolenaar writes: : > : : > : On Oct 13, 2009, at 10:32 AM, M. Warner Losh wrote: : > : > : > Why? They should be scanned for on any system with a real isa : > : > bus... : > : > : : > : > : Other than i386, those are? : > : > : > : > So other than i386 and amd64, what systems use the isa device? : > : : > : I interpret the lack of answer as: none. : > : : > : isa(4) is usable on various architectures where the southbridge : > : contains a LPC or similar. The MPC8555 CDS, for example, has a : > : VIA southbridge that we need to talk to in order to get to the : > : ATPIC for dealing with the nested interrupt. isa(4) is the device : > : for this, but isaorm is causing kernel panics simply because : > : the memory between 0xC0000 and 0x100000 is not reserved for ISA : > : option ROMs. Likewise for Itanium, sparc64, etc... : > : > Does this mean that the memory cycles on the I/O bus isn't supported : > for these architectures? : : Correct. Sparc64 doesn't have an ISA bus at all. Hmmm, NetBSD doesn't implement it, but it looks like we have ofw_isa that does implement it. It looks like NetBSD implements all the ISA bus devices we have as ebus devices. Not sure which is more correct, but it is clear from reading the sparc64 isa.c that it does unnatural acts to convince the rest of the system there's really an ISA bus there. It looks to have memory ranges decoded form the ofw description. It isn't clear to me if these are additional devices that NetBSD doesn't support that hang off a PCI-ISA bridge (in which case I'd imagine the memory cycles are passed down), or if they are on what NetBSD calls the ebus. However, given the limited activity in the sparc64 port, I'm not sure a lot of work here is warranted. We've been scanning orm on this architecture for a long time, and haven't had reports of crashes. sys/powerpc/mpc85xx/isa.c could easily reflect that there's no memory available by failing all SYS_RES_MEMORY requests. This would properly fix the bus to reflect reality, and would break things with a proper message (can't allocate the memory resource on the bus). This would move the orm problem from a crash to minor code bloat. That's a much easier problem to solve, and won't break ARM systems that have a PC-104 expansion bus that do support memory address cycles on the pc-104 bus. This code isn't yet in the tree. The itanium stuff I can't comment on, but if it is the same, then a similar trick could be used as for powerpc. I've included something that should be sufficient for powerpc to behave properly. Warner ----Next_Part(Tue_Oct_13_22_34_59_2009_081)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="powerpc-isa-fix.diff" Index: isa.c =================================================================== --- isa.c (revision 197533) +++ isa.c (working copy) @@ -51,6 +51,14 @@ struct resource_list *rl = &idev->id_resources; int isdefault, passthrough, rids; + /* + * MPC85xx reference boards have most of a pseudo ISA bus, but + * don't pass memory cycles to the cards. Fail all allocation + * attempts to reflect this. + */ + if (type == SYS_RES_MEMORY) + return NULL; + isdefault = (start == 0UL && end == ~0UL) ? 1 : 0; passthrough = (device_get_parent(child) != bus) ? 1 : 0; @@ -59,7 +67,6 @@ switch (type) { case SYS_RES_IOPORT: rids = ISA_PNP_NPORT; break; case SYS_RES_IRQ: rids = ISA_PNP_NIRQ; break; - case SYS_RES_MEMORY: rids = ISA_PNP_NMEM; break; default: rids = 0; break; } if (*rid < 0 || *rid >= rids) ----Next_Part(Tue_Oct_13_22_34_59_2009_081)---- From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 11:55: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 32EC6106568D; Wed, 14 Oct 2009 11:55:56 +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 2270C8FC08; Wed, 14 Oct 2009 11:55:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9EBtu4A035622; Wed, 14 Oct 2009 11:55:56 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9EBtuUB035620; Wed, 14 Oct 2009 11:55:56 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200910141155.n9EBtuUB035620@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 14 Oct 2009 11:55: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: r198075 - 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: Wed, 14 Oct 2009 11:55:56 -0000 Author: bz Date: Wed Oct 14 11:55:55 2009 New Revision: 198075 URL: http://svn.freebsd.org/changeset/base/198075 Log: Unbreak the VIMAGE build with IPSEC, broken with r197952 by virtualizing the pfil hooks. For consistency add the V_ to virtualize the pfil hooks in here as well. MFC after: 55 days X-MFC after: julian MFCed r197952. Modified: head/sys/net/if_enc.c Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Wed Oct 14 11:50:22 2009 (r198074) +++ head/sys/net/if_enc.c Wed Oct 14 11:55:55 2009 (r198075) @@ -243,9 +243,9 @@ ipsec_filter(struct mbuf **mp, int dir, } /* Skip pfil(9) if no filters are loaded */ - if (!(PFIL_HOOKED(&inet_pfil_hook) + if (!(PFIL_HOOKED(&V_inet_pfil_hook) #ifdef INET6 - || PFIL_HOOKED(&inet6_pfil_hook) + || PFIL_HOOKED(&V_inet6_pfil_hook) #endif )) { return (0); @@ -271,7 +271,7 @@ ipsec_filter(struct mbuf **mp, int dir, ip->ip_len = ntohs(ip->ip_len); ip->ip_off = ntohs(ip->ip_off); - error = pfil_run_hooks(&inet_pfil_hook, mp, + error = pfil_run_hooks(&V_inet_pfil_hook, mp, encif, dir, NULL); if (*mp == NULL || error != 0) @@ -285,7 +285,7 @@ ipsec_filter(struct mbuf **mp, int dir, #ifdef INET6 case 6: - error = pfil_run_hooks(&inet6_pfil_hook, mp, + error = pfil_run_hooks(&V_inet6_pfil_hook, mp, encif, dir, NULL); break; #endif From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 12:01: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 A05D310656A4; Wed, 14 Oct 2009 12:01:11 +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 8FE228FC2A; Wed, 14 Oct 2009 12:01:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9EC1BSP035785; Wed, 14 Oct 2009 12:01:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9EC1BTx035783; Wed, 14 Oct 2009 12:01:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200910141201.n9EC1BTx035783@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 14 Oct 2009 12:01: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: r198076 - 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: Wed, 14 Oct 2009 12:01:11 -0000 Author: bz Date: Wed Oct 14 12:01:11 2009 New Revision: 198076 URL: http://svn.freebsd.org/changeset/base/198076 Log: Explicitly compare to a return code. Discussed with: philip (after we both misread the logic there the 1st time) MFC after: 6 weeks Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Wed Oct 14 11:55:55 2009 (r198075) +++ head/sys/netinet6/icmp6.c Wed Oct 14 12:01:11 2009 (r198076) @@ -870,7 +870,7 @@ icmp6_input(struct mbuf **mp, int *offp, break; } deliver: - if (icmp6_notify_error(&m, off, icmp6len, code)) { + if (icmp6_notify_error(&m, off, icmp6len, code) != 0) { /* In this case, m should've been freed. */ return (IPPROTO_DONE); } From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 12:25: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 9B58B1065670; Wed, 14 Oct 2009 12:25:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 528FB8FC25; Wed, 14 Oct 2009 12:25:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id E921941C70C; Wed, 14 Oct 2009 14:25:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id n-1bi1qC8K+7; Wed, 14 Oct 2009 14:25:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 7646241C6FC; Wed, 14 Oct 2009 14:25:05 +0200 (CEST) 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 541A24448E6; Wed, 14 Oct 2009 12:24:12 +0000 (UTC) Date: Wed, 14 Oct 2009 12:24:12 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Julian Elischer In-Reply-To: <200910110559.n9B5xhNg002528@svn.freebsd.org> Message-ID: <20091014115713.N5956@maildrop.int.zabbadoz.net> References: <200910110559.n9B5xhNg002528@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: r197952 - in head/sys: net netgraph netinet netinet/ipfw 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: Wed, 14 Oct 2009 12:25:07 -0000 On Sun, 11 Oct 2009, Julian Elischer wrote: > Author: julian > Date: Sun Oct 11 05:59:43 2009 > New Revision: 197952 > URL: http://svn.freebsd.org/changeset/base/197952 > > Log: > Virtualize the pfil hooks so that different jails may chose different > packet filters. ALso allows ipfw to be enabled on on ejail and disabled > on another. In 8.0 it's a global setting. > > Sitting aroung in tree waiting to commit for: 2 months Unfortunately this broke VIMAGE with IPSEC builds, which I just fixed. I am not yet convinced this was the right approach but probably the most straight forward one. /bz > MFC after: 2 months > > Modified: > head/sys/net/if_bridge.c > head/sys/net/if_ethersubr.c > head/sys/net/pfil.c > head/sys/netgraph/ng_bridge.c > head/sys/netinet/ip_fastfwd.c > head/sys/netinet/ip_input.c > head/sys/netinet/ip_output.c > head/sys/netinet/ip_var.h > head/sys/netinet/ipfw/ip_fw2.c > head/sys/netinet/ipfw/ip_fw_pfil.c > head/sys/netinet/raw_ip.c > head/sys/netinet6/ip6_forward.c > head/sys/netinet6/ip6_input.c > head/sys/netinet6/ip6_output.c > head/sys/netinet6/ip6_var.h -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 14:13: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 98C4010656C2; Wed, 14 Oct 2009 14:13:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87A8A8FC46; Wed, 14 Oct 2009 14:13:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9EEDgl6039066; Wed, 14 Oct 2009 14:13:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9EEDgQo039064; Wed, 14 Oct 2009 14:13:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910141413.n9EEDgQo039064@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Oct 2009 14:13: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: r198079 - head/sys/boot/i386/zfsboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 14 Oct 2009 14:13:42 -0000 Author: jhb Date: Wed Oct 14 14:13:42 2009 New Revision: 198079 URL: http://svn.freebsd.org/changeset/base/198079 Log: Use zfs_read() instead of xfsread() to read /boot.config. xfsread() fails short read requests, so the result was that a /boot.config smaller than 512 bytes was ignored. boot2 uses fsread() instead of xfsread() to read /boot.config already, so this makes zfsboot more like boot2. Submitted by: Johny Mattsson johny-freebsd of earthmagic org Reviewed by: dfr MFC after: 3 days Modified: head/sys/boot/i386/zfsboot/zfsboot.c Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Wed Oct 14 13:58:24 2009 (r198078) +++ head/sys/boot/i386/zfsboot/zfsboot.c Wed Oct 14 14:13:42 2009 (r198079) @@ -609,7 +609,7 @@ main(void) if (zfs_lookup(spa, PATH_CONFIG, &dn) == 0) { off = 0; - xfsread(&dn, &off, cmd, sizeof(cmd)); + zfs_read(spa, &dn, &off, cmd, sizeof(cmd)); } if (*cmd) { From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 15:00: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 7B1A4106566B; Wed, 14 Oct 2009 15:00:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4B2358FC12; Wed, 14 Oct 2009 15:00:45 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id C5E1246B06; Wed, 14 Oct 2009 11:00:44 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 1281B8A01B; Wed, 14 Oct 2009 11:00:44 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" Date: Wed, 14 Oct 2009 07:53:56 -0400 User-Agent: KMail/1.9.7 References: <200910131904.n9DJ41QC013817@svn.freebsd.org> <200910131510.48144.jhb@freebsd.org> <20091013.200741.1973690373.imp@bsdimp.com> In-Reply-To: <20091013.200741.1973690373.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910140753.57264.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 14 Oct 2009 11:00:44 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198044 - head/sys/arm/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, 14 Oct 2009 15:00:45 -0000 On Tuesday 13 October 2009 10:07:41 pm M. Warner Losh wrote: > In message: <200910131510.48144.jhb@freebsd.org> > John Baldwin writes: > : On Tuesday 13 October 2009 3:04:01 pm John Baldwin wrote: > : > Author: jhb > : > Date: Tue Oct 13 19:04:01 2009 > : > New Revision: 198044 > : > URL: http://svn.freebsd.org/changeset/base/198044 > : > > : > Log: > : > Sync with other GENERIC kernel configs: > : > - Move USB serial drivers earlier to match their placement in other kernel > : > configs. > : > - Add descriptions to various USB drivers. > : > - Move the USB wireless drivers into a new section. > : > - Add ulscom to the list of USB serial drivers. > : > : I do wonder if it is time to have some files like 'sys/conf/std.usb.serial' > : that list all the USB serial drivers so that we only have one list of instead > : of N to ease future maintenance. Similiar arguments could be made > : for 'std.usb.wireless' and 'std.usb.ethernet' perhaps. > > I've tried this in the past... Having multiple attributes in the > filename helps. but std.ethernet likely is a bad idea since that > means it needs to include usb.ethernet and you can't easily exclude > usb. USB seems to be a bus where if the bus works, then all the peripherals generally work unlike PCI where invidiual drivers need to handle DMA addresses properly, endian issues, etc. So, I'm only wondering out loud about the USB case for now since it seems more plausible than some other cases. What I would like to do is avoid having to touch N kernel configs each time a USB driver is added. > I've often thought that it would be cool to tag each device with one > or more attributes so we could easily include all devices with the > attribute, and also be able to report attribute based things... That sounds interesting. I think it means we need to move to more of a module-centric approach though where a module has a name, attributes, a list of files, etc. Possibly a list of variants as well (e.g. so drivers with multiple attachments can only include the attachments for the busses in the base kernel still when the driver is compiled into the kernel). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 15:58: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 8A7D5106568D; Wed, 14 Oct 2009 15:58:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 788918FC16; Wed, 14 Oct 2009 15:58:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9EFwxJi041743; Wed, 14 Oct 2009 15:58:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9EFwx0N041742; Wed, 14 Oct 2009 15:58:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910141558.n9EFwx0N041742@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Oct 2009 15:58: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: r198085 - 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: Wed, 14 Oct 2009 15:58:59 -0000 Author: jhb Date: Wed Oct 14 15:58:59 2009 New Revision: 198085 URL: http://svn.freebsd.org/changeset/base/198085 Log: Add a manual page for BUS_BIND_INTR() and bus_bind_intr(). MFC after: 1 week Added: head/share/man/man9/BUS_BIND_INTR.9 (contents, props changed) Modified: head/share/man/man9/Makefile Added: head/share/man/man9/BUS_BIND_INTR.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/BUS_BIND_INTR.9 Wed Oct 14 15:58:59 2009 (r198085) @@ -0,0 +1,96 @@ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Written by: John H. Baldwin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 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. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE 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 THE 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. +.\" +.\" $FreeBSD$ +.\" +.Dd October 14, 2009 +.Dt BUS_BIND_INTR 9 +.Os +.Sh NAME +.Nm BUS_BIND_INTR , +.Nm bus_bind_intr +.Nd "bind an interrupt resource to a specific CPU" +.Sh SYNOPSIS +.In sys/param.h +.In sys/bus.h +.Ft int +.Fo BUS_BIND_INTR +.Fa "device_t dev" "device_t child" "struct resource *irq" "int cpu" +.Fc +.Ft int +.Fn bus_bind_intr "device_t dev" "struct resource *irq" "int cpu" +.Sh DESCRIPTION +The +.Fn BUS_BIND_INTR +method allows an interrupt resource to be pinned to a specific CPU. +The interrupt resource must have an interrupt handler attached via +.Xr BUS_SETUP_INTR 9 . +The +.Fa cpu +parameter corresponds to the ID of a valid CPU in the system. +Binding an interrupt restricts the +.Xr cpuset 2 +of any associated interrupt threads to only include the specified CPU. +It may also direct the low-level interrupt handling of the interrupt to the +specified CPU as well, +but this behavior is platform-dependent. +If the value +.Dv NOCPU +is used for +.Fa cpu , +then the interrupt will be +.Dq unbound +which restores any associated interrupt threads back to the default cpuset. +.Pp +Non-sleepable locks such as mutexes should not be held across calls to these +functions. +.Pp +The +.Fn bus_bind_intr +function is a simple wrapper around +.Fn BUS_BIND_INTR . +.Pp +Note that currently there is no attempt made to arbitrate between +multiple bind requests for the same interrupt from either the same +device or multiple devices. +There is also no arbitration between interrupt binding requests submitted +by userland via +.Xr cpuset 2 +and +.Fn BUS_BIND_INTR . +The most recent binding request is the one that will be in effect. +.Sh SEE ALSO +.Xr BUS_SETUP_INTR 9 , +.Xr cpuset 2 , +.Xr device 9 +.Sh HISTORY +The +.Fn BUS_BIND_INTR +method and +.Fn bus_bind_intr +functions first appeared in +.Fx 7.2 . Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Wed Oct 14 15:37:03 2009 (r198084) +++ head/share/man/man9/Makefile Wed Oct 14 15:58:59 2009 (r198085) @@ -23,6 +23,7 @@ MAN= accept_filter.9 \ bus_activate_resource.9 \ BUS_ADD_CHILD.9 \ bus_alloc_resource.9 \ + BUS_BIND_INTR.9 \ bus_child_present.9 \ BUS_CONFIG_INTR.9 \ bus_dma.9 \ @@ -403,6 +404,7 @@ MLINKS+=bpf.9 bpf_filter.9 \ MLINKS+=buf.9 bp.9 MLINKS+=bus_activate_resource.9 bus_deactivate_resource.9 MLINKS+=bus_alloc_resource.9 bus_alloc_resource_any.9 +MLINKS+=BUS_BIND_INTR.9 bus_bind_intr.9 MLINKS+=bus_dma.9 busdma.9 \ bus_dma.9 bus_dmamap_create.9 \ bus_dma.9 bus_dmamap_destroy.9 \ From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 16:00: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 EFE731065670; Wed, 14 Oct 2009 16:00:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF1AF8FC16; Wed, 14 Oct 2009 16:00:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9EG0KRZ041833; Wed, 14 Oct 2009 16:00:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9EG0Kjo041831; Wed, 14 Oct 2009 16:00:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910141600.n9EG0Kjo041831@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Oct 2009 16:00:20 +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: r198086 - 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: Wed, 14 Oct 2009 16:00:21 -0000 Author: jhb Date: Wed Oct 14 16:00:20 2009 New Revision: 198086 URL: http://svn.freebsd.org/changeset/base/198086 Log: Oops, add a return values section to note that these routines return an error on failure or zero on success. Modified: head/share/man/man9/BUS_BIND_INTR.9 Modified: head/share/man/man9/BUS_BIND_INTR.9 ============================================================================== --- head/share/man/man9/BUS_BIND_INTR.9 Wed Oct 14 15:58:59 2009 (r198085) +++ head/share/man/man9/BUS_BIND_INTR.9 Wed Oct 14 16:00:20 2009 (r198086) @@ -83,6 +83,8 @@ by userland via and .Fn BUS_BIND_INTR . The most recent binding request is the one that will be in effect. +.Sh RETURN VALUES +Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO .Xr BUS_SETUP_INTR 9 , .Xr cpuset 2 , From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 16:21: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 86C231065670 for ; Wed, 14 Oct 2009 16:21:59 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outG.internet-mail-service.net (outg.internet-mail-service.net [216.240.47.230]) by mx1.freebsd.org (Postfix) with ESMTP id 6DE3F8FC17 for ; Wed, 14 Oct 2009 16:21:59 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 75790B755B; Wed, 14 Oct 2009 09:22:01 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 820792D6027; Wed, 14 Oct 2009 09:21:58 -0700 (PDT) Message-ID: <4AD5FAA9.2090202@elischer.org> Date: Wed, 14 Oct 2009 09:22:01 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <200910141155.n9EBtuUB035620@svn.freebsd.org> In-Reply-To: <200910141155.n9EBtuUB035620@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: r198075 - 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: Wed, 14 Oct 2009 16:21:59 -0000 Bjoern A. Zeeb wrote: > Author: bz > Date: Wed Oct 14 11:55:55 2009 > New Revision: 198075 > URL: http://svn.freebsd.org/changeset/base/198075 > > Log: > Unbreak the VIMAGE build with IPSEC, broken with r197952 by > virtualizing the pfil hooks. > For consistency add the V_ to virtualize the pfil hooks in here as well. > > MFC after: 55 days > X-MFC after: julian MFCed r197952. did these get added recently or something? > > Modified: > head/sys/net/if_enc.c > > Modified: head/sys/net/if_enc.c > ============================================================================== > --- head/sys/net/if_enc.c Wed Oct 14 11:50:22 2009 (r198074) > +++ head/sys/net/if_enc.c Wed Oct 14 11:55:55 2009 (r198075) > @@ -243,9 +243,9 @@ ipsec_filter(struct mbuf **mp, int dir, > } > > /* Skip pfil(9) if no filters are loaded */ > - if (!(PFIL_HOOKED(&inet_pfil_hook) > + if (!(PFIL_HOOKED(&V_inet_pfil_hook) > #ifdef INET6 > - || PFIL_HOOKED(&inet6_pfil_hook) > + || PFIL_HOOKED(&V_inet6_pfil_hook) > #endif > )) { > return (0); > @@ -271,7 +271,7 @@ ipsec_filter(struct mbuf **mp, int dir, > ip->ip_len = ntohs(ip->ip_len); > ip->ip_off = ntohs(ip->ip_off); > > - error = pfil_run_hooks(&inet_pfil_hook, mp, > + error = pfil_run_hooks(&V_inet_pfil_hook, mp, > encif, dir, NULL); > > if (*mp == NULL || error != 0) > @@ -285,7 +285,7 @@ ipsec_filter(struct mbuf **mp, int dir, > > #ifdef INET6 > case 6: > - error = pfil_run_hooks(&inet6_pfil_hook, mp, > + error = pfil_run_hooks(&V_inet6_pfil_hook, mp, > encif, dir, NULL); > break; > #endif From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 16:25: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 3C2501065692 for ; Wed, 14 Oct 2009 16:25:54 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outC.internet-mail-service.net (outc.internet-mail-service.net [216.240.47.226]) by mx1.freebsd.org (Postfix) with ESMTP id 0D6E48FC20 for ; Wed, 14 Oct 2009 16:25:53 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 1AFBCC482; Wed, 14 Oct 2009 09:25:57 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id EEFCF2D601D; Wed, 14 Oct 2009 09:25:52 -0700 (PDT) Message-ID: <4AD5FB93.7000006@elischer.org> Date: Wed, 14 Oct 2009 09:25:55 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <200910110559.n9B5xhNg002528@svn.freebsd.org> <20091014115713.N5956@maildrop.int.zabbadoz.net> In-Reply-To: <20091014115713.N5956@maildrop.int.zabbadoz.net> 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, Julian Elischer Subject: Re: svn commit: r197952 - in head/sys: net netgraph netinet netinet/ipfw 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: Wed, 14 Oct 2009 16:25:54 -0000 Bjoern A. Zeeb wrote: > On Sun, 11 Oct 2009, Julian Elischer wrote: > >> Author: julian >> Date: Sun Oct 11 05:59:43 2009 >> New Revision: 197952 >> URL: http://svn.freebsd.org/changeset/base/197952 >> >> Log: >> Virtualize the pfil hooks so that different jails may chose different >> packet filters. ALso allows ipfw to be enabled on on ejail and disabled >> on another. In 8.0 it's a global setting. >> >> Sitting aroung in tree waiting to commit for: 2 months > > Unfortunately this broke VIMAGE with IPSEC builds, which I just fixed. > > I am not yet convinced this was the right approach but probably the > most straight forward one. yes I saw. however i'm puzzled as to why I didn't see the breakage. I tested many different builds when I did this and grepped for the pfil hooks throughout the code. maybe I missed VIMAGE_LINT? (is ipsec in LINT?) > > > /bz > >> MFC after: 2 months >> >> Modified: >> head/sys/net/if_bridge.c >> head/sys/net/if_ethersubr.c >> head/sys/net/pfil.c >> head/sys/netgraph/ng_bridge.c >> head/sys/netinet/ip_fastfwd.c >> head/sys/netinet/ip_input.c >> head/sys/netinet/ip_output.c >> head/sys/netinet/ip_var.h >> head/sys/netinet/ipfw/ip_fw2.c >> head/sys/netinet/ipfw/ip_fw_pfil.c >> head/sys/netinet/raw_ip.c >> head/sys/netinet6/ip6_forward.c >> head/sys/netinet6/ip6_input.c >> head/sys/netinet6/ip6_output.c >> head/sys/netinet6/ip6_var.h > From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 16:59: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 45EC510656A3; Wed, 14 Oct 2009 16:59:28 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout024.mac.com (asmtpout024.mac.com [17.148.16.99]) by mx1.freebsd.org (Postfix) with ESMTP id 2E7538FC14; Wed, 14 Oct 2009 16:59:28 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from macbook-pro.lan.xcllnt.net (mail.xcllnt.net [75.101.29.67]) by asmtp024.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KRI00GQ0KIMYU50@asmtp024.mac.com>; Wed, 14 Oct 2009 09:59:12 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <20091013.220411.-432748090.imp@bsdimp.com> Date: Wed, 14 Oct 2009 09:59:09 -0700 Message-id: References: <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> <20091013.180620.-1542634329.imp@bsdimp.com> <20091013.220411.-432748090.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 16:59:28 -0000 On Oct 13, 2009, at 9:04 PM, M. Warner Losh wrote: > : > Does this mean that the memory cycles on the I/O bus isn't > supported > : > for these architectures? > : > : Correct. > > Then it isn't an ISA bus. Of course it isn't an ISA bus. It's all LPC. Leaving the specialized embedded market aside, there's no point discussing real ISA busses in the FreeBSD context. Noone cares and as long as it doesn't break anything noone is going to put in effort to fix the code. > : There are no hooks to implement. If there is any FreeBSD supported > : board that actually needs to have the option ROMs scanned by orm(4), > > FreeBSD does support boards that need to have option ROMs scanned. orm(4) doesn't do anything with it. Other than claim the memory region and indirectly enforce policy, there's nothing orm(4) does. Policy should be implemented in the platform code where the knowledge exists and it should not be done as a side-effect of a driver that encodes the knowledge of a single platform by way of hardcoding numbers that don't hold on other platforms. orm(4) causes machine checks and kernel panics on PowerPC and Itanium and none of the non-i386 hardware has any real history with ISA, so the sensible thing is to have orm(4) be specific to PC hardware where it has relevance. If orm(4) is actually *required* on non-PC hardware then one only has to add the appropriate line to file.${ARCH} and it's there. -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 17:44: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 3924A106566C; Wed, 14 Oct 2009 17:44:46 +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 D1A4F8FC23; Wed, 14 Oct 2009 17:44:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9EHdjgT026068; Wed, 14 Oct 2009 11:39:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 14 Oct 2009 11:39:45 -0600 (MDT) Message-Id: <20091014.113945.74724941.imp@bsdimp.com> To: xcllnt@mac.com From: Warner Losh In-Reply-To: References: <20091013.220411.-432748090.imp@bsdimp.com> X-Mailer: Mew version 3.3 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: r197969 - 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, 14 Oct 2009 17:44:46 -0000 > On Oct 13, 2009, at 9:04 PM, M. Warner Losh wrote: > > : > Does this mean that the memory cycles on the I/O bus isn't > > supported > > : > for these architectures? > > : > > : Correct. > > > > Then it isn't an ISA bus. > > Of course it isn't an ISA bus. It's all LPC. Leaving the specialized > embedded market aside, there's no point discussing real ISA busses > in the FreeBSD context. Noone cares and as long as it doesn't break > anything noone is going to put in effort to fix the code. LPC is a real ISA bus in this context, since it passes the memory range decodes. Your changes to break things. It is a kludge. I can't be more clear than this. You keep ignoring me, and it is very frustrating. > > : There are no hooks to implement. If there is any FreeBSD supported > > : board that actually needs to have the option ROMs scanned by orm(4), > > > > FreeBSD does support boards that need to have option ROMs scanned. > > orm(4) doesn't do anything with it. Other than claim the memory > region and indirectly enforce policy, there's nothing orm(4) does. > Policy should be implemented in the platform code where the knowledge > exists and it should not be done as a side-effect of a driver that > encodes the knowledge of a single platform by way of hardcoding numbers > that don't hold on other platforms. Please listen. orm(4) isn't the problem. The problem is that the powerpc and itanium isa modules allow memory ranges that shouldn't be allowed. That's the platform specific code that needs to be fixed. > orm(4) causes machine checks and kernel panics on PowerPC and Itanium > and none of the non-i386 hardware has any real history with ISA, so > the sensible thing is to have orm(4) be specific to PC hardware where > it has relevance. If orm(4) is actually *required* on non-PC hardware > then one only has to add the appropriate line to file.${ARCH} and it's > there. To be pedantic: powerpc's buggy isa MD code is causing these problems. orm(4) is just a symptom, not the disease. Warner From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 18:35: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 D9A50106566C; Wed, 14 Oct 2009 18:35:18 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout024.mac.com (asmtpout024.mac.com [17.148.16.99]) by mx1.freebsd.org (Postfix) with ESMTP id C30218FC18; Wed, 14 Oct 2009 18:35:18 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed Received: from [172.24.241.207] (natint3.juniper.net [66.129.224.36]) by asmtp024.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KRI00N49OYS1O30@asmtp024.mac.com>; Wed, 14 Oct 2009 11:35:18 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <20091014.113945.74724941.imp@bsdimp.com> Date: Wed, 14 Oct 2009 11:35:16 -0700 Message-id: <2D55EFED-675A-4CC7-AF39-DE83961552F0@mac.com> References: <20091013.220411.-432748090.imp@bsdimp.com> <20091014.113945.74724941.imp@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 18:35:18 -0000 On Oct 14, 2009, at 10:39 AM, Warner Losh wrote: > > I can't be more clear than this. You keep ignoring me, and it is very > frustrating. I'm not ignoring you. I'm still talking. You simply haven't convinced me. While it's possible (likely?) that I don't understand the issues, all you've achieved so far is that I'm more convinced that limiting orm(4) to i386 and amd64 is the right thing, because the alternative is not at all appealing. > The problem is that the > powerpc and itanium isa modules allow memory ranges that shouldn't be > allowed. That's the platform specific code that needs to be fixed. isa_set_resource() is MI code and it happily adds whatever resources a driver wants. The only chance MD code has is to fail the allocation, but since the whole ISA code bypasses the newbus hierarchy, there's no way we know in the isa MD code what is valid and what isn't unless we add kluges to platform code. If you want to fix it for real, does that mean fix it for real or does that mean add kluges to platform code? Shouldn't we have ISA bridges obtain the set of valid resources from their parent in the newbus hierarchy? > To be pedantic: powerpc's buggy isa MD code is causing these > problems. orm(4) is just a symptom, not the disease. Fine, be pedantic. I eliminated the symptom. Good, now at least I'm not blocked and we can really discuss the disease and fix it. See above. -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 18:53: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 35F6E1065694; Wed, 14 Oct 2009 18:53:44 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id C9BB88FC1F; Wed, 14 Oct 2009 18:53:43 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id n9EIrcvf033458; Wed, 14 Oct 2009 20:53:38 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id n9EIrcQd033457; Wed, 14 Oct 2009 20:53:38 +0200 (CEST) (envelope-from marius) Date: Wed, 14 Oct 2009 20:53:38 +0200 From: Marius Strobl To: "M. Warner Losh" Message-ID: <20091014185338.GA26673@alchemy.franken.de> References: <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> <20091013.180620.-1542634329.imp@bsdimp.com> <20091013.223459.-957891176.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091013.223459.-957891176.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, xcllnt@mac.com, src-committers@freebsd.org Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 18:53:44 -0000 On Tue, Oct 13, 2009 at 10:34:59PM -0600, M. Warner Losh wrote: > In message: > Marcel Moolenaar writes: > : > : On Oct 13, 2009, at 5:06 PM, M. Warner Losh wrote: > : > : > In message: <2E290D8D-BAF0-4E4E-A352-B00FAFD9DF83@mac.com> > : > Marcel Moolenaar writes: > : > : > : > : On Oct 13, 2009, at 10:32 AM, M. Warner Losh wrote: > : > : > : > Why? They should be scanned for on any system with a real isa > : > : > bus... > : > : > : > : > : > : Other than i386, those are? > : > : > > : > : > So other than i386 and amd64, what systems use the isa device? > : > : > : > : I interpret the lack of answer as: none. > : > : > : > : isa(4) is usable on various architectures where the southbridge > : > : contains a LPC or similar. The MPC8555 CDS, for example, has a > : > : VIA southbridge that we need to talk to in order to get to the > : > : ATPIC for dealing with the nested interrupt. isa(4) is the device > : > : for this, but isaorm is causing kernel panics simply because > : > : the memory between 0xC0000 and 0x100000 is not reserved for ISA > : > : option ROMs. Likewise for Itanium, sparc64, etc... > : > > : > Does this mean that the memory cycles on the I/O bus isn't supported > : > for these architectures? > : > : Correct. > > Sparc64 doesn't have an ISA bus at all. Hmmm, NetBSD doesn't > implement it, but it looks like we have ofw_isa that does implement > it. It looks like NetBSD implements all the ISA bus devices we have > as ebus devices. Not sure which is more correct, but it is clear from > reading the sparc64 isa.c that it does unnatural acts to convince the > rest of the system there's really an ISA bus there. It looks to have > memory ranges decoded form the ofw description. It isn't clear to me > if these are additional devices that NetBSD doesn't support that hang > off a PCI-ISA bridge (in which case I'd imagine the memory cycles are > passed down), or if they are on what NetBSD calls the ebus. The EBus is a bus designed to be electrically compatible with ISA devices so ISA Super I/O, sound chips etc can be used for on-board I/O purposes, but otherwise is a different beast with proper DMA engines etc. It's a rather old bus already found as SBus-EBus bridges in pre-sun4u and machines, PCI-EBus bridges in old sun4u machines and JBus(i.e. host)-EBus brides in current sun4u and sun4v machines. The ISA busses found in sun4u and sun4v machines actually are LPC beneath a PCI-ISA bridge as these machines use ordinary PC-southbridges. NetBSD treating ISA devices as EBus ones probably is just a quick hack (which also involves turning I/O resources into memory ones). Why they chose to leave it implemented like that is beyond me, especially since thesy also have proper MI OFW ISA code. Lack thereof and lack of easy expandibilty of isa(4) at least is the reason why in FreeBSD ofw_isa.c does unnatural things to fake PNP information. > However, > given the limited activity in the sparc64 port, I'm not sure a lot of > work here is warranted. We've been scanning orm on this architecture > for a long time, and haven't had reports of crashes. It would be really great if FreeBSD would distinguish between LPC and real ISA so things like the ISAPNP code and ISA bus front-ends of ATA, network and SCSI drivers etc wouldn't be compliled into kernels for architectures that just have no use for these as they have LPC but no ISA slots, but the lack of activity in ISA driver development probably doesn't warrant fixing this. Marius From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 19:24: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 ABE5B1065676; Wed, 14 Oct 2009 19:24:01 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B36E8FC12; Wed, 14 Oct 2009 19:24:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9EJO1pL046581; Wed, 14 Oct 2009 19:24:01 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9EJO1YM046579; Wed, 14 Oct 2009 19:24:01 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200910141924.n9EJO1YM046579@svn.freebsd.org> From: Robert Noland Date: Wed, 14 Oct 2009 19:24: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: r198097 - 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: Wed, 14 Oct 2009 19:24:01 -0000 Author: rnoland Date: Wed Oct 14 19:24:01 2009 New Revision: 198097 URL: http://svn.freebsd.org/changeset/base/198097 Log: Set the active flag in the PMBR when we install bootcode on a GPT partitioned disk. Some BIOS require this to be set before they will boot the device. Approved by: marcel MFC after: 2 weeks Modified: head/sys/geom/part/g_part_gpt.c Modified: head/sys/geom/part/g_part_gpt.c ============================================================================== --- head/sys/geom/part/g_part_gpt.c Wed Oct 14 18:50:43 2009 (r198096) +++ head/sys/geom/part/g_part_gpt.c Wed Oct 14 19:24:01 2009 (r198097) @@ -382,6 +382,9 @@ g_part_gpt_bootcode(struct g_part_table codesz = MIN(codesz, gpp->gpp_codesize); if (codesz > 0) bcopy(gpp->gpp_codeptr, table->mbr, codesz); + + /* Mark the PMBR active since some BIOS require it */ + table->mbr[DOSPARTOFF] = 0x80; /* status */ return (0); } From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 20:09: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 64F74106566C; Wed, 14 Oct 2009 20:09:10 +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 542498FC19; Wed, 14 Oct 2009 20:09:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9EK9ADu047501; Wed, 14 Oct 2009 20:09:10 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9EK9Ai8047500; Wed, 14 Oct 2009 20:09:10 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <200910142009.n9EK9Ai8047500@svn.freebsd.org> From: Weongyo Jeong Date: Wed, 14 Oct 2009 20:09: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: r198098 - head/sys/dev/usb/wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 14 Oct 2009 20:09:10 -0000 Author: weongyo Date: Wed Oct 14 20:09:09 2009 New Revision: 198098 URL: http://svn.freebsd.org/changeset/base/198098 Log: fixes a TX hang bug that it could happen when if_start callback didn't be restarted by full of the output queue. MFC after: 3 days Tested by: bsduser Modified: head/sys/dev/usb/wlan/if_rum.c Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Wed Oct 14 19:24:01 2009 (r198097) +++ head/sys/dev/usb/wlan/if_rum.c Wed Oct 14 20:09:09 2009 (r198098) @@ -826,6 +826,9 @@ tr_setup: usbd_transfer_submit(xfer); } + RUM_UNLOCK(sc); + rum_start(ifp); + RUM_LOCK(sc); break; default: /* Error */ @@ -930,8 +933,8 @@ tr_setup: * the private mutex of a device! That is why we do the * "ieee80211_input" here, and not some lines up! */ + RUM_UNLOCK(sc); if (m) { - RUM_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); if (ni != NULL) { @@ -941,8 +944,11 @@ tr_setup: } else (void) ieee80211_input_all(ic, m, rssi, RT2573_NOISE_FLOOR); - RUM_LOCK(sc); } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + rum_start(ifp); + RUM_LOCK(sc); return; default: /* Error */ From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 20: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 A83871065670; Wed, 14 Oct 2009 20:30:27 +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 970E18FC15; Wed, 14 Oct 2009 20:30:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9EKURTQ048050; Wed, 14 Oct 2009 20:30:27 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9EKUR4f048044; Wed, 14 Oct 2009 20:30:27 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <200910142030.n9EKUR4f048044@svn.freebsd.org> From: Weongyo Jeong Date: Wed, 14 Oct 2009 20:30: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: r198099 - head/sys/dev/usb/wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 14 Oct 2009 20:30:27 -0000 Author: weongyo Date: Wed Oct 14 20:30:27 2009 New Revision: 198099 URL: http://svn.freebsd.org/changeset/base/198099 Log: fixes a TX hang that could be possible to happen when the trasfers are in the high speed that some drivers don't call if_start callback after marking ~IFF_DRV_OACTIVE. MFC after: 3 days Modified: head/sys/dev/usb/wlan/if_uath.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Wed Oct 14 20:09:09 2009 (r198098) +++ head/sys/dev/usb/wlan/if_uath.c Wed Oct 14 20:30:27 2009 (r198099) @@ -2762,6 +2762,9 @@ setup: m = NULL; desc = NULL; } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + uath_start(ifp); UATH_LOCK(sc); break; default: Modified: head/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- head/sys/dev/usb/wlan/if_upgt.c Wed Oct 14 20:09:09 2009 (r198098) +++ head/sys/dev/usb/wlan/if_upgt.c Wed Oct 14 20:30:27 2009 (r198099) @@ -2291,6 +2291,9 @@ setup: (void) ieee80211_input_all(ic, m, rssi, nf); m = NULL; } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + upgt_start(ifp); UPGT_LOCK(sc); break; default: Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Wed Oct 14 20:09:09 2009 (r198098) +++ head/sys/dev/usb/wlan/if_ural.c Wed Oct 14 20:30:27 2009 (r198099) @@ -837,6 +837,9 @@ tr_setup: usbd_transfer_submit(xfer); } + RAL_UNLOCK(sc); + ural_start(ifp); + RAL_LOCK(sc); break; default: /* Error */ @@ -945,8 +948,8 @@ tr_setup: * the private mutex of a device! That is why we do the * "ieee80211_input" here, and not some lines up! */ + RAL_UNLOCK(sc); if (m) { - RAL_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); if (ni != NULL) { @@ -954,8 +957,11 @@ tr_setup: ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - RAL_LOCK(sc); } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + ural_start(ifp); + RAL_LOCK(sc); return; default: /* Error */ Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Wed Oct 14 20:09:09 2009 (r198098) +++ head/sys/dev/usb/wlan/if_urtw.c Wed Oct 14 20:30:27 2009 (r198099) @@ -4072,6 +4072,9 @@ setup: (void) ieee80211_input_all(ic, m, rssi, nf); m = NULL; } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + urtw_start(ifp); URTW_LOCK(sc); break; default: Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Wed Oct 14 20:09:09 2009 (r198098) +++ head/sys/dev/usb/wlan/if_zyd.c Wed Oct 14 20:30:27 2009 (r198099) @@ -2322,6 +2322,9 @@ tr_setup: } else (void)ieee80211_input_all(ic, m, rssi, nf); } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + zyd_start(ifp); ZYD_LOCK(sc); break; @@ -2431,6 +2434,9 @@ tr_setup: usbd_xfer_set_priv(xfer, data); usbd_transfer_submit(xfer); } + ZYD_UNLOCK(sc); + zyd_start(ifp); + ZYD_LOCK(sc); break; default: /* Error */ From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 20:59: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 53FC31065696; Wed, 14 Oct 2009 20:59:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 23B248FC3F; Wed, 14 Oct 2009 20:59:40 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B133A46B0C; Wed, 14 Oct 2009 16:59:39 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id CAB348A01B; Wed, 14 Oct 2009 16:59:38 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Date: Wed, 14 Oct 2009 16:45:25 -0400 User-Agent: KMail/1.9.7 References: <20091014.113945.74724941.imp@bsdimp.com> <2D55EFED-675A-4CC7-AF39-DE83961552F0@mac.com> In-Reply-To: <2D55EFED-675A-4CC7-AF39-DE83961552F0@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910141645.26010.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 14 Oct 2009 16:59:38 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 20:59:40 -0000 On Wednesday 14 October 2009 2:35:16 pm Marcel Moolenaar wrote: > On Oct 14, 2009, at 10:39 AM, Warner Losh wrote: > > > > I can't be more clear than this. You keep ignoring me, and it is very > > frustrating. > > I'm not ignoring you. I'm still talking. You simply haven't convinced > me. While it's possible (likely?) that I don't understand the issues, > all you've achieved so far is that I'm more convinced that limiting > orm(4) to i386 and amd64 is the right thing, because the alternative > is not at all appealing. > > > The problem is that the > > powerpc and itanium isa modules allow memory ranges that shouldn't be > > allowed. That's the platform specific code that needs to be fixed. > > isa_set_resource() is MI code and it happily adds whatever resources > a driver wants. The only chance MD code has is to fail the allocation, > but since the whole ISA code bypasses the newbus hierarchy, there's > no way we know in the isa MD code what is valid and what isn't unless > we add kluges to platform code. > > If you want to fix it for real, does that mean fix it for real or > does that mean add kluges to platform code? > > Shouldn't we have ISA bridges obtain the set of valid resources > from their parent in the newbus hierarchy? Hmm, can we even know that? PCI-ISA bridges in x86 at least don't have any I/O limit registers like PCI-PCI bridges, instead they are subtractively decoded, i.e. they "eat" any memory request that no one else claims. I'm not sure if other platforms have a way of knowing this however. Are you aware of something in OFW to communicate this? ACPI does this for Host-PCI bridges via ResourceProvider() resource entries, but I've never seen ACPI do it for a PCI-ISA bridge. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 21: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 CC20D1065670; Wed, 14 Oct 2009 21:21:14 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout030.mac.com (asmtpout030.mac.com [17.148.16.105]) by mx1.freebsd.org (Postfix) with ESMTP id B3BCA8FC20; Wed, 14 Oct 2009 21:21:14 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from [172.24.241.207] (natint3.juniper.net [66.129.224.36]) by asmtp030.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KRI0072KWMFMY40@asmtp030.mac.com>; Wed, 14 Oct 2009 14:20:41 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <200910141645.26010.jhb@freebsd.org> Date: Wed, 14 Oct 2009 14:20:38 -0700 Message-id: <6B860A3C-C1F0-42A0-8ECB-3D41DA698EE2@mac.com> References: <20091014.113945.74724941.imp@bsdimp.com> <2D55EFED-675A-4CC7-AF39-DE83961552F0@mac.com> <200910141645.26010.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 21:21:14 -0000 On Oct 14, 2009, at 1:45 PM, John Baldwin wrote: > On Wednesday 14 October 2009 2:35:16 pm Marcel Moolenaar wrote: >> On Oct 14, 2009, at 10:39 AM, Warner Losh wrote: >>> >>> I can't be more clear than this. You keep ignoring me, and it is >>> very >>> frustrating. >> >> I'm not ignoring you. I'm still talking. You simply haven't convinced >> me. While it's possible (likely?) that I don't understand the issues, >> all you've achieved so far is that I'm more convinced that limiting >> orm(4) to i386 and amd64 is the right thing, because the alternative >> is not at all appealing. >> >>> The problem is that the >>> powerpc and itanium isa modules allow memory ranges that shouldn't >>> be >>> allowed. That's the platform specific code that needs to be fixed. >> >> isa_set_resource() is MI code and it happily adds whatever resources >> a driver wants. The only chance MD code has is to fail the >> allocation, >> but since the whole ISA code bypasses the newbus hierarchy, there's >> no way we know in the isa MD code what is valid and what isn't unless >> we add kluges to platform code. >> >> If you want to fix it for real, does that mean fix it for real or >> does that mean add kluges to platform code? >> >> Shouldn't we have ISA bridges obtain the set of valid resources >> from their parent in the newbus hierarchy? > > Hmm, can we even know that? PCI-ISA bridges in x86 at least don't > have any > I/O limit registers like PCI-PCI bridges, instead they are > subtractively > decoded, i.e. they "eat" any memory request that no one else claims. The key here being requests that reach the PCI-ISA bridge. It's entirely platform specific which I/O memory addresses generated by the CPU gets decoded and forwarded in such a way that it's visible to the PCI-ISA bridge. This is what needs to be obtained from the parent in the newbus hierarchy. Rather than hardcoding [0xC0000 .. 0x100000> as the ISA option ROM memory range, it should be something like [isa_mem_base+0xC0000 .. isa_mem_base + 0x100000> or even [isa_rom_base .. isa_rom_base + 0x40000>. -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 21:38: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 E23D3106566B; Wed, 14 Oct 2009 21:38:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9EBBB8FC17; Wed, 14 Oct 2009 21:38:49 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 31D6C46B0C; Wed, 14 Oct 2009 17:38:49 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 8CBAE8A01B; Wed, 14 Oct 2009 17:38:48 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Date: Wed, 14 Oct 2009 17:38:43 -0400 User-Agent: KMail/1.9.7 References: <200910141645.26010.jhb@freebsd.org> <6B860A3C-C1F0-42A0-8ECB-3D41DA698EE2@mac.com> In-Reply-To: <6B860A3C-C1F0-42A0-8ECB-3D41DA698EE2@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910141738.43910.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 14 Oct 2009 17:38:48 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 21:38:50 -0000 On Wednesday 14 October 2009 5:20:38 pm Marcel Moolenaar wrote: > > On Oct 14, 2009, at 1:45 PM, John Baldwin wrote: > > > On Wednesday 14 October 2009 2:35:16 pm Marcel Moolenaar wrote: > >> On Oct 14, 2009, at 10:39 AM, Warner Losh wrote: > >>> > >>> I can't be more clear than this. You keep ignoring me, and it is > >>> very > >>> frustrating. > >> > >> I'm not ignoring you. I'm still talking. You simply haven't convinced > >> me. While it's possible (likely?) that I don't understand the issues, > >> all you've achieved so far is that I'm more convinced that limiting > >> orm(4) to i386 and amd64 is the right thing, because the alternative > >> is not at all appealing. > >> > >>> The problem is that the > >>> powerpc and itanium isa modules allow memory ranges that shouldn't > >>> be > >>> allowed. That's the platform specific code that needs to be fixed. > >> > >> isa_set_resource() is MI code and it happily adds whatever resources > >> a driver wants. The only chance MD code has is to fail the > >> allocation, > >> but since the whole ISA code bypasses the newbus hierarchy, there's > >> no way we know in the isa MD code what is valid and what isn't unless > >> we add kluges to platform code. > >> > >> If you want to fix it for real, does that mean fix it for real or > >> does that mean add kluges to platform code? > >> > >> Shouldn't we have ISA bridges obtain the set of valid resources > >> from their parent in the newbus hierarchy? > > > > Hmm, can we even know that? PCI-ISA bridges in x86 at least don't > > have any > > I/O limit registers like PCI-PCI bridges, instead they are > > subtractively > > decoded, i.e. they "eat" any memory request that no one else claims. > > The key here being requests that reach the PCI-ISA bridge. It's entirely > platform specific which I/O memory addresses generated by the CPU gets > decoded and forwarded in such a way that it's visible to the PCI-ISA > bridge. This is what needs to be obtained from the parent in the newbus > hierarchy. Rather than hardcoding [0xC0000 .. 0x100000> as the ISA > option > ROM memory range, it should be something like [isa_mem_base+0xC0000 .. > isa_mem_base + 0x100000> or even [isa_rom_base .. isa_rom_base + > 0x40000>. That might certainly be a reasonable IVAR for isab(4) to provide to isa(4): a ROM base. However, orm(4) should be enabled for all ISA bridges assuming that is fixed. OTOH, the way many bus drivers I've seen handle this so far is to change the base address of SYS_RES_MEMORY objects as they pass through the relevant bridge so that the actual memory address is properly adjusted when it gets to the equivalent of the nexus. This is how many of the Foo->PCI bridges in arm that I've looked at work, and I think this is more inline with Warner's original patch which is to allow the various platform-specific ISA bridge drivers reject memory ranges they do not decode and provide any needed adjustments to ranges they do decode to transform them into suitable resources for their parent. Then orm(4) would just see it's attempts to do bus_alloc_resource() fail and end up DTRT. Given that, I do think this logic belongs in the ISA bridge drivers rather than in individual ISA drivers. We don't make ISA peripheral drivers add an 'isa_mem_base' or equivalent to their I/O resources, and in terms of I/O resources, orm(4) is just a special blackhole device (much like the ACPI or PnPBIOS system resource devices, or the ram0 or apic0 devices on x86). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 22:15: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 31FEB106566C; Wed, 14 Oct 2009 22:15:18 +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 BF7958FC19; Wed, 14 Oct 2009 22:15:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9EM6nS7029380; Wed, 14 Oct 2009 16:06:49 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 14 Oct 2009 16:07:01 -0600 (MDT) Message-Id: <20091014.160701.-736097942.imp@bsdimp.com> To: xcllnt@mac.com From: "M. Warner Losh" In-Reply-To: <6B860A3C-C1F0-42A0-8ECB-3D41DA698EE2@mac.com> References: <2D55EFED-675A-4CC7-AF39-DE83961552F0@mac.com> <200910141645.26010.jhb@freebsd.org> <6B860A3C-C1F0-42A0-8ECB-3D41DA698EE2@mac.com> 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, jhb@freebsd.org Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 22:15:18 -0000 In message: <6B860A3C-C1F0-42A0-8ECB-3D41DA698EE2@mac.com> Marcel Moolenaar writes: : : On Oct 14, 2009, at 1:45 PM, John Baldwin wrote: : : > On Wednesday 14 October 2009 2:35:16 pm Marcel Moolenaar wrote: : >> On Oct 14, 2009, at 10:39 AM, Warner Losh wrote: : >>> : >>> I can't be more clear than this. You keep ignoring me, and it is : >>> very : >>> frustrating. : >> : >> I'm not ignoring you. I'm still talking. You simply haven't convinced : >> me. While it's possible (likely?) that I don't understand the issues, : >> all you've achieved so far is that I'm more convinced that limiting : >> orm(4) to i386 and amd64 is the right thing, because the alternative : >> is not at all appealing. : >> : >>> The problem is that the : >>> powerpc and itanium isa modules allow memory ranges that shouldn't : >>> be : >>> allowed. That's the platform specific code that needs to be fixed. : >> : >> isa_set_resource() is MI code and it happily adds whatever resources : >> a driver wants. The only chance MD code has is to fail the : >> allocation, : >> but since the whole ISA code bypasses the newbus hierarchy, there's : >> no way we know in the isa MD code what is valid and what isn't unless : >> we add kluges to platform code. : >> : >> If you want to fix it for real, does that mean fix it for real or : >> does that mean add kluges to platform code? : >> : >> Shouldn't we have ISA bridges obtain the set of valid resources : >> from their parent in the newbus hierarchy? : > : > Hmm, can we even know that? PCI-ISA bridges in x86 at least don't : > have any : > I/O limit registers like PCI-PCI bridges, instead they are : > subtractively : > decoded, i.e. they "eat" any memory request that no one else claims. : : The key here being requests that reach the PCI-ISA bridge. It's entirely : platform specific which I/O memory addresses generated by the CPU gets : decoded and forwarded in such a way that it's visible to the PCI-ISA : bridge. This is what needs to be obtained from the parent in the newbus : hierarchy. Rather than hardcoding [0xC0000 .. 0x100000> as the ISA : option : ROM memory range, it should be something like [isa_mem_base+0xC0000 .. : isa_mem_base + 0x100000> or even [isa_rom_base .. isa_rom_base + : 0x40000>. 0xc0000..0x100000 is the right range of addresses to use. It is the responsibility of the bus space to translate that to whatever physical address to use. These are bus addresses, and are by definition platform independent. If other platforms map these bus addresses to other physical addresses, then it is their responsibility to map them in the bus_space layer. I think that's the primary disconnect here. The powerpc bus_space doesn't do this at all, but should for those platforms that actually implement it. Warner From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 22:15: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 CEDB61065670; Wed, 14 Oct 2009 22:15:19 +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 796638FC1A; Wed, 14 Oct 2009 22:15:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9EMB37q029445; Wed, 14 Oct 2009 16:11:03 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 14 Oct 2009 16:11:15 -0600 (MDT) Message-Id: <20091014.161115.-1796258170.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <200910141738.43910.jhb@freebsd.org> References: <200910141645.26010.jhb@freebsd.org> <6B860A3C-C1F0-42A0-8ECB-3D41DA698EE2@mac.com> <200910141738.43910.jhb@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, xcllnt@mac.com, src-committers@freebsd.org Subject: Re: svn commit: r197969 - 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, 14 Oct 2009 22:15:20 -0000 In message: <200910141738.43910.jhb@freebsd.org> John Baldwin writes: : On Wednesday 14 October 2009 5:20:38 pm Marcel Moolenaar wrote: : > : > On Oct 14, 2009, at 1:45 PM, John Baldwin wrote: : > : > > On Wednesday 14 October 2009 2:35:16 pm Marcel Moolenaar wrote: : > >> On Oct 14, 2009, at 10:39 AM, Warner Losh wrote: : > >>> : > >>> I can't be more clear than this. You keep ignoring me, and it is : > >>> very : > >>> frustrating. : > >> : > >> I'm not ignoring you. I'm still talking. You simply haven't convinced : > >> me. While it's possible (likely?) that I don't understand the issues, : > >> all you've achieved so far is that I'm more convinced that limiting : > >> orm(4) to i386 and amd64 is the right thing, because the alternative : > >> is not at all appealing. : > >> : > >>> The problem is that the : > >>> powerpc and itanium isa modules allow memory ranges that shouldn't : > >>> be : > >>> allowed. That's the platform specific code that needs to be fixed. : > >> : > >> isa_set_resource() is MI code and it happily adds whatever resources : > >> a driver wants. The only chance MD code has is to fail the : > >> allocation, : > >> but since the whole ISA code bypasses the newbus hierarchy, there's : > >> no way we know in the isa MD code what is valid and what isn't unless : > >> we add kluges to platform code. : > >> : > >> If you want to fix it for real, does that mean fix it for real or : > >> does that mean add kluges to platform code? : > >> : > >> Shouldn't we have ISA bridges obtain the set of valid resources : > >> from their parent in the newbus hierarchy? : > > : > > Hmm, can we even know that? PCI-ISA bridges in x86 at least don't : > > have any : > > I/O limit registers like PCI-PCI bridges, instead they are : > > subtractively : > > decoded, i.e. they "eat" any memory request that no one else claims. : > : > The key here being requests that reach the PCI-ISA bridge. It's entirely : > platform specific which I/O memory addresses generated by the CPU gets : > decoded and forwarded in such a way that it's visible to the PCI-ISA : > bridge. This is what needs to be obtained from the parent in the newbus : > hierarchy. Rather than hardcoding [0xC0000 .. 0x100000> as the ISA : > option : > ROM memory range, it should be something like [isa_mem_base+0xC0000 .. : > isa_mem_base + 0x100000> or even [isa_rom_base .. isa_rom_base + : > 0x40000>. : : That might certainly be a reasonable IVAR for isab(4) to provide to isa(4): a : ROM base. However, orm(4) should be enabled for all ISA bridges assuming : that is fixed. OTOH, the way many bus drivers I've seen handle this so far : is to change the base address of SYS_RES_MEMORY objects as they pass through : the relevant bridge so that the actual memory address is properly adjusted : when it gets to the equivalent of the nexus. This is how many of the : Foo->PCI bridges in arm that I've looked at work, and I think this is more : inline with Warner's original patch which is to allow the various : platform-specific ISA bridge drivers reject memory ranges they do not decode : and provide any needed adjustments to ranges they do decode to transform them : into suitable resources for their parent. Then orm(4) would just see it's : attempts to do bus_alloc_resource() fail and end up DTRT. Given that, I do : think this logic belongs in the ISA bridge drivers rather than in individual : ISA drivers. We don't make ISA peripheral drivers add an 'isa_mem_base' or : equivalent to their I/O resources, and in terms of I/O resources, orm(4) is : just a special blackhole device (much like the ACPI or PnPBIOS system : resource devices, or the ram0 or apic0 devices on x86). This is exactly what I've been trying to say: the memory addresses that orm is using are ISA BUS addresses. These just happen to map 1:1 on x86, but will map to something else on other platforms. But our kernel API is that the driver requests the bus address, and that any necessary translation happen in the bus_space layer. I disagree that it belongs entirely in the isa bridge drivers. They may communicate information to the bus_space implementation, but it is bus_space that ultimately does this translation. Warner From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 04:51: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 6CD16106566C; Thu, 15 Oct 2009 04:51:51 +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 1E3358FC0A; Thu, 15 Oct 2009 04:51:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9F4iMwK034091; Wed, 14 Oct 2009 22:44:22 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 14 Oct 2009 22:44:34 -0600 (MDT) Message-Id: <20091014.224434.-345402487.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <200910141738.43910.jhb@freebsd.org> References: <200910141645.26010.jhb@freebsd.org> <6B860A3C-C1F0-42A0-8ECB-3D41DA698EE2@mac.com> <200910141738.43910.jhb@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, xcllnt@mac.com, src-committers@freebsd.org Subject: Re: svn commit: r197969 - 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: Thu, 15 Oct 2009 04:51:51 -0000 In message: <200910141738.43910.jhb@freebsd.org> John Baldwin writes: : On Wednesday 14 October 2009 5:20:38 pm Marcel Moolenaar wrote: : > : > On Oct 14, 2009, at 1:45 PM, John Baldwin wrote: : > : > > On Wednesday 14 October 2009 2:35:16 pm Marcel Moolenaar wrote: : > >> On Oct 14, 2009, at 10:39 AM, Warner Losh wrote: : > >>> : > >>> I can't be more clear than this. You keep ignoring me, and it is : > >>> very : > >>> frustrating. : > >> : > >> I'm not ignoring you. I'm still talking. You simply haven't convinced : > >> me. While it's possible (likely?) that I don't understand the issues, : > >> all you've achieved so far is that I'm more convinced that limiting : > >> orm(4) to i386 and amd64 is the right thing, because the alternative : > >> is not at all appealing. : > >> : > >>> The problem is that the : > >>> powerpc and itanium isa modules allow memory ranges that shouldn't : > >>> be : > >>> allowed. That's the platform specific code that needs to be fixed. : > >> : > >> isa_set_resource() is MI code and it happily adds whatever resources : > >> a driver wants. The only chance MD code has is to fail the : > >> allocation, : > >> but since the whole ISA code bypasses the newbus hierarchy, there's : > >> no way we know in the isa MD code what is valid and what isn't unless : > >> we add kluges to platform code. They aren't kludges. They are codifying the restrictions the platform has for that bus. : > >> If you want to fix it for real, does that mean fix it for real or : > >> does that mean add kluges to platform code? We add proper code to the platform code. The problem exists if you accidentally configure aha. It will probe memory. : > >> Shouldn't we have ISA bridges obtain the set of valid resources : > >> from their parent in the newbus hierarchy? We likely should have the ISA bridge create and give out a bus_space that maps the ISA bus addresses to wherever they are mapped on the host. : > > Hmm, can we even know that? PCI-ISA bridges in x86 at least don't : > > have any : > > I/O limit registers like PCI-PCI bridges, instead they are : > > subtractively : > > decoded, i.e. they "eat" any memory request that no one else claims. Correct. They always assume the default x86 mapping of the ISA bus space to physical memory. : > The key here being requests that reach the PCI-ISA bridge. It's entirely : > platform specific which I/O memory addresses generated by the CPU gets : > decoded and forwarded in such a way that it's visible to the PCI-ISA : > bridge. This is what needs to be obtained from the parent in the newbus : > hierarchy. Rather than hardcoding [0xC0000 .. 0x100000> as the ISA : > option : > ROM memory range, it should be something like [isa_mem_base+0xC0000 .. : > isa_mem_base + 0x100000> or even [isa_rom_base .. isa_rom_base + : > 0x40000>. Hard coding 0xc0000, etc is proper here because that's not a physical address. It is an ISA bus address. This address needs to be mapped to the host memory segment at the bus_space level so that the drivers we have in the tree will work on those architectures where the mapping isn't the identity like on x86. The drivers should have no knowledge this is happening if they are using bus_space routines. That's what they exist for. : That might certainly be a reasonable IVAR for isab(4) to provide to isa(4): a : ROM base. However, orm(4) should be enabled for all ISA bridges assuming : that is fixed. OTOH, the way many bus drivers I've seen handle this so far : is to change the base address of SYS_RES_MEMORY objects as they pass through : the relevant bridge so that the actual memory address is properly adjusted : when it gets to the equivalent of the nexus. This is how many of the : Foo->PCI bridges in arm that I've looked at work, and I think this is more : inline with Warner's original patch which is to allow the various : platform-specific ISA bridge drivers reject memory ranges they do not decode : and provide any needed adjustments to ranges they do decode to transform them : into suitable resources for their parent. I think that they are done at the wrong level if they are done there. They should be done in the bus_space layer so that the driver can get the bus addresses to maybe program into pci hardware. : Then orm(4) would just see it's : attempts to do bus_alloc_resource() fail and end up DTRT. Yes and no. bus_alloc_resource would do the right thing. If the bridge driver knew that it had a private mapping, it would create an rman that had the memory ranges (in ISA memory space) that it decoded. It would then carve out allocates from this rman for any child devices that asked for it. It would return a bus_space handle that could be used by the driver and bus_space_read* to get the right thing from the memory. For x86, you couldn't implement this because the bus_space assumes one global space. On arm and mips, for example, their bus_space implementations are such that at any level you can do things like byte ordering hacks or address translations like this. On those platforms, the bus_space functions become calls into a function pointer table that allows for this kind of mapping. : Given that, I do : think this logic belongs in the ISA bridge drivers rather than in individual : ISA drivers. We don't make ISA peripheral drivers add an 'isa_mem_base' or : equivalent to their I/O resources, and in terms of I/O resources, orm(4) is : just a special blackhole device (much like the ACPI or PnPBIOS system : resource devices, or the ram0 or apic0 devices on x86). Keep in mind that 0xc0000 is a bus space address on the ISA bus, not a physical memory address. On x86 it just happens to be mapped 1:1 to physical memory. On other systems this isn't the case. On those systems, the bus_space that is returned for this resource should do the translation. that's what it was invented for. For example, the TS-7200 board maps the 8-bit memory reads to one address range, 16-bit memory reads to another, 8-bit port access to a third and 16-bit port access to a forth. Let's call these M8, M16, I8 and I16. So a bus_space_read_1 of a memory rid will return *(uint8_t *)(M8 + offset). A bus_space_read_2 of the same offset will return *(uint16_t *)(M16 + offset), etc. So when orm runs on this board, its bus_space stuff will read M8 + 0xc0000, etc. No changs to the driver are necessary to accomplish this. All the fixes are done in the bus_space that's used to access the isa bus on this board. This is the basis of my saying that the MD code for the machine in question must either filter out the requests for the memory range on the ISA bus that isn't decoded. Or it must provide the translation from the ISA BUS address passed to bus_space_read_1 to the actual physical/virtual address that the bus is mapped in on that machine. If you think about it, this needs to be the case. Many ISA cards need to have the address on the bus programmed into them for various things. If you had to have every platform and subbus codified for them in the driver, we'd quickly have a big mess in every driver since they would all have to know how to map the physical addresses. This is also the source of my frustration with the thread, I think. I don't think that Marcel understood this world view and assumed that no mapping was needed and therefore orm was this horribly x86 specific code. Since I didn't understand this until today, I reacted badly and lost my temper, for which I'd like to apologize. I should have stopped and explained this view better. Warner P.S. The code to implement this board is only in perforce right now (and may be broken). You can see how NetBSD accomplishes this in their tree. From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 05:36: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 A2A05106566B; Thu, 15 Oct 2009 05:36:03 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout024.mac.com (asmtpout024.mac.com [17.148.16.99]) by mx1.freebsd.org (Postfix) with ESMTP id 8A2438FC15; Thu, 15 Oct 2009 05:36:03 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed Received: from [172.24.241.207] (natint3.juniper.net [66.129.224.36]) by asmtp024.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KRJ000URJJO3C80@asmtp024.mac.com>; Wed, 14 Oct 2009 22:35:49 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <20091014.224434.-345402487.imp@bsdimp.com> Date: Wed, 14 Oct 2009 22:35:48 -0700 Message-id: References: <200910141645.26010.jhb@freebsd.org> <6B860A3C-C1F0-42A0-8ECB-3D41DA698EE2@mac.com> <200910141738.43910.jhb@freebsd.org> <20091014.224434.-345402487.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, jhb@freebsd.org Subject: Re: svn commit: r197969 - 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: Thu, 15 Oct 2009 05:36:03 -0000 On Oct 14, 2009, at 9:44 PM, M. Warner Losh wrote: > This is also the source of my frustration with the thread, I think. I > don't think that Marcel understood this world view and assumed that no > mapping was needed and therefore orm was this horribly x86 specific > code. Since I didn't understand this until today, I reacted badly and > lost my temper, for which I'd like to apologize. I should have > stopped and explained this view better. Apology accepted. Sorry, if I appeared frustrated as well. I can respect the PoV that the hardcoding in drivers are bus addresses. I have no problem with that. It isn't my PoV, because it doesn't match with the existence of functions like inb(), outb(), inw(), outw(), etc. The I/O port numbers passed to those functions are typically absolute due to the total lack of newbus involvement. I merely extrapolated the memory addresses as behaving in the same way. They do actually, because VGA frame buffer memory is at 0xA0000 and part of the PCI specification and you don't want to translate that, so how does MD code know when to map and when not to? It doesn't, so the only logical interpretation is that the addresses are absolute and no mapping can be done. I don't mind changing the interpretation of I/O ports and memory addresses as being ISA bus addresses, but that means that we need to get rid off inb(), outb(), et al and use newbus through out. Until that's done (and people figure out how to deal with VGA resources) or there's a real need for orm(4), it's safest for non-PC platforms to not have orm(4) wreck havoc. -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 06:00: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 6340E1065676; Thu, 15 Oct 2009 06:00: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 0F93D8FC22; Thu, 15 Oct 2009 06:00:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9F5r241034850; Wed, 14 Oct 2009 23:53:02 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 14 Oct 2009 23:53:15 -0600 (MDT) Message-Id: <20091014.235315.62961324.imp@bsdimp.com> To: xcllnt@mac.com From: "M. Warner Losh" In-Reply-To: References: <200910141738.43910.jhb@freebsd.org> <20091014.224434.-345402487.imp@bsdimp.com> 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, jhb@FreeBSD.org Subject: Re: svn commit: r197969 - 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: Thu, 15 Oct 2009 06:00:01 -0000 In message: Marcel Moolenaar writes: : : On Oct 14, 2009, at 9:44 PM, M. Warner Losh wrote: : > This is also the source of my frustration with the thread, I think. I : > don't think that Marcel understood this world view and assumed that no : > mapping was needed and therefore orm was this horribly x86 specific : > code. Since I didn't understand this until today, I reacted badly and : > lost my temper, for which I'd like to apologize. I should have : > stopped and explained this view better. : : Apology accepted. Sorry, if I appeared frustrated as well. : : I can respect the PoV that the hardcoding in drivers are bus addresses. : I have no problem with that. It isn't my PoV, because it doesn't match : with the existence of functions like inb(), outb(), inw(), outw(), etc. inb, etc, aren't part of bus_space and exist outside of it. These functions typically don't exist on !x86 platforms, and when they do they are very platform specific.. : The I/O port numbers passed to those functions are typically absolute : due to the total lack of newbus involvement. I merely extrapolated the : memory addresses as behaving in the same way. They do actually, because : VGA frame buffer memory is at 0xA0000 and part of the PCI specification : and you don't want to translate that, so how does MD code know when to : map and when not to? It doesn't, so the only logical interpretation is : that the addresses are absolute and no mapping can be done. The PCI specification says that the frame buffer is at 0xa0000 in the pci bus space. It doesn't say anything about how that bus space is mapped into the processor's address space (although it comments on x86's traditional mapping in many places). : I don't mind changing the interpretation of I/O ports and memory : addresses as being ISA bus addresses, but that means that we need to : get rid off inb(), outb(), et al and use newbus through out. Until : that's done (and people figure out how to deal with VGA resources) or : there's a real need for orm(4), it's safest for non-PC platforms to not : have orm(4) wreck havoc. There is a real need for orm. I'm open to ways to improve the situation without requiring the complete implementation of the ISA stuff. The reason that it does wreck havoc is because there's problems in the ISA implementation on the platforms it wrecks havoc on. You can mask these problems by removing orm. However, any other isa device that reads memory will have issues on these platforms. The VGA resource issue should be a simple one to deal with via bus_spae. This is the first time I've heard of it, frankly, so would be interested in learning more about it. We've also, as a project, have strongly encouraged drivers to move away from inb, et al, and direct memory access to using bus_space interfaces since around FreeBSD 4.0. Many drivers have been converted. I think the few stragglers were killed as part of the network modernization efforts, although some pre-ISA PNP support still uses inb/outb directly. I think I'd quibble that it is !x86. It is specific to powerpc and itanium platforms. Sparc64 handles it correctly, as does arm (at east in the projects/arm tree). I don't think that mips has any ISA support, even in the projects/mips tree. Warner From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 06:12: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 F365A1065670; Thu, 15 Oct 2009 06:12:04 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7C2D8FC22; Thu, 15 Oct 2009 06:12:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9F6C4e4061399; Thu, 15 Oct 2009 06:12:04 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9F6C4vH061396; Thu, 15 Oct 2009 06:12:04 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200910150612.n9F6C4vH061396@svn.freebsd.org> From: Qing Li Date: Thu, 15 Oct 2009 06:12: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: r198111 - 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: Thu, 15 Oct 2009 06:12:05 -0000 Author: qingli Date: Thu Oct 15 06:12:04 2009 New Revision: 198111 URL: http://svn.freebsd.org/changeset/base/198111 Log: This patch fixes the following issues in the ARP operation: 1. There is a regression issue in the ARP code. The incomplete ARP entry was timing out too quickly (1 second timeout), as such, a new entry is created each time arpresolve() is called. Therefore the maximum attempts made is always 1. Consequently the error code returned to the application is always 0. 2. Set the expiration of each incomplete entry to a 20-second lifetime. 3. Return "incomplete" entries to the application. Reviewed by: kmacy MFC after: 3 days Modified: head/sys/netinet/if_ether.c head/sys/netinet/in.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Thu Oct 15 06:02:37 2009 (r198110) +++ head/sys/netinet/if_ether.c Thu Oct 15 06:12:04 2009 (r198111) @@ -88,11 +88,14 @@ VNET_DEFINE(int, useloopback) = 1; /* us /* timer values */ static VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20 * minutes */ +static VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for + * 20 seconds */ static VNET_DEFINE(int, arp_maxtries) = 5; static VNET_DEFINE(int, arp_proxyall); static VNET_DEFINE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */ #define V_arpt_keep VNET(arpt_keep) +#define V_arpt_down VNET(arpt_down) #define V_arp_maxtries VNET(arp_maxtries) #define V_arp_proxyall VNET(arp_proxyall) #define V_arpstat VNET(arpstat) @@ -309,7 +312,7 @@ retry: } if ((la->la_flags & LLE_VALID) && - ((la->la_flags & LLE_STATIC) || la->la_expire > time_uptime)) { + ((la->la_flags & LLE_STATIC) || la->la_expire > time_second)) { bcopy(&la->ll_addr, desten, ifp->if_addrlen); /* * If entry has an expiry time and it is approaching, @@ -317,7 +320,7 @@ retry: * arpt_down interval. */ if (!(la->la_flags & LLE_STATIC) && - time_uptime + la->la_preempt > la->la_expire) { + time_second + la->la_preempt > la->la_expire) { arprequest(ifp, NULL, &SIN(dst)->sin_addr, IF_LLADDR(ifp)); @@ -337,7 +340,7 @@ retry: goto done; } - renew = (la->la_asked == 0 || la->la_expire != time_uptime); + renew = (la->la_asked == 0 || la->la_expire != time_second); if ((renew || m != NULL) && (flags & LLE_EXCLUSIVE) == 0) { flags |= LLE_EXCLUSIVE; LLE_RUNLOCK(la); @@ -370,12 +373,12 @@ retry: error = EWOULDBLOCK; /* First request. */ else error = - (rt0->rt_flags & RTF_GATEWAY) ? EHOSTDOWN : EHOSTUNREACH; + (rt0->rt_flags & RTF_GATEWAY) ? EHOSTUNREACH : EHOSTDOWN; if (renew) { LLE_ADDREF(la); - la->la_expire = time_uptime; - callout_reset(&la->la_timer, hz, arptimer, la); + la->la_expire = time_second; + callout_reset(&la->la_timer, hz * V_arpt_down, arptimer, la); la->la_asked++; LLE_WUNLOCK(la); arprequest(ifp, NULL, &SIN(dst)->sin_addr, @@ -687,7 +690,7 @@ match: EVENTHANDLER_INVOKE(arp_update_event, la); if (!(la->la_flags & LLE_STATIC)) { - la->la_expire = time_uptime + V_arpt_keep; + la->la_expire = time_second + V_arpt_keep; callout_reset(&la->la_timer, hz * V_arpt_keep, arptimer, la); } Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Thu Oct 15 06:02:37 2009 (r198110) +++ head/sys/netinet/in.c Thu Oct 15 06:12:04 2009 (r198111) @@ -1440,7 +1440,7 @@ in_lltable_dump(struct lltable *llt, str struct sockaddr_dl *sdl; /* skip deleted entries */ - if ((lle->la_flags & (LLE_DELETED|LLE_VALID)) != LLE_VALID) + if ((lle->la_flags & LLE_DELETED) == LLE_DELETED) continue; /* Skip if jailed and not a valid IP of the prison. */ if (prison_if(wr->td->td_ucred, L3_ADDR(lle)) != 0) @@ -1472,10 +1472,15 @@ in_lltable_dump(struct lltable *llt, str sdl = &arpc.sdl; sdl->sdl_family = AF_LINK; sdl->sdl_len = sizeof(*sdl); - sdl->sdl_alen = ifp->if_addrlen; sdl->sdl_index = ifp->if_index; sdl->sdl_type = ifp->if_type; - bcopy(&lle->ll_addr, LLADDR(sdl), ifp->if_addrlen); + if ((lle->la_flags & LLE_VALID) == LLE_VALID) { + sdl->sdl_alen = ifp->if_addrlen; + bcopy(&lle->ll_addr, LLADDR(sdl), ifp->if_addrlen); + } else { + sdl->sdl_alen = 0; + bzero(LLADDR(sdl), ifp->if_addrlen); + } arpc.rtm.rtm_rmx.rmx_expire = lle->la_flags & LLE_STATIC ? 0 : lle->la_expire; From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 06:26: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 97A9C1065696; Thu, 15 Oct 2009 06:26:22 +0000 (UTC) (envelope-from tomelite82@gmail.com) Received: from mail-vw0-f180.google.com (mail-vw0-f180.google.com [209.85.212.180]) by mx1.freebsd.org (Postfix) with ESMTP id 0CB108FC1C; Thu, 15 Oct 2009 06:26:21 +0000 (UTC) Received: by vws10 with SMTP id 10so296200vws.7 for ; Wed, 14 Oct 2009 23:26:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=DJeB/AeF4VQdK0xqLmgS2qbfqiOPeEFkDBiOIMPZcUU=; b=ZSceYBSWxV+3ORS4pshSyfDG5RKslVm7LfuvOxT8B7vJst2mdJ+Faw/9t24yyrPmP3 mr9F8UPAGy5ODDsP6i3RVeG/+u0zoiQvx/zr8ScNfwkHItc7K/qukzuzgFFVd8UInFmb V09zbCJIc8C57v374W7B69e/Dsf0Pa7jONvnk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=mXAicA8aWWckf3YPuSB6uwd46jsg0XUQb3lK6mTBcLDCbnznVuT6o6nifJPui1vR59 vnycyT9/f3LKaFofOzYPTM7TrR5WrnFskVceKbvqZaDfwsh33LBl9UXIi/U6iFZ1qMW5 yI6wSQxZ/y38415mu3dAPhE3AFbAN+9ITegag= MIME-Version: 1.0 Sender: tomelite82@gmail.com Received: by 10.220.114.211 with SMTP id f19mr14409846vcq.1.1255587981174; Wed, 14 Oct 2009 23:26:21 -0700 (PDT) In-Reply-To: <200910150612.n9F6C4vH061396@svn.freebsd.org> References: <200910150612.n9F6C4vH061396@svn.freebsd.org> Date: Wed, 14 Oct 2009 23:26:21 -0700 X-Google-Sender-Auth: cbbb9daef1da1feb Message-ID: <9ace436c0910142326t69ddfe9ex26fa2c99849483aa@mail.gmail.com> From: Qing Li To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: svn commit: r198111 - 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: Thu, 15 Oct 2009 06:26:22 -0000 Forgot to mention the return code was incorrect. The function was returning EHOSTUNEACH when it should be returning EHOSTDOWN. This is also fixed by this patch. -- Qing On Wed, Oct 14, 2009 at 11:12 PM, Qing Li wrote: > Author: qingli > Date: Thu Oct 15 06:12:04 2009 > New Revision: 198111 > URL: http://svn.freebsd.org/changeset/base/198111 > > Log: > =A0This patch fixes the following issues in the ARP operation: > > =A01. There is a regression issue in the ARP code. The incomplete > =A0 =A0 ARP entry was timing out too quickly (1 second timeout), as > =A0 =A0 such, a new entry is created each time arpresolve() is called. > =A0 =A0 Therefore the maximum attempts made is always 1. Consequently > =A0 =A0 the error code returned to the application is always 0. > =A02. Set the expiration of each incomplete entry to a 20-second > =A0 =A0 lifetime. > =A03. Return "incomplete" entries to the application. > > =A0Reviewed by: =A0kmacy > =A0MFC after: =A0 =A03 days > > Modified: > =A0head/sys/netinet/if_ether.c > =A0head/sys/netinet/in.c > > Modified: head/sys/netinet/if_ether.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/netinet/if_ether.c Thu Oct 15 06:02:37 2009 =A0 =A0 =A0 =A0(= r198110) > +++ head/sys/netinet/if_ether.c Thu Oct 15 06:12:04 2009 =A0 =A0 =A0 =A0(= r198111) > @@ -88,11 +88,14 @@ VNET_DEFINE(int, useloopback) =3D 1; =A0/* us > =A0/* timer values */ > =A0static VNET_DEFINE(int, arpt_keep) =3D (20*60); =A0/* once resolved, g= ood for 20 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 * minutes */ > +static VNET_DEFINE(int, arpt_down) =3D 20; =A0 =A0 =A0/* keep incomplete= entries for > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0* 20 seconds */ > =A0static VNET_DEFINE(int, arp_maxtries) =3D 5; > =A0static VNET_DEFINE(int, arp_proxyall); > =A0static VNET_DEFINE(struct arpstat, arpstat); =A0/* ARP statistics, see= if_arp.h */ > > =A0#define =A0 =A0 =A0 =A0V_arpt_keep =A0 =A0 =A0 =A0 =A0 =A0 VNET(arpt_k= eep) > +#define =A0 =A0 =A0 =A0V_arpt_down =A0 =A0 =A0 =A0 =A0 =A0 VNET(arpt_dow= n) > =A0#define =A0 =A0 =A0 =A0V_arp_maxtries =A0 =A0 =A0 =A0 =A0VNET(arp_maxt= ries) > =A0#define =A0 =A0 =A0 =A0V_arp_proxyall =A0 =A0 =A0 =A0 =A0VNET(arp_prox= yall) > =A0#define =A0 =A0 =A0 =A0V_arpstat =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(arps= tat) > @@ -309,7 +312,7 @@ retry: > =A0 =A0 =A0 =A0} > > =A0 =A0 =A0 =A0if ((la->la_flags & LLE_VALID) && > - =A0 =A0 =A0 =A0 =A0 ((la->la_flags & LLE_STATIC) || la->la_expire > tim= e_uptime)) { > + =A0 =A0 =A0 =A0 =A0 ((la->la_flags & LLE_STATIC) || la->la_expire > tim= e_second)) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bcopy(&la->ll_addr, desten, ifp->if_addrle= n); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * If entry has an expiry time and it is a= pproaching, > @@ -317,7 +320,7 @@ retry: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * arpt_down interval. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 */ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!(la->la_flags & LLE_STATIC) && > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 time_uptime + la->la_preempt > la->= la_expire) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 time_second + la->la_preempt > la->= la_expire) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0arprequest(ifp, NULL, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&SIN(dst)->sin_add= r, IF_LLADDR(ifp)); > > @@ -337,7 +340,7 @@ retry: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto done; > =A0 =A0 =A0 =A0} > > - =A0 =A0 =A0 renew =3D (la->la_asked =3D=3D 0 || la->la_expire !=3D time= _uptime); > + =A0 =A0 =A0 renew =3D (la->la_asked =3D=3D 0 || la->la_expire !=3D time= _second); > =A0 =A0 =A0 =A0if ((renew || m !=3D NULL) && (flags & LLE_EXCLUSIVE) =3D= =3D 0) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0flags |=3D LLE_EXCLUSIVE; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LLE_RUNLOCK(la); > @@ -370,12 +373,12 @@ retry: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0error =3D EWOULDBLOCK; =A0 =A0/* First req= uest. */ > =A0 =A0 =A0 =A0else > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0error =3D > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (rt0->rt_flags & RTF_GATEWAY) ? EHO= STDOWN : EHOSTUNREACH; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (rt0->rt_flags & RTF_GATEWA= Y) ? EHOSTUNREACH : EHOSTDOWN; > > =A0 =A0 =A0 =A0if (renew) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LLE_ADDREF(la); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 la->la_expire =3D time_uptime; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 callout_reset(&la->la_timer, hz, arptimer, = la); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 la->la_expire =3D time_second; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 callout_reset(&la->la_timer, hz * V_arpt_do= wn, arptimer, la); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0la->la_asked++; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LLE_WUNLOCK(la); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0arprequest(ifp, NULL, &SIN(dst)->sin_addr, > @@ -687,7 +690,7 @@ match: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0EVENTHANDLER_INVOKE(arp_update_event, la); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!(la->la_flags & LLE_STATIC)) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 la->la_expire =3D time_upti= me + V_arpt_keep; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 la->la_expire =3D time_seco= nd + V_arpt_keep; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0callout_reset(&la->la_time= r, hz * V_arpt_keep, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0arptimer, la); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > > Modified: head/sys/netinet/in.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/netinet/in.c =A0 =A0 =A0 Thu Oct 15 06:02:37 2009 =A0 =A0 = =A0 =A0(r198110) > +++ head/sys/netinet/in.c =A0 =A0 =A0 Thu Oct 15 06:12:04 2009 =A0 =A0 = =A0 =A0(r198111) > @@ -1440,7 +1440,7 @@ in_lltable_dump(struct lltable *llt, str > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct sockaddr_dl *sdl; > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* skip deleted entries */ > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((lle->la_flags & (LLE_D= ELETED|LLE_VALID)) !=3D LLE_VALID) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((lle->la_flags & LLE_DE= LETED) =3D=3D LLE_DELETED) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0continue; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* Skip if jailed and not = a valid IP of the prison. */ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (prison_if(wr->td->td_u= cred, L3_ADDR(lle)) !=3D 0) > @@ -1472,10 +1472,15 @@ in_lltable_dump(struct lltable *llt, str > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sdl =3D &arpc.sdl; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sdl->sdl_family =3D AF_LIN= K; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sdl->sdl_len =3D sizeof(*s= dl); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 sdl->sdl_alen =3D ifp->if_a= ddrlen; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sdl->sdl_index =3D ifp->if= _index; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sdl->sdl_type =3D ifp->if_= type; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bcopy(&lle->ll_addr, LLADDR= (sdl), ifp->if_addrlen); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((lle->la_flags & LLE_VA= LID) =3D=3D LLE_VALID) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 sdl->sdl_al= en =3D ifp->if_addrlen; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bcopy(&lle-= >ll_addr, LLADDR(sdl), ifp->if_addrlen); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } else { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 sdl->sdl_al= en =3D 0; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bzero(LLADD= R(sdl), ifp->if_addrlen); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0arpc.rtm.rtm_rmx.rmx_expir= e =3D > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0lle->la_flags & LL= E_STATIC ? 0 : lle->la_expire; > From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 07:58: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 F38931065694; Thu, 15 Oct 2009 07:58:01 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E19AB8FC18; Thu, 15 Oct 2009 07:58:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9F7w1xn064199; Thu, 15 Oct 2009 07:58:01 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9F7w1as064193; Thu, 15 Oct 2009 07:58:01 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200910150758.n9F7w1as064193@svn.freebsd.org> From: Hiroki Sato Date: Thu, 15 Oct 2009 07:58: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: r198114 - in head/release/doc: . en_US.ISO8859-1/errata share/mk share/sgml X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 15 Oct 2009 07:58:02 -0000 Author: hrs Date: Thu Oct 15 07:58:01 2009 New Revision: 198114 URL: http://svn.freebsd.org/changeset/base/198114 Log: Bump version numbers and update descriptions for the 9-CURRENT world. The %[no]include.historic knobs are removed because they are not used for a long time. Modified: head/release/doc/README head/release/doc/en_US.ISO8859-1/errata/article.sgml head/release/doc/share/mk/doc.relnotes.mk head/release/doc/share/sgml/release.dsl head/release/doc/share/sgml/release.ent Modified: head/release/doc/README ============================================================================== --- head/release/doc/README Thu Oct 15 07:47:49 2009 (r198113) +++ head/release/doc/README Thu Oct 15 07:58:01 2009 (r198114) @@ -99,9 +99,10 @@ element will be included. For example: SPARC64-specific text -The currently-supported architectures are i386, sparc64, and -ia64. An element may appear for multiple architectures by specifying -a comma-separated list of architectures (i.e. arch="sparc64,ia64"). +The currently-supported architectures are amd64, arm, i386, ia64, +pc98, powerpc, and sparc64. An element may appear for multiple +architectures by specifying a comma-separated list of architectures +(i.e. arch="sparc64,ia64"). When creating a translation, make a new directory under this directory with a language code (paralleling the DocProj directory Modified: head/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/errata/article.sgml Thu Oct 15 07:47:49 2009 (r198113) +++ head/release/doc/en_US.ISO8859-1/errata/article.sgml Thu Oct 15 07:58:01 2009 (r198114) @@ -16,7 +16,6 @@ %release; - ]>
Modified: head/release/doc/share/mk/doc.relnotes.mk ============================================================================== --- head/release/doc/share/mk/doc.relnotes.mk Thu Oct 15 07:47:49 2009 (r198113) +++ head/release/doc/share/mk/doc.relnotes.mk Thu Oct 15 07:58:01 2009 (r198114) @@ -11,23 +11,6 @@ DSLHTML?= ${RELN_ROOT}/share/sgml/defaul DSLPRINT?= ${RELN_ROOT}/share/sgml/default.dsl # -# Tweakable Makefile variables -# -# INCLUDE_HISTORIC Used by relnotes document only. When set, -# causes all release notes entries to be printed, -# even those marked as "historic". If not set -# (the default), only print "non-historic" -# release note entries. To designate a release -# note entry as "historic", add a role="historic" -# attribute to the applicable element(s). -# -.if defined(INCLUDE_HISTORIC) -JADEFLAGS+= -iinclude.historic -.else -JADEFLAGS+= -ino.include.historic -.endif - -# # Automatic device list generation: # .if exists(${RELN_ROOT}/../man4) Modified: head/release/doc/share/sgml/release.dsl ============================================================================== --- head/release/doc/share/sgml/release.dsl Thu Oct 15 07:47:49 2009 (r198113) +++ head/release/doc/share/sgml/release.dsl Thu Oct 15 07:58:01 2009 (r198114) @@ -3,8 +3,6 @@ - - %release.ent; @@ -14,14 +12,6 @@ -; Configure behavior of this stylesheet - - - ; String manipulation functions (define (split-string-to-list STR) ;; return list of STR separated with char #\ or #\, @@ -54,36 +44,6 @@ ((equal? STR (car s)) #t) (else (loop (cdr s)))))) -; Deal with conditional inclusion of text via entities. -(default - (let* ((role (attribute-string (normalize "role"))) - (for-arch (entity-text "arch"))) - (cond - - ;; If role=historic, and we're not printing historic things, then - ;; don't output this element. - ((and (equal? role "historic") - (not %include-historic%)) - (empty-sosofo)) - - ;; None of the above - (else (next-match))))) - -(mode qandatoc - (default - (let* ((role (attribute-string (normalize "role"))) - (for-arch (entity-text "arch"))) - (cond - - ;; If role=historic, and we're not printing historic things, then - ;; don't output this element. - ((and (equal? role "historic") - (not %include-historic%)) - (empty-sosofo)) - - ;; None of the above - (else (next-match)))))) - ; We might have some sect1 level elements where the modification times ; are significant. An example of this is the "What's New" section in ; the release notes. We enable the printing of pubdate entry in @@ -198,7 +158,6 @@ (u (string-append "&release.man.url;?query=" (data r) "&" "sektion=" (data m)))) (case v - (("xfree86") (string-append u "&" "manpath=XFree86+&release.manpath.xfree86;" )) (("xorg") (string-append u "&" "manpath=Xorg+&release.manpath.xorg;" )) (("netbsd") (string-append u "&" "manpath=NetBSD+&release.manpath.netbsd;")) (("ports") (string-append u "&" "manpath=FreeBSD+&release.manpath.freebsd-ports;")) Modified: head/release/doc/share/sgml/release.ent ============================================================================== --- head/release/doc/share/sgml/release.ent Thu Oct 15 07:47:49 2009 (r198113) +++ head/release/doc/share/sgml/release.ent Thu Oct 15 07:58:01 2009 (r198114) @@ -6,23 +6,23 @@ - + - + - + - + - + @@ -36,11 +36,10 @@ - - - + + - + From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 10:31: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 BC34A106566B; Thu, 15 Oct 2009 10:31:24 +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 AB9C18FC0C; Thu, 15 Oct 2009 10:31:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FAVOAZ070666; Thu, 15 Oct 2009 10:31:24 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FAVOvU070664; Thu, 15 Oct 2009 10:31:24 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200910151031.n9FAVOvU070664@svn.freebsd.org> From: Robert Watson Date: Thu, 15 Oct 2009 10:31: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: r198118 - 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: Thu, 15 Oct 2009 10:31:24 -0000 Author: rwatson Date: Thu Oct 15 10:31:24 2009 New Revision: 198118 URL: http://svn.freebsd.org/changeset/base/198118 Log: Print routing statistics as unsigned short rather than unsigned int, otherwise sign extension leads to unlikely values when in the negative range of the signed short structure fields that hold the statistics. The type used to hold routing statistics is arguably also incorrect. MFC after: 3 days Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Thu Oct 15 08:55:43 2009 (r198117) +++ head/usr.bin/netstat/route.c Thu Oct 15 10:31:24 2009 (r198118) @@ -1008,11 +1008,11 @@ rt_stats(u_long rtsaddr, u_long rttaddr) #define p(f, m) if (rtstat.f || sflag <= 1) \ printf(m, rtstat.f, plural(rtstat.f)) - p(rts_badredirect, "\t%u bad routing redirect%s\n"); - p(rts_dynamic, "\t%u dynamically created route%s\n"); - p(rts_newgateway, "\t%u new gateway%s due to redirects\n"); - p(rts_unreach, "\t%u destination%s found unreachable\n"); - p(rts_wildcard, "\t%u use%s of a wildcard route\n"); + p(rts_badredirect, "\t%hu bad routing redirect%s\n"); + p(rts_dynamic, "\t%hu dynamically created route%s\n"); + p(rts_newgateway, "\t%hu new gateway%s due to redirects\n"); + p(rts_unreach, "\t%hu destination%s found unreachable\n"); + p(rts_wildcard, "\t%hu use%s of a wildcard route\n"); #undef p if (rttrash || sflag <= 1) From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 11:32: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 490321065679; Thu, 15 Oct 2009 11:32:06 +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 3813D8FC22; Thu, 15 Oct 2009 11:32:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FBW6hi072203; Thu, 15 Oct 2009 11:32:06 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FBW6NH072200; Thu, 15 Oct 2009 11:32:06 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200910151132.n9FBW6NH072200@svn.freebsd.org> From: Christian Brueffer Date: Thu, 15 Oct 2009 11:32:06 +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: r198125 - 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, 15 Oct 2009 11:32:06 -0000 Author: brueffer Date: Thu Oct 15 11:32:05 2009 New Revision: 198125 URL: http://svn.freebsd.org/changeset/base/198125 Log: Use our standard section 4 SYNOPSIS. MFC after: 3 days Modified: head/share/man/man4/sbp_targ.4 head/share/man/man4/targ.4 Modified: head/share/man/man4/sbp_targ.4 ============================================================================== --- head/share/man/man4/sbp_targ.4 Thu Oct 15 11:12:53 2009 (r198124) +++ head/share/man/man4/sbp_targ.4 Thu Oct 15 11:32:05 2009 (r198125) @@ -38,16 +38,24 @@ .Nm sbp_targ .Nd Serial Bus Protocol 2 (SBP-2) Target Mode devices driver .Sh SYNOPSIS -.Cd "kldload firewire" -.Cd "kldload cam" -.Cd "kldload sbp_targ" -.Pp -or -.Pp +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent .Cd "device sbp_targ" .Cd "device firewire" .Cd "device scbus" .Cd "device targ" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +firewire_load="YES" +cam_load="YES" +sbp_targ_load"YES" +.Ed .Sh DESCRIPTION The .Nm Modified: head/share/man/man4/targ.4 ============================================================================== --- head/share/man/man4/targ.4 Thu Oct 15 11:12:53 2009 (r198124) +++ head/share/man/man4/targ.4 Thu Oct 15 11:32:05 2009 (r198125) @@ -31,7 +31,12 @@ .Nm targ .Nd SCSI target emulator driver .Sh SYNOPSIS -.Cd device targ +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device targ" +.Ed .Sh DESCRIPTION The .Nm From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 11:41: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 1C894106568B; Thu, 15 Oct 2009 11:41:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C0DB8FC08; Thu, 15 Oct 2009 11:41:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FBfCu2072440; Thu, 15 Oct 2009 11:41:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FBfCew072438; Thu, 15 Oct 2009 11:41:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910151141.n9FBfCew072438@svn.freebsd.org> From: John Baldwin Date: Thu, 15 Oct 2009 11:41: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: r198126 - 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, 15 Oct 2009 11:41:13 -0000 Author: jhb Date: Thu Oct 15 11:41:12 2009 New Revision: 198126 URL: http://svn.freebsd.org/changeset/base/198126 Log: Fix a sign bug in the handling of nice priorities when computing the interactive score for a thread. Submitted by: Taku YAMAMOTO taku of tackymt.homeip.net Reviewed by: jeff MFC after: 3 days Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Thu Oct 15 11:32:05 2009 (r198125) +++ head/sys/kern/sched_ule.c Thu Oct 15 11:41:12 2009 (r198126) @@ -1406,7 +1406,7 @@ sched_priority(struct thread *td) * score. Negative nice values make it easier for a thread to be * considered interactive. */ - score = imax(0, sched_interact_score(td) - td->td_proc->p_nice); + score = imax(0, sched_interact_score(td) + td->td_proc->p_nice); if (score < sched_interact) { pri = PRI_MIN_REALTIME; pri += ((PRI_MAX_REALTIME - PRI_MIN_REALTIME) / sched_interact) From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 12:45: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 7B639106566B; Thu, 15 Oct 2009 12:45:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3D8328FC17; Thu, 15 Oct 2009 12:45:00 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id E047046B2D; Thu, 15 Oct 2009 08:44:59 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 24C228A01F; Thu, 15 Oct 2009 08:44:59 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" Date: Thu, 15 Oct 2009 08:33:53 -0400 User-Agent: KMail/1.9.7 References: <200910141645.26010.jhb@freebsd.org> <200910141738.43910.jhb@freebsd.org> <20091014.161115.-1796258170.imp@bsdimp.com> In-Reply-To: <20091014.161115.-1796258170.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910150833.54252.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 15 Oct 2009 08:44:59 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, xcllnt@mac.com, src-committers@freebsd.org Subject: Re: svn commit: r197969 - 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: Thu, 15 Oct 2009 12:45:00 -0000 On Wednesday 14 October 2009 6:11:15 pm M. Warner Losh wrote: > In message: <200910141738.43910.jhb@freebsd.org> > John Baldwin writes: > : On Wednesday 14 October 2009 5:20:38 pm Marcel Moolenaar wrote: > : > > : > On Oct 14, 2009, at 1:45 PM, John Baldwin wrote: > : > > : > > On Wednesday 14 October 2009 2:35:16 pm Marcel Moolenaar wrote: > : > >> On Oct 14, 2009, at 10:39 AM, Warner Losh wrote: > : > >>> > : > >>> I can't be more clear than this. You keep ignoring me, and it is > : > >>> very > : > >>> frustrating. > : > >> > : > >> I'm not ignoring you. I'm still talking. You simply haven't convinced > : > >> me. While it's possible (likely?) that I don't understand the issues, > : > >> all you've achieved so far is that I'm more convinced that limiting > : > >> orm(4) to i386 and amd64 is the right thing, because the alternative > : > >> is not at all appealing. > : > >> > : > >>> The problem is that the > : > >>> powerpc and itanium isa modules allow memory ranges that shouldn't > : > >>> be > : > >>> allowed. That's the platform specific code that needs to be fixed. > : > >> > : > >> isa_set_resource() is MI code and it happily adds whatever resources > : > >> a driver wants. The only chance MD code has is to fail the > : > >> allocation, > : > >> but since the whole ISA code bypasses the newbus hierarchy, there's > : > >> no way we know in the isa MD code what is valid and what isn't unless > : > >> we add kluges to platform code. > : > >> > : > >> If you want to fix it for real, does that mean fix it for real or > : > >> does that mean add kluges to platform code? > : > >> > : > >> Shouldn't we have ISA bridges obtain the set of valid resources > : > >> from their parent in the newbus hierarchy? > : > > > : > > Hmm, can we even know that? PCI-ISA bridges in x86 at least don't > : > > have any > : > > I/O limit registers like PCI-PCI bridges, instead they are > : > > subtractively > : > > decoded, i.e. they "eat" any memory request that no one else claims. > : > > : > The key here being requests that reach the PCI-ISA bridge. It's entirely > : > platform specific which I/O memory addresses generated by the CPU gets > : > decoded and forwarded in such a way that it's visible to the PCI-ISA > : > bridge. This is what needs to be obtained from the parent in the newbus > : > hierarchy. Rather than hardcoding [0xC0000 .. 0x100000> as the ISA > : > option > : > ROM memory range, it should be something like [isa_mem_base+0xC0000 .. > : > isa_mem_base + 0x100000> or even [isa_rom_base .. isa_rom_base + > : > 0x40000>. > : > : That might certainly be a reasonable IVAR for isab(4) to provide to isa(4): a > : ROM base. However, orm(4) should be enabled for all ISA bridges assuming > : that is fixed. OTOH, the way many bus drivers I've seen handle this so far > : is to change the base address of SYS_RES_MEMORY objects as they pass through > : the relevant bridge so that the actual memory address is properly adjusted > : when it gets to the equivalent of the nexus. This is how many of the > : Foo->PCI bridges in arm that I've looked at work, and I think this is more > : inline with Warner's original patch which is to allow the various > : platform-specific ISA bridge drivers reject memory ranges they do not decode > : and provide any needed adjustments to ranges they do decode to transform them > : into suitable resources for their parent. Then orm(4) would just see it's > : attempts to do bus_alloc_resource() fail and end up DTRT. Given that, I do > : think this logic belongs in the ISA bridge drivers rather than in individual > : ISA drivers. We don't make ISA peripheral drivers add an 'isa_mem_base' or > : equivalent to their I/O resources, and in terms of I/O resources, orm(4) is > : just a special blackhole device (much like the ACPI or PnPBIOS system > : resource devices, or the ram0 or apic0 devices on x86). > > This is exactly what I've been trying to say: the memory addresses > that orm is using are ISA BUS addresses. These just happen to map 1:1 > on x86, but will map to something else on other platforms. But our > kernel API is that the driver requests the bus address, and that any > necessary translation happen in the bus_space layer. > > I disagree that it belongs entirely in the isa bridge drivers. They > may communicate information to the bus_space implementation, but it is > bus_space that ultimately does this translation. I think it actually depends on the platform as to where it belongs. If you have some Foo->ISA bridge that uses a window on the Foo bus to map ISA space, then I think it makes sense to handle that in the Foo->ISA bridge, especially if it is a relocatable window. If the ISA bus is instead assigned a fixed range in the system address space then that probably belongs in the bus_space support. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 14:18: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 BDC591065698; Thu, 15 Oct 2009 14:18: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 9258A8FC17; Thu, 15 Oct 2009 14:18:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FEIZ6n075762; Thu, 15 Oct 2009 14:18:35 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FEIZdo075760; Thu, 15 Oct 2009 14:18:35 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200910151418.n9FEIZdo075760@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 15 Oct 2009 14:18: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: r198132 - head/tools/tools/netrate/netsend X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 15 Oct 2009 14:18:35 -0000 Author: luigi Date: Thu Oct 15 14:18:35 2009 New Revision: 198132 URL: http://svn.freebsd.org/changeset/base/198132 Log: A small change to avoid calling gettimeofday() too often (hardwired to once every 20us at most). I found out that on many machines round here, i could only get 300-400kpps with netsend even on loopback and a 'deny' rule in the firewall, while reducing the number of calls to gettimeofday() brings the value to 900kpps and more. This code is just a quick fix for the problem. Of course it could be done better, with proper getopt() parsing and the like, but since this applies to the entire program i'll postpone that to when i have more time. Reviewed by: rwatson MFC after: 1 month Modified: head/tools/tools/netrate/netsend/netsend.c Modified: head/tools/tools/netrate/netsend/netsend.c ============================================================================== --- head/tools/tools/netrate/netsend/netsend.c Thu Oct 15 13:34:45 2009 (r198131) +++ head/tools/tools/netrate/netsend/netsend.c Thu Oct 15 14:18:35 2009 (r198132) @@ -124,6 +124,9 @@ timing_loop(int s, struct timespec inter u_int32_t counter; long finishtime; long send_errors, send_calls; + /* do not call gettimeofday more than every 20us */ + long minres_ns = 20000; + int ic, gettimeofday_cycles; if (clock_getres(CLOCK_REALTIME, &tmptime) == -1) { perror("clock_getres"); @@ -132,8 +135,15 @@ timing_loop(int s, struct timespec inter if (timespec_ge(&tmptime, &interval)) fprintf(stderr, - "warning: interval less than resolution (%jd.%09ld)\n", + "warning: interval (%jd.%09ld) less than resolution (%jd.%09ld)\n", + (intmax_t)interval.tv_sec, interval.tv_nsec, (intmax_t)tmptime.tv_sec, tmptime.tv_nsec); + if (tmptime.tv_nsec < minres_ns) { + gettimeofday_cycles = minres_ns/(tmptime.tv_nsec + 1); + fprintf(stderr, + "calling time every %d cycles\n", gettimeofday_cycles); + } else + gettimeofday_cycles = 0; if (clock_gettime(CLOCK_REALTIME, &starttime) == -1) { perror("clock_gettime"); @@ -151,10 +161,14 @@ timing_loop(int s, struct timespec inter send_errors = send_calls = 0; counter = 0; waited = 0; + ic = gettimeofday_cycles; while (1) { timespec_add(&nexttime, &interval); - if (wait_time(nexttime, &tmptime, &waited) == -1) - return (-1); + if (--ic <= 0) { + ic = gettimeofday_cycles; + if (wait_time(nexttime, &tmptime, &waited) == -1) + return (-1); + } /* * We maintain and, if there's room, send a counter. Note * that even if the error is purely local, we still increment @@ -236,8 +250,9 @@ main(int argc, char *argv[]) /* * Specify an arbitrary limit. It's exactly that, not selected by - .* any particular strategy. '0' is a special value meaning "blast", + * any particular strategy. '0' is a special value meaning "blast", * and avoids the cost of a timing loop. + * XXX 0 is not actually implemented. */ rate = strtoul(argv[4], &dummy, 10); if (rate < 1 || *dummy != '\0') From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 14:54: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 3177F1065672; Thu, 15 Oct 2009 14:54:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A8E68FC1B; Thu, 15 Oct 2009 14:54:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FEsaSJ076635; Thu, 15 Oct 2009 14:54:36 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FEsZCr076621; Thu, 15 Oct 2009 14:54:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910151454.n9FEsZCr076621@svn.freebsd.org> From: John Baldwin Date: Thu, 15 Oct 2009 14:54: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: r198134 - in head: share/man/man9 sys/amd64/amd64 sys/amd64/include sys/i386/i386 sys/i386/include sys/kern 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: Thu, 15 Oct 2009 14:54:36 -0000 Author: jhb Date: Thu Oct 15 14:54:35 2009 New Revision: 198134 URL: http://svn.freebsd.org/changeset/base/198134 Log: Add a facility for associating optional descriptions with active interrupt handlers. This is primarily intended as a way to allow devices that use multiple interrupts (e.g. MSI) to meaningfully distinguish the various interrupt handlers. - Add a new BUS_DESCRIBE_INTR() method to the bus interface to associate a description with an active interrupt handler setup by BUS_SETUP_INTR. It has a default method (bus_generic_describe_intr()) which simply passes the request up to the parent device. - Add a bus_describe_intr() wrapper around BUS_DESCRIBE_INTR() that supports printf(9) style formatting using var args. - Reserve MAXCOMLEN bytes in the intr_handler structure to hold the name of an interrupt handler and copy the name passed to intr_event_add_handler() into that buffer instead of just saving the pointer to the name. - Add a new intr_event_describe_handler() which appends a description string to an interrupt handler's name. - Implement support for interrupt descriptions on amd64 and i386 by having the nexus(4) driver supply a custom bus_describe_intr method that invokes a new intr_describe() MD routine which in turn looks up the associated interrupt event and invokes intr_event_describe_handler(). Requested by: many Reviewed by: scottl MFC after: 2 weeks Added: head/share/man/man9/BUS_DESCRIBE_INTR.9 (contents, props changed) Modified: head/share/man/man9/Makefile head/sys/amd64/amd64/intr_machdep.c head/sys/amd64/amd64/nexus.c head/sys/amd64/include/intr_machdep.h head/sys/i386/i386/intr_machdep.c head/sys/i386/i386/nexus.c head/sys/i386/include/intr_machdep.h head/sys/kern/bus_if.m head/sys/kern/kern_intr.c head/sys/kern/subr_bus.c head/sys/sys/bus.h head/sys/sys/interrupt.h Added: head/share/man/man9/BUS_DESCRIBE_INTR.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/BUS_DESCRIBE_INTR.9 Thu Oct 15 14:54:35 2009 (r198134) @@ -0,0 +1,104 @@ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Written by: John H. Baldwin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 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. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE 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 THE 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. +.\" +.\" $FreeBSD$ +.\" +.Dd October 14, 2009 +.Dt BUS_DESCRIBE_INTR 9 +.Os +.Sh NAME +.Nm BUS_DESCRIBE_INTR , +.Nm bus_describe_intr +.Nd "associate a description with an active interrupt handler" +.Sh SYNOPSIS +.In sys/param.h +.In sys/bus.h +.Ft int +.Fo BUS_BIND_INTR +.Fa "device_t dev" "device_t child" "struct resource *irq" "void *cookie" +.Fa "const char *descr" +.Fc +.Ft int +.Fo bus_describe_intr +.Fa "device_t dev" "struct resource *irq" "void *cookie" "const char *fmt" +.Fa ... +.Fc +.Sh DESCRIPTION +The +.Fn BUS_DESCRIBE_INTR +method associates a description with an active interrupt handler. +The +.Fa cookie +parameter must be the value returned by a successful call to +.Xr BUS_SETUP_INTR 9 +for the interrupt +.Fa irq . +.Pp +The +.Fn bus_describe_intr +function is a simple wrapper around +.Fn BUS_DESCRIBE_INTR . +As a convenience, +.Fn bus_describe_intr +allows the caller to use +.Xr printf 9 +style formatting to build the description string using +.Fa fmt . +.Pp +When an interrupt handler is established by +.Xr BUS_SETUP_INTR 9 , +the handler is named after the device the handler is established for. +This name is then used in various places such as interrupt statistics +displayed by +.Xr systat 1 +and +.Xr vmstat 8 . +For devices that use a single interrupt, +the device name is sufficiently unique to identify the interrupt handler. +However, for devices that use multiple interrupts it can be useful to +distinguish the interrupt handlers. +When a description is set for an active interrupt handler, +a colon followed by the description is appended to the device name to form +the interrupt handler name. +.Sh RETURN VALUES +Zero is returned on success, otherwise an appropriate error is returned. +.Sh SEE ALSO +.Xr BUS_SETUP_INTR 9 , +.Xr device 9 , +.Xr printf 9 , +.Xr systat 1 , +.Xr vmstat 8 +.Sh HISTORY +The +.Fn BUS_DESCRIBE_INTR +method and +.Fn bus_describe_intr +functions first appeared in +.Fx 9.0 . +.Sh BUGS +It is not currently possible to remove a description from an active interrupt +handler. Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Oct 15 14:39:59 2009 (r198133) +++ head/share/man/man9/Makefile Thu Oct 15 14:54:35 2009 (r198134) @@ -26,6 +26,7 @@ MAN= accept_filter.9 \ BUS_BIND_INTR.9 \ bus_child_present.9 \ BUS_CONFIG_INTR.9 \ + BUS_DESCRIBE_INTR.9 \ bus_dma.9 \ bus_generic_attach.9 \ bus_generic_detach.9 \ @@ -405,6 +406,7 @@ MLINKS+=buf.9 bp.9 MLINKS+=bus_activate_resource.9 bus_deactivate_resource.9 MLINKS+=bus_alloc_resource.9 bus_alloc_resource_any.9 MLINKS+=BUS_BIND_INTR.9 bus_bind_intr.9 +MLINKS+=BUS_DESCRIBE_INTR.9 bus_describe_intr.9 MLINKS+=bus_dma.9 busdma.9 \ bus_dma.9 bus_dmamap_create.9 \ bus_dma.9 bus_dmamap_destroy.9 \ Modified: head/sys/amd64/amd64/intr_machdep.c ============================================================================== --- head/sys/amd64/amd64/intr_machdep.c Thu Oct 15 14:39:59 2009 (r198133) +++ head/sys/amd64/amd64/intr_machdep.c Thu Oct 15 14:54:35 2009 (r198134) @@ -466,6 +466,23 @@ intr_bind(u_int vector, u_char cpu) return (intr_event_bind(isrc->is_event, cpu)); } +/* Add a description to an active interrupt handler. */ +int +intr_describe(u_int vector, void *ih, const char *descr) +{ + struct intsrc *isrc; + int error; + + isrc = intr_lookup_source(vector); + if (isrc == NULL) + return (EINVAL); + error = intr_event_describe_handler(isrc->is_event, ih, descr); + if (error) + return (error); + intrcnt_updatename(isrc); + return (0); +} + /* * Add a CPU to our mask of valid CPUs that can be destinations of * interrupts. Modified: head/sys/amd64/amd64/nexus.c ============================================================================== --- head/sys/amd64/amd64/nexus.c Thu Oct 15 14:39:59 2009 (r198133) +++ head/sys/amd64/amd64/nexus.c Thu Oct 15 14:54:35 2009 (r198134) @@ -92,6 +92,9 @@ static int nexus_bind_intr(device_t, dev #endif static int nexus_config_intr(device_t, int, enum intr_trigger, enum intr_polarity); +static int nexus_describe_intr(device_t dev, device_t child, + struct resource *irq, void *cookie, + const char *descr); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static int nexus_deactivate_resource(device_t, device_t, int, int, @@ -135,6 +138,7 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_describe_intr, nexus_describe_intr), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), DEVMETHOD(bus_set_resource, nexus_set_resource), DEVMETHOD(bus_get_resource, nexus_get_resource), @@ -479,6 +483,14 @@ nexus_config_intr(device_t dev, int irq, return (intr_config_intr(irq, trig, pol)); } +static int +nexus_describe_intr(device_t dev, device_t child, struct resource *irq, + void *cookie, const char *descr) +{ + + return (intr_describe(rman_get_start(irq), cookie, descr)); +} + static struct resource_list * nexus_get_reslist(device_t dev, device_t child) { Modified: head/sys/amd64/include/intr_machdep.h ============================================================================== --- head/sys/amd64/include/intr_machdep.h Thu Oct 15 14:39:59 2009 (r198133) +++ head/sys/amd64/include/intr_machdep.h Thu Oct 15 14:54:35 2009 (r198134) @@ -151,6 +151,7 @@ int intr_bind(u_int vector, u_char cpu); #endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); +int intr_describe(u_int vector, void *ih, const char *descr); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); u_int intr_next_cpu(void); struct intsrc *intr_lookup_source(int vector); Modified: head/sys/i386/i386/intr_machdep.c ============================================================================== --- head/sys/i386/i386/intr_machdep.c Thu Oct 15 14:39:59 2009 (r198133) +++ head/sys/i386/i386/intr_machdep.c Thu Oct 15 14:54:35 2009 (r198134) @@ -432,6 +432,23 @@ intr_bind(u_int vector, u_char cpu) return (intr_event_bind(isrc->is_event, cpu)); } +/* Add a description to an active interrupt handler. */ +int +intr_describe(u_int vector, void *ih, const char *descr) +{ + struct intsrc *isrc; + int error; + + isrc = intr_lookup_source(vector); + if (isrc == NULL) + return (EINVAL); + error = intr_event_describe_handler(isrc->is_event, ih, descr); + if (error) + return (error); + intrcnt_updatename(isrc); + return (0); +} + /* * Add a CPU to our mask of valid CPUs that can be destinations of * interrupts. Modified: head/sys/i386/i386/nexus.c ============================================================================== --- head/sys/i386/i386/nexus.c Thu Oct 15 14:39:59 2009 (r198133) +++ head/sys/i386/i386/nexus.c Thu Oct 15 14:54:35 2009 (r198134) @@ -96,6 +96,9 @@ static int nexus_bind_intr(device_t, dev #endif static int nexus_config_intr(device_t, int, enum intr_trigger, enum intr_polarity); +static int nexus_describe_intr(device_t dev, device_t child, + struct resource *irq, void *cookie, + const char *descr); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static int nexus_deactivate_resource(device_t, device_t, int, int, @@ -141,6 +144,7 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_describe_intr, nexus_describe_intr), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), DEVMETHOD(bus_set_resource, nexus_set_resource), DEVMETHOD(bus_get_resource, nexus_get_resource), @@ -526,6 +530,14 @@ nexus_config_intr(device_t dev, int irq, return (intr_config_intr(irq, trig, pol)); } +static int +nexus_describe_intr(device_t dev, device_t child, struct resource *irq, + void *cookie, const char *descr) +{ + + return (intr_describe(rman_get_start(irq), cookie, descr)); +} + static struct resource_list * nexus_get_reslist(device_t dev, device_t child) { Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Thu Oct 15 14:39:59 2009 (r198133) +++ head/sys/i386/include/intr_machdep.h Thu Oct 15 14:54:35 2009 (r198134) @@ -138,6 +138,7 @@ int intr_bind(u_int vector, u_char cpu); #endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); +int intr_describe(u_int vector, void *ih, const char *descr); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); u_int intr_next_cpu(void); struct intsrc *intr_lookup_source(int vector); Modified: head/sys/kern/bus_if.m ============================================================================== --- head/sys/kern/bus_if.m Thu Oct 15 14:39:59 2009 (r198133) +++ head/sys/kern/bus_if.m Thu Oct 15 14:54:35 2009 (r198134) @@ -509,7 +509,6 @@ METHOD int bind_intr { int _cpu; } DEFAULT bus_generic_bind_intr; - /** * @brief Allow (bus) drivers to specify the trigger mode and polarity * of the specified interrupt. @@ -527,6 +526,25 @@ METHOD int config_intr { } DEFAULT bus_generic_config_intr; /** + * @brief Allow drivers to associate a description with an active + * interrupt handler. + * + * @param _dev the parent device of @p _child + * @param _child the device which allocated the resource + * @param _irq the resource representing the interrupt + * @param _cookie the cookie value returned when the interrupt + * was originally registered + * @param _descr the description to associate with the interrupt + */ +METHOD int describe_intr { + device_t _dev; + device_t _child; + struct resource *_irq; + void *_cookie; + const char *_descr; +} DEFAULT bus_generic_describe_intr; + +/** * @brief Notify a (bus) driver about a child that the hints mechanism * believes it has discovered. * Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Thu Oct 15 14:39:59 2009 (r198133) +++ head/sys/kern/kern_intr.c Thu Oct 15 14:54:35 2009 (r198134) @@ -524,7 +524,7 @@ intr_event_add_handler(struct intr_event ih->ih_filter = filter; ih->ih_handler = handler; ih->ih_argument = arg; - ih->ih_name = name; + strlcpy(ih->ih_name, name, sizeof(ih->ih_name)); ih->ih_event = ie; ih->ih_pri = pri; if (flags & INTR_EXCL) @@ -597,7 +597,7 @@ intr_event_add_handler(struct intr_event ih->ih_filter = filter; ih->ih_handler = handler; ih->ih_argument = arg; - ih->ih_name = name; + strlcpy(ih->ih_name, name, sizeof(ih->ih_name)); ih->ih_event = ie; ih->ih_pri = pri; if (flags & INTR_EXCL) @@ -665,6 +665,61 @@ intr_event_add_handler(struct intr_event #endif /* + * Append a description preceded by a ':' to the name of the specified + * interrupt handler. + */ +int +intr_event_describe_handler(struct intr_event *ie, void *cookie, + const char *descr) +{ + struct intr_handler *ih; + size_t space; + char *start; + + mtx_lock(&ie->ie_lock); +#ifdef INVARIANTS + TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) { + if (ih == cookie) + break; + } + if (ih == NULL) { + mtx_unlock(&ie->ie_lock); + panic("handler %p not find in interrupt event %p", cookie, ie); + } +#endif + ih = cookie; + + /* + * Look for an existing description by checking for an + * existing ":". This assumes device names do not include + * colons. If one is found, prepare to insert the new + * description at that point. If one is not found, find the + * end of the name to use as the insertion point. + */ + start = index(ih->ih_name, ':'); + if (start == NULL) + start = index(ih->ih_name, 0); + + /* + * See if there is enough remaining room in the string for the + * description + ":". The "- 1" leaves room for the trailing + * '\0'. The "+ 1" accounts for the colon. + */ + space = sizeof(ih->ih_name) - (start - ih->ih_name) - 1; + if (strlen(descr) + 1 > space) { + mtx_unlock(&ie->ie_lock); + return (ENOSPC); + } + + /* Append a colon followed by the description. */ + *start = ':'; + strcpy(start + 1, descr); + intr_event_update(ie); + mtx_unlock(&ie->ie_lock); + return (0); +} + +/* * Return the ie_source field from the intr_event an intr_handler is * associated with. */ Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Thu Oct 15 14:39:59 2009 (r198133) +++ head/sys/kern/subr_bus.c Thu Oct 15 14:54:35 2009 (r198134) @@ -3520,6 +3520,24 @@ bus_generic_config_intr(device_t dev, in } /** + * @brief Helper function for implementing BUS_DESCRIBE_INTR(). + * + * This simple implementation of BUS_DESCRIBE_INTR() simply calls the + * BUS_DESCRIBE_INTR() method of the parent of @p dev. + */ +int +bus_generic_describe_intr(device_t dev, device_t child, struct resource *irq, + void *cookie, const char *descr) +{ + + /* Propagate up the bus hierarchy until someone handles it. */ + if (dev->parent) + return (BUS_DESCRIBE_INTR(dev->parent, child, irq, cookie, + descr)); + return (EINVAL); +} + +/** * @brief Helper function for implementing BUS_GET_DMA_TAG(). * * This simple implementation of BUS_GET_DMA_TAG() simply calls the @@ -3824,6 +3842,28 @@ bus_bind_intr(device_t dev, struct resou } /** + * @brief Wrapper function for BUS_DESCRIBE_INTR(). + * + * This function first formats the requested description into a + * temporary buffer and then calls the BUS_DESCRIBE_INTR() method of + * the parent of @p dev. + */ +int +bus_describe_intr(device_t dev, struct resource *irq, void *cookie, + const char *fmt, ...) +{ + char descr[MAXCOMLEN]; + va_list ap; + + if (dev->parent == NULL) + return (EINVAL); + va_start(ap, fmt); + vsnprintf(descr, sizeof(descr), fmt, ap); + va_end(ap); + return (BUS_DESCRIBE_INTR(dev->parent, dev, irq, cookie, descr)); +} + +/** * @brief Wrapper function for BUS_SET_RESOURCE(). * * This function simply calls the BUS_SET_RESOURCE() method of the Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Thu Oct 15 14:39:59 2009 (r198133) +++ head/sys/sys/bus.h Thu Oct 15 14:54:35 2009 (r198134) @@ -292,6 +292,9 @@ int bus_generic_bind_intr(device_t dev, int bus_generic_child_present(device_t dev, device_t child); int bus_generic_config_intr(device_t, int, enum intr_trigger, enum intr_polarity); +int bus_generic_describe_intr(device_t dev, device_t child, + struct resource *irq, void *cookie, + const char *descr); int bus_generic_deactivate_resource(device_t dev, device_t child, int type, int rid, struct resource *r); int bus_generic_detach(device_t dev); @@ -363,6 +366,8 @@ int bus_setup_intr(device_t dev, struct void *arg, void **cookiep); int bus_teardown_intr(device_t dev, struct resource *r, void *cookie); int bus_bind_intr(device_t dev, struct resource *r, int cpu); +int bus_describe_intr(device_t dev, struct resource *irq, void *cookie, + const char *fmt, ...); int bus_set_resource(device_t dev, int type, int rid, u_long start, u_long count); int bus_get_resource(device_t dev, int type, int rid, Modified: head/sys/sys/interrupt.h ============================================================================== --- head/sys/sys/interrupt.h Thu Oct 15 14:39:59 2009 (r198133) +++ head/sys/sys/interrupt.h Thu Oct 15 14:54:35 2009 (r198134) @@ -47,7 +47,7 @@ struct intr_handler { driver_intr_t *ih_handler; /* Threaded handler function. */ void *ih_argument; /* Argument to pass to handlers. */ int ih_flags; - const char *ih_name; /* Name of handler. */ + char ih_name[MAXCOMLEN]; /* Name of handler. */ struct intr_event *ih_event; /* Event we are connected to. */ int ih_need; /* Needs service. */ TAILQ_ENTRY(intr_handler) ih_next; /* Next handler for this event. */ @@ -172,6 +172,8 @@ int intr_event_destroy(struct intr_event void intr_event_execute_handlers(struct proc *p, struct intr_event *ie); int intr_event_handle(struct intr_event *ie, struct trapframe *frame); int intr_event_remove_handler(void *cookie); +int intr_event_describe_handler(struct intr_event *ie, void *cookie, + const char *descr); int intr_getaffinity(int irq, void *mask); void *intr_handler_source(void *cookie); int intr_setaffinity(int irq, void *mask); From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 14:55: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 24DC71065696; Thu, 15 Oct 2009 14:55:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1405B8FC2A; Thu, 15 Oct 2009 14:55:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FEtBgB076699; Thu, 15 Oct 2009 14:55:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FEtBbD076697; Thu, 15 Oct 2009 14:55:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910151455.n9FEtBbD076697@svn.freebsd.org> From: John Baldwin Date: Thu, 15 Oct 2009 14:55: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: r198135 - 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: Thu, 15 Oct 2009 14:55:12 -0000 Author: jhb Date: Thu Oct 15 14:55:11 2009 New Revision: 198135 URL: http://svn.freebsd.org/changeset/base/198135 Log: Style fixes to the function prototypes for bus_alloc_resources() and bus_release_resources(). Modified: head/sys/sys/bus.h Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Thu Oct 15 14:54:35 2009 (r198134) +++ head/sys/sys/bus.h Thu Oct 15 14:55:11 2009 (r198135) @@ -347,8 +347,10 @@ struct resource_spec { int flags; }; -int bus_alloc_resources(device_t dev, struct resource_spec *rs, struct resource **res); -void bus_release_resources(device_t dev, const struct resource_spec *rs, struct resource **res); +int bus_alloc_resources(device_t dev, struct resource_spec *rs, + struct resource **res); +void bus_release_resources(device_t dev, const struct resource_spec *rs, + struct resource **res); struct resource *bus_alloc_resource(device_t dev, int type, int *rid, u_long start, u_long end, u_long count, From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 15:01: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 D8DC91065676; Thu, 15 Oct 2009 15:01:19 +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 82ECD8FC17; Thu, 15 Oct 2009 15:01:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n9FEwubW040901; Thu, 15 Oct 2009 08:58:56 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 15 Oct 2009 08:59:10 -0600 (MDT) Message-Id: <20091015.085910.-520412456.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <200910150833.54252.jhb@freebsd.org> References: <200910141738.43910.jhb@freebsd.org> <20091014.161115.-1796258170.imp@bsdimp.com> <200910150833.54252.jhb@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, xcllnt@mac.com, src-committers@freebsd.org Subject: Re: svn commit: r197969 - 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: Thu, 15 Oct 2009 15:01:20 -0000 In message: <200910150833.54252.jhb@freebsd.org> John Baldwin writes: : On Wednesday 14 October 2009 6:11:15 pm M. Warner Losh wrote: : > In message: <200910141738.43910.jhb@freebsd.org> : > John Baldwin writes: : > : On Wednesday 14 October 2009 5:20:38 pm Marcel Moolenaar wrote: : > : > : > : > On Oct 14, 2009, at 1:45 PM, John Baldwin wrote: : > : > : > : > > On Wednesday 14 October 2009 2:35:16 pm Marcel Moolenaar wrote: : > : > >> On Oct 14, 2009, at 10:39 AM, Warner Losh wrote: : > : > >>> : > : > >>> I can't be more clear than this. You keep ignoring me, and it is : > : > >>> very : > : > >>> frustrating. : > : > >> : > : > >> I'm not ignoring you. I'm still talking. You simply haven't convinced : > : > >> me. While it's possible (likely?) that I don't understand the issues, : > : > >> all you've achieved so far is that I'm more convinced that limiting : > : > >> orm(4) to i386 and amd64 is the right thing, because the alternative : > : > >> is not at all appealing. : > : > >> : > : > >>> The problem is that the : > : > >>> powerpc and itanium isa modules allow memory ranges that shouldn't : > : > >>> be : > : > >>> allowed. That's the platform specific code that needs to be fixed. : > : > >> : > : > >> isa_set_resource() is MI code and it happily adds whatever resources : > : > >> a driver wants. The only chance MD code has is to fail the : > : > >> allocation, : > : > >> but since the whole ISA code bypasses the newbus hierarchy, there's : > : > >> no way we know in the isa MD code what is valid and what isn't unless : > : > >> we add kluges to platform code. : > : > >> : > : > >> If you want to fix it for real, does that mean fix it for real or : > : > >> does that mean add kluges to platform code? : > : > >> : > : > >> Shouldn't we have ISA bridges obtain the set of valid resources : > : > >> from their parent in the newbus hierarchy? : > : > > : > : > > Hmm, can we even know that? PCI-ISA bridges in x86 at least don't : > : > > have any : > : > > I/O limit registers like PCI-PCI bridges, instead they are : > : > > subtractively : > : > > decoded, i.e. they "eat" any memory request that no one else claims. : > : > : > : > The key here being requests that reach the PCI-ISA bridge. It's entirely : > : > platform specific which I/O memory addresses generated by the CPU gets : > : > decoded and forwarded in such a way that it's visible to the PCI-ISA : > : > bridge. This is what needs to be obtained from the parent in the newbus : > : > hierarchy. Rather than hardcoding [0xC0000 .. 0x100000> as the ISA : > : > option : > : > ROM memory range, it should be something like [isa_mem_base+0xC0000 .. : > : > isa_mem_base + 0x100000> or even [isa_rom_base .. isa_rom_base + : > : > 0x40000>. : > : : > : That might certainly be a reasonable IVAR for isab(4) to provide to isa(4): a : > : ROM base. However, orm(4) should be enabled for all ISA bridges assuming : > : that is fixed. OTOH, the way many bus drivers I've seen handle this so far : > : is to change the base address of SYS_RES_MEMORY objects as they pass through : > : the relevant bridge so that the actual memory address is properly adjusted : > : when it gets to the equivalent of the nexus. This is how many of the : > : Foo->PCI bridges in arm that I've looked at work, and I think this is more : > : inline with Warner's original patch which is to allow the various : > : platform-specific ISA bridge drivers reject memory ranges they do not decode : > : and provide any needed adjustments to ranges they do decode to transform them : > : into suitable resources for their parent. Then orm(4) would just see it's : > : attempts to do bus_alloc_resource() fail and end up DTRT. Given that, I do : > : think this logic belongs in the ISA bridge drivers rather than in individual : > : ISA drivers. We don't make ISA peripheral drivers add an 'isa_mem_base' or : > : equivalent to their I/O resources, and in terms of I/O resources, orm(4) is : > : just a special blackhole device (much like the ACPI or PnPBIOS system : > : resource devices, or the ram0 or apic0 devices on x86). : > : > This is exactly what I've been trying to say: the memory addresses : > that orm is using are ISA BUS addresses. These just happen to map 1:1 : > on x86, but will map to something else on other platforms. But our : > kernel API is that the driver requests the bus address, and that any : > necessary translation happen in the bus_space layer. : > : > I disagree that it belongs entirely in the isa bridge drivers. They : > may communicate information to the bus_space implementation, but it is : > bus_space that ultimately does this translation. : : I think it actually depends on the platform as to where it belongs. If you : have some Foo->ISA bridge that uses a window on the Foo bus to map ISA space, : then I think it makes sense to handle that in the Foo->ISA bridge, especially : if it is a relocatable window. If the ISA bus is instead assigned a fixed : range in the system address space then that probably belongs in the bus_space : support. I'd think it would be the opposite. bus_space needs to know how to map the request, since it is the last one involved. If this is mappable or movable, then it needs to know that too. However, adjusting the resources that you give to a child on the way through the bridge is just assisting bus_space doing the right thing if the bus_space on that architecture just implements one or two global spaces. Warner From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 15:18: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 3709F106566C; Thu, 15 Oct 2009 15:18:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E6FA08FC13; Thu, 15 Oct 2009 15:18:57 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 7332446B03; Thu, 15 Oct 2009 11:18:57 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id A59E58A01B; Thu, 15 Oct 2009 11:18:56 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" Date: Thu, 15 Oct 2009 11:18:49 -0400 User-Agent: KMail/1.9.7 References: <200910141738.43910.jhb@freebsd.org> <200910150833.54252.jhb@freebsd.org> <20091015.085910.-520412456.imp@bsdimp.com> In-Reply-To: <20091015.085910.-520412456.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910151118.50619.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 15 Oct 2009 11:18:56 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, xcllnt@mac.com, src-committers@freebsd.org Subject: Re: svn commit: r197969 - 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: Thu, 15 Oct 2009 15:18:58 -0000 On Thursday 15 October 2009 10:59:10 am M. Warner Losh wrote: > In message: <200910150833.54252.jhb@freebsd.org> > John Baldwin writes: > : On Wednesday 14 October 2009 6:11:15 pm M. Warner Losh wrote: > : > In message: <200910141738.43910.jhb@freebsd.org> > : > John Baldwin writes: > : > : On Wednesday 14 October 2009 5:20:38 pm Marcel Moolenaar wrote: > : > : > > : > : > On Oct 14, 2009, at 1:45 PM, John Baldwin wrote: > : > : > > : > : > > On Wednesday 14 October 2009 2:35:16 pm Marcel Moolenaar wrote: > : > : > >> On Oct 14, 2009, at 10:39 AM, Warner Losh wrote: > : > : > >>> > : > : > >>> I can't be more clear than this. You keep ignoring me, and it is > : > : > >>> very > : > : > >>> frustrating. > : > : > >> > : > : > >> I'm not ignoring you. I'm still talking. You simply haven't convinced > : > : > >> me. While it's possible (likely?) that I don't understand the issues, > : > : > >> all you've achieved so far is that I'm more convinced that limiting > : > : > >> orm(4) to i386 and amd64 is the right thing, because the alternative > : > : > >> is not at all appealing. > : > : > >> > : > : > >>> The problem is that the > : > : > >>> powerpc and itanium isa modules allow memory ranges that shouldn't > : > : > >>> be > : > : > >>> allowed. That's the platform specific code that needs to be fixed. > : > : > >> > : > : > >> isa_set_resource() is MI code and it happily adds whatever resources > : > : > >> a driver wants. The only chance MD code has is to fail the > : > : > >> allocation, > : > : > >> but since the whole ISA code bypasses the newbus hierarchy, there's > : > : > >> no way we know in the isa MD code what is valid and what isn't unless > : > : > >> we add kluges to platform code. > : > : > >> > : > : > >> If you want to fix it for real, does that mean fix it for real or > : > : > >> does that mean add kluges to platform code? > : > : > >> > : > : > >> Shouldn't we have ISA bridges obtain the set of valid resources > : > : > >> from their parent in the newbus hierarchy? > : > : > > > : > : > > Hmm, can we even know that? PCI-ISA bridges in x86 at least don't > : > : > > have any > : > : > > I/O limit registers like PCI-PCI bridges, instead they are > : > : > > subtractively > : > : > > decoded, i.e. they "eat" any memory request that no one else claims. > : > : > > : > : > The key here being requests that reach the PCI-ISA bridge. It's entirely > : > : > platform specific which I/O memory addresses generated by the CPU gets > : > : > decoded and forwarded in such a way that it's visible to the PCI-ISA > : > : > bridge. This is what needs to be obtained from the parent in the newbus > : > : > hierarchy. Rather than hardcoding [0xC0000 .. 0x100000> as the ISA > : > : > option > : > : > ROM memory range, it should be something like [isa_mem_base+0xC0000 .. > : > : > isa_mem_base + 0x100000> or even [isa_rom_base .. isa_rom_base + > : > : > 0x40000>. > : > : > : > : That might certainly be a reasonable IVAR for isab(4) to provide to isa(4): a > : > : ROM base. However, orm(4) should be enabled for all ISA bridges assuming > : > : that is fixed. OTOH, the way many bus drivers I've seen handle this so far > : > : is to change the base address of SYS_RES_MEMORY objects as they pass through > : > : the relevant bridge so that the actual memory address is properly adjusted > : > : when it gets to the equivalent of the nexus. This is how many of the > : > : Foo->PCI bridges in arm that I've looked at work, and I think this is more > : > : inline with Warner's original patch which is to allow the various > : > : platform-specific ISA bridge drivers reject memory ranges they do not decode > : > : and provide any needed adjustments to ranges they do decode to transform them > : > : into suitable resources for their parent. Then orm(4) would just see it's > : > : attempts to do bus_alloc_resource() fail and end up DTRT. Given that, I do > : > : think this logic belongs in the ISA bridge drivers rather than in individual > : > : ISA drivers. We don't make ISA peripheral drivers add an 'isa_mem_base' or > : > : equivalent to their I/O resources, and in terms of I/O resources, orm(4) is > : > : just a special blackhole device (much like the ACPI or PnPBIOS system > : > : resource devices, or the ram0 or apic0 devices on x86). > : > > : > This is exactly what I've been trying to say: the memory addresses > : > that orm is using are ISA BUS addresses. These just happen to map 1:1 > : > on x86, but will map to something else on other platforms. But our > : > kernel API is that the driver requests the bus address, and that any > : > necessary translation happen in the bus_space layer. > : > > : > I disagree that it belongs entirely in the isa bridge drivers. They > : > may communicate information to the bus_space implementation, but it is > : > bus_space that ultimately does this translation. > : > : I think it actually depends on the platform as to where it belongs. If you > : have some Foo->ISA bridge that uses a window on the Foo bus to map ISA space, > : then I think it makes sense to handle that in the Foo->ISA bridge, especially > : if it is a relocatable window. If the ISA bus is instead assigned a fixed > : range in the system address space then that probably belongs in the bus_space > : support. > > I'd think it would be the opposite. bus_space needs to know how to > map the request, since it is the last one involved. If this is > mappable or movable, then it needs to know that too. It depends I think. If the Foo bus just maps a Foo memory resource and then sub-allocates that to satisfy ISA ranges then from bus_space's perspective it is just working with Foo resources. It would never know about ISA nor would it need to know. > However, adjusting the resources that you give to a child on the way > through the bridge is just assisting bus_space doing the right thing > if the bus_space on that architecture just implements one or two > global spaces. I think we are mostly agreeing actually. My main statement is that how ISA memory resources are actually mapped, etc. is platform-dependent but that different platforms may implement that support using different means. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 15:30: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 749881065676; Thu, 15 Oct 2009 15:30:41 +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 61D078FC1C; Thu, 15 Oct 2009 15:30:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FFUfE7077371; Thu, 15 Oct 2009 15:30:41 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FFUfxI077369; Thu, 15 Oct 2009 15:30:41 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200910151530.n9FFUfxI077369@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 15 Oct 2009 15:30: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: r198136 - head/tools/tools/netrate/netsend X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 15 Oct 2009 15:30:41 -0000 Author: luigi Date: Thu Oct 15 15:30:41 2009 New Revision: 198136 URL: http://svn.freebsd.org/changeset/base/198136 Log: Support the specification of a range of destination ports e.g. netsend 127.0.0.1 6666-7777 [payloadsize] [packet_rate] [duration] This is useful to test the behaviour of systems that do some kind of flow classifications and so exhibit different behaviour depending on the number of flows that hit them. I plan to add a similar extension to sweep on a range of IP addresses, so we can issue a single command to flood (obviously, for testing purposes!) a number of different destinations. When there is only one destination, we do a preliminary connect() of the socket so we can use send() instead of sendto(). When we have multiple ports, the socket is not connect()'ed and we do a sendto() instead. There is a performance hit in this case, as the throughput on the loopback interface (with a firewall rule that blocks the transmission) goes down from 900kpps to 490kpps on my test machine. If the number of different destinations is limited, one option to explore is to have multiple connect()ed sockets. MFC after: 1 month Modified: head/tools/tools/netrate/netsend/netsend.c Modified: head/tools/tools/netrate/netsend/netsend.c ============================================================================== --- head/tools/tools/netrate/netsend/netsend.c Thu Oct 15 14:55:11 2009 (r198135) +++ head/tools/tools/netrate/netsend/netsend.c Thu Oct 15 15:30:41 2009 (r198136) @@ -39,12 +39,23 @@ #include #include +/* program arguments */ +struct _a { + int s; + struct timespec interval; + int port, port_max; + long duration; + struct sockaddr_in sin; + int packet_len; + void *packet; +}; + static void usage(void) { fprintf(stderr, - "netsend [ip] [port] [payloadsize] [rate] [duration]\n"); + "netsend [ip] [port[-port_max]] [payloadsize] [packet_rate] [duration]\n"); exit(-1); } @@ -114,10 +125,12 @@ wait_time(struct timespec ts, struct tim * Calculate a second-aligned starting time for the packet stream. Busy * wait between our calculated interval and dropping the provided packet * into the socket. If we hit our duration limit, bail. + * We sweep the ports from a->port to a->port_max included. + * If the two ports are the same we connect() the socket upfront, which + * almost halves the cost of the sendto() call. */ static int -timing_loop(int s, struct timespec interval, long duration, u_char *packet, - u_int packet_len) +timing_loop(struct _a *a) { struct timespec nexttime, starttime, tmptime; long long waited; @@ -127,18 +140,19 @@ timing_loop(int s, struct timespec inter /* do not call gettimeofday more than every 20us */ long minres_ns = 20000; int ic, gettimeofday_cycles; + int cur_port; if (clock_getres(CLOCK_REALTIME, &tmptime) == -1) { perror("clock_getres"); return (-1); } - if (timespec_ge(&tmptime, &interval)) + if (timespec_ge(&tmptime, &a->interval)) fprintf(stderr, "warning: interval (%jd.%09ld) less than resolution (%jd.%09ld)\n", - (intmax_t)interval.tv_sec, interval.tv_nsec, + (intmax_t)a->interval.tv_sec, a->interval.tv_nsec, (intmax_t)tmptime.tv_sec, tmptime.tv_nsec); - if (tmptime.tv_nsec < minres_ns) { + if (a->interval.tv_nsec < minres_ns) { gettimeofday_cycles = minres_ns/(tmptime.tv_nsec + 1); fprintf(stderr, "calling time every %d cycles\n", gettimeofday_cycles); @@ -156,14 +170,23 @@ timing_loop(int s, struct timespec inter if (wait_time(starttime, NULL, NULL) == -1) return (-1); nexttime = starttime; - finishtime = starttime.tv_sec + duration; + finishtime = starttime.tv_sec + a->duration; send_errors = send_calls = 0; counter = 0; waited = 0; ic = gettimeofday_cycles; + cur_port = a->port; + if (a->port == a->port_max) { + if (connect(a->s, (struct sockaddr *)&a->sin, sizeof(a->sin))) { + perror("connect"); + return (-1); + } + } while (1) { - timespec_add(&nexttime, &interval); + int ret; + + timespec_add(&nexttime, &a->interval); if (--ic <= 0) { ic = gettimeofday_cycles; if (wait_time(nexttime, &tmptime, &waited) == -1) @@ -178,17 +201,28 @@ timing_loop(int s, struct timespec inter * previous send, the error will turn up the current send * operation, causing the current sequence number also to be * skipped. + * The counter is incremented only on the initial port number, + * so all destinations will see the same set of packets. * * XXXRW: Note alignment assumption. */ - if (packet_len >= 4) { - *((u_int32_t *)packet) = htonl(counter); + if (cur_port == a->port && a->packet_len >= 4) { + *((u_int32_t *)a->packet) = htonl(counter); counter++; } - if (send(s, packet, packet_len, 0) < 0) + if (a->port == a->port_max) { /* socket already bound */ + ret = send(a->s, a->packet, a->packet_len, 0); + } else { + a->sin.sin_port = htons(cur_port++); + if (cur_port > a->port_max) + cur_port = a->port; + ret = sendto(a->s, a->packet, a->packet_len, 0, + (struct sockaddr *)&a->sin, sizeof(a->sin)); + } + if (ret < 0) send_errors++; send_calls++; - if (duration != 0 && tmptime.tv_sec >= finishtime) + if (a->duration != 0 && tmptime.tv_sec >= finishtime) goto done; } @@ -205,11 +239,11 @@ done: tmptime.tv_nsec); printf("send calls: %ld\n", send_calls); printf("send errors: %ld\n", send_errors); - printf("approx send rate: %ld\n", (send_calls - send_errors) / - duration); + printf("approx send rate: %ld pps\n", (send_calls - send_errors) / + a->duration); printf("approx error rate: %ld\n", (send_errors / send_calls)); printf("waited: %lld\n", waited); - printf("approx waits/sec: %lld\n", (long long)(waited / duration)); + printf("approx waits/sec: %lld\n", (long long)(waited / a->duration)); printf("approx wait rate: %lld\n", (long long)(waited / send_calls)); return (0); @@ -218,27 +252,35 @@ done: int main(int argc, char *argv[]) { - long rate, payloadsize, port, duration; - struct timespec interval; - struct sockaddr_in sin; - char *dummy, *packet; - int s; + long rate, payloadsize, port; + char *dummy; + struct _a a; /* arguments */ + + bzero(&a, sizeof(a)); if (argc != 6) usage(); - bzero(&sin, sizeof(sin)); - sin.sin_len = sizeof(sin); - sin.sin_family = AF_INET; - if (inet_aton(argv[1], &sin.sin_addr) == 0) { + a.sin.sin_len = sizeof(a.sin); + a.sin.sin_family = AF_INET; + if (inet_aton(argv[1], &a.sin.sin_addr) == 0) { perror(argv[1]); return (-1); } port = strtoul(argv[2], &dummy, 10); - if (port < 1 || port > 65535 || *dummy != '\0') + if (port < 1 || port > 65535) usage(); - sin.sin_port = htons(port); + if (*dummy != '\0' && *dummy != '-') + usage(); + a.sin.sin_port = htons(port); + a.port = a.port_max = port; + if (*dummy == '-') { /* set high port */ + port = strtoul(dummy + 1, &dummy, 10); + if (port < a.port || port > 65535) + usage(); + a.port_max = port; + } payloadsize = strtoul(argv[3], &dummy, 10); if (payloadsize < 0 || *dummy != '\0') @@ -247,56 +289,51 @@ main(int argc, char *argv[]) fprintf(stderr, "payloadsize > 32768\n"); return (-1); } + a.packet_len = payloadsize; /* * Specify an arbitrary limit. It's exactly that, not selected by * any particular strategy. '0' is a special value meaning "blast", * and avoids the cost of a timing loop. - * XXX 0 is not actually implemented. */ rate = strtoul(argv[4], &dummy, 10); - if (rate < 1 || *dummy != '\0') + if (rate < 0 || *dummy != '\0') usage(); if (rate > MAX_RATE) { - fprintf(stderr, "rate > %d\n", MAX_RATE); + fprintf(stderr, "packet rate at most %d\n", MAX_RATE); return (-1); } - duration = strtoul(argv[5], &dummy, 10); - if (duration < 0 || *dummy != '\0') + a.duration = strtoul(argv[5], &dummy, 10); + if (a.duration < 0 || *dummy != '\0') usage(); - packet = malloc(payloadsize); - if (packet == NULL) { + a.packet = malloc(payloadsize); + if (a.packet == NULL) { perror("malloc"); return (-1); } - bzero(packet, payloadsize); - + bzero(a.packet, payloadsize); if (rate == 0) { - interval.tv_sec = 0; - interval.tv_nsec = 0; + a.interval.tv_sec = 0; + a.interval.tv_nsec = 0; } else if (rate == 1) { - interval.tv_sec = 1; - interval.tv_nsec = 0; + a.interval.tv_sec = 1; + a.interval.tv_nsec = 0; } else { - interval.tv_sec = 0; - interval.tv_nsec = ((1 * 1000000000) / rate); + a.interval.tv_sec = 0; + a.interval.tv_nsec = ((1 * 1000000000) / rate); } + printf("Sending packet of payload size %ld every %jd.%09lds for %ld " - "seconds\n", payloadsize, (intmax_t)interval.tv_sec, - interval.tv_nsec, duration); + "seconds\n", payloadsize, (intmax_t)a.interval.tv_sec, + a.interval.tv_nsec, a.duration); - s = socket(PF_INET, SOCK_DGRAM, 0); - if (s == -1) { + a.s = socket(PF_INET, SOCK_DGRAM, 0); + if (a.s == -1) { perror("socket"); return (-1); } - if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { - perror("connect"); - return (-1); - } - - return (timing_loop(s, interval, duration, packet, payloadsize)); + return (timing_loop(&a)); } From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 15:50: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 3C96E106568B; Thu, 15 Oct 2009 15:50:51 +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 E6E318FC1B; Thu, 15 Oct 2009 15:50:50 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 827F746B03; Thu, 15 Oct 2009 11:50:50 -0400 (EDT) Date: Thu, 15 Oct 2009 16:50:50 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Luigi Rizzo In-Reply-To: <200910151530.n9FFUfxI077369@svn.freebsd.org> Message-ID: References: <200910151530.n9FFUfxI077369@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: r198136 - head/tools/tools/netrate/netsend X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 15 Oct 2009 15:50:51 -0000 On Thu, 15 Oct 2009, Luigi Rizzo wrote: > Support the specification of a range of destination ports e.g. > > netsend 127.0.0.1 6666-7777 [payloadsize] [packet_rate] [duration] All sounds very useful -- consider making some of these changes (where appropriate) to netblast as well? Also, I can't remember if netsend / netblast know about calling bind() before commencing, but if not they should be taught. That should (a) eliminate significant overhead and (b) use weaker locking so that greater concurrency can be exploited by multiple instances. The connect(2) case should force binding, but in absence of connect(2), a per-packet "source address selection" decision needs to be made. Robert > > This is useful to test the behaviour of systems that do some kind > of flow classifications and so exhibit different behaviour depending > on the number of flows that hit them. > I plan to add a similar extension to sweep on a range of IP addresses, > so we can issue a single command to flood (obviously, for testing > purposes!) a number of different destinations. > > When there is only one destination, we do a preliminary connect() > of the socket so we can use send() instead of sendto(). > When we have multiple ports, the socket is not connect()'ed and we > do a sendto() instead. There is a performance hit in this case, > as the throughput on the loopback interface (with a firewall rule > that blocks the transmission) goes down from 900kpps to 490kpps on > my test machine. > > If the number of different destinations is limited, one option to > explore is to have multiple connect()ed sockets. > > MFC after: 1 month > > Modified: > head/tools/tools/netrate/netsend/netsend.c > > Modified: head/tools/tools/netrate/netsend/netsend.c > ============================================================================== > --- head/tools/tools/netrate/netsend/netsend.c Thu Oct 15 14:55:11 2009 (r198135) > +++ head/tools/tools/netrate/netsend/netsend.c Thu Oct 15 15:30:41 2009 (r198136) > @@ -39,12 +39,23 @@ > #include > #include > > +/* program arguments */ > +struct _a { > + int s; > + struct timespec interval; > + int port, port_max; > + long duration; > + struct sockaddr_in sin; > + int packet_len; > + void *packet; > +}; > + > static void > usage(void) > { > > fprintf(stderr, > - "netsend [ip] [port] [payloadsize] [rate] [duration]\n"); > + "netsend [ip] [port[-port_max]] [payloadsize] [packet_rate] [duration]\n"); > exit(-1); > } > > @@ -114,10 +125,12 @@ wait_time(struct timespec ts, struct tim > * Calculate a second-aligned starting time for the packet stream. Busy > * wait between our calculated interval and dropping the provided packet > * into the socket. If we hit our duration limit, bail. > + * We sweep the ports from a->port to a->port_max included. > + * If the two ports are the same we connect() the socket upfront, which > + * almost halves the cost of the sendto() call. > */ > static int > -timing_loop(int s, struct timespec interval, long duration, u_char *packet, > - u_int packet_len) > +timing_loop(struct _a *a) > { > struct timespec nexttime, starttime, tmptime; > long long waited; > @@ -127,18 +140,19 @@ timing_loop(int s, struct timespec inter > /* do not call gettimeofday more than every 20us */ > long minres_ns = 20000; > int ic, gettimeofday_cycles; > + int cur_port; > > if (clock_getres(CLOCK_REALTIME, &tmptime) == -1) { > perror("clock_getres"); > return (-1); > } > > - if (timespec_ge(&tmptime, &interval)) > + if (timespec_ge(&tmptime, &a->interval)) > fprintf(stderr, > "warning: interval (%jd.%09ld) less than resolution (%jd.%09ld)\n", > - (intmax_t)interval.tv_sec, interval.tv_nsec, > + (intmax_t)a->interval.tv_sec, a->interval.tv_nsec, > (intmax_t)tmptime.tv_sec, tmptime.tv_nsec); > - if (tmptime.tv_nsec < minres_ns) { > + if (a->interval.tv_nsec < minres_ns) { > gettimeofday_cycles = minres_ns/(tmptime.tv_nsec + 1); > fprintf(stderr, > "calling time every %d cycles\n", gettimeofday_cycles); > @@ -156,14 +170,23 @@ timing_loop(int s, struct timespec inter > if (wait_time(starttime, NULL, NULL) == -1) > return (-1); > nexttime = starttime; > - finishtime = starttime.tv_sec + duration; > + finishtime = starttime.tv_sec + a->duration; > > send_errors = send_calls = 0; > counter = 0; > waited = 0; > ic = gettimeofday_cycles; > + cur_port = a->port; > + if (a->port == a->port_max) { > + if (connect(a->s, (struct sockaddr *)&a->sin, sizeof(a->sin))) { > + perror("connect"); > + return (-1); > + } > + } > while (1) { > - timespec_add(&nexttime, &interval); > + int ret; > + > + timespec_add(&nexttime, &a->interval); > if (--ic <= 0) { > ic = gettimeofday_cycles; > if (wait_time(nexttime, &tmptime, &waited) == -1) > @@ -178,17 +201,28 @@ timing_loop(int s, struct timespec inter > * previous send, the error will turn up the current send > * operation, causing the current sequence number also to be > * skipped. > + * The counter is incremented only on the initial port number, > + * so all destinations will see the same set of packets. > * > * XXXRW: Note alignment assumption. > */ > - if (packet_len >= 4) { > - *((u_int32_t *)packet) = htonl(counter); > + if (cur_port == a->port && a->packet_len >= 4) { > + *((u_int32_t *)a->packet) = htonl(counter); > counter++; > } > - if (send(s, packet, packet_len, 0) < 0) > + if (a->port == a->port_max) { /* socket already bound */ > + ret = send(a->s, a->packet, a->packet_len, 0); > + } else { > + a->sin.sin_port = htons(cur_port++); > + if (cur_port > a->port_max) > + cur_port = a->port; > + ret = sendto(a->s, a->packet, a->packet_len, 0, > + (struct sockaddr *)&a->sin, sizeof(a->sin)); > + } > + if (ret < 0) > send_errors++; > send_calls++; > - if (duration != 0 && tmptime.tv_sec >= finishtime) > + if (a->duration != 0 && tmptime.tv_sec >= finishtime) > goto done; > } > > @@ -205,11 +239,11 @@ done: > tmptime.tv_nsec); > printf("send calls: %ld\n", send_calls); > printf("send errors: %ld\n", send_errors); > - printf("approx send rate: %ld\n", (send_calls - send_errors) / > - duration); > + printf("approx send rate: %ld pps\n", (send_calls - send_errors) / > + a->duration); > printf("approx error rate: %ld\n", (send_errors / send_calls)); > printf("waited: %lld\n", waited); > - printf("approx waits/sec: %lld\n", (long long)(waited / duration)); > + printf("approx waits/sec: %lld\n", (long long)(waited / a->duration)); > printf("approx wait rate: %lld\n", (long long)(waited / send_calls)); > > return (0); > @@ -218,27 +252,35 @@ done: > int > main(int argc, char *argv[]) > { > - long rate, payloadsize, port, duration; > - struct timespec interval; > - struct sockaddr_in sin; > - char *dummy, *packet; > - int s; > + long rate, payloadsize, port; > + char *dummy; > + struct _a a; /* arguments */ > + > + bzero(&a, sizeof(a)); > > if (argc != 6) > usage(); > > - bzero(&sin, sizeof(sin)); > - sin.sin_len = sizeof(sin); > - sin.sin_family = AF_INET; > - if (inet_aton(argv[1], &sin.sin_addr) == 0) { > + a.sin.sin_len = sizeof(a.sin); > + a.sin.sin_family = AF_INET; > + if (inet_aton(argv[1], &a.sin.sin_addr) == 0) { > perror(argv[1]); > return (-1); > } > > port = strtoul(argv[2], &dummy, 10); > - if (port < 1 || port > 65535 || *dummy != '\0') > + if (port < 1 || port > 65535) > usage(); > - sin.sin_port = htons(port); > + if (*dummy != '\0' && *dummy != '-') > + usage(); > + a.sin.sin_port = htons(port); > + a.port = a.port_max = port; > + if (*dummy == '-') { /* set high port */ > + port = strtoul(dummy + 1, &dummy, 10); > + if (port < a.port || port > 65535) > + usage(); > + a.port_max = port; > + } > > payloadsize = strtoul(argv[3], &dummy, 10); > if (payloadsize < 0 || *dummy != '\0') > @@ -247,56 +289,51 @@ main(int argc, char *argv[]) > fprintf(stderr, "payloadsize > 32768\n"); > return (-1); > } > + a.packet_len = payloadsize; > > /* > * Specify an arbitrary limit. It's exactly that, not selected by > * any particular strategy. '0' is a special value meaning "blast", > * and avoids the cost of a timing loop. > - * XXX 0 is not actually implemented. > */ > rate = strtoul(argv[4], &dummy, 10); > - if (rate < 1 || *dummy != '\0') > + if (rate < 0 || *dummy != '\0') > usage(); > if (rate > MAX_RATE) { > - fprintf(stderr, "rate > %d\n", MAX_RATE); > + fprintf(stderr, "packet rate at most %d\n", MAX_RATE); > return (-1); > } > > - duration = strtoul(argv[5], &dummy, 10); > - if (duration < 0 || *dummy != '\0') > + a.duration = strtoul(argv[5], &dummy, 10); > + if (a.duration < 0 || *dummy != '\0') > usage(); > > - packet = malloc(payloadsize); > - if (packet == NULL) { > + a.packet = malloc(payloadsize); > + if (a.packet == NULL) { > perror("malloc"); > return (-1); > } > - bzero(packet, payloadsize); > - > + bzero(a.packet, payloadsize); > if (rate == 0) { > - interval.tv_sec = 0; > - interval.tv_nsec = 0; > + a.interval.tv_sec = 0; > + a.interval.tv_nsec = 0; > } else if (rate == 1) { > - interval.tv_sec = 1; > - interval.tv_nsec = 0; > + a.interval.tv_sec = 1; > + a.interval.tv_nsec = 0; > } else { > - interval.tv_sec = 0; > - interval.tv_nsec = ((1 * 1000000000) / rate); > + a.interval.tv_sec = 0; > + a.interval.tv_nsec = ((1 * 1000000000) / rate); > } > + > printf("Sending packet of payload size %ld every %jd.%09lds for %ld " > - "seconds\n", payloadsize, (intmax_t)interval.tv_sec, > - interval.tv_nsec, duration); > + "seconds\n", payloadsize, (intmax_t)a.interval.tv_sec, > + a.interval.tv_nsec, a.duration); > > - s = socket(PF_INET, SOCK_DGRAM, 0); > - if (s == -1) { > + a.s = socket(PF_INET, SOCK_DGRAM, 0); > + if (a.s == -1) { > perror("socket"); > return (-1); > } > > - if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { > - perror("connect"); > - return (-1); > - } > - > - return (timing_loop(s, interval, duration, packet, payloadsize)); > + return (timing_loop(&a)); > } > From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 18:17: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 B1D20106566B; Thu, 15 Oct 2009 18:17:29 +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 A1CB18FC0C; Thu, 15 Oct 2009 18:17:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FIHTfa081108; Thu, 15 Oct 2009 18:17:29 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FIHT7r081105; Thu, 15 Oct 2009 18:17:29 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200910151817.n9FIHT7r081105@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 15 Oct 2009 18:17: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: r198148 - in head/bin: cat uuidgen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 15 Oct 2009 18:17:29 -0000 Author: ru Date: Thu Oct 15 18:17:29 2009 New Revision: 198148 URL: http://svn.freebsd.org/changeset/base/198148 Log: Removed redundant WARNS setting. Submitted by: Ulrich Spörlein Modified: head/bin/cat/Makefile head/bin/uuidgen/Makefile Modified: head/bin/cat/Makefile ============================================================================== --- head/bin/cat/Makefile Thu Oct 15 17:40:45 2009 (r198147) +++ head/bin/cat/Makefile Thu Oct 15 18:17:29 2009 (r198148) @@ -2,6 +2,5 @@ # $FreeBSD$ PROG= cat -WARNS?= 6 .include Modified: head/bin/uuidgen/Makefile ============================================================================== --- head/bin/uuidgen/Makefile Thu Oct 15 17:40:45 2009 (r198147) +++ head/bin/uuidgen/Makefile Thu Oct 15 18:17:29 2009 (r198148) @@ -1,6 +1,5 @@ # $FreeBSD$ PROG= uuidgen -WARNS?= 6 .include From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 18:32:09 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 83AF9106566C; Thu, 15 Oct 2009 18:32:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: John Baldwin Date: Thu, 15 Oct 2009 14:31:50 -0400 User-Agent: KMail/1.6.2 References: <200910141738.43910.jhb@freebsd.org> <20091015.085910.-520412456.imp@bsdimp.com> <200910151118.50619.jhb@freebsd.org> In-Reply-To: <200910151118.50619.jhb@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200910151431.53236.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, xcllnt@mac.com, "M. Warner Losh" , src-committers@FreeBSD.org Subject: Re: svn commit: r197969 - 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: Thu, 15 Oct 2009 18:32:09 -0000 On Thursday 15 October 2009 11:18 am, John Baldwin wrote: > On Thursday 15 October 2009 10:59:10 am M. Warner Losh wrote: > > In message: <200910150833.54252.jhb@freebsd.org> > > > > John Baldwin writes: > > : On Wednesday 14 October 2009 6:11:15 pm M. Warner Losh wrote: > > : > In message: <200910141738.43910.jhb@freebsd.org> > > : > > > : > John Baldwin writes: > > : > : On Wednesday 14 October 2009 5:20:38 pm Marcel Moolenaar wrote: > > : > : > On Oct 14, 2009, at 1:45 PM, John Baldwin wrote: > > : > : > > On Wednesday 14 October 2009 2:35:16 pm Marcel Moolenaar wrote: > > : > : > >> On Oct 14, 2009, at 10:39 AM, Warner Losh wrote: > > : > : > >>> I can't be more clear than this. You keep ignoring > > : > : > >>> me, and it > > is > > > : > : > >>> very > > : > : > >>> frustrating. > > : > : > >> > > : > : > >> I'm not ignoring you. I'm still talking. You simply > > : > : > >> haven't > > convinced > > > : > : > >> me. While it's possible (likely?) that I don't > > : > : > >> understand the > > issues, > > > : > : > >> all you've achieved so far is that I'm more convinced > > : > : > >> that > > limiting > > > : > : > >> orm(4) to i386 and amd64 is the right thing, because > > : > : > >> the > > alternative > > > : > : > >> is not at all appealing. > > : > : > >> > > : > : > >>> The problem is that the > > : > : > >>> powerpc and itanium isa modules allow memory ranges > > : > : > >>> that > > shouldn't > > > : > : > >>> be > > : > : > >>> allowed. That's the platform specific code that > > : > : > >>> needs to be > > fixed. > > > : > : > >> isa_set_resource() is MI code and it happily adds > > : > : > >> whatever > > resources > > > : > : > >> a driver wants. The only chance MD code has is to fail > > : > : > >> the allocation, > > : > : > >> but since the whole ISA code bypasses the newbus > > : > : > >> hierarchy, > > there's > > > : > : > >> no way we know in the isa MD code what is valid and > > : > : > >> what isn't > > unless > > > : > : > >> we add kluges to platform code. > > : > : > >> > > : > : > >> If you want to fix it for real, does that mean fix it > > : > : > >> for real or does that mean add kluges to platform > > : > : > >> code? > > : > : > >> > > : > : > >> Shouldn't we have ISA bridges obtain the set of valid > > : > : > >> resources from their parent in the newbus hierarchy? > > : > : > > > > : > : > > Hmm, can we even know that? PCI-ISA bridges in x86 at > > : > : > > least don't have any > > : > : > > I/O limit registers like PCI-PCI bridges, instead they > > : > : > > are subtractively > > : > : > > decoded, i.e. they "eat" any memory request that no one > > : > : > > else > > claims. > > > : > : > The key here being requests that reach the PCI-ISA > > : > : > bridge. It's > > entirely > > > : > : > platform specific which I/O memory addresses generated by > > : > : > the CPU > > gets > > > : > : > decoded and forwarded in such a way that it's visible to > > : > : > the PCI-ISA bridge. This is what needs to be obtained > > : > : > from the parent in the > > newbus > > > : > : > hierarchy. Rather than hardcoding [0xC0000 .. 0x100000> > > : > : > as the ISA option > > : > : > ROM memory range, it should be something like > > [isa_mem_base+0xC0000 .. > > > : > : > isa_mem_base + 0x100000> or even [isa_rom_base .. > > : > : > isa_rom_base + 0x40000>. > > : > : > > : > : That might certainly be a reasonable IVAR for isab(4) to > > : > : provide to > > isa(4): a > > > : > : ROM base. However, orm(4) should be enabled for all ISA > > : > : bridges > > assuming > > > : > : that is fixed. OTOH, the way many bus drivers I've seen > > : > : handle this > > so far > > > : > : is to change the base address of SYS_RES_MEMORY objects as > > : > : they pass > > through > > > : > : the relevant bridge so that the actual memory address is > > : > : properly > > adjusted > > > : > : when it gets to the equivalent of the nexus. This is how > > : > : many of the Foo->PCI bridges in arm that I've looked at > > : > : work, and I think this is > > more > > > : > : inline with Warner's original patch which is to allow the > > : > : various platform-specific ISA bridge drivers reject memory > > : > : ranges they do not > > decode > > > : > : and provide any needed adjustments to ranges they do decode > > : > : to > > transform them > > > : > : into suitable resources for their parent. Then orm(4) > > : > : would just see > > it's > > > : > : attempts to do bus_alloc_resource() fail and end up DTRT. > > : > : Given that, > > I do > > > : > : think this logic belongs in the ISA bridge drivers rather > > : > : than in > > individual > > > : > : ISA drivers. We don't make ISA peripheral drivers add > > an 'isa_mem_base' or > > > : > : equivalent to their I/O resources, and in terms of I/O > > : > : resources, > > orm(4) is > > > : > : just a special blackhole device (much like the ACPI or > > : > : PnPBIOS system resource devices, or the ram0 or apic0 > > : > : devices on x86). > > : > > > : > This is exactly what I've been trying to say: the memory > > : > addresses that orm is using are ISA BUS addresses. These > > : > just happen to map 1:1 on x86, but will map to something else > > : > on other platforms. But our kernel API is that the driver > > : > requests the bus address, and that any necessary translation > > : > happen in the bus_space layer. > > : > > > : > I disagree that it belongs entirely in the isa bridge > > : > drivers. They may communicate information to the bus_space > > : > implementation, but it is bus_space that ultimately does this > > : > translation. > > : > > : I think it actually depends on the platform as to where it > > : belongs. If > > you > > > : have some Foo->ISA bridge that uses a window on the Foo bus to > > : map ISA > > space, > > > : then I think it makes sense to handle that in the Foo->ISA > > : bridge, > > especially > > > : if it is a relocatable window. If the ISA bus is instead > > : assigned a fixed range in the system address space then that > > : probably belongs in the > > bus_space > > > : support. > > > > I'd think it would be the opposite. bus_space needs to know how > > to map the request, since it is the last one involved. If this > > is mappable or movable, then it needs to know that too. > > It depends I think. If the Foo bus just maps a Foo memory resource > and then sub-allocates that to satisfy ISA ranges then from > bus_space's perspective it is just working with Foo resources. It > would never know about ISA nor would it need to know. > > > However, adjusting the resources that you give to a child on the > > way through the bridge is just assisting bus_space doing the > > right thing if the bus_space on that architecture just implements > > one or two global spaces. > > I think we are mostly agreeing actually. My main statement is that > how ISA memory resources are actually mapped, etc. is > platform-dependent but that different platforms may implement that > support using different means. This is actually very interesting discussion for me because one of my pet projects is extending x86bios to support non-PC architectures. If anyone is interested, the current source tarball is here: http://people.freebsd.org/~jkim/x86bios-20091015.tar.bz2 Especially, please see the code around #ifdef X86BIOS_COMPAT_ARCH. Basically, mapping I/O ports and orm(4) is missing. We don't have to implement I/O ports but orm(4) vs. bus_space(9) is critical to make it a reality. Please consider it as a real practical example for orm, not just a blackhole driver. :-) Jung-uk Kim From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 18:51: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 E4EB71065692; Thu, 15 Oct 2009 18:51:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D508A8FC0C; Thu, 15 Oct 2009 18:51:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FIpJTo081810; Thu, 15 Oct 2009 18:51:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FIpJBD081808; Thu, 15 Oct 2009 18:51:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910151851.n9FIpJBD081808@svn.freebsd.org> From: John Baldwin Date: Thu, 15 Oct 2009 18:51: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: r198149 - 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, 15 Oct 2009 18:51:20 -0000 Author: jhb Date: Thu Oct 15 18:51:19 2009 New Revision: 198149 URL: http://svn.freebsd.org/changeset/base/198149 Log: Use language more closely resembling English in a panic message. Pointy hat to: jhb Submitted by: pluknet Modified: head/sys/kern/kern_intr.c Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Thu Oct 15 18:17:29 2009 (r198148) +++ head/sys/kern/kern_intr.c Thu Oct 15 18:51:19 2009 (r198149) @@ -684,7 +684,7 @@ intr_event_describe_handler(struct intr_ } if (ih == NULL) { mtx_unlock(&ie->ie_lock); - panic("handler %p not find in interrupt event %p", cookie, ie); + panic("handler %p not found in interrupt event %p", cookie, ie); } #endif ih = cookie; From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 20:07: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 23BF6106566C; Thu, 15 Oct 2009 20:07:09 +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 124518FC1A; Thu, 15 Oct 2009 20:07:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FK78NK083276; Thu, 15 Oct 2009 20:07:08 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FK78cG083259; Thu, 15 Oct 2009 20:07:08 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200910152007.n9FK78cG083259@svn.freebsd.org> From: Andrew Thompson Date: Thu, 15 Oct 2009 20:07: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: r198151 - in head/sys/dev: pci usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 15 Oct 2009 20:07:09 -0000 Author: thompsa Date: Thu Oct 15 20:07:08 2009 New Revision: 198151 URL: http://svn.freebsd.org/changeset/base/198151 Log: Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover for all host controllers at the same time, we avoid problems where the BIOS will actually write to the USB registers of all the USB host controllers every time we handover one of them, and consequently reset the OS programmed values. Submitted by: avg Reviewed by: jhb Added: head/sys/dev/usb/controller/ehcireg.h (contents, props changed) head/sys/dev/usb/controller/ohcireg.h (contents, props changed) head/sys/dev/usb/controller/uhcireg.h (contents, props changed) Modified: head/sys/dev/pci/pci.c head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/controller/ehci.h head/sys/dev/usb/controller/ehci_ixp4xx.c head/sys/dev/usb/controller/ehci_mbus.c head/sys/dev/usb/controller/ehci_pci.c head/sys/dev/usb/controller/ohci.c head/sys/dev/usb/controller/ohci.h head/sys/dev/usb/controller/ohci_atmelarm.c head/sys/dev/usb/controller/ohci_pci.c head/sys/dev/usb/controller/uhci.c head/sys/dev/usb/controller/uhci.h head/sys/dev/usb/controller/uhci_pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/pci/pci.c Thu Oct 15 20:07:08 2009 (r198151) @@ -62,6 +62,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include + #include "pcib_if.h" #include "pci_if.h" @@ -270,6 +274,13 @@ TUNABLE_INT("hw.pci.honor_msi_blacklist" SYSCTL_INT(_hw_pci, OID_AUTO, honor_msi_blacklist, CTLFLAG_RD, &pci_honor_msi_blacklist, 1, "Honor chipset blacklist for MSI"); +static int pci_usb_takeover = 1; +TUNABLE_INT("hw.pci.usb_early_takeover", &pci_usb_takeover); +SYSCTL_INT(_hw_pci, OID_AUTO, usb_early_takeover, CTLFLAG_RD | CTLFLAG_TUN, + &pci_usb_takeover, 1, "Enable early takeover of USB controllers.\n\ +Disable this if you depend on BIOS emulation of USB devices, that is\n\ +you use USB devices (like keyboard or mouse) but do not load USB drivers"); + /* Find a device_t by bus/slot/function in domain 0 */ device_t @@ -2569,6 +2580,106 @@ pci_assign_interrupt(device_t bus, devic resource_list_add(&dinfo->resources, SYS_RES_IRQ, 0, irq, irq, 1); } +/* Perform early OHCI takeover from SMM. */ +static void +ohci_early_takeover(device_t self) +{ + struct resource *res; + uint32_t ctl; + int rid; + int i; + + rid = PCIR_BAR(0); + res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (res == NULL) + return; + + ctl = bus_read_4(res, OHCI_CONTROL); + if (ctl & OHCI_IR) { + if (bootverbose) + printf("ohci early: " + "SMM active, request owner change\n"); + bus_write_4(res, OHCI_COMMAND_STATUS, OHCI_OCR); + for (i = 0; (i < 100) && (ctl & OHCI_IR); i++) { + DELAY(1000); + ctl = bus_read_4(res, OHCI_CONTROL); + } + if (ctl & OHCI_IR) { + if (bootverbose) + printf("ohci early: " + "SMM does not respond, resetting\n"); + bus_write_4(res, OHCI_CONTROL, OHCI_HCFS_RESET); + } + } + + bus_release_resource(self, SYS_RES_MEMORY, rid, res); +} + +/* Perform early UHCI takeover from SMM. */ +static void +uhci_early_takeover(device_t self) +{ + /* + * Set the PIRQD enable bit and switch off all the others. We don't + * want legacy support to interfere with us XXX Does this also mean + * that the BIOS won't touch the keyboard anymore if it is connected + * to the ports of the root hub? + */ + pci_write_config(self, PCI_LEGSUP, PCI_LEGSUP_USBPIRQDEN, 2); +} + +/* Perform early EHCI takeover from SMM. */ +static void +ehci_early_takeover(device_t self) +{ + struct resource *res; + uint32_t cparams; + uint32_t eec; + uint8_t eecp; + uint8_t bios_sem; + int rid; + int i; + + rid = PCIR_BAR(0); + res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (res == NULL) + return; + + cparams = bus_read_4(res, EHCI_HCCPARAMS); + + /* Synchronise with the BIOS if it owns the controller. */ + for (eecp = EHCI_HCC_EECP(cparams); eecp != 0; + eecp = EHCI_EECP_NEXT(eec)) { + eec = pci_read_config(self, eecp, 4); + if (EHCI_EECP_ID(eec) != EHCI_EC_LEGSUP) { + continue; + } + bios_sem = pci_read_config(self, eecp + + EHCI_LEGSUP_BIOS_SEM, 1); + if (bios_sem == 0) { + continue; + } + if (bootverbose) + printf("ehci early: " + "SMM active, request owner change\n"); + + pci_write_config(self, eecp + EHCI_LEGSUP_OS_SEM, 1, 1); + + for (i = 0; (i < 100) && (bios_sem != 0); i++) { + DELAY(1000); + bios_sem = pci_read_config(self, eecp + + EHCI_LEGSUP_BIOS_SEM, 1); + } + + if (bios_sem != 0) { + if (bootverbose) + printf("ehci early: " + "SMM does not respond\n"); + } + } + bus_release_resource(self, SYS_RES_MEMORY, rid, res); +} + void pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) { @@ -2612,6 +2723,16 @@ pci_add_resources(device_t bus, device_t pci_assign_interrupt(bus, dev, 0); #endif } + + if (pci_usb_takeover && pci_get_class(dev) == PCIC_SERIALBUS && + pci_get_subclass(dev) == PCIS_SERIALBUS_USB) { + if (pci_get_progif(dev) == PCIP_SERIALBUS_USB_EHCI) + ehci_early_takeover(dev); + else if (pci_get_progif(dev) == PCIP_SERIALBUS_USB_OHCI) + ohci_early_takeover(dev); + else if (pci_get_progif(dev) == PCIP_SERIALBUS_USB_UHCI) + uhci_early_takeover(dev); + } } void Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/ehci.c Thu Oct 15 20:07:08 2009 (r198151) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define EHCI_BUS2SC(bus) \ ((ehci_softc_t *)(((uint8_t *)(bus)) - \ Modified: head/sys/dev/usb/controller/ehci.h ============================================================================== --- head/sys/dev/usb/controller/ehci.h Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/ehci.h Thu Oct 15 20:07:08 2009 (r198151) @@ -40,139 +40,6 @@ #define EHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) -/* PCI config registers */ -#define PCI_CBMEM 0x10 /* configuration base MEM */ -#define PCI_INTERFACE_EHCI 0x20 -#define PCI_USBREV 0x60 /* RO USB protocol revision */ -#define PCI_USB_REV_MASK 0xff -#define PCI_USB_REV_PRE_1_0 0x00 -#define PCI_USB_REV_1_0 0x10 -#define PCI_USB_REV_1_1 0x11 -#define PCI_USB_REV_2_0 0x20 -#define PCI_EHCI_FLADJ 0x61 /* RW Frame len adj, SOF=59488+6*fladj */ -#define PCI_EHCI_PORTWAKECAP 0x62 /* RW Port wake caps (opt) */ - -/* EHCI Extended Capabilities */ -#define EHCI_EC_LEGSUP 0x01 -#define EHCI_EECP_NEXT(x) (((x) >> 8) & 0xff) -#define EHCI_EECP_ID(x) ((x) & 0xff) - -/* Legacy support extended capability */ -#define EHCI_LEGSUP_BIOS_SEM 0x02 -#define EHCI_LEGSUP_OS_SEM 0x03 -#define EHCI_LEGSUP_USBLEGCTLSTS 0x04 - -/* EHCI capability registers */ -#define EHCI_CAPLENGTH 0x00 /* RO Capability register length field */ -/* reserved 0x01 */ -#define EHCI_HCIVERSION 0x02 /* RO Interface version number */ -#define EHCI_HCSPARAMS 0x04 /* RO Structural parameters */ -#define EHCI_HCS_DEBUGPORT(x) (((x) >> 20) & 0xf) -#define EHCI_HCS_P_INDICATOR(x) ((x) & 0x10000) -#define EHCI_HCS_N_CC(x) (((x) >> 12) & 0xf) /* # of companion ctlrs */ -#define EHCI_HCS_N_PCC(x) (((x) >> 8) & 0xf) /* # of ports per comp. */ -#define EHCI_HCS_PPC(x) ((x) & 0x10) /* port power control */ -#define EHCI_HCS_N_PORTS(x) ((x) & 0xf) /* # of ports */ -#define EHCI_HCCPARAMS 0x08 /* RO Capability parameters */ -#define EHCI_HCC_EECP(x) (((x) >> 8) & 0xff) /* extended ports caps */ -#define EHCI_HCC_IST(x) (((x) >> 4) & 0xf) /* isoc sched threshold */ -#define EHCI_HCC_ASPC(x) ((x) & 0x4) /* async sched park cap */ -#define EHCI_HCC_PFLF(x) ((x) & 0x2) /* prog frame list flag */ -#define EHCI_HCC_64BIT(x) ((x) & 0x1) /* 64 bit address cap */ -#define EHCI_HCSP_PORTROUTE 0x0c /* RO Companion port route description */ - -/* EHCI operational registers. Offset given by EHCI_CAPLENGTH register */ -#define EHCI_USBCMD 0x00 /* RO, RW, WO Command register */ -#define EHCI_CMD_ITC_M 0x00ff0000 /* RW interrupt threshold ctrl */ -#define EHCI_CMD_ITC_1 0x00010000 -#define EHCI_CMD_ITC_2 0x00020000 -#define EHCI_CMD_ITC_4 0x00040000 -#define EHCI_CMD_ITC_8 0x00080000 -#define EHCI_CMD_ITC_16 0x00100000 -#define EHCI_CMD_ITC_32 0x00200000 -#define EHCI_CMD_ITC_64 0x00400000 -#define EHCI_CMD_ASPME 0x00000800 /* RW/RO async park enable */ -#define EHCI_CMD_ASPMC 0x00000300 /* RW/RO async park count */ -#define EHCI_CMD_LHCR 0x00000080 /* RW light host ctrl reset */ -#define EHCI_CMD_IAAD 0x00000040 /* RW intr on async adv door - * bell */ -#define EHCI_CMD_ASE 0x00000020 /* RW async sched enable */ -#define EHCI_CMD_PSE 0x00000010 /* RW periodic sched enable */ -#define EHCI_CMD_FLS_M 0x0000000c /* RW/RO frame list size */ -#define EHCI_CMD_FLS(x) (((x) >> 2) & 3) /* RW/RO frame list size */ -#define EHCI_CMD_HCRESET 0x00000002 /* RW reset */ -#define EHCI_CMD_RS 0x00000001 /* RW run/stop */ -#define EHCI_USBSTS 0x04 /* RO, RW, RWC Status register */ -#define EHCI_STS_ASS 0x00008000 /* RO async sched status */ -#define EHCI_STS_PSS 0x00004000 /* RO periodic sched status */ -#define EHCI_STS_REC 0x00002000 /* RO reclamation */ -#define EHCI_STS_HCH 0x00001000 /* RO host controller halted */ -#define EHCI_STS_IAA 0x00000020 /* RWC interrupt on async adv */ -#define EHCI_STS_HSE 0x00000010 /* RWC host system error */ -#define EHCI_STS_FLR 0x00000008 /* RWC frame list rollover */ -#define EHCI_STS_PCD 0x00000004 /* RWC port change detect */ -#define EHCI_STS_ERRINT 0x00000002 /* RWC error interrupt */ -#define EHCI_STS_INT 0x00000001 /* RWC interrupt */ -#define EHCI_STS_INTRS(x) ((x) & 0x3f) - -/* - * NOTE: the doorbell interrupt is enabled, but the doorbell is never - * used! SiS chipsets require this. - */ -#define EHCI_NORMAL_INTRS (EHCI_STS_IAA | EHCI_STS_HSE | \ - EHCI_STS_PCD | EHCI_STS_ERRINT | EHCI_STS_INT) - -#define EHCI_USBINTR 0x08 /* RW Interrupt register */ -#define EHCI_INTR_IAAE 0x00000020 /* interrupt on async advance - * ena */ -#define EHCI_INTR_HSEE 0x00000010 /* host system error ena */ -#define EHCI_INTR_FLRE 0x00000008 /* frame list rollover ena */ -#define EHCI_INTR_PCIE 0x00000004 /* port change ena */ -#define EHCI_INTR_UEIE 0x00000002 /* USB error intr ena */ -#define EHCI_INTR_UIE 0x00000001 /* USB intr ena */ - -#define EHCI_FRINDEX 0x0c /* RW Frame Index register */ - -#define EHCI_CTRLDSSEGMENT 0x10 /* RW Control Data Structure Segment */ - -#define EHCI_PERIODICLISTBASE 0x14 /* RW Periodic List Base */ -#define EHCI_ASYNCLISTADDR 0x18 /* RW Async List Base */ - -#define EHCI_CONFIGFLAG 0x40 /* RW Configure Flag register */ -#define EHCI_CONF_CF 0x00000001 /* RW configure flag */ - -#define EHCI_PORTSC(n) (0x40+(4*(n))) /* RO, RW, RWC Port Status reg */ -#define EHCI_PS_WKOC_E 0x00400000 /* RW wake on over current ena */ -#define EHCI_PS_WKDSCNNT_E 0x00200000 /* RW wake on disconnect ena */ -#define EHCI_PS_WKCNNT_E 0x00100000 /* RW wake on connect ena */ -#define EHCI_PS_PTC 0x000f0000 /* RW port test control */ -#define EHCI_PS_PIC 0x0000c000 /* RW port indicator control */ -#define EHCI_PS_PO 0x00002000 /* RW port owner */ -#define EHCI_PS_PP 0x00001000 /* RW,RO port power */ -#define EHCI_PS_LS 0x00000c00 /* RO line status */ -#define EHCI_PS_IS_LOWSPEED(x) (((x) & EHCI_PS_LS) == 0x00000400) -#define EHCI_PS_PR 0x00000100 /* RW port reset */ -#define EHCI_PS_SUSP 0x00000080 /* RW suspend */ -#define EHCI_PS_FPR 0x00000040 /* RW force port resume */ -#define EHCI_PS_OCC 0x00000020 /* RWC over current change */ -#define EHCI_PS_OCA 0x00000010 /* RO over current active */ -#define EHCI_PS_PEC 0x00000008 /* RWC port enable change */ -#define EHCI_PS_PE 0x00000004 /* RW port enable */ -#define EHCI_PS_CSC 0x00000002 /* RWC connect status change */ -#define EHCI_PS_CS 0x00000001 /* RO connect status */ -#define EHCI_PS_CLEAR (EHCI_PS_OCC | EHCI_PS_PEC | EHCI_PS_CSC) - -#define EHCI_USBMODE 0x68 /* RW USB Device mode register */ -#define EHCI_UM_CM 0x00000003 /* R/WO Controller Mode */ -#define EHCI_UM_CM_IDLE 0x0 /* Idle */ -#define EHCI_UM_CM_HOST 0x3 /* Host Controller */ -#define EHCI_UM_ES 0x00000004 /* R/WO Endian Select */ -#define EHCI_UM_ES_LE 0x0 /* Little-endian byte alignment */ -#define EHCI_UM_ES_BE 0x4 /* Big-endian byte alignment */ -#define EHCI_UM_SDIS 0x00000010 /* R/WO Stream Disable Mode */ - -#define EHCI_PORT_RESET_COMPLETE 2 /* ms */ - /* * Alignment NOTE: structures must be aligned so that the hardware can index * without performing addition. Modified: head/sys/dev/usb/controller/ehci_ixp4xx.c ============================================================================== --- head/sys/dev/usb/controller/ehci_ixp4xx.c Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/ehci_ixp4xx.c Thu Oct 15 20:07:08 2009 (r198151) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/dev/usb/controller/ehci_mbus.c ============================================================================== --- head/sys/dev/usb/controller/ehci_mbus.c Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/ehci_mbus.c Thu Oct 15 20:07:08 2009 (r198151) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/ehci_pci.c Thu Oct 15 20:07:08 2009 (r198151) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define PCI_EHCI_VENDORID_ACERLABS 0x10b9 #define PCI_EHCI_VENDORID_AMD 0x1022 Added: head/sys/dev/usb/controller/ehcireg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/controller/ehcireg.h Thu Oct 15 20:07:08 2009 (r198151) @@ -0,0 +1,174 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Lennart Augustsson (lennart@augustsson.net). + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 THE FOUNDATION 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. + */ + +#ifndef _EHCIREG_H_ +#define _EHCIREG_H_ + +/* PCI config registers */ +#define PCI_CBMEM 0x10 /* configuration base MEM */ +#define PCI_INTERFACE_EHCI 0x20 +#define PCI_USBREV 0x60 /* RO USB protocol revision */ +#define PCI_USB_REV_MASK 0xff +#define PCI_USB_REV_PRE_1_0 0x00 +#define PCI_USB_REV_1_0 0x10 +#define PCI_USB_REV_1_1 0x11 +#define PCI_USB_REV_2_0 0x20 +#define PCI_EHCI_FLADJ 0x61 /* RW Frame len adj, SOF=59488+6*fladj */ +#define PCI_EHCI_PORTWAKECAP 0x62 /* RW Port wake caps (opt) */ + +/* EHCI Extended Capabilities */ +#define EHCI_EC_LEGSUP 0x01 +#define EHCI_EECP_NEXT(x) (((x) >> 8) & 0xff) +#define EHCI_EECP_ID(x) ((x) & 0xff) + +/* Legacy support extended capability */ +#define EHCI_LEGSUP_BIOS_SEM 0x02 +#define EHCI_LEGSUP_OS_SEM 0x03 +#define EHCI_LEGSUP_USBLEGCTLSTS 0x04 + +/* EHCI capability registers */ +#define EHCI_CAPLENGTH 0x00 /* RO Capability register length field */ +/* reserved 0x01 */ +#define EHCI_HCIVERSION 0x02 /* RO Interface version number */ +#define EHCI_HCSPARAMS 0x04 /* RO Structural parameters */ +#define EHCI_HCS_DEBUGPORT(x) (((x) >> 20) & 0xf) +#define EHCI_HCS_P_INDICATOR(x) ((x) & 0x10000) +#define EHCI_HCS_N_CC(x) (((x) >> 12) & 0xf) /* # of companion ctlrs */ +#define EHCI_HCS_N_PCC(x) (((x) >> 8) & 0xf) /* # of ports per comp. */ +#define EHCI_HCS_PPC(x) ((x) & 0x10) /* port power control */ +#define EHCI_HCS_N_PORTS(x) ((x) & 0xf) /* # of ports */ +#define EHCI_HCCPARAMS 0x08 /* RO Capability parameters */ +#define EHCI_HCC_EECP(x) (((x) >> 8) & 0xff) /* extended ports caps */ +#define EHCI_HCC_IST(x) (((x) >> 4) & 0xf) /* isoc sched threshold */ +#define EHCI_HCC_ASPC(x) ((x) & 0x4) /* async sched park cap */ +#define EHCI_HCC_PFLF(x) ((x) & 0x2) /* prog frame list flag */ +#define EHCI_HCC_64BIT(x) ((x) & 0x1) /* 64 bit address cap */ +#define EHCI_HCSP_PORTROUTE 0x0c /* RO Companion port route description */ + +/* EHCI operational registers. Offset given by EHCI_CAPLENGTH register */ +#define EHCI_USBCMD 0x00 /* RO, RW, WO Command register */ +#define EHCI_CMD_ITC_M 0x00ff0000 /* RW interrupt threshold ctrl */ +#define EHCI_CMD_ITC_1 0x00010000 +#define EHCI_CMD_ITC_2 0x00020000 +#define EHCI_CMD_ITC_4 0x00040000 +#define EHCI_CMD_ITC_8 0x00080000 +#define EHCI_CMD_ITC_16 0x00100000 +#define EHCI_CMD_ITC_32 0x00200000 +#define EHCI_CMD_ITC_64 0x00400000 +#define EHCI_CMD_ASPME 0x00000800 /* RW/RO async park enable */ +#define EHCI_CMD_ASPMC 0x00000300 /* RW/RO async park count */ +#define EHCI_CMD_LHCR 0x00000080 /* RW light host ctrl reset */ +#define EHCI_CMD_IAAD 0x00000040 /* RW intr on async adv door + * bell */ +#define EHCI_CMD_ASE 0x00000020 /* RW async sched enable */ +#define EHCI_CMD_PSE 0x00000010 /* RW periodic sched enable */ +#define EHCI_CMD_FLS_M 0x0000000c /* RW/RO frame list size */ +#define EHCI_CMD_FLS(x) (((x) >> 2) & 3) /* RW/RO frame list size */ +#define EHCI_CMD_HCRESET 0x00000002 /* RW reset */ +#define EHCI_CMD_RS 0x00000001 /* RW run/stop */ +#define EHCI_USBSTS 0x04 /* RO, RW, RWC Status register */ +#define EHCI_STS_ASS 0x00008000 /* RO async sched status */ +#define EHCI_STS_PSS 0x00004000 /* RO periodic sched status */ +#define EHCI_STS_REC 0x00002000 /* RO reclamation */ +#define EHCI_STS_HCH 0x00001000 /* RO host controller halted */ +#define EHCI_STS_IAA 0x00000020 /* RWC interrupt on async adv */ +#define EHCI_STS_HSE 0x00000010 /* RWC host system error */ +#define EHCI_STS_FLR 0x00000008 /* RWC frame list rollover */ +#define EHCI_STS_PCD 0x00000004 /* RWC port change detect */ +#define EHCI_STS_ERRINT 0x00000002 /* RWC error interrupt */ +#define EHCI_STS_INT 0x00000001 /* RWC interrupt */ +#define EHCI_STS_INTRS(x) ((x) & 0x3f) + +/* + * NOTE: the doorbell interrupt is enabled, but the doorbell is never + * used! SiS chipsets require this. + */ +#define EHCI_NORMAL_INTRS (EHCI_STS_IAA | EHCI_STS_HSE | \ + EHCI_STS_PCD | EHCI_STS_ERRINT | EHCI_STS_INT) + +#define EHCI_USBINTR 0x08 /* RW Interrupt register */ +#define EHCI_INTR_IAAE 0x00000020 /* interrupt on async advance + * ena */ +#define EHCI_INTR_HSEE 0x00000010 /* host system error ena */ +#define EHCI_INTR_FLRE 0x00000008 /* frame list rollover ena */ +#define EHCI_INTR_PCIE 0x00000004 /* port change ena */ +#define EHCI_INTR_UEIE 0x00000002 /* USB error intr ena */ +#define EHCI_INTR_UIE 0x00000001 /* USB intr ena */ + +#define EHCI_FRINDEX 0x0c /* RW Frame Index register */ + +#define EHCI_CTRLDSSEGMENT 0x10 /* RW Control Data Structure Segment */ + +#define EHCI_PERIODICLISTBASE 0x14 /* RW Periodic List Base */ +#define EHCI_ASYNCLISTADDR 0x18 /* RW Async List Base */ + +#define EHCI_CONFIGFLAG 0x40 /* RW Configure Flag register */ +#define EHCI_CONF_CF 0x00000001 /* RW configure flag */ + +#define EHCI_PORTSC(n) (0x40+(4*(n))) /* RO, RW, RWC Port Status reg */ +#define EHCI_PS_WKOC_E 0x00400000 /* RW wake on over current ena */ +#define EHCI_PS_WKDSCNNT_E 0x00200000 /* RW wake on disconnect ena */ +#define EHCI_PS_WKCNNT_E 0x00100000 /* RW wake on connect ena */ +#define EHCI_PS_PTC 0x000f0000 /* RW port test control */ +#define EHCI_PS_PIC 0x0000c000 /* RW port indicator control */ +#define EHCI_PS_PO 0x00002000 /* RW port owner */ +#define EHCI_PS_PP 0x00001000 /* RW,RO port power */ +#define EHCI_PS_LS 0x00000c00 /* RO line status */ +#define EHCI_PS_IS_LOWSPEED(x) (((x) & EHCI_PS_LS) == 0x00000400) +#define EHCI_PS_PR 0x00000100 /* RW port reset */ +#define EHCI_PS_SUSP 0x00000080 /* RW suspend */ +#define EHCI_PS_FPR 0x00000040 /* RW force port resume */ +#define EHCI_PS_OCC 0x00000020 /* RWC over current change */ +#define EHCI_PS_OCA 0x00000010 /* RO over current active */ +#define EHCI_PS_PEC 0x00000008 /* RWC port enable change */ +#define EHCI_PS_PE 0x00000004 /* RW port enable */ +#define EHCI_PS_CSC 0x00000002 /* RWC connect status change */ +#define EHCI_PS_CS 0x00000001 /* RO connect status */ +#define EHCI_PS_CLEAR (EHCI_PS_OCC | EHCI_PS_PEC | EHCI_PS_CSC) + +#define EHCI_USBMODE 0x68 /* RW USB Device mode register */ +#define EHCI_UM_CM 0x00000003 /* R/WO Controller Mode */ +#define EHCI_UM_CM_IDLE 0x0 /* Idle */ +#define EHCI_UM_CM_HOST 0x3 /* Host Controller */ +#define EHCI_UM_ES 0x00000004 /* R/WO Endian Select */ +#define EHCI_UM_ES_LE 0x0 /* Little-endian byte alignment */ +#define EHCI_UM_ES_BE 0x4 /* Big-endian byte alignment */ +#define EHCI_UM_SDIS 0x00000010 /* R/WO Stream Disable Mode */ + +#define EHCI_PORT_RESET_COMPLETE 2 /* ms */ + +#endif /* _EHCIREG_H_ */ Modified: head/sys/dev/usb/controller/ohci.c ============================================================================== --- head/sys/dev/usb/controller/ohci.c Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/ohci.c Thu Oct 15 20:07:08 2009 (r198151) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define OHCI_BUS2SC(bus) \ ((ohci_softc_t *)(((uint8_t *)(bus)) - \ Modified: head/sys/dev/usb/controller/ohci.h ============================================================================== --- head/sys/dev/usb/controller/ohci.h Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/ohci.h Thu Oct 15 20:07:08 2009 (r198151) @@ -41,95 +41,6 @@ #define OHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) -/* PCI config registers */ -#define PCI_CBMEM 0x10 /* configuration base memory */ -#define PCI_INTERFACE_OHCI 0x10 - -/* OHCI registers */ -#define OHCI_REVISION 0x00 /* OHCI revision */ -#define OHCI_REV_LO(rev) ((rev) & 0xf) -#define OHCI_REV_HI(rev) (((rev)>>4) & 0xf) -#define OHCI_REV_LEGACY(rev) ((rev) & 0x100) -#define OHCI_CONTROL 0x04 -#define OHCI_CBSR_MASK 0x00000003 /* Control/Bulk Service Ratio */ -#define OHCI_RATIO_1_1 0x00000000 -#define OHCI_RATIO_1_2 0x00000001 -#define OHCI_RATIO_1_3 0x00000002 -#define OHCI_RATIO_1_4 0x00000003 -#define OHCI_PLE 0x00000004 /* Periodic List Enable */ -#define OHCI_IE 0x00000008 /* Isochronous Enable */ -#define OHCI_CLE 0x00000010 /* Control List Enable */ -#define OHCI_BLE 0x00000020 /* Bulk List Enable */ -#define OHCI_HCFS_MASK 0x000000c0 /* HostControllerFunctionalStat - * e */ -#define OHCI_HCFS_RESET 0x00000000 -#define OHCI_HCFS_RESUME 0x00000040 -#define OHCI_HCFS_OPERATIONAL 0x00000080 -#define OHCI_HCFS_SUSPEND 0x000000c0 -#define OHCI_IR 0x00000100 /* Interrupt Routing */ -#define OHCI_RWC 0x00000200 /* Remote Wakeup Connected */ -#define OHCI_RWE 0x00000400 /* Remote Wakeup Enabled */ -#define OHCI_COMMAND_STATUS 0x08 -#define OHCI_HCR 0x00000001 /* Host Controller Reset */ -#define OHCI_CLF 0x00000002 /* Control List Filled */ -#define OHCI_BLF 0x00000004 /* Bulk List Filled */ -#define OHCI_OCR 0x00000008 /* Ownership Change Request */ -#define OHCI_SOC_MASK 0x00030000 /* Scheduling Overrun Count */ -#define OHCI_INTERRUPT_STATUS 0x0c -#define OHCI_SO 0x00000001 /* Scheduling Overrun */ -#define OHCI_WDH 0x00000002 /* Writeback Done Head */ -#define OHCI_SF 0x00000004 /* Start of Frame */ -#define OHCI_RD 0x00000008 /* Resume Detected */ -#define OHCI_UE 0x00000010 /* Unrecoverable Error */ -#define OHCI_FNO 0x00000020 /* Frame Number Overflow */ -#define OHCI_RHSC 0x00000040 /* Root Hub Status Change */ -#define OHCI_OC 0x40000000 /* Ownership Change */ -#define OHCI_MIE 0x80000000 /* Master Interrupt Enable */ -#define OHCI_INTERRUPT_ENABLE 0x10 -#define OHCI_INTERRUPT_DISABLE 0x14 -#define OHCI_HCCA 0x18 -#define OHCI_PERIOD_CURRENT_ED 0x1c -#define OHCI_CONTROL_HEAD_ED 0x20 -#define OHCI_CONTROL_CURRENT_ED 0x24 -#define OHCI_BULK_HEAD_ED 0x28 -#define OHCI_BULK_CURRENT_ED 0x2c -#define OHCI_DONE_HEAD 0x30 -#define OHCI_FM_INTERVAL 0x34 -#define OHCI_GET_IVAL(s) ((s) & 0x3fff) -#define OHCI_GET_FSMPS(s) (((s) >> 16) & 0x7fff) -#define OHCI_FIT 0x80000000 -#define OHCI_FM_REMAINING 0x38 -#define OHCI_FM_NUMBER 0x3c -#define OHCI_PERIODIC_START 0x40 -#define OHCI_LS_THRESHOLD 0x44 -#define OHCI_RH_DESCRIPTOR_A 0x48 -#define OHCI_GET_NDP(s) ((s) & 0xff) -#define OHCI_PSM 0x0100 /* Power Switching Mode */ -#define OHCI_NPS 0x0200 /* No Power Switching */ -#define OHCI_DT 0x0400 /* Device Type */ -#define OHCI_OCPM 0x0800 /* Overcurrent Protection Mode */ -#define OHCI_NOCP 0x1000 /* No Overcurrent Protection */ -#define OHCI_GET_POTPGT(s) ((s) >> 24) -#define OHCI_RH_DESCRIPTOR_B 0x4c -#define OHCI_RH_STATUS 0x50 -#define OHCI_LPS 0x00000001 /* Local Power Status */ -#define OHCI_OCI 0x00000002 /* OverCurrent Indicator */ -#define OHCI_DRWE 0x00008000 /* Device Remote Wakeup Enable */ -#define OHCI_LPSC 0x00010000 /* Local Power Status Change */ -#define OHCI_CCIC 0x00020000 /* OverCurrent Indicator - * Change */ -#define OHCI_CRWE 0x80000000 /* Clear Remote Wakeup Enable */ -#define OHCI_RH_PORT_STATUS(n) (0x50 + ((n)*4)) /* 1 based indexing */ - -#define OHCI_LES (OHCI_PLE | OHCI_IE | OHCI_CLE | OHCI_BLE) -#define OHCI_ALL_INTRS (OHCI_SO | OHCI_WDH | OHCI_SF | \ - OHCI_RD | OHCI_UE | OHCI_FNO | \ - OHCI_RHSC | OHCI_OC) -#define OHCI_NORMAL_INTRS (OHCI_WDH | OHCI_RD | OHCI_UE | OHCI_RHSC) - -#define OHCI_FSMPS(i) (((i-210)*6/7) << 16) -#define OHCI_PERIODIC(i) ((i)*9/10) - #define OHCI_NO_INTRS 32 #define OHCI_HCCA_SIZE 256 Modified: head/sys/dev/usb/controller/ohci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/ohci_atmelarm.c Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/ohci_atmelarm.c Thu Oct 15 20:07:08 2009 (r198151) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include Modified: head/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ohci_pci.c Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/ohci_pci.c Thu Oct 15 20:07:08 2009 (r198151) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define PCI_OHCI_VENDORID_ACERLABS 0x10b9 #define PCI_OHCI_VENDORID_AMD 0x1022 Added: head/sys/dev/usb/controller/ohcireg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/controller/ohcireg.h Thu Oct 15 20:07:08 2009 (r198151) @@ -0,0 +1,131 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 1998 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Lennart Augustsson (lennart@augustsson.net) at + * Carlstedt Research & Technology. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 THE FOUNDATION 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. + */ + +#ifndef _OHCIREG_H_ +#define _OHCIREG_H_ + +/* PCI config registers */ +#define PCI_CBMEM 0x10 /* configuration base memory */ +#define PCI_INTERFACE_OHCI 0x10 + +/* OHCI registers */ +#define OHCI_REVISION 0x00 /* OHCI revision */ +#define OHCI_REV_LO(rev) ((rev) & 0xf) +#define OHCI_REV_HI(rev) (((rev)>>4) & 0xf) +#define OHCI_REV_LEGACY(rev) ((rev) & 0x100) +#define OHCI_CONTROL 0x04 +#define OHCI_CBSR_MASK 0x00000003 /* Control/Bulk Service Ratio */ +#define OHCI_RATIO_1_1 0x00000000 +#define OHCI_RATIO_1_2 0x00000001 +#define OHCI_RATIO_1_3 0x00000002 +#define OHCI_RATIO_1_4 0x00000003 +#define OHCI_PLE 0x00000004 /* Periodic List Enable */ +#define OHCI_IE 0x00000008 /* Isochronous Enable */ +#define OHCI_CLE 0x00000010 /* Control List Enable */ +#define OHCI_BLE 0x00000020 /* Bulk List Enable */ +#define OHCI_HCFS_MASK 0x000000c0 /* HostControllerFunctionalStat + * e */ +#define OHCI_HCFS_RESET 0x00000000 +#define OHCI_HCFS_RESUME 0x00000040 +#define OHCI_HCFS_OPERATIONAL 0x00000080 +#define OHCI_HCFS_SUSPEND 0x000000c0 +#define OHCI_IR 0x00000100 /* Interrupt Routing */ +#define OHCI_RWC 0x00000200 /* Remote Wakeup Connected */ +#define OHCI_RWE 0x00000400 /* Remote Wakeup Enabled */ +#define OHCI_COMMAND_STATUS 0x08 +#define OHCI_HCR 0x00000001 /* Host Controller Reset */ +#define OHCI_CLF 0x00000002 /* Control List Filled */ +#define OHCI_BLF 0x00000004 /* Bulk List Filled */ +#define OHCI_OCR 0x00000008 /* Ownership Change Request */ +#define OHCI_SOC_MASK 0x00030000 /* Scheduling Overrun Count */ +#define OHCI_INTERRUPT_STATUS 0x0c +#define OHCI_SO 0x00000001 /* Scheduling Overrun */ +#define OHCI_WDH 0x00000002 /* Writeback Done Head */ +#define OHCI_SF 0x00000004 /* Start of Frame */ +#define OHCI_RD 0x00000008 /* Resume Detected */ +#define OHCI_UE 0x00000010 /* Unrecoverable Error */ +#define OHCI_FNO 0x00000020 /* Frame Number Overflow */ +#define OHCI_RHSC 0x00000040 /* Root Hub Status Change */ +#define OHCI_OC 0x40000000 /* Ownership Change */ +#define OHCI_MIE 0x80000000 /* Master Interrupt Enable */ +#define OHCI_INTERRUPT_ENABLE 0x10 +#define OHCI_INTERRUPT_DISABLE 0x14 +#define OHCI_HCCA 0x18 +#define OHCI_PERIOD_CURRENT_ED 0x1c +#define OHCI_CONTROL_HEAD_ED 0x20 +#define OHCI_CONTROL_CURRENT_ED 0x24 +#define OHCI_BULK_HEAD_ED 0x28 +#define OHCI_BULK_CURRENT_ED 0x2c +#define OHCI_DONE_HEAD 0x30 +#define OHCI_FM_INTERVAL 0x34 +#define OHCI_GET_IVAL(s) ((s) & 0x3fff) +#define OHCI_GET_FSMPS(s) (((s) >> 16) & 0x7fff) +#define OHCI_FIT 0x80000000 +#define OHCI_FM_REMAINING 0x38 +#define OHCI_FM_NUMBER 0x3c +#define OHCI_PERIODIC_START 0x40 +#define OHCI_LS_THRESHOLD 0x44 +#define OHCI_RH_DESCRIPTOR_A 0x48 +#define OHCI_GET_NDP(s) ((s) & 0xff) +#define OHCI_PSM 0x0100 /* Power Switching Mode */ +#define OHCI_NPS 0x0200 /* No Power Switching */ +#define OHCI_DT 0x0400 /* Device Type */ +#define OHCI_OCPM 0x0800 /* Overcurrent Protection Mode */ +#define OHCI_NOCP 0x1000 /* No Overcurrent Protection */ +#define OHCI_GET_POTPGT(s) ((s) >> 24) +#define OHCI_RH_DESCRIPTOR_B 0x4c +#define OHCI_RH_STATUS 0x50 +#define OHCI_LPS 0x00000001 /* Local Power Status */ +#define OHCI_OCI 0x00000002 /* OverCurrent Indicator */ +#define OHCI_DRWE 0x00008000 /* Device Remote Wakeup Enable */ +#define OHCI_LPSC 0x00010000 /* Local Power Status Change */ +#define OHCI_CCIC 0x00020000 /* OverCurrent Indicator + * Change */ +#define OHCI_CRWE 0x80000000 /* Clear Remote Wakeup Enable */ +#define OHCI_RH_PORT_STATUS(n) (0x50 + ((n)*4)) /* 1 based indexing */ + +#define OHCI_LES (OHCI_PLE | OHCI_IE | OHCI_CLE | OHCI_BLE) +#define OHCI_ALL_INTRS (OHCI_SO | OHCI_WDH | OHCI_SF | \ + OHCI_RD | OHCI_UE | OHCI_FNO | \ + OHCI_RHSC | OHCI_OC) +#define OHCI_NORMAL_INTRS (OHCI_WDH | OHCI_RD | OHCI_UE | OHCI_RHSC) + +#define OHCI_FSMPS(i) (((i-210)*6/7) << 16) +#define OHCI_PERIODIC(i) ((i)*9/10) + +#endif /* _OHCIREG_H_ */ Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/uhci.c Thu Oct 15 20:07:08 2009 (r198151) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define alt_next next #define UHCI_BUS2SC(bus) \ Modified: head/sys/dev/usb/controller/uhci.h ============================================================================== --- head/sys/dev/usb/controller/uhci.h Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/uhci.h Thu Oct 15 20:07:08 2009 (r198151) @@ -41,64 +41,6 @@ #define UHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) -/* PCI config registers */ -#define PCI_USBREV 0x60 /* USB protocol revision */ -#define PCI_USB_REV_MASK 0xff -#define PCI_USB_REV_PRE_1_0 0x00 -#define PCI_USB_REV_1_0 0x10 -#define PCI_USB_REV_1_1 0x11 -#define PCI_LEGSUP 0xc0 /* Legacy Support register */ -#define PCI_LEGSUP_USBPIRQDEN 0x2000 /* USB PIRQ D Enable */ -#define PCI_CBIO 0x20 /* configuration base IO */ -#define PCI_INTERFACE_UHCI 0x00 - -/* UHCI registers */ -#define UHCI_CMD 0x00 -#define UHCI_CMD_RS 0x0001 -#define UHCI_CMD_HCRESET 0x0002 -#define UHCI_CMD_GRESET 0x0004 -#define UHCI_CMD_EGSM 0x0008 -#define UHCI_CMD_FGR 0x0010 -#define UHCI_CMD_SWDBG 0x0020 -#define UHCI_CMD_CF 0x0040 -#define UHCI_CMD_MAXP 0x0080 -#define UHCI_STS 0x02 -#define UHCI_STS_USBINT 0x0001 -#define UHCI_STS_USBEI 0x0002 -#define UHCI_STS_RD 0x0004 -#define UHCI_STS_HSE 0x0008 -#define UHCI_STS_HCPE 0x0010 -#define UHCI_STS_HCH 0x0020 -#define UHCI_STS_ALLINTRS 0x003f -#define UHCI_INTR 0x04 -#define UHCI_INTR_TOCRCIE 0x0001 -#define UHCI_INTR_RIE 0x0002 -#define UHCI_INTR_IOCE 0x0004 -#define UHCI_INTR_SPIE 0x0008 -#define UHCI_FRNUM 0x06 -#define UHCI_FRNUM_MASK 0x03ff -#define UHCI_FLBASEADDR 0x08 -#define UHCI_SOF 0x0c -#define UHCI_SOF_MASK 0x7f -#define UHCI_PORTSC1 0x010 -#define UHCI_PORTSC2 0x012 -#define UHCI_PORTSC_CCS 0x0001 -#define UHCI_PORTSC_CSC 0x0002 -#define UHCI_PORTSC_PE 0x0004 -#define UHCI_PORTSC_POEDC 0x0008 -#define UHCI_PORTSC_LS 0x0030 -#define UHCI_PORTSC_LS_SHIFT 4 -#define UHCI_PORTSC_RD 0x0040 -#define UHCI_PORTSC_LSDA 0x0100 -#define UHCI_PORTSC_PR 0x0200 -#define UHCI_PORTSC_OCI 0x0400 -#define UHCI_PORTSC_OCIC 0x0800 -#define UHCI_PORTSC_SUSP 0x1000 - -#define URWMASK(x) ((x) & (UHCI_PORTSC_SUSP | \ - UHCI_PORTSC_PR | UHCI_PORTSC_RD | \ - UHCI_PORTSC_PE)) - #define UHCI_FRAMELIST_COUNT 1024 /* units */ #define UHCI_FRAMELIST_ALIGN 4096 /* bytes */ @@ -118,8 +60,6 @@ typedef uint32_t uhci_physaddr_t; #define UHCI_PTR_QH 0x00000002 #define UHCI_PTR_VF 0x00000004 -#define UHCI_QH_REMOVE_DELAY 5 /* us - QH remove delay */ - /* * The Queue Heads (QH) and Transfer Descriptors (TD) are accessed by * both the CPU and the USB-controller which run concurrently. Great Modified: head/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/uhci_pci.c Thu Oct 15 19:50:00 2009 (r198150) +++ head/sys/dev/usb/controller/uhci_pci.c Thu Oct 15 20:07:08 2009 (r198151) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define PCI_UHCI_VENDORID_INTEL 0x8086 #define PCI_UHCI_VENDORID_VIA 0x1106 Added: head/sys/dev/usb/controller/uhcireg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/controller/uhcireg.h Thu Oct 15 20:07:08 2009 (r198151) @@ -0,0 +1,100 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 1998 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Lennart Augustsson (lennart@augustsson.net) at + * Carlstedt Research & Technology. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 THE FOUNDATION 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. + */ + +#ifndef _UHCIREG_H_ +#define _UHCIREG_H_ + +/* PCI config registers */ +#define PCI_USBREV 0x60 /* USB protocol revision */ +#define PCI_USB_REV_MASK 0xff +#define PCI_USB_REV_PRE_1_0 0x00 +#define PCI_USB_REV_1_0 0x10 +#define PCI_USB_REV_1_1 0x11 +#define PCI_LEGSUP 0xc0 /* Legacy Support register */ +#define PCI_LEGSUP_USBPIRQDEN 0x2000 /* USB PIRQ D Enable */ +#define PCI_CBIO 0x20 /* configuration base IO */ +#define PCI_INTERFACE_UHCI 0x00 + +/* UHCI registers */ +#define UHCI_CMD 0x00 +#define UHCI_CMD_RS 0x0001 +#define UHCI_CMD_HCRESET 0x0002 +#define UHCI_CMD_GRESET 0x0004 +#define UHCI_CMD_EGSM 0x0008 +#define UHCI_CMD_FGR 0x0010 +#define UHCI_CMD_SWDBG 0x0020 +#define UHCI_CMD_CF 0x0040 +#define UHCI_CMD_MAXP 0x0080 +#define UHCI_STS 0x02 +#define UHCI_STS_USBINT 0x0001 +#define UHCI_STS_USBEI 0x0002 +#define UHCI_STS_RD 0x0004 +#define UHCI_STS_HSE 0x0008 +#define UHCI_STS_HCPE 0x0010 +#define UHCI_STS_HCH 0x0020 +#define UHCI_STS_ALLINTRS 0x003f +#define UHCI_INTR 0x04 +#define UHCI_INTR_TOCRCIE 0x0001 +#define UHCI_INTR_RIE 0x0002 +#define UHCI_INTR_IOCE 0x0004 +#define UHCI_INTR_SPIE 0x0008 +#define UHCI_FRNUM 0x06 +#define UHCI_FRNUM_MASK 0x03ff +#define UHCI_FLBASEADDR 0x08 +#define UHCI_SOF 0x0c +#define UHCI_SOF_MASK 0x7f +#define UHCI_PORTSC1 0x010 +#define UHCI_PORTSC2 0x012 +#define UHCI_PORTSC_CCS 0x0001 +#define UHCI_PORTSC_CSC 0x0002 +#define UHCI_PORTSC_PE 0x0004 +#define UHCI_PORTSC_POEDC 0x0008 +#define UHCI_PORTSC_LS 0x0030 +#define UHCI_PORTSC_LS_SHIFT 4 +#define UHCI_PORTSC_RD 0x0040 +#define UHCI_PORTSC_LSDA 0x0100 +#define UHCI_PORTSC_PR 0x0200 +#define UHCI_PORTSC_OCI 0x0400 +#define UHCI_PORTSC_OCIC 0x0800 +#define UHCI_PORTSC_SUSP 0x1000 + +#define URWMASK(x) ((x) & (UHCI_PORTSC_SUSP | \ + UHCI_PORTSC_PR | UHCI_PORTSC_RD | \ + UHCI_PORTSC_PE)) + +#endif /* _UHCIREG_H_ */ From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 20: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 2EFC2106566C; Thu, 15 Oct 2009 20:09:28 +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 1F2498FC16; Thu, 15 Oct 2009 20:09:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FK9SOQ083363; Thu, 15 Oct 2009 20:09:28 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FK9SLp083361; Thu, 15 Oct 2009 20:09:28 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200910152009.n9FK9SLp083361@svn.freebsd.org> From: Andrew Thompson Date: Thu, 15 Oct 2009 20:09: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: r198152 - head/sys/dev/usb/input X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 15 Oct 2009 20:09:28 -0000 Author: thompsa Date: Thu Oct 15 20:09:27 2009 New Revision: 198152 URL: http://svn.freebsd.org/changeset/base/198152 Log: Only poll ukbd if KDB is active. Submitted by: HPS Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Thu Oct 15 20:07:08 2009 (r198151) +++ head/sys/dev/usb/input/ukbd.c Thu Oct 15 20:09:27 2009 (r198152) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -328,6 +329,9 @@ ukbd_do_poll(struct ukbd_softc *sc, uint { DPRINTFN(2, "polling\n"); + if (kdb_active == 0) + return; /* Only poll if KDB is active */ + while (sc->sc_inputs == 0) { usbd_transfer_poll(sc->sc_xfer, UKBD_N_TRANSFER); From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 20:15: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 C5904106566C; Thu, 15 Oct 2009 20:15:29 +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 9BD458FC1C; Thu, 15 Oct 2009 20:15:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FKFTXN083520; Thu, 15 Oct 2009 20:15:29 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FKFTEQ083518; Thu, 15 Oct 2009 20:15:29 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200910152015.n9FKFTEQ083518@svn.freebsd.org> From: Andrew Thompson Date: Thu, 15 Oct 2009 20:15: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: r198153 - head/sys/dev/usb/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: Thu, 15 Oct 2009 20:15:29 -0000 Author: thompsa Date: Thu Oct 15 20:15:29 2009 New Revision: 198153 URL: http://svn.freebsd.org/changeset/base/198153 Log: Correct offset calcluation for the NCM implementation. Submitted by: HPS Modified: head/sys/dev/usb/net/if_cdce.c Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Thu Oct 15 20:09:27 2009 (r198152) +++ head/sys/dev/usb/net/if_cdce.c Thu Oct 15 20:15:29 2009 (r198153) @@ -1088,7 +1088,7 @@ cdce_ncm_fill_tx_frames(struct usb_xfer sc->sc_ncm.hdr.dwSignature[2] = 'M'; sc->sc_ncm.hdr.dwSignature[3] = 'H'; USETW(sc->sc_ncm.hdr.wHeaderLength, sizeof(sc->sc_ncm.hdr)); - USETW(sc->sc_ncm.hdr.wBlockLength, offset); + USETW(sc->sc_ncm.hdr.wBlockLength, last_offset); USETW(sc->sc_ncm.hdr.wSequence, sc->sc_ncm.tx_seq); USETW(sc->sc_ncm.hdr.wDptIndex, sizeof(sc->sc_ncm.hdr)); @@ -1243,25 +1243,24 @@ cdce_ncm_bulk_read_callback(struct usb_x offset = UGETW(sc->sc_ncm.dp[x].wFrameIndex); temp = UGETW(sc->sc_ncm.dp[x].wFrameLength); - if ((offset + temp) > actlen) { - DPRINTFN(1, "invalid frame detected (ignored)\n"); - m = NULL; - } else if (temp >= sizeof(struct ether_header)) { - /* - * allocate a suitable memory buffer, if - * possible - */ - if (temp > (MCLBYTES - ETHER_ALIGN)) { - m = NULL; - continue; - } if (temp > (MHLEN - ETHER_ALIGN)) { - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - } else { - m = m_gethdr(M_DONTWAIT, MT_DATA); - } + if ((offset == 0) || + (temp < sizeof(struct ether_header)) || + (temp > (MCLBYTES - ETHER_ALIGN))) { + DPRINTFN(1, "NULL frame detected at %d\n", x); + m = NULL; + /* silently ignore this frame */ + continue; + } else if ((offset + temp) > actlen) { + DPRINTFN(1, "invalid frame " + "detected at %d\n", x); + m = NULL; + /* silently ignore this frame */ + continue; + } else if (temp > (MHLEN - ETHER_ALIGN)) { + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); } else { - m = NULL; /* dump it */ + m = m_gethdr(M_DONTWAIT, MT_DATA); } DPRINTFN(16, "frame %u, offset = %u, length = %u \n", From owner-svn-src-head@FreeBSD.ORG Thu Oct 15 23:20: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 DA4A01065698; Thu, 15 Oct 2009 23:20: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 C9E588FC28; Thu, 15 Oct 2009 23:20:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9FNKN0m087418; Thu, 15 Oct 2009 23:20:23 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9FNKNCc087417; Thu, 15 Oct 2009 23:20:23 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200910152320.n9FNKNCc087417@svn.freebsd.org> From: Doug Barton Date: Thu, 15 Oct 2009 23:20: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: r198162 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 15 Oct 2009 23:20:24 -0000 Author: dougb Date: Thu Oct 15 23:20:23 2009 New Revision: 198162 URL: http://svn.freebsd.org/changeset/base/198162 Log: Allow $name_program to override $command in a more robust way that will not cause the value to be null if $command is not set. Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Thu Oct 15 21:20:12 2009 (r198161) +++ head/etc/rc.subr Thu Oct 15 23:20:23 2009 (r198162) @@ -616,7 +616,7 @@ run_rc_command() esac eval _override_command=\$${name}_program - command=${command:+${_override_command:-$command}} + command=${_override_command:-$command} _keywords="start stop restart rcvar $extra_commands" rc_pid= From owner-svn-src-head@FreeBSD.ORG Fri Oct 16 04:58: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 DC97F106566C; Fri, 16 Oct 2009 04:58:09 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 5F0CE8FC08; Fri, 16 Oct 2009 04:58:08 +0000 (UTC) Received: from c122-107-125-150.carlnfd1.nsw.optusnet.com.au (c122-107-125-150.carlnfd1.nsw.optusnet.com.au [122.107.125.150]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n9G4w5lc007707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Oct 2009 15:58:06 +1100 Date: Fri, 16 Oct 2009 15:58:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Robert Watson In-Reply-To: <200910151031.n9FAVOvU070664@svn.freebsd.org> Message-ID: <20091016154905.E8438@delplex.bde.org> References: <200910151031.n9FAVOvU070664@svn.freebsd.org> 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: r198118 - 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: Fri, 16 Oct 2009 04:58:10 -0000 On Thu, 15 Oct 2009, Robert Watson wrote: > Log: > Print routing statistics as unsigned short rather than unsigned int, > otherwise sign extension leads to unlikely values when in the negative > range of the signed short structure fields that hold the statistics. > The type used to hold routing statistics is arguably also incorrect. This enlarges the bug. With signed types you get advance warning of overflow (you actually get overflow earlier but it usually just results in obviously wrong values being printed), and repeated warnings on overflow (every time the overflowing values wrap back to negative). With unsigned types or this change, you get unobviously wrong values after the first overflow, and no repeated warnings (unless you watch the values carefully enough to see them go backwards). Using unsigned bytes only delays the overflow for a whole factor of 2. Bruce From owner-svn-src-head@FreeBSD.ORG Fri Oct 16 05:09: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 B8A151065692; Fri, 16 Oct 2009 05:09:42 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 44B3A8FC08; Fri, 16 Oct 2009 05:09:40 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id IAA06985; Fri, 16 Oct 2009 08:09:39 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Myf4N-0006Xa-1V; Fri, 16 Oct 2009 08:09:39 +0300 Message-ID: <4AD80002.6000704@freebsd.org> Date: Fri, 16 Oct 2009 08:09:22 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090823) MIME-Version: 1.0 To: src-committers@freebsd.org References: <200910152007.n9FK78cG083259@svn.freebsd.org> In-Reply-To: <200910152007.n9FK78cG083259@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r198151 - in head/sys/dev: pci usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 16 Oct 2009 05:09:42 -0000 on 15/10/2009 23:07 Andrew Thompson said the following: > Author: thompsa > Date: Thu Oct 15 20:07:08 2009 > New Revision: 198151 > URL: http://svn.freebsd.org/changeset/base/198151 > > Log: > Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover for > all host controllers at the same time, we avoid problems where the BIOS will > actually write to the USB registers of all the USB host controllers every time > we handover one of them, and consequently reset the OS programmed values. This should fix the boot-time problems with AMD SB600/SB7xx controllers. Many thanks to Hans for a lot of help. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Fri Oct 16 12:01: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 689941065679; Fri, 16 Oct 2009 12:01:00 +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 3E2398FC12; Fri, 16 Oct 2009 12:01:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9GC102E003293; Fri, 16 Oct 2009 12:01:00 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9GC103B003290; Fri, 16 Oct 2009 12:01:00 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910161201.n9GC103B003290@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Oct 2009 12:01: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: r198170 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 16 Oct 2009 12:01:00 -0000 Author: kib Date: Fri Oct 16 12:00:59 2009 New Revision: 198170 URL: http://svn.freebsd.org/changeset/base/198170 Log: Move intr_describe() out of #ifdef SMP; the function is always required. Reviewed by: jhb Modified: head/sys/amd64/amd64/intr_machdep.c head/sys/i386/i386/intr_machdep.c Modified: head/sys/amd64/amd64/intr_machdep.c ============================================================================== --- head/sys/amd64/amd64/intr_machdep.c Fri Oct 16 11:00:26 2009 (r198169) +++ head/sys/amd64/amd64/intr_machdep.c Fri Oct 16 12:00:59 2009 (r198170) @@ -400,6 +400,23 @@ atpic_reset(void) } #endif +/* Add a description to an active interrupt handler. */ +int +intr_describe(u_int vector, void *ih, const char *descr) +{ + struct intsrc *isrc; + int error; + + isrc = intr_lookup_source(vector); + if (isrc == NULL) + return (EINVAL); + error = intr_event_describe_handler(isrc->is_event, ih, descr); + if (error) + return (error); + intrcnt_updatename(isrc); + return (0); +} + #ifdef DDB /* * Dump data about interrupt handlers @@ -466,23 +483,6 @@ intr_bind(u_int vector, u_char cpu) return (intr_event_bind(isrc->is_event, cpu)); } -/* Add a description to an active interrupt handler. */ -int -intr_describe(u_int vector, void *ih, const char *descr) -{ - struct intsrc *isrc; - int error; - - isrc = intr_lookup_source(vector); - if (isrc == NULL) - return (EINVAL); - error = intr_event_describe_handler(isrc->is_event, ih, descr); - if (error) - return (error); - intrcnt_updatename(isrc); - return (0); -} - /* * Add a CPU to our mask of valid CPUs that can be destinations of * interrupts. Modified: head/sys/i386/i386/intr_machdep.c ============================================================================== --- head/sys/i386/i386/intr_machdep.c Fri Oct 16 11:00:26 2009 (r198169) +++ head/sys/i386/i386/intr_machdep.c Fri Oct 16 12:00:59 2009 (r198170) @@ -366,6 +366,23 @@ intr_init(void *dummy __unused) } SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL); +/* Add a description to an active interrupt handler. */ +int +intr_describe(u_int vector, void *ih, const char *descr) +{ + struct intsrc *isrc; + int error; + + isrc = intr_lookup_source(vector); + if (isrc == NULL) + return (EINVAL); + error = intr_event_describe_handler(isrc->is_event, ih, descr); + if (error) + return (error); + intrcnt_updatename(isrc); + return (0); +} + #ifdef DDB /* * Dump data about interrupt handlers @@ -432,23 +449,6 @@ intr_bind(u_int vector, u_char cpu) return (intr_event_bind(isrc->is_event, cpu)); } -/* Add a description to an active interrupt handler. */ -int -intr_describe(u_int vector, void *ih, const char *descr) -{ - struct intsrc *isrc; - int error; - - isrc = intr_lookup_source(vector); - if (isrc == NULL) - return (EINVAL); - error = intr_event_describe_handler(isrc->is_event, ih, descr); - if (error) - return (error); - intrcnt_updatename(isrc); - return (0); -} - /* * Add a CPU to our mask of valid CPUs that can be destinations of * interrupts. From owner-svn-src-head@FreeBSD.ORG Fri Oct 16 12: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 96AE6106566C; Fri, 16 Oct 2009 12:32:07 +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 857D98FC1B; Fri, 16 Oct 2009 12:32:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9GCW79b003888; Fri, 16 Oct 2009 12:32:07 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9GCW77a003886; Fri, 16 Oct 2009 12:32:07 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200910161232.n9GCW77a003886@svn.freebsd.org> From: Christian Brueffer Date: Fri, 16 Oct 2009 12: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: r198171 - 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, 16 Oct 2009 12:32:07 -0000 Author: brueffer Date: Fri Oct 16 12:32:07 2009 New Revision: 198171 URL: http://svn.freebsd.org/changeset/base/198171 Log: Sort SEE ALSO. Modified: head/share/man/man9/BUS_DESCRIBE_INTR.9 Modified: head/share/man/man9/BUS_DESCRIBE_INTR.9 ============================================================================== --- head/share/man/man9/BUS_DESCRIBE_INTR.9 Fri Oct 16 12:00:59 2009 (r198170) +++ head/share/man/man9/BUS_DESCRIBE_INTR.9 Fri Oct 16 12:32:07 2009 (r198171) @@ -88,10 +88,10 @@ the interrupt handler name. Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO .Xr BUS_SETUP_INTR 9 , -.Xr device 9 , -.Xr printf 9 , .Xr systat 1 , -.Xr vmstat 8 +.Xr vmstat 8 , +.Xr device 9 , +.Xr printf 9 .Sh HISTORY The .Fn BUS_DESCRIBE_INTR From owner-svn-src-head@FreeBSD.ORG Fri Oct 16 16:17: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 26FCA1065694; Fri, 16 Oct 2009 16:17:58 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 168848FC12; Fri, 16 Oct 2009 16:17:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9GGHvY9008235; Fri, 16 Oct 2009 16:17:57 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9GGHvpt008234; Fri, 16 Oct 2009 16:17:57 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200910161617.n9GGHvpt008234@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 16 Oct 2009 16:17: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: r198173 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 16 Oct 2009 16:17:58 -0000 Author: jilles Date: Fri Oct 16 16:17:57 2009 New Revision: 198173 URL: http://svn.freebsd.org/changeset/base/198173 Log: sh: Show more information about syntax errors in command substitution: the line number where the command substitution started. This applies to both the $() and `` forms but is most useful for `` because the other line number is relative to the enclosed text there. (For older versions, -v can be used as a workaround.) Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Fri Oct 16 12:42:02 2009 (r198172) +++ head/bin/sh/parser.c Fri Oct 16 16:17:57 2009 (r198173) @@ -1308,11 +1308,16 @@ parsebackq: { struct jmploc *const savehandler = handler; int savelen; int saveprompt; + const int bq_startlinno = plinno; if (setjmp(jmploc.loc)) { if (str) ckfree(str); handler = savehandler; + if (exception == EXERROR) { + startlinno = bq_startlinno; + synerror("Error in command substitution"); + } longjmp(handler->loc, 1); } INTOFF; From owner-svn-src-head@FreeBSD.ORG Fri Oct 16 16:28: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 16F76106568D; Fri, 16 Oct 2009 16:28:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id DC8F68FC24; Fri, 16 Oct 2009 16:28:04 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 75CF846B1A; Fri, 16 Oct 2009 12:28:04 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id B7AD28A01B; Fri, 16 Oct 2009 12:28:03 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Fri, 16 Oct 2009 07:37:27 -0400 User-Agent: KMail/1.9.7 References: <200910152007.n9FK78cG083259@svn.freebsd.org> <4AD80002.6000704@freebsd.org> In-Reply-To: <4AD80002.6000704@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910160737.28222.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 16 Oct 2009 12:28:03 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198151 - in head/sys/dev: pci usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 16 Oct 2009 16:28:05 -0000 On Friday 16 October 2009 1:09:22 am Andriy Gapon wrote: > on 15/10/2009 23:07 Andrew Thompson said the following: > > Author: thompsa > > Date: Thu Oct 15 20:07:08 2009 > > New Revision: 198151 > > URL: http://svn.freebsd.org/changeset/base/198151 > > > > Log: > > Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover for > > all host controllers at the same time, we avoid problems where the BIOS will > > actually write to the USB registers of all the USB host controllers every time > > we handover one of them, and consequently reset the OS programmed values. > > This should fix the boot-time problems with AMD SB600/SB7xx controllers. > Many thanks to Hans for a lot of help. At least one other system also exhibits this: Intel D850 motherboards (P4 system with RDRAM). I think there is an amd64 PR about this as well that may be for yet another system. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Oct 16 16:28: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 8E96510656A9; Fri, 16 Oct 2009 16:28:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6089B8FC24; Fri, 16 Oct 2009 16:28:09 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 1314346B2D; Fri, 16 Oct 2009 12:28:09 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 46EA38A01B; Fri, 16 Oct 2009 12:28:08 -0400 (EDT) From: John Baldwin To: Christian Brueffer Date: Fri, 16 Oct 2009 09:50:38 -0400 User-Agent: KMail/1.9.7 References: <200910161232.n9GCW77a003886@svn.freebsd.org> In-Reply-To: <200910161232.n9GCW77a003886@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910160950.39342.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 16 Oct 2009 12:28:08 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198171 - 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, 16 Oct 2009 16:28:09 -0000 On Friday 16 October 2009 8:32:07 am Christian Brueffer wrote: > Author: brueffer > Date: Fri Oct 16 12:32:07 2009 > New Revision: 198171 > URL: http://svn.freebsd.org/changeset/base/198171 > > Log: > Sort SEE ALSO. Ah, I couldn't recall if the section number was a primary key or not. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Oct 16 19:30: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 520651065692; Fri, 16 Oct 2009 19:30:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 411698FC12; Fri, 16 Oct 2009 19:30:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9GJUnSq011725; Fri, 16 Oct 2009 19:30:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9GJUnHD011723; Fri, 16 Oct 2009 19:30:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910161930.n9GJUnHD011723@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Oct 2009 19:30: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: r198174 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 16 Oct 2009 19:30:49 -0000 Author: jhb Date: Fri Oct 16 19:30:48 2009 New Revision: 198174 URL: http://svn.freebsd.org/changeset/base/198174 Log: Close a race with caching of -ve name lookups in the NFS client. Specifically, clients only trust -ve cache entries while the directory remains unchanged and discard any -ve cache entries for a directory when they notice that the modification time of a directory entry changes. The race involves two concurrent lookups as follows: - Thread A does a lookup for file 'foo' which sends a lookup RPC to the server. The lookup fails and the server replies. - The 'foo' file is created (either by the same client or a different client) updating the modification time on the parent directory of 'foo'. - Thread B does a lookup for a different file 'bar' which updates the cached attributes of the parent directory of 'foo' to reflect the new modification time after 'foo' was created. - Thread A finally resumes execution to parse the reply from the NFS server. It adds a -ve cache entry and sets the cached value of the directory's modification time that is used for invalidating -ve cached lookups to the new modification time set by thread B. At this point, future lookups of 'foo' will honor the -ve cached entry until the cached entry is pushed out of the name cache's LRU or the modification time of the parent directory is changed again by some other change. The fix is to read the directory's modification time before sending the lookup RPC and use that cached modification time when setting the directory's cached modification time. Also, we do not add a -ve cache entry if another thread has added -ve cache entry that set the directory's cached modification time to a newer value than the value we read before sending the lookup RPC. Reviewed by: rmacklem MFC after: 1 week Modified: head/sys/nfsclient/nfs_vnops.c Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Fri Oct 16 16:17:57 2009 (r198173) +++ head/sys/nfsclient/nfs_vnops.c Fri Oct 16 19:30:48 2009 (r198174) @@ -924,6 +924,7 @@ nfs_lookup(struct vop_lookup_args *ap) struct vnode **vpp = ap->a_vpp; struct mount *mp = dvp->v_mount; struct vattr vattr; + time_t dmtime; int flags = cnp->cn_flags; struct vnode *newvp; struct nfsmount *nmp; @@ -935,7 +936,7 @@ nfs_lookup(struct vop_lookup_args *ap) int error = 0, attrflag, fhsize, ltype; int v3 = NFS_ISV3(dvp); struct thread *td = cnp->cn_thread; - + *vpp = NULLVP; if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) @@ -992,6 +993,19 @@ nfs_lookup(struct vop_lookup_args *ap) np->n_dmtime = 0; mtx_unlock(&np->n_mtx); } + + /* + * Cache the modification time of the parent directory in case + * the lookup fails and results in adding the first negative + * name cache entry for the directory. Since this is reading + * a single time_t, don't bother with locking. The + * modification time may be a bit stale, but it must be read + * before performing the lookup RPC to prevent a race where + * another lookup updates the timestamp on the directory after + * the lookup RPC has been performed on the server but before + * n_dmtime is set at the end of this function. + */ + dmtime = np->n_vattr.va_mtime.tv_sec; error = 0; newvp = NULLVP; nfsstats.lookupcache_misses++; @@ -1130,13 +1144,25 @@ nfsmout: * Maintain n_dmtime as the modification time * of the parent directory when the oldest -ve * name cache entry for this directory was - * added. + * added. If a -ve cache entry has already + * been added with a newer modification time + * by a concurrent lookup, then don't bother + * adding a cache entry. The modification + * time of the directory might have changed + * due to the file this lookup failed to find + * being created. In that case a subsequent + * lookup would incorrectly use the entry + * added here instead of doing an extra + * lookup. */ mtx_lock(&np->n_mtx); - if (np->n_dmtime == 0) - np->n_dmtime = np->n_vattr.va_mtime.tv_sec; - mtx_unlock(&np->n_mtx); - cache_enter(dvp, NULL, cnp); + if (np->n_dmtime <= dmtime) { + if (np->n_dmtime == 0) + np->n_dmtime = dmtime; + mtx_unlock(&np->n_mtx); + cache_enter(dvp, NULL, cnp); + } else + mtx_unlock(&np->n_mtx); } return (ENOENT); } From owner-svn-src-head@FreeBSD.ORG Fri Oct 16 19:51: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 728CD1065693; Fri, 16 Oct 2009 19:51:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 44D058FC20; Fri, 16 Oct 2009 19:51:52 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id EBA9C46B32; Fri, 16 Oct 2009 15:51:51 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 2A0638A021; Fri, 16 Oct 2009 15:51:51 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Fri, 16 Oct 2009 15:51:35 -0400 User-Agent: KMail/1.9.7 References: <200910161930.n9GJUnHD011723@svn.freebsd.org> In-Reply-To: <200910161930.n9GJUnHD011723@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910161551.35583.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 16 Oct 2009 15:51:51 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r198174 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 16 Oct 2009 19:51:52 -0000 On Friday 16 October 2009 3:30:49 pm John Baldwin wrote: > Author: jhb > Date: Fri Oct 16 19:30:48 2009 > New Revision: 198174 > URL: http://svn.freebsd.org/changeset/base/198174 > > Log: > Close a race with caching of -ve name lookups in the NFS client. > Specifically, clients only trust -ve cache entries while the directory > remains unchanged and discard any -ve cache entries for a directory when > they notice that the modification time of a directory entry changes. The > race involves two concurrent lookups as follows: > - Thread A does a lookup for file 'foo' which sends a lookup RPC to the > server. The lookup fails and the server replies. > - The 'foo' file is created (either by the same client or a different > client) updating the modification time on the parent directory of 'foo'. > - Thread B does a lookup for a different file 'bar' which updates the > cached attributes of the parent directory of 'foo' to reflect the new > modification time after 'foo' was created. > - Thread A finally resumes execution to parse the reply from the NFS > server. It adds a -ve cache entry and sets the cached value of the > directory's modification time that is used for invalidating -ve cached > lookups to the new modification time set by thread B. Slight correction, the file has to be created on a different client since the local client would exclusively lock the directory vnode while it created the file avoiding this race. I created the file on a separate client when I reproduced this during testing (I used a hack to force a 5 second sleep when adding -ve cache entries to let thread B do its lookup and update the mtime before thread A tried to add its -ve cache entry to "force" the race). I have seen this in practice in a couple of cases at work where an ls of a directory would show a file that was added, but attempting to open the file itself or even ls the individual file would fail with ENOENT. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Oct 16 20:52: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 A35D21065676; Fri, 16 Oct 2009 20:52:45 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9203D8FC1A; Fri, 16 Oct 2009 20:52:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9GKqjUN013244; Fri, 16 Oct 2009 20:52:45 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9GKqjOd013242; Fri, 16 Oct 2009 20:52:45 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <200910162052.n9GKqjOd013242@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 16 Oct 2009 20:52: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: r198175 - head/usr.bin/touch X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 16 Oct 2009 20:52:45 -0000 Author: jh Date: Fri Oct 16 20:52:45 2009 New Revision: 198175 URL: http://svn.freebsd.org/changeset/base/198175 Log: - If lstat()/stat() fails with an error other than ENOENT, don't ignore the error and assume that the file doesn't exist. Touch could return success with -c option even if the file existed and time was not set. - If the first utimes_f() call fails with -A option, give up and don't continue trying to set times to current time. [1] - Set exit status to 1 when setting of timestamps fails for a directory or symbolic link even though lstat()/stat() would succeed. - Don't print bogus error message when rw() succeeds. PR: bin/112213 Submitted by: jilles [1] Reviewed by: jilles Approved by: trasz (mentor) Modified: head/usr.bin/touch/touch.c Modified: head/usr.bin/touch/touch.c ============================================================================== --- head/usr.bin/touch/touch.c Fri Oct 16 19:30:48 2009 (r198174) +++ head/usr.bin/touch/touch.c Fri Oct 16 20:52:45 2009 (r198175) @@ -164,6 +164,11 @@ main(int argc, char *argv[]) for (rval = 0; *argv; ++argv) { /* See if the file exists. */ if (stat_f(*argv, &sb) != 0) { + if (errno != ENOENT) { + rval = 1; + warn("%s", *argv); + continue; + } if (!cflag) { /* Create the file. */ fd = open(*argv, @@ -206,7 +211,7 @@ main(int argc, char *argv[]) continue; /* If the user specified a time, nothing else we can do. */ - if (timeset) { + if (timeset || Aflag) { rval = 1; warn("%s", *argv); continue; @@ -222,11 +227,13 @@ main(int argc, char *argv[]) continue; /* Try reading/writing. */ - if (!S_ISLNK(sb.st_mode) && !S_ISDIR(sb.st_mode) && - rw(*argv, &sb, fflag)) + if (!S_ISLNK(sb.st_mode) && !S_ISDIR(sb.st_mode)) { + if (rw(*argv, &sb, fflag)) + rval = 1; + } else { rval = 1; - else warn("%s", *argv); + } } exit(rval); } From owner-svn-src-head@FreeBSD.ORG Fri Oct 16 23:32: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 8EA1A1065692; Fri, 16 Oct 2009 23:32:38 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from fallbackmx10.syd.optusnet.com.au (fallbackmx10.syd.optusnet.com.au [211.29.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 1B6D28FC1A; Fri, 16 Oct 2009 23:32:37 +0000 (UTC) Received: from mail11.syd.optusnet.com.au (mail11.syd.optusnet.com.au [211.29.132.192]) by fallbackmx10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n9GLd2Df019560; Sat, 17 Oct 2009 08:39:02 +1100 Received: from server.vk2pj.dyndns.org (c122-106-233-13.belrs3.nsw.optusnet.com.au [122.106.233.13]) by mail11.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n9GLcxM2029439 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 17 Oct 2009 08:39:00 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id n9GLcwZ4039498; Sat, 17 Oct 2009 08:38:59 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id n9GLcwki039497; Sat, 17 Oct 2009 08:38:58 +1100 (EST) (envelope-from peter) Date: Sat, 17 Oct 2009 08:38:58 +1100 From: Peter Jeremy To: John Baldwin Message-ID: <20091016213858.GA38569@server.vk2pj.dyndns.org> References: <200910151454.n9FEsZCr076621@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <200910151454.n9FEsZCr076621@svn.freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198134 - in head: share/man/man9 sys/amd64/amd64 sys/amd64/include sys/i386/i386 sys/i386/include sys/kern 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: Fri, 16 Oct 2009 23:32:38 -0000 --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2009-Oct-15 14:54:35 +0000, John Baldwin wrote: > Add a facility for associating optional descriptions with active interru= pt > handlers. This is primarily intended as a way to allow devices that use > multiple interrupts (e.g. MSI) to meaningfully distinguish the various > interrupt handlers. This appears to be the cause of my latest non-SMP i386 build breaking. (And by code inspection, amd64 is similarly broken). The problem is that the intr_describe() definitions are inside (large) #ifdef SMP blocks, whilst the reference is not similarly protected. code inspection) --=20 Peter Jeremy --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iEYEARECAAYFAkrY5/IACgkQ/opHv/APuIegRACaA4fx01AwDzICOHbd3KJ92Trh LYEAn1I3417I7GtMdAEq3UihsSJLlJcS =JIsl -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd-- From owner-svn-src-head@FreeBSD.ORG Sat Oct 17 00:33: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 5A8201065670; Sat, 17 Oct 2009 00:33:56 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49C9D8FC08; Sat, 17 Oct 2009 00:33:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9H0XtfR018715; Sat, 17 Oct 2009 00:33:55 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9H0Xtl4018713; Sat, 17 Oct 2009 00:33:55 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <200910170033.n9H0Xtl4018713@svn.freebsd.org> From: Neel Natu Date: Sat, 17 Oct 2009 00:33: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: r198183 - 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, 17 Oct 2009 00:33:56 -0000 Author: neel Date: Sat Oct 17 00:33:55 2009 New Revision: 198183 URL: http://svn.freebsd.org/changeset/base/198183 Log: Add myself. Approved by: imp (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Sat Oct 17 00:22:07 2009 (r198182) +++ head/share/misc/committers-src.dot Sat Oct 17 00:33:55 2009 (r198183) @@ -138,6 +138,7 @@ mjacob [label="Matt Jacob\nmjacob@FreeBS mlaier [label="Max Laier\nmlaier@FreeBSD.org\n2004/02/10"] mr [label="Michael Reifenberger\nmr@FreeBSD.org\n2001/09/30"] murray [label="Murray Stokely\nmurray@FreeBSD.org\n2000/04/05"] +neel [label="Neel Natu\nneel@FreeBSD.org\n2009/09/20"] netchild [label="Alexander Leidinger\nnetchild@FreeBSD.org\n2005/03/31"] njl [label="Nate Lawson\nnjl@FreeBSD.org\n2002/08/07"] nork [label="Norikatsu Shigemura\nnork@FreeBSD.org\n2009/06/09"] @@ -289,6 +290,7 @@ imp -> jon imp -> keichii imp -> mb imp -> mr +imp -> neel imp -> non imp -> nork imp -> onoe From owner-svn-src-head@FreeBSD.ORG Sat Oct 17 08:59: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 1A9E0106566B; Sat, 17 Oct 2009 08:59:42 +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 0A5F28FC13; Sat, 17 Oct 2009 08:59:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9H8xfXD028025; Sat, 17 Oct 2009 08:59:41 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9H8xf7X028023; Sat, 17 Oct 2009 08:59:41 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200910170859.n9H8xf7X028023@svn.freebsd.org> From: Ed Schouten Date: Sat, 17 Oct 2009 08:59: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: r198185 - 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: Sat, 17 Oct 2009 08:59:42 -0000 Author: ed Date: Sat Oct 17 08:59:41 2009 New Revision: 198185 URL: http://svn.freebsd.org/changeset/base/198185 Log: Print backspaces after echoing an EOF. Applications like shells expect EOF to give no graphical output, while our implementation prints ^D by default (tunable with stty echoctl). Make the new implementation behave like the old TTY code. Print two backspaces afterwards. Reported by: koitsu MFC after: 1 month Modified: head/sys/kern/tty_ttydisc.c Modified: head/sys/kern/tty_ttydisc.c ============================================================================== --- head/sys/kern/tty_ttydisc.c Sat Oct 17 08:58:01 2009 (r198184) +++ head/sys/kern/tty_ttydisc.c Sat Oct 17 08:59:41 2009 (r198185) @@ -624,15 +624,21 @@ ttydisc_echo_force(struct tty *tp, char /* * Only use ^X notation when ECHOCTL is turned on and * we've got an quoted control character. + * + * Print backspaces when echoing an end-of-file. */ - char ob[2] = { '^', '?' }; + char ob[4] = "^?\b\b"; /* Print ^X notation. */ if (c != 0x7f) ob[1] = c + 'A' - 1; - tp->t_column += 2; - return ttyoutq_write_nofrag(&tp->t_outq, ob, 2); + if (!quote && CMP_CC(VEOF, c)) { + return ttyoutq_write_nofrag(&tp->t_outq, ob, 4); + } else { + tp->t_column += 2; + return ttyoutq_write_nofrag(&tp->t_outq, ob, 2); + } } else { /* Can just be printed. */ tp->t_column++; From owner-svn-src-head@FreeBSD.ORG Sat Oct 17 15:05: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 D497B106566B; Sat, 17 Oct 2009 15:05:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A2BB38FC1B; Sat, 17 Oct 2009 15:05:46 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3BA6346B0D; Sat, 17 Oct 2009 11:05:46 -0400 (EDT) Received: from zion.baldwin.cx (pool-71-187-24-58.nwrknj.fios.verizon.net [71.187.24.58]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 876048A01B; Sat, 17 Oct 2009 11:05:45 -0400 (EDT) From: John Baldwin To: Peter Jeremy Date: Sat, 17 Oct 2009 11:00:59 -0400 User-Agent: KMail/1.11.3 (FreeBSD/7.2-STABLE; KDE/4.2.3; i386; ; ) References: <200910151454.n9FEsZCr076621@svn.freebsd.org> <20091016213858.GA38569@server.vk2pj.dyndns.org> In-Reply-To: <20091016213858.GA38569@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910171100.59915.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Sat, 17 Oct 2009 11:05:45 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=BAYES_00, FH_HOST_EQ_VERIZON_P, RDNS_DYNAMIC autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198134 - in head: share/man/man9 sys/amd64/amd64 sys/amd64/include sys/i386/i386 sys/i386/include sys/kern 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: Sat, 17 Oct 2009 15:05:46 -0000 On Friday 16 October 2009 05:38:58 pm Peter Jeremy wrote: > On 2009-Oct-15 14:54:35 +0000, John Baldwin wrote: > > Add a facility for associating optional descriptions with active > > interrupt handlers. This is primarily intended as a way to allow devices > > that use multiple interrupts (e.g. MSI) to meaningfully distinguish the > > various interrupt handlers. > > This appears to be the cause of my latest non-SMP i386 build breaking. > (And by code inspection, amd64 is similarly broken). > > The problem is that the intr_describe() definitions are inside (large) > #ifdef SMP blocks, whilst the reference is not similarly protected. > code inspection) I believe kib@ fixed this yesterday already? -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Sat Oct 17 15:53: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 4E27D106566C; Sat, 17 Oct 2009 15:53:16 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA198FC12; Sat, 17 Oct 2009 15:53:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9HFrFml045490; Sat, 17 Oct 2009 15:53:15 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9HFrFCf045488; Sat, 17 Oct 2009 15:53:15 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200910171553.n9HFrFCf045488@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 17 Oct 2009 15:53: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: r198189 - head/bin/csh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 17 Oct 2009 15:53:16 -0000 Author: ume Date: Sat Oct 17 15:53:15 2009 New Revision: 198189 URL: http://svn.freebsd.org/changeset/base/198189 Log: Check error of dlfunc(3). MFC after: 3 days Modified: head/bin/csh/iconv_stub.c Modified: head/bin/csh/iconv_stub.c ============================================================================== --- head/bin/csh/iconv_stub.c Sat Oct 17 13:42:23 2009 (r198188) +++ head/bin/csh/iconv_stub.c Sat Oct 17 15:53:15 2009 (r198189) @@ -61,9 +61,20 @@ dl_iconv_open(const char *tocode, const if (iconvlib == NULL) return (iconv_t)-1; iconv_open = (iconv_open_t *)dlfunc(iconvlib, ICONV_OPEN); + if (iconv_open == NULL) + goto dlfunc_err; dl_iconv = (dl_iconv_t *)dlfunc(iconvlib, ICONV_ENGINE); + if (dl_iconv == NULL) + goto dlfunc_err; dl_iconv_close = (dl_iconv_close_t *)dlfunc(iconvlib, ICONV_CLOSE); + if (dl_iconv_close == NULL) + goto dlfunc_err; } return iconv_open(tocode, fromcode); + +dlfunc_err: + dlclose(iconvlib); + iconvlib = NULL; + return (iconv_t)-1; } From owner-svn-src-head@FreeBSD.ORG Sat Oct 17 21: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 BD18E1065692; Sat, 17 Oct 2009 21:09:15 +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 ACA7C8FC12; Sat, 17 Oct 2009 21:09:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9HL9FHc051035; Sat, 17 Oct 2009 21:09:15 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9HL9FEE051034; Sat, 17 Oct 2009 21:09:15 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200910172109.n9HL9FEE051034@svn.freebsd.org> From: Doug Barton Date: Sat, 17 Oct 2009 21:09: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: r198190 - head/etc/rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 17 Oct 2009 21:09:15 -0000 Author: dougb Date: Sat Oct 17 21:09:15 2009 New Revision: 198190 URL: http://svn.freebsd.org/changeset/base/198190 Log: Remove a circular dependency on routing Submitted by: Mykola Dzham Approved by: hrs Modified: head/etc/rc.d/faith head/etc/rc.d/stf Modified: head/etc/rc.d/faith ============================================================================== --- head/etc/rc.d/faith Sat Oct 17 15:53:15 2009 (r198189) +++ head/etc/rc.d/faith Sat Oct 17 21:09:15 2009 (r198190) @@ -3,7 +3,7 @@ # # PROVIDE: faith -# REQUIRE: netif routing +# REQUIRE: netif # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/stf ============================================================================== --- head/etc/rc.d/stf Sat Oct 17 15:53:15 2009 (r198189) +++ head/etc/rc.d/stf Sat Oct 17 21:09:15 2009 (r198190) @@ -3,7 +3,7 @@ # # PROVIDE: stf -# REQUIRE: netif routing +# REQUIRE: netif # KEYWORD: nojail . /etc/rc.subr From owner-svn-src-head@FreeBSD.ORG Sat Oct 17 22:11: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 A07371065698; Sat, 17 Oct 2009 22:11:22 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail11.syd.optusnet.com.au (mail11.syd.optusnet.com.au [211.29.132.192]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2638FC27; Sat, 17 Oct 2009 22:11:21 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-233-13.belrs3.nsw.optusnet.com.au [122.106.233.13]) by mail11.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n9HMBJhl032739 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Oct 2009 09:11:20 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id n9HMBJ3J018506; Sun, 18 Oct 2009 09:11:19 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id n9HMBJnV018505; Sun, 18 Oct 2009 09:11:19 +1100 (EST) (envelope-from peter) Date: Sun, 18 Oct 2009 09:11:19 +1100 From: Peter Jeremy To: John Baldwin Message-ID: <20091017221118.GH38569@server.vk2pj.dyndns.org> References: <200910151454.n9FEsZCr076621@svn.freebsd.org> <20091016213858.GA38569@server.vk2pj.dyndns.org> <200910171100.59915.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xQmOcGOVkeO43v2v" Content-Disposition: inline In-Reply-To: <200910171100.59915.jhb@freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198134 - in head: share/man/man9 sys/amd64/amd64 sys/amd64/include sys/i386/i386 sys/i386/include sys/kern 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: Sat, 17 Oct 2009 22:11:22 -0000 --xQmOcGOVkeO43v2v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2009-Oct-17 11:00:59 -0400, John Baldwin wrote: >> The problem is that the intr_describe() definitions are inside (large) >> #ifdef SMP blocks, whilst the reference is not similarly protected. >> code inspection) > >I believe kib@ fixed this yesterday already? Yes, this problem is fixed. The fix was after my source update so I missed it. Sorry for the noise. --=20 Peter Jeremy --xQmOcGOVkeO43v2v Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iEYEARECAAYFAkraQQYACgkQ/opHv/APuIcDpgCgt4+3a5mM9jXsOlRe7LXGevUA Fg4An35ZJZtFvj6Gt2iWrgUxubP52Per =Hcz/ -----END PGP SIGNATURE----- --xQmOcGOVkeO43v2v--