aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pci/hostb_pci.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-061-1/+1
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* Replace calls to bus_generic_probe with bus_identify_childrenJohn Baldwin2024-12-061-1/+1
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47674
* newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYWarner Losh2024-07-251-1/+1
| | | | Sponsored by: Netflix
* new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCEJohn Baldwin2024-03-131-3/+2
| | | | | | | | | | The public bus_release_resource() API still accepts both forms, but the internal kobj method no longer passes the arguments. Implementations which need the rid or type now use rman_get_rid() or rman_get_type() to fetch the value from the allocated resource. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44131
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* pci: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-061-3/+1
|
* pci: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-2/+0
| | | | Notes: svn path=/head/; revision=365178
* Remove "All rights reserved" phrase from copyright notes.Stefan Eßer2019-12-041-2/+1
| | | | | | | | | | | | | | | | | | | | With the ratification of the Berne Convention in 2000, it became obsolete. I have removed that phrase and the "(c)" only from files without copyright claims by other parties. There are 2 files (pci.c, pci_private.h) that are also claimed by Michael Smith <msmith@freebsd.org> and by BSDi, which have therefore not been included in this commit. When all member nations of the Buenos Aires Convention adopted the Berne Convention, the phrase "All rights reserved" became unnecessary to assert copyright. Remove it from files under my copyright. There are 2 files (pci.c, pci_private.h) that) that do also bear msmith's and BSDi's copyright. I have left them unchanged for now, since I do not know whether they (or the legal successor in case of BSDi) would agree. Notes: svn path=/head/; revision=355382
* Add PCI methods to iterate over the PCI capabilitiesBryan Venteicher2018-02-191-0/+27
| | | | | | | | | | | | VirtIO V1 provides configuration in multiple VENDOR capabilities so this allows all of the configuration to be discovered. Reviewed by: jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D14325 Notes: svn path=/head/; revision=329598
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-1/+3
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* "Buses" is the preferred plural of "bus"Conrad Meyer2017-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | Replace archaic "busses" with modern form "buses." Intentionally excluded: * Old/random drivers I didn't recognize * Old hardware in general * Use of "busses" in code as identifiers No functional change. http://grammarist.com/spelling/buses-busses/ PR: 216099 Reported by: bltsrc at mail.ru Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=312234
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-031-1/+1
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* Convert rman to use rman_res_t instead of u_longJustin Hibbits2016-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075 Notes: svn path=/head/; revision=294883
* Revert previous change. The magical constants can't be changedMarcel Moolenaar2015-06-061-1/+1
| | | | | | | | | | | | | (easily) without having to go to other drivers to change the magical return values. This wouldn't be so bad if there were proper defines for these constants. In particular dev/acpica/acpi_pcib_pci.c returns -1000 as the probe priority and it's expected that this driver gets to attach over the common PCI bus drivers. Notes: svn path=/head/; revision=284086
* Don't return -10000 as the probe priority. That's lower than whatMarcel Moolenaar2015-06-061-1/+1
| | | | | | | | | | | | | | | | | BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the kernel or preloaded, will render your system useless by virtue of attaching to your PCI busses. Return BUS_PROBE_GENERIC instead. It's just the next priority up from BUS_PROBE_HOOVER. No other meaning has been give to its use. While BUS_PROBE_DEFAULT seems like a better candidate, it's hard not to think that there must be some reason why these drivers return -10000 in the first place. Differential Revision: D2705 Notes: svn path=/head/; revision=284078
* Expand the set of APIs available for locating PCI capabilities:John Baldwin2012-03-031-0/+18
| | | | | | | | | | | | - pci_find_extcap() is repurposed to be used for fetching PCI-express extended capabilities (PCIZ_* constants in <dev/pci/pcireg.h>). - pci_find_htcap() can be used to locate a specific HyperTransport capability (PCIM_HTCAP_* constants in <dev/pci/pcireg.h>). - Cache the starting location of the PCI-express capability for PCI-express devices in PCI device ivars. Notes: svn path=/head/; revision=232472
* Do a sweep of the tree replacing calls to pci_find_extcap() with calls toJohn Baldwin2011-03-231-1/+1
| | | | | | | pci_find_cap() instead. Notes: svn path=/head/; revision=219902
* Move the hostb driver out of the i386 and amd64 PCI code (where it wasJohn Baldwin2005-12-201-0/+249
duplicated anyways) and into a single MI driver. Extend the driver a bit to implement the bus and PCI kobj interfaces such that other drivers can attach to it and transparently act as if their parent device is the PCI bus (for the most part). Notes: svn path=/head/; revision=153570