Commit Graph

104 Commits

Author SHA1 Message Date
msaitoh
956c0afde5 - Add some PCIe 2.0 or higher capability register definitions.
- Rename some registers.
- Add comments.
- Indent.
2013-04-21 23:46:06 +00:00
msaitoh
4184db8f84 Delete "PCI_" from PCIX and PICE capability registers. 2013-04-21 19:59:39 +00:00
msaitoh
8306713d99 Don't check whether PCIe Slot Control Register is all 0 or not.
For example, 82801I PCI Express Port #1 (devid 0x2940) is really
Root Port and it has the Root Control Register and the default
value is 0 (the document say so and really 0 (Tested with my
machine)).
2013-04-17 08:07:40 +00:00
msaitoh
9a1bc2611b - Add slot related registers
- Add root port related registers
- Fix the definition of PCI_PCIE_SLCAP_PSN
- Cleanup
2013-04-17 06:31:15 +00:00
msaitoh
94b93e5a0d Add PCI_CAP_SUBVENDOR (= 0x0d). 2013-04-17 04:36:27 +00:00
msaitoh
853aaa5112 Decode some PCIe capability register bits. 2013-04-16 15:50:57 +00:00
msaitoh
dfde2ffecb Use macro. 2013-04-16 14:34:34 +00:00
msaitoh
215e9630c0 Fix a bug that IRQ(MSI) bits in PCIe capability register is incorrectly
decoded. The bit field is not 0x4e000000 but 0x3e000000.
2013-04-16 09:13:04 +00:00
msaitoh
3380db55b3 Print some PCIE device type. 2013-04-15 18:51:29 +00:00
chs
cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
matt
5693cf8777 Add NVM to the pci mass storage subclass 2012-10-20 05:32:25 +00:00
chs
d5e4ea6372 add an entry for subclass HD audio. 2012-09-23 01:10:10 +00:00
drochner
e14d7cba53 print correct link speed for PCIexpress Gen2+
(the decoding code needs to be rewritten, sorry for only adding to
the mess)
2012-04-24 09:53:41 +00:00
matt
941122649f Use an unsigned value to hold the pci_class 2012-03-21 10:14:19 +00:00
drochner
26613330c6 extend the pci_aprint_devinfo slightly to cover the cases commonly
used by drivers: a short name for the quiet/naive case and a string
to override the "pcidevs" based name by one provided by the driver,
ride on yesterday's kernel minor version bump
2012-01-29 11:31:38 +00:00
drochner
7361c687ef put printing of the pci_devinfo into its own function (not inlined
by purpose) - this is a stack hog, and with this change my uTCA amd64
system boots again
a lot of similar code can be eliminated from pci device drivers this way,
but before doing so (and making the new function part of the module API)
I'd like to consider a modification to make it work with drivers which
prefer to print names from other sources (like pciide)
2012-01-26 21:17:28 +00:00
dyoung
70183e515a Redefine PCI_MSI_* and PCI_PCIE_* constants in terms of bits(3).
Use named constants and more conventional variable names in
pci_msi_establish() and pci_msi_disestablish().  Fix a couple of bugs:
pci_msi_establish() returned a pointer to the struct intrhand instead of
to the struct msi_hdl as it was intended to, and pci_msi_disestablish()
did not free(9) the msi_hdl.
2011-08-17 00:59:47 +00:00
msaitoh
57ac6d0bbe Add two new capabilities(PCI_CAP_SATA and PCI_CAP_PCIAF). 2011-06-06 18:27:12 +00:00
matt
13920aa54a Add code to display MSI capabilities. 2010-12-11 18:22:24 +00:00
pgoyette
f05cff10bd Update the various xxx_verbose modules to conform to the module subsystem's
new locking protocol.
2010-08-21 13:18:35 +00:00
pgoyette
ddb4821198 Move setting of pci_verbose_loaded flag into the module's init routine.
This ensures that the flag is set even if the module was manually loaded
by the user rather than just auto-loaded.
2010-07-25 14:14:25 +00:00
pgoyette
6bf1e09446 Update pciverbose module to use module_autoload() rather than module_load().
Load the module right before each attempt to use its features, and let the
module subsystem handle unloading.
2010-06-06 18:58:23 +00:00
martin
6e4424cb5b Do not try to unload the pciverbose module if it had never been loaded. 2010-05-26 09:42:42 +00:00
pgoyette
9b115d0bac Rework the pciverbose module dispatch vectors to avoid renaming the
externally-visible entrypoint name.  Also this avoids a potential
need to bump kernel version.

