86 #define DRIVER_NAME "orinoco_plx"
87 #define PFX DRIVER_NAME ": "
89 #include <linux/module.h>
90 #include <linux/kernel.h>
93 #include <linux/pci.h>
99 #define COR_OFFSET (0x3e0)
100 #define COR_VALUE (COR_LEVEL_REQ | COR_FUNC_ENA)
101 #define COR_RESET (0x80)
102 #define PLX_RESET_TIME (500)
104 #define PLX_INTCSR 0x4c
105 #define PLX_INTCSR_INTEN (1 << 6)
132 if (reg & HERMES_CMD_BUSY) {
144 static const u8 cis_magic[] = {
145 0x01, 0x03, 0x00, 0x00, 0xff, 0x17, 0x04, 0x67
149 for (i = 0; i < 16; i++)
155 for (i = 0; i <
sizeof(cis_magic); i++) {
158 "card is unexpected\n");
171 if (!(csr_reg & PLX_INTCSR_INTEN)) {
180 static int orinoco_plx_init_one(
struct pci_dev *pdev,
200 bridge_io = pci_iomap(pdev, 1, 0);
204 goto fail_map_bridge;
207 attr_io = pci_iomap(pdev, 2, 0);
214 hermes_io = pci_iomap(pdev, 3, 0);
218 goto fail_map_hermes;
223 orinoco_plx_cor_reset,
NULL);
244 err = orinoco_plx_hw_init(card);
250 err = orinoco_plx_cor_reset(priv);
268 pci_set_drvdata(pdev, priv);
276 pci_set_drvdata(pdev,
NULL);
304 pci_set_drvdata(pdev,
NULL);
333 static struct pci_driver orinoco_plx_driver = {
335 .id_table = orinoco_plx_id_table,
336 .probe = orinoco_plx_init_one,
350 static int __init orinoco_plx_init(
void)
353 return pci_register_driver(&orinoco_plx_driver);
356 static void __exit orinoco_plx_exit(
void)