aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h36
1 files changed, 20 insertions, 16 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 8565b81d7fbc..3ec72551ac31 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -49,6 +49,7 @@
49#include <linux/types.h> 49#include <linux/types.h>
50#include <linux/ioport.h> 50#include <linux/ioport.h>
51#include <linux/list.h> 51#include <linux/list.h>
52#include <linux/compiler.h>
52#include <linux/errno.h> 53#include <linux/errno.h>
53#include <linux/device.h> 54#include <linux/device.h>
54 55
@@ -346,6 +347,8 @@ struct pci_driver {
346 int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ 347 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 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 (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */
350 int (*suspend_late) (struct pci_dev *dev, pm_message_t state);
351 int (*resume_early) (struct pci_dev *dev);
349 int (*resume) (struct pci_dev *dev); /* Device woken up */ 352 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 */ 353 int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */
351 void (*shutdown) (struct pci_dev *dev); 354 void (*shutdown) (struct pci_dev *dev);
@@ -401,7 +404,7 @@ extern struct list_head pci_root_buses; /* list of all known PCI buses */
401extern struct list_head pci_devices; /* list of all devices */ 404extern struct list_head pci_devices; /* list of all devices */
402 405
403void pcibios_fixup_bus(struct pci_bus *); 406void pcibios_fixup_bus(struct pci_bus *);
404int pcibios_enable_device(struct pci_dev *, int mask); 407int __must_check pcibios_enable_device(struct pci_dev *, int mask);
405char *pcibios_setup (char *str); 408char *pcibios_setup (char *str);
406 409
407/* Used only when drivers/pci/setup.c is used */ 410/* Used only when drivers/pci/setup.c is used */
@@ -488,19 +491,19 @@ static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val
488 return pci_bus_write_config_dword (dev->bus, dev->devfn, where, val); 491 return pci_bus_write_config_dword (dev->bus, dev->devfn, where, val);
489} 492}
490 493
491int pci_enable_device(struct pci_dev *dev); 494int __must_check pci_enable_device(struct pci_dev *dev);
492int pci_enable_device_bars(struct pci_dev *dev, int mask); 495int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask);
493void pci_disable_device(struct pci_dev *dev); 496void pci_disable_device(struct pci_dev *dev);
494void pci_set_master(struct pci_dev *dev); 497void pci_set_master(struct pci_dev *dev);
495#define HAVE_PCI_SET_MWI 498#define HAVE_PCI_SET_MWI
496int pci_set_mwi(struct pci_dev *dev); 499int __must_check pci_set_mwi(struct pci_dev *dev);
497void pci_clear_mwi(struct pci_dev *dev); 500void pci_clear_mwi(struct pci_dev *dev);
498void pci_intx(struct pci_dev *dev, int enable); 501void pci_intx(struct pci_dev *dev, int enable);
499int pci_set_dma_mask(struct pci_dev *dev, u64 mask); 502int pci_set_dma_mask(struct pci_dev *dev, u64 mask);
500int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); 503int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
501void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); 504void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
502int pci_assign_resource(struct pci_dev *dev, int i); 505int __must_check pci_assign_resource(struct pci_dev *dev, int i);
503int pci_assign_resource_fixed(struct pci_dev *dev, int i); 506int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i);
504void pci_restore_bars(struct pci_dev *dev); 507void pci_restore_bars(struct pci_dev *dev);
505 508
506/* ROM control related routines */ 509/* ROM control related routines */
@@ -526,23 +529,24 @@ void pdev_sort_resources(struct pci_dev *, struct resource_list *);
526void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), 529void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
527 int (*)(struct pci_dev *, u8, u8)); 530 int (*)(struct pci_dev *, u8, u8));
528#define HAVE_PCI_REQ_REGIONS 2 531#define HAVE_PCI_REQ_REGIONS 2
529int pci_request_regions(struct pci_dev *, const char *); 532int __must_check pci_request_regions(struct pci_dev *, const char *);
530void pci_release_regions(struct pci_dev *); 533void pci_release_regions(struct pci_dev *);
531int pci_request_region(struct pci_dev *, int, const char *); 534int __must_check pci_request_region(struct pci_dev *, int, const char *);
532void pci_release_region(struct pci_dev *, int); 535void pci_release_region(struct pci_dev *, int);
533 536
534/* drivers/pci/bus.c */ 537/* drivers/pci/bus.c */
535int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, 538int __must_check pci_bus_alloc_resource(struct pci_bus *bus,
536 resource_size_t size, resource_size_t align, 539 struct resource *res, resource_size_t size,
537 resource_size_t min, unsigned int type_mask, 540 resource_size_t align, resource_size_t min,
538 void (*alignf)(void *, struct resource *, 541 unsigned int type_mask,
539 resource_size_t, resource_size_t), 542 void (*alignf)(void *, struct resource *,
540 void *alignf_data); 543 resource_size_t, resource_size_t),
544 void *alignf_data);
541void pci_enable_bridges(struct pci_bus *bus); 545void pci_enable_bridges(struct pci_bus *bus);
542 546
543/* Proper probing supporting hot-pluggable devices */ 547/* Proper probing supporting hot-pluggable devices */
544int __pci_register_driver(struct pci_driver *, struct module *); 548int __must_check __pci_register_driver(struct pci_driver *, struct module *);
545static inline int pci_register_driver(struct pci_driver *driver) 549static inline int __must_check pci_register_driver(struct pci_driver *driver)
546{ 550{
547 return __pci_register_driver(driver, THIS_MODULE); 551 return __pci_register_driver(driver, THIS_MODULE);
548} 552}