Fixed receiving multiple frames in generic device.
--- a/devices/generic.c Mon Nov 09 10:21:18 2009 +0100
+++ b/devices/generic.c Mon Nov 09 10:29:29 2009 +0100
@@ -314,11 +314,11 @@
struct kvec iov;
int ret, budget = 10; // FIXME
- iov.iov_base = dev->rx_buf;
- iov.iov_len = EC_GEN_RX_BUF_SIZE;
- memset(&msg, 0, sizeof(msg));
-
do {
+ iov.iov_base = dev->rx_buf;
+ iov.iov_len = EC_GEN_RX_BUF_SIZE;
+ memset(&msg, 0, sizeof(msg));
+
ret = kernel_recvmsg(dev->socket, &msg, &iov, 1, iov.iov_len,
MSG_DONTWAIT);
if (ret > 0) {