aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Device megapatch 1/6:Poul-Henning Kamp2004-02-21103-291/+4
| | | | | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. Notes: svn path=/head/; revision=126076
* Use the more appropriate vm_paddr_t in places where a physicalHartmut Brandt2004-02-218-61/+74
| | | | | | | | | address for DMA is handled instead of pointers. Submitted by: Joerg Sonneberger <joerg@britannica.bec.de> Notes: svn path=/head/; revision=126075
* Dont alloc size 0 buffers.Søren Schmidt2004-02-211-3/+5
| | | | Notes: svn path=/head/; revision=126074
* Check both PORTEN and MEMEN for enabled HW.Søren Schmidt2004-02-211-1/+1
| | | | Notes: svn path=/head/; revision=126073
* Only register interrupt as seen if it was a real HW interrupt.Søren Schmidt2004-02-211-1/+3
| | | | Notes: svn path=/head/; revision=126072
* Make sure that the first mbuf in the chain passed to atm_intrHartmut Brandt2004-02-211-4/+8
| | | | | | | always contains a packet header. Notes: svn path=/head/; revision=126066
* The token for atm_intr is actually a void *, not an int. ClarifyHartmut Brandt2004-02-211-2/+4
| | | | | | | | what atm_intr expects in a comment and de-obfuscate the code a little bit by replacing the portability macros with the native BSD names. Notes: svn path=/head/; revision=126065
* Minor beautifications related to style(9) and code consistency.Yaroslav Tykhiy2004-02-211-5/+5
| | | | | | | No functional changes. Notes: svn path=/head/; revision=126064
* Don't remove the first mbuf in the chain if it got empty.Hartmut Brandt2004-02-211-7/+6
| | | | | | | | | | | This removes the packet header in certain cases which later on will give panic. Clarify what the atm_intr expects in the comment and de-obscurify the code a little bit by replacing the portability macros with the BSD names. The code isn't maintained externally anymore so there's no point in keeping the extra level of obscurity. Notes: svn path=/head/; revision=126063
* Improve the SIOCSIFCAP handler a bit:Yaroslav Tykhiy2004-02-211-1/+5
| | | | | | | | | | - allow for ifp->if_ioctl being NULL, as the rest of ifioctl() does; - give the interface driver a chance to report a error to the caller; - don't forget to update ifp->if_lastchange upon successful modification of interface operation parameters. Notes: svn path=/head/; revision=126062
* Fix a major brain-o. If the command needs to be put on the deferred queue,Scott Long2004-02-211-0/+1
| | | | | | | | take it off of the busy queue first. This should fix the 'command is on another queue' panic that showed up recently. Notes: svn path=/head/; revision=126059
* Do not test if pDCB is not NULL, we dereference it before anyway, and itOlivier Houchard2004-02-201-3/+2
| | | | | | | | | | should not happen. Add a KASSERT instead. Reported by: Ted Unangst <tedu@coverity.com> Spotted out by: cperciva Notes: svn path=/head/; revision=126053
* whitespace changes only (prepare for merge from citi tree)Jim Rees2004-02-201-52/+51
| | | | Notes: svn path=/head/; revision=126050
* Backout previous change, it breaks build and it is not neededPawel Jakub Dawidek2004-02-204-107/+13
| | | | | | | | | | | layering violation. As pointed out, there is much better way to do this. Sorry guys, I need to find a better way to force reviews. Requested by: harti, julian, scottl (mentor) Pointy hat to: pjd Notes: svn path=/head/; revision=126035
* Make sure to wake up any select waiters when closing a kqueue (also, notBrian Feldman2004-02-201-0/+4
| | | | | | | | | | crash). I am fairly sure that only people with SMP and multi-threaded apps using kqueue will be affected by this, so I have a stress-testing program on my web site: <URL:http://green.homeunix.org/~green/getaddrinfo-pthreads-stresstest.c> Notes: svn path=/head/; revision=126033
* Fix a glitch in my last commit and revert to using selwakeuppriMathew Kanner2004-02-201-1/+1
| | | | | | | | Noticed by: tanimura Noticed by: truckman Notes: svn path=/head/; revision=126030
* Make uscanner recognise EPSON Perfection 3200. Tested with xsane.Wilko Bulte2004-02-191-0/+1
| | | | | | | | PR: kern/63041 MFC after: 3 days Notes: svn path=/head/; revision=126028
* Tidy up the thread taskqueue implementation and close a lost wakeup race.John Baldwin2004-02-191-14/+9
| | | | | | | | | | Instead of creating a mutex that we msleep on but don't actually lock when doing the corresponding wakeup(), in the kthread, lock the mutex associated with our taskqueue and msleep while the queue is empty. Assert that the queue is locked when the callback function is called to wake the kthread. Notes: svn path=/head/; revision=126027
* Add EPSON Perfection 3200 scanner.Wilko Bulte2004-02-192-2/+9
| | | | Notes: svn path=/head/; revision=126026
* Add EPSON Perfection 3200 scannerWilko Bulte2004-02-191-0/+1
| | | | Notes: svn path=/head/; revision=126025
* Rework jail_attach(2) so that an already jailed process cannot hopJacques Vidrine2004-02-191-12/+12
| | | | | | | | | to another jail. Submitted by: rwatson Notes: svn path=/head/; revision=126023
* Report the correct length for symlink entries.Poul-Henning Kamp2004-02-191-1/+1
| | | | Notes: svn path=/head/; revision=126019
* Add back an include to fix the build for the CPU_ELAN case.John Baldwin2004-02-191-0/+3
| | | | Notes: svn path=/head/; revision=126016
* Use ACPI_NEXT_RESOURCE instead of defining our own copy. The one providedNate Lawson2004-02-192-5/+3
| | | | | | | with ACPI-CA is identical now. Notes: svn path=/head/; revision=126015
* Do not remove the fixed handlers. Several systems (e.g., ASUS) onlyNate Lawson2004-02-191-11/+5
| | | | | | | | | return events on the fixed handler even after defining a duplicate in the AML. While this violates the spec, hopefully we can get by with leaving both installed. Notes: svn path=/head/; revision=126014
* Add new failure detection algorithm.Pawel Jakub Dawidek2004-02-192-1/+94
| | | | | | | | | | | | | It works as follows: In every 'interval' seconds defined links are checked. If they are non-active they will not be used by to data transfer. No response from: julian, archie Silent on: net@ Approved by: scottl (mentor) Notes: svn path=/head/; revision=126012
* Export private structure owned by ng_ether(4) module outside.Pawel Jakub Dawidek2004-02-192-12/+13
| | | | | | | | | | | It'll is required by new failure detection algorithm for ng_one2many(4). No response from: julian, archie Silent on: net@ Approved by: scottl (mentor) Notes: svn path=/head/; revision=126011
* Makefile needed for building geom_concat module.Pawel Jakub Dawidek2004-02-191-0/+8
| | | | | | | Approved by: scottl (mentor) Notes: svn path=/head/; revision=126008
* Introduce CONCAT GEOM class for disk concatenation.Pawel Jakub Dawidek2004-02-192-0/+862
| | | | | | | | | | It allows manual and automatic (based on on-disk metadata) concatenation. Reviewed by: phk, scottl Approved by: scottl (mentor) Notes: svn path=/head/; revision=126007
* - call ip6_output() instead of nd6_output() when ipsec tunnelHajimu UMEMOTO2004-02-191-3/+21
| | | | | | | | | | | | | | | mode is applied, since tunneled packets are considered to be generated packets from a tunnel encapsulating node. - tunnel mode may not be applied if SA mode is ANY and policy does not say "tunnel it". check if we have extra IPv6 header on the packet after ipsec6_output_tunnel() and call ip6_output() only if additional IPv6 header is added. - free the copyed packet before returning. Obtained from: KAME Notes: svn path=/head/; revision=126006
* Added sysctl security.jail.jailed.Pawel Jakub Dawidek2004-02-191-0/+13
| | | | | | | | | | | | | | | It returns 1 is process is inside of jail and 0 if it is not. Information if we are in jail or not is not a secret, there is plenty of ways to discover it. Many people are using own hack to check this and this will be a legal way from now on. It will be great if our starting scripts will take advantage of this sysctl to allow clean "boot" inside jail. Approved by: rwatson, scottl (mentor) Notes: svn path=/head/; revision=126004
* Simplify check. We are only able to check exclusive lock and ifPawel Jakub Dawidek2004-02-191-1/+5
| | | | | | | | | 2nd condition is true, first one is true for sure. Approved by: jhb, scottl (mentor) Notes: svn path=/head/; revision=126003
* Fixed ucred structure leak.Pawel Jakub Dawidek2004-02-192-0/+4
| | | | | | | | | Approved by: scottl (mentor) PR: 54163 MFC after: 3 days Notes: svn path=/head/; revision=126002
* MFi386: revision 1.466Yoshihiro Takahashi2004-02-191-0/+1
| | | | Notes: svn path=/head/; revision=125998
* Add BSD compatibility tty ioctls LINUX_TIOCSBRK and LINUX_TIOCCBRK. ThisBruce M Simpson2004-02-192-0/+13
| | | | | | | | | | addition appears to allow VMware 3 Workstation to operate with nmdm(4) as a virtual COM device. Tested by: Guido van Rooij Notes: svn path=/head/; revision=125997
* When reparenting a process in the PT_DETACH code, only set p_sigparentDon Lewis2004-02-191-1/+2
| | | | | | | | | to SIGCHLD if the new parent process is initproc. MFC after: 2 weeks Notes: svn path=/head/; revision=125993
* Use size_t or ssize_t wherever appropriate instead of casting from int *Tim J. Robbins2004-02-192-26/+27
| | | | | | | | | | to size_t *, which is incorrect because they may have different widths. This caused some subtle forms of corruption, the mostly frequently reported one being that the last character of a filename was sometimes duplicated on amd64. Notes: svn path=/head/; revision=125992
* Enforce the file size limit in VOP_WRITE() as well as VOP_TRUNCATE();Tim J. Robbins2004-02-198-32/+22
| | | | | | | pointed out by bde. Notes: svn path=/head/; revision=125991
* - Correct a long-standing race condition in vm_page_try_to_free() thatAlan Cox2004-02-191-4/+3
| | | | | | | | | | | could result in a dirty page being unintentionally freed. - Simplify the dirty page check in vm_page_dontneed(). Reviewed by: tegge MFC after: 7 days Notes: svn path=/head/; revision=125990
* A Linux thread created using clone() should not send SIGCHLD to itsDon Lewis2004-02-191-3/+3
| | | | | | | | | | parent if no signal is specified in the clone() flags argument. PR: 42457 MFC after: 2 weeks Notes: svn path=/head/; revision=125988
* Fix problem caused by previous commit where some users' buttonsNate Lawson2004-02-192-11/+2
| | | | | | | | | | stopped returning events. Don't disable the event when removing the handler because it still needs to be enabled for the other handler. Also, remove duplicate AcpiEnableEvent calls since the install function now does this for us. Notes: svn path=/head/; revision=125986
* Add support for 'h' and 'hh' modifiers for printf(9).Nate Lawson2004-02-191-2/+21
| | | | | | | | Submitted by: Bruno Ducrot <ducrot AT poupinou.org> Reviewed by: bde Notes: svn path=/head/; revision=125985
* Checkpoint the NOTES I was working on.David E. O'Brien2004-02-191-152/+114
| | | | Notes: svn path=/head/; revision=125984
* Fix a long-standing bug where select on vchans doesn't workMathew Kanner2004-02-191-3/+13
| | | | | | | | | (never wake up) by iterating over them when they exist. Approved by: tanimura (mentor) Notes: svn path=/head/; revision=125982
* Switch to using the new $PIR interrupt routing code and remove the oldJohn Baldwin2004-02-184-436/+22
| | | | | | | | code. The pci_cfgreg.c file now just controls reading/writing PCI config registers. Notes: svn path=/head/; revision=125981
* Rework the $PIR (aka PCIBIOS) PCI interrupt routing code and split it offJohn Baldwin2004-02-181-609/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into its own file: - All of the $PIR interrupt routing is now done in a link-centric fashion. When a host-PCI bridge that uses the $PIR attaches, it calls pir_parse() to parse the table. This scans for link devices and merges all the masks for each link device from the table entries. It then looks at the intline register of PCI devices connected to a link to figure out if the BIOS has routed this link and if so to which IRQ. - The IRQ for any given link can be overridden via a hint like so: 'hw.pci.link.0x62.irq=10' Any IRQ set in this matter is treated as if it were set that way by the BIOS. - We only call the BIOS to route each link device once. - When a PCI device wants to route an interrupt, we look it up in the $PIR to find the associated link. If the link is routed, we simply return the IRQ it is using. If it is not routed, we have to pick one. This uses a different algorithm from the old code. First off, when we try to pick an interrupt from a mask of possible interrupts, we try to pick the one that is least loaded as far as PCI devices. We maintain this weight based on the number of devices attached to each link device. When choosing an IRQ, we first attempt to route using any PCI only interrupts (the old code did this as well). If that doesn't work, we try to use the list of IRQs that the BIOS has used. This is a new step that the new code didn't do and avoids using IRQ 3 or 4 for every virgin interrupt routing. If none of the IRQs that the BIOS used worked, then we fall back to trying anything. - The fallback mask for !PC98 was fixed to include IRQ 3 and not allow IRQ 2. - We don't use the $PIR to route interrupts on a PCI-PCI bridge unless it has already been used to route on at least one Host-PCI bridge. This helps to avoid mixing and matching x86 firmware PCI interrupt routing methods (which is a Bad Thing(tm)). Silence on: current@ Notes: svn path=/head/; revision=125980
* Change the disk(9) API in order to make device removal more robust.Poul-Henning Kamp2004-02-1828-273/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the "struct disk" were owned by the device driver and this gave us problems when the device disappared and the users of that device were not immediately disappearing. Now the struct disk is allocate with a new call, disk_alloc() and owned by geom_disk and just abandonned by the device driver when disk_create() is called. Unfortunately, this results in a ton of "s/\./->/" changes to device drivers. Since I'm doing the sweep anyway, a couple of other API improvements have been carried out at the same time: The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to DISKFLAG_NEEDSGIANT A version number have been added to disk_create() so that we can detect, report and ignore binary drivers with old ABI in the future. Manual page update to follow shortly. Notes: svn path=/head/; revision=125975
* Add partial support for large (>4GB) files on ext2 filesystems. ThisTim J. Robbins2004-02-186-2/+32
| | | | | | | | | | | support is partial in that it will refuse to create large files on filesystems that haven't been upgraded to EXT2_DYN_REV or that don't have the EXT2_FEATURE_RO_COMPAT_LARGE_FILE flag set in the superblock. MFC after: 2 weeks Notes: svn path=/head/; revision=125962
* Don't ignore errors from vfs_allocate_syncvnode.Colin Percival2004-02-181-1/+1
| | | | | | | | | PR: kern/18503 Submitted by: Anatoly Vorobey <mellon@pobox.com> Approved by: rwatson (mentor) Notes: svn path=/head/; revision=125957
* Fixed some style bugs (spaces instead of tabs in macro definitions ...).Bruce Evans2004-02-181-11/+11
| | | | Notes: svn path=/head/; revision=125954