Alternative VirtualBox/Lance driver workaround

This commit is contained in:
David van Moolenbroek 2009-11-28 13:28:55 +00:00
parent fe7b2f1652
commit ad259e92af
3 changed files with 17 additions and 13 deletions

View file

@ -487,7 +487,6 @@ message *mp;
int port;
ether_card_t *ec;
message reply_mess;
static int first_time = 1;
pci_init();
@ -562,11 +561,8 @@ message *mp;
ec->flags |= ECF_BROAD;
ec->client = mp->m_source;
if (first_time)
{
first_time = 0;
ec_reinit(ec);
}
reply_mess.m_type = DL_CONF_REPLY;
reply_mess.m3_i1 = mp->DL_PORT;

View file

@ -124,6 +124,7 @@ PUBLIC void osdep_eth_init()
eth_port->etp_osdep.etp_port= ecp->ec_port;
eth_port->etp_osdep.etp_task= tasknr;
eth_port->etp_osdep.etp_recvconf= 0;
eth_port->etp_osdep.etp_send_ev= 0;
ev_init(&eth_port->etp_osdep.etp_recvev);
@ -554,7 +555,7 @@ eth_port_t *eth_port;
u32_t flags;
{
int r;
unsigned dl_flags;
unsigned dl_flags, mask;
message mess, repl_mess;
assert(!eth_port->etp_vlan);
@ -577,6 +578,13 @@ u32_t flags;
return;
}
mask = NWEO_EN_BROAD | NWEO_EN_MULTI | NWEO_EN_PROMISC;
if ((eth_port->etp_osdep.etp_recvconf & mask) == (flags & mask))
{
/* No change for the driver, so don't send an update */
return;
}
eth_port->etp_osdep.etp_recvconf= flags;
dl_flags= DL_NOMODE;
if (flags & NWEO_EN_BROAD)

View file

@ -95,9 +95,9 @@ FORWARD _PROTOTYPE ( void sr_status, (message *m) );
#endif
FORWARD _PROTOTYPE ( void sr_reply_, (mq_t *m, int reply, int is_revive) );
FORWARD _PROTOTYPE ( sr_fd_t *sr_getchannel, (int minor));
FORWARD _PROTOTYPE ( acc_t *sr_get_userdata, (int fd, vir_bytes offset,
vir_bytes count, int for_ioctl) );
FORWARD _PROTOTYPE ( int sr_put_userdata, (int fd, vir_bytes offset,
FORWARD _PROTOTYPE ( acc_t *sr_get_userdata, (int fd, size_t offset,
size_t count, int for_ioctl) );
FORWARD _PROTOTYPE ( int sr_put_userdata, (int fd, size_t offset,
acc_t *data, int for_ioctl) );
#ifdef __minix_vmd
#define sr_select_res 0
@ -876,8 +876,8 @@ int is_revive;
PRIVATE acc_t *sr_get_userdata (fd, offset, count, for_ioctl)
int fd;
vir_bytes offset;
vir_bytes count;
size_t offset;
size_t count;
int for_ioctl;
{
sr_fd_t *loc_fd;
@ -966,7 +966,7 @@ assert (loc_fd->srf_flags & ip_flag);
PRIVATE int sr_put_userdata (fd, offset, data, for_ioctl)
int fd;
vir_bytes offset;
size_t offset;
acc_t *data;
int for_ioctl;
{