summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pccbb.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ansijsg2021-03-051-8/+3
|
* pccbb.c: tsleep(9) -> tsleep_nsec(9), timeout_add(9) -> timeout_add_nsec(9)cheloha2020-03-201-3/+5
| | | | Straightforward ticks -> milliseconds conversions.
* consistently uppercase pci product definesjsg2020-01-051-5/+5
| | | | ok mpi@
* we have splraise() nowdlg2018-07-171-38/+4
| | | | | | | | | previously the code would do a series of comparisons to IPL_FOO and IPL_BAR, and use splfoo() and splbar() as needed, but for like a dozen different IPl levels (i may be exaggerating). splraise() rolls all of that up. ok deraadt@ mpi@
* If you use sys/param.h, you don't need sys/types.hderaadt2017-09-081-2/+1
|
* fairly simple size for free()deraadt2015-09-111-3/+3
|
* Try to assign a secondary bus number if the BIOS left the CardBus bridgekettenis2015-07-201-3/+15
| | | | | | unconfigured. ok miod@, mlarkin@
* simplify a triple-deep ternary operation.bcook2015-07-191-3/+3
| | | | ok beck@ krw@
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-3/+3
| | | | after discussions with beck deraadt kettenis.
* Add a DVACT_WAKEUP op to the *_activate() API. This is called after thederaadt2013-12-061-8/+8
| | | | | | | | kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
* Replace workqs with tasks.mpi2013-10-301-1/+2
| | | | ok dlg@
* Use pci_set_powerstate() unconditionally for all chip variants, ratherderaadt2012-10-181-7/+4
| | | | | | than a kludged together chunk of code for just one chip, which happens to be entirely wrong. We need to watch for regressions on cardbus, though. ok kettenis
* Revamp the sequences for suspend/hibernate -> resume so that the codederaadt2012-10-081-3/+5
| | | | | | | | | | paths are reflexive. It is now possible to fail part-way through a suspend sequence, and recover along the resume code path. Split DVACT_SUSPEND by adding a new DVACT_POWERDOWN method is used after hibernate (and suspend too) to finish the job. Some drivers must be converted at the same time to use this instead of shutdown hooks (the others will follow at a later time) ok kettenis mlarkin
* Fix compilation with option CBB_DEBUG; noticed by Dave Anderson on misc@miod2010-12-081-4/+3
|
* Get rid of evcount's support for arranging counters in a treematthew2010-09-201-3/+2
| | | | | | | hierarchy. Everything attached to a single root node anyway, so at best we had a bush. "i think it is good" deraadt@
* Document that the resume case is waking children which may have beenderaadt2010-09-081-1/+6
| | | | ejected, and that this needs to be solved.
* Split out the guts of pccbbintr() so that we can call it carefully atderaadt2010-09-081-64/+57
| | | | | resume time. ok kettenis
* During suspend, do not call children's interrupt handlers after we havederaadt2010-09-081-4/+1
| | | | | told them to suspend. In some drivers, this "wakes" them up. ok kettenis
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-071-10/+1
| | | | | traversal code to suspend/resume ok oga kettenis blambert
* Save and restore pci config space registers common to all PCI-CardBuskettenis2010-09-061-24/+73
| | | | | | bridges when we do suspend and resume. ok deraadt@
* Some cleanup in preparation for suspend/resume improvements.kettenis2010-09-031-25/+6
|
* convert the powerhook to an activate function. That activate functionderaadt2010-08-311-22/+30
| | | | | | | does not truly work yet many machines because it does not do enough; it is a total fluke if it works for you. (kettenis is, I think, working on improving it) ok kettenis
* kill PWR_STANDBY (apm can use PWR_SUSPEND instead). While here, renumberderaadt2010-08-271-2/+2
| | | | | | | PWR_{SUSPEND,RESUME} so that they match the values of DAVCT_{SUSPEND,RESUME} so that we can eventually (many more steps...) kill the powerhook garbage and use the activate mechanism. no objections
* Make CardBus ral(4) suspend and resume properly on machines that keep thekettenis2010-08-251-2/+3
| | | | | | | CardBus bridge powered up during suspend. Step zero on the long road towards fully suspending CardBus on all machines. ok deraadt@, damien@
* timeout_add -> timeout_add_msecblambert2010-06-301-3/+3
| | | | "I agree that hz / 10 is 1/10 of a second, which is 100 milliseconds" krw@
* these files don't need to include proc.h anymore. ok oga for agptedu2010-04-081-2/+1
|
* Give cardbus the pci_chipset_tag_t from pccbb and push it out throughjsg2010-03-271-58/+2
| | | | | | | cardbus_attach_args so we can switch to using proper pci config space functions instead of callback based wrappers. ok oga@ krw@ kettenis@
* Bring back cardbus_chipset_tag_t which is in practice ajsg2010-03-271-35/+35
| | | | | | | pointer to the pccbb softc, to distinguish it from a pci_chipset_tag_t which can be passed to the normal pci functions. Suggested by and ok kettenis@
* macppc seems to need a couple more casts before it will compile akrw2010-03-231-4/+4
| | | | | | kernel after the cardbus rectification. ok jsg@
* Remove some cardbus defines and types which are identical tojsg2010-03-221-40/+40
| | | | | | their pci counterparts, similar to recent changes in NetBSD. ok oga@ deraadt@ jasper@
* As per NetBSD move HAYAKAWA Koichi's licenses to two clause.jsg2010-01-131-6/+1
|
* When mapping CarBus memory BARs, enforce a minimum alignment of 0x1000. Thiskettenis2010-01-111-18/+7
| | | | | | is the granularity of the windows provided by the CardBus bridge. A smaller alignment may result in those windows covering address space used by other PCI devices in the machines. Fixes CardBus xl(4) n naddy's X40.
* Writing 0 to the PCI_LEGACY register *is* the proper way to disable thekettenis2009-08-281-6/+1
| | | | | | | legacy register mapping. So remove comments and #ifdef 0'ed code that questions this. ok miod@
* Stop using rbus to set up the socket BAR if it has been left unitializedkettenis2009-07-251-57/+6
| | | | | | | | by the firmware; our PCI code takes care of this now. Also eliminate support for I/O socket BARs. There is no evidence they actually exist. Clean up some unused structure members while there. ok miod@
* Use the symbolic constants for the window registers in pci configurationmiod2009-07-211-13/+13
| | | | | space in pccbb_winset(), instead of their bare values. Saves time for grep users. While there, a few grammar and typo fixes in comments.
* Pass a pci_chipset_tag_t to pci_intr_line(), to eventually allow themiod2009-07-201-2/+2
| | | | | logic to be chipset dependent; no functional change yet. ok kettenis@
* ansi function decls, no binary change.jsg2009-06-031-198/+76
|
* Second pass of simple timeout_add -> timeout_add_sec conversionsblambert2008-10-151-2/+2
| | | | | | | This should take care of the simpler ones (i.e., timeout values of integer multiples of hz). ok krw@, art@
* remove dead store.chl2008-09-251-2/+1
| | | | | | Found by LLVM/Clang Static Analyzer. ok claudio@
* On TI cardbus bridges, enable PCI interrupt routing if the device has notkettenis2008-07-201-2/+4
| | | | | | | | | | been initialized by the firmware. This was probably the intention of the origional code, however, it used the wrong default value for the register in question. Add TI PCI1510 to the list of 12XX-compatible bridges. "be brave" deraadt@
* More timeout(9) usage cleaned up.mk2008-05-221-4/+1
| | | | ok claudio
* Get rid of __HAVE_PCCBB_ATTACH_HOOK.kettenis2007-12-201-3/+1
|
* If the CardBus bus number is left unconfigured, only attach pcmcia(4).kettenis2007-12-191-13/+14
| | | | ok jsing@, fgsch@
* Revert previous commit; something is still wrong, and I can't figure out whatkettenis2007-12-141-1/+3
| | | | fast enough.
* Un-#ifdef code, such that we don't attach cardbus if the bus nuber iskettenis2007-12-091-3/+1
| | | | | | unconfigured. Tested by a few; ok deraadt@ (a while back).
* skip the bad mapping checks for now, sighderaadt2007-11-301-16/+1
|
* Skip the sanity test introduced in r1.50 on TI devices, as it gets triggeredmiod2007-11-301-5/+14
| | | | with valid devices.
* correct newlines surrounding the sub-bus configuration, and unifyderaadt2007-11-261-11/+27
| | | | | pchb's further ok reyk oga
* missing line from previous commit; return 1 for interrupts we do handlederaadt2007-11-251-1/+2
|