]> Joshua Wise's Git repositories - netwatch.git/blame - aseg/3c905.c
add net
[netwatch.git] / aseg / 3c905.c
CommitLineData
3b3161a1
JW
1#include <pci.h>
2#include <output.h>
3#include "3c905.h"
4
5static int found = 0, _bus, _dev, _fn;
6
e9d467b3 7static int bother_3c905(pci_dev_t *dev, void *nutrinus)
3b3161a1
JW
8{
9 if (dev->vid == 0x10B7 || dev->did == 0x9200)
10 {
11 outputf("Found a 3c905 to bother");
12
13 _bus = dev->bus;
14 _dev = dev->dev;
15 _fn = dev->fn;
16 found = 1;
17
18 return 1;
19 }
20 return 0;
21}
22
23void eth_poll()
24{
25 if (!found)
26 return;
27
28 pci_write16(_bus, _dev, _fn, 0x04, 0xFF);
29
30 pci_write16(_bus, _dev, _fn, 0x04, 0x00);
31}
32
33void eth_init()
34{
e9d467b3 35 pci_probe(bother_3c905, 0x0);
3b3161a1 36}
This page took 0.030023 seconds and 4 git commands to generate.