summaryrefslogtreecommitdiffstats
path: root/sys/pci
Commit message (Collapse)AuthorAgeFilesLines
* Update for the KDB framework:marcel2004-07-101-1/+2
| | | | o Call kdb_enter() instead of Debugger().
* Further improve locking in xl(4):bms2004-07-091-21/+34
| | | | | | | | | | | | | | - Avoid an additional lock acquire/release when leaving xl_intr(), by changing xl_start*() to xl_start*_locked(), and calling the appropriate routine by chip revision (as the DMA descriptors are different). - Simplify the appropriate routines now that they are called with the lock held. This should save a significant amount of CPU cycles spent on servicing each interrupt for both UP and SMP whilst remaining MPSAFE. Tested by: rwatson
* Apply the long-overdue hatchet of style(9) death to this file.bms2004-07-091-458/+547
|
* Further locking improvements for vr(4):bms2004-07-091-46/+69
| | | | | | | | | | | | - Add *_locked() entry points as needed to avoid unnecessary lock thrashing. - Use these entry points wisely. - Only acquire the lock once when servicing an interrupt. - Check 'suspended' on interrupt to avoid racing detach. - Correct a mis-spelled comment. - Don't take the lock in vr_reset() to avoid lock thrashing in attach. - Comment this. Reviewed by: -net (silence)
* Add a 'suspended' flag to softc so that we can avoid races on detach.bms2004-07-091-0/+1
|
* Actually turn on driver locking in xl(4).bms2004-07-091-10/+0
|
* Further rl(4) locking improvements:bms2004-07-091-48/+71
| | | | | | | | | | | - Avoid unnecessary re-acquisition elsewhere by adding *_locked() entry points as needed. - Correct locking for the DEVICE_POLLING case. - Hold the driver lock for the entire duration of interrupt servicing, to avoid unneeded, expensive re-acquisition; use *_locked() entry points as needed. Reviewed by: -net (silence)
* Whitespace nitbms2004-07-051-1/+1
|
* Eliminate redundant return keywords.bms2004-07-051-29/+0
|
* Whitespace pass.bms2004-07-051-40/+39
|
* style(9):bms2004-07-051-75/+75
| | | | | - Space before bracketized non-void function returns. - Space before condition for conditional blocks.
* Eliminate redundant return keywords.bms2004-07-051-48/+0
|
* Whitespace nitsbms2004-07-052-29/+29
|
* style(9) pass on prototypes.bms2004-07-051-21/+27
|
* Locking cleanup for rl(4).bms2004-07-051-52/+60
| | | | | | | | | | | | | - Eliminate the use of a recursive mutex. - Mark the driver INTR_MPSAFE. This work is incomplete and will be refined in a future commit. - Most notably, _locked() variants of entry points need to be introduced. - The mii upcall/downcall may still be racy. - Add a stubbed-out guard against racing rl_detach() for the time being. Tested on: UP, debug.mpsafenet && !debug.mpsafenet Reviewed by: silence on -net
* style(9) and whitespace cleanup.bms2004-07-052-390/+238
| | | | | | | | Use C99 types. Use ANSI function definitions. Sort prototypes. Split long lines correctly. Punctuate/wordsmith comments. Use device_printf()/if_printf() where possible. Reviewed by: -net (silence)
* Reintroduce and clean up locking in xl(4).bms2004-07-051-88/+178
| | | | | | | | | | | | | | - Eliminate the use of a recursive mutex. - Mark the driver as INTR_MPSAFE. - Split the default media choice code out into xl_choose_media() to avoid making poor assumptions about the state of the lock during attach. - The miibus upcall/downcall paths may still be racy. Change to commented-out locking assertions there for now. - Tested with nfsclient, routed, ssh, ntp, dhclient and quagga bgpd. - This needs SMP test coverage. I do not have such resources. Tested on: UP, !debug.mpsafenet && debug.mpsafenet Hardware: 3C905B-TX (0x905510b7)
* Use if_printf() and device_printf() where appropriate, i.e.:bms2004-07-051-88/+92
| | | | | | | - Use device_printf() during device probe/attach. - Move if_xname initialization to before xl_reset() is called. - Use if_printf() at all other times after struct ifnet has been initialized.
* ANSIfy function definitions.bms2004-07-041-259/+99
| | | | | Remove unnecessary return keywords. Other minor stylistic changes.
* Fix whitespace, indentation, long line wrapping and comments.bms2004-07-041-126/+122
|
* Fix whitespace and comments.bms2004-07-041-20/+25
|
* Consistently use __inline instead of __inline__ as the former is an empty macrostefanf2004-07-042-3/+3
| | | | in <sys/cdefs.h> for compilers without support for inline.
* SMPng locking cleanup for vr(4).bms2004-07-031-66/+58
| | | | | | | | | | | | | | | - Remove recursive locking situations. Remove the MTX_RECURSE bit. - Take the lock for any routine which is not called from within if_vr.c itself; this includes entry points called by newbus, ifnet, callout, ifmedia, and polling subsystems. - Remove spl references from the code added to miibus callbacks in rev 1.60. - Add the INTR_MPSAFE bit. - Tidy up some assignments; locks are not needed for taking the address of something at a known offset, for example. - Tested on the machine this was committed from. Tested on: UP only, !debug.mpsafenet && debug.mpsafenet Reviewed by: rwatson
* - Another whitespace pass; make locking calls more obvious.bms2004-07-031-12/+10
| | | | - Use C99 types for vr_miibus_readreg().
* style(9) compliance.bms2004-07-021-276/+164
| | | | | | | | | Put some braces around the busy-wait loop in vr_rxeoc() to make the no-op semicolon more obvious. No functional changes. Running on the machine I am committing from without problems. Reviewed by: jmallett
* Bring in the first chunk of altq driver modifications. This covers themlaier2004-07-024-26/+37
| | | | | | | | | | | following drivers: bfe(4), em(4), fxp(4), lnc(4), tun(4), de(4) rl(4), sis(4) and xl(4) More patches are pending on: http://peoples.freebsd.org/~mlaier/ Please take a look and tell me if "your" driver is missing, so I can fix this. Tested-by: many No-objection: -current, -net
* Add support for the VIA Apollo KT400/400A/600 AGP host bridges which usejhb2004-07-021-0/+3
| | | | | | | the VIA v3 register offsets. PR: 68545 Submitted by: Ariff Abdullah <skywizard@mybsd.org.my>
* Remove saved_* from dc_softc. They are now no longer needed.imp2004-06-291-5/+0
| | | | Submitted by: Marius Strobl
* Remove burn bridges code that saved/restored the pci config registersimp2004-06-2811-338/+3
| | | | | that are now handled in the pci bus layer. They are no longer necessary.
* Be BURN_BRIDGES compliant.phk2004-06-211-1/+1
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-165-13/+13
| | | | Bump __FreeBSD_version accordingly.
* Use NG_FREE_MSG() instead of FREE().phk2004-06-131-1/+1
|
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-0911-291/+36
|
* Add missing <sys/module.h> includesphk2004-05-3022-0/+22
|
* Add some missing <sys/module.h> includes which are masked by thephk2004-05-301-0/+1
| | | | one on death-row in <sys/kernel.h>
* Switch to using C99 sparse initialisers for the type methods array.julian2004-05-291-12/+9
| | | | | | | | Should make no binary difference. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Reviewed by: Harti Brandt <harti@freebsd.org> MFC after: 1 week
* Wrap the code to save/restore PCI config registers on suspend/resume injhb2004-05-242-0/+10
| | | | | | #ifndef BURN_BRIDGES. Noticed by: phk
* Only initialize the if_sis callout as MPSAFE if debug.mpsafenet is setrwatson2004-05-231-1/+4
| | | | | | | true. Otherwise, assertion checks for Giant in the network stack will fail causing a panic. Reported by: simon
* A handler for ioctl(SIOCSIFCAP) should not alter a bit inyar2004-05-234-4/+8
| | | | | | | if_capenable unless the interface driver is actually able to toggle the respective capability on and off. Reviewed by: ru
* Use __FBSDID.mux2004-05-231-2/+3
|
* In agp_generic_bind_memory(), grab the needed pages before acquiringmux2004-05-231-30/+42
| | | | | | | the agp mutex. We do this because vm_page_grab() called with the VM_ALLOC_RETRY flag can sleep. Pointed out by: alc
* Get rid of a lockmgr consumer by making agp(4) use a standard mutex,mux2004-05-229-20/+11
| | | | | since it's always acquiring the lock exclusively. This was tested with X on an SMP box, with and without WITNESS.
* Plug three lock leaks.mux2004-05-221-0/+3
|
* Add explicit list of SiS AGP chipsets based on Linux kernel's list.anholt2004-05-191-0/+36
| | | | Prompted by: i386/59503
* Replace the lame big endian crc with wpaul's standard big endian crcimp2004-05-191-23/+9
| | | | | | | | | | | algorithm, supplied by wpaul himself. The lame one has an origin that's been called into question, so rather than argue about that (one could make an excellent fair use argument), replace it with better code since that's what FreeBSD is about. Submitted by: wpaul[1], Klaus Klein [1] Bill called this a silly bikeshed. Maybe his is not incorrect.
* Different VIA host bridges use different offsets to their AGP configjhb2004-05-132-9/+41
| | | | | | | | | | | registers, so add a register offset array to the softc. We key off the device ID to determine which set of register offsets. Currently the 8385 host bridge used on amd64 is the only bridge to use the AGP3_VIA_* register offsets and all other bridges use the AGP_VIA_* offsets. It is currently unclear if the AGP3_VIA_* offsets are for VIA bridges that implement AGP 3.0 bridges or just for amd64 bridges. Submitted by: Kenneth Culver culverk at sweetdreamsracing dot biz
* Remove old cy driver files. They have been repo-copied to sys/dev/cy andbde2004-05-021-198/+0
| | | | sys/dev/ic and adjusted to work there.
* 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."
* Add support for the AMD 8111.obrien2004-04-201-2/+4
|
* Use BSD spelling, no SysV.obrien2004-04-191-1/+1
|
OpenPOWER on IntegriCloud