Re: Uncommitted dc0 fixes ...

2002-09-10 Thread Vincent Poy

Hi Martin:

On Tue, 10 Sep 2002, Martin Blapp wrote:

> > and Martins patch:
> > This one works standalone and with 2 and 3 above.  It seems to have
> > increase ftp transfer rates too from 8600Kbytes/sec to 10577Kbytes/sec.
>
> Cool.

Seems to depend on which notebook the card is in.  With the Dell
Inspiron 8200, it does do the above rates and 6722Kbyte/sec if the ftp was
initiated from a Windows box.  On the IBM ThinkPad 770Z, the rates are
6600Kbyte/sec on the FreeBSD machine but 3085Kbyte/sec if the ftp is
initiated from the Windows machine.

> > Ofcourse, for some odd reason, if the ftp was done from a Windows XP Pro
> > machine, it's only 6722KBytes/sec.
>
> Hmm. TCP-window size ? And did you already tried to
> turn on/off the sysctls ?

The TCP-Window size I have is 32767 on the Windows machines.

> net.inet.tcp.rfc1323
> net.inet.tcp.rfc1644

Yep tried both of those already and didn't make a difference.


Cheers,
Vince - [EMAIL PROTECTED] - Vice President    __ 
Unix Networking Operations - FreeBSD-Real Unix for Free / / / / |  / |[__  ]
WurldLink Corporation  / / / /  | /  | __] ]
San Francisco - Honolulu - Hong Kong  / / / / / |/ / | __] ]
HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[]
Almighty1@IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Uncommitted dc0 fixes ...

2002-09-10 Thread Vincent Poy

On Tue, 10 Sep 2002, Martin Blapp wrote:

Hi,

> > 1) dc driver uses wrong case to read MAC from eeprom.
> >
> > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/35482
> >
> > This one seems to break data sending/receiving as the only thing that
> > works is pinging and that's only on the alias/secondary IP and not the
> > primary IP network which is completely unpingable.
>
> I expected this one to be the problem PR. I'll look at it this evening.

I guess it's probably making everything detect as a EN5152B or
something.

> +   case DC_DEVICEID_EN2242: /* and  DC_DEVICEID_EN5251B:  */
>  +   if (revision < DC_REVISION_EN5251B) {
>  +   sc->dc_type = DC_TYPE_AN985;
>  +   }  else {
>  +   sc->dc_type = DC_TYPE_EN5152B;
>  +   }
>  +   sc->dc_flags |= DC_TX_USE_TX_INTR;
>  +   sc->dc_flags |= DC_TX_ADMTEK_WAR;
>  +   sc->dc_pmode = DC_PMODE_MII;
>  +   break;
>  case DC_DEVICEID_AN985:
>  -   case DC_DEVICEID_EN2242:
>  sc->dc_type = DC_TYPE_AN985;
>  sc->dc_flags |= DC_TX_USE_TX_INTR;
>  sc->dc_flags |= DC_TX_ADMTEK_WAR;
>
> This change looks wrong to me.

I guess it probably works for the originator of the PR.


Cheers,
Vince - [EMAIL PROTECTED] - Vice President    __ 
Unix Networking Operations - FreeBSD-Real Unix for Free / / / / |  / |[__  ]
WurldLink Corporation  / / / /  | /  | __] ]
San Francisco - Honolulu - Hong Kong  / / / / / |/ / | __] ]
HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[]
Almighty1@IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Uncommitted dc0 fixes ...

2002-09-10 Thread Martin Blapp


Hi,

> 1) dc driver uses wrong case to read MAC from eeprom.
>
> http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/35482
>
> This one seems to break data sending/receiving as the only thing that
> works is pinging and that's only on the alias/secondary IP and not the
> primary IP network which is completely unpingable.

I expected this one to be the problem PR. I'll look at it this evening.

+   case DC_DEVICEID_EN2242: /* and  DC_DEVICEID_EN5251B:  */
 +   if (revision < DC_REVISION_EN5251B) {
 +   sc->dc_type = DC_TYPE_AN985;
 +   }  else {
 +   sc->dc_type = DC_TYPE_EN5152B;
 +   }
 +   sc->dc_flags |= DC_TX_USE_TX_INTR;
 +   sc->dc_flags |= DC_TX_ADMTEK_WAR;
 +   sc->dc_pmode = DC_PMODE_MII;
 +   break;
 case DC_DEVICEID_AN985:
 -   case DC_DEVICEID_EN2242:
 sc->dc_type = DC_TYPE_AN985;
 sc->dc_flags |= DC_TX_USE_TX_INTR;
 sc->dc_flags |= DC_TX_ADMTEK_WAR;

