Revision a343df16
b/hw/ne2000.c | ||
---|---|---|
61 | 61 |
#define EN1_CURPAG 0x17 |
62 | 62 |
#define EN1_MULT 0x18 |
63 | 63 |
|
64 |
#define EN2_STARTPG 0x21 /* Starting page of ring bfr RD */ |
|
65 |
#define EN2_STOPPG 0x22 /* Ending page +1 of ring bfr RD */ |
|
66 |
|
|
64 | 67 |
/* Register accessed at EN_CMD, the 8390 base addr. */ |
65 | 68 |
#define E8390_STOP 0x01 /* Stop and reset the chip */ |
66 | 69 |
#define E8390_START 0x02 /* Start the chip, clear reset */ |
... | ... | |
150 | 153 |
static void ne2000_update_irq(NE2000State *s) |
151 | 154 |
{ |
152 | 155 |
int isr; |
153 |
isr = s->isr & s->imr;
|
|
156 |
isr = (s->isr & s->imr) & 0x7f;
|
|
154 | 157 |
#if defined(DEBUG_NE2000) |
155 | 158 |
printf("NE2000: Set IRQ line %d to %d (%02x %02x)\n", |
156 | 159 |
s->irq, isr ? 1 : 0, s->isr, s->imr); |
... | ... | |
255 | 258 |
if (addr == E8390_CMD) { |
256 | 259 |
/* control register */ |
257 | 260 |
s->cmd = val; |
258 |
if (val & E8390_START) {
|
|
261 |
if (!(val & E8390_STOP)) { /* START bit makes no sense on RTL8029... */
|
|
259 | 262 |
s->isr &= ~ENISR_RESET; |
260 | 263 |
/* test specific case: zero length transfert */ |
261 | 264 |
if ((val & (E8390_RREAD | E8390_RWRITE)) && |
... | ... | |
376 | 379 |
case EN0_RSR: |
377 | 380 |
ret = s->rsr; |
378 | 381 |
break; |
382 |
case EN2_STARTPG: |
|
383 |
ret = s->start >> 8; |
|
384 |
break; |
|
385 |
case EN2_STOPPG: |
|
386 |
ret = s->stop >> 8; |
|
387 |
break; |
|
379 | 388 |
default: |
380 | 389 |
ret = 0x00; |
381 | 390 |
break; |
Also available in: Unified diff