Commit Graph

19 Commits

Author SHA1 Message Date
jonathan 4fdff0ed65 * Add ep_complete_cmd() function, to issue commands that perform a reset
(RX_RESET, TX_RESET, GLOBAL_RESET).
  Commands issued while a reset is in progress may be dropped. The driver
  must wait until resets are complete; ep_complete_cmd() does so.
* Change RX_RESET,  TX_RESET, GLOBAL_RESET to use ep_complete_cmd().

* Revert epconfig() to use inline RX_RESET, TX_RESET.
  That avoids accidentally setting IFF_UP, which  breaks both diskless boot,
  and "halt" commands issued before the interface is brought up.
1997-02-16 04:09:18 +00:00
jonathan 9821b30fe4 Use DELAY() after doing a TX_RESET or RX_RESET command.
Newer boards (e.g., Vortex) take  time to reset, and wedge on some machines.
Polling on S_COMMAND_IN_PROGRESS would be better, but that doesn't
work with xx_RESET commands on 3c509s.
1996-12-31 21:36:30 +00:00
jonathan 259ce9f178 * make sure 100mbit media-present bits don't collied with 3c509
CONFIG_CNTRL bits by making the "conn" argument to epconfig()
   a u_int, not a u_int16_t, and by defining 100mbit media
   bits in the upper 16 bits.

A redesigned interface that fixes this properly is in the pipeline.
1996-12-30 19:18:28 +00:00
jonathan b00ac4cf2c * add epshutdown(), and establish as shutdown hook: see multiboot
comments in pr port-i386/2358: "if_ep/3C590 no longer working"
* Only call Vortex media-config code on PCI-attached devices, until
  we know if it works on ISA and EISA large-packet devices also.
* Fix typo in printf of MAC address
1996-12-29 17:01:58 +00:00
jonathan 23c1d14c64 * Add 100Mbit xcvr flags to epconfig():
look for 100mbit Xcvrs, print their names, add to ep_connectors.

* Print 10baseT as 10baseT, since media name (utp) is no longer a unique
  transceiver type.

* Redo FIFO memory size printing, also show Tx/Rx split (xxx isa 3c509?).

* Print MAC address on a separate line,  with 100Mbit media and fifo-ram
  info it no longer fits on the same line as media types.

* Comment the fact that the "connection" media-selection code just doesn't
  grok 100Mbit media.

* add code to look for 3c59x/3c90x media-select and autoconfig bits, though
  we don't yet dynamically probe media when the autoconfig bit is set
  (see previous bullet).

* XXX the whole connector/media code should be redone, perhaps a' la
  the BSDI ifmedia design.
1996-12-29 13:32:46 +00:00
cjs b1e0c7d657 Print the memory size on startup.
Add newline to `Interface disabled' printf and clean up formatting.
Change packet read/write code to align all reads and writes into
memory to an appropriate boundary for the I/O size. This also fixes
a bug where the trailing unaligned bytes (1-3 of them) would be
put in an additional mbuf even if there was enough space for them
in the one we were currently filling.
This has been tested on a 3c905 in an Alpha (32-bit I/O, alignment
required), a 3c905 in an i386 (32-bit I/O, alignment not required)
and a 3c509 in an i386 (16-bit I/O, alignment not required). It
should be tested on a 3c509 in an Alpha with an ISA bus, if somone
can manage to get the two items together.
There are still some bugs in the driver relating to initialisation;
on my Alpha with a 3c905 you need to do an `ifconfig ep0 down;
ifconfig ep0 up' after the initial ifconfig to make it start working.
Apparently there are also some problems with a 3c579 in an i386,
although a 3c905 in an i386 works just fine.
1996-12-07 08:33:07 +00:00
jonathan f6a82ef733 * 3c509s drop the low-oder bits of EP_THRESH_DISABLE (2047) on a write,
and the result reads back as zero.  Mask probe code accordingly.
1996-11-22 04:48:26 +00:00
jonathan 16d760f318 Fix for hanging 3com ``large packet'' (100Mbit) Etherlink-III devices:
* Add a slot in the softc, ep_pktlenshift, to indicate that
    a board implements ``large packets'' (FDDI-sized frames) and
    therefore implicitly shifts the argument to packet-length commands
    by two bits to fit a 13-bit length in  an 11-bit command argument field.

 *  Change  the reset of station-mask filterto be independent of bus-type
    (e.g.,. for 3c515)

 * Replace  the "2044" constant used to disable TX threshold interrupts
   on 3c509-generation cards with a #define. Use 2047 instead,
   since that works on the large-packet cards (Vortex, Demon, Boomerang)
   and 2044 doesn't.

 *  Add code to  epconfing to probe for large-packet support,
    set the softc appropriately, and  shift packet sizes in commands
    by ep_pktlenshift to compensate  for the implicit shift.

 *  Tweak the epconfig() code to avoid hanging on startup.
    Set the Tx threshold to interrupt when there's space for
    a maximal-sized ether frame, then  do epinit() then epstop(),
    instead of just the Tx and Rx reset. Required on at least a 3c595.

Tested on  a 3c595, but not on 3c509-generation hardware.
1996-11-17 23:58:29 +00:00
thorpej 16c4c5af26 New bus.h implementation/interface:
- No more distinction between i/o-mapped and memory-mapped
	  devices.  It's all "bus space" now, and space tags
	  differentiate the space with finer grain than the
	  bus chipset tag.
	- Add memory barrier methods.
	- Implement space alloc/free methods.
	- Implement region read/write methods (like memcpy to/from
	  bus space).
This interface provides a better abstraction for dealing with
machine-independent chipset drivers.
1996-10-21 22:24:37 +00:00
christos 86373f8cf9 backout kprintf changes 1996-10-13 01:37:04 +00:00
christos 4c14cd79b2 - printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:18:34 +00:00
christos 26699175a4 Apply PR/2661 [from Jonathan Stone] 1996-09-29 11:19:42 +00:00
thorpej 5dc3777c41 Be more careful with types, and pull in <machine/intr.h> 1996-05-14 22:22:05 +00:00
thorpej f004654691 Update Herb's e-mail address; beer.org feels a lot more friendly. 1996-05-10 05:27:53 +00:00
thorpej 300992c9ba Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
1996-05-07 01:43:13 +00:00
christos a16dd8b648 Move epstop prototype to the header file. 1996-05-03 19:08:47 +00:00
christos bd397af7ad - include <sys/systm.h>
- fix prototype of epmbuffill()
- fix typo of epxstat -> eptxstat
1996-05-03 17:44:59 +00:00
thorpej 0b637e93a8 Convert the Etherlink III (ep) driver to use <machine/bus.h>. 1996-04-30 22:29:56 +00:00
thorpej aff40e2a72 Break up the ep driver into isa, eisa, and pci front-ends and a
bus-independent core driver.  Tested on all three bus types, including
an isa 3c509 masquerading as an eisa device (use ep* at eisa? slot ? in
your kernel config file to catch this one).
XXX Driver still needs to be converted to <machine/bus.h>
1996-04-25 02:15:42 +00:00