summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Many more style cleanups. Switch complex macros to being inline functions.scottl2004-05-011-150/+139
| | | | | | Put @includes in a better spot. Fix many cases of 2 space indents and spaces between a function name and the parens. Use KASSERT instead of a home-rolled ASSERT. Remove some undeeded caddr casts.
* Get rid of a bunch of useless macros. STATIC becomes static, INLINE becomesscottl2004-05-011-367/+227
| | | | | __inline where appropriate and gets nuked elsewhere, IN/OUT/INOUT go away. Reformat code affected by this.
* Some enhancements and bug fix.ambrisko2004-04-301-49/+76
| | | | | | | | | | | | | | | | | | - Define option FORCECONSPEED to force the serial console to be CONSPEED. I've run into a lot of boards in which the detect for prior speed doesn't work and ends up with broken console since it is at the wrong speed. - If a serial port is marked as a console, but console=vidconsole and if the serial ports doesn't exist it will be probed and attached at a 8250 chip. Then writes to that will freeze the system. - Add an option flags 0x400000 to mark this as a potential comconsole in-case the one flaged with 0x10 does not exist in the system. This makes it easier to deploy on systems with one or two serial ports. Obtained from: IronPort
* Small timer cleanups:wpaul2004-04-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Use the dh_inserted member of the dispatch header in the Windows timer structure to indicate that the timer has been "inserted into the timer queue" (i.e. armed via timeout()). Use this as the value to return to the caller in KeCancelTimer(). Previously, I was using callout_pending(), but you can't use that with timeout()/untimeout() without creating a potential race condition. - Make ntoskrnl_init_timer() just a wrapper around ntoskrnl_init_timer_ex() (reduces some code duplication). - Drop Giant when entering if_ndis.c:ndis_tick() and subr_ntorkrnl.c:ntoskrnl_timercall(). At the moment, I'm forced to use system callwheel via timeout()/untimeout() to handle timers rather than the callout API (struct callout is too big to fit inside the Windows struct KTIMER, so I'm kind of hosed). Unfortunately, all the callouts in the callwhere are not marked as MPSAFE, so when one of them fires, it implicitly acquires Giant before invoking the callback routine (and releases it when it returns). I don't need to hold Giant, but there's no way to stop the callout code from acquiring it as long as I'm using timeout()/untimeout(), so for now we cheat by just dropping Giant right away (and re-acquiring it right before the routine returns so keep the callout code happy). At some point, I will need to solve this better, but for now this should be a suitable workaround.
* Do at better job at unit numbering.sos2004-04-301-9/+18
|
* Remove the sio EBus attachment, which never worked with an unpatchedtmm2004-04-301-114/+0
| | | | | driver because sio(4) uses ISA-specific functions. uart(4) has full support for the respective hardware and should be used instead.
* Spring cleanup of macrossos2004-04-3011-100/+45
|
* Don't do malloc(M_WAITOK) for sound buffers while locks are held.green2004-04-291-1/+1
|
* Remove code that fiddles with Giant in ndis_ticktask() that snuck inwpaul2004-04-281-4/+0
| | | | during previous commit.
* Remove the EBus stopgap of r1.248; a proper fix is in place now.tmm2004-04-281-8/+0
|
* Reduce the time spent looking for devices on channels that returnsos2004-04-271-4/+4
| | | | what looks like garbage.
* Sync to 1.172 of usbdevssanpei2004-04-272-2/+18
|
* Add support DELL BC02 Bluetooth USB Adapter(TrueMobile 300)sanpei2004-04-271-0/+4
| | | | | PR: kern/65777 Submitted by: Patrick Hurrelmann <outi@bytephobia.de>
* Add the ability to avoid repetition of s.... sequences with a '.'phk2004-04-271-7/+11
|
* Use pci_get_progif to decide if this is one of the primary/secondarysos2004-04-271-7/+2
| | | | | | | channels. This also work when PCI native mode has been selected (patch for /sys/dev/pci/pci.c needed for that) since pci_get_progif uses the saved value for progif, not the one stored after we may have changed from legacy mode to native PCI mode.
* make this compile/work with CISS_DEBUG defined.ps2004-04-261-8/+10
|
* Fix build breakage.takawata2004-04-261-1/+1
| | | | | Submitted by: Xin LI <delphij@frontfree.net> PR: 65979
* Move the call to AcpiEnterSleepStatePrep() to before we select the BSPnjl2004-04-261-6/+10
| | | | | (cpuid 0) as the processor. It mallocs some data and smp_rendezvous calls functions with locks held.
* Fix two typos from PR: 65694imp2004-04-262-2/+2
| | | | | | | | | | 1) In pci.c, we need to check the child device's state, not the parent device's state. 2) In acpi_pci.c, we have to run the power state change after the acpi method when the old_state is > new state, not the other way around. Submitted by: Dmitry Remesov PR: 65694
* Sync to 1.171 of usbdevssanpei2004-04-252-2/+9
|
* Add support Buffalo(MELCO) USB-Key Lan Adaptor(LUA-U2-KTX)sanpei2004-04-252-0/+2
| | | | Submitted by: KAWAI Kenichi <kawai.kenichi@canon.co.jp>
* Fixed breakage of the formatting operation in rev.1.266. The wrongbde2004-04-251-2/+9
| | | | | | clause of an if-else statement was removed. Reviewed by: no response from maintainer in 12 days
* Don't mask TCD in IMR0 when we initialize the channel. Doing so makesmarcel2004-04-251-1/+1
| | | | | it impossible to check the interrupt status bit when we try to get a character in the low level console code.
* Plug a mem leak in vinum_scandisk().le2004-04-241-0/+1
| | | | Approved by: grog (mentor)
* Push down the responsibility for zeroing a physical page from thealc2004-04-242-4/+0
| | | | | | | | | | | | | caller to vm_page_grab(). Although this gives VM_ALLOC_ZERO a different meaning for vm_page_grab() than for vm_page_alloc(), I feel such change is necessary to accomplish other goals. Specifically, I want to make the PG_ZERO flag immutable between the time it is allocated by vm_page_alloc() and freed by vm_page_free() or vm_page_free_zero() to avoid locking overheads. Once we gave up on the ability to automatically recognize a zeroed page upon entry to vm_page_free(), the ability to mutate the PG_ZERO flag became useless. Instead, I would like to say that "Once a page becomes valid, its PG_ZERO flag must be ignored."
* Try the simplify determining what is ata0 and ata1.sos2004-04-241-17/+1
| | | | | Remove the PCI native addressing code, it eed to be run before we even have control in the ATA driver and should be moved to the pci code.
* Disable interrupts while testing the timer. Not doing this unnecessarilynjl2004-04-241-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added an arbitrary delay to our readings, causing us to use the ACPI-safe read method when not necessary. Submitted by: bde Old: ACPI timer looks GOOD min = 3, max = 5, width = 2 ACPI timer looks BAD min = 3, max = 19, width = 16 ACPI timer looks GOOD min = 3, max = 5, width = 2 ACPI timer looks GOOD min = 3, max = 5, width = 2 ACPI timer looks GOOD min = 3, max = 5, width = 2 ACPI timer looks GOOD min = 3, max = 4, width = 1 ACPI timer looks GOOD min = 3, max = 5, width = 2 ACPI timer looks BAD min = 3, max = 19, width = 16 ACPI timer looks GOOD min = 3, max = 5, width = 2 ACPI timer looks GOOD min = 3, max = 4, width = 1 Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000 New: ACPI timer looks GOOD min = 3, max = 4, width = 1 ACPI timer looks GOOD min = 3, max = 4, width = 1 ACPI timer looks GOOD min = 3, max = 4, width = 1 ACPI timer looks GOOD min = 3, max = 4, width = 1 ACPI timer looks GOOD min = 3, max = 4, width = 1 ACPI timer looks GOOD min = 3, max = 4, width = 1 ACPI timer looks GOOD min = 3, max = 4, width = 1 ACPI timer looks GOOD min = 3, max = 4, width = 1 ACPI timer looks GOOD min = 3, max = 4, width = 1 ACPI timer looks GOOD min = 3, max = 4, width = 1 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 Also, reduce unnecesary overhead in ACPI-fast by remove the barrier for reads. The timer in the ACPI-fast case is known to increase monotonically so there is no need to serialize access to it.
* Change setup for SiS device to allow PCI native mode.sos2004-04-241-4/+4
|
* Add IC Book Labs Gunboat x2 and x4 series of serial adapters.sobomax2004-04-241-0/+45
| | | | | Hardware provided by: IC Book Labs MFC After: 2 weeks
* Clean up two printf()s that were on a line by themselves unintendedlytmm2004-04-231-2/+2
| | | | after the ethernet address printing was moved to common code.
* Enable the led-toggling magic. Compiling files which are in the kernel intophilip2004-04-231-12/+0
| | | | | | | | | modules is a very nice way to produce hard-to-find panics. Who would look for a bug in a Makefile anyway? Has anyone seen the pointy hat? :-o Approved by: njl (mentor)
* Correct KASSERT()s that check for initialization of mutexes in ndis_detach(),wpaul2004-04-231-2/+6
| | | | | | which are different now that I'm not using mutex pools anymore. Noticed by: des
* Add a stopgap for the EBus breakage on sparc64 since the PCI code doesmarius2004-04-231-0/+8
| | | | | | | | | | | resource pre-allocation. The problem is that the BARs of the EBus bridges contain the ranges for the resources for the EBus devices beyond the bridge. So when the EBus code tries to allocate the resource for an EBus device it's already allocated by the PCI code. To be removed again as soon as we have a proper solution in the EBus Code. Reviewed by: tmm Approved by: marcel (mentor)
* Start programming the bus numbers for the pci<->cardbus. When theimp2004-04-231-1/+30
| | | | | | | | | | | | | secondary bus is 0, we program the primary bus, the secondary bus and the suborindate bus. This isn't ideal, since we start at parent_bus + 1 and store this in a static. Ideally, we'd walk the tree and assign bus numbers. However, that's harder to accomplish without some help from the bus layer which we're not planning on doing that until 6. This fixes my CardBus problems on my Sony PCG-Z1WA, and might fix the Dells that have had problems.
* Set the INTR_MPSAFE flag.wpaul2004-04-221-1/+1
|
* Add the ACPI Asus extras driver. Provides support for cool ACPI-controledphilip2004-04-222-0/+630
| | | | | | | | | gadgets (hotkeys, lcd, ...) on Asus laptops. I aim to closely track the acpi4asus project which implements these features in the Linux kernel. If this breaks your laptop, please let me know how it does it :-) Approved by: njl (mentor)
* Ok, _really_ fix the Intel 2100B Centrino deadlock problems this time.wpaul2004-04-221-29/+3
| | | | | | | | | | | | | | | | (I hope.) My original instinct to make ndis_return_packet() asynchronous was correct. Making ndis_rxeof() submit packets to the stack asynchronously fixes one recursive spinlock acquisition, but it's also possible for it to happen via the ndis_txeof() path too. So: - In if_ndis.c, revert ndis_rxeof() to its old behavior (and don't bother putting ndis_rxeof_serial() back since we don't need it anymore). - In kern_ndis.c, make ndis_return_packet() submit the call to the MiniportReturnPacket() function to the "ndis swi" thread so that it always happens in another context no matter who calls it.
* define some new fields in the physical drive structure and pad theps2004-04-221-0/+3
| | | | structure to 512 bytes.
* Fix the build. opt_asr.h is gone.njl2004-04-221-1/+0
| | | | Beer or equivalent to? njl
* Fix stepping in ddb by not checking for a maximum interval. The ACPI-safenjl2004-04-221-31/+32
| | | | | | workaround was for hardware where the clock was not latched, not for hardware that was too slow. Also, make variable names more specific for ddb printing.
* Remove more sead code.scottl2004-04-211-91/+2
|
* Don't indent preprocessor tokens.scottl2004-04-211-70/+70
|
* ata devices in legacy are special, and we must treat them as such.imp2004-04-211-45/+99
| | | | | | | | | | | | | | While I would have prefered to have a solution that didn't move knowledge of this into the pci layer. However, this is literally the only exception that's listed in the PCI standard to the usual way of decoding BARs. atapci devices in legacy mode now ignore the first 4 bars and hard code the values to the legacy ide values (well, for each of the controllers that are in legacy mode). The 5th bar is handled normally. Remove the zero bar handling. zero bars should be ignored at all other times, and since we handle that specially, we don't need the older workaround.
* Remove ASR_MEASURE_PERFORMANCE. It hasn't been able to compile in severalscottl2004-04-211-354/+0
| | | | years.
* Use offsetof() instead of hand-rolling something equivalent.scottl2004-04-211-1/+1
|
* Make the test for ATA PCI legacy addressing mode more robust.sos2004-04-213-15/+44
| | | | | Add code (currently ifdef'd out) to allow ATA PCI native addressing. Fix the altio offset for ATA PCI devices.
* Add comments, including restoring the PIIX4 errata comment, to indicatenjl2004-04-211-45/+76
| | | | | | | | | what the ACPI-safe workaround is intended to fix. Requested by phk. Set the bushandle and tag when attaching the timer, don't do it each time in read_counter(). Pointed out by bde. Move test_counter() to the end. Staticize acpi_timer_reg.
* This driver certainly works fine turning INTR_MPSAFE back on. For thosegreen2004-04-211-1/+1
| | | | | | of you with other cards, please do review and test the drivers for MP-safety and disable Giant in the interrupt routines when you are sure of proper functionality.
* Remove all of the old __FreeBSD_version code that provided FreeBSD 2.2.x andscottl2004-04-211-236/+0
| | | | 3.x shims.
* Begin the slow, painful process of cleaning up asr. This eliminates many of thescottl2004-04-211-91/+68
| | | | bogus casts of NULL. It also distracts me while I procrastinate on useful work.
OpenPOWER on IntegriCloud