summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix the nfs related daemons so that they don't intermittentlyrmacklem2011-06-021-28/+221
| | | | | | | | | | | | | | | | | | | | | | | | fail with "bind: address already in use". This problem was reported to the freebsd-stable@ mailing list on Feb. 19 under the subject heading "statd/lockd startup failure" by george+freebsd at m5p dot com. The problem is that the first combination of {udp,tcp X ipv4,ipv6} would select a port# dynamically, but one of the other three combinations would have that port# already in use. The patch is somewhat involved because it was requested by dougb@ that the four combinations use the same port# wherever possible. The patch splits the create_service() function into two functions. The first goes as far as bind(2) in a loop for up to GETPORT_MAXTRY - 1 times, attempting to use the same port# for all four cases. If these attempts fail, the last attempt allows the 4 cases to use different port #s. After this function has succeeded, the second function, called complete_service(), does the rest of what create_service() did. The three daemons mountd, rpc.lockd and rpc.statd all have a create_service() function that is patched in a similar way. However, create_service() has non-trivial differences for the three daemons that made it impractical to share the same functions between them. Reviewed by: jhb MFC after: 2 weeks
* Fix the nfs related daemons so that they don't intermittentlyrmacklem2011-06-021-30/+213
| | | | | | | | | | | | | | | | | | | | | | | | fail with "bind: address already in use". This problem was reported to the freebsd-stable@ mailing list on Feb. 19 under the subject heading "statd/lockd startup failure" by george+freebsd at m5p dot com. The problem is that the first combination of {udp,tcp X ipv4,ipv6} would select a port# dynamically, but one of the other three combinations would have that port# already in use. The patch is somewhat involved because it was requested by dougb@ that the four combinations use the same port# wherever possible. The patch splits the create_service() function into two functions. The first goes as far as bind(2) in a loop for up to GETPORT_MAXTRY - 1 times, attempting to use the same port# for all four cases. If these attempts fail, the last attempt allows the 4 cases to use different port #s. After this function has succeeded, the second function, called complete_service(), does the rest of what create_service() did. The three daemons mountd, rpc.lockd and rpc.statd all have a create_service() function that is patched in a similar way. However, create_service() has non-trivial differences for the three daemons that made it impractical to share the same functions between them. Reviewed by: jhb MFC after: 2 weeks
* Temporarily back out those parts of r222613 related to parsing the memorynwhitehorn2011-06-021-144/+25
| | | | | map. They cause non-understood boot failures on some Apple machines with more than 2 GB of RAM (like my work desktop).
* The POWER7 has only 32 SLB slots instead of 64, like other supportednwhitehorn2011-06-024-44/+52
| | | | | | 64-bit PowerPC CPUs. Add infrastructure to support variable numbers of SLB slots and move the user slot from 63 to 0, so that it is always available.
* Write the multi step netconfig to a temporary file and only move thatbz2011-06-023-9/+10
| | | | | | | | | | to the final name if netconfig was completely finished. This fixes reentrance problems even better than r222611. Suggested by: nwhitehorn Reviewed by: nwhitehorn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
* If running under a hypervisor, don't yell at the user about startingnwhitehorn2011-06-021-1/+4
| | | | | unknown CPU types, instead relying on the hypervisor to have given us a reasonable environment.
* Missed file in r222613.nwhitehorn2011-06-021-1/+4
|
* Explicitly initialize the first thread's MSR to PSL_KERNSET.nwhitehorn2011-06-021-1/+1
|
* Include the modules area in the mapped kernel code. This fixes the kernel'snwhitehorn2011-06-021-3/+2
| | | | | access to modules and loader metadata when started from real mode, but without a direct map.
* Remove some dead code: unnecessary isyncs and memory sorting, which arenwhitehorn2011-06-024-47/+9
| | | | handled in mtmsr() and mem_regions(), respectively.
* MFpseries:nwhitehorn2011-06-029-187/+898
| | | | | | | | | | Renovate and improve the AIM Open Firmware support: - Add RTAS (Run-Time Abstraction Services) support, found on all IBM systems and some Apple ones - Improve support for 32-bit real mode Open Firmware systems - Pull some more OF bits over from the AIM directory - Fix memory detection on IBM LPARs and systems with more than one /memory node (by andreast@)
* Empty the network configuration only after the user decided to pick anbz2011-06-021-2/+2
| | | | | | | | | | interface. Otherwise an accidental start of the netowrk configuration and immediate cancel after the install has finished removes the previously configured settings. Discussed with: nwhitehorn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
* Fix opening a shell on the new system (prevent the shell's stderr fromnwhitehorn2011-06-021-1/+1
| | | | ending up in the install log).
* Do not hide stripeoffset from libgeom(3), it may be useful even whenae2011-06-021-4/+2
| | | | | | stripesize is zero. MFC after: 1 week
* Do not leak the pcbinfohash lock in the case where in6_pcbladdr() returnsrwatson2011-06-021-1/+1
| | | | | | | an error during TCP connect(2) on an IPv6 socket. Submitted by: bz Sponsored by: Juniper Networks, Inc.
* Fix man -t by not passing grotty flags to groff when grotty is notuqs2011-06-021-1/+1
| | | | | | | | involved. This fixes a regression introduced with r221303. Noticed by: jilles
* mdoc: reorder sections consistentlyuqs2011-06-0211-90/+91
|
* mdoc: fix markupuqs2011-06-024-4/+6
|
* Cut and paste mistake corrected.jfv2011-06-021-1/+1
|
* There are a couple of structs in mfireg.h with members named 'class'.emaste2011-06-023-15/+15
| | | | | | | | | | These cause problems when trying to include the header in a C++ project. Rename them to 'evt_class', and track the change in mfi and mfiutil. Submitted by: Mark Johnston Sponsored by: Sandvine Incorporated Reviewed by: jhb@ MFC after: 1 week
* First off: update the driver README, the old one was horriblyjfv2011-06-024-149/+257
| | | | | | | | | | | | | | | | | crusty, and this still isn't perfect, but its at least a bit more recent. Secondly, a few improvements to the driver from Andrew Boyer, support hint to allow devices to not attach, add VLAN_HWTSO capability so vlans can use TSO, fix in the interrupt handler to make sure the stack TX queue is processed. Oh, and also make sure IPv6 does not cause a re-init in the ioctl routine. Thanks for your efforts Andrew! Thanks to Claudio Jeker for noticing the ixgbe_xmit() routine was not correctly swapping the dma map from the first to the last descriptor in a multi-descriptor transmission, corrected this.
* In the VOP_PUTPAGES() implementations, change the default error fromkib2011-06-017-34/+48
| | | | | | | | | | | | | | | | VM_PAGER_AGAIN to VM_PAGER_ERROR for the uwritten pages. Return VM_PAGER_AGAIN for the partially written page. Always forward at least one page in the loop of vm_object_page_clean(). VM_PAGER_ERROR causes the page reactivation and does not clear the page dirty state, so the write is not lost. The change fixes an infinite loop in vm_object_page_clean() when the filesystem returns permanent errors for some page writes. Reported and tested by: gavin Reviewed by: alc, rmacklem MFC after: 1 week
* Flesh out the radar detection related operations for the ath driver.adrian2011-06-016-1/+281
| | | | | | | | | | | | | | | | | | | | | | | | | This is in no way a complete DFS/radar detection implementation! It merely creates an abstracted interface which allows for future development of the DFS radar detection code. Note: Net80211 already handles the bulk of the DFS machinery, all we need to do here is figure out that a radar event has occured and inform it as such. It then drives the DFS state engine for us. The "null" DFS radar detection module is included by default; it doesn't require a device line. This commit: * Adds a simple abstracted layer for radar detection state - sys/dev/ath/ath_dfs/; * Implements a null DFS module which doesn't do anything; (ie, implements the exact behaviour at the moment); * Adds hooks to the ath driver to process received radar events and gives the DFS module a chance to determine whether a radar has been detected. Obtained from: Atheros
* Add some missing DFS chipset functionality to the FreeBSD HAL.adrian2011-06-0116-1/+242
| | | | | | | | | | | | | | | | | | | | | | | | Please note - this doesn't in any way constitute a full DFS implementation, it merely adds the relevant capability bits and radar detection threshold register access. The particulars: * Add new capability bits outlining what the DFS capabilities are of the various chipsets. * Add HAL methods to set and get the radar related register values. * Add AR5212 and AR5416+ DFS radar related register value routines. * Add a missing HAL phy error code that's related to radar event processing. * Add HAL_PHYERR_PARAM, a data type that encapsulates the radar register values. The AR5212 routines are just for completeness. The AR5416 routines are a super-set of those; I may later on do a drive-by pass to tidy up duplicate code. Obtained from: Linux, Atheros
* Add an optional netisr dispatch point at ether_input(), but set therwatson2011-06-011-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | default dispatch method to NETISR_DISPATCH_DIRECT in order to force direct dispatch. This adds a fairly negligble overhead without changing default behavior, but in the future will allow deferred or hybrid dispatch to other worker threads before link layer processing has taken place. For example, this could allow redistribution using RSS hashes without ethernet header cache line hits, if the NIC was unable to adequately implement load balancing to too small a number of input queues -- perhaps due to hard queueset counts of 1, 3, or 8, but in a modern system with 16-128 threads. This can happen on highly threaded systems, where you want want an ithread per core, redistributing work to other queues, but also on virtualised systems where hardware hashing is (or is not) available, but only a single queue has been directed to one VCPU on a VM. Note: this adds a previously non-present assertion about the equivalence of the ifnet from which the packet is received, and the ifnet stamped in the mbuf header. I believe this assertion to generally be true, but we'll find out soon -- if it's not, we might have to add additional overhead in some cases to add an m_tag with the originating ifnet pointer stored in it. Reviewed by: bz MFC after: 3 weeks Sponsored by: Juniper Networks, Inc.
* O_FORWARD_IP is only action which depends from the result of lookup ofae2011-06-011-1/+2
| | | | | | | | | | | | | | | | | | | | | dynamic rules. We are doing forwarding in the following cases: o For the simple ipfw fwd rule, e.g. fwd 10.0.0.1 ip from any to any out xmit em0 fwd 127.0.0.1,3128 tcp from any to any 80 in recv em1 o For the dynamic fwd rule, e.g. fwd 192.168.0.1 tcp from any to 10.0.0.3 3333 setup keep-state When this rule triggers it creates a dynamic rule, but this dynamic rule should forward packets only in forward direction. o And the last case that does not work before - simple fwd rule which triggers when some dynamic rule is already executed. PR: kern/147720, kern/150798 MFC after: 1 month
* Poke correct GPIO pins for newer axe(4) controllers with Marvellyongari2011-06-011-3/+18
| | | | | | | PHY. Newer models seem to use different LED mode that requires enabling both GPIO1 and GPIO2. Tested by: marcel
* Add support for new USB serial driver.hselasky2011-06-0110-3/+1865
| | | | | Submitted by: Lev Serebryakov, lev @ MFC after: 14 days
* Don't try to close the stream if fopen(3) fails.jh2011-06-011-1/+1
| | | | | PR: bin/155349 Submitted by: Urankar Mikael
* Hide some debug messages under debug macro.ae2011-06-011-5/+5
| | | | MFC after: 1 week
* Hide useless warning under debug macro.ae2011-06-011-1/+2
| | | | | PR: kern/69963 MFC after: 1 week
* Add .interp back into INITIAL_READONLY_SECTIONS in MIPS n64 ABI.jchandra2011-06-011-1/+9
| | | | | | | | | | | | | | The binutils update in r218822 caused the MIPS n64 dynamic binaries to fail because the ".interp" section is not in the initial sections. This happens because elf64bmip-defs.sh overrides INITIAL_READONLY_SECTIONS to add ".MIPS.options" sections instead of the ".reginfo" section used by n32. This used to work fine, but after r218822, INITIAL_READONLY_SECTIONS also contains the .interp section, so the override has to be done differently. Reported by : aduane at juniper Obtained from: gonzo (Initial version)
* Provide hit-count with rest of the information about a filter.np2011-06-011-1/+19
| | | | MFC after: 1 week
* Firmware device log.np2011-05-311-0/+151
| | | | | | # sysctl dev.t4nex.0.devlog MFC after: mdf's sysctl+sbuf changes are MFC'd
* Fix a bug introduced in revision 222537.ken2011-05-311-0/+2
| | | | | | | | | | | | | | In msgbuf_reinit() and msgbuf_init(), we weren't initializing the mutex. Depending on the contents of memory, the LO_INITIALIZED flag might be set on the mutex (either due to a warm reboot, and the message buffer remaining in place, or due to garbage in memory) and in that case, with INVARIANTS turned on, we would trigger an assertion that the mutex had already been initialized. Fix this by bzeroing the message buffer mutex for the _init() and _reinit() paths. Reported by: mdf
* Merge ACPICA 20110527.jkim2011-05-3115-93/+671
|
* Add module version to iwi/ipw/wpi and iwn.bschmidt2011-05-314-0/+8
| | | | | | | | | | | | | | | | | | The version is used to check if a module is already preset, not setting it results in: can't re-use a leaf (ipw)! module_register: module pci/ipw already exists! Module pci/ipw failed to register: 17 while trying to load the module due to an entry in loader.conf. With this commit we get the expected: module ipw already present! Reported by: Dru Lavigne, bz Tested by: bz MFC after: 1 week
* If driver is not running, disable interrupts and do not try toyongari2011-05-311-1/+1
| | | | | | | | | process received frames. Previously it was possible to handle RX interrupts even if controller is not fully initialized. This resulted in non-working driver after system is up and running. Reported by: hselasky Tested by: hselasky
* Add a sentence to the umount.8 man page to clarify the behaviourrmacklem2011-05-311-1/+4
| | | | | | | | for forced dismount when used on an NFS mount point. Requested by Jeremy Chadwick. This is a content change. MFC after: 2 weeks
* Fix the new NFS client so that it doesn't do an NFSv3rmacklem2011-05-311-2/+11
| | | | | | | | | | Pathconf RPC for cases where the reply doesn't include the answer. This fixes a problem reported by avg@ where the NFSv3 Pathconf RPC would fail when "ls -l" did an lpathconf(2) for _PC_ACL_NFS4. Tested by: avg MFC after: 2 weeks
* Fix apparent garbage in the message buffer.ken2011-05-313-58/+309
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we have had a fix in place (options PRINTF_BUFR_SIZE=128) to fix scrambled console output, the message buffer and syslog were still getting log messages one character at a time. While all of the characters still made it into the log (courtesy of atomic operations), they were often interleaved when there were multiple threads writing to the buffer at the same time. This fixes message buffer accesses to use buffering logic as well, so that strings that are less than PRINTF_BUFR_SIZE will be put into the message buffer atomically. So now dmesg output should look the same as console output. subr_msgbuf.c: Convert most message buffer calls to use a new spin lock instead of atomic variables in some places. Add a new routine, msgbuf_addstr(), that adds a NUL-terminated string to a message buffer. This takes a priority argument, which allows us to eliminate some races (at least in the the string at a time case) that are present in the implementation of msglogchar(). (dangling and lastpri are static variables, and are subject to races when multiple callers are present.) msgbuf_addstr() also allows the caller to request that carriage returns be stripped out of the string. This matches the behavior of msglogchar(), but in testing so far it doesn't appear that any newlines are being stripped out. So the carriage return removal functionality may be a candidate for removal later on if further analysis shows that it isn't necessary. subr_prf.c: Add a new msglogstr() routine that calls msgbuf_logstr(). Rename putcons() to putbuf(). This now handles buffered output to the message log as well as the console. Also, remove the logic in putcons() (now putbuf()) that added a carriage return before a newline. The console path was the only path that needed it, and cnputc() (called by cnputs()) already adds a carriage return. So this duplication resulted in kernel-generated console output lines ending in '\r''\r''\n'. Refactor putchar() to handle the new buffering scheme. Add buffering to log(). Change log_console() to use msglogstr() instead of msglogchar(). Don't add extra newlines by default in log_console(). Hide that behavior behind a tunable/sysctl (kern.log_console_add_linefeed) for those who would like the old behavior. The old behavior led to the insertion of extra newlines for log output for programs that print out a string, and then a trailing newline on a separate write. (This is visible with dmesg -a.) msgbuf.h: Add a prototype for msgbuf_addstr(). Add three new fields to struct msgbuf, msg_needsnl, msg_lastpri and msg_lock. The first two are needed for log message functionality previously handled by msglogchar(). (Which is still active if buffering isn't enabled.) Include sys/lock.h and sys/mutex.h for the new mutex. Reviewed by: gibbs
* Don't need (and can't use) -L to copy links here.imp2011-05-311-1/+1
|
* Fix a couple of spelling errors.imp2011-05-311-3/+3
| | | | Submitted by: bcr@
* - Document the -H option and 'H' key alongside other options and keysjhb2011-05-312-6/+12
| | | | | | | | | | | rather than at the bottom of the manpage. - Remove an obsolete comment about SWAIT being a stale state. It was resurrected for a different purpose in FreeBSD 5 to mark idle ithreads. - Add a comment documenting that the SLEEP and LOCK states typically display the name of the event being waited on with lock names being prefixed with an asterisk and sleep event names not having a prefix. MFC after: 1 week
* On multi-core, multi-threaded PPC systems, it is important that the threadsnwhitehorn2011-05-3115-25/+25
| | | | | | | | | | | | be brought up in the order they are enumerated in the device tree (in particular, that thread 0 on each core be brought up first). The SLIST through which we loop to start the CPUs has all of its entries added with SLIST_INSERT_HEAD(), which means it is in reverse order of enumeration and so AP startup would always fail in such situations (causing a machine check or RTAS failure). Fix this by changing the SLIST into an STAILQ, and inserting new CPUs at the end. Reviewed by: jhb
* Add a new option to toggle the display of the system idle process (per-CPUjhb2011-05-315-7/+34
| | | | | | | | | | | idle threads). The process is displayed by default (subject to whether or not system processes are displayed) to preserve existing behavior. The system idle process can be hidden via the '-z' command line argument or the 'z' key while top is running. When it is hidden, top more closely matches the behavior of FreeBSD <= 4.x where idle time was not accounted to any process. MFC after: 2 weeks
* Remove some further INET related symbols from pf to allow the modulebz2011-05-313-1/+14
| | | | | | | | | | | to not only compile bu load as well for testing with IPv6-only kernels. For the moment we ignore the csum change in pf_ioctl.c given the pending update to pf45. Reported by: dru Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 20 days
* Start teaching pc-sysinstall about IPv6.bz2011-05-313-28/+249
| | | | | | | | | | | | | | | | Add some additional empty string checks for IPv4 and try to configure a netmask along with the address rather than doing things twice. Contrary to AUTO-DHCP, IPv6-SLAAC will accept static configuration as well, which we will use at least for resolv.conf currently and if we were given a static address configure that as an alias as well. The pc-sysinstaller changes going along were committed to PC-BSD as r10773. Reviewed by: kmoore Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 20 days
* Conditionally compile in the af_inet and af_inet6, af_nd6 modules.bz2011-05-316-6/+52
| | | | | | | | | | | | | | | | | | | | | If compiled in for dual-stack use, test with feature_present(3) to see if we should register the IPv4/IPv6 address family related options. In case there is no "inet" support we would love to go with the usage() and make the address family mandatory (as it is for anything but inet in theory). Unfortunately people are used to ifconfig IF up/down etc. as well, so use a fallback of "link". Adjust the man page to reflect these minor details. Improve error handling printing a warning in addition to the usage telling that we do not know the given address family in two places. Reviewed by: hrs, rwatson Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 2 weeks
* It is generally considered useful for release media to have kernels on them.nwhitehorn2011-05-311-2/+4
| | | | Submitted by: joel
OpenPOWER on IntegriCloud