Commit Graph

1271 Commits

Author SHA1 Message Date
mjacob
888adf2a33 put things in place for jumbograms 2000-01-25 06:09:53 +00:00
mjacob
8cd8c3184d define jumbo packet size 2000-01-25 04:11:33 +00:00
wpaul
d46e1313de Add support for DM9102A boards with Davicom DM9801 HomePNA PHYs. 2000-01-24 17:19:37 +00:00
peter
fb5d4fa843 Fix some warnings. 2000-01-23 19:27:11 +00:00
groudier
69d6cb63b3 Add 53C895A and 53C1510D device description to the ncr chip table. 2000-01-23 12:27:49 +00:00
mjacob
f014209ceb Correctly put the place to mark EOP where we actually do the packet
transmission- this handles the odd and rare case of a list terminating
with a zero length mbuf.
2000-01-23 03:19:49 +00:00
mjacob
a441dee903 add PREVIOUS index macro for transmit side 2000-01-23 03:18:14 +00:00
mjacob
adb19118c1 Remove some debugging code, replace one line that had spaces with tabs,
and fix a silly botch for reinit.
2000-01-23 02:07:31 +00:00
mjacob
6bf9d8db26 Get rid of the WX_XMIT_SMALL code- we've fixed that problem. Restructure
the receive code so that it correctly chains receive descriptors together
and handles the case that only a part of a packet is done at the time
we get here.
2000-01-23 01:49:11 +00:00
mjacob
2611eb5bc0 Add a pointer in the softc that will point to partially received packet.
Set up index increments for receive descriptors based on whether
the PADDED_CELL define is set.
2000-01-23 01:41:17 +00:00
mjacob
06afe28009 Add in a define for the optimal cache line size. 2000-01-23 01:39:13 +00:00
n_hibma
154c09625c Add ID for the AMD-756 OHCI controller 2000-01-21 10:46:29 +00:00
n_hibma
1b6a1333f6 Properly remove interrupts if initialisation fails. 2000-01-20 21:36:07 +00:00
wpaul
28f55e3f8e Add support for the Davicom DM9102A 10/100 ethernet controller chip.
This is just to make sure we initialize the chip correctly: we need to
make the sure the port select bit in CSR6 is set properly so that we
use the internal PHY for 10/100 support. (The eval boards I have also
include an external HomePNA PHY, but I need to play with that more
before I can support it.)
2000-01-19 19:03:08 +00:00
mjacob
7d5f58b26b add a R_PREV_IDX macro 2000-01-18 01:42:11 +00:00
wpaul
688f4a7de6 Add the vendor/device ID for the Farallon PN9000SX gigabit ethernet
card, which is apparently also a Tigon 2 device.
2000-01-18 00:26:29 +00:00
wpaul
ec7f49f3ff Fix the tl driver so it doesn't run off the end of the RX descriptor list
and panic in out of mbufs condition.
2000-01-15 20:14:49 +00:00
mjacob
6f78cf499f Remove compile warning not seen when compiling with target mode enabled. 2000-01-15 07:06:44 +00:00
mjacob
af62fb2de8 Redo FC target mode dma routine to try and generate an extra CTIO
in the not so odd case of Moving Data *AND* Sending Status in last CTIO *AND*
status is a CHECK CONDITION *AND* we have Sense Data to send.
2000-01-15 01:54:36 +00:00
peter
2d989cd686 Pre 4.0 tidy up.
Collect together the components of several drivers and export eisa from
the i386-only area (It's not, it's on some alphas too).  The code hasn't
been updated to work on the Alpha yet, but that can come later.

Repository copies were done a while ago.
Moving these now keeps them in consistant place across the 4.x series
as the newbusification progresses.

Submitted by:   mdodd
2000-01-14 07:14:17 +00:00
gibbs
85f2a7df4d The error status for a scsi status error is "CAM_SCSI_STATUS_ERROR", not 0. 2000-01-14 03:39:30 +00:00
peter
a043326187 Remove duplicate DEC 21050 PCI-PCI bridge (0x00011011)
Add an entry for the Toshiba Fast Infra Red controller (0x07011179)
2000-01-13 08:40:10 +00:00
mdodd
eac0845d00 Add a few devices IDs and clarify the SiS 85c496 entry. 2000-01-13 08:01:53 +00:00
gallatin
137da2d54c add entries for several DEC PCI-PCI bridges & the Cypress PCI-ISA bridge found
on newer alpha workstations and servers
2000-01-13 02:47:36 +00:00
wpaul
63989277ed Reintroduce the dc_coal() workaround routine for coalescing outbound
packets into a single buffer, and set the DC_TX_COALESCE flag for the
Davicom DM9102 chip. I thought I had escaped this problem, but... This
chip appears to silently corrupt or discard transmitted frames when
using scatter/gather DMA (i.e. DMAing each packet fragment in place
with a separate descriptor). The only way to insure reliable transmission
is to coalesce transmitted packets into a single cluster buffer. (There
may also be an alignment constraint here, but mbuf cluster buffers are
naturally aligned on 2K boundaries, which seems to be good enough.)

