| Summary: | Chipset SiS735 / NIC SiS 900 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Jon Lido <jlido> | ||||
| Component: | kern | Assignee: | Martin Blapp <mbr> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 4.4-RELEASE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Jon Lido
2001-09-26 04:20:01 UTC
Hi guys, I bought the same motherboard (ECS K7S5A) last week, and I met the same trouble with FreeBSD 4.4-stable cvsuped last wednesday. It seems that PHY doesn't exists at phy=0 but phy=1 on MIIBUS. So I commented out the some sentences in function sis_miibus_readreg() in sys/pci/if_sis.c. (see below patch) With this change, I can use my on-board ethernet interface. --- dmesg --- sis0: <SiS 900 10/100BaseTX> port 0xd400-0xd4ff mem 0xcffdd000-0xcffddfff irq 5 at device 3.0 on pci0 sis0: Ethernet address: 00:d0:09:ea:04:43 miibus0: <MII bus> on sis0 ukphy0: <Generic IEEE 802.3u media interface> on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto --- --- ifconfig --- sis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet xxx.xxx.xxx.xxx netmask 0xffffff00 broadcast xxx.xxx.xxx.xxx inet6 fe80::2d0:9ff:feea:443%sis0 prefixlen 64 scopeid 0x1 ether 00:d0:09:ea:04:43 media: Ethernet autoselect (100baseTX <full-duplex>) status: active --- I don't know why it is restricted only phy=0. So this change will cause a problem on the other machine which has SiS900. And I'm not sure the symbol name "SIS_REV_735" is apropriate. -- This is my STYLE. SUZUKI Koichi Index: if_sis.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_sis.c,v retrieving revision 1.13.4.7 diff -u -r1.13.4.7 if_sis.c --- if_sis.c 21 Feb 2001 22:17:51 -0000 1.13.4.7 +++ if_sis.c 27 Nov 2001 23:03:04 -0000 @@ -459,8 +459,10 @@ return(val); } +#if 0 if (sc->sis_type == SIS_TYPE_900 && phy != 0) return(0); +#endif CSR_WRITE_4(sc, SIS_PHYCTL, (phy << 11) | (reg << 6) | SIS_PHYOP_READ); SIS_SETBIT(sc, SIS_PHYCTL, SIS_PHYCTL_ACCESS); @@ -879,7 +881,8 @@ command = pci_read_config(dev, PCIR_REVID, 1); if (command == SIS_REV_630S || command == SIS_REV_630E || - command == SIS_REV_630EA1) + command == SIS_REV_630EA1 || + command == SIS_REV_735) sis_read_cmos(sc, dev, (caddr_t)&eaddr, 0x9, 6); else #endif Index: if_sisreg.h =================================================================== RCS file: /home/ncvs/src/sys/pci/if_sisreg.h,v retrieving revision 1.1.4.3 diff -u -r1.1.4.3 if_sisreg.h --- if_sisreg.h 21 Feb 2001 22:17:51 -0000 1.1.4.3 +++ if_sisreg.h 27 Nov 2001 16:42:07 -0000 @@ -366,6 +366,7 @@ #define SIS_REV_630E 0x0081 #define SIS_REV_630S 0x0082 #define SIS_REV_630EA1 0x0083 +#define SIS_REV_735 0x0090 /* * NatSemi vendor ID 1234567890123456789012345678901234567890123456789012345678901234567890
I tried Suzuki Koichi's patches with mixed results. Basically it seems
that while his patches might work for 100BaseTX, they do not work for
10BaseT.
My dmesg results are the same as his:
--- dmesg ---
sis0: <SiS 900 10/100BaseTX> port 0xdc00-0xdcff mem
0xcfffd000-0xcfffdfff irq 10 at device 3.0 on pci0
sis0: Ethernet address: 00:d0:09:f4:7b:cf
miibus0: <MII bus> on sis0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
---
However, here are the results when trying to use ifconfig:
ifconfig sis0 inet 10.10.10.3 netmask 255.255.255.0
sis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 10.10.10.3 netmask 0xffffff00 broadcast 10.10.10.255
inet6 fe80::2d0:9ff:fef4:7bcf%sis0 prefixlen 64 scopeid 0x1
ether 00:d0:09:f4:7b:cf
media: Ethernet autoselect (none)
status: active
It appears that while it does not recognize the media type, it does
see a carrier.
I tried explicitly specifying 10BaseT (which is what my LAN uses):
ifconfig sis0 inet 10.10.10.3 netmask 255.255.255.0 media 10BaseT/UTP
sis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 10.10.10.3 netmask 0xffffff00 broadcast 10.10.10.255
inet6 fe80::2d0:9ff:fef4:7bcf%sis0 prefixlen 64 scopeid 0x1
ether 00:d0:09:f4:7b:cf
media: Ethernet 10baseT/UTP (none)
status: active
Still no luck. Then I tried something bizzare. I have a RealTek 8139
10/100BaseTX NIC in the same computer, so I tried hooking up a
crossover cable between the two interfaces. I wanted to see if it
would recognize 100BaseTX. Sure enough:
ifconfig sis0 inet 10.10.10.3 netmask 255.255.255.0
ifconfig rl0 inet 10.10.10.4 netmask 255.255.255.0
sis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 10.10.10.3 netmask 0xffffff00 broadcast 10.10.10.255
inet6 fe80::2d0:9ff:fef4:7bcf%sis0 prefixlen 64 scopeid 0x1
ether 00:d0:09:f4:7b:cf
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 10.10.10.4 netmask 0xffffff00 broadcast 10.10.10.255
inet6 fe80::24f:4eff:fe04:3b35%rl0 prefixlen 64 scopeid 0x2
ether 00:4f:4e:04:3b:35
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
I hope this helps someone. I'm not sure what to try next.
-Jon
[Cc-ed to Kurosawa-san] Hi guys, Jon-Erik Lido wrote: > I tried Suzuki Koichi's patches with mixed results. Basically it seems > that while his patches might work for 100BaseTX, they do not work for > 10BaseT. My work-around has another problem when you use IPv6. Kurosawa-san made another patch to deal with IPv6. He made this patch under 5.0-current, but this is available for 4.4-stable as well. I use this patch instead of my work-around in 4.4-stable (But I don't use IPv6). I'm not sure his patch works well in your situation. But, would you try his patch? http://homepage2.nifty.com/tkuro/archive/if_sis.diff -- This is my STYLE. SUZUKI Koichi Responsible Changed From-To: freebsd-bugs->wpaul Bill, this one now contains a reference to a patch. Hi, SIS735 owners I'm working on the 10baseT not working problem. (I have a ECS K7S5A) The problem is that the Realtek 8201 PHY does not work with the ukphy MII driver when not doing NWAY autoneg. I have a working patch in my lab but i need more time to test with 100baseFX full/half duplex and with a realtek 8139C since I have modified the rlphy driver ro also support the RTL8201 PHY. I don't want my fix to break the realtek cards. /Martin Fix for PRs: kern/35691: Realtek NIC driver does not work with Realtek 8201L NIC adapter kern/30836: Chipset SiS735 / NIC SiS 900 Attached is a patch that adds support for the RealTek 8201 PHY that I have on my ECS K7S5A motherboard. This patch makes the integrated SIS 900 NIC work with my 10baseT ADSL modem. I have tested it with the following: 100Mbit Switch, 100Mbit HUB, 10Mbit HUB together with both the sis and the rl drivers. sis driver, autodetect works without problems, speed as expected with tcpblast. rl driver have problems with autodetect when moving the network cable between the different switches/HUBs, works OK if machine is rebooted. rl driver is a bit slow 4.9MB/s in tcpblast against 100Mbit FDX. These behaviours are also present without my patch. /Please commit, Martin -- Martin Nilsson, Civilingenjör M.Sc. CS&E Svenska Butiker AB, S:t Larsväg 44, 222 70 Lund, Sweden martin@svenskabutiker.se Phone: +46-46-304130 http://www.svenskabutiker.se It looks like rev 1.8 of sys/dev/mii/rlphy.c integrated large portions of this patch, and this functionality was included in 4.6-RELEASE and thereafter. Can anyone confirm that SIS 735/900 cards are correctly detected and operate properly when using 4.6.2-RELEASE or 4.7-RCx? If so, a whole raft of PRs relating to problems with SiS NICs with RealTek PHYs can be closed: kern/30836 (this PR) kern/21623 (MAC address not found) i386/41998 (MII without PHY) kern/35691 (NIC not detected) Matt Emmerton wrote:
> Can anyone confirm that SIS 735/900 cards are correctly detected and
> operate properly when using 4.6.2-RELEASE or 4.7-RCx?
I have an ECS K7S5A running 4.7-RC and the onboard LAN works "mostly"
OK. The NIC and the PHY are detected, autonegotiation with my switch
works ok and the interface works ok for unicast traffic.
However, multicast does not work unless the interface is put into
promiscous mode (e.g. by running tcpdump). So the multicast filter is
apparently broken.
By looking at the Linux and NetBSD drivers it appears that the chip
revision SIS_REV_635 built into the SIS635 and SIS735 chipsets (as well
as a SIS900B revision FreeBSD doesn't know about) have a larger hash
table for addressing the multicast filter list. Besides that the Linux
driver uses a slightly different crc generator polynomial (0x04c11db7
instead of 0x04c11db6) to create the hash table entries on all card
revisions.
I'm not sure if the multicast issues should be moved to a separate PR
or this one kept open.
Wolfgang
Addendum: the multicast-issue is apparently the same as in kern/35511 the patch (tested on -stable) by FUJITA Kazutoshi at http://www.geocrawler.com/archives/3/152/2002/6/0/9065467/ did resolve problems of my sis900 on a recent asus box. although the error i got was `attach failed: return 6' instead of null mac address. Responsible Changed From-To: wpaul->mbr Take this PR over from wpaul. The "MII without any PHY" should be fixed. Can you confirm this too ? I'll care about the MII patch in the audit trail. If there are any remaining problems with the 735 chipset, can you try out this patch against FreeBSD 4.7 stable: http://people.freebsd.org/~mbr/patches/if_sis_stable.diff Martin State Changed From-To: open->feedback Change state to feedback. The patch at http://people.freebsd.org/~mbr/patches/if_sis_stable.diff got my onboard SiS NIC working with FreeBSD 4.7, which wasn't working beforehand (same "MII without any PHY" error that others have reported) The machine is an Asus Terminator P4 with the following onboard NIC: sis0@pci0:3:0: class=0x020000 card=0x807c1043 chip=0x09001039 rev=0x90 hdr=0x00 vendor = 'Silicon Integrated Systems (SiS)' device = 'SiS900 Fast Ethernet/Home Networking Ctrlr' class = network subclass = ethernet Martin State Changed From-To: feedback->closed Fixed in CURRENT and STABLE. Thanks ! |