1 2002-10-06 Andrew Lunn <andrew.lunn@ascom.ch>
3 * include/devs_eth_ebsa285.inl: EBSA has the ethernet devices
4 multiplexed onto one interrupt. This got losted when generalising
7 2002-05-14 Jesper Skov <jskov@redhat.com>
9 * include/devs_eth_ebsa285.inl: Fix warnings.
11 2001-11-19 Hugo Tyson <hmt@redhat.com>
12 2001-11-19 Anssi Pulkkinen <Anssi.Pulkkinen@ascom.ch>
14 * src/if_ebsa285.c (TxMachine): The test to see if there is a new
15 tx to start must also say "go" if the tx queue is full. Normally,
16 if the txqueue is full, a tx will be occurring at all times - so
17 one will complete soon, so the tx queue full flag will soon be
18 cleared, and this condition will recover. I suspect a subtle race
19 which effectively means a new tx is queued and fills the queue in
20 between two tx's, so no TxDone() follows, causes the hang which we
21 get without this extra test under high load. [CASE 106686]
23 2001-08-31 Hugo Tyson <hmt@redhat.com>
24 2001-08-31 Sanjay Bisen <sanjay.bisen@ascom.ch>
26 * src/if_ebsa285.c (TxDone): Check from prev change is moved to
27 the logical driver. Also, we zero the key in global state before
28 the callback - this should make no difference, but again it's good
29 practice, and ASCOM's tests indicate a benefit for CASE 106059.
31 2001-08-22 Gary Thomas <gthomas@redhat.com>
34 printf() is no longer a part of RedBoot. Thus all programs
35 must use diag_printf() and related functions instead.
37 2001-06-08 Gary Thomas <gthomas@redhat.com>
39 * src/if_ebsa285.c (TxDone): Defensive programming: only call
40 tx_done with new/unique key values.
42 2001-03-12 Hugo Tyson <hmt@redhat.com>
44 * src/if_ebsa285.c: Make device config more consistent with that
45 used in other 82559 platforms, and fix a typo.
47 2001-02-20 Hugo Tyson <hmt@redhat.com>
48 2001-02-15 Martin Buck <martin.buck@ascom.ch>
50 * src/if_ebsa285.c: Configure i82559 not to drop oversized frames.
51 This is required for VLAN support (because the maximum frame size
52 including the VLAN tag is 1518 instead of 1514) and shouldn't
53 hurt otherwise. To do this, we now always configure the chip when
54 i82559_start is called, instead of relying on the default
55 configuration if promiscuous mode is off. Another advantage is that
56 we're now able to turn promiscuous mode off again after it was
59 2001-01-02 Hugo Tyson <hmt@redhat.com>
61 * src/if_ebsa285.c (find_82559s_match_func): New func to match
62 complex PCI device requirements.
63 (pci_init_find_82559s): Use it, and the new PCI API to correctly
64 match a disparate bunch of devices on the one board.
66 2000-12-21 Hugo Tyson <hmt@redhat.com>
68 * src/if_ebsa285.c (pci_init_find_82559s): Also check for the PCI
69 device whose name is ... 0x1209; "82559ER". Thanks to Martin Buck
70 <martin.buck@ascom.ch> for the ID for that.
72 2000-11-19 Gary Thomas <gthomas@redhat.com>
74 * src/if_ebsa285.c (pci_init_find_82559s): Intel has at least
75 two devices equivalent to the 82559. Support both (0x1229, 0x01030).
77 2000-10-05 Hugo Tyson <hmt@redhat.com>
79 * src/if_ebsa285.c: Deal with device interrupts in a nested
80 fashion - disable/restore is the semantics now, rather than
81 unconditionally unmasking. Also go directly to the 21285 PIC's
82 interrupt control registers to gain atomicity for these. Poll for
83 ready received packets when acknowledging an interrupt in the
84 tranmitting world; a race here could lose an Rx interrupt. Which
85 doesn't matter on a busy system, but in quieter times... there
86 will always be such a race because of the vague way the i82559's
87 status bits reflect how it's yanking the interrupt line; you have
88 to poll until the interrupt is gone before returning else spurious
89 interrupt failures occur. The issue is to close the window as
90 tightly as possible, which this change achieves at a minor cost in
91 performance - because of the time spent polling when not required.
93 2000-09-11 Hugo Tyson <hmt@cygnus.co.uk>
95 * src/if_ebsa285.c (i82559_poll): Only diddle the interface we
96 were asked to. This is more correct in terms of the intent of the
97 API, though it shouldn't really be necessary.
99 2000-09-06 Hugo Tyson <hmt@cygnus.co.uk>
101 * src/if_ebsa285.c (pci_init_find_82559s): Add asserts and an
102 unconditional check that the PCI window as configured matches the
103 address and size of the pci_window region from the MLT. This is
104 here because at present the MLT and CT cannot intercommunicate
105 enough. The separation of the PCI window is needed because
106 otherwise the malloc heap will eat all memory. [This is related
107 to CR 902624-CR, "MLT needs to be configuration aware"]
109 2000-09-01 Hugo Tyson <hmt@cygnus.co.uk>
111 * OVERVIEW: This is part of the change to the network stack to
112 greatly reduce latencies both of (other) DSRs and of thread
113 scheduling. All the work that the network stack *and* individual
114 ether drivers used to do in DSRs (including alarm callbacks and
115 data copies to/from the device memory) is moved into a "fast
116 network thread" instead. It calls a device's "deliver" function
117 to do the work that was previously in the DSR. This is a separate
118 thread so that it can be set higher priority than application
119 threads in order to minimize packet loss (depending on the
120 driver), if required (the application threads presumed to be
121 higher priority in turn than the network thread). A crucial
122 consequence of this is that we are no longer locking against DSRs,
123 so a plain mutex can be used rather than the global scheduler
124 lock, thus simplifying all the splfoo/splx() style functions.
126 * src/if_ebsa285.c: Minor: fix the big assert in i82559_send()
127 which suffered a race condition when called from the fast thread
128 rather than from a DSR. Major: Add a "deliver" entry to the
129 interface record for the "fast thread" implementation of the
130 network internal comms system. Provide a pass-up DSR to the
131 logical ether driver's DSR and appropriate delivery routine(s).
132 i82559_poll() now calls i82559_deliver() rather than the DSR. Add
133 valid data for mux'd DSR to pass on up.
135 2000-09-01 Hugo Tyson <hmt@cygnus.co.uk>
137 * tests/test_net_realtime.h: Tighten up the latency requirements
138 by a factor of 5; it all seems happy, so committed.
140 2000-08-25 Hugo Tyson <hmt@cygnus.co.uk>
142 * src/if_ebsa285.c (i82559_ioctl): A little further diddling; have
143 a bool to say whether the dot3 info is filled in.
145 2000-08-24 Hugo Tyson <hmt@cygnus.co.uk>
147 * cdl/ebsa285_eth_drivers.cdl: Do not export a symbol for the
148 device info file (include/ebsa285_info.h) since nobody needs
149 (portably) to include it now.
151 * src/if_ebsa285.c (i82559_ioctl): Handle new ioctl calls
152 ETH_DRV_GET_IF_STATS_UD and ETH_DRV_GET_IF_STATS to get loads of
153 statistical information out. _UD means update. The nonUD one can
154 be used instead mostly, if we find the performance hit too large.
155 This should allow SNMP (a) to not explode, (b) to get useful info
156 out of other device implementations than this one.
158 * include/ebsa285_info.h: Remove all the macro cruft for feature
159 detecting of lots of individual statistics; we now just have a
160 catch-all struct that SNMP uses, defined in the common ether
163 2000-08-15 Hugo Tyson <hmt@cygnus.co.uk>
165 * src/if_ebsa285.c (PacketRxReady): Put back the check for very
166 small packets into the driver; the layer above checks for that
167 (defensive programming) but only *after* asserting that the size
168 is large enough, to help detect that scenario from other drivers.
169 I believe we only have struct ether_header available if CYGPKG_NET
170 but I could be wrong.
173 2000-08-08 Hugo Tyson <hmt@cygnus.co.uk>
175 * src/if_ebsa285.c (eth_set_promiscuous_mode):
176 - ccs->config_bytes[18]=0x70;
177 + ccs->config_bytes[18]=0x72; // Keep the Padding Enable bit
178 ...otherwise short frame sends don't work in promisc mode.
181 2000-08-07 Gary Thomas <gthomas@redhat.com>
183 * src/if_ebsa285.c (pciwindow_mem_alloc): Take out very noisy debug.
185 2000-08-03 Gary Thomas <gthomas@redhat.com>
187 * src/if_ebsa285.c: Changes for stand-alone mode.
189 * cdl/ebsa285_eth_drivers.cdl: Ethernet driver package hierarchy changed.
190 Add option to control number of interfaces.
192 2000-07-28 Hugo Tyson <hmt@cygnus.co.uk>
194 * src/if_ebsa285.c (PacketRxReady): Do not attempt to forward
195 short packets; eth_drv.c assumes there is at least a header there.
196 (i82559_recv): Also be more careful and ASSERTive about -ve buffer
197 sizes; be more defensive about sglists. [CASE 104206]
199 2000-07-26 Gary Thomas <gthomas@redhat.com>
201 * src/if_ebsa285.c: Update for new eth_drv interfaces.
203 2000-07-18 Hugo Tyson <hmt@cygnus.co.uk>
205 * src/if_ebsa285.c (i82559_poll): Fill in the flesh of this, it
206 just calls ISR and DSR repeatedly.
207 (i82559_start): Look in the device record for promiscuous mode
208 flag; it should be passed though the common layer, but it's not
209 [yet] - this change from Andrew Lunn/ASCOM. Also a fix and delay
210 to the promisc mode code per se.
212 2000-07-17 Hugo Tyson <hmt@cygnus.co.uk>
214 * src/if_ebsa285.c (i82559_poll): New function, just to fill in
215 the interface record; not used.
217 2000-06-27 Hugo Tyson <hmt@cygnus.co.uk>
219 * cdl/ebsa285_eth_drivers.cdl: Add sesquipedalian option
220 CYGDBG_DEVS_ETH_ARM_EBSA285_KEEP_82559_STATISTICS in (now)
221 component CYGDBG_DEVS_ETH_ARM_EBSA285_KEEP_STATISTICS to control
222 keeping (well, harvesting really) the i82559's internal stats.
223 Reputedly, it doesn't service the net whilst this is happening, so
224 it could be viewed a bad thing. Hence the option.
226 * include/ebsa285_info.h: Only describe the I82559_COUNTERS
227 i82559_counters[2]; structs if full stats are to be kept.
229 * src/if_ebsa285.c (update_statistics): Only include this if full
230 stats are to be kept.
232 2000-06-27 Hugo Tyson <hmt@cygnus.co.uk>
234 * src/if_ebsa285.c (ResetRxRing): Re-do the management of the
235 RxRing; have an end-of-list flag (EL) in the last entry, and as
236 you unload filled slots, drag it round after you.
238 2000-06-14 Hugo Tyson <hmt@cygnus.co.uk>
240 * cdl/ebsa285_eth_drivers.cdl: Add option to control statistics
243 * include/ebsa285_info.h: Act on it.
245 2000-06-13 Hugo Tyson <hmt@cygnus.co.uk>
247 * cdl/ebsa285_eth_drivers.cdl: Properly include the new header
248 file and define symbols to allow client code to get at it without
249 knowing the particular device driver name.
251 * include/ebsa285_info.h: New file: export various statistics
252 information about the driver for use by monitoring and
253 network-management systems. This requires exposing the
254 (otherwise) internal structures of the driver.
256 * src/if_ebsa285.c: remove a lot of structure definitions &c that
257 are now necessarily in the new header; add a couple of new
258 routines which provide status and update statistics from the
259 device into memory; tidy up control of whether stats-keeping is
262 2000-06-06 Hugo Tyson <hmt@cygnus.co.uk>
264 * cdl/ebsa285_eth_drivers.cdl (define_proc): Add #define of
265 CYGDAT_DEVS_ETH_DESCRIPTION in the config file for information.
267 2000-05-12 Hugo Tyson <hmt@cygnus.co.uk>
269 * tests/test_net_realtime.h (tnr_print_activity): New routine to
270 check the system is working, tidied up the API. It works!
272 2000-05-11 Hugo Tyson <hmt@cygnus.co.uk>
274 * cdl/ebsa285_eth_drivers.cdl: Added export of the test header
275 below, and config opts for controlling EEPROM writing and all the
276 status chatter as the device starts up.
278 * src/if_ebsa285.c: Reworked the code for reading and setting the
279 EEPROM that holds the MAC address. This is very ugly, but now
280 more reliable. Also tidied up printing cruft with neater
281 configury, and made it an option (for safety) whether it's
282 possible to write the EEPROM at all.
284 * tests/test_net_realtime.h: New file - it is intended to be used
285 by networking tests to verify that latency is not compromised by
286 the stack and driver. It's very platform specific, hence the
287 location in here. This is a preliminary version only.
289 2000-04-27 Hugo Tyson <hmt@cygnus.co.uk>
291 * src/if_ebsa285.c: A serious re-write. This cuts out a lot of
292 code from the old version and improves the performance greatly.
294 The cruft was mainly doing lots of explicit event communication
295 between the ISR and DSR, when in fact all the state needed is
296 present in the tx/rx rings. So both ISRs and DSRs regard their
297 call as an opportunity to progress everything they can, rather
298 than only dealing with one interrupt cause at a time; the
299 connection between them is now rather looser.
301 Interrups can now be re-enabled after the ISR (in other words they
302 are not masked in the ISR), no need to wait for the DSR, but in
303 consequence some DSR code must mask/unmask intrs as it works.
305 The 82559 appears to be a little slow in reacting to commands and
306 state changes, so some interrupts were being lost - or persisting
307 beyond their desired life - so there's some kinda polling code to
308 deal with that also. We also rely on the foreground to kind of
309 poll in the same way, in the send/can_send calls - we know the
310 stack will re-try if necessary, though this is rare.
312 The driver now works (albeit at much reduced performance) with as
313 few as 6 rx and tx buffers - in other words the "queue full/out of
314 rx buffers" states have been tested and all is well. It works
315 generally fine with 8 buffers of each kind.
317 The mux ISR and DSR are now rather more polled than the old
318 versions; we just try to do things with both devices (if active)
319 by simply calling each unitary ISR/DSR respectively.
321 I also re-ordered some of the code, moving utilities to the end of
322 the file and grouping together Tx and Rx machines a bit better.
324 2000-04-13 Hugo Tyson <hmt@cygnus.co.uk>
326 * src/if_ebsa285.c: Attribution to Ron Spence, Pacific Softworks
327 added as a contributor.
329 2000-04-07 Hugo Tyson <hmt@cygnus.co.uk>
331 * ecos.db: Re-organize device packages. This is a massive change
332 involving deleting all the sources for serial and ethernet drivers
333 from where they used to live in
334 packages/io/serial/current/src/ARCH/PLATFORM.[ch]
335 packages/net/drivers/eth/PLATFORM/current/src/...
336 and reinstating them in
337 packages/devs/serial/ARCH/PLATFORM/current/src/...
338 packages/devs/eth/ARCH/PLATFORM/current/src/...
340 All these new packages are properly defined in ecos.db, and are
341 all of type "hardware" so that a "target" can grab them.
343 This directory layout is descriptive of the devices we have right
344 now, arch and platform are separate levels just to make it easier
345 to navigate in the filesystem and similar to the HAL structure in
348 It is *not* prescriptive of future work; for example, the mythical
349 common highly-portable 16550 serial driver which works on many
350 targets would be called "devs/serial/s16550/current", or a serial
351 device for a particular board (cogent springs to mind) that can
352 work with different CPUs fitted is "devs/serial/cogent/current".
354 Changelogs have been preserved and replicated over all the new
355 packages, so that no history is lost.
357 The contents of individual source files are unchanged; they build
358 in just the same emvironment except for a very few cases where the
359 config file name changed in this movement.
361 Targets in ecos.db have been redefined to bring in all relevant
362 hardware packages including net and serial drivers (but the newly
363 included packages are only active if their desired parent is
366 The names of CDL options (and their #defines of course) stay the
367 same for the serial drivers, for backward compatibility.
369 * templates/*/current.ect: these have had CYGPKG_IO_SERIAL added
370 rather than it being in (almost) all target definitions.
372 2000-03-29 Hugo Tyson <hmt@cygnus.co.uk>
374 * src/if_ebsa285.c (i82559_recv): Be happy with NULLs in the
375 SGlist; it means the caller is out of memory so drop the packet on
376 the floor. Also remove a completely redundant test.
378 2000-03-06 Hugo Tyson <hmt@cygnus.co.uk>
380 * src/if_ebsa285.c (i82559_can_send): Update net driver to new
381 interface style. This is incomplete wrt promiscuous mode, but
382 that's probably about all.
384 2000-02-14 Gary Thomas <gthomas@cygnus.co.uk>
386 * cdl/ebsa285_eth_drivers.cdl: Update CDL to indicate multiple
389 2000-02-14 Hugo Tyson <hmt@cygnus.co.uk>
391 * src/if_ebsa285.c (pci_init_find_82559s): Tidy comments somewhat
392 and set debug and stats collecting defines to most friendly
395 2000-02-10 Hugo Tyson <hmt@cygnus.co.uk>
397 * src/if_ebsa285.c (PacketRxReady): Fix bug; current descriptor
398 was not being write back for the callback to use. Hence asserts
399 on state of rfd were firing in busy times - that leading rfd had
400 already been drained.
402 Also rationalized meaning of DEBUG printy symbols a bit - it's now
403 chatty during startup/foreground manipulations but not in any
404 performance related activities ie. rx or tx.
406 2000-02-09 John Dallaway <jld@cygnus.co.uk>
408 * cdl/ebsa285_eth_drivers.cdl:
410 Reparent under CYGPKG_NET_ETH_DRIVERS and tidy display strings.
412 2000-02-08 Hugo Tyson <hmt@cygnus.co.uk>
414 * src/if_ebsa285.c: New File.
415 * cdl/ebsa285_eth_drivers.cdl: New File.
417 Initial Checkin of EBSA285 Ethernet driver.
419 It's one monolithic file at present, and should be split up into a
420 more generic Intel 82559 driver plus platform-specific parts (PCI
421 et al) plus eCos/Red-Hat-BSD-stack parts.
423 //===========================================================================
424 //####ECOSGPLCOPYRIGHTBEGIN####
425 // -------------------------------------------
426 // This file is part of eCos, the Embedded Configurable Operating System.
427 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
429 // eCos is free software; you can redistribute it and/or modify it under
430 // the terms of the GNU General Public License as published by the Free
431 // Software Foundation; either version 2 or (at your option) any later version.
433 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
434 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
435 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
438 // You should have received a copy of the GNU General Public License along
439 // with eCos; if not, write to the Free Software Foundation, Inc.,
440 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
442 // As a special exception, if other files instantiate templates or use macros
443 // or inline functions from this file, or you compile this file and link it
444 // with other works to produce a work based on this file, this file does not
445 // by itself cause the resulting work to be covered by the GNU General Public
446 // License. However the source code for this file must still be made available
447 // in accordance with section (3) of the GNU General Public License.
449 // This exception does not invalidate any other reasons why a work based on
450 // this file might be covered by the GNU General Public License.
452 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
453 // at http://sources.redhat.com/ecos/ecos-license/
454 // -------------------------------------------
455 //####ECOSGPLCOPYRIGHTEND####
456 //===========================================================================