summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
Commit message (Collapse)AuthorAgeFilesLines
* As threatened by BURN_BRIDGES, restire PCIR_MAPS and PCIR_HEADERTYPEimp2005-06-051-6/+0
|
* Mask off the bar's value after the probe test write before testingimp2005-06-031-2/+2
| | | | | | | | | against 0 in pci_alloc_map, just like we do in pci_add_map. Also, make sure that we restore the value to the BAR that was there before if the bar is 0. Chances are that it was 0 before the write too and that the restoration is a nop, but better safe than sorry. Notice by: dwhite
* Typo.jhb2005-06-011-1/+1
| | | | Submitted by: njl
* Don't enable I/O or memory mode in a device's command register if the BARjhb2005-05-311-7/+7
| | | | | | | | | | | | | | | we are processing has a base address of zero. Note that this will only change behavior for devices where all the BARs of a given type have a base address of 0 since we will enable the appropriate access when we encounter the first BAR with a base that is not 0. Specifically, this allows certain Toshiba laptops to no longer require 'hw.pci.enable_io_modes=0' to avoid hangs during boot. PR: kern/20040 PR: i386/63776 (possibly) PR: i386/68900 (possibly) PR: i386/74532 (possibly) MFC after: 1 week
* Add a detach for pci bridge and pci bus drivers. This allows one toimp2005-04-292-0/+2
| | | | | | | | theoretically unload pci bridges or pci drivers. It will also allow detach to work if one needed to detach a subtree. This is inspired by looking at the p4 commits from bms to his 5.4 tree, but I didn't look at the final results.
* In pcib_alloc_resource() check if the resource allocation request ismarcel2005-04-291-0/+16
| | | | | | | | | | | for the VGA I/O or memory ranges, when it's not within the default ranges decoded by the bridge. When allocation for VGA addresses is attempted, check that the bridge has the VGA Enable bit set before allowing it. As such, newbusified VGA drivers can allocate their resources when the VGA adapter is behind a PCI-to-PCI bridge. Reviewed by: imp@, jhb@
* Add pci_is_vga_ioport_range() and pci_is_vga_memory_range() as inlinemarcel2005-04-291-0/+18
| | | | | | | functions. These functions centralize the details of which I/O port and memory ranges belong to VGA. Reviewed by: imp@, jhb@
* Add defines for the Bridge Control Register bits.marcel2005-04-291-0/+13
| | | | Obtained from: jhb@
* Call pci_print_verbose() before pci_add_resources() so that the order ofjhb2005-04-141-1/+1
| | | | | | printf's during a verbose boot is more intuitive (the BAR listings and interrupt routing info now comes after the config header dump rather than just before it).
* Fix compile error :-(.imp2005-04-131-1/+2
|
* Use pci_find_bsf() to retrieve the PCI device associated withbms2005-04-131-13/+16
| | | | | | | a bus/device/function tuple. This change enables pciconf(8) to work with CardBus devices. Reviewed by: imp
* Default to a interrupt router that returns an invalid interrupt.imp2005-04-131-1/+9
| | | | | | | | | Otherwise, busses that implement the pcib interface that forget to implement pcib_route_interrupt would return EIO, which the caller interprets as 'use interrupt 6'. This is likely the cause of much of the grief that we had when I enabled power modes for the cardbus bridge, since the card needed to reroute the interrupt to it and it was getting 6 which was d by the pccbb sanity checks.
* It isn't a whinable offence to want memory when the bar says ioport.imp2005-04-111-6/+8
| | | | | | | Put that behind bootverbose to make the ata driver less chatty on advanced hardware. Requested by: sos
* Go ahead and try to allocate PCI_BAR(5) for ata devices.imp2005-04-101-0/+1
|
* fix misspelling of 0x30...jmg2005-04-011-1/+1
| | | | Spotted by: reviewing MFC commit
* move the statement about switching power states to just before we do it, sojmg2005-04-011-5/+7
| | | | | we don't print a false statement if the destination powerstate is unsupported...
* fix a copy/paste typo for scanner/gameport...jmg2005-03-261-2/+2
| | | | Spotted by: Michal Mertl <mime@traveller.cz>
* add some additional pci classes and sub-classes..jmg2005-03-262-3/+61
| | | | Reviewed by: imp (almost 6 months ago)
* Add code to read the primary PCI bus number out of the Compaq/HP 6010jhb2005-03-251-0/+5
| | | | | hotplug Host to PCI bridge. This is only needed for the non-ACPI case as the BIOS includes a proper _BBN method in ACPI.
* relocate the power state transition statements to thejmg2005-03-231-15/+5
| | | | | | | pci_set_powerstate_method function... Reviewed by: imp MFC after: 1 week
* Use STAILQ in preference to SLIST for the resources. Insert new resourcesimp2005-03-181-1/+1
| | | | | | | | | last in the list rather than first. This makes the resouces print in the 4.x order rather than the 5.x order (eg fdc0 at 0x3f0-0x3f5,0x3f7 is 4.x, but 0x3f7,0x3f0-0x3f5 is 5.x). This also means that the pci code will once again print the resources in BAR ascending order.
* If bus_generic_susped returns an error, devlist is not freed. Free it.imp2005-03-151-1/+3
| | | | Submitted by: Ted Unangst (using the Coverity Prevent analysis tool)
* 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.
OpenPOWER on IntegriCloud