X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fgeekos%2Fne2k.c;h=8810895a29436d96529c303eddbe7c84f33c493d;hb=a868ff7325e5f94ee3a40198f14b96acc4b311bc;hp=b64f9cfec9c1f5e9761c4d9d3d0f1373dc4ef5ba;hpb=28b1fc67c62b4e253377805b9028652dace5a679;p=palacios.git diff --git a/palacios/src/geekos/ne2k.c b/palacios/src/geekos/ne2k.c index b64f9cf..8810895 100644 --- a/palacios/src/geekos/ne2k.c +++ b/palacios/src/geekos/ne2k.c @@ -263,7 +263,7 @@ int NE2K_Send(uchar_t src[], uchar_t dest[], uint_t type, uchar_t *data, uint_t { struct _CR * cr = (struct _CR*)&(regs->cr); uint_t packet_size = size + 16; - regs->cr = 0x21; + regs->cr = 0x21; /* Turn off remote DMA, stop command */ cr->stp = 0x0; //toggle start on cr->sta = 0x1; Out_Byte(NE2K_CR, regs->cr); @@ -291,7 +291,7 @@ int NE2K_Send(uchar_t src[], uchar_t dest[], uint_t type, uchar_t *data, uint_t Out_Byte(NE2K_RSAR0, 0x00); Out_Byte(NE2K_RSAR1, TX_START_BUFF); - regs->cr = 0x16; + cr->rd = 0x02; /* Set remote DMA to write */ Out_Byte(NE2K_CR, regs->cr); /* Destination Address */ @@ -312,6 +312,9 @@ int NE2K_Send(uchar_t src[], uchar_t dest[], uint_t type, uchar_t *data, uint_t Out_Word(NE2K_CR + 0x10, (*(data + i + 1) << 8) | *(data + i)); } + cr->txp = 0x1; /* Start transmission */ + Out_Byte(NE2K_CR, regs->cr); + return 0; }