The DM9102 driver for Linux written by Davicom also uses this workaround.
Unfortunately, the Davicom datasheet has no errata section describing
this or any other apparently known defect.

Problem noted by: allan_chou@davicom.com.tw
2000-01-12 22:24:05 +00:00
yokota
847df92358 Added PCIR_BIOS (0x30). 2000-01-10 12:53:19 +00:00
gibbs
51864d8e1b Avoid setting DPARCKEN until I can figure out why it causes
spurious parity errors on some controllers.
2000-01-10 01:47:51 +00:00
wpaul
fe42017b7b Close PR# 15986: issue an RX reset command when initializing the interface,
but only for those cards that don't use miibus (i.e. all the 10mbps only
cards, and the 100baseFX card).

PR:	kern/15986
2000-01-09 21:12:59 +00:00
peter
b97e110402 Show the port/mem/irq of pci devices too. 2000-01-08 10:12:21 +00:00
peter
90bf0e38dd Clean up the cfgmech/pci_mechanism debris. The reason for the existance
of this is no longer an issue as we have a replacement driver for the
one that needed it.

Reviewed by:	dfr
2000-01-08 08:31:24 +00:00
gibbs
f3c1b82030 Turn on parity error reporting before configuring external sram. This
makes it a little easier to notice that parity checking an 8bit sram
isn't working.

Turn on scb and internal data-path parity checking for all pci chips types.
We were only doing this for ultra2 chips.

After clearing the parity interrupt status, clear the BRKADRINT.  This
avoids seeing a bogus BRKADRINT interrupt after external SCB probing
once normal interrupts are enabled.
2000-01-08 05:31:38 +00:00
gibbs
a5d1c76214 Really enable external SCB ram on Ultra2 capable controllers.
Don't even bother to look for SCB ram on controllers < aic7870.

Clear any parity errors generated by looking at external SCB ram.
2000-01-08 00:32:08 +00:00
gibbs
c4d753bffc Add detection logic for the U160 family of adaptec controllers. These
controllers will run at U2 speeds until I can complete the U160 support
for this driver.

Correct a termination buglet for the 2940UW-Pro.

Be more paranoid in how we probe and enable external ram, fast external
ram timing and external ram parity checking.  We should now work on
20ns and 8bit SRAM parts.

Perform initial setup for the DT feature on cards that support it.

Factorize and clean up code.  Use tables where it makes sense, etc.

Add some delays in dealing with the board control logic.  I've never
seen this code fail, but with the ever increasing speed of processors,
its better to insert deterministic delays just to be safe.  This stuff
is only touched during probe and attach, so the extra delay is of no
concern.
2000-01-07 22:53:37 +00:00
billf
1b5e112711 Fix paste-o in NeoMagic audio probe.
Submitted by:	cg
2000-01-07 06:59:10 +00:00
peter
4ca3fc6662 Zap pci_map_dense() and pci_map_bwx() - they were for compatability but
are not used.  All the drivers that use memory mapped IO on the Alpha have
been ported already.
2000-01-05 16:40:10 +00:00
mjacob
181d5e327d Add first pass of the Intel Gigabit Ethernet (wiseman) driver. This
driver seems relatively functional, but could use some souping up,
particularly in the performance area. This has both NetBSD and FreeBSD
attachment code and a fair amount of effort has been put into making
it easy to port to different *BSD platforms.

