1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00
freebsd-ports/emulators/bochs/files/patch-iodev-eth_fbsd.cc
Pav Lucistnik b7798a0c80 - If you use ne2k driver for FreeBSD, bochs will not receive incoming packets
until the buffer specified by bochs is full (2048). Enable immediate mode to
  solve this.

PR:		ports/105580
Submitted by:	Thinker <thinker@branda.to>
2006-11-19 15:09:53 +00:00

18 lines
425 B
C++

--- iodev/eth_fbsd.cc.orig Sat Dec 10 19:37:35 2005
+++ iodev/eth_fbsd.cc Sun Nov 19 15:56:46 2006
@@ -227,6 +227,14 @@
return;
}
+ v = 1;
+ if (ioctl(this->bpf_fd, BIOCIMMEDIATE, &v) < 0) {
+ BX_PANIC(("eth_freebsd: could not enable immediate mode"));
+ close(this->bpf_fd);
+ this->bpf_fd = -1;
+ return;
+ }
+
// Set up non-blocking i/o
v = 1;
if (ioctl(this->bpf_fd, FIONBIO, &v) < 0) {