This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Net - some PCMCIA fixes
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 04 Nov 2002 13:24:08 -0700
- Subject: Net - some PCMCIA fixes
Both of these came up when trying to use the iPAQ and the new stack.
Index: devs/eth/cf/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/eth/cf/current/ChangeLog,v
retrieving revision 1.13
diff -u -5 -p -r1.13 ChangeLog
--- devs/eth/cf/current/ChangeLog 14 Jun 2002 22:01:10 -0000 1.13
+++ devs/eth/cf/current/ChangeLog 4 Nov 2002 20:20:38 -0000
@@ -1,5 +1,10 @@
+2002-11-04 Gary Thomas <gthomas@ecoscentric.com>
+
+ * src/if_sc_lpe.c (do_delay): Fix problem with overloaded name 'ticks'.
+ n.b. the FreeBSD stack has this defined for it's own use.
+
2002-06-14 Gary Thomas <gary@chez-thomas.org>
* src/if_sc_lpe.c:
Need to include <pkgconf/io_eth_drivers.h> for proper configuration
of stand-alone (polled) vs. system (interrupt driven) mode.
Index: devs/eth/cf/current/src/if_sc_lpe.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/eth/cf/current/src/if_sc_lpe.c,v
retrieving revision 1.12
diff -u -5 -p -r1.12 if_sc_lpe.c
--- devs/eth/cf/current/src/if_sc_lpe.c 14 Jun 2002 22:01:13 -0000 1.12
+++ devs/eth/cf/current/src/if_sc_lpe.c 4 Nov 2002 20:15:46 -0000
@@ -7,10 +7,11 @@
//==========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
//
@@ -83,26 +84,24 @@
#define DP_DATA 0x10
#define DP_CARD_RESET 0x1f
#define SC_LPE_MANUF 0x0104
-
-
#ifdef CYGPKG_KERNEL
#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
static char sc_lpe_card_handler_stack[STACK_SIZE];
static cyg_thread sc_lpe_card_handler_thread_data;
static cyg_handle_t sc_lpe_card_handler_thread_handle;
#endif // CYGPKG_KERNEL
-static void
-do_delay(int ticks)
+__inline__ static void
+do_delay(int _ticks)
{
#ifdef CYGPKG_KERNEL
- cyg_thread_delay(ticks);
+ cyg_thread_delay(_ticks);
#else
- CYGACC_CALL_IF_DELAY_US(10000*ticks);
+ CYGACC_CALL_IF_DELAY_US(10000*_ticks);
#endif
}
//
// This runs as a separate thread to handle the card. In particular, insertions
Index: net/bsd_tcpip/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos-opt/net/net/bsd_tcpip/current/ChangeLog,v
retrieving revision 1.9
diff -u -5 -p -r1.9 ChangeLog
--- net/bsd_tcpip/current/ChangeLog 3 Nov 2002 19:49:43 -0000 1.9
+++ net/bsd_tcpip/current/ChangeLog 4 Nov 2002 20:21:34 -0000
@@ -1,5 +1,11 @@
+2002-11-04 Gary Thomas <gthomas@ecoscentric.com>
+
+ * src/sys/net/if.c (if_attach): Moved check for ifq_maxlen to
+ this function since it can't be checked until the device comes
+ online, which may not be a sysinit time for PCMCIA devices.
+
2002-11-03 Gary Thomas <gthomas@ecoscentric.com>
* src/sys/kern/sockio.c (bsd_getname): Fix error where getsockname()
was actually performing getpeername().
Index: net/bsd_tcpip/current/src/sys/net/if.c
===================================================================
RCS file: /misc/cvsfiles/ecos-opt/net/net/bsd_tcpip/current/src/sys/net/if.c,v
retrieving revision 1.1
diff -u -5 -p -r1.1 if.c
--- net/bsd_tcpip/current/src/sys/net/if.c 20 May 2002 22:25:02 -0000 1.1
+++ net/bsd_tcpip/current/src/sys/net/if.c 4 Nov 2002 20:15:07 -0000
@@ -126,16 +126,10 @@ ifinit(dummy)
s = splimp();
for (ifp = ifnet.tqh_first; ifp; ifp = ifp->if_link.tqe_next) {
printf("IFP: %p, next: %p\n", ifp, ifp->if_link.tqe_next);
}
- for (ifp = ifnet.tqh_first; ifp; ifp = ifp->if_link.tqe_next)
- if (ifp->if_snd.ifq_maxlen == 0) {
- printf("%s%d XXX: driver didn't set ifq_maxlen\n",
- ifp->if_name, ifp->if_unit);
- ifp->if_snd.ifq_maxlen = ifqmaxlen;
- }
splx(s);
if_slowtimo(0);
}
int if_index = 0;
@@ -196,10 +190,16 @@ if_attach(ifp)
if (!inited) {
TAILQ_INIT(&ifnet);
inited = 1;
}
+
+ if (ifp->if_snd.ifq_maxlen == 0) {
+ printf("%s%d XXX: driver didn't set ifq_maxlen\n",
+ ifp->if_name, ifp->if_unit);
+ ifp->if_snd.ifq_maxlen = ifqmaxlen;
+ }
TAILQ_INSERT_TAIL(&ifnet, ifp, if_link);
ifp->if_index = ++if_index;
/*
* XXX -
--
------------------------------------------------------------
Gary Thomas |
eCosCentric, Ltd. |
+1 (970) 229-1963 | eCos & RedBoot experts
gthomas@ecoscentric.com |
http://www.ecoscentric.com/ |
------------------------------------------------------------