The basic design is a one tfd per mbuf transmit (with no transmit
related interrupts- tfds are gc'd as needed). The receive ring
uses a 2K buffer per rfd with a +2 byte adjust for the ethernet
header (so the payload is aligned). There's support that *almost*
works for doing large packets- the rfd chaining code works, but there's
some problem with getting good checksums at the IP reassembly level
(ditto for doing short tfd's too).

The chip has support for TCP checksums insertion for transmit and
TCP checksum calculation on receive (for both you have to do some
appropriate backoff && twiddling), but this isn't in place.

This is nearly entirely reverse engineered from the released Intel
driver, so there's a lot of "We have to do this but do not know why"
stuff. There is somebody who has the chip specs who works in FreeBSD
but they're being a bit standoffish about even sharing hints which
is somewhat annoying. It's also apparent that all I had to work with
were the first rev boards.

This driver has been lightly tested on intel && alpha, but only
point-to-point. There may be some issues with switches- use of
boot time environment variables that override EEPROM settings
(e.g., 'set wx_ilos=1' which inverts the sense of optical signal
loss) may help with this.

I had this out for review for three weeks, and nobody said anything
negative or positive, ergo, this checkin has no 'reviewed by' field
which I would have preferred.
2000-01-04 11:12:42 +00:00
mjacob
8928ecdac1 Add in an isp_tdebug environment variable. Clean up some debugging
printouts for clarity.
2000-01-04 03:41:40 +00:00
mjacob
c4a59d8a77 Support target mode operations. This involves having some variant
dma mapping callback routines to select from as target mode
entries are handled a fair bit differently from normal initiator
mode entries.
2000-01-03 23:50:13 +00:00
wpaul
2ef650c9f4 It appears that under certain circumstances that I still can't quite pin
down, the dc driver and receiver can fall out of sync with one another,
resulting in a condition where the chip continues to receive packets
but the driver never notices. Normally, the receive handler checks each
descriptor starting from the current producer index to see if the chip
has relinquished ownership, indicating that a packet has been received.
The driver hands the packet off to ether_input() and then prepares the
descriptor to receive another frame before moving on to the next
descriptor in the ring. But sometimes, the chip appears to skip a
descriptor. This leaves the driver testing the status word in a descriptor
that never gets updated. The driver still gets "RX done" interrupts but
never advances further into the RX ring, until the ring fills up and the
chip interrupts again to signal an error condition. Sometimes, the
driver will remain in this desynchronized state, resulting in spotty
performance until the interface is reset.

Fortunately, it's fairly simple to detect this condition: if we call
the rxeof routine but the number of received packets doesn't increase,
we suspect that there could be a problem. In this case, we call a new
routine called dc_rx_resync(), which scans ahead in the RX ring to see
if there's a frame waiting for us somewhere beyond that the driver thinks
is the current producer index. If it finds one, it bumps up the index
and calls the rxeof handler again to snarf up the packet and bring the
driver back in sync with the chip. (It may actually do this several times
in the event that there's more than one "hole" in the ring.)

So far the only card supported by if_dc which has exhibited this problem
is a LinkSys LNE100TX v2.0 (82c115 PNIC II), and it only seems to happen
on one particular system, however the fix is general enough and has low
enough overhead that we may as well apply it for all supported chipsets.
I also implemented the same fix for the 3Com xl driver, which is apparently
vulnerable to the same problem.

Problem originally noted and patch tested by: Matt Dillon
2000-01-03 15:28:47 +00:00
billf
8e08fd80fe Update NeoMagic entries.
Obtained from:	NetBSD's pcidevs and billf's Dell laptop.
2000-01-03 10:04:01 +00:00
billf
e1e333fdf6 Fill in the blanks for some of the Texas Instruments cardbus controllers.
Obtained from:	NetBSD (syssrc/sys/dev/pci/pcidevs)
1999-12-31 07:22:24 +00:00
billf
801480af69 Copy Texas Instruments cardbus controllers from pcisupport.c, the pcisupport.c
probes are at the 'chip' level and will get overridden by pcic_p if it is
compiled in. It's still nice to get the better probe message if it's not...

Requested by:	imp
1999-12-29 13:33:37 +00:00
billf
50db8574dd Add the Texas Instruments PCI14xx pccard/cardbus controllers device ids. 1999-12-29 05:33:57 +00:00
peter
d53e4c1d80 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 05:07:58 +00:00
billf
01077d3d3d Add the Id for the NeoMagic 256ZX, the display from which I'm seeing this.. 1999-12-29 02:47:02 +00:00
billf
cbc12a3b7e Fix a small typo in the comments. 1999-12-28 06:04:29 +00:00
bde
e6f832ef05 Removed unnecessary const poisoning (redundant casting) which was added
in rev.1.4.
1999-12-24 15:16:10 +00:00
wpaul
c517a960f8 Fix problem reported by Matt Dillon. Occasionally, very small received
frames would be handled incorrectly due to bad usage of m_pullup() in
the case where the frame wraps from the end of the receive buffer back
the beginning.

Also, when manually extending small packets to pad them to the minimum
frame length during transmission, zero out the pad area to make some
really paranoid people happy.
1999-12-23 19:05:58 +00:00
eivind
72a7cdeb33 Add #ifdef notyet around uncalled code that is later going to become DDB
commands.

Discussed with:	phk (driver author)
1999-12-21 18:11:48 +00:00
eivind
8befc1a2b8 Change incorrect NULLs to 0s 1999-12-21 11:14:12 +00:00