aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Document O_CLOEXEC.Konstantin Belousov2011-03-251-4/+16
| | | | | | | | Reviewed by: jhb MFC after: 1 week Notes: svn path=/head/; revision=220000
* Add O_CLOEXEC flag to open(2) and fhopen(2).Konstantin Belousov2011-03-254-4/+17
| | | | | | | | | | | The new function fallocf(9), that is renamed falloc(9) with added flag argument, is provided to facilitate the merge to stable branch. Reviewed by: jhb MFC after: 1 week Notes: svn path=/head/; revision=219999
* Implement compat32 MEMRANGE_GET and MEMRANGE_SET. This is needed toKonstantin Belousov2011-03-252-0/+59
| | | | | | | | | | run 32bit Xorg server with VESA driver. Submitted by: John Wehle <john feith com> MFC after: 1 week Notes: svn path=/head/; revision=219989
* Fully emulate MDIOCLIST for compat32.Konstantin Belousov2011-03-251-1/+9
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=219988
* Remove unneccessary panics, that can be easily triggered by user.Konstantin Belousov2011-03-251-8/+0
| | | | | | | | | The copyin() function handles NULL as well as any other pointer. MFC after: 3 days Notes: svn path=/head/; revision=219987
* Fix file leakage in the freebsd32_ioctl routines.Konstantin Belousov2011-03-251-9/+11
| | | | | | | | | | | | | | Code inspection shows freebsd32_ioctl calls fget for a fd and calls a subroutine to handle each specific ioctl. It is expected that the subroutine will call fdrop when done. However many of the subroutines will exit out early if copyin encounters an error resulting in fdrop never being called. Submitted by: John Wehle <john feith com> MFC after: 3 days Notes: svn path=/head/; revision=219986
* After discussing with Bernhard, the "right" way in net80211 to checkAdrian Chadd2011-03-252-5/+10
| | | | | | | | | | | the channel width is ni->ni_chw, which is set to the negotiated channel width. ni->ni_htflags is the capability, rather than the negotiated value. Teach both the TX path and the sample rate module about this. Notes: svn path=/head/; revision=219985
* I broke periodic adc calibrations - so restore them to working order.Adrian Chadd2011-03-251-5/+5
| | | | Notes: svn path=/head/; revision=219984
* Fix initialisation order with regard to debug prints.Hans Petter Selasky2011-03-251-2/+2
| | | | | | | | | Reported by: Luiz Otavio O Souza MFC after: 14 days Approved by: thompsa (mentor) Notes: svn path=/head/; revision=219983
* Fix panic while associating access point.Kevin Lo2011-03-251-3/+1
| | | | | | | While here, add the SMC SMCWUSB-G Notes: svn path=/head/; revision=219982
* Re-disable the setting of 2040/shortgi bits for now.Adrian Chadd2011-03-251-1/+2
| | | | | | | | | | | | | | | | | This seems to work fine for STA but not HT/20 AP mode. Further discussion with net80211 people will need to take place to ensure that the right flags are set based on the negotiated capabilities of the remote peer, rather than whatever the local parameters are. Sending short-gi frames in 20mhz may work on some chips but it certainly isn't supported on anything currently supported by the HAL; and sending HT40 frames in HT20 mode just plain won't work. Notes: svn path=/head/; revision=219981
* After discussion with Felix Fietkau (nbd) about the ath9k Merlin LNA bitAdrian Chadd2011-03-251-8/+8
| | | | | | | | | | | | | | | | settings, it seems that our defines are backwards and don't match what is in the EEPROM documentation or internal driver. The ath9k code used to have a bitfield here, rather than a uint8_t, and there were #defines used to swap the order based on the endian of the platform - this wasn't because of nybble or bit ordering of the underlying host but because of what the compiler was doing. This may be the reason for the backwards field numbers, as ath9k had similar issues. Notes: svn path=/head/; revision=219980
* Flip ANI on for the AR5416 and later chips. I haven't verified it onAdrian Chadd2011-03-253-5/+8
| | | | | | | | | | the AR9285 so I'll leave it off for that. Ath9k sources indiciate that one of the ANI modes interferes with RIFS detection, so match ath9k and disable that. Notes: svn path=/head/; revision=219979
* The right commit - add a couple more AR_PCU_MISC_MODE2 register bits -Adrian Chadd2011-03-251-0/+2
| | | | | | | SOWL specific. Notes: svn path=/head/; revision=219978
* oops, commited the wrong file change.Adrian Chadd2011-03-251-1/+0
| | | | Notes: svn path=/head/; revision=219977
* Add some more AR_PCU_MISC_MODE2 register settings - these are SOWL or later.Adrian Chadd2011-03-251-0/+1
| | | | Notes: svn path=/head/; revision=219976
* Bring over interrupt mitigation changes from ath9k.Adrian Chadd2011-03-252-10/+20
| | | | | | | | | | | | | | | | * The existing interrupt mitigation code didn't mitigate anything - the per-packet TX/RX interrupts are still occuring. It's possible this worked for the AR5416 but not any later chipsets; I'll investigate and update as needed. * Set both the RX and TX threshold registers whilst I'm at it. This is verified to work on the AR9220 and AR9160. I'm leaving it off by default in case it's truely broken, but I need to have it enabled when doing 11n testing or interrupt loads exceed 10,000 interrupts/sec. Notes: svn path=/head/; revision=219975
* MFgraid/head:Alexander Motin2011-03-2425-1/+15673
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new RAID GEOM class, that is going to replace ataraid(4) in supporting various BIOS-based software RAIDs. Unlike ataraid(4) this implementation does not depend on legacy ata(4) subsystem and can be used with any disk drivers, including new CAM-based ones (ahci(4), siis(4), mvs(4), ata(4) with `options ATA_CAM`). To make code more readable and extensible, this implementation follows modular design, including core part and two sets of modules, implementing support for different metadata formats and RAID levels. Support for such popular metadata formats is now implemented: Intel, JMicron, NVIDIA, Promise (also used by AMD/ATI) and SiliconImage. Such RAID levels are now supported: RAID0, RAID1, RAID1E, RAID10, SINGLE, CONCAT. For any all of these RAID levels and metadata formats this class supports full cycle of volume operations: reading, writing, creation, deletion, disk removal and insertion, rebuilding, dirty shutdown detection and resynchronization, bad sector recovery, faulty disks tracking, hot-spare disks. For Intel and Promise formats there is support multiple volumes per disk set. Look graid(8) manual page for additional details. Co-authored by: imp Sponsored by: Cisco Systems, Inc. and iXsystems, Inc. Notes: svn path=/head/; revision=219974
* Checking file access on size change is bogus. The checks are done earlier byPawel Jakub Dawidek2011-03-241-5/+0
| | | | | | | | | | | | | | | VFS where we know if this is truncate(2) or ftruncate(2). If this is the latter we should depend on the mode the file was opened and not on the current permission. PR: standards/154873 Reported by: Mark Martinec <Mark.Martinec@ijs.si> Discussed with: Eric Schrock <eric.schrock@delphix.com> Discussed with: Mark Maybee <Mark.Maybee@Oracle.COM> MFC after: 1 month Notes: svn path=/head/; revision=219973
* Add proper width calculation for time fields (time, cputime and usertime).Edward Tomasz Napierala2011-03-243-5/+52
| | | | | | | This fixes the ugly overflow in "ps aux" output for "[idle]". Notes: svn path=/head/; revision=219972
* MFgraid/head r218212, r218257:Alexander Motin2011-03-242-9/+96
| | | | | | | | | | | | | | Introduce new type of BIO_GETATTR -- GEOM::setstate, used to inform lower GEOM about state of it's providers from the point of upper layers. Make geom_disk use led(4) subsystem to illuminate states in such fashion: FAILED - "1" (on), REBUILD - "f5" (slow blink), RESYNC - "f1" (fast blink), ACTIVE - "0" (off). LED name should be set for each disk via kern.geom.disk.%s.led sysctl. Later disk API could be extended to allow disk driver to report this info in custom way via it's own facilities. Notes: svn path=/head/; revision=219970
* MFgraid/head r217014:Alexander Motin2011-03-242-42/+161
| | | | | | | | | | | Make `geom XXX list` and `geom XXX status` outputs more consistent: Add -a options to print all geoms, not only ones with providers. Add -g option for `status` to report geom's names, not provider's. Make `status` by default report provider's status (if present), not geom's. Make `status` report consumer's statuses, not only "synchronized" field. Notes: svn path=/head/; revision=219969
* Fix some locking nits with the p_state field of struct proc:John Baldwin2011-03-249-38/+24
| | | | | | | | | | | | | | | | | | | | | - Hold the proc lock while changing the state from PRS_NEW to PRS_NORMAL in fork to honor the locking requirements. While here, expand the scope of the PROC_LOCK() on the new process (p2) to avoid some LORs. Previously the code was locking the new child process (p2) after it had locked the parent process (p1). However, when locking two processes, the safe order is to lock the child first, then the parent. - Fix various places that were checking p_state against PRS_NEW without having the process locked to use PROC_LOCK(). Every place was already locking the process, just after the PRS_NEW check. - Remove or reduce the use of PROC_SLOCK() for places that were checking p_state against PRS_NEW. The PROC_LOCK() alone is sufficient for reading the current state. - Reorder fill_kinfo_proc() slightly so it only acquires PROC_SLOCK() once. MFC after: 1 week Notes: svn path=/head/; revision=219968
* Make "LOGIN" and "CLASS" columns width scale properly instead of wasting space.Edward Tomasz Napierala2011-03-243-5/+34
| | | | Notes: svn path=/head/; revision=219967
* Add missing resource limits:Sergey Kandaurov2011-03-241-12/+14
| | | | | | | | | | - RLIMIT_NPTS - RLIMIT_SWAP MFC after: 1 week Notes: svn path=/head/; revision=219963
* Flip back HT/40 and Short-GI (for 40mhz operation). These are now verified ↵Adrian Chadd2011-03-241-2/+0
| | | | | | | to work. Notes: svn path=/head/; revision=219962
* Fix a WME corner case found by the FreeBSD 802.11n testing crew.Adrian Chadd2011-03-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symptom: sometimes 11n (and non-11n) throughput is great. Sometimes it isn't. Much teeth gnashing occured, and much kernel bisecting happened, until someone figured out it was the order of which things were rebooted, not the kernel versions. (Which was great news to me, it meant that I hadn't broken if_ath.) What we found was that sometimes the WME parameters for the best-effort queue had a burst window ("txop") in which the station would be allowed to TX as many packets as it could fit inside that particular burst window. This improved throughput. After initially thinking it was a bug - the WME parameters for the best-effort queue -should- have a txop of 0, Bernard and I discovered "aggressive mode" in net80211 - where the WME BE queue parameters are changed if there's not a lot of high priority traffic going on. The WME parameters announced in the association response and beacon frames just "change" based on what the current traffic levels are. So in fact yes, the STA was acutally supposed to be doing this higher throughput stuff as it's just meant to be configuring things based on the WME parameters - but it wasn't. What was eventually happening was this: * at startup, the wme qosinfo count field would be 0; * it'd be parsed in ieee80211_parse_wmeparams(); * and it would be bumped (to say 10); * .. and the WME queue parameters would be correctly parsed and set. But then, when you restarted the assocation (eg hostap goes away and comes back with the same qosinfo count field of 10, or if you destroy the sta VIF and re-create it), the WME qosinfo count field - which is associated not to the VIF, but to the main interface - wouldn't be cleared, so the queue default parameters would be used (which include no burst setting for the BE queue) and would remain that way until the hostap qosinfo count field changed, or the STA was actually rebooted. This fix simply cleares the wme capability field (which has the count field) to 0, forcing it to be reset by the next received beacon. Thanks go to Milu for finding it and helping me track down what was going on, and Bernard Schmidt for working through the net80211 and WME specific magic. Notes: svn path=/head/; revision=219961
* MFi386: the part of 219452Yoshihiro Takahashi2011-03-241-14/+10
| | | | | | | | | - bunch of variables are turned into uint8_t. - the setting and reading of "fmt" in load() is removed. - buf in printf() is made static to save space. Notes: svn path=/head/; revision=219960
* Properly print characters larger than 127.Pawel Jakub Dawidek2011-03-241-2/+4
| | | | | | | | | Submitted by: noordsij <noordsij@cs.helsinki.fi> Reviewed by: Eric Schrock <eric.schrock@delphix.com> MFC after: 1 month Notes: svn path=/head/; revision=219959
* Discourage from using "cp -r".Ruslan Ermilov2011-03-241-2/+2
| | | | Notes: svn path=/head/; revision=219958
* Really fix the confusion, sorry for noiseBaptiste Daroussin2011-03-241-2/+2
| | | | | | | | Submitted by: avg Approved by: cognet Notes: svn path=/head/; revision=219956
* It's possible to unmount multiple items at once, make it clear.Ruslan Ermilov2011-03-242-2/+2
| | | | Notes: svn path=/head/; revision=219955
* Fix confusion between a-characters and d-charactersBaptiste Daroussin2011-03-241-2/+2
| | | | | | | | Submitted by: avg Approved by: cognet Notes: svn path=/head/; revision=219954
* MFgraid/head r218174:Alexander Motin2011-03-242-64/+94
| | | | | | | Add simple in-kernel API for controlling leds. Notes: svn path=/head/; revision=219951
* MFgraid/head r217827:Alexander Motin2011-03-243-14/+15
| | | | | | | | | | Change BIO_GETATTR("GEOM::kerneldump") API to make set_dumper() called by consumer (geom_dev) instead of provider (geom_disk). This allows any geom insert it's code into the dump call chain, implementing more sophisticated functionality then just disk partitioning. Notes: svn path=/head/; revision=219950
* Fix typo.Hans Petter Selasky2011-03-241-1/+1
| | | | | | | | | Reported by: Garrett Cooper MFC after: 14 days Approved by: thompsa (mentor) Notes: svn path=/head/; revision=219949
* Fix a completely wrong variable reference.Adrian Chadd2011-03-241-1/+1
| | | | Notes: svn path=/head/; revision=219948
* t3_free_sge_resources should be given the number of qsets it needs to free.Navdeep Parhar2011-03-243-12/+9
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=219946
* T3C initialization should setup the parity fence too.Navdeep Parhar2011-03-241-2/+3
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=219945
* Do not over-allocate MSI interrupts for the case where each ingressNavdeep Parhar2011-03-243-26/+39
| | | | | | | | | | | | queue has its own interrupt. If the exact number that we need is not a power of 2 and we're using MSI, then switch to interrupt multiplexing. While here, replace the magic numbers with something more readable. MFC after: 3 days Notes: svn path=/head/; revision=219944
* Make the ar2133ForceBias() call controllable at runtime.Adrian Chadd2011-03-233-1/+7
| | | | | | | | | | At least one AR5416 user has reported measurable throughput drops with this option. For now, disable it and make it a run-time twiddle. It won't take affect until the next radio programming trip though (eg channel scan, channel change.) Notes: svn path=/head/; revision=219942
* humanize_number(3) multiply the input number by 100, which could cause anXin LI2011-03-231-16/+24
| | | | | | | | | | | | | | | integer overflow when the input is very large (for example, 100 Pi would become about 10 Ei which exceeded signed int64_t). Solve this issue by splitting the division into two parts and avoid the multiplication. PR: bin/146205 Reviewed by: arundel MFC after: 1 month Notes: svn path=/head/; revision=219939
* Remove unused DMA map/tag in softc.Pyun YongHyeon2011-03-231-6/+0
| | | | Notes: svn path=/head/; revision=219938
* Please welcome the Brazilian calendar in the FreeBSD base.Edwin Groothuis2011-03-2310-0/+521
| | | | | | | | | | For now, calendar.brazilian points to pt_BR.ISO8859-1 Submitted by: Renato Tambellini <rtsanch@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=219937
* Comply with style(9).Hans Petter Selasky2011-03-231-4/+4
| | | | | | | | | Reported by: gavin MFC after: 14 days Approved by: thompsa (mentor) Notes: svn path=/head/; revision=219930
* Recognize "ro", "rdonly", "norw", "rw" and "noro" as equal options inJaakko Heinonen2011-03-231-0/+26
| | | | | | | | | | | | | vfs_equalopts(). This allows vfs_sanitizeopts() to filter redundant occurrences of these options. It was possible that for example both "ro" and "rw" options became active concurrently. PR: kern/133614 Discussed on: freebsd-hackers MFC after: 1 month Notes: svn path=/head/; revision=219925
* Modestly increase the maximum allowed size of the kmem map on i386.Alan Cox2011-03-234-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, express this new maximum as a fraction of the kernel's address space size rather than a constant so that increasing KVA_PAGES will automatically increase this maximum. As a side-effect of this change, kern.maxvnodes will automatically increase by a proportional amount. While I'm here ensure that this change doesn't result in an unintended increase in maxpipekva on i386. Calculate maxpipekva based upon the size of the kernel address space and the amount of physical memory instead of the size of the kmem map. The memory backing pipes is not allocated from the kmem map. It is allocated from its own submap of the kernel map. In short, it has no real connection to the kmem map. (In fact, the commit messages for the maxpipekva auto-sizing talk about using the kernel map size, cf. r117325 and r117391, even though the implementation actually used the kmem map size.) Although the calculation is now done differently, the resulting value for maxpipekva should remain almost the same on i386. However, on amd64, the value will be reduced by 2/3. This is intentional. The recent change to VM_KMEM_SIZE_SCALE on amd64 for the benefit of ZFS also had the unnecessary side-effect of increasing maxpipekva. This change is effectively restoring maxpipekva on amd64 to its prior value. Eliminate init_param3() since it is no longer used. Notes: svn path=/head/; revision=219920
* Add support for memstick generation on PowerPC. This is a little suboptimalNathan Whitehorn2011-03-231-0/+78
| | | | | | | since glabel doesn't know about APM partitioning yet, but works well enough. Notes: svn path=/head/; revision=219918
* Update a comment. The kernel stopped using the S* process state constantsJohn Baldwin2011-03-231-1/+1
| | | | | | | a long time ago. Notes: svn path=/head/; revision=219906
* Small style fix.John Baldwin2011-03-231-1/+1
| | | | Notes: svn path=/head/; revision=219905