- if ( ! retrieve ) return 1;
-
- /** we don't need to acknowledge rxComplete -- the upload engine
- ** does it for us.
- **/
-
- /** Build the up-load descriptor **/
- INF_3C90X.ReceiveUPD.UpNextPtr = 0;
- INF_3C90X.ReceiveUPD.UpPktStatus = 0;
- INF_3C90X.ReceiveUPD.DataAddr = virt_to_bus(nic->packet);
- INF_3C90X.ReceiveUPD.DataLength = 1536 + (1<<31);
-
- /** Submit the upload descriptor to the NIC **/
- outl(virt_to_bus(&(INF_3C90X.ReceiveUPD)),
- INF_3C90X.IOAddr + regUpListPtr_l);
-
- /** Wait for upload completion (upComplete(15) or upError (14)) **/
- for(i=0;i<40000;i++);
- while((INF_3C90X.ReceiveUPD.UpPktStatus & ((1<<14) | (1<<15))) == 0)
- for(i=0;i<40000;i++);
-
- /** Check for Error (else we have good packet) **/
- if (INF_3C90X.ReceiveUPD.UpPktStatus & (1<<14))
- {
- errcode = INF_3C90X.ReceiveUPD.UpPktStatus;
- if (errcode & (1<<16))
- outputf("3C90X: Rx Overrun (%hX)",errcode>>16);
- else if (errcode & (1<<17))
- outputf("3C90X: Runt Frame (%hX)",errcode>>16);
- else if (errcode & (1<<18))
- outputf("3C90X: Alignment Error (%hX)",errcode>>16);
- else if (errcode & (1<<19))
- outputf("3C90X: CRC Error (%hX)",errcode>>16);
- else if (errcode & (1<<20))
- outputf("3C90X: Oversized Frame (%hX)",errcode>>16);
- else
- outputf("3C90X: Packet error (%hX)",errcode>>16);
- return 0;
- }
-
- /** Ok, got packet. Set length in nic->packetlen. **/
- nic->packetlen = (INF_3C90X.ReceiveUPD.UpPktStatus & 0x1FFF);
-
- return 1;
- }
-
-