blob: f9d57fb4ba2120dba046e3e475d3164f155226b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
rtl8139 driver
// Warten bis der Reset beendet ist
while ((read_register_byte(netcard, REG_COMMAND) & REG_COMMAND) ==
CR_RESET);
// docu says reading ISR clears the interrupts, writting has no effect:
write_register_word(netcard, REG_INTERRUPT_STATUS, 0);
// so this is wrong
write_register_word(netcard, REG_INTERRUPT_MASK, 0xFFFF);
// not quite sure, but I would use an uint16_t as we read a word, not a dword
// from ISR
uint32_t isr = read_register_word(netcard, REG_INTERRUPT_STATUS);
// where is DMA (PCI bus mastering) enabled? not visible in driver, quite
// confusuing for the newbie
|