Commit Graph

24 Commits

Author SHA1 Message Date
blymn a88dd3436a Clean up bogus whitespace 2006-05-26 12:52:45 +00:00
pavel dbbc553deb Disable hw VLAN tagging, in a similar way that it was done in OpenBSD
(src/sys/dev/ic/re.c rev. 1.15). The disabled VLAN stripping is mine.
(The OpenBSD driver forgot to do this.)

The reason is that untagged packets get sometimes tagged incorrectly.
PR 32643.

Approved by martin@.
2006-05-16 22:39:24 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt d01f5b39f6 specify dma direction hints for bus_dmamap_load_mbuf. 2005-07-11 21:42:58 +00:00
briggs 947685c48e BUS_DMASYNC_* routines are from the point of view of the memory controller,
so BUS_DMASYNC_POSTREAD should follow a device->memory transfer (like for
the rx packet data.
Also, it would be good to do a BUS_DMASYNC_PREWRITE to ensure that packet
data is flushed to memory before the chip tries to transmit data.
Tested on a PowerPC system.
2005-05-19 20:11:24 +00:00
yamt f3bf234dc9 disable IFCAP_CSUM_IPv4_Tx and comment why. 2005-05-15 07:48:49 +00:00
yamt 330cc0a11e split IFCAP_CSUM_xxx to IFCAP_CSUM_xxx_Rx and IFCAP_CSUM_xxx_Tx. 2005-05-02 15:34:31 +00:00
yamt e53142951c - use IFQ_POLL/DEQUEUE rather than IF_DEQUEUE/PREPEND.
- handle tx queue full correctly.
2005-03-30 11:38:06 +00:00
yamt d1238feea1 re_encap: set RTK_TDESC_CMD_IPCSUM if any of checksum offloading is requested.
otherwise, RTK_TDESC_CMD_TCPCSUM/UDPCSUM don't seem to make any effect.
2005-03-29 09:52:31 +00:00
yamt e012617b1e - restructure tx descriptor handling code to decouple
number of tx descriptors, number of rx descriptors, and number of mbufs.
- bump number of tx descriptors for rtl8169.  64 doesn't seem to be sufficient
  when doing TSO.
2005-03-23 20:23:08 +00:00
yamt 42f5578ac9 move the code to drop packets in the previous version
from re_encap to re_start so that other rtk_tx_free checks are
also covered.
2005-03-14 10:08:17 +00:00
yamt 5ef6b21b78 re(4) driver:
- TSO support.
- fix some error handling.
- remove mysterious RTK_NTXSEGS and use more appropriate values
  for bus_dmamap_create.
- if we need more than all of our tx descriptors in order to transmit a packet,
  just drop it rather than retrying infinitely.
2005-03-12 08:01:51 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
yamt 779901b125 re_init: correct usage of bus_dma(9).
now re@pci works on my alpha, in the case of !RE_USEIOSPACE.
2005-02-23 09:20:46 +00:00
yamt c51fcf7423 remove unused macros. 2005-02-23 09:19:38 +00:00
jdolecek 2a0d290c56 use VLAN_* macros for VLAN tag extraction/addition 2005-02-20 15:56:03 +00:00
jdolecek 4737695e07 don't call re_rxeof a second time when we've already done the work
pull common code out from if and else clauses

from FreeBSD if_re.c rev. 1.33
2005-02-13 16:04:18 +00:00
jdolecek ac81d6249a g/c debug printf 2005-02-13 15:43:33 +00:00
kanaoka 3e734f8e90 - Move re_diag() from bus independend code to PCI attachment code.
XXX: I tested cardbus device,but not PCI device.
2005-01-13 14:24:24 +00:00
kanaoka dcccc9d794 sys/dev/ic/rtl8169.c:
- re_attach(): Use bus_dma* directly instead of calling re_alloc().
 - re_attach(): Free bus_dma* resources if attach fails.
 - re_detach(): Free bus_dma* resources.
 - re_newbuf(): Remove unnecessary error check.

sys/dev/ic/rtl81x9reg.h:
 - Define RTK_NTXSEGS.

sys/dev/ic/rtl81x9var.h:
 - Add new members to struct rtk_list_data for bus_dma*.
2005-01-09 12:25:25 +00:00
kanaoka 6488f7bcc4 - Use aprint_*.
- Remove unnecesarry code.
 - Changes some cosmetic.
2005-01-09 12:15:36 +00:00
kanaoka 9c2bc06a94 - Use ether_ioctl().
- Remove unnecessary re_init() in re_attach().
 - Remove notyet compile option.
2004-12-26 07:27:41 +00:00
kanaoka 38f5c9155e - Sync if_re.c(rev=1.6).
When adding/deleting multicast addresses, only whack the address
    filter if the interface is marked RUNNING.

    Fixes kern/27678.
2004-12-26 06:48:13 +00:00
jonathan 9d44c4d9b1 Snapshot of incomplete-but-working split of re(4) driver into a
bus-independent backend, with PCI and CardBus attachment code.
The committed code has two serious bugs:

1. The driver makes no attempt to recover resources when a (Cardbus)
instance is removed; bus resources are leaked.

2. In testing with a NetGear GA-511, the Cardbus card never responded
   to a reset/wakeup if the card is powered down after attachment.
   So for now, leave cardbus instances powered up at attachment
   (insertion, or at boot if a card is already present).

That aside, it acutally works on my GA-511. Committed as-is despite
the bugs, after repeated requests to make the code available for
further testing.  Also requires sys/dev/mii/miidevs rev 1.54 -> 1.55,
and consequent regen of miidevs{,_data}.h.
2004-12-23 06:26:30 +00:00