- /** Wait for upload completion (upComplete(15) or upError (14)) **/
- for (i = 0; i < 40000; i++) /* XXX What is this shit?! */
- ;
- while((rxdesc.status & ((1<<14) | (1<<15))) == 0)
- for (i = 0; i < 40000; i++)
- ;
-
+/*** a3c90x_poll: exported routine that waits for a certain length of time
+ *** for a packet, and if it sees none, returns 0. This routine should
+ *** copy the packet to nic->packet if it gets a packet and set the size
+ *** in nic->packetlen. Return 1 if a packet was found.
+ ***/
+static struct pbuf * a3c90x_poll(struct nic *nic)
+{
+ int errcode;
+ struct pbuf *p;
+
+ if (!currecv)
+ _setup_recv(nic);
+
+ /* Nothing to do? */
+ if ((rxdesc.status & ((1<<14) | (1<<15))) == 0)
+ return NULL;
+
+ p = currecv;
+