This change looks wrong to me.

Martin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Uncommitted dc0 fixes ...

2002-09-10 Thread Martin Blapp


Hi,

> and Martins patch:
> This one works standalone and with 2 and 3 above.  It seems to have
> increase ftp transfer rates too from 8600Kbytes/sec to 10577Kbytes/sec.

Cool.

> Ofcourse, for some odd reason, if the ftp was done from a Windows XP Pro
> machine, it's only 6722KBytes/sec.

Hmm. TCP-window size ? And did you already tried to
turn on/off the sysctls ?

net.inet.tcp.rfc1323
net.inet.tcp.rfc1644

Martin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Uncommitted dc0 fixes ...

2002-09-09 Thread Vincent Poy

On Thu, 5 Sep 2002, Martin Blapp wrote:

> > When I tried these patches manually handpatching on 08182002 JP
> > SNAPSHOT, it took away the error messages like you had mentioned except
> > I can ping everything except for the gateway.  Also, no other protocols
> > would work at all so it seems like something else broke.  I took out
> > the following and it still made no difference.
> > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=misc/32699
>
> Can you please test each patch and see which one is responsable ?
>
> Martin

Hi Martin and everyone,

I finally updated to the latest -CURRENT last night after pulling
the HD from my IBM ThinkPad 770Z and putting it in a loaner Dell Inspiron
8200 P4m-1.7Ghz as I couldn't get the fans to turn on and it keeps
shutting off due to overheating.  I have both a Siemens/Efficient Networks
SpeedStream SS1012 and a SMC Networks SMC8036TX which seems to be
identical cards physically as it has the same design and same label
printing information layout.

As far as testing each patch, here goes:

1) dc driver uses wrong case to read MAC from eeprom.

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/35482

This one seems to break data sending/receiving as the only thing that
works is pinging and that's only on the alias/secondary IP and not the
primary IP network which is completely unpingable.

* $FreeBSD: src/sys/pci/if_dcreg.h,v 1.25 2002/05/06 10:55:42 iwasaki Exp
*** /usr/temp/if_dcreg.hMon May  6 03:55:42 2002
--- /usr/src/sys/pci/if_dcreg.h Mon Sep  9 15:14:08 2002
***
*** 78,83 
--- 78,84 
  #define DC_TYPE_PNIC  0xA /* 82c168/82c169 PNIC I */
  #define   DC_TYPE_XIRCOM  0xB /* Xircom X3201 */
  #define DC_TYPE_CONEXANT  0xC /* Conexant LANfinity RS7112 */
+ #define DC_TYPE_EN5152B   0xD /* Accton EN5251B. Clone
of ADMtek 983B? */

  #define DC_IS_MACRONIX(x) \
