svn commit: r261827 - head/sys/dev/usb/input
Author: hselasky Date: Thu Feb 13 09:09:14 2014 New Revision: 261827 URL: http://svnweb.freebsd.org/changeset/base/261827 Log: - Remove not needed definitions from driver. - Get USB input report length from HID descriptor. - Use 1 finger TAP for devices which has no integrated button. - Move data buffer to softc instead of allocating it. MFC after:1 week Modified: head/sys/dev/usb/input/wsp.c Modified: head/sys/dev/usb/input/wsp.c == --- head/sys/dev/usb/input/wsp.cThu Feb 13 06:38:01 2014 (r261826) +++ head/sys/dev/usb/input/wsp.cThu Feb 13 09:09:14 2014 (r261827) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #defineWSP_DRIVER_NAME "wsp" +#defineWSP_BUFFER_MAX 1024 #defineWSP_CLAMP(x,low,high) do { \ if ((x) < (low))\ @@ -124,12 +125,12 @@ SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_ho #defineWSP_IFACE_INDEX 1 /* - * Some tables, structures, definitions and initialisation values for - * the touchpad protocol has been copied from Linux's + * Some tables, structures, definitions and constant values for the + * touchpad protocol has been copied from Linux's * "drivers/input/mouse/bcm5974.c" which has the following copyright * holders under GPLv2. All device specific code in this driver has * been written from scratch. The decoding algorithm is based on - * output from usbdump. + * output from FreeBSD's usbdump. * * Copyright (C) 2008 Henrik Rydberg (rydb...@euromail.se) * Copyright (C) 2008 Scott Shawcroft (scott.shawcr...@gmail.com) @@ -205,20 +206,10 @@ struct tp_finger { #defineMAX_FINGERS 16 #defineSIZEOF_FINGER sizeof(struct tp_finger) #defineSIZEOF_ALL_FINGERS (MAX_FINGERS * SIZEOF_FINGER) -#defineMAX_FINGER_ORIENTATION 16384 -/* logical signal quality */ -#defineSN_PRESSURE 45 /* pressure signal-to-noise ratio */ -#defineSN_WIDTH25 /* width signal-to-noise ratio */ -#defineSN_COORD250 /* coordinate signal-to-noise ratio */ -#defineSN_ORIENT 10 /* orientation signal-to-noise ratio */ - -/* device-specific parameters */ -struct wsp_param { - int snratio;/* signal-to-noise ratio */ - int min;/* device minimum reading */ - int max;/* device maximum reading */ -}; +#if (WSP_BUFFER_MAX < ((MAX_FINGERS * 14 * 2) + FINGER_TYPE3)) +#error "WSP_BUFFER_MAX is too small" +#endif enum { WSP_FLAG_WELLSPRING1, @@ -239,282 +230,70 @@ enum { /* device-specific configuration */ struct wsp_dev_params { uint8_t caps; /* device capability bitmask */ - uint16_t bt_datalen;/* data length of the button interface */ uint8_t tp_type;/* type of trackpad interface */ uint8_t tp_offset; /* offset to trackpad finger data */ - uint16_t tp_datalen;/* data length of the trackpad -* interface */ - struct wsp_param p; /* finger pressure limits */ - struct wsp_param w; /* finger width limits */ - struct wsp_param x; /* horizontal limits */ - struct wsp_param y; /* vertical limits */ - struct wsp_param o; /* orientation limits */ }; static const struct wsp_dev_params wsp_dev_params[WSP_FLAG_MAX] = { [WSP_FLAG_WELLSPRING1] = { .caps = 0, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE1, .tp_offset = FINGER_TYPE1, - .tp_datalen = FINGER_TYPE1 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 256 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4824, 5342 - }, - .y = { - SN_COORD, -172, 5820 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING2] = { .caps = 0, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE1, .tp_offset = FINGER_TYPE1, - .tp_datalen = FINGER_TYPE1 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 256 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4824, 4824 - }, - .y = { - SN_COORD, -172,
Re: svn commit: r261801 - head/contrib/libc++/include
On 13 Feb 2014, at 01:04, Alexander Kabaev wrote: > The refusal to use tools that are there precisely to help to help with > the binary compatibility in favor of mindless library bumps is just sad. Perhaps you could share with the class. What is the correct way of solving this problem? For those just joining the discussion, the issue is that std::pair was originally declared with an explicit constructor and should have an implicit constructor, which has a different calling convention. This means that we can't share the two std::pair implementations across libraries, because they will try to call the constructor with the wrong arguments. Because of templates and C++ name mangling, this ends up being propagated into most libraries that link against libc++, and calling from one with the old definition to one with the new definition end up causing segfaults (if we're lucky - I think the symptom that we're seeing is actually dereferencing a junk value in a register, so it may cause random memory writes, but I'd have to check the ABI). Given that neither redeclaring the new std::pair in a new namespace, nor exporting both constructor symbols using symbol versioning (the two approaches that we've already discussed) will work, what are the tools that apparently we're refusing to use that will work? David ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r261801 - head/contrib/libc++/include
On Wed, Feb 12, 2014 at 06:14:50PM +, Dimitry Andric wrote: > Author: dim > Date: Wed Feb 12 18:14:49 2014 > New Revision: 261801 > URL: http://svnweb.freebsd.org/changeset/base/261801 > > Log: > An ABI incompatibility crept into the libc++ 3.4 import in r261283. It > was caused by upstream libc++ commit r194536, which aimed to make the > headers more standards-compliant, by making std::pair's copy constructor > trivial. Unfortunately, this could cause certain C++ applications using > shared libraries built against the previous version of libc++ to crash. > > Fix the ABI incompatibility by making std::pair's copy constructor > non-trivial again. > > Please note: Any C++ applications or shared libraries built with libc++ > between r261283 and this revision should be recompiled. Thanks! ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261832 - in head: share/man/man5 usr.sbin/jail
Author: zeising (doc,ports committer) Date: Thu Feb 13 12:52:26 2014 New Revision: 261832 URL: http://svnweb.freebsd.org/changeset/base/261832 Log: Add cross references between rc.conf(5) and jail.conf(5). MFC after:2 weeks Modified: head/share/man/man5/rc.conf.5 head/usr.sbin/jail/jail.conf.5 Modified: head/share/man/man5/rc.conf.5 == --- head/share/man/man5/rc.conf.5 Thu Feb 13 10:11:14 2014 (r261831) +++ head/share/man/man5/rc.conf.5 Thu Feb 13 12:52:26 2014 (r261832) @@ -4462,6 +4462,7 @@ The default is 30. .Xr fstab 5 , .Xr ipf 5 , .Xr ipnat 5 , +.Xr jail.conf 5 , .Xr motd 5 , .Xr newsyslog.conf 5 , .Xr pf.conf 5 , Modified: head/usr.sbin/jail/jail.conf.5 == --- head/usr.sbin/jail/jail.conf.5 Thu Feb 13 10:11:14 2014 (r261831) +++ head/usr.sbin/jail/jail.conf.5 Thu Feb 13 12:52:26 2014 (r261832) @@ -207,6 +207,7 @@ bar { .Ed .Sh SEE ALSO .Xr jail_set 2 +.Xr rc.conf 5 .Xr jail 8 .Xr jls 8 .Sh HISTORY ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261833 - head/usr.sbin/jail
Author: zeising (doc,ports committer) Date: Thu Feb 13 12:53:57 2014 New Revision: 261833 URL: http://svnweb.freebsd.org/changeset/base/261833 Log: Add commas (,) to the list in the SEE ALSO section, to match most other manuals. MFC after:2 weeks Modified: head/usr.sbin/jail/jail.conf.5 Modified: head/usr.sbin/jail/jail.conf.5 == --- head/usr.sbin/jail/jail.conf.5 Thu Feb 13 12:52:26 2014 (r261832) +++ head/usr.sbin/jail/jail.conf.5 Thu Feb 13 12:53:57 2014 (r261833) @@ -206,9 +206,9 @@ bar { } .Ed .Sh SEE ALSO -.Xr jail_set 2 -.Xr rc.conf 5 -.Xr jail 8 +.Xr jail_set 2 , +.Xr rc.conf 5 , +.Xr jail 8 , .Xr jls 8 .Sh HISTORY The ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261834 - in head: share/man/man5 usr.sbin/jail
Author: zeising (doc,ports committer) Date: Thu Feb 13 13:11:34 2014 New Revision: 261834 URL: http://svnweb.freebsd.org/changeset/base/261834 Log: Bump .Dd forgotten in r261832. MFC after:2 weeks Modified: head/share/man/man5/rc.conf.5 head/usr.sbin/jail/jail.conf.5 Modified: head/share/man/man5/rc.conf.5 == --- head/share/man/man5/rc.conf.5 Thu Feb 13 12:53:57 2014 (r261833) +++ head/share/man/man5/rc.conf.5 Thu Feb 13 13:11:34 2014 (r261834) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 25, 2013 +.Dd February 13, 2014 .Dt RC.CONF 5 .Os .Sh NAME Modified: head/usr.sbin/jail/jail.conf.5 == --- head/usr.sbin/jail/jail.conf.5 Thu Feb 13 12:53:57 2014 (r261833) +++ head/usr.sbin/jail/jail.conf.5 Thu Feb 13 13:11:34 2014 (r261834) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 23, 2012 +.Dd February 13, 2014 .Dt JAIL.CONF 5 .Os .Sh NAME ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261835 - head/sys/netinet6
Author: ae Date: Thu Feb 13 14:10:44 2014 New Revision: 261835 URL: http://svnweb.freebsd.org/changeset/base/261835 Log: Drop packets to multicast address whose scop field contains the reserved value 0. MFC after:1 week Sponsored by: Yandex LLC Modified: head/sys/netinet6/ip6_input.c Modified: head/sys/netinet6/ip6_input.c == --- head/sys/netinet6/ip6_input.c Thu Feb 13 13:11:34 2014 (r261834) +++ head/sys/netinet6/ip6_input.c Thu Feb 13 14:10:44 2014 (r261835) @@ -547,7 +547,18 @@ ip6_input(struct mbuf *m) in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr); goto bad; } - + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) && + IPV6_ADDR_MC_SCOPE(&ip6->ip6_dst) == 0) { + /* +* RFC4291 2.7: +* Nodes must not originate a packet to a multicast address +* whose scop field contains the reserved value 0; if such +* a packet is received, it must be silently dropped. +*/ + IP6STAT_INC(ip6s_badscope); + in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr); + goto bad; + } #ifdef ALTQ if (altq_input != NULL && (*altq_input)(m, AF_INET6) == 0) { /* packet is dropped by traffic conditioner */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r261801 - head/contrib/libc++/include
On Thu, 13 Feb 2014 10:11:27 + David Chisnall wrote: > On 13 Feb 2014, at 01:04, Alexander Kabaev wrote: > > > The refusal to use tools that are there precisely to help to help > > with the binary compatibility in favor of mindless library bumps is > > just sad. > > Perhaps you could share with the class. What is the correct way of > solving this problem? > > For those just joining the discussion, the issue is that std::pair > was originally declared with an explicit constructor and should have > an implicit constructor, which has a different calling convention. > This means that we can't share the two std::pair implementations > across libraries, because they will try to call the constructor with > the wrong arguments. Because of templates and C++ name mangling, > this ends up being propagated into most libraries that link against > libc++, and calling from one with the old definition to one with the > new definition end up causing segfaults (if we're lucky - I think the > symptom that we're seeing is actually dereferencing a junk value in a > register, so it may cause random memory writes, but I'd have to check > the ABI). > > Given that neither redeclaring the new std::pair in a new namespace, > nor exporting both constructor symbols using symbol versioning (the > two approaches that we've already discussed) will work, what are the > tools that apparently we're refusing to use that will work? > > David OK, I think the confusion has started because reported to this as an ABI incompatibility within libc++ itself, which is not the case here. When calling convention of a public symbol changes, one can put the old definition under the compatibility version that is only available for runtime binding, this allowing old binaries to work and that is what I was referring to. Unfortunately, that won't work in this case because libc++ proper does NOT export any symbols with 'pair' in them, so it is not affected by the ABI breakage itself. What libc++ developers did is they exported ABI breakage into every binary that was compiled with different revisions on libc++ _header_ files, not linked with the library proper. Using the library major version as a circumstantial evidence indicating header versions binary was compiled with might work then, though is not 100% reliable. Theoretically one can compile the binary that uses std::pair template but does not record libc++ as the runtime dependency. Still, that is better than nothing. ABI stability and C++ apparently should be mentioned in the same sentence, unless there's also a 'pipe dream' in it. And you do deserve an apology for my remark. -- Alexander Kabaev signature.asc Description: PGP signature
svn commit: r261836 - head/sys/arm/at91
Author: imp Date: Thu Feb 13 15:46:08 2014 New Revision: 261836 URL: http://svnweb.freebsd.org/changeset/base/261836 Log: Fix board name. Modified: head/sys/arm/at91/board_eb9200.c Modified: head/sys/arm/at91/board_eb9200.c == --- head/sys/arm/at91/board_eb9200.cThu Feb 13 14:10:44 2014 (r261835) +++ head/sys/arm/at91/board_eb9200.cThu Feb 13 15:46:08 2014 (r261836) @@ -65,4 +65,4 @@ board_init(void) return (at91_ramsize()); } -ARM_BOARD(KB9200, "Kwikbyte KB920x") +ARM_BOARD(KB9200, "Embest ATEB9200") ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261837 - head/sys/arm/at91
Author: imp Date: Thu Feb 13 15:47:41 2014 New Revision: 261837 URL: http://svnweb.freebsd.org/changeset/base/261837 Log: Fix board ID too... Modified: head/sys/arm/at91/board_eb9200.c Modified: head/sys/arm/at91/board_eb9200.c == --- head/sys/arm/at91/board_eb9200.cThu Feb 13 15:46:08 2014 (r261836) +++ head/sys/arm/at91/board_eb9200.cThu Feb 13 15:47:41 2014 (r261837) @@ -65,4 +65,4 @@ board_init(void) return (at91_ramsize()); } -ARM_BOARD(KB9200, "Embest ATEB9200") +ARM_BOARD(ATEB9200, "Embest ATEB9200") ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261838 - head/share/man/man4
Author: brueffer Date: Thu Feb 13 16:13:31 2014 New Revision: 261838 URL: http://svnweb.freebsd.org/changeset/base/261838 Log: Add a deprecation notice to nve.4 and Xref nfe.4. MFC after:3 days Modified: head/share/man/man4/nve.4 Modified: head/share/man/man4/nve.4 == --- head/share/man/man4/nve.4 Thu Feb 13 15:47:41 2014(r261837) +++ head/share/man/man4/nve.4 Thu Feb 13 16:13:31 2014(r261838) @@ -26,13 +26,21 @@ .\" .\" $FreeBSD$ .\" -.Dd January 16, 2011 +.Dd February 13, 2014 .Dt NVE 4 .Os .Sh NAME .Nm nve .Nd "NVIDIA nForce MCP Networking Adapter device driver" .Sh SYNOPSIS +.Sy Warning: +This driver is deprecated and will not be available in +.Fx 11.0 +and later. +Please consider using the +.Xr nfe 4 +driver instead. +.Pp To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -119,6 +127,7 @@ the network connection (cable). .Xr arp 4 , .Xr miibus 4 , .Xr netintro 4 , +.Xr nfe 4 , .Xr ng_ether 4 , .Xr rgephy 4 , .Xr ifconfig 8 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261841 - head/sys/arm/at91
Author: imp Date: Thu Feb 13 16:50:08 2014 New Revision: 261841 URL: http://svnweb.freebsd.org/changeset/base/261841 Log: Honor the disabled status by only grabbing resources and returning when running under FDT. Modified: head/sys/arm/at91/at91_spi.c head/sys/arm/at91/at91_twi.c Modified: head/sys/arm/at91/at91_spi.c == --- head/sys/arm/at91/at91_spi.cThu Feb 13 16:38:00 2014 (r261840) +++ head/sys/arm/at91/at91_spi.cThu Feb 13 16:50:08 2014 (r261841) @@ -131,6 +131,15 @@ at91_spi_attach(device_t dev) if (err) goto out; +#ifdef FDT + /* +* Disable devices need to hold their resources, so return now and not attach +* the spibus, setup interrupt handlers, etc. +*/ + if (!ofw_bus_status_okay(dev)) + return 0; +#endif + /* * Set up the hardware. */ Modified: head/sys/arm/at91/at91_twi.c == --- head/sys/arm/at91/at91_twi.cThu Feb 13 16:38:00 2014 (r261840) +++ head/sys/arm/at91/at91_twi.cThu Feb 13 16:50:08 2014 (r261841) @@ -134,6 +134,15 @@ at91_twi_attach(device_t dev) AT91_TWI_LOCK_INIT(sc); +#ifdef FDT + /* +* Disable devices need to hold their resources, so return now and not attach +* the iicbus, setup interrupt handlers, etc. +*/ + if (!ofw_bus_status_okay(dev)) + return 0; +#endif + /* * Activate the interrupt */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261842 - in head/sys: conf dev/gpio
Author: loos Date: Thu Feb 13 17:08:29 2014 New Revision: 261842 URL: http://svnweb.freebsd.org/changeset/base/261842 Log: Add an OFW GPIO compatible bus. This allows the use of the DTS files to describe GPIO bindings in the system. Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between the OFW and the non OFW versions of GPIO bus. Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus. Approved by: adrian (mentor, implicit) Added: head/sys/dev/gpio/ofw_gpiobus.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/gpio/gpiobus.c head/sys/dev/gpio/gpiobusvar.h Modified: head/sys/conf/files == --- head/sys/conf/files Thu Feb 13 16:50:08 2014(r261841) +++ head/sys/conf/files Thu Feb 13 17:08:29 2014(r261842) @@ -1400,6 +1400,7 @@ dev/gpio/gpioiic.coptional gpioiic dev/gpio/gpioled.c optional gpioled dev/gpio/gpio_if.m optional gpio dev/gpio/gpiobus_if.m optional gpio +dev/gpio/ofw_gpiobus.c optional fdt gpio dev/hatm/if_hatm.c optional hatm pci dev/hatm/if_hatm_intr.coptional hatm pci dev/hatm/if_hatm_ioctl.c optional hatm pci Modified: head/sys/dev/gpio/gpiobus.c == --- head/sys/dev/gpio/gpiobus.c Thu Feb 13 16:50:08 2014(r261841) +++ head/sys/dev/gpio/gpiobus.c Thu Feb 13 17:08:29 2014(r261842) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" #include "gpiobus_if.h" -static void gpiobus_print_pins(struct gpiobus_ivar *); static int gpiobus_parse_pins(struct gpiobus_softc *, device_t, int); static int gpiobus_probe(device_t); static int gpiobus_attach(device_t); @@ -73,17 +72,7 @@ static int gpiobus_pin_set(device_t, dev static int gpiobus_pin_get(device_t, device_t, uint32_t, unsigned int*); static int gpiobus_pin_toggle(device_t, device_t, uint32_t); -#defineGPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#defineGPIOBUS_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#defineGPIOBUS_LOCK_INIT(_sc) \ - mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ - "gpiobus", MTX_DEF) -#defineGPIOBUS_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); -#defineGPIOBUS_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); -#defineGPIOBUS_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); - - -static void +void gpiobus_print_pins(struct gpiobus_ivar *devi) { int range_start, range_stop, need_coma; Modified: head/sys/dev/gpio/gpiobusvar.h == --- head/sys/dev/gpio/gpiobusvar.h Thu Feb 13 16:50:08 2014 (r261841) +++ head/sys/dev/gpio/gpiobusvar.h Thu Feb 13 17:08:29 2014 (r261842) @@ -30,12 +30,25 @@ #ifndef__GPIOBUS_H__ #define__GPIOBUS_H__ +#include "opt_platform.h" + #include #include #include -#define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) device_get_ivars(d) -#define GPIOBUS_SOFTC(d) (struct gpiobus_softc *) device_get_softc(d) +#ifdef FDT +#include +#endif + +#defineGPIOBUS_IVAR(d) (struct gpiobus_ivar *) device_get_ivars(d) +#defineGPIOBUS_SOFTC(d) (struct gpiobus_softc *) device_get_softc(d) +#defineGPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#defineGPIOBUS_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#defineGPIOBUS_LOCK_INIT(_sc) mtx_init(&_sc->sc_mtx, \ + device_get_nameunit(_sc->sc_dev), "gpiobus", MTX_DEF) +#defineGPIOBUS_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx) +#defineGPIOBUS_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) +#defineGPIOBUS_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED) struct gpiobus_softc { @@ -54,4 +67,11 @@ struct gpiobus_ivar uint32_t*pins; /* pins map */ }; +void gpiobus_print_pins(struct gpiobus_ivar *); +#ifdef FDT +device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); +#endif + +extern driver_t gpiobus_driver; + #endif /* __GPIOBUS_H__ */ Added: head/sys/dev/gpio/ofw_gpiobus.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/gpio/ofw_gpiobus.c Thu Feb 13 17:08:29 2014 (r261842) @@ -0,0 +1,338 @@ +/*- + * Copyright (c) 2009, Nathan Whitehorn + * Copyright (c) 2013, Luiz Otavio O Souza + * Copyright (c) 2013 The FreeBSD Foundation + * 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 unmodified, this list of conditions, and
svn commit: r261843 - in head: share/man/man4 sys/dev/gpio
Author: loos Date: Thu Feb 13 17:58:52 2014 New Revision: 261843 URL: http://svnweb.freebsd.org/changeset/base/261843 Log: Add OFW support to the in tree gpio compatible devices: gpioiic(4) and gpioled(4). Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for the I2C tests). It was also verified for regressions on RSPRO (MIPS/ar71xx) used as reference for a non OFW-based system. Update the gpioled(4) and gpioiic(4) man pages with some details and examples about the FDT/OFW support. Some compatibility details pointed out by imp@ will follow in subsequent commits. Approved by: adrian (mentor, implicit) Modified: head/share/man/man4/gpioiic.4 head/share/man/man4/gpioled.4 head/sys/dev/gpio/gpioiic.c head/sys/dev/gpio/gpioled.c Modified: head/share/man/man4/gpioiic.4 == --- head/share/man/man4/gpioiic.4 Thu Feb 13 17:08:29 2014 (r261842) +++ head/share/man/man4/gpioiic.4 Thu Feb 13 17:58:52 2014 (r261843) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 5, 2013 +.Dd February 13, 2014 .Dt GPIOIIC 4 .Os .Sh NAME @@ -65,7 +65,7 @@ This is a bitmask of the pins on the that are to be used for SCLOCK and SDATA from the GPIO IIC bit-banging bus. To configure pin 0 and 7, use the bitmask of -1001 and convert it to a hexadecimal value of 0x0081. +0b1001 and convert it to a hexadecimal value of 0x0081. Please note that this mask should only ever have two bits set (any others bits - i.e., pins - will be ignored). .It Va hint.gpioiic.%d.scl @@ -73,13 +73,77 @@ Indicates which bit in the .Va hint.gpioiic.%d.pins should be used as the SCLOCK source. +Optional, defaults to 0. .It Va hint.gpioiic.%d.sda Indicates which bit in the .Va hint.gpioiic.%d.pins should be used as the SDATA source. +Optional, defaults to 1. +.El +.Pp +On a +.Xr FDT 4 +based system, like +.Li ARM , the dts part for a +.Nm gpioiic +device usually looks like: +.Bd -literal +gpio: gpio { + + gpio-controller; + ... + + gpioiic0 { + compatible = "gpioiic"; + /* +* Attach to GPIO pins 21 and 22. Set them +* initially as inputs. +*/ + gpios = <&gpio 21 1 0 +&gpio 22 1 0>; + scl = <0>; /* GPIO pin 21 - optional */ + sda = <1>; /* GPIO pin 22 - optional */ + + /* This is an example of a gpioiic child. */ + gpioiic-child0 { + compatible = "lm75"; + i2c-address = <0x4f>; + }; + }; +}; +.Ed +.Pp +Where: +.Bl -tag -width ".Va compatible" +.It Va compatible +Should always be set to "gpioiic". +.It Va gpios +The +.Va gpios +property indicates which GPIO pins should be used for SCLOCK and SDATA +on the GPIO IIC bit-banging bus. +For more details about the +.Va gpios +property, please consult +.Pa /usr/src/sys/boot/fdt/dts/bindings-gpio.txt . +.It Va scl +The +.Va scl +option indicates which bit in the +.Va gpios +should be used as the SCLOCK source. +Optional, defaults to 0. +.It Va sda +The +.Va sda +option indicates which bit in the +.Va gpios +should be used as the SDATA source. +Optional, defaults to 1. .El .Sh SEE ALSO +.Xr fdt 4 , .Xr gpio 4 , .Xr gpioled 4 , .Xr iic 4 , Modified: head/share/man/man4/gpioled.4 == --- head/share/man/man4/gpioled.4 Thu Feb 13 17:08:29 2014 (r261842) +++ head/share/man/man4/gpioled.4 Thu Feb 13 17:58:52 2014 (r261843) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 5, 2013 +.Dd February 13, 2014 .Dt GPIOLED 4 .Os .Sh NAME @@ -68,7 +68,75 @@ Which pin on the GPIO interface to map t Please note that this mask should only ever have one bit set (any others bits - i.e., pins - will be ignored). .El +.Pp +On a +.Xr FDT 4 +based system, like +.Li ARM , the dts part for a +.Nm gpioled +device usually looks like: +.Bd -literal +gpio: gpio { + + gpio-controller; + ... + + led0 { + compatible = "gpioled"; + gpios = <&gpio 16 2 0>; /* GPIO pin 16. */ + name = "ok"; + }; + + led1 { + compatible = "gpioled"; + gpios = <&gpio 17 2 0>; /* GPIO pin 17. */ + name = "user-led1"; + }; +}; +.Ed +.Pp +And optionally, you can choose combine all the leds under a single +.Dq gpio-leds +compatible node: +.Bd -literal +simplebus0 { + + ... + + leds { + compatible = "gpio-leds"; + + led0 { + gpios = <&gpio 16 2 0>; + name = "ok" + }; + + led1 { + gpios = <&gpio 17 2 0>; + name
svn commit: r261844 - in head/sys/dev: iicbus ofw
Author: loos Date: Thu Feb 13 18:22:49 2014 New Revision: 261844 URL: http://svnweb.freebsd.org/changeset/base/261844 Log: Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems. This change makes ofw_iicbus attach to iicbb(4) controllers in addition to the already supported i2c host bridges (iichb). On iicbb(4) allow the direct access of the OFW parent node by its children, so they can be directly attached to iicbb(4) node on the DTS without the need of describing the i2c bus. Approved by: adrian (mentor, implicit) Modified: head/sys/dev/iicbus/iicbb.c head/sys/dev/ofw/ofw_iicbus.c Modified: head/sys/dev/iicbus/iicbb.c == --- head/sys/dev/iicbus/iicbb.c Thu Feb 13 17:58:52 2014(r261843) +++ head/sys/dev/iicbus/iicbb.c Thu Feb 13 18:22:49 2014(r261844) @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); * */ +#include "opt_platform.h" + #include #include #include @@ -50,6 +52,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif #include #include @@ -77,6 +84,9 @@ static int iicbb_write(device_t, const c static int iicbb_read(device_t, char *, int, int *, int, int); static int iicbb_reset(device_t, u_char, u_char, u_char *); static int iicbb_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs); +#ifdef FDT +static phandle_t iicbb_get_node(device_t, device_t); +#endif static device_method_t iicbb_methods[] = { /* device interface */ @@ -98,6 +108,11 @@ static device_method_t iicbb_methods[] = DEVMETHOD(iicbus_reset, iicbb_reset), DEVMETHOD(iicbus_transfer, iicbb_transfer), +#ifdef FDT + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, iicbb_get_node), +#endif + { 0, 0 } }; @@ -154,6 +169,16 @@ iicbb_detach(device_t dev) return (0); } +#ifdef FDT +static phandle_t +iicbb_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the I2C bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} +#endif + static void iicbb_child_detached( device_t dev, device_t child ) { Modified: head/sys/dev/ofw/ofw_iicbus.c == --- head/sys/dev/ofw/ofw_iicbus.c Thu Feb 13 17:58:52 2014 (r261843) +++ head/sys/dev/ofw/ofw_iicbus.c Thu Feb 13 18:22:49 2014 (r261844) @@ -80,6 +80,7 @@ static devclass_t ofwiicbus_devclass; DEFINE_CLASS_1(iicbus, ofw_iicbus_driver, ofw_iicbus_methods, sizeof(struct iicbus_softc), iicbus_driver); +DRIVER_MODULE(ofw_iicbus, iicbb, ofw_iicbus_driver, ofwiicbus_devclass, 0, 0); DRIVER_MODULE(ofw_iicbus, iichb, ofw_iicbus_driver, ofwiicbus_devclass, 0, 0); MODULE_VERSION(ofw_iicbus, 1); MODULE_DEPEND(ofw_iicbus, iicbus, 1, 1, 1); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261845 - in head/sys/arm: broadcom/bcm2835 ti
Author: loos Date: Thu Feb 13 18:42:23 2014 New Revision: 261845 URL: http://svnweb.freebsd.org/changeset/base/261845 Log: Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this change the gpio children can be described as directly connected to the GPIO controller without the need of describing the OFW GPIO bus itself on the DTS file. With this commit the OFW GPIO bus is fully functional on BBB and RPi. GPIO controllers which want to use the OFW GPIO bus will need similar changes. Approved by: adrian (mentor, implicit) Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c == --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.cThu Feb 13 18:22:49 2014(r261844) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.cThu Feb 13 18:42:23 2014(r261845) @@ -766,6 +766,14 @@ bcm_gpio_detach(device_t dev) return (EBUSY); } +static phandle_t +bcm_gpio_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the GPIO bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} + static device_method_t bcm_gpio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, bcm_gpio_probe), @@ -782,6 +790,9 @@ static device_method_t bcm_gpio_methods[ DEVMETHOD(gpio_pin_set, bcm_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, bcm_gpio_pin_toggle), + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, bcm_gpio_get_node), + DEVMETHOD_END }; Modified: head/sys/arm/ti/ti_gpio.c == --- head/sys/arm/ti/ti_gpio.c Thu Feb 13 18:22:49 2014(r261844) +++ head/sys/arm/ti/ti_gpio.c Thu Feb 13 18:42:23 2014(r261845) @@ -792,6 +792,14 @@ ti_gpio_detach(device_t dev) return(0); } +static phandle_t +ti_gpio_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the GPIO bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} + static device_method_t ti_gpio_methods[] = { DEVMETHOD(device_probe, ti_gpio_probe), DEVMETHOD(device_attach, ti_gpio_attach), @@ -806,6 +814,10 @@ static device_method_t ti_gpio_methods[] DEVMETHOD(gpio_pin_get, ti_gpio_pin_get), DEVMETHOD(gpio_pin_set, ti_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, ti_gpio_pin_toggle), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, ti_gpio_get_node), + {0, 0}, }; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261846 - in head/sys: arm/conf boot/fdt/dts
Author: loos Date: Thu Feb 13 18:51:37 2014 New Revision: 261846 URL: http://svnweb.freebsd.org/changeset/base/261846 Log: Make the gpioled(4) work out of the box on BBB. Add gpioled(4) to BEAGLEBONE kernel and add the description of the four on-board leds of beaglebone-black to its DTS file. Approved by: adrian (mentor, implicit) Modified: head/sys/arm/conf/BEAGLEBONE head/sys/boot/fdt/dts/beaglebone-black.dts Modified: head/sys/arm/conf/BEAGLEBONE == --- head/sys/arm/conf/BEAGLEBONEThu Feb 13 18:42:23 2014 (r261845) +++ head/sys/arm/conf/BEAGLEBONEThu Feb 13 18:51:37 2014 (r261846) @@ -101,6 +101,7 @@ device am335x_pmic # AM335x Power Mana # GPIO device gpio +device gpioled # USB support device usb Modified: head/sys/boot/fdt/dts/beaglebone-black.dts == --- head/sys/boot/fdt/dts/beaglebone-black.dts Thu Feb 13 18:42:23 2014 (r261845) +++ head/sys/boot/fdt/dts/beaglebone-black.dts Thu Feb 13 18:51:37 2014 (r261846) @@ -147,6 +147,30 @@ } }; + leds { + compatible = "gpio-leds"; + + led1 { + gpios = <&GPIO 53 2 0>; + name = "led1"; + }; + + led2 { + gpios = <&GPIO 54 2 0>; + name = "led2"; + }; + + led3 { + gpios = <&GPIO 55 2 0>; + name = "led3"; + }; + + led4 { + gpios = <&GPIO 56 2 0>; + name = "led4"; + }; + }; + chosen { stdin = "uart0"; stdout = "uart0"; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261847 - head/sys/netinet6
Author: melifaro Date: Thu Feb 13 19:09:04 2014 New Revision: 261847 URL: http://svnweb.freebsd.org/changeset/base/261847 Log: Further simplify nd6_output_lle. Currently we have 3 usage patterns: 1) nd6_output (most traffic flow, no lle supplied, lle RLOCK sufficient) 2) corner cases for output (no lle, STALE lle, so on). lle WLOCK needed. 3) nd* iunternal machinery (WLOCK'ed lle provided, perform packet queing). We separate case 1 and implement it inside its only customer - nd6_output. This leads to some code duplication (especialy SEND stuff, which should be hooked to output in a different way), but simplifies locking and control flow logic fir nd6_output_lle. Reviewed by: ae MFC after:3 weeks Sponsored by: Yandex LLC Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c == --- head/sys/netinet6/nd6.c Thu Feb 13 18:51:37 2014(r261846) +++ head/sys/netinet6/nd6.c Thu Feb 13 19:09:04 2014(r261847) @@ -1832,34 +1832,114 @@ nd6_slowtimo(void *arg) CURVNET_RESTORE(); } +/* + * IPv6 packet output - light version. + * Checks if destination LLE exists and is in proper state + * (e.g no modification required). If not true, fall back to + * "heavy" version. + */ int -nd6_output(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0, +nd6_output(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, struct sockaddr_in6 *dst, struct rtentry *rt0) { + struct llentry *ln = NULL; + int error = 0; + + /* discard the packet if IPv6 operation is disabled on the interface */ + if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) { + m_freem(m); + return (ENETDOWN); /* better error? */ + } + + if (IN6_IS_ADDR_MULTICAST(&dst->sin6_addr)) + goto sendpkt; + + if (nd6_need_cache(ifp) == 0) + goto sendpkt; + + IF_AFDATA_RLOCK(ifp); + ln = nd6_lookup(&dst->sin6_addr, 0, ifp); + IF_AFDATA_RUNLOCK(ifp); + + /* +* Perform fast path for the following cases: +* 1) lle state is REACHABLE +* 2) lle state is DELAY (NS message sentNS message sent) +* +* Every other case involves lle modification, so we handle +* them separately. +*/ + if (ln == NULL || (ln->ln_state != ND6_LLINFO_REACHABLE && + ln->ln_state != ND6_LLINFO_DELAY)) { + /* Fall back to slow processing path */ + if (ln != NULL) + LLE_RUNLOCK(ln); + return (nd6_output_lle(ifp, origifp, m, dst, rt0, NULL, NULL)); + } + +sendpkt: + if (ln != NULL) + LLE_RUNLOCK(ln); + +#ifdef MAC + mac_netinet6_nd6_send(ifp, m); +#endif + + /* +* If called from nd6_ns_output() (NS), nd6_na_output() (NA), +* icmp6_redirect_output() (REDIRECT) or from rip6_output() (RS, RA +* as handled by rtsol and rtadvd), mbufs will be tagged for SeND +* to be diverted to user space. When re-injected into the kernel, +* send_output() will directly dispatch them to the outgoing interface. +*/ + if (send_sendso_input_hook != NULL) { + struct m_tag *mtag; + struct ip6_hdr *ip6; + int ip6len; + mtag = m_tag_find(m, PACKET_TAG_ND_OUTGOING, NULL); + if (mtag != NULL) { + ip6 = mtod(m, struct ip6_hdr *); + ip6len = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen); + /* Use the SEND socket */ + error = send_sendso_input_hook(m, ifp, SND_OUT, + ip6len); + /* -1 == no app on SEND socket */ + if (error == 0 || error != -1) + return (error); + } + } + + m_clrprotoflags(m); /* Avoid confusing lower layers. */ + IP_PROBE(send, NULL, NULL, mtod(m, struct ip6_hdr *), ifp, NULL, + mtod(m, struct ip6_hdr *)); - return (nd6_output_lle(ifp, origifp, m0, dst, rt0, NULL, NULL)); + if ((ifp->if_flags & IFF_LOOPBACK) == 0) + origifp = ifp; + + error = (*ifp->if_output)(origifp, m, (struct sockaddr *)dst, NULL); + return (error); } /* - * Note that I'm not enforcing any global serialization - * lle state or asked changes here as the logic is too - * complicated to avoid having to always acquire an exclusive - * lock - * KMM + * Output IPv6 packet - heavy version. + * Function assume that either + * 1) destination LLE does not exist, is invalid or stale, so + * ND6_EXCLUSIVE lock needs to be acquired + * 2) destination lle is provided (with ND6_EXCLUSIVE lock), + * in that case packets are queued in &chain. * */ int -nd6_output_lle(struct ifnet *ifp, struct ifnet *origi
svn commit: r261848 - head/sys/arm/freescale/imx
Author: ian Date: Thu Feb 13 19:14:23 2014 New Revision: 261848 URL: http://svnweb.freebsd.org/changeset/base/261848 Log: Remove a couple obsolete function declarations. Modified: head/sys/arm/freescale/imx/imx_machdep.h Modified: head/sys/arm/freescale/imx/imx_machdep.h == --- head/sys/arm/freescale/imx/imx_machdep.hThu Feb 13 19:09:04 2014 (r261847) +++ head/sys/arm/freescale/imx/imx_machdep.hThu Feb 13 19:14:23 2014 (r261848) @@ -33,7 +33,6 @@ /* Common functions, implemented in imx_machdep.c. */ -void imx_devmap_addentry(vm_paddr_t _pa, vm_size_t _sz); void imx_wdog_cpu_reset(vm_offset_t _wdcr_phys) __attribute__((__noreturn__)); /* From here down, routines are implemented in imxNN_machdep.c. */ @@ -57,8 +56,6 @@ void imx_wdog_cpu_reset(vm_offset_t _wdc u_int imx_soc_type(void); u_int imx_soc_family(void); -void imx_devmap_init(void); - /* * We need a clock management system that works across unrelated SoCs and * devices. For now, to keep imx development moving, define some barebones ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r261843 - in head: share/man/man4 sys/dev/gpio
On 02/13/14 11:58, Luiz Otavio O Souza wrote: Author: loos Date: Thu Feb 13 17:58:52 2014 New Revision: 261843 URL: http://svnweb.freebsd.org/changeset/base/261843 Log: Add OFW support to the in tree gpio compatible devices: gpioiic(4) and gpioled(4). Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for the I2C tests). It was also verified for regressions on RSPRO (MIPS/ar71xx) used as reference for a non OFW-based system. Update the gpioled(4) and gpioiic(4) man pages with some details and examples about the FDT/OFW support. Some compatibility details pointed out by imp@ will follow in subsequent commits. Approved by: adrian (mentor, implicit) Is there a reason gpioled has an identify() method? Usually enumerable buses like OF buses wouldn't have something like that. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r261842 - in head/sys: conf dev/gpio
On 02/13/14 11:08, Luiz Otavio O Souza wrote: Author: loos Date: Thu Feb 13 17:08:29 2014 New Revision: 261842 URL: http://svnweb.freebsd.org/changeset/base/261842 Log: Add an OFW GPIO compatible bus. This allows the use of the DTS files to describe GPIO bindings in the system. Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between the OFW and the non OFW versions of GPIO bus. Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus. Approved by: adrian (mentor, implicit) Added: head/sys/dev/gpio/ofw_gpiobus.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/gpio/gpiobus.c head/sys/dev/gpio/gpiobusvar.h Added: head/sys/dev/gpio/ofw_gpiobus.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/gpio/ofw_gpiobus.c Thu Feb 13 17:08:29 2014 (r261842) @@ -0,0 +1,338 @@ +/*- + * Copyright (c) 2009, Nathan Whitehorn + * Copyright (c) 2013, Luiz Otavio O Souza + * Copyright (c) 2013 The FreeBSD Foundation + * 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 unmodified, 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 ``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 BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + is there a reason you include fdt_common.h here? Nothing here seems to be FDT specific, rather than for Open Firmware generally. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261855 - head/sys/arm/arm
Author: andrew Date: Thu Feb 13 21:30:54 2014 New Revision: 261855 URL: http://svnweb.freebsd.org/changeset/base/261855 Log: Allow the kernel to be loaded at any 1MiB address. This requirement is because we use the 1MiB section maps as they only need a single pagetable. To allow this we only use pc relative loads to ensure we only load from physical addresses until we are running from a known virtual address. As a side effect any data from before or 64MiB after the kernel needs to be mapped in to be used. This should not be an issue for kernels loaded with ubldr as it places this data just after the kernel. It will be a problem when loading directly from anything using the Linux ABI that places the ATAG data outside this range, for example U-Boot. Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S == --- head/sys/arm/arm/locore.S Thu Feb 13 20:41:25 2014(r261854) +++ head/sys/arm/arm/locore.S Thu Feb 13 21:30:54 2014(r261855) @@ -148,15 +148,31 @@ Lunmapped: * Build page table from scratch. */ - /* Load the page tables physical address */ - ldr r1, Lstartup_pagetable - ldr r2, =(KERNVIRTADDR - KERNPHYSADDR) + /* Find the delta between VA and PA */ + adr r0, Lpagetable + ldr r1, [r0] + sub r2, r1, r0 + /* At this point: r2 = VA - PA */ + + /* +* Find the physical address of the table. After these two +* instructions: +* r1 = va(pagetable) +* +* r0 = va(pagetable) - (VA - PA) +*= va(pagetable) - VA + PA +*= pa(pagetable) +*/ + ldr r1, [r0, #4] sub r0, r1, r2 /* * Map PA == VA */ - ldr r5, =(PHYSADDR) + /* Find the start kernels load address */ + adr r5, _start + ldr r2, =(L1_S_OFFSET) + bic r5, r2 mov r1, r5 mov r2, r5 /* Map 64MiB, preserved over calls to build_pagetables */ @@ -165,7 +181,7 @@ Lunmapped: /* Create the kernel map to jump to */ mov r1, r5 - ldr r2, =(KERNBASE) + ldr r2, =(KERNVIRTADDR) bl build_pagetables #if defined(SOCDEV_PA) && defined(SOCDEV_VA) @@ -223,16 +239,16 @@ mmu_done: virt_done: mov r1, #28 /* loader info size is 28 bytes also second arg */ subssp, sp, r1 /* allocate arm_boot_params struct on stack */ - bic sp, sp, #7 /* align stack to 8 bytes */ mov r0, sp /* loader info pointer is first arg */ + bic sp, sp, #7 /* align stack to 8 bytes */ str r1, [r0]/* Store length of loader info */ str r9, [r0, #4]/* Store r0 from boot loader */ str r8, [r0, #8]/* Store r1 from boot loader */ str ip, [r0, #12] /* store r2 from boot loader */ str fp, [r0, #16] /* store r3 from boot loader */ - ldr r5, =KERNPHYSADDR /* load KERNPHYSADDR as the physical address */ str r5, [r0, #20] /* store the physical address */ - ldr r5, Lstartup_pagetable + adr r4, Lpagetable /* load the pagetable address */ + ldr r5, [r4, #4] str r5, [r0, #24] /* store the pagetable address */ mov fp, #0 /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ @@ -279,16 +295,19 @@ build_pagetables: RET +Lpagetable: + .word . + .word pagetable + Lvirtaddr: .word KERNVIRTADDR Lphysaddr: .word KERNPHYSADDR Lreal_start: .word _start -Lend: +Lend: .word _edata -Lstartup_pagetable: - .word pagetable + #ifdef SMP Lstartup_pagetable_secondary: .word temp_pagetable ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261858 - head/sys/kern
Author: brueffer Date: Thu Feb 13 22:24:36 2014 New Revision: 261858 URL: http://svnweb.freebsd.org/changeset/base/261858 Log: Fix a bug in be_uuid_dec(); it called le16dec() instead of be16dec(), probably due to copy+pasting le_uuid_dec(). PR: 146588 Submitted by: Erwin Rol Reviewed by: marcel MFC after:1 week Modified: head/sys/kern/kern_uuid.c Modified: head/sys/kern/kern_uuid.c == --- head/sys/kern/kern_uuid.c Thu Feb 13 22:19:24 2014(r261857) +++ head/sys/kern/kern_uuid.c Thu Feb 13 22:24:36 2014(r261858) @@ -371,7 +371,7 @@ be_uuid_dec(void const *buf, struct uuid p = buf; uuid->time_low = be32dec(p); - uuid->time_mid = le16dec(p + 4); + uuid->time_mid = be16dec(p + 4); uuid->time_hi_and_version = be16dec(p + 6); uuid->clock_seq_hi_and_reserved = p[8]; uuid->clock_seq_low = p[9]; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261859 - in head: sys/net usr.bin/netstat
Author: adrian Date: Fri Feb 14 00:05:09 2014 New Revision: 261859 URL: http://svnweb.freebsd.org/changeset/base/261859 Log: Don't insert a flowtable entry if the lle isn't yet valid. Some of the collisions that are occuring are due to flowtable lookups that succeed but have an invalid lle - typically because the L2 adjacency lookup hasn't completed. This would lead to a follow-up insert which would then fail (ie, collision) and the code would fall through to doing a slow-path L2/L3 lookup in the netinet/netinet6 code. This patch simply aborts storing a new flowtable entry if the lle isn't yet valid. Whilst I'm here, add a new pcpu counter for the item so the number of failures can be tracked separately from generic "collisions." Reviewed by: glebius MFC after:10 days Sponsored by: Netflix, Inc. Modified: head/sys/net/flowtable.c head/sys/net/flowtable.h head/usr.bin/netstat/flowtable.c Modified: head/sys/net/flowtable.c == --- head/sys/net/flowtable.cThu Feb 13 22:24:36 2014(r261858) +++ head/sys/net/flowtable.cFri Feb 14 00:05:09 2014(r261859) @@ -966,6 +966,15 @@ flowtable_lookup_common(struct flowtable RTFREE(rt); return (NULL); } + + /* Don't insert the entry if the ARP hasn't yet finished resolving */ + if ((lle->la_flags & LLE_VALID) == 0) { + RTFREE(rt); + LLE_FREE(lle); + FLOWSTAT_INC(ft, ft_fail_lle_invalid); + return (NULL); + } + ro->ro_lle = lle; if (flowtable_insert(ft, hash, key, fibnum, ro, flags) != 0) { Modified: head/sys/net/flowtable.h == --- head/sys/net/flowtable.hThu Feb 13 22:24:36 2014(r261858) +++ head/sys/net/flowtable.hFri Feb 14 00:05:09 2014(r261859) @@ -39,6 +39,7 @@ struct flowtable_stat { uint64_tft_frees; uint64_tft_hits; uint64_tft_lookups; + uint64_tft_fail_lle_invalid; }; #ifdef _KERNEL Modified: head/usr.bin/netstat/flowtable.c == --- head/usr.bin/netstat/flowtable.cThu Feb 13 22:24:36 2014 (r261858) +++ head/usr.bin/netstat/flowtable.cFri Feb 14 00:05:09 2014 (r261859) @@ -55,6 +55,7 @@ print_stats(struct flowtable_stat *stat) p(ft_collisions, "\t%ju collision%s\n"); p(ft_free_checks, "\t%ju free check%s\n"); p(ft_frees, "\t%ju free%s\n"); + p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved ARP%s\n"); #undef p2 #undef p ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261861 - head/sys/dev/qlxgb
Author: davidcs Date: Fri Feb 14 01:02:06 2014 New Revision: 261861 URL: http://svnweb.freebsd.org/changeset/base/261861 Log: check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in qla_hw_send is moot. Modified: head/sys/dev/qlxgb/qla_hw.c head/sys/dev/qlxgb/qla_os.c Modified: head/sys/dev/qlxgb/qla_hw.c == --- head/sys/dev/qlxgb/qla_hw.c Fri Feb 14 00:26:30 2014(r261860) +++ head/sys/dev/qlxgb/qla_hw.c Fri Feb 14 01:02:06 2014(r261861) @@ -998,7 +998,6 @@ qla_hw_send(qla_host_t *ha, bus_dma_segm if (hdr_len == 0) { if ((nsegs > Q8_TX_MAX_SEGMENTS) || (mp->m_pkthdr.len > ha->max_frame_size)){ - /* TBD: copy into private buffer and send it */ device_printf(dev, "%s: (nsegs[%d, %d, 0x%b] > Q8_TX_MAX_SEGMENTS)\n", __func__, nsegs, mp->m_pkthdr.len, Modified: head/sys/dev/qlxgb/qla_os.c == --- head/sys/dev/qlxgb/qla_os.c Fri Feb 14 00:26:30 2014(r261860) +++ head/sys/dev/qlxgb/qla_os.c Fri Feb 14 01:02:06 2014(r261861) @@ -1063,10 +1063,7 @@ qla_send(qla_host_t *ha, struct mbuf **m ret = bus_dmamap_load_mbuf_sg(ha->tx_tag, map, m_head, segs, &nsegs, BUS_DMA_NOWAIT); - if ((ret == EFBIG) || - ((nsegs > Q8_TX_MAX_SEGMENTS) && -(((m_head->m_pkthdr.csum_flags & CSUM_TSO) == 0) || - (m_head->m_pkthdr.len <= ha->max_frame_size { + if (ret == EFBIG) { struct mbuf *m; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r261801 - head/contrib/libc++/include
On 2/12/2014 12:14 PM, Dimitry Andric wrote: > Author: dim > Date: Wed Feb 12 18:14:49 2014 > New Revision: 261801 > URL: http://svnweb.freebsd.org/changeset/base/261801 > > Log: > An ABI incompatibility crept into the libc++ 3.4 import in r261283. It > was caused by upstream libc++ commit r194536, which aimed to make the > headers more standards-compliant, by making std::pair's copy constructor > trivial. Unfortunately, this could cause certain C++ applications using > shared libraries built against the previous version of libc++ to crash. > > Fix the ABI incompatibility by making std::pair's copy constructor > non-trivial again. > > Please note: Any C++ applications or shared libraries built with libc++ > between r261283 and this revision should be recompiled. *Please* bump __FreeBSD_version__ for ABI changes and notify portmgr@ of such cases that clearly affect package building. > > Reported by:stefanf > MFC after: 3 weeks > X-MFC-With: r261283 > > Modified: > head/contrib/libc++/include/__config > > Modified: head/contrib/libc++/include/__config > == > --- head/contrib/libc++/include/__config Wed Feb 12 16:39:56 2014 > (r261800) > +++ head/contrib/libc++/include/__config Wed Feb 12 18:14:49 2014 > (r261801) > @@ -567,7 +567,7 @@ template struct __static_asse > #define _LIBCPP_WCTYPE_IS_MASK > #endif > > -#if defined(__APPLE__) > +#if defined(__APPLE__) || defined(__FreeBSD__) > #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR > # define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 > #endif > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r261863 - head/sys/dev/usb/wlan
Author: rpaulo Date: Fri Feb 14 01:47:12 2014 New Revision: 261863 URL: http://svnweb.freebsd.org/changeset/base/261863 Log: Add urtwn_start_locked() to avoid unlocking during TX. Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c == --- head/sys/dev/usb/wlan/if_urtwn.cFri Feb 14 01:46:33 2014 (r261862) +++ head/sys/dev/usb/wlan/if_urtwn.cFri Feb 14 01:47:12 2014 (r261863) @@ -211,6 +211,8 @@ static int urtwn_tx_start(struct urtwn_ struct ieee80211_node *, struct mbuf *, struct urtwn_data *); static voidurtwn_start(struct ifnet *); +static voidurtwn_start_locked(struct ifnet *, + struct urtwn_softc *); static int urtwn_ioctl(struct ifnet *, u_long, caddr_t); static int urtwn_power_on(struct urtwn_softc *); static int urtwn_llt_init(struct urtwn_softc *); @@ -868,13 +870,9 @@ tr_setup: } STAILQ_REMOVE_HEAD(&sc->sc_tx_pending, next); STAILQ_INSERT_TAIL(&sc->sc_tx_active, data, next); - usbd_xfer_set_frame_data(xfer, 0, data->buf, data->buflen); usbd_transfer_submit(xfer); - - URTWN_UNLOCK(sc); - urtwn_start(ifp); - URTWN_LOCK(sc); + urtwn_start_locked(ifp, sc); break; default: data = STAILQ_FIRST(&sc->sc_tx_active); @@ -1717,14 +1715,22 @@ static void urtwn_start(struct ifnet *ifp) { struct urtwn_softc *sc = ifp->if_softc; - struct ieee80211_node *ni; - struct mbuf *m; - struct urtwn_data *bf; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - URTWN_LOCK(sc); + urtwn_start_locked(ifp, sc); + URTWN_UNLOCK(sc); +} + +static void +urtwn_start_locked(struct ifnet *ifp, struct urtwn_softc *sc) +{ + struct ieee80211_node *ni; + struct mbuf *m; + struct urtwn_data *bf; + + URTWN_ASSERT_LOCKED(sc); for (;;) { IFQ_DRV_DEQUEUE(&ifp->if_snd, m); if (m == NULL) @@ -1747,7 +1753,6 @@ urtwn_start(struct ifnet *ifp) sc->sc_txtimer = 5; callout_reset(&sc->sc_watchdog_ch, hz, urtwn_watchdog, sc); } - URTWN_UNLOCK(sc); } static int ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261867 - head/sys/vm
Author: attilio Date: Fri Feb 14 03:34:12 2014 New Revision: 261867 URL: http://svnweb.freebsd.org/changeset/base/261867 Log: Fix-up r254141: in the process of making a failing vm_page_rename() a call of pager_swap_freespace() was moved around, now leading to freeing the incorrect page because of the pindex changes after vm_page_rename(). Get back to use the correct pindex when destroying the swap space. Sponsored by: EMC / Isilon storage division Reported by: avg Tested by:pho MFC after:7 days Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c == --- head/sys/vm/vm_object.c Fri Feb 14 03:30:55 2014(r261866) +++ head/sys/vm/vm_object.c Fri Feb 14 03:34:12 2014(r261867) @@ -1627,9 +1627,11 @@ vm_object_backing_scan(vm_object_t objec p = TAILQ_FIRST(&backing_object->memq); continue; } + + /* Use the old pindex to free the right page. */ if (backing_object->type == OBJT_SWAP) - swap_pager_freespace(backing_object, p->pindex, - 1); + swap_pager_freespace(backing_object, + new_pindex + backing_offset_index, 1); #if VM_NRESERVLEVEL > 0 /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261869 - head/sys/mips/conf
Author: adrian Date: Fri Feb 14 04:03:17 2014 New Revision: 261869 URL: http://svnweb.freebsd.org/changeset/base/261869 Log: Add the ath0 EEPROM hints required to detect the on-chip wifi. This allows the on-chip wifi to work; however it's not yet fully tested. ath0: Vendor=0x168c, Device=0x0031 ath0: Vendor=0x168c, Device=0x0031 ath0: at mem 0x1810-0x1811 irq 0 on nexus0 ... ath0: [HT] enabling HT modes ath0: [HT] enabling short-GI in 20MHz mode ath0: [HT] 1 stream STBC receive enabled ath0: [HT] 1 stream STBC transmit enabled ath0: [HT] 2 RX streams; 2 TX streams Tested: * DB120 development board Modified: head/sys/mips/conf/DB120.hints Modified: head/sys/mips/conf/DB120.hints == --- head/sys/mips/conf/DB120.hints Fri Feb 14 03:45:49 2014 (r261868) +++ head/sys/mips/conf/DB120.hints Fri Feb 14 04:03:17 2014 (r261869) @@ -50,6 +50,16 @@ hint.arge.1.media=1000 hint.arge.1.fduplex=1 hint.arge.1.miimode=1 # GMII +# ath0: Where the ART is - last 64k in the flash +hint.ath.0.eepromaddr=0x1fff +hint.ath.0.eepromsize=16384 + +# ath1: it's different; it's a PCIe attached device, so +# we instead need to teach the PCIe bridge code about it +# (ie, the 'early pci fixup' stuff that programs the PCIe +# host registers on the NIC) and then we teach ath where +# to find it. + # flash layout: # # bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261870 - head/sys/mips/atheros
Author: adrian Date: Fri Feb 14 05:22:28 2014 New Revision: 261870 URL: http://svnweb.freebsd.org/changeset/base/261870 Log: Disable this check for now; it fails on the AR9344 PCI fixup code. I'll make it conditional later. Tested: * DB120 Modified: head/sys/mips/atheros/ar724x_pci.c Modified: head/sys/mips/atheros/ar724x_pci.c == --- head/sys/mips/atheros/ar724x_pci.c Fri Feb 14 04:03:17 2014 (r261869) +++ head/sys/mips/atheros/ar724x_pci.c Fri Feb 14 05:22:28 2014 (r261870) @@ -261,11 +261,13 @@ ar724x_pci_fixup(device_t dev, long flas uint32_t bar0, reg, val; uint16_t *cal_data = (uint16_t *) MIPS_PHYS_TO_KSEG1(flash_addr); +#if 0 if (cal_data[0] != AR5416_EEPROM_MAGIC) { device_printf(dev, "%s: Invalid calibration data from 0x%x\n", __func__, (uintptr_t) flash_addr); return; } +#endif /* Save bar(0) address - just to flush bar(0) (SoC WAR) ? */ bar0 = ar724x_pci_read_config(dev, 0, 0, 0, PCIR_BAR(0), 4); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261871 - head/sys/mips/conf
Author: adrian Date: Fri Feb 14 05:25:15 2014 New Revision: 261871 URL: http://svnweb.freebsd.org/changeset/base/261871 Log: Enable use of the PCIe connected wifi on the DB120 (AR9344) board. The on-board NIC is an 3x3 AR9380 with 5GHz only. * enable pci code in AR9344_BASE * enable ath_pci and the firmware loading bits in DB120 * add in the relevant hints in DB120.hints to inform the probe/attach code where the PCIe fixup data is for the onboard chip. This is only relevant for a default development board. I also have a DB120 with the on-board PCIe wifi NIC disabled and it's exposed as a real PCIe slot (to put normal PCIe NICs in); the fixup code will need to be disabled to make this work correctly. Tested: * DB120 Modified: head/sys/mips/conf/AR934X_BASE head/sys/mips/conf/AR934X_BASE.hints head/sys/mips/conf/DB120 head/sys/mips/conf/DB120.hints Modified: head/sys/mips/conf/AR934X_BASE == --- head/sys/mips/conf/AR934X_BASE Fri Feb 14 05:22:28 2014 (r261870) +++ head/sys/mips/conf/AR934X_BASE Fri Feb 14 05:25:15 2014 (r261871) @@ -102,6 +102,9 @@ options USB_DEBUG optionsUSB_HOST_ALIGN=32 # AR71XX (MIPS in general?) requires this device ehci +device pci +device ar724x_pci + device scbus device umass device da Modified: head/sys/mips/conf/AR934X_BASE.hints == --- head/sys/mips/conf/AR934X_BASE.hintsFri Feb 14 05:22:28 2014 (r261870) +++ head/sys/mips/conf/AR934X_BASE.hintsFri Feb 14 05:25:15 2014 (r261871) @@ -22,6 +22,10 @@ hint.ehci.0.maddr=0x1b000100 hint.ehci.0.msize=0x1000 hint.ehci.0.irq=1 +# pci +hint.pcib.0.at="nexus0" +hint.pcib.0.irq=0 + hint.arge.0.at="nexus0" hint.arge.0.maddr=0x1900 hint.arge.0.msize=0x1000 Modified: head/sys/mips/conf/DB120 == --- head/sys/mips/conf/DB120Fri Feb 14 05:22:28 2014(r261870) +++ head/sys/mips/conf/DB120Fri Feb 14 05:25:15 2014(r261871) @@ -42,5 +42,11 @@ options GEOM_UNCOMPRESS # Used for the static uboot partition map device geom_map +# yes, this board has a PCI connected atheros device +device ath_pci +optionsAR71XX_ATH_EEPROM +device firmware# Used by the above +optionsATH_EEPROM_FIRMWARE + # Boot off of the rootfs, as defined in the geom_map setup. optionsROOTDEVNAME=\"ufs:map/rootfs.uncompress\" Modified: head/sys/mips/conf/DB120.hints == --- head/sys/mips/conf/DB120.hints Fri Feb 14 05:22:28 2014 (r261870) +++ head/sys/mips/conf/DB120.hints Fri Feb 14 05:25:15 2014 (r261871) @@ -60,6 +60,13 @@ hint.ath.0.eepromsize=16384 # host registers on the NIC) and then we teach ath where # to find it. +# ath1 hint - pcie slot 0 +hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1fff4000 +hint.pcib.0.bus.0.0.0.ath_fixup_size=16384 + +# ath0 - eeprom comes from here +hint.ath.1.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware" + # flash layout: # # bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r261859 - in head: sys/net usr.bin/netstat
On Fri, Feb 14, 2014 at 12:05:09AM +, Adrian Chadd wrote: A> Modified: head/usr.bin/netstat/flowtable.c A> == A> --- head/usr.bin/netstat/flowtable.c Thu Feb 13 22:24:36 2014 (r261858) A> +++ head/usr.bin/netstat/flowtable.c Fri Feb 14 00:05:09 2014 (r261859) A> @@ -55,6 +55,7 @@ print_stats(struct flowtable_stat *stat) A> p(ft_collisions, "\t%ju collision%s\n"); A> p(ft_free_checks, "\t%ju free check%s\n"); A> p(ft_frees, "\t%ju free%s\n"); A> +p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved ARP%s\n"); Should be: "\t%ju lookups%s w/ no resolved ARP\n" Or even better: "\t%ju lookups%s with not resolved Layer 2\n" Sorry for late re-review. -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r261859 - in head: sys/net usr.bin/netstat
On Fri, Feb 14, 2014 at 10:21:04AM +0400, Gleb Smirnoff wrote: T> On Fri, Feb 14, 2014 at 12:05:09AM +, Adrian Chadd wrote: T> A> Modified: head/usr.bin/netstat/flowtable.c T> A> == T> A> --- head/usr.bin/netstat/flowtable.c Thu Feb 13 22:24:36 2014 (r261858) T> A> +++ head/usr.bin/netstat/flowtable.c Fri Feb 14 00:05:09 2014 (r261859) T> A> @@ -55,6 +55,7 @@ print_stats(struct flowtable_stat *stat) T> A> p(ft_collisions, "\t%ju collision%s\n"); T> A> p(ft_free_checks, "\t%ju free check%s\n"); T> A> p(ft_frees, "\t%ju free%s\n"); T> A> + p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved ARP%s\n"); T> T> Should be: "\t%ju lookups%s w/ no resolved ARP\n" T> Or even better: "\t%ju lookups%s with not resolved Layer 2\n" Argh, of course 's' is extra: "\t%ju lookup%s with not resolved Layer 2\n" -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261872 - head/sys/dev/usb/controller
Author: hselasky Date: Fri Feb 14 07:17:36 2014 New Revision: 261872 URL: http://svnweb.freebsd.org/changeset/base/261872 Log: Fix minor logical error in the XHCI driver. Set correct SETUP packet direction value. MFC after:2 days Reported by: Horse Ma Modified: head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci.h Modified: head/sys/dev/usb/controller/xhci.c == --- head/sys/dev/usb/controller/xhci.c Fri Feb 14 05:25:15 2014 (r261871) +++ head/sys/dev/usb/controller/xhci.c Fri Feb 14 07:17:36 2014 (r261872) @@ -1759,7 +1759,8 @@ restart: /* check wLength */ if (td->td_trb[0].qwTrb0 & htole64(XHCI_TRB_0_WLENGTH_MASK)) { - if (td->td_trb[0].qwTrb0 & htole64(1)) + if (td->td_trb[0].qwTrb0 & + htole64(XHCI_TRB_0_DIR_IN_MASK)) dword |= XHCI_TRB_3_TRT_IN; else dword |= XHCI_TRB_3_TRT_OUT; Modified: head/sys/dev/usb/controller/xhci.h == --- head/sys/dev/usb/controller/xhci.h Fri Feb 14 05:25:15 2014 (r261871) +++ head/sys/dev/usb/controller/xhci.h Fri Feb 14 07:17:36 2014 (r261872) @@ -192,6 +192,7 @@ struct xhci_stream_ctx { struct xhci_trb { volatile uint64_t qwTrb0; +#defineXHCI_TRB_0_DIR_IN_MASK (0x80ULL << 0) #defineXHCI_TRB_0_WLENGTH_MASK (0xULL << 48) volatile uint32_t dwTrb2; #defineXHCI_TRB_2_ERROR_GET(x) (((x) >> 24) & 0xFF) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r261867 - head/sys/vm
on 14/02/2014 05:34 Attilio Rao said the following: > Author: attilio > Date: Fri Feb 14 03:34:12 2014 > New Revision: 261867 > URL: http://svnweb.freebsd.org/changeset/base/261867 > > Log: > Fix-up r254141: in the process of making a failing vm_page_rename() > a call of pager_swap_freespace() was moved around, now leading to freeing > the incorrect page because of the pindex changes after vm_page_rename(). > > Get back to use the correct pindex when destroying the swap space. > > Sponsored by: EMC / Isilon storage division > Reported by:avg > Tested by: pho > MFC after: 7 days Thank you! I also have not seen any of my previous problems since I started using the patch. > Modified: > head/sys/vm/vm_object.c > > Modified: head/sys/vm/vm_object.c > == > --- head/sys/vm/vm_object.c Fri Feb 14 03:30:55 2014(r261866) > +++ head/sys/vm/vm_object.c Fri Feb 14 03:34:12 2014(r261867) > @@ -1627,9 +1627,11 @@ vm_object_backing_scan(vm_object_t objec > p = TAILQ_FIRST(&backing_object->memq); > continue; > } > + > + /* Use the old pindex to free the right page. */ > if (backing_object->type == OBJT_SWAP) > - swap_pager_freespace(backing_object, p->pindex, > - 1); > + swap_pager_freespace(backing_object, > + new_pindex + backing_offset_index, 1); > > #if VM_NRESERVLEVEL > 0 > /* > -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261875 - head/usr.bin/netstat
Author: adrian Date: Fri Feb 14 07:43:39 2014 New Revision: 261875 URL: http://svnweb.freebsd.org/changeset/base/261875 Log: Reword. Suggestion: glebius Modified: head/usr.bin/netstat/flowtable.c Modified: head/usr.bin/netstat/flowtable.c == --- head/usr.bin/netstat/flowtable.cFri Feb 14 07:36:04 2014 (r261874) +++ head/usr.bin/netstat/flowtable.cFri Feb 14 07:43:39 2014 (r261875) @@ -55,7 +55,7 @@ print_stats(struct flowtable_stat *stat) p(ft_collisions, "\t%ju collision%s\n"); p(ft_free_checks, "\t%ju free check%s\n"); p(ft_frees, "\t%ju free%s\n"); - p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved ARP%s\n"); + p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved Layer 2 address%s\n"); #undef p2 #undef p ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r261875 - head/usr.bin/netstat
On Fri, Feb 14, 2014 at 07:43:40AM +, Adrian Chadd wrote: A> Author: adrian A> Date: Fri Feb 14 07:43:39 2014 A> New Revision: 261875 A> URL: http://svnweb.freebsd.org/changeset/base/261875 A> A> Log: A> Reword. A> A> Suggestion:glebius A> A> Modified: A> head/usr.bin/netstat/flowtable.c A> A> Modified: head/usr.bin/netstat/flowtable.c A> == A> --- head/usr.bin/netstat/flowtable.c Fri Feb 14 07:36:04 2014 (r261874) A> +++ head/usr.bin/netstat/flowtable.c Fri Feb 14 07:43:39 2014 (r261875) A> @@ -55,7 +55,7 @@ print_stats(struct flowtable_stat *stat) A> p(ft_collisions, "\t%ju collision%s\n"); A> p(ft_free_checks, "\t%ju free check%s\n"); A> p(ft_frees, "\t%ju free%s\n"); A> -p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved ARP%s\n"); A> +p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved Layer 2 address%s\n"); A> A> #undef p2 A> #undef p Oh, sorry this is not correct. We need the plural() output after "lookup", not after "address". We need: 1 lookup w/ no resolved Layer 2 address 2 lookups w/ no resolved Layer 2 address We don't want: 1 lookups w/ no resolved Layer 2 address 2 lookups w/ no resolved Layer 2 addresss -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"