summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move the scan for max_keylen into route.c::route_init(),luigi2009-12-143-26/+11
| | | | | | | and make max_keylen an argument for rn_init(). This removes an unnecessary dependency on domain.h from radix.c MFC after: 7 days
* style(9).yongari2009-12-141-105/+105
|
* Add more Apple partition types.rpaulo2009-12-141-0/+6
|
* Simplify partition type parsing by using a data-oriented model.rpaulo2009-12-143-63/+68
| | | | While there add more Apple and Linux partition types.
* s/u_intXX_t/uintXX_t/gyongari2009-12-142-10/+10
|
* Remove unnecessary return statement.yongari2009-12-141-22/+0
|
* Use ANSI function definations.yongari2009-12-141-95/+38
|
* Don't panic on failure to attach if we fail before or during thegavin2009-12-141-4/+5
| | | | | | | | | | | if_alloc() of ifp. This fixes the panic reported in the PR, but not the attach failure. PR: kern/139079 Tested by: Steven Noonan <steven uplinklabs.net> Reviewed by: thompsa Approved by: ed (mentor) MFC after: 2 weeks`
* Clear VGE_TXDESC_Q bit for transmitted frames. The VGE_TXDESC_Q bityongari2009-12-141-1/+4
| | | | | | | | | | | | seems to work like a tag that indicates 'not list end' of queued frames. Without having a VGE_TXDESC_Q bit indicates 'list end'. So the last frame of multiple queued frames has no VGE_TXDESC_Q bit. The hardware has peculiar behavior for VGE_TXDESC_Q bit handling. If the VGE_TXDESC_Q bit of descriptor was set the controller would fetch next descriptor. However if next descriptor's OWN bit was cleared but VGE_TXDESC_Q was set, it could confuse controller. Clearing VGE_TXDESC_Q bit for transmitted frames ensure correct behavior.
* Add old read_mac_addr routine to this module sincejfv2009-12-141-0/+42
| | | | a customer report of an Invalid MAC Address has occurred.
* Fix typo in register definition.yongari2009-12-141-4/+4
|
* Use PCIR_BAR instead of hard-coded value.yongari2009-12-141-5/+2
|
* Overhaul bus_dma(9) usage and fix various things.yongari2009-12-143-697/+845
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Separate TX/RX buffer DMA tag from TX/RX descriptor ring DMA tag. o Separate RX buffer DMA tag from common buffer DMA tag. RX DMA tag has different restriction compared to TX DMA tag. o Add 40bit DMA address support. o Adjust TX/RX descriptor ring alignment to 64 bytes from 256 bytes as documented in datasheet. o Added check to ensure TX/RX ring reside within a 4GB boundary. Since TX/RX ring shares the same high address register they should have the same high address. o TX/RX side bus_dmamap_load_mbuf_sg(9) support. o Add lock assertion to vge_setmulti(). o Add RX spare DMA map to recover from DMA map load failure. o Add optimized RX buffer handler, vge_discard_rxbuf which is activated when vge(4) sees bad frames. o Don't blindly update VGE_RXDESC_RESIDUECNT register. Datasheet says the register should be updated only when number of available RX descriptors are multiple of 4. o Use __NO_STRICT_ALIGNMENT instead of defining VGE_FIXUP_RX which is only set for i386 architecture. Previously vge(4) also performed expensive copy operation to align IP header on amd64. This change should give RX performance boost on amd64 architecture. o Don't reinitialize controller if driver is already running. This should reduce number of link state flipping. o Since vge(4) drops a driver lock before passing received frame to upper layer, make sure vge(4) is still running after re-acquiring driver lock. o Add second argument count to vge_rxeof(). The argument will limit number of packets could be processed in RX handler. o Rearrange vge_rxeof() not to allocate RX buffer if received frame was bad packet. o Removed if_printf that prints DMA map failure. This type of message shouldn't be used in fast path of driver. o Reduce number of allowed TX buffer fragments to 6 from 7. A TX descriptor allows 7 fragments of a frame. However the CMZ field of descriptor has just 3bits and the controller wants to see fragment + 1 in the field. So if we have 7 fragments the field value would be 0 which seems to cause unexpected results under certain conditions. This change should fix occasional TX hang observed on vge(4). o Simplify vge_stat_locked() and add number of available TX descriptor check. o vge(4) controllers lack padding short frames. Make sure to fill zero for the padded bytes. This closes unintended information disclosure. o Don't set VGE_TDCTL_JUMBO flag. Datasheet is not clear whether this bit should be set by driver or write-back status bit after transmission. At least vendor's driver does not set this bit so remove it. Without this bit vge(4) still can send jumbo frames. o Don't start driver when vge(4) know there are not enough RX buffers. o Remove volatile keyword in RX descriptor structure. This should be handled by bus_dma(9). o Collapse two 16bits member of TX/RX descriptor into single 32bits member. o Reduce number of RX descriptors to 252 from 256. The VGE_RXDESCNUM is 16bits register but only lower 8bits are valid. So the maximum number of RX descriptors would be 255. However the number of should be multiple of 4 as controller wants to update 4 RX descriptors at a time. This limits the maximum number of RX descriptor to be 252. Tested by: Dewayne Geraghty (dewayne.geraghty <> heuristicsystems dot com dot au) Carey Jones (m.carey.jones <> gmail dot com) Yoshiaki Kasahara (kasahara <> nc dor kyushu-u dot ac dotjp)
* Pass all IEs to net80211.rpaulo2009-12-141-18/+5
| | | | | | PR: 141376 Submitted by: Paul <onemda at gmail.com> MFC after: 1 week
* Remove the MTX_SPIN flag to the shared code MUTEXjfv2009-12-141-2/+1
| | | | | as it was causing a panic, also took the opportunity to rename the lock for clarity.
* Prefer bus_alloc_resource_any(9) to bus_alloc_resource(9).yongari2009-12-141-4/+4
|
* Fix spelling in comment.yongari2009-12-141-3/+3
|
* Prefer device_printf(9) to printf(9).yongari2009-12-141-5/+4
|
* Remove register keyword.yongari2009-12-141-3/+3
|
* Add an option to specify that the received ZFS should not be automaticallydelphij2009-12-143-5/+11
| | | | | | | mounted (receive -u). Obtained from: OpenSolaris (onnv revision 8584:327a1b6dd944) Approved by: pjd
* Style improvements:delphij2009-12-141-11/+11
| | | | | | | | | | | | - Sort function prototypes; - Apply static on all function bodies. To quote bde@: > It is a good obfuscation to declare functions as static only in the > prototype, so that you can't see the static for the actual function. > The reverse obfuscation (with static only in the function definition) > would make more sense, but is a constraint error. Reviewed by: bde
* Remove comment claiming that building acpi into the kernel is deprecated.jhb2009-12-141-3/+0
| | | | | | PR: docs/141353 Submitted by: Bruce Cran MFC after: 1 week
* Properly fix callout handling by putting all the per-cpu info inluigi2009-12-141-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | struct callout_cpu. From the comment in the file: + * There is one struct callout_cpu per cpu, holding all relevant + * state for the callout processing thread on the individual CPU. + * In particular: + * cc_ticks is incremented once per tick in callout_cpu(). + * It tracks the global 'ticks' but in a way that the individual + * threads should not worry about races in the order in which + * hardclock() and hardclock_cpu() run on the various CPUs. + * cc_softclock is advanced in callout_cpu() to point to the + * first entry in cc_callwheel that may need handling. In turn, + * a softclock() is scheduled so it can serve the various entries i + * such that cc_softclock <= i <= cc_ticks . Together with a smaller patch committed in september, this fixes a bug that affects 8.0 with apps that rely on callouts to fire exactly in the number of ticks specified (qemu among them). Right now, callouts in 8.0 fire one tick late. This was discussed in september with JeffR and jhb MFC after: 3 days
* Revert the xterm terminal behavior to NOT clear the screen afterdougb2009-12-143-8/+53
| | | | | | | | | exiting a pager, vi, etc. Add some example xterm*-clear entries to the termcap files to make it easier for people to enable that behavior. Document the examples in the man page to make them easier to find.
* Fix one spelling and one copy&paste error in comments.kan2009-12-141-2/+2
|
* Work-around a race condition on ia64 while unlocking a contested lock.marcel2009-12-141-0/+3
| | | | | | | | The race condition is believed to be in UMTX_OP_MUTEX_WAKE. On ia64, we simply go to the kernel to unlock. The big question is why this is only a race condition on ia64... MFC after: 3 days
* Only set ATA_CHECKS_CABLE for chip versions that actually supportmarius2009-12-131-1/+2
| | | | | | | cable detection, i.e. neither for ALI_OLD nor for ALI_NEW revisions >= 0xc7. MFC after: 1 week
* Make admsw(4) compile again fixing typos and adding the missing variablebz2009-12-131-2/+5
| | | | after r199762.
* Add Mark Heily's libkqueue test suite as a general kqueue test suite torwatson2009-12-1310-0/+1729
| | | | | | | | tools/regression. It tests a number of aspects of kqueue behavior, although not all currently pass (possibly bugs in the test suite?). Submitted by: Mark Heily <mark at heily.com> Obtained from: svn://mark.heily.com/libkqueue/trunk/test (r114)
* Properly support M5229 revision 0xc7 and 0xc8:marius2009-12-131-5/+8
| | | | | | | | | | - These revisions no longer have cable detection capability. - The UDMA support bit of register 0x4b has been dropped without an replacement. - According to Linux it's crucial for working ATAPI DMA support to also set the reserved bit 1 of regsiter 0x53 with these revisions. MFC after: 1 week
* Specify the capability and media bits of the capabilities page inmarius2009-12-132-28/+34
| | | | | | | | | | | | native, i.e. big-endian, format and convert as appropriate like we also do with the multibyte fields of the other pages. This fixes the output of acd_describe() to match reality on big-endian machines without breaking it on little-endian ones. While at it, also convert the remaining multibyte fields of the pages read although they are currently unused for consistency and in order to prevent possible similar bugs in the future. MFC after: 1 week
* - Fix main() to use two separated sockets for the two transportshrs2009-12-132-116/+300
| | | | | | | | | | | | | | | | | | | | | when "-P port" is specified. It invoked svc{tcp,udp}_create() for only one of the two allocated sockets, and prevented the TCP socket from binding to as the result. - Use TI-RPC functions and handle sockets in a transport-independent way. At this moment only AF_INET ("udp" and "tcp") is supported because others need rewrites of ACL handling and yp clients. - Add '-h addr' to specify addresses to bind to. - Convert _msgout() to use variable argument lists and remove asprintf() for error strings. - Remove register storage class specifier. Discussed with: kuriyama MFC after: 1 week
* Throughout the network stack we have a few places ofbz2009-12-135-6/+30
| | | | | | | | | | | | | | | | | | if (jailed(cred)) left. If you are running with a vnet (virtual network stack) those will return true and defer you to classic IP-jails handling and thus things will be "denied" or returned with an error. Work around this problem by introducing another "jailed()" function, jailed_without_vnet(), that also takes vnets into account, and permits the calls, should the jail from the given cred have its own virtual network stack. We cannot change the classic jailed() call to do that, as it is used outside the network stack as well. Discussed with: julian, zec, jamie, rwatson (back in Sept) MFC after: 5 days
* Add a few more V_hacks to nfsclient to allow machines with a VIMAGEbz2009-12-134-3/+28
| | | | | | | | | | | kernel to boot from NFS. [1] Note: this is not a full virtualization of nfsclient. It is only does what advertised above and nothing more. Requested by: public demand [1] Tested by: kris, .. MFC after: 5 days
* - Remove times.h from C programs that does not manipulate with time atdelphij2009-12-134-4/+0
| | | | | | all. - Remove pathnames.h from all but io.c since it's the only module that used these definations.
* egetopt.c does not use any stdlib.h definations, nor it referenced anydelphij2009-12-131-3/+0
| | | | | | symbol from other module, so remove reference of stdlib.h and extern.h. Verified with: md5(1)
* Use ANSI prototype for foldit().delphij2009-12-131-3/+1
|
* We use gmt2local code from tcpdump and gnuc.h is no longer being useddelphij2009-12-131-2/+0
| | | | there, so remove this dummy header.
* xinstall.c does not require ctype functions, so ctype.h is notdelphij2009-12-131-1/+0
| | | | | | | necessary here. Note: this would change the md5 checksum due to change caused by different register layout.
* Staticify internal functions and make usage() a prototype.delphij2009-12-131-11/+11
|
* Explicitly say that this is an internal library which is intended to bedelphij2009-12-131-1/+10
| | | | | | | | | used within FreeBSD base system only, and discourage user applications from using it. User applications should use the expat version from the ports/package collection. Reviewed by: simon (earlier version) MFC after: 2 weeks
* Use prototype for usage().delphij2009-12-131-1/+1
|
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-13120-17/+191
| | | | needed.
* Add support for memory disk (md). The size of the memory diskmarcel2009-12-132-0/+156
| | | | | | is determined by MD_IMAGE_SIZE. A file system can be embedded into the loader with /sys/tools/embed_mfs.sh. Note that md.c is not included when MD_IMAGE_SIZE is not set.
* Unbreak the ata_atapi() usage. Since r200171 the mode setting functionsmarius2009-12-133-7/+6
| | | | | | | | get a ata_device type device passed instead of a ata_channel one, thus ata_atapi() has to be adjusted accordingly. Reviewed by: mav MFC after: 3 days
* Document PBDRY and SLEEPQ_STOP_ON_BDRY.kib2009-12-122-3/+22
| | | | | Requested and reviewed by: attilio MFC after: 3 days
* Don't free jail parameter values after printing them - jail_param_getjamie2009-12-121-5/+0
| | | | | | | expects them to be there for the next jail in the list. PR: bin/141359 MFC after: 1 week
* Since the change to rc.subr in r198162 it's not necessary to specifydougb2009-12-121-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | command in the rc.d script if we have a corresponding ${name}_program entry, which we do for named. Rename named_precmd to named_prestart to make it more clear and match convention. Move the command_args definition related to -u up into _prestart(). It (and the associated $named_uid value) are only used there, and unlike required_* and pidfile don't need to be used until this stage. Fix a silly bug that would only have affected people who were using the new named_wait or named_auto_forward features, AND had set up an rndc.conf file instead of using the automatically generated rndc.key. For named_conf: Add "-c $named_conf" to command_args if it's not set to the default. If it is set to the default and we're using the base BIND it's not necessary. If we're using BIND from the ports the user is likely to have included it in _flags (due to long necessity for doing so) so don't duplicate that if it's set. Add $named_conf to required_files
* In current code, threads performing an interruptible sleep (on bothattilio2009-12-127-20/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sxlock, via the sx_{s, x}lock_sig() interface, or plain lockmgr), will leave the waiters flag on forcing the owner to do a wakeup even when if the waiter queue is empty. That operation may lead to a deadlock in the case of doing a fake wakeup on the "preferred" (based on the wakeup algorithm) queue while the other queue has real waiters on it, because nobody is going to wakeup the 2nd queue waiters and they will sleep indefinitively. A similar bug, is present, for lockmgr in the case the waiters are sleeping with LK_SLEEPFAIL on. In this case, even if the waiters queue is not empty, the waiters won't progress after being awake but they will just fail, still not taking care of the 2nd queue waiters (as instead the lock owned doing the wakeup would expect). In order to fix this bug in a cheap way (without adding too much locking and complicating too much the semantic) add a sleepqueue interface which does report the actual number of waiters on a specified queue of a waitchannel (sleepq_sleepcnt()) and use it in order to determine if the exclusive waiters (or shared waiters) are actually present on the lockmgr (or sx) before to give them precedence in the wakeup algorithm. This fix alone, however doesn't solve the LK_SLEEPFAIL bug. In order to cope with it, add the tracking of how many exclusive LK_SLEEPFAIL waiters a lockmgr has and if all the waiters on the exclusive waiters queue are LK_SLEEPFAIL just wake both queues. The sleepq_sleepcnt() introduction and ABI breakage require __FreeBSD_version bumping. Reported by: avg, kib, pho Reviewed by: kib Tested by: pho
* For ia32 syscall(), call cpu_set_syscall_retval(). Update comment insidekib2009-12-122-30/+6
| | | | | | cpu_set_syscall_retval() accordingly. MFC after: 1 week
OpenPOWER on IntegriCloud