Annotation of Gnu-Mach/linux/src/drivers/net/pci-scan.h, revision 1.1

1.1     ! root        1: #ifndef _PCI_SCAN_H
        !             2: #define _PCI_SCAN_H
        !             3: /*
        !             4:   version 1.02 $Version:$ $Date: 2006/01/22 15:54:41 $
        !             5:    Copyright 1999-2001 Donald Becker / Scyld Computing Corporation
        !             6:    This software is part of the Linux kernel.  It may be used and
        !             7:    distributed according to the terms of the GNU Public License,
        !             8:    incorporated herein by reference.
        !             9: */
        !            10: 
        !            11: /*
        !            12:   These are the structures in the table that drives the PCI probe routines.
        !            13:   Note the matching code uses a bitmask: more specific table entries should
        !            14:   be placed before "catch-all" entries.
        !            15: 
        !            16:   The table must be zero terminated.
        !            17: */
        !            18: enum pci_id_flags_bits {
        !            19:        /* Set PCI command register bits before calling probe1(). */
        !            20:        PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4,
        !            21:        /* Read and map the single following PCI BAR. */
        !            22:        PCI_ADDR0=0<<4, PCI_ADDR1=1<<4, PCI_ADDR2=2<<4, PCI_ADDR3=3<<4,
        !            23:        PCI_ADDR_64BITS=0x100, PCI_NO_ACPI_WAKE=0x200, PCI_NO_MIN_LATENCY=0x400,
        !            24:        PCI_UNUSED_IRQ=0x800,
        !            25: };
        !            26: 
        !            27: struct pci_id_info {
        !            28:        const char *name;
        !            29:        struct match_info {
        !            30:                int     pci, pci_mask, subsystem, subsystem_mask;
        !            31:                int revision, revision_mask;                            /* Only 8 bits. */
        !            32:        } id;
        !            33:        enum pci_id_flags_bits pci_flags;
        !            34:        int io_size;                            /* Needed for I/O region check or ioremap(). */
        !            35:        int drv_flags;                          /* Driver use, intended as capability flags. */
        !            36: };
        !            37: 
        !            38: enum drv_id_flags {
        !            39:        PCI_HOTSWAP=1, /* Leave module loaded for Cardbus-like chips. */
        !            40: };
        !            41: enum drv_pwr_action {
        !            42:        DRV_NOOP,                       /* No action. */
        !            43:        DRV_ATTACH,                     /* The driver may expect power ops. */
        !            44:        DRV_SUSPEND,            /* Machine suspending, next event RESUME or DETACH. */
        !            45:        DRV_RESUME,                     /* Resume from previous SUSPEND  */
        !            46:        DRV_DETACH,                     /* Card will-be/is gone. Valid from SUSPEND! */
        !            47:        DRV_PWR_WakeOn,         /* Put device in e.g. Wake-On-LAN mode. */
        !            48:        DRV_PWR_DOWN,           /* Go to lowest power mode. */
        !            49:        DRV_PWR_UP,                     /* Go to normal power mode. */
        !            50: };
        !            51: 
        !            52: struct drv_id_info {
        !            53:        const char *name;                       /* Single-word driver name. */
        !            54:        int flags;
        !            55:        int pci_class;                          /* Typically PCI_CLASS_NETWORK_ETHERNET<<8. */
        !            56:        struct pci_id_info *pci_dev_tbl;
        !            57:        void *(*probe1)(struct pci_dev *pdev, void *dev_ptr,
        !            58:                                        long ioaddr, int irq, int table_idx, int fnd_cnt);
        !            59:        /* Optional, called for suspend, resume and detach. */
        !            60:        int (*pwr_event)(void *dev, int event);
        !            61:        /* Internal values. */
        !            62:        struct drv_id_info *next;
        !            63:        void *cb_ops;
        !            64: };
        !            65: 
        !            66: /*  PCI scan and activate.
        !            67:        Scan PCI-like hardware, calling probe1(..,dev,..) on devices that match.
        !            68:        Returns -ENODEV, a negative number, if no cards are found. */
        !            69: 
        !            70: extern int pci_drv_register(struct drv_id_info *drv_id, void *initial_device);
        !            71: extern void pci_drv_unregister(struct drv_id_info *drv_id);
        !            72: 
        !            73: 
        !            74: /*  ACPI routines.
        !            75:        Wake (change to ACPI D0 state) or set the ACPI power level of a sleeping
        !            76:        ACPI device.  Returns the old power state.  */
        !            77: 
        !            78: int acpi_wake(struct pci_dev *pdev);
        !            79: enum  acpi_pwr_state {ACPI_D0, ACPI_D1, ACPI_D2, ACPI_D3};
        !            80: int acpi_set_pwr_state(struct pci_dev *pdev, enum acpi_pwr_state state);
        !            81: 
        !            82: 
        !            83: /*
        !            84:  * Local variables:
        !            85:  *  c-indent-level: 4
        !            86:  *  c-basic-offset: 4
        !            87:  *  tab-width: 4
        !            88:  * End:
        !            89:  */
        !            90: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.