21 #include <linux/module.h>
22 #include <linux/pci.h>
36 static int init_pcitm = 0;
78 static void prism54_remove(
struct pci_dev *);
80 static int prism54_resume(
struct pci_dev *);
84 .id_table = prism54_id_tbl,
85 .probe = prism54_probe,
86 .remove = prism54_remove,
87 .suspend = prism54_suspend,
88 .resume = prism54_resume,
112 #if VERBOSE > SHOW_ERROR_MESSAGES
124 goto do_pci_disable_device;
140 if ( init_pcitm >= 0 ) {
141 pci_write_config_byte(pdev, 0x40, (
u8)init_pcitm);
142 pci_write_config_byte(pdev, 0x41, (
u8)init_pcitm);
152 goto do_pci_disable_device;
157 if (rvalue || !mem_addr) {
158 printk(
KERN_ERR "%s: PCI device memory region not configured; fix your BIOS or CardBus bridge/drivers\n",
160 goto do_pci_release_regions;
175 goto do_pci_clear_mwi;
178 priv = netdev_priv(ndev);
192 goto do_unregister_netdev;
199 do_unregister_netdev:
202 pci_set_drvdata(pdev,
NULL);
207 do_pci_release_regions:
209 do_pci_disable_device:
215 static volatile int __in_cleanup_module = 0;
219 prism54_remove(
struct pci_dev *pdev)
221 struct net_device *ndev = pci_get_drvdata(pdev);
225 if (!__in_cleanup_module) {
250 pci_set_drvdata(pdev,
NULL);
264 struct net_device *ndev = pci_get_drvdata(pdev);
278 netif_stop_queue(ndev);
285 prism54_resume(
struct pci_dev *pdev)
287 struct net_device *ndev = pci_get_drvdata(pdev);
308 netif_start_queue(ndev);
314 prism54_module_init(
void)
319 __bug_on_wrong_struct_sizes ();
321 return pci_register_driver(&prism54_driver);
328 prism54_module_exit(
void)
330 __in_cleanup_module = 1;
336 __in_cleanup_module = 0;