size= sub_dev_ptr->DmaSize + 64 * 1024;
base= alloc_contig(size, AC_ALIGN4K, &ph);
if (!base) {
- error("%s: failed to allocate dma buffer for channel %d\n",
- drv.DriverName,i);
+ error("%s: failed to allocate dma buffer for a channel\n",
+ drv.DriverName);
return EIO;
}
sub_dev_ptr->DmaBuf= base;
/* Ask the system task for a suitable buffer */
if(!(bios_buf_v = alloc_contig(BIOSBUF, AC_LOWER1M, &bios_buf_phys))) {
- panic(ME, "allocating bios buffer failed", r);
+ panic(ME, "allocating bios buffer failed", ENOMEM);
}
if (bios_buf_phys+BIOSBUF > 0x100000)
}
/*
-** Name: void do_vwrite_s(message *mp, int vectored)
+** Name: void do_vwrite_s(message *mp)
** Function:
*/
static void do_vwrite_s(message * mp)
port = mp->DL_PORT;
if (port < 0 || port >= DE_PORT_NR) /* Check for illegal port number */
- panic(dep->de_name, PortErrMsg, port);
+ panic(__FILE__, PortErrMsg, EINVAL);
dep = &de_table[port];
dep->de_client = mp->DL_PROC;
port = mp->DL_PORT;
if (port < 0 || port >= DE_PORT_NR) /* Check for illegal port number */
- panic(dep->de_name, PortErrMsg, port);
+ panic(__FILE__, PortErrMsg, EINVAL);
dep = &de_table[port];
dep->de_client = mp->DL_PROC;
port = mp->DL_PORT;
if (port < 0 || port >= DE_PORT_NR) /* Check for illegal port number */
- panic(dep->de_name, PortErrMsg, port);
+ panic(__FILE__, PortErrMsg, EINVAL);
dep = &de_table[port];
dep->de_client = mp->DL_PROC;
port = mp->DL_PORT;
if (port < 0 || port >= DE_PORT_NR) /* Check for illegal port number */
- panic(dep->de_name, PortErrMsg, port);
+ panic(__FILE__, PortErrMsg, EINVAL);
dep = &de_table[port];
if (dep->de_mode == DEM_ENABLED && (dep->de_flags & DEF_ENABLED)) {
sef_local_startup();
while (TRUE) {
- if ((rc = sef_receive(ANY, &m)) != OK) panic(dep->de_name, RecvErrMsg, rc);
+ if ((rc = sef_receive(ANY, &m)) != OK){
+ panic(__FILE__, RecvErrMsg, rc);
+ }
DEBUG(printf("eth: got message %d, ", m.m_type));
eth_ign_proto= htons((u16_t) v);
if(!(fxp_table = alloc_contig(ft, 0, &fxp_table_phys)))
- panic("FXP","couldn't allocate table", r);
+ panic("FXP","couldn't allocate table", ENOMEM);
memset(fxp_table, 0, ft);
t_or *orp;
int i, j, r;
u16_t irqmask;
- hermes_t *hw = &(orp->hw);
if (OK != (r = getuptime(&now)))
panic(__FILE__, "orinoco: getuptime() failed:", r);
t_or *orp;
int i, err;
u16_t evstat =0, d;
- hermes_t *hw;
for (i = 0, orp = or_table; orp < or_table + OR_PORT_NR; i++, orp++) {
if(orp->or_mode == OR_M_DISABLED) {
struct ethhdr *eh;
t_or *orp;
clock_t timebefore, t0;
- phys_bytes phys_user, iov_src;
+ phys_bytes phys_user;
+ phys_bytes iov_src = 0;
hermes_t *hw;
struct hermes_tx_descriptor desc;
struct header_struct hdr;
struct ethhdr *eh;
t_or *orp;
clock_t timebefore, t0;
- phys_bytes phys_user, iov_src;
+ phys_bytes phys_user;
+ phys_bytes iov_src = 0;
hermes_t *hw;
struct hermes_tx_descriptor desc;
int iov_offset = 0;
clock_t timebefore;
unsigned amount, totlen, packlen;
struct hermes_rx_descriptor desc;
- phys_bytes dst_phys, iov_src;
+ phys_bytes dst_phys;
+ phys_bytes iov_src = 0;
u16_t d_start, d_end, rxfid, status;
struct header_struct hdr;
int length, offset;
clock_t timebefore;
unsigned amount, totlen, packlen;
struct hermes_rx_descriptor desc;
- phys_bytes dst_phys, iov_src;
+ phys_bytes dst_phys;
+ phys_bytes iov_src = 0;
u16_t d_start, d_end, rxfid, status;
struct header_struct hdr;
u32_t l, rxstat;
/*===========================================================================*
* rl_readv *
*===========================================================================*/
-static void rl_readv(mp, from_int, vectored)
-message *mp;
-int from_int;
-int vectored;
+static void rl_readv(message *mp, int from_int, int vectored)
{
int i, j, n, o, s, s1, dl_port, re_client, count, size;
port_t port;
unsigned amount, totlen, packlen;
- phys_bytes src_phys, dst_phys, iov_src;
+ phys_bytes src_phys, dst_phys;
+ phys_bytes iov_src = 0;
u16_t d_start, d_end;
u32_t l, rxstat = 0x12345678;
re_t *rep;
/*===========================================================================*
* rl_readv_s *
*===========================================================================*/
-static void rl_readv_s(mp, from_int)
-message *mp;
-int from_int;
+static void rl_readv_s(message *mp, int from_int)
{
int i, j, n, o, s, s1, dl_port, re_client, count, size;
port_t port;
unsigned amount, totlen, packlen;
- phys_bytes src_phys, dst_phys, iov_src;
+ phys_bytes src_phys, dst_phys;
+ phys_bytes iov_src = 0;
u16_t d_start, d_end;
u32_t l, rxstat = 0x12345678;
re_t *rep;
/*===========================================================================*
* rl_writev *
*===========================================================================*/
-static void rl_writev(mp, from_int, vectored)
-message *mp;
-int from_int;
-int vectored;
+static void rl_writev(message *mp, int from_int, int vectored)
{
- phys_bytes iov_src, phys_user;
+ phys_bytes iov_src = 0;
+ phys_bytes phys_user;
int i, j, n, s, port, count, size;
int tx_head, re_client;
re_t *rep;
/*===========================================================================*
* rl_writev_s *
*===========================================================================*/
-static void rl_writev_s(mp, from_int)
-message *mp;
-int from_int;
+static void rl_writev_s(message *mp, int from_int)
{
- phys_bytes iov_src;
+ phys_bytes iov_src = 0;
int i, j, n, s, port, count, size;
int tx_head, re_client;
re_t *rep;
/*===========================================================================*
* rl_readv_s *
*===========================================================================*/
-static void rl_readv_s(mp, from_int)
-message *mp;
-int from_int;
+static void rl_readv_s(message *mp, int from_int)
{
int i, j, n, s, dl_port, re_client, count, size, index;
port_t port;
unsigned totlen, packlen;
- phys_bytes src_phys, iov_src;
+ phys_bytes src_phys;
+ phys_bytes iov_src = 0;
re_desc *desc;
u32_t rxstat = 0x12345678;
re_t *rep;
/*===========================================================================*
* rl_writev_s *
*===========================================================================*/
-static void rl_writev_s(mp, from_int)
-message *mp;
-int from_int;
+static void rl_writev_s(message *mp, int from_int)
{
- phys_bytes iov_src;
+ phys_bytes iov_src = 0;
int i, j, n, s, port, count, size;
int tx_head, re_client;
re_t *rep;