Requested by dyoung@ and mrg@
2010-05-25 08:35:45 +00:00
pgoyette
72a7c70b78 Extract the vendor/product tables and related access routines into a
separate kernel module.  Update pci bus attach routine to load the
module (if available) when we're about to start scanning the bus, and
unload the module after the scan is finished.

On architectures which support loading of modules by the boot loader,
the 'pciverbose' module can be loaded and executed without needing to
rebuild the kernel.  On all architectures, using 'options PCIVERBOSE'
in the kernel configuration file will create a 'builtin' module which
is functionally equivalent to previous behavior.

XXX Although not nearly as large as the vendor and product tables,
XXX the PCI class and subclass tables might also be offloaded into
XXX the module at a future time.

XXX Cardbus (and possibly other) drivers should also be modified to
XXX load the module before scanning/attaching devices.
2010-05-24 20:29:40 +00:00
dyoung
5980434120 Extract both instances of the code that prints the PCI Secondary Status
Register into a subroutine.  Use terminology similar to that which
PCI System Architecture (4th Edition) uses.  For comparison with PCI
reference books, specify flags and fields with __BIT(n) and __BITS(m, n)
instead of hexadecimal constants.
2010-03-04 22:55:20 +00:00
drochner
fff710a018 fix some bitmask in PCI Express capabilities decoding
being here, fix some typos and add a comma for clarity
2010-01-13 12:18:55 +00:00
jmcneill
b7ae31c476 Decode and display PCI Power Management registers when available. 2009-01-20 13:54:43 +00:00
matt
eadd097264 Store pcidevs in a more compact manner. Instead of many string with duplicate
words, store each word individual in a long string and then store offsets
in the string to that word.  This reduces the space needed by half.
2008-11-17 23:33:41 +00:00
jmcneill
bfb86f013a Oh, so that's how you spell Legacy -- thanks spellcheck! 2008-04-29 17:27:38 +00:00
cegger
9d57c80079 use aprint_*_dev and device_xname 2008-04-10 19:13:36 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
joerg
1b78992d21 Add some basic parsing of the PCI Express capabilities register.
This is enough to help detect the source of interrupt storms at least
for my Thinkpad.
2007-10-07 23:00:47 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
drochner
3f8c6dc981 while we are here, also print the interrupt disable bit
in VERBOSE/pcictl
2006-11-08 18:44:16 +00:00
dogcow
372e6ef309 now that we have -Wno-unused-parameter, back out all the tremendously ugly
code to gratuitously access said parameters.
2006-10-17 18:21:29 +00:00
christos
6c265266c5 more __unused 2006-10-13 20:53:59 +00:00
dogcow
44603cac1f more unused variable fallout. 2006-10-13 18:28:06 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos
309d51fb22 add missing initializers 2006-09-03 04:56:33 +00:00
drochner
4b02662f6c -add 2 subclasses new in rev. 3.0 of the spec, and fix a pasto in another
-get power management rev printing right
2006-05-31 10:01:18 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
simonb
1d1300cd80 Only include <sys/systm.h> if _KERNEL is defined. 2005-10-30 23:34:04 +00:00
thorpej
d36c43c511 Use ANSI function decls and static. 2005-06-28 00:28:41 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
mycroft
31a80e2d68 For the PCIVERBOSE case, separate vendors and products into separate tables.
Eliminating redundant pointers in the tables saves nearly 20K (20% of the table
size).  In the process, add a pci_findproduct() and make that and
pci_findvendor() return a "const char *".
2004-08-02 18:43:38 +00:00
itojun
6123043789 pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
2004-04-23 21:13:05 +00:00
soren
10ced29306 Use the right bits for the AGP version. 2004-02-04 06:58:24 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
jdolecek
c78fda0bcb fix typo in comment 2003-06-29 14:41:11 +00:00