diff options
author | Thomas Schwinge <tschwinge@gnu.org> | 2006-01-22 15:54:41 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:26:29 +0200 |
commit | 4ad86505c480b2964548328a959c662e8aef5422 (patch) | |
tree | 9cc9b8f80d561ae7d7451d95a26ff8c252e86504 /linux/src/drivers/net/pci-scan.h | |
parent | 656d6634de02862e837f3a7d80a49e9ca072398d (diff) | |
download | gnumach-4ad86505c480b2964548328a959c662e8aef5422.tar.gz gnumach-4ad86505c480b2964548328a959c662e8aef5422.tar.bz2 gnumach-4ad86505c480b2964548328a959c662e8aef5422.zip |
2006-01-22 Thomas Schwinge <tschwinge@gnu.org>
* configure, i386/configure, i386/linux/configure, linux/configure,
i386/linux/device-drivers.h.in: Regenerated.
* linux/src/drivers/net/ne2k-pci.c: Resolve conflicts.
2006-01-22 Guillem Jover <guillem@hadrons.org>
* i386/linux/configure.ac: Renamed winbond-840 driver to winbond_840.
Enable the starfire, intel_gige and natsemi network drivers. Remove
"CONFIG_" from cb_chim, starfire, sundance, winbond840, hamachi,
natsemi, myson803 and ns820 driver declarations. Replace INTER_GIGE
with INTEL_GIGE.
* linux/dev/drivers/net/Space.c: Add conditional probes for natsemi,
ns820, winbond840, hamachi, sundance, starfire, myson803 and intel-gige
drivers.
* linux/src/include/asm-i386/cache.h: New file from linux 2.2.26.
* linux/dev/include/linux/malloc.h: Include <asm/cache.h>.
* linux/src/drivers/net/ns820.c (netsami_drv_id): Renamed to ...
(ns820_drv_id): ... this. Fix all callers.
* linux/src/drivers/net/intel-gige.c
(skel_netdev_probe): Renamed to ...
(igige_probe): ... this.
* linux/dev/drivers/net/eepro100.c: Remove obsoleted file.
* linux/src/drivers/net/eepro100.c (pci_id_tbl): Add PCI ID's from
linux-2.6.14-rc4.
2006-01-22 Alfred M. Szmidt <ams@gnu.org>
* i386/linux/configure.ac: Added `pci-scan.o' to the network driver
class. (ns820, myson803, sundance, winbond-840, hamachi): New drivers.
* i386/linux/Makefile.in (linux-net-files): Added `cb_shim.c',
`hamachi.c', `intel-gige.c', `myson803.c', `natsemi.c', `ns820.c',
`starfire.c', `sundance.c', `winbond-840.c' and `pci-scan.c'.
* linux/dev/include/linux/modversions.h: New file.
* linux/src/drivers/net/cb_shim.c, linux/src/drivers/net/hamachi.c,
linux/src/drivers/net/intel-gige.c, linux/src/drivers/net/myson803.c,
linux/src/drivers/net/natsemi.c, linux/src/drivers/net/ns820.c,
linux/src/drivers/net/starfire.c, linux/src/drivers/net/sundance.c,
linux/src/drivers/net/winbond-840.c,
linux/src/drivers/net/kern_compat.h, linux/src/drivers/net/pci-scan.c,
linux/src/drivers/net/pci-scan.h: New files from netdrivers 3.5 package
(http://www.scyld.com/network).
* linux/src/drivers/net/3c59x.c, linux/src/drivers/net/eepro100.c,
linux/src/drivers/net/epic100.c, linux/src/drivers/net/ne2k-pci.c,
linux/src/drivers/net/rtl8139.c, linux/src/drivers/net/tulip.c,
linux/src/drivers/net/via-rhine.c, linux/src/drivers/net/yellowfin.c:
Updated files from netdrivers 3.5 (http://www.scyld.com/network).
Diffstat (limited to 'linux/src/drivers/net/pci-scan.h')
-rw-r--r-- | linux/src/drivers/net/pci-scan.h | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/linux/src/drivers/net/pci-scan.h b/linux/src/drivers/net/pci-scan.h new file mode 100644 index 00000000..649b34bf --- /dev/null +++ b/linux/src/drivers/net/pci-scan.h @@ -0,0 +1,90 @@ +#ifndef _PCI_SCAN_H +#define _PCI_SCAN_H +/* + version 1.02 $Version:$ $Date: 2006/01/22 15:54:41 $ + Copyright 1999-2001 Donald Becker / Scyld Computing Corporation + This software is part of the Linux kernel. It may be used and + distributed according to the terms of the GNU Public License, + incorporated herein by reference. +*/ + +/* + These are the structures in the table that drives the PCI probe routines. + Note the matching code uses a bitmask: more specific table entries should + be placed before "catch-all" entries. + + The table must be zero terminated. +*/ +enum pci_id_flags_bits { + /* Set PCI command register bits before calling probe1(). */ + PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4, + /* Read and map the single following PCI BAR. */ + PCI_ADDR0=0<<4, PCI_ADDR1=1<<4, PCI_ADDR2=2<<4, PCI_ADDR3=3<<4, + PCI_ADDR_64BITS=0x100, PCI_NO_ACPI_WAKE=0x200, PCI_NO_MIN_LATENCY=0x400, + PCI_UNUSED_IRQ=0x800, +}; + +struct pci_id_info { + const char *name; + struct match_info { + int pci, pci_mask, subsystem, subsystem_mask; + int revision, revision_mask; /* Only 8 bits. */ + } id; + enum pci_id_flags_bits pci_flags; + int io_size; /* Needed for I/O region check or ioremap(). */ + int drv_flags; /* Driver use, intended as capability flags. */ +}; + +enum drv_id_flags { + PCI_HOTSWAP=1, /* Leave module loaded for Cardbus-like chips. */ +}; +enum drv_pwr_action { + DRV_NOOP, /* No action. */ + DRV_ATTACH, /* The driver may expect power ops. */ + DRV_SUSPEND, /* Machine suspending, next event RESUME or DETACH. */ + DRV_RESUME, /* Resume from previous SUSPEND */ + DRV_DETACH, /* Card will-be/is gone. Valid from SUSPEND! */ + DRV_PWR_WakeOn, /* Put device in e.g. Wake-On-LAN mode. */ + DRV_PWR_DOWN, /* Go to lowest power mode. */ + DRV_PWR_UP, /* Go to normal power mode. */ +}; + +struct drv_id_info { + const char *name; /* Single-word driver name. */ + int flags; + int pci_class; /* Typically PCI_CLASS_NETWORK_ETHERNET<<8. */ + struct pci_id_info *pci_dev_tbl; + void *(*probe1)(struct pci_dev *pdev, void *dev_ptr, + long ioaddr, int irq, int table_idx, int fnd_cnt); + /* Optional, called for suspend, resume and detach. */ + int (*pwr_event)(void *dev, int event); + /* Internal values. */ + struct drv_id_info *next; + void *cb_ops; +}; + +/* PCI scan and activate. + Scan PCI-like hardware, calling probe1(..,dev,..) on devices that match. + Returns -ENODEV, a negative number, if no cards are found. */ + +extern int pci_drv_register(struct drv_id_info *drv_id, void *initial_device); +extern void pci_drv_unregister(struct drv_id_info *drv_id); + + +/* ACPI routines. + Wake (change to ACPI D0 state) or set the ACPI power level of a sleeping + ACPI device. Returns the old power state. */ + +int acpi_wake(struct pci_dev *pdev); +enum acpi_pwr_state {ACPI_D0, ACPI_D1, ACPI_D2, ACPI_D3}; +int acpi_set_pwr_state(struct pci_dev *pdev, enum acpi_pwr_state state); + + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * tab-width: 4 + * End: + */ +#endif |