Home | History | Annotate | Download | only in linux

Lines Matching full:pci_dev

109  * The pci_dev structure is used to describe PCI devices.
111 struct pci_dev {
177 #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list)
178 #define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list)
179 #define to_pci_dev(n) container_of(n, struct pci_dev, dev)
183 struct pci_dev *pci_dev,char cap)
188 hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) {
195 static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
198 hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
229 struct pci_dev *self; /* bridge device as seen by parent */
323 pci_ers_result_t (*error_detected)(struct pci_dev *dev,
327 pci_ers_result_t (*mmio_enabled)(struct pci_dev *dev);
330 pci_ers_result_t (*link_reset)(struct pci_dev *dev);
333 pci_ers_result_t (*slot_reset)(struct pci_dev *dev);
336 void (*resume)(struct pci_dev *dev);
346 int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */
347 void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */
348 int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */
349 int (*resume) (struct pci_dev *dev); /* Device woken up */
350 int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */
351 void (*shutdown) (struct pci_dev *dev);
404 int pcibios_enable_device(struct pci_dev *, int mask);
410 void pcibios_update_irq(struct pci_dev *, int irq);
426 struct pci_bus * pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr);
428 struct pci_dev * pci_scan_single_device(struct pci_bus *bus, int devfn);
429 void pci_device_add(struct pci_dev *dev, struct pci_bus *bus);
431 void pci_bus_add_device(struct pci_dev *dev);
433 struct resource *pci_find_parent_resource(const struct pci_dev *dev, struct resource *res);
434 int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge);
435 extern struct pci_dev *pci_dev_get(struct pci_dev *dev);
436 extern void pci_dev_put(struct pci_dev *dev);
438 extern void pci_remove_bus_device(struct pci_dev *dev);
443 struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from);
444 struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from);
445 struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn);
446 int pci_find_capability (struct pci_dev *dev, int cap);
447 int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap);
448 int pci_find_ext_capability (struct pci_dev *dev, int cap);
451 struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from);
452 struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device,
454 struct pci_dev *from);
455 struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn);
456 struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from);
466 static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val)
470 static inline int pci_read_config_word(struct pci_dev *dev, int where, u16 *val)
474 static inline int pci_read_config_dword(struct pci_dev *dev, int where, u32 *val)
478 static inline int pci_write_config_byte(struct pci_dev *dev, int where, u8 val)
482 static inline int pci_write_config_word(struct pci_dev *dev, int where, u16 val)
486 static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val)
491 int pci_enable_device(struct pci_dev *dev);
492 int pci_enable_device_bars(struct pci_dev *dev, int mask);
493 void pci_disable_device(struct pci_dev *dev);
494 void pci_set_master(struct pci_dev *dev);
496 int pci_set_mwi(struct pci_dev *dev);
497 void pci_clear_mwi(struct pci_dev *dev);
498 void pci_intx(struct pci_dev *dev, int enable);
499 int pci_set_dma_mask(struct pci_dev *dev, u64 mask);
500 int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
501 void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
502 int pci_assign_resource(struct pci_dev *dev, int i);
503 int pci_assign_resource_fixed(struct pci_dev *dev, int i);
504 void pci_restore_bars(struct pci_dev *dev);
507 void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size);
508 void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size);
509 void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom);
510 void pci_remove_rom(struct pci_dev *pdev);
513 int pci_save_state(struct pci_dev *dev);
514 int pci_restore_state(struct pci_dev *dev);
515 int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
516 pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
517 int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
522 int pci_claim_resource(struct pci_dev *, int);
524 void pdev_enable_device(struct pci_dev *);
525 void pdev_sort_resources(struct pci_dev *, struct resource_list *);
526 void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
527 int (*)(struct pci_dev *, u8, u8));
529 int pci_request_regions(struct pci_dev *, const char *);
530 void pci_release_regions(struct pci_dev *);
531 int pci_request_region(struct pci_dev *, int, const char *);
532 void pci_release_region(struct pci_dev *, int);
551 void pci_remove_behind_bridge(struct pci_dev *);
552 struct pci_driver *pci_dev_driver(const struct pci_dev *);
553 const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev);
554 const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev);
555 int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass);
557 void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *),
559 int pci_cfg_space_size(struct pci_dev *dev);
583 extern struct pci_dev *isa_bridge;
592 static inline void pci_scan_msi_device(struct pci_dev *dev) {}
593 static inline int pci_enable_msi(struct pci_dev *dev) {return -1;}
594 static inline void pci_disable_msi(struct pci_dev *dev) {}
595 static inline int pci_enable_msix(struct pci_dev* dev,
597 static inline void pci_disable_msix(struct pci_dev *dev) {}
598 static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {}
600 extern void pci_scan_msi_device(struct pci_dev *dev);
601 extern int pci_enable_msi(struct pci_dev *dev);
602 extern void pci_disable_msi(struct pci_dev *dev);
603 extern int pci_enable_msix(struct pci_dev* dev,
605 extern void pci_disable_msix(struct pci_dev *dev);
606 extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
609 extern void pci_block_user_cfg_access(struct pci_dev *dev);
610 extern void pci_unblock_user_cfg_access(struct pci_dev *dev);
633 static inline int pci_##o##_config_##s (struct pci_dev *dev, int where, t val) \
641 static inline struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device, const struct pci_dev *from)
644 static inline struct pci_dev *pci_find_slot(unsigned int bus, unsigned int devfn)
647 static inline struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from)
650 static inline struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device,
651 unsigned int ss_vendor, unsigned int ss_device, struct pci_dev *from)
654 static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from)
660 static inline void pci_set_master(struct pci_dev *dev) { }
661 static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; }
662 static inline void pci_disable_device(struct pci_dev *dev) { }
663 static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; }
664 static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;}
668 static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; }
669 static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; }
670 static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; }
671 static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; }
674 static inline int pci_save_state(struct pci_dev *dev) { return 0; }
675 static inline int pci_restore_state(struct pci_dev *dev) { return 0; }
676 static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { return 0; }
677 static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; }
678 static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; }
680 #define isa_bridge ((struct pci_dev *)NULL)
684 static inline void pci_block_user_cfg_access(struct pci_dev *dev) { }
685 static inline void pci_unblock_user_cfg_access(struct pci_dev *dev) { }
706 /* Similar to the helpers above, these manipulate per-pci_dev
710 static inline void *pci_get_drvdata (struct pci_dev *pdev)
715 static inline void pci_set_drvdata (struct pci_dev *pdev, void *data)
720 /* If you want to know what to call your pci_dev, ask this function.
723 static inline char *pci_name(struct pci_dev *pdev)
733 static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
752 void (*hook)(struct pci_dev *dev);
780 void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);