summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
Commit message (Collapse)AuthorAgeFilesLines
* Expose pci_cfg_safe/restore for subclasses of pci to use.imp2005-02-282-4/+4
|
* Use dynamic major number allocation.phk2005-02-271-7/+0
|
* kill unused variablesam2005-02-251-2/+0
| | | | Noticed by: Coverity Prevent analysis tool
* For the I/O port case, we need to set ok to 1 if we have what looksimp2005-02-181-8/+15
| | | | | | | | | | | | | like a valid range. We already do this in the memory case (although the code there is somewhat different than the I/o case because we have to deal with different kinds of memory). Since most laptops don't have non-subtractive bridges, this wasn't seen in practice. Evidentally the Compaq R3000 hits this problem with PC Cards. Some minor style fixes while I'm here. Submitted by: Jung-uk Kim
* Enable interrupt routing as first choice on alpha.ticso2005-02-071-1/+1
| | | | The alpha default handler knows how to trigger a fallback.
* Fix typo.njl2005-01-291-2/+1
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-066-6/+6
|
* Fix last second typos that crept in :-(.imp2004-12-311-2/+2
|
* Implement mimimum system software delays, per PCI PM 1.1 spec, asimp2004-12-311-38/+55
| | | | | | suggested by Peter Edwards. This seems to fix my fxp problems and likely will fix his as well. Use DELAY rather than *sleep because we can be called from any context.
* Fix comments to match last commit, and minor reformatting...imp2004-12-081-16/+16
|
* It turns out that a lot of newer systems have 'base peripherals' onimp2004-12-081-1/+2
| | | | | | | | | | the PCI bus. We presently have no drivers for these devices, so they are powered down. This is undesirable behavior since it breaks the system when the base peripherals go away suddenly in the middle of boot. # if we ever get generic drivers for memory and/or base peripherals, then # we can remove the tests here.
* ACPI is not on pc98 either.njl2004-12-031-1/+2
| | | | Informed by: nyan
* Non-x86 platforms cannot use the ACPI includes. This should be fixed butnjl2004-12-031-0/+4
| | | | | | for now, only include the headers for i386, amd64, or ia64. Pointed out by: grehan
* Turn ACPI and PCI devices off or to a lower power state in suspend andnjl2004-12-021-15/+54
| | | | | | | | | | | | | | | | back on again in resume. Override the default of D3 with the value the BIOS specifies in _SxD, if present. Skip serial devices (PNP05xx) since they seem to hang when set to D3 and may require special driver support. Also, skip non-type 0 PCI devices (i.e., bridges) since our we don't yet save/restore their config space and that seems to be necessary. If this gives you trouble with suspend/resume, you can disable the new ACPI and PCI power behavior separately with these tunables & sysctls: debug.acpi.do_powerstate hw.pci.do_powerstate Approved by: imp (pci) Tested by: acpi@ (numerous)
* Make pci_do_powerstate default to 1 now that we've done the release toimp2004-11-101-2/+2
| | | | get more testing. This should help things a little.
* - Change the ddb paging "support" to use a variable (db_lines_per_page) tojhb2004-11-011-1/+1
| | | | | | | | | | | | | | | | | control the number of lines per page rather than a constant. The variable can be examined and changed in ddb as '$lines'. Setting the variable to 0 will effectively turn off paging. - Change db_putchar() to force out pending whitespace before outputting newlines and carriage returns so that one can rub out content on the current line via '\r \r' type strings. - Change the simple pager to rub out the --More-- prompt explicitly when the routine exits. - Add some aliases to the simple pager to make it more compatible with more(1): 'e' and 'j' do a single line. 'd' does half a page, and 'f' does a full page. MFC after: 1 month Inspired by: kris
* Fix a spelling error in a panic string.green2004-10-141-1/+1
|
* Re-route interrupts on arm as well.cognet2004-09-231-1/+2
|
* Disable native ata support for now, too much breaksimp2004-07-021-1/+1
|
* Trim a few things from the dmesg output and stick them under bootverbose tojhb2004-07-011-1/+1
| | | | | | | cut down on the clutter including PCI interrupt routing, MTRR, pcibios, etc. Discussed with: USENIX Cabal
* Update the special handling code for ATA devices to allow usage ofsos2004-06-291-54/+42
| | | | | | PCI native addressing. That means that if the HW says that using "real" addresses instead of the hardwired legacy compat ones is allowed, we will use them.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-4/+4
| | | | Bump __FreeBSD_version accordingly.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Add some missing <sys/module.h> includes which are masked by thephk2004-05-304-2/+6
| | | | one on death-row in <sys/kernel.h>
* Use PCI_BAR() in preference to PCI_MAPS + x * 4.imp2004-05-241-2/+2
| | | | Submitted by: jhb
* Do not write to those config registers that are unambiguously definedimp2004-05-241-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | in the various pci specifications as readonly. vendor, subvendor, device and subdevice are required to be loaded in hardware by some means that isn't the system BIOS or other system software (although some devices do have ways of accomplishing this). class and subclass are defined to be read-only in section 6.2.1 (v2.2). Apart from the status register, which we weren't touching, these are the only read-only registers I could find in the 2.2 spec. progif is also defined as being read-only in section 6.2.1. However, the PCI IDE programming document specifically states that some of the bits are read/write. Since we may have to restore registers before we have a driver attached, go ahead and restore this one byte when transitioning between D3 and D0. The PCI spec also says that writes to reserved and unimplemented registers must be completed normally. It makes no statements about writes to read-only registers, so be as conservative as possible, while covering the exception to the rule that is documented in a subpart of the standard. Requested by: socttl
* Fix cutNpasto in last commit.imp2004-05-211-1/+1
|
* ifdef writing to registers that the base pci standard says areimp2004-05-211-0/+13
| | | | | read-only on D3->D0 power state transition. Add a define to enable them, but include a comment to contact me if there's a problem.
* Compeletely rewrite the description of hw.pci.do_powerstate to soundimp2004-05-211-2/+2
| | | | better.
* Improve the English somewhat.imp2004-05-211-1/+1
| | | | Prodded by: ru@
* Ooops, forgot to commit the updated definition for hw.pci.do_powerstateimp2004-05-211-2/+1
| | | | when I committed code that changed its meaning.
* MFp4:imp2004-05-211-3/+7
| | | | | | | | | | Split the baby. For idepci devices, now both legacy mode bits need not be set. We can run an idepci in a split mode. However, it only works better than before, not works. It works better in that when one device is legacy and the other isn't and disabled, we now operate correctly. sos submitted a version of this patch.
* Move pci_do_powerstate up a level. Now it just means 'do not turn devicesimp2004-05-211-3/+6
| | | | | off into d3 state when there's no driver for the device'. This should help suspend/resume in the default case.
* MFp4: o save/restore subvendor, subdevice, vendor, device, baseclass,imp2004-05-211-0/+16
| | | | | | | subclass, progif and revid. While these are typically read only fields, they aren't always read-only. progif is writable for ata devices, for example. It does no harm when they are read only, and helps when they aren't.
* make the pci power state and resource code a lot less chatty. Theimp2004-05-211-17/+28
| | | | | | | | chattiness was left in for debugging, but now that nearly all of the problems relating to the changes have been fixed, it is only annoying. It is still available via bootverbose. Prodded by: jhb
* Remove the EBus stopgap of r1.248; a proper fix is in place now.tmm2004-04-281-8/+0
|
* Fix two typos from PR: 65694imp2004-04-261-1/+1
| | | | | | | | | | 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
* 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)
* 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.
* Do not pre-allocate resources for BAR's on ATA MASTERDEV's thats onsos2004-04-201-0/+9
| | | | | | | the standard ATA primary and secondary addresses. Reintroduce the size 1 ALTIO space so that we can have both ATA and floppies back working.
* ooops. I disabled pci_enable_io_modes not pci_do_powerstate in the lastimp2004-04-161-4/+4
| | | | | | commit. That was in error. Noticed by: sos
* make the bad bar warning less scary, and toss it behind a bootverbose.imp2004-04-161-2/+3
| | | | It is harmless, but freaking people out.
* Turn off the power stuff for a little while longer. There appears to beimp2004-04-161-2/+2
| | | | something subtle wrong with it.
* Now that the dust has settled on the resource issues, turn on theimp2004-04-141-2/+2
| | | | | power parts of my patches and see what breaks. Don't (yet) throw the chatty messages behind a if (bootverbose).
* Some devices have what appear to be invalid BARs. They are invalid inimp2004-04-131-26/+51
| | | | | | | | | | | | | | | | the sense that any write to them reads back as a 0. This presents a problem to our resource allocation scheme. If we encounter such vars, the code now treats them as special, allowing any allocation against them to succeed. I've not seen anything in the standard to clearify what host software should do when it encounters these sorts of BARs. Also cleaned up some output while I'm here and add commmented out bootverbose lines until I'm ready to reduce the verbosity of boot messages. This gets a number of south bridges and ata controllers made mostly by VIA, AMD and nVidia working again. Thanks to Soren Schmidt for his help in coming up with this patch.
* Add system tunable to turn off power state changes. Default to off untilimp2004-04-111-15/+48
| | | | | | | | | | we get the resource allocation stuff hammered out. Fix and off by one error that caused unnecessary filtering of valid BARs for only 4 bytes than ICH3 and other PCI IDE controllers have. Andrew Gallatin submitted this, although it doesn't solve the problems ICH3 controllers have with the new code, it does restore the former resource list on the probe line.
* Only print state change message for real state changes. When we set aimp2004-04-091-6/+10
| | | | | | | | device in D0 to D0, that's a no-op, however the messages seem to be confusing some people. Eventually, these messages will be parked behind a if (bootverbose). # I don't think this will fix any real bugs...
* Omnibus PCI commit:imp2004-04-093-60/+298
| | | | | | | | | | | | | | o Save and restore bars for suspend/resume as well as for D3->D0 transitions. o preallocate resources that the PCI devices use to avoid resource conflicts o lazy allocation of resources not allocated by the BIOS. o set unattached drivers to state D3. Set power state to D0 before probe/attach. Right now there's two special cases for this (display and memory devices) that need work in other areas of the tree. Please report any bugs to me.
* Remove advertising clause from University of California Regent'simp2004-04-071-1/+3
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-1/+1
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
OpenPOWER on IntegriCloud