mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-09 17:12:58 +00:00
2003-07-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* network/if_fxp.c: Replace deprecated b* funcs by mem* funcs.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2003-07-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
|
* network/if_fxp.c: Replace deprecated b* funcs by mem* funcs.
|
||||||
|
|
||||||
2003-07-18 Greg Menke <gregory.menke@gsfc.nasa.gov>
|
2003-07-18 Greg Menke <gregory.menke@gsfc.nasa.gov>
|
||||||
|
|
||||||
PR 429/bsps
|
PR 429/bsps
|
||||||
|
|||||||
@@ -442,7 +442,7 @@ rtems_fxp_attach(struct rtems_bsdnet_ifconfig *config, int attaching)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bzero(sc, sizeof(*sc));
|
memset(sc, 0, sizeof(*sc));
|
||||||
#ifdef NOTUSED
|
#ifdef NOTUSED
|
||||||
sc->dev = dev;
|
sc->dev = dev;
|
||||||
callout_handle_init(&sc->stat_ch);
|
callout_handle_init(&sc->stat_ch);
|
||||||
@@ -617,7 +617,7 @@ rtems_fxp_attach(struct rtems_bsdnet_ifconfig *config, int attaching)
|
|||||||
if (sc->cbl_base == NULL)
|
if (sc->cbl_base == NULL)
|
||||||
goto failmem;
|
goto failmem;
|
||||||
else
|
else
|
||||||
bzero(sc->cbl_base,sizeof(struct fxp_cb_tx) * FXP_NTXCB);
|
memset(sc->cbl_base, 0, sizeof(struct fxp_cb_tx) * FXP_NTXCB);
|
||||||
|
|
||||||
sc->fxp_stats = malloc(sizeof(struct fxp_stats), M_DEVBUF,
|
sc->fxp_stats = malloc(sizeof(struct fxp_stats), M_DEVBUF,
|
||||||
M_NOWAIT);
|
M_NOWAIT);
|
||||||
@@ -625,7 +625,7 @@ rtems_fxp_attach(struct rtems_bsdnet_ifconfig *config, int attaching)
|
|||||||
if (sc->fxp_stats == NULL)
|
if (sc->fxp_stats == NULL)
|
||||||
goto failmem;
|
goto failmem;
|
||||||
else
|
else
|
||||||
bzero(sc->fxp_stats,sizeof(struct fxp_stats));
|
memset(sc->fxp_stats, 0, sizeof(struct fxp_stats));
|
||||||
|
|
||||||
sc->mcsp = malloc(sizeof(struct fxp_cb_mcs), M_DEVBUF, M_NOWAIT);
|
sc->mcsp = malloc(sizeof(struct fxp_cb_mcs), M_DEVBUF, M_NOWAIT);
|
||||||
DBGLVL_PRINTK(3,"fxp_attach: sc->mcsp = 0x%x\n",sc->mcsp);
|
DBGLVL_PRINTK(3,"fxp_attach: sc->mcsp = 0x%x\n",sc->mcsp);
|
||||||
@@ -1720,12 +1720,12 @@ rtems_task_wake_after(100);
|
|||||||
DBGLVL_PRINTK(5,"fxp_init: cbp = 0x%x\n",cbp);
|
DBGLVL_PRINTK(5,"fxp_init: cbp = 0x%x\n",cbp);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This bcopy is kind of disgusting, but there are a bunch of must be
|
* This memcpy is kind of disgusting, but there are a bunch of must be
|
||||||
* zero and must be one bits in this structure and this is the easiest
|
* zero and must be one bits in this structure and this is the easiest
|
||||||
* way to initialize them all to proper values.
|
* way to initialize them all to proper values.
|
||||||
*/
|
*/
|
||||||
bcopy(fxp_cb_config_template,
|
memcpy( (void *)(u_int32_t *)(volatile void *)&cbp->cb_status,
|
||||||
(void *)(u_int32_t *)(volatile void *)&cbp->cb_status,
|
fxp_cb_config_template,
|
||||||
sizeof(fxp_cb_config_template));
|
sizeof(fxp_cb_config_template));
|
||||||
|
|
||||||
cbp->cb_status = 0;
|
cbp->cb_status = 0;
|
||||||
@@ -1830,8 +1830,8 @@ rtems_task_wake_after(100);
|
|||||||
cb_ias->cb_status = 0;
|
cb_ias->cb_status = 0;
|
||||||
cb_ias->cb_command = FXP_CB_COMMAND_IAS | FXP_CB_COMMAND_EL;
|
cb_ias->cb_command = FXP_CB_COMMAND_IAS | FXP_CB_COMMAND_EL;
|
||||||
cb_ias->link_addr = -1;
|
cb_ias->link_addr = -1;
|
||||||
bcopy(sc->arpcom.ac_enaddr,
|
memcpy((void *)(u_int32_t *)(volatile void *)cb_ias->macaddr,
|
||||||
(void *)(u_int32_t *)(volatile void *)cb_ias->macaddr,
|
sc->arpcom.ac_enaddr,
|
||||||
sizeof(sc->arpcom.ac_enaddr));
|
sizeof(sc->arpcom.ac_enaddr));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1849,7 +1849,7 @@ rtems_task_wake_after(100);
|
|||||||
|
|
||||||
DBGLVL_PRINTK(5,"fxp_init: initialize TxCB list\n");
|
DBGLVL_PRINTK(5,"fxp_init: initialize TxCB list\n");
|
||||||
txp = sc->cbl_base;
|
txp = sc->cbl_base;
|
||||||
bzero(txp, sizeof(struct fxp_cb_tx) * FXP_NTXCB);
|
memset(txp, 0, sizeof(struct fxp_cb_tx) * FXP_NTXCB);
|
||||||
for (i = 0; i < FXP_NTXCB; i++) {
|
for (i = 0; i < FXP_NTXCB; i++) {
|
||||||
txp[i].cb_status = FXP_CB_STATUS_C | FXP_CB_STATUS_OK;
|
txp[i].cb_status = FXP_CB_STATUS_C | FXP_CB_STATUS_OK;
|
||||||
txp[i].cb_command = FXP_CB_COMMAND_NOP;
|
txp[i].cb_command = FXP_CB_COMMAND_NOP;
|
||||||
@@ -2272,9 +2272,9 @@ fxp_mc_setup(struct fxp_softc *sc)
|
|||||||
nmcasts = 0;
|
nmcasts = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr),
|
memcpy((void *)(uintptr_t)(volatile void *)
|
||||||
(void *)(uintptr_t)(volatile void *)
|
&sc->mcsp->mc_addr[nmcasts][0],
|
||||||
&sc->mcsp->mc_addr[nmcasts][0], 6);
|
LLADDR((struct sockaddr_dl *)ifma->ifma_addr), 6);
|
||||||
nmcasts++;
|
nmcasts++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user