Re: sis190

From: Francois Romieu
Date: Mon Jun 13 2005 - 16:51:49 EST


Pascal CHAPPERON <pascal.chapperon@xxxxxxxxxx> :
[...]
> NOTE : here is something strange about base address =>
> dmesg : sis190 at ffffc20000004c00 (IRQ: 11)
> ifconfig : Interrupt:11 Base address:0xbeef

Don't bother: the base address in the struct netdevice is obsolete. I'll
turn it into 0xdead.

[tcpdump output]
> It seems that sis190 driver shifts 4 bytes...

Ok (it looks like a 2 bytes offset though).

> further test about autoneg, probably silly:
> be nice, as i know nothing to network drivers dev.
> i do not understand what is LPA_SLCT...

Ahem. It was not a great idea from me to convert from 31 to LPA_SLCT
as LPA_SLCT is intended to be a bitmask, not a register shift.

> # diff -puN sis190-20050611a.c sis190.c
> --- sis190-20050611a.c 2005-06-13 08:54:56.000000000 +0200
> +++ sis190.c 2005-06-13 09:41:29.000000000 +0200
[...]
> @@ -823,18 +823,17 @@ static void sis190_phy_task(void * data)
> u16 ctl;
> const char *msg;
> } reg31[] = {
> - { _1000bpsF, 0x1c01, "1000 bps Full Duplex" },
> - { _1000bpsH, 0x0c01, "1000 bps Half Duplex" },
> - { _100bpsF, 0x1801, "100 bps Full Duplex" },
> - { _100bpsH, 0x0801, "100 bps Half Duplex" },
> - { _10bpsF, 0x1401, "10 bps Full Duplex" },
> - { _10bpsH, 0x0401, "10 bps Half Duplex" },
> + { LPA_1000XFULL | LPA_SLCT, 0x1c01, "1000 bps Full Duplex" },
> + { LPA_1000XHALF | LPA_SLCT, 0x0c01, "1000 bps Half Duplex" },
> + { LPA_100FULL, 0x1801, "100 bps Full Duplex" },
> + { LPA_100HALF, 0x0901, "100 bps Half Duplex" },
> + { LPA_10FULL, 0x1401, "10 bps Full Duplex" },
> + { LPA_10HALF, 0x0401, "10 bps Half Duplex" },
> { 0, 0x0000, "unknown" }
> }, *p;
> - val = mdio_read(ioaddr, LPA_SLCT) & 0x1c; // bit 4:2
> -
> + val = mdio_read(ioaddr, MII_LPA);
> for (p = reg31; p->ctl; p++) {
> - if (val == p->val)
> + if ((val & p->val) == p->val)
> break;
> }
> if (p->ctl)
[and it works]

Cool. Ok, I take that and I'll sprinkle a few printks here and there.

Can you give a try at:
http://www.fr.zoreil.com/people/francois/misc/20050613-2.6.12-rc-sis190-test.patch

dmesg + ifconfig + tcpdump (please add a -e option) will be welcome as usual.

If the driver starts to behave in an usually better way, please issue
differently sized ping packets to cover the whole allowed range.

--
Ueimor
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/