pcivar.h (f41be0f07673849a55ab3dfbba8878b9cb06b133) pcivar.h (d7be980dbe6961abce6b3e12de0391cbad295f95)
1/*-
2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 528 unchanged lines hidden (view full) ---

537}
538
539static __inline int
540pci_msix_table_bar(device_t dev)
541{
542 return (PCI_MSIX_TABLE_BAR(device_get_parent(dev), dev));
543}
544
1/*-
2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 528 unchanged lines hidden (view full) ---

537}
538
539static __inline int
540pci_msix_table_bar(device_t dev)
541{
542 return (PCI_MSIX_TABLE_BAR(device_get_parent(dev), dev));
543}
544
545static __inline int
546pci_get_id(device_t dev, enum pci_id_type type, uintptr_t *id)
547{
548 return (PCI_GET_ID(device_get_parent(dev), dev, type, id));
549}
550
551/*
552 * This is the deprecated interface, there is no way to tell the difference
553 * between a failure and a valid value that happens to be the same as the
554 * failure value.
555 */
545static __inline uint16_t
546pci_get_rid(device_t dev)
547{
556static __inline uint16_t
557pci_get_rid(device_t dev)
558{
548 return (PCI_GET_RID(device_get_parent(dev), dev));
559 uintptr_t rid;
560
561 if (pci_get_id(dev, PCI_ID_RID, &rid) != 0)
562 return (0);
563
564 return (rid);
549}
550
551static __inline void
552pci_child_added(device_t dev)
553{
554
555 return (PCI_CHILD_ADDED(device_get_parent(dev), dev));
556}

--- 61 unchanged lines hidden ---
565}
566
567static __inline void
568pci_child_added(device_t dev)
569{
570
571 return (PCI_CHILD_ADDED(device_get_parent(dev), dev));
572}

--- 61 unchanged lines hidden ---