From: Lionel Sambuc Date: Mon, 19 May 2014 17:40:12 +0000 (+0200) Subject: Message type for DL_GETSTAT_S X-Git-Tag: v3.3.0~234 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/d3.min.js?a=commitdiff_plain;h=079646e056f042b6aa8714d79c63a69a29108c89;p=minix.git Message type for DL_GETSTAT_S Change-Id: Ia5c2bf7a3d796a6a0463af70059e82fddd43d69c --- diff --git a/drivers/atl2/atl2.c b/drivers/atl2/atl2.c index b8fc1bf09..4faeecb05 100644 --- a/drivers/atl2/atl2.c +++ b/drivers/atl2/atl2.c @@ -1056,7 +1056,7 @@ static void atl2_getstat(message *m) */ int r; - sys_safecopyto(m->m_source, m->DL_GRANT, 0, + sys_safecopyto(m->m_source, m->m_net_netdrv_dl_getstat_s.grant, 0, (vir_bytes) &state.stat, sizeof(state.stat)); m->m_type = DL_STAT_REPLY; diff --git a/drivers/dec21140A/dec21140A.c b/drivers/dec21140A/dec21140A.c index 35514e3b3..e538fb27e 100644 --- a/drivers/dec21140A/dec21140A.c +++ b/drivers/dec21140A/dec21140A.c @@ -176,9 +176,8 @@ static void do_get_stat_s(message * mp) dep = &de_state; - if ((rc = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0UL, - (vir_bytes)&dep->de_stat, - sizeof(dep->de_stat))) != OK) + if ((rc = sys_safecopyto(mp->m_source, mp->m_net_netdrv_dl_getstat_s.grant, + 0, (vir_bytes)&dep->de_stat, sizeof(dep->de_stat))) != OK) panic("%s %d", str_CopyErrMsg, rc); mp->m_type = DL_STAT_REPLY; diff --git a/drivers/dp8390/dp8390.c b/drivers/dp8390/dp8390.c index cfd50a846..c0abc61be 100644 --- a/drivers/dp8390/dp8390.c +++ b/drivers/dp8390/dp8390.c @@ -582,7 +582,8 @@ message *mp; if (dep->de_mode == DEM_SINK) { - put_userdata_s(mp->m_source, (vir_bytes) mp->DL_GRANT, + put_userdata_s(mp->m_source, + mp->m_net_netdrv_dl_getstat_s.grant, (vir_bytes) sizeof(dep->de_stat), &dep->de_stat); mp->m_type= DL_STAT_REPLY; @@ -598,7 +599,7 @@ message *mp; dep->de_stat.ets_frameAll += inb_reg0(dep, DP_CNTR1); dep->de_stat.ets_missedP += inb_reg0(dep, DP_CNTR2); - put_userdata_s(mp->m_source, mp->DL_GRANT, + put_userdata_s(mp->m_source, mp->m_net_netdrv_dl_getstat_s.grant, sizeof(dep->de_stat), &dep->de_stat); mp->m_type= DL_STAT_REPLY; diff --git a/drivers/dpeth/dp.c b/drivers/dpeth/dp.c index 7c0edbc73..972845d55 100644 --- a/drivers/dpeth/dp.c +++ b/drivers/dpeth/dp.c @@ -434,9 +434,9 @@ static void do_getstat_s(const message * mp) dep = &de_state; if (dep->de_mode == DEM_ENABLED) (*dep->de_getstatsf) (dep); - if ((rc = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, + if ((rc = sys_safecopyto(mp->m_source, mp->m_net_netdrv_dl_getstat_s.grant, 0, (vir_bytes)&dep->de_stat, - (vir_bytes) sizeof(dep->de_stat))) != OK) + (vir_bytes)sizeof(dep->de_stat))) != OK) panic(CopyErrMsg, rc); reply_mess.m_type = DL_STAT_REPLY; diff --git a/drivers/e1000/e1000.c b/drivers/e1000/e1000.c index 0b1449d99..45af30bfe 100644 --- a/drivers/e1000/e1000.c +++ b/drivers/e1000/e1000.c @@ -791,8 +791,8 @@ message *mp; stats.ets_CDheartbeat = 0; stats.ets_OWC = 0; - sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, (vir_bytes)&stats, - sizeof(stats)); + sys_safecopyto(mp->m_source, mp->m_net_netdrv_dl_getstat_s.grant, 0, + (vir_bytes)&stats, sizeof(stats)); mp->m_type = DL_STAT_REPLY; if((r=ipc_send(mp->m_source, mp)) != OK) panic("e1000_getstat: ipc_send() failed: %d", r); diff --git a/drivers/fxp/fxp.c b/drivers/fxp/fxp.c index d53c27f48..61496eaa5 100644 --- a/drivers/fxp/fxp.c +++ b/drivers/fxp/fxp.c @@ -1429,8 +1429,8 @@ static void fxp_getstat_s(message *mp) stats.ets_CDheartbeat= 0; stats.ets_OWC= fp->fxp_stat.sc_tx_latecol; - r= sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, (vir_bytes)&stats, - sizeof(stats)); + r= sys_safecopyto(mp->m_source, mp->m_net_netdrv_dl_getstat_s.grant, 0, + (vir_bytes)&stats, sizeof(stats)); if (r != OK) panic("fxp_getstat_s: sys_safecopyto failed: %d", r); diff --git a/drivers/lan8710a/lan8710a.c b/drivers/lan8710a/lan8710a.c index 4f6452dce..77fd1983d 100644 --- a/drivers/lan8710a/lan8710a.c +++ b/drivers/lan8710a/lan8710a.c @@ -438,8 +438,8 @@ message *mp; stats.ets_CDheartbeat = 0; stats.ets_OWC = 0; - sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, (vir_bytes)&stats, - sizeof(stats)); + sys_safecopyto(mp->m_source, mp->m_net_netdrv_dl_getstat_s.grant, 0, + (vir_bytes)&stats, sizeof(stats)); mp->m_type = DL_STAT_REPLY; if ((r=ipc_send(mp->m_source, mp)) != OK) { diff --git a/drivers/lance/lance.c b/drivers/lance/lance.c index 0d2017de5..a7adcf3f8 100644 --- a/drivers/lance/lance.c +++ b/drivers/lance/lance.c @@ -1311,7 +1311,7 @@ message *mp; ec= &ec_state; - r = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, + r = sys_safecopyto(mp->m_source, mp->m_net_netdrv_dl_getstat_s.grant, 0, (vir_bytes)&ec->eth_stat, sizeof(ec->eth_stat)); if (r != OK) diff --git a/drivers/orinoco/orinoco.c b/drivers/orinoco/orinoco.c index 234320147..96bbc3029 100644 --- a/drivers/orinoco/orinoco.c +++ b/drivers/orinoco/orinoco.c @@ -1780,8 +1780,8 @@ static void or_getstat_s (message * mp) { stats = orp->or_stat; - r = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, - (vir_bytes) &stats, sizeof(stats)); + r = sys_safecopyto(mp->m_source, mp->m_net_netdrv_dl_getstat_s.grant, + 0, (vir_bytes) &stats, sizeof(stats)); if(r != OK) { panic("or_getstat_s: sys_safecopyto failed: %d", r); } diff --git a/drivers/rtl8139/rtl8139.c b/drivers/rtl8139/rtl8139.c index 09b33fe2b..a1b2ac13f 100644 --- a/drivers/rtl8139/rtl8139.c +++ b/drivers/rtl8139/rtl8139.c @@ -1532,8 +1532,8 @@ message *mp; stats= rep->re_stat; - r = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, - (vir_bytes) &stats, sizeof(stats)); + r = sys_safecopyto(mp->m_source, mp->m_net_netdrv_dl_getstat_s.grant, + 0, (vir_bytes) &stats, sizeof(stats)); if (r != OK) panic("rl_getstat_s: sys_safecopyto failed: %d", r); diff --git a/drivers/rtl8169/rtl8169.c b/drivers/rtl8169/rtl8169.c index f80cf77f6..1d5617fd8 100644 --- a/drivers/rtl8169/rtl8169.c +++ b/drivers/rtl8169/rtl8169.c @@ -1531,8 +1531,8 @@ message *mp; stats = rep->re_stat; - r = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, - (vir_bytes) &stats, sizeof(stats)); + r = sys_safecopyto(mp->m_source, mp->m_net_netdrv_dl_getstat_s.grant, + 0, (vir_bytes) &stats, sizeof(stats)); if (r != OK) panic("rl_getstat_s: sys_safecopyto failed: %d", r); diff --git a/drivers/virtio_net/virtio_net.c b/drivers/virtio_net/virtio_net.c index fd6ac4d3c..c25459a7c 100644 --- a/drivers/virtio_net/virtio_net.c +++ b/drivers/virtio_net/virtio_net.c @@ -552,7 +552,7 @@ virtio_net_getstat(message *m) reply.DL_COUNT = 0; - r = sys_safecopyto(m->m_source, m->DL_GRANT, 0, + r = sys_safecopyto(m->m_source, m->m_net_netdrv_dl_getstat_s.grant, 0, (vir_bytes)&virtio_net_stats, sizeof(virtio_net_stats)); diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 051c7b7b2..eaab43f16 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -828,6 +828,13 @@ typedef struct { } mess_netdrv_net_dl_conf; _ASSERT_MSG_SIZE(mess_netdrv_net_dl_conf); +typedef struct { + cp_grant_id_t grant; + + uint8_t padding[52]; +} mess_net_netdrv_dl_getstat_s; +_ASSERT_MSG_SIZE(mess_net_netdrv_dl_getstat_s); + typedef struct { uid_t egid; @@ -1409,6 +1416,7 @@ typedef struct { mess_lsys_vfs_mapdriver m_lsys_vfs_mapdriver; mess_net_netdrv_dl_conf m_net_netdrv_dl_conf; + mess_net_netdrv_dl_getstat_s m_net_netdrv_dl_getstat_s; mess_netdrv_net_dl_conf m_netdrv_net_dl_conf; diff --git a/servers/inet/mnx_eth.c b/servers/inet/mnx_eth.c index 002e22fd1..8580318a1 100644 --- a/servers/inet/mnx_eth.c +++ b/servers/inet/mnx_eth.c @@ -832,7 +832,7 @@ eth_port_t *eth_port; message mess; mess.m_type= DL_GETSTAT_S; - mess.DL_GRANT= eth_port->etp_osdep.etp_stat_gid; + mess.m_net_netdrv_dl_getstat_s.grant= eth_port->etp_osdep.etp_stat_gid; assert(eth_port->etp_osdep.etp_state == OEPS_IDLE);