forgets to convert them from the host to the network byte order. Use
bswap16 to convert them. (Not htons, because on a big-endian machine, they
are in the correct byte order initially, but then, they are byte-swapped
by a htole32 call when written to the transmit descriptor. So
byte-swapping is needed in this case too, to compensate for this htole32
call.)
For a similar reason, tags were seen byte-swapped when received on a
big-endian machine. Replace ntohs by bswap16 in the input path too.
(Again, it is needed to compensate for a le32toh call when the receive
descriptor is read.)
Fixes PR 32644.
Tested on 3.0/i386, 3.0/sgimips and current/alpha.
OK by martin@.
SIOCSIFFLAGS: it compares the new flags with the old flags and avoids
reset if there are only certain changes. This was done to fix PR 29126.
It does not take into account, though, that there is other state which
can change and SIOCSIFFLAGS is called to inform about it. Namely,
if_capenable, ec_capenable and ec_nvlans. For all three, the _init
method must program the hardware specially. Not doing it resulted in:
- VLAN frames getting truncated
- hw checksumming not working
- outgoing VLAN frames not being tagged when they should
- incoming VLAN frames being treated as untagged.
Fix by keeping all the old state in the softc and initializing the
hardware if any of it changes.
Tested on gsip. Also tested by Nino Dehne and Martin J. Laubach
on sip, thanks.
Fixes PRs 32900 and 33216.
Approved by martin@ .
1. ifdef out the restriction that the SiS 900 has only one PHY
This is demonstrably false; the SiS 960 super south bridge in
PR 18590 has a SiS 900 rev 1 core in it.
2. bitbang the MII for all versions of the SiS 900; this is the
only way that the PHYs on this system answer.
Also, I suspect that SIS900_REV_960 constant in if_sipreg.h is
incorrectly labelled - there were later revisions of the super
south bridge (e.g. the 961, 962, and 963), and I suspect the
SiS 900 revision code there refers to one of those.
- Fix jumbo frame support.
- Disable interrupts at the chip in sip_intr().
- Disable checksum offloading if MTU > 8109 - the hardware is broken
in this case.
- Use the interrupt hold-off timer.
- Correct the Tx FIFO size.
- Add Pause Control/Status register definitions.
o Add support for the recent SiS96x chipsets that have a new revision.
That includes a new bit of code to access the EEPROM, since it is
shared with the ieee1394 controller on those chipsets.
Mostly taken from FreeBSD (rev. 1.62 and 1.64 of sys/pci/if_sip.c). I
tried to make the code look less ugly, but couldn't invent documentation.
Fix PR #23481. Thanks to Stephane ENGEL <sengel AT melshake DOT com> for
the report and the cheerful testing.
revisions have, as discussed on the soekris-tech mailing list a
while ago, whereby one can experience excessive recieve erros when
using < 30m cables. The patch detects overflow in a DSP filter
parameter, and corrects it by writing a known good value.
so that PHY instance is not siginificant in ifmedia_match(). This
is done to support multiple PHYs on the MII. Without this change,
ifmedia_set() would panic the system when no PHYs were matched.
I ran into this on an AMD EasyNow PC, which is built around SiS
system chips with an embedded SiS 900 core, and an external AMD
Am79c901 PHY, which presents two PHYs on the MII: one for HomePNA,
and one for standard 10base-T. The 10base-T PHY ends up with instance
number 1...
quirk table.
* We want to hardwire BMSR_EXTSTAT, not BMSR_EXTCAP, when reading
the TBI BMSR.
* Fetch the GPIO bits from the GPIOR register after an auto-load,
rather than reading from the EEPROM directly.