- 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>
This commit is contained in:
Pav Lucistnik 2006-11-19 15:09:53 +00:00
parent 727e1e8957
commit b7798a0c80
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=177583
2 changed files with 18 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= bochs
PORTVERSION= 2.3
PORTREVISION= 1
PORTEPOCH= 2
CATEGORIES= emulators
MASTER_SITES= SF

View file

@ -0,0 +1,17 @@
--- 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) {