summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate two unused functions: vm_phys_alloc_pages() andalc2007-07-143-40/+17
| | | | | | | | | | vm_phys_free_pages(). Rename vm_phys_alloc_pages_locked() to vm_phys_alloc_pages() and vm_phys_free_pages_locked() to vm_phys_free_pages(). Add comments regarding the need for the free page queues lock to be held by callers to these functions. No functional changes. Approved by: re (hrs)
* The last entry in the ext2_opts array must be NULL,rodrigc2007-07-143-1/+14
| | | | | | | otherwise the kernel with crash in vfs_filteropt() if an invalid mount option is passed to ext2fs. Approved by: re (kensmith)
* Eliminate dead code, specifically, an unused sysctl: "vm.idlezero_maxrun".alc2007-07-141-4/+0
| | | | Approved by: re (hrs)
* Remove "options SCTP_HIGH_SPEED" from NOTES as it has now been removedrwatson2007-07-141-8/+0
| | | | | | from options. Approved by: re (bmah)
* - Modular congestion control, with RFC2581 being the default.rrs2007-07-1422-793/+2620
| | | | | | | | | | | | | | | | | | | | | | | | | | - CMT_PF states added (w/sysctl to turn the PF version on) - sctp_input.c had a missing incr of cookie case when the auth was bad. This meant a free was called without an increment to refcnt, added increment like rest of code. - There was a case, unlikely, when the scope of the destination changed (this is a TSNH case). In that case, it would not free the alloc'ed asoc (in sctp_input.c). - When listed addresses found a colliding cookie/Init, then the collided upon tcb was not unlocked in sctp_pcb.c - Add error checking on arguments of sctp_sendx(3) to prevent it from referencing a NULL pointer. - Fix an error return of sctp_sendx(3), it was returing ENOMEM not -1. - Get assoc id was changed to use the sanctified socket api method for getting a assoc id (PEER_ADDR_INFO instead of PEER_ADDR_PARAMS). - Fix it so a peeled off socket will get a proper error return if it trys to send to a different address then it is connected to. - Fix so that select_a_stream can avoid an endless loop that could hang a caller. - time_entered (state set time) was not being set in all cases to the time we went established. Approved by: re(ken smith)
* Perform range check before allocating memory when readingrodrigc2007-07-131-0/+4
| | | | | | | | extended attributes. Reviewed by: kib Approved by: re (hrs) PR: 114389
* Add support for G965/Q965/GM965/GME965/GME945 AGP.anholt2007-07-138-460/+774
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds a function to agp.c to set the aperture resource ID if it's not the usual AGP_APBASE. Previously, agp.c had been assuming AGP_APBASE, which resulted in incorrect agp_info, and contortions by agp_i810.c to work around it. This also adds functions to agp.c for default AGP_GET_APERTURE() and AGP_SET_APERTURE(), which return the aperture resource size and disallow aperture size changes. Moving to these for our AGP drivers will likely result in stability improvements. This should fix 855-class aperture size detection. Additionally, refuse to attach agp_i810 when some RAM is above 4GB and the GART can't reference memory that high. This should be very rare. The correct solution would be bus_dma conversion for agp, which is beyond the scope of this change. Other AGP drivers could likely use this change as well. G33/Q35/Q33 AGP support is also included, but disconnected by default due to lack of testing. PR: kern/109724 (855 aperture issue) Submitted by: FUJIMOTO Kou<fujimoto@j.dendai.ac.jp> Approved by: re (hrs)
* MFp4:imp2007-07-1311-34/+197
| | | | | | | | | | Add support for the CENTIPAD board (http://www.harerod.de/centipad/index.html) (which is a very cool, very small ARM board) Add support for KB9202B (it has different memory) Make BOOT_FLAVOR settable Minor cleanup nits Approved by: re@
* Update a comment describing the page queues.alc2007-07-131-6/+7
| | | | Approved by: re (hrs)
* Eliminate dead code.alc2007-07-121-10/+0
| | | | Approved by: re (hrs)
* Complete repo-copy and move of Coda from src/sys/coda to src/sys/fs/codarwatson2007-07-1233-7148/+46
| | | | | | | | | | by removing files from src/sys/coda, and updating include paths in the new location, kernel configuration, and Makefiles. In one case add $FreeBSD$. Discussed with: anderson, Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith) Repo-copy madness: simon
* Forced commit to recognize repo-copy of Coda files from src/sys/coda torwatson2007-07-121-0/+2
| | | | | | | | src/sys/fs/coda. Discussed with: anderson, Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith) Repo-copy madness: simon
* A couple late breaking bugs that testing have turned up.jfv2007-07-121-3/+6
| | | | | | | | | - change include style so build in kernel try OR standalone work. - Limit HWCSUM - I was led to believe that it would work with RSS, but our testing had odd issues which suggests this is false. - A fatfinger error in the ioctl code made ifconfig up not work. Approved by: re
* Fix a couple of issues with the stack limit for 32-bit processes on 64-bitjhb2007-07-125-21/+33
| | | | | | | | | | | | | kernels exposed by the recent fixes to resource limits for 32-bit processes on 64-bit kernels: - Let ABIs expose their maximum stack size via a new pointer in sysentvec and use that in preference to maxssiz during exec() rather than always using maxssiz for all processses. - Apply the ABI's limit fixup to the previous stack size when adjusting RLIMIT_STACK to determine if the existing mapping for the stack needs to be grown or shrunk (as well as how much it should be grown or shrunk). Approved by: re (kensmith)
* revert handling of ssid and bssid to be manadatory instead of advisorysam2007-07-121-33/+40
| | | | | | Prodded by: Kevin Gerry Reviewed by: thompsa, sephe Approved by: re (kensmith)
* Round up the FAT block size to a multiple of the sector size so that i/obde2007-07-121-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | to the FAT is possible. Make the FAT block size less arbitrary before it is rounded up: - for FAT12, default to 3*512 instead of to 3 sectors. The magic 3 is the default number of 512-byte FAT sectors on a floppy drive. That many sectors is too many if the sector size is larger. - for !FAT12, default to PAGE_SIZE instead of to 4096. Remove MSDOSFS_DFLTBSIZE since it only obfuscated this 4096. For reading the BPB, use a block size of 8192 instead of 2048 so that sector sizes up to 8192 can work. We should try several sizes, or just try the maximum supported size (MAXBSIZE = 64K). I use 8192 because that is enough for DVD-RW's (even 2048 is enough) and 8192 has been tested a lot in use by ffs. This completes fixing msdosfs for some large sector sizes (up to 8K for read and 64K for write). Microsoft documents support for sector sizes up to 4K in mdosfs. ffs is currently limited to 8K for both read and write. Approved by: re (kensmith) Approved by: nyan (several years ago)
* Fix a bug where the callout might not be initialized before being used.njl2007-07-121-6/+18
| | | | | | | | | | | | | Rev 1.9 introduced another path where machclk_freq would be initialized before the rest of setup was done (i.e. initializing the callout). Make the one-time initialization a separate function and make init_machclk() able to be called multiple times, any time. We depend on tsc_freq first being updated from the highest priority eventhandler, thus we run last and call init_machclk() to set machclk_freq. Also, don't initialize static variables to 0. Tested by: Eygene Ryabinkin Approved by: re
* Fix some bugs involving the fsinfo block (many remain unfixed). This isbde2007-07-124-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | part of fixing msdosfs for large sector sizes. One of the fixed bugs was fatal for large sector sizes. 1. The fsinfo block has size 512, but it was misunderstood and declared as having size 1024, with nothing in the second 512 bytes except a signature at the end. The second 512 bytes actually normally (if the file system was created by Windows) consist of a second boot sector which is normally (in WinXP) empty except for a signature -- the normal layout is one boot sector, one fsinfo sector, another boot sector, then these 3 sectors duplicated. However, other layouts are valid. newfs_msdos produces a valid layout with one boot sector, one fsinfo sector, then these 2 sectors duplicated. The signature check for the extra part of the fsinfo was thus normally checking the signature in either the second boot sector or the first boot sector in the copy, and thus accidentally succeeding. The extra signature check would just fail for weirder layouts with 512-byte sectors, and for normal layouts with any other sector size. Remove the extra bytes and the extra signature check. 2. Old versions did i/o to the fsinfo block using size 1024, with the second half only used for the extra signature check on read. This was harmless for sector size 512, and worked accidentally for sector size 1024. The i/o just failed for larger sector sizes. The version being fixed did i/o to the fsinfo block using size fsi_size(pmp) = (1024 << ((pmp)->pm_BlkPerSec >> 2)). This expression makes no sense. It happens to work for sector small sector sizes, but for sector size 32K it gives the preposterous value of 64M and thus causes panics. A sector size of 32768 is necessary for at least some DVD-RW's (where the minimum write size is 32768 although the minimum read size is 2048). Now that the size of the fsinfo block is 512, it always fits in one sector so there is no need for a macro to express it. Just use the sector size where the old code uses 1024. Approved by: re (kensmith) Approved by: nyan (several years ago for a different version of (2))
* Update the mxge(4) driver's copyright to 2007, and dropgallatin2007-07-127-41/+13
| | | | | | the binary distribution clause. Approved by: re (bmah)
* Directly initialize nxge's ifaddrp pointer to ifnetp->if_addr ratherrwatson2007-07-121-1/+1
| | | | | | | | | than indirecting through ifaddr_byindex, which makes things easier with respect to virtualized network stacks. Submitted by: Marko Zec <zec at icir dot org> Reviewed by: Leonid Grossman <Leonid dot Grossman at neterion dot com> Approved by: re (kensmith)
* bus_dma_tag_create() and bus_dma_mem_alloc() shall not be called with akib2007-07-121-9/+15
| | | | | | | | | | | | | non-sleepable lock held. drm_pci_alloc() calls them, thus drm mutex shall not be held during the call. Move the drm_pci_alloc() to the start of the i915_initialize() and drop the the drm mutex around it. Reported by: Ganbold <ganbold micom mng net> Reviewed by: anholt Approved by: re (hrs) MFC after: 1 week
* Improve the net80211 handling within ndisthompsa2007-07-122-158/+303
| | | | | | | | | | | - use net80211 for scanning and pass the results back to the scan cache - use ieee80211_init_channels to fill our channel list - fix up state transitions - depreciate the old wicontrol ioctls - add some debugging lines (#define NDIS_DEBUG) Reviewed by: sam Approved by: re (kensmith)
* Removed unnecessary global includes for ixgbe, and em. Both have beenjfv2007-07-121-6/+0
| | | | | | determined to be unnecessary. Approved by: re
* Add the actual source too :)jfv2007-07-1112-0/+9206
| | | | Approved by: re
* New driver for Intel 10G PCI-Express adapter (82598), driver isjfv2007-07-112-0/+13
| | | | | | | still in Beta, but we want early users to have access to it in 7.0, Feedback welcome. Enjoy. -Jack Approved by: re
* Remove the internal use of __packed and put it on the structuresmjacob2007-07-112-40/+40
| | | | | | | themselves. Reviewed by: nate, peter, warner, robert Approved by: re (ken)
* In the function pc98_check_if_type for the non-8251 casemjacob2007-07-111-0/+4
| | | | | | | | make sure we initialize fileds in the iod that otherwise would have been initialized. Reviewed by: nate, ken, warner Approved by: re (ken)
* Fix ioctls on the control vnode: ioctls on a character device fail withrwatson2007-07-112-2/+2
| | | | | | | | ENOTTY. Make the control vnode a regular file so that ioctls are passed through to our kernel module. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
* Avoid a panic in insmntque when we pass a NULL mount: this reenablesrwatson2007-07-112-14/+2
| | | | | | | | | some previously disabled code which according to the comment caused a problem during shutdown. But even that is still better than triggering a kernel panic whenever venus is started. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
* Replace CODA_OPEN with CODA_OPEN_BY_FD: coda_open was disabled becauserwatson2007-07-1112-262/+108
| | | | | | | | | | | we can't open container files by device/inode number pair anymore. Replace the CODA_OPEN upcall with CODA_OPEN_BY_FD, where venus returns an open file descriptor for the container file. We can then grab a reference on the vnode coda_psdev.c:vc_nb_write and use this vnode for further accesses to the container file. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
* Now that wicontrol has been removed from the base system the correspondingthompsa2007-07-112-1/+15
| | | | | | | | ioctls can be removed. These have been #ifdef'd out and left as a reference in case any of the RIDs need to be turned into sysctls at a later date. Reviewed by: sam, avatar Approved by: re (kensmith)
* Resolve Coda mount failing because Coda failed to match the devicerwatson2007-07-112-16/+8
| | | | | | | | operations. But we don't have to, if we find the coda_mntinfo structure for this device in our linked list, we know the device is good. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
* Avoid crash when opening Coda device: when allocating coda_mntinfo, werwatson2007-07-114-14/+20
| | | | | | | | need to initialize dev so that we can actually find the allocated coda_mntinfo structure later on. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
* Fix kbdmux(4) issue with backslash/underscore key not working onemax2007-07-111-0/+3
| | | | | | | | | Japanese 106/109 keyboard. PR: kern/112214, kern/99090 Submitted by: TOMITA Yoshinori, TAKAHASHI Yoshihiro Approved by: re (hrs) MFC after: 3 days
* Fix userland applications compilation by using correct KPI protectionattilio2007-07-111-0/+7
| | | | | | | | | macros for lock_profiling. Reported by: Tom McLaughlin <tmclaugh@sdf.lonestar.org> Tested by: Tom McLaughlin <tmclaugh@sdf.lonestar.org> Approved by: jeff (mentor) Approved by: re
* This commit was generated by cvs2svn to compensate for changes in r171364,harti2007-07-111-7/+7
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Vendor patch to remove some __inline qualifiers on non-static functionsharti2007-07-111-7/+7
| | | | | | | | | | | | | | because they seem to cause warnings in gcc-4.2. Submitted by: mjacob Approved by: re
* | Protect against divide by zero while calculating bus speed due toariff2007-07-111-1/+5
| | | | | | | | | | | | | | | | possible broken kernel timecounter. Reported/Tested by: silby Approved by: re (hrs) MFC after: 1 day
* | MFp4: Make use of the kernel unit number allocation facilitydelphij2007-07-113-18/+10
| | | | | | | | | | | | | | for tmpfs nodes. Submitted by: Mingyan Guo <guomingyan gmail com> Approved by: re (tmpfs blanket)
* | Remove now-stale 00READ file in the Coda tree; rvb isn't the currentrwatson2007-07-111-15/+0
| | | | | | | | | | | | contact for the Coda kernel module in FreeBSD. Approved by: re (kensmith)
* | Add Micro Research PCMCIA LAN Adapter MR10TPC support. Patch slightlyimp2007-07-112-0/+3
| | | | | | | | | | | | | | | | reworked by me. Submitted by: Osamu Hasegawa-san PR: 93393 Approved by: re (hrs)
* | Add --no-warn-mismatch to ld(1) when linking binary files intomarcel2007-07-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELF files. On ia64 the ELF header contains information about characteristics of the machine code and ld(1) needs that to determine whether input files are compatible for linking. To this end non-ELF files are not supported by binutils on ia64. However, the resulting ELF file seems to be correct despite the warnings and the non-supportedness of non-ELF files and it appears enough to unbreak the build of firmware(9) files on ia64 by simply supressing the warning. Ran into by: gallatin@ Approved by: re (hrs) Looks good to me: mlaier@
* | Mark ng_h4(4) as not MPSAFE and disconnect it from the LINT build for now.emax2007-07-111-1/+1
| | | | | | | | Approved by: re (rwatson)
* | Add additional product id and quirks entry for MetaGeek Wi-Spyimp2007-07-102-0/+5
| | | | | | | | | | | | Submitted by: Robert Noland PR: 114481 Approved by: re@ (blanket)
* | Correct a problem in the ZERO_COPY_SOCKETS option, specifically, inalc2007-07-101-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vm_page_cowfault(). Initially, if vm_page_cowfault() sleeps, the given page is wired, preventing it from being recycled. However, when transmission of the page completes, the page is unwired and returned to the page queues. At that point, the page is not in any special state that prevents it from being recycled. Consequently, vm_page_cowfault() should verify that the page is still held by the same vm object before retrying the replacement of the page. Note: The containing object is, however, safe from being recycled by virtue of having a non-zero paging-in-progress count. While I'm here, add some assertions and comments. Approved by: re (rwatson) MFC After: 3 weeks
* | Mark ng_h4(4) as not MPSAFE and disconnect it from the build for now.emax2007-07-102-2/+3
| | | | | | | | Approved by: re (rwatson)
* | Don't use almost perfectly pessimal cluster allocation. Allocationbde2007-07-102-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the the first cluster in a file (and, if the allocation cannot be continued contiguously, for subsequent clusters in a file) was randomized in an attempt to leave space for contiguous allocation of subsequent clusters in each file when there are multiple writers. This reduced internal fragmentation by a few percent, but it increased external fragmentation by up to a few thousand percent. Use simple sequential allocation instead. Actually maintain the fsinfo sequence index for this. The read and write of this index from/to disk still have many non-critical bugs, but we now write an index that has something to do with our allocations instead of being modified garbage. If there is no fsinfo on the disk, then we maintain the index internally and don't go near the bugs for writing it. Allocating the first free cluster gives a layout that is almost as good (better in some cases), but takes too much CPU if the FAT is large and the first free cluster is not near the beginning. The effect of this change for untar and tar of a slightly reduced copy of /usr/src on a new file system was: Before (msdosfs 4K-clusters): untar: 459.57 real untar from cached file (actually a pipe) tar: 342.50 real tar from uncached tree to /dev/zero Before (ffs2 soft updates 4K-blocks 4K-frags) untar: 39.18 real tar: 29.94 real Before (ffs2 soft updates 16K-blocks 2K-frags) untar: 31.35 real tar: 18.30 real After (msdosfs 4K-clusters): untar 54.83 real tar 16.18 real All of these times can be improved further. With multiple concurrent writers or readers (especially readers), the improvement is smaller, but I couldn't find any case where it is negative. 342 seconds for tarring up about 342 MB on a ~47MB/S partition is just hard to unimprove on. (This operation would take about 7.3 seconds with reasonably localized allocation and perfect read-ahead.) However, for active file systems, 342 seconds is closer to normal than the 16+ seconds above or the 11 seconds with other changes (best I've measured -- won easily by msdosfs!). E.g., my active /usr/src on ffs1 is quite old and fragmented, so reading to prepare for the above benchmark takes about 6 times longer than reading back the fresh copies of it. Approved by: re (kensmith)
* | Further cleanup of UDPv4:rwatson2007-07-102-98/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move udp_sendspace and udp_recvspace global variables and associated sysctls to the top of the file where most other such things are present. - Rename static variable 'blackhole' to 'udp_blackhole' and unstaticize so that we can add blackhole support for UDPv6 using the same MIB variable. - Move udp_append() above udp_input() to match the function order in udp6_usrreq.c. Approved by: re (kensmith)
* | Fixing the mount_smbfs(8) hanging by utilising the destroy_dev_sched() KPI.avatar2007-07-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | Relevant threads: http://lists.freebsd.org/pipermail/freebsd-current/2007-June/074329.html Reviewed by: kib, bp (slightly different version) Tested by: Yuri Pankov <yuri.pankov at gmail dot com>, Jiawei Ye <leafy7382 at gmail dot com> Approved by: re (kensmith)
* | Get rid of a couple of Coverity found sign comparison errors.mjacob2007-07-101-3/+3
| | | | | | | | | | Approved by: re (Ken) MFC after: 3 days
OpenPOWER on IntegriCloud