(x->dc_type == DC_TYPE_98713 || \
***
*** 86,91 
--- 87,93 

  #define DC_IS_ADMTEK(x)   \
(x->dc_type == DC_TYPE_AL981 || \
+x->dc_type == DC_TYPE_EN5152B ||   \
 x->dc_type == DC_TYPE_AN985)

  #define DC_IS_INTEL(x)(x->dc_type == DC_TYPE_21143)
***
*** 890,895 
--- 892,904 
   */
  #define DC_DEVICEID_EN12170x1217
  #define   DC_DEVICEID_EN2242  0x1216
+ #define DC_DEVICEID_EN5251B   0x1216
+
+ /*
+  * The Accton EN5251B is sold as the Siemens Speedstream SS1020.
+  * The EN5251B seems to be a clone of the ADMtek 983 or 983B
+  */
+ #define DC_REVISION_EN5251B   0x11  /* ASSUMING that EN2242's revision
differs */

  /*
   * Xircom vendor ID

* $FreeBSD: src/sys/pci/if_dc.c,v 1.77 2002/09/04 18:14:17 markm Exp $
*** /usr/temp/if_dc.c   Wed Sep  4 11:14:17 2002
--- /usr/src/sys/pci/if_dc.cMon Sep  9 15:22:09 2002
***
*** 186,191 
--- 186,193 
"Accton EN1217 10/100BaseTX" },
{ DC_VENDORID_ACCTON, DC_DEVICEID_EN2242,
"Accton EN2242 MiniPCI 10/100BaseTX" },
+   { DC_VENDORID_ACCTON, DC_DEVICEID_EN5251B,
+   "Siemens SpeedStream SS1020 10/100BaseTX" },
{ DC_VENDORID_XIRCOM, DC_DEVICEID_X3201,
"Xircom X3201 10/100BaseTX" },
{ DC_VENDORID_ABOCOM, DC_DEVICEID_FE2500,
***
*** 1579,1584 
--- 1581,1589 
if (t->dc_did == DC_DEVICEID_DM9102 &&
rev >= DC_REVISION_DM9102A)
t++;
+   if (t->dc_did == DC_DEVICEID_EN2242 &&
+   rev >= DC_REVISION_EN5251B)
+   t++;
return(t);
}
t++;
***
*** 1917,1925 
sc->dc_flags |= DC_TX_ADMTEK_WAR;
sc->dc_pmode = DC_PMODE_MII;
break;
case DC_DEVICEID_AN985:
case DC_DEVICEID_FE2500:
-   case DC_DEVICEID_EN2242:
sc->dc_type = DC_TYPE_AN985;
sc->dc_flags |= DC_TX_USE_TX_INTR;
sc->dc_flags |= DC_TX_ADMTEK_WAR;
--- 1922,1939 
sc->dc_flags |= DC_TX_ADMTEK_WAR;
sc->dc_pmode = DC_PMODE_MII;
break;
+   case DC_DEVICEID_EN2242: /* and  DC_DEVICEID_EN5251B:  */
+   if (revision < DC_REVISION_EN5251B) {
+   sc->dc_type = DC_TYPE_AN985;
+   }  else {
+   sc->dc_type = DC_TYPE_EN5152B;
+   }
+   sc->dc_flags |= DC_TX_USE_TX_INTR;
+   sc->dc_flags |= DC_TX_ADMTEK_WAR;
+   sc->dc_pmode = DC_PMODE_MII;
+   break;
case DC_DEVICEID_AN985:
case DC_DEVICEID_FE2500:
sc->dc_type = DC_TYPE_AN985;
sc->dc_flags |= DC_TX_USE_TX_INTR;
sc->dc_flags |= DC_TX_ADMT

Re: Uncommitted dc0 fixes ...

2002-09-09 Thread David O'Brien

On Mon, Sep 09, 2002 at 11:59:08PM +1000, Stephen McKay wrote:
> This driver represents a counterintuitive state of affairs.  I was impressed
> when Bill Paul managed to support so many clone cards with one driver.  But
> now nobody has enough hardware on hand to test any change properly.  There's
> some sort of lesson to be learnt here.

If a clear capable replacement maintainer for dc(4) stepped forward, I am
sure the user community could put all the various types of cards in said
person's hands.  I have 3 cards I could donate to the cause myself.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Uncommitted dc0 fixes ...

2002-09-09 Thread Stephen McKay

On Wednesday, 4th September 2002, Martin Blapp wrote:

>And this patch here together with patch III made the annoying messages (dc0:
>failed to force tx and rx to idle mode) go away. And I can use now my card
>without to replug the cable over again)

I've been meaning to remove the annoying message for ages.  Sorry about that.

>+   if (DC_IS_INTEL(sc)) {
>+   for (i = 0; i < DC_TIMEOUT; i++) {
>+   isr = CSR_READ_4(sc, DC_ISR);
>+   if (isr & DC_ISR_TX_IDLE &&
>+   (isr & DC_ISR_RX_STATE)
>+   == DC_RXSTATE_STOPPED)
>+   break;
>+   DELAY(10);
>+   }
>+   }

Conditionalising on DC_IS_INTEL() means most cards no longer wait until
the TX and RX are idle.  I don't have enough different if_dc cards to
know if this is safe.

On the other hand, every test I've done on my Intel and Macronix cards
shows zero calls to DELAY() in this loop.  The loop may as well not be
there for those card types.

Indeed, it isn't there at all in if_de and in a Linux driver I looked
at.  From this I'm guessing that no 21143 (real or clone) needs this check,
though I've got no real proof.

Out of all this fuzzy evidence, I guess the most sensible option is the
patch you've proposed.  If nobody else is interested, I'll commit this part
of your patch cluster on the weekend.  I suppose I could do the ADMtek
auto tx underrun recover patch too, as it seems harmless to other cards.
The other stuff I can't test at all.

This driver represents a counterintuitive state of affairs.  I was impressed
when Bill Paul managed to support so many clone cards with one driver.  But
now nobody has enough hardware on hand to test any change properly.  There's
some sort of lesson to be learnt here.

Stephen.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Uncommitted dc0 fixes ...

2002-09-05 Thread Vincent Poy

On Thu, 5 Sep 2002, Martin Blapp wrote:

> Hi,
>
> > When I tried these patches manually handpatching on 08182002 JP
> > SNAPSHOT, it took away the error messages like you had mentioned except
> > I can ping everything except for the gateway.  Also, no other protocols
> > would work at all so it seems like something else broke.  I took out
> > the following and it still made no difference.
> > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=misc/32699
>
> Can you please test each patch and see which one is responsable ?

Hi,

What I'm thinking about doing is cvsupping to the latest -current
code and then apply each patch and see what happens.


Cheers,
Vince - [EMAIL PROTECTED] - Vice President    __ 
Unix Networking Operations - FreeBSD-Real Unix for Free / / / / |  / |[__  ]
WurldLink Corporation  / / / /  | /  | __] ]
San Francisco - Honolulu - Hong Kong  / / / / / |/ / | __] ]
HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[]
Almighty1@IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Uncommitted dc0 fixes ...

2002-09-05 Thread Martin Blapp


Hi,

>   When I tried these patches manually handpatching on 08182002 JP
> SNAPSHOT, it took away the error messages like you had mentioned except
> I can ping everything except for the gateway.  Also, no other protocols
> would work at all so it seems like something else broke.  I took out
> the following and it still made no difference.
> http://www.FreeBSD.org/cgi/query-pr.cgi?pr=misc/32699

Can you please test each patch and see which one is responsable ?

Martin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Uncommitted dc0 fixes ...

2002-09-05 Thread Vincent Poy

On Wed, 4 Sep 2002, Martin Blapp wrote:

>
> Hi all,
>
> Anybody who can, please commit these PR's.
>
> 1) dc driver uses wrong case to read MAC from eeprom.
>
> http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/35482
>
>
> 2) Tulip ether card EN2242 (if_dc.c) use wrong multicast table
>
> http://www.FreeBSD.org/cgi/query-pr.cgi?pr=misc/32699
>
>
> 3) ADMtek AN98x, enable automatically TX underrun recovery
>
> Patch No3 fixes some part of link problem on EN2242 cards.
> I've tested this patch and it makes by laptop working again with
> cvsup.
>
> And this patch here together with patch III made the annoying messages (dc0:
> failed to force tx and rx to idle mode) go away. And I can use now my card
> without to replug the cable over again)
>
> --- /usr/src/sys/pci/if_dc.cSun Jun 16 21:36:00 2002
> +++ /usr/src/sys/pci/if_dc.cWed Sep  4 16:57:23 2002
> @@ -1338,17 +1362,21 @@
> restart = 1;
> DC_CLRBIT(sc, DC_NETCFG, (DC_NETCFG_TX_ON|DC_NETCFG_RX_ON));
>
> -   for (i = 0; i < DC_TIMEOUT; i++) {
> -   isr = CSR_READ_4(sc, DC_ISR);
> -   if (isr & DC_ISR_TX_IDLE &&
> -   (isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED)
> -   break;
> -   DELAY(10);
> -   }
> +   if (DC_IS_INTEL(sc)) {
> +   for (i = 0; i < DC_TIMEOUT; i++) {
> +   isr = CSR_READ_4(sc, DC_ISR);
> +   if (isr & DC_ISR_TX_IDLE &&
> +   (isr & DC_ISR_RX_STATE)
> +   == DC_RXSTATE_STOPPED)
> +   break;
> +   DELAY(10);
> +   }
>
> -   if (i == DC_TIMEOUT)
> -   printf("dc%d: failed to force tx and "
> -   "rx to idle state\n", sc->dc_unit);
> +   if (i == DC_TIMEOUT) {
> +   printf("dc%d: failed to force tx and "
> +   "rx to idle state\n", sc->dc_unit);
> +   }
> +   }
> }
>
> Martin Blapp, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
> --
> ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
> Phone: +41 061 826 93 00: +41 61 826 93 01
> PGP: 
> PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
> --
>
> Ups, forgot to add here the PR number ...

> 3) ADMtek AN98x, enable automatically TX underrun recovery

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34236

> Patch No3 fixes some part of link problem on EN2242 cards.
> I've tested this patch and it makes by laptop working again with
> cvsup.

When I tried these patches manually handpatching on 08182002 JP
SNAPSHOT, it took away the error messages like you had mentioned except
I can ping everything except for the gateway.  Also, no other protocols
would work at all so it seems like something else broke.  I took out
the following and it still made no difference.
http://www.FreeBSD.org/cgi/query-pr.cgi?pr=misc/32699


Cheers,
Vince - [EMAIL PROTECTED] - Vice President    __ 
Unix Networking Operations - FreeBSD-Real Unix for Free / / / / |  / |[__  ]
WurldLink Corporation  / / / /  | /  | __] ]
San Francisco - Honolulu - Hong Kong  / / / / / |/ / | __] ]
HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[]
Almighty1@IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Uncommitted dc0 fixes ...

2002-09-04 Thread Mark Murray

OK, I've grabbed these...

M

> 
> Ups, forgot to add here the PR number ...
> 
> > 3) ADMtek AN98x, enable automatically TX underrun recovery
> 
> http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34236
> 
> > Patch No3 fixes some part of link problem on EN2242 cards.
> > I've tested this patch and it makes by laptop working again with
> > cvsup.
> 
> Martin
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
-- 
o   Mark Murray
\_
O.\_Warning: this .sig is umop ap!sdn

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Uncommitted dc0 fixes ...

2002-09-04 Thread Martin Blapp


Ups, forgot to add here the PR number ...

> 3) ADMtek AN98x, enable automatically TX underrun recovery

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34236

> Patch No3 fixes some part of link problem on EN2242 cards.
> I've tested this patch and it makes by laptop working again with
> cvsup.

Martin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Uncommitted dc0 fixes ...

2002-09-04 Thread Martin Blapp


Hi all,

Anybody who can, please commit these PR's.

1) dc driver uses wrong case to read MAC from eeprom.

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/35482


2) Tulip ether card EN2242 (if_dc.c) use wrong multicast table

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=misc/32699


3) ADMtek AN98x, enable automatically TX underrun recovery

Patch No3 fixes some part of link problem on EN2242 cards.
I've tested this patch and it makes by laptop working again with
cvsup.

And this patch here together with patch III made the annoying messages (dc0:
failed to force tx and rx to idle mode) go away. And I can use now my card
without to replug the cable over again)

--- /usr/src/sys/pci/if_dc.cSun Jun 16 21:36:00 2002
+++ /usr/src/sys/pci/if_dc.cWed Sep  4 16:57:23 2002
@@ -1338,17 +1362,21 @@
restart = 1;
DC_CLRBIT(sc, DC_NETCFG, (DC_NETCFG_TX_ON|DC_NETCFG_RX_ON));

-   for (i = 0; i < DC_TIMEOUT; i++) {
-   isr = CSR_READ_4(sc, DC_ISR);
-   if (isr & DC_ISR_TX_IDLE &&
-   (isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED)
-   break;
-   DELAY(10);
-   }
+   if (DC_IS_INTEL(sc)) {
+   for (i = 0; i < DC_TIMEOUT; i++) {
+   isr = CSR_READ_4(sc, DC_ISR);
+   if (isr & DC_ISR_TX_IDLE &&
+   (isr & DC_ISR_RX_STATE)
+   == DC_RXSTATE_STOPPED)
+   break;
+   DELAY(10);
+   }

-   if (i == DC_TIMEOUT)
-   printf("dc%d: failed to force tx and "
-   "rx to idle state\n", sc->dc_unit);
+   if (i == DC_TIMEOUT) {
+   printf("dc%d: failed to force tx and "
+   "rx to idle state\n", sc->dc_unit);
+   }
+   }
}

Martin Blapp, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
--
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 061 826 93 00: +41 61 826 93 01
PGP: 
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
--


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message