From: Alan Cox Date: Fri, 25 Mar 2016 17:37:35 +0000 (+0000) Subject: net_z80pack: work around SDCC funny and remove debug X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f1b9d35229ef336e1b2583a0b4d7a1efadcf886c;p=FUZIX.git net_z80pack: work around SDCC funny and remove debug --- diff --git a/Kernel/dev/net/net_z80pack.c b/Kernel/dev/net/net_z80pack.c index af1a5fe3..964206fb 100644 --- a/Kernel/dev/net/net_z80pack.c +++ b/Kernel/dev/net/net_z80pack.c @@ -57,7 +57,6 @@ static uint8_t status(struct socket *s) } if (st & 0x80) { s->s_error = netctrl; - kprintf("ERR %d\n", s->s_error); if (s->s_error <= sizeof(errormap)) s->s_error = errormap[s->s_error]; else @@ -66,6 +65,7 @@ static uint8_t status(struct socket *s) switch(s->s_error) { case EINPROGRESS: case ENOTCONN: + s->s_error = 0; break; default: s->s_state = SS_CLOSED; @@ -111,7 +111,6 @@ int net_init(struct socket *s) udata.u_error = EAFNOSUPPORT; return -1; } - kprintf("Socket %d\n", s->s_num); /* For now keep the LCN matching the socket # */ if (s->s_num < 16) { /* Select our new socket and turn off NDELAY bit flag */ @@ -218,7 +217,8 @@ arg_t net_read(struct socket *s, uint8_t flag) usize_t n = 0; struct sockdata *sd = s->s_priv; irqflags_t irq; - uint8_t st, data; + uint8_t st; + volatile uint8_t data; while (1) { @@ -260,7 +260,6 @@ arg_t net_read(struct socket *s, uint8_t flag) return -1; } } - kprintf("ST %x N %d\n", st, n); if (n) return n; if (st & 0x80) {