9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] re: 3c509 driver and XL
@ 1997-12-08 23:54 forsyth
  0 siblings, 0 replies; only message in thread
From: forsyth @ 1997-12-08 23:54 UTC (permalink / raw)


here's the conversation from one year ago ...

>From cse.psu.edu!owner-9fans Mon Oct  7 14:55:39 BST 1996
From: jmk@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: Installing & IP
Sender: owner-9fans@cse.psu.edu
Reply-To: 9fans@cse.psu.edu
Precedence: bulk

You're right and I'd forgotten about that fix in the current driver
we have, the 590 and 595 (and the eisa variants whose numbers I've
forgotten) require the thresholds to be in longwords.

You can decide whether the shift is necessary at the end of the reset
routine by either just requiring it if a pci card is detected or by the
following, courtesy of Tom Killian (tom@research.att.com)

	COMMAND(port, SetTxAvailable, 1800);
	COMMAND(port, SelectWindow, 5);
	i = ins(port+0x02);
	COMMAND(port, SelectWindow, 1);
	switch(i){
	case 1800:
		ctlr->card.txashift = 0;
		break;
	case 7200:
		ctlr->card.txashift = 1;
		print("ether509: SetTxAvailable shifted\n");
		break;
	default:
		panic("ether509: SetTxAvailable %d", i);
		break;
	}

along with adding an element to the Card structure in ether.h

	uchar	txashift;

and using the variable when setting the threshold in the transmit routine

				if(ctlr->card.txashift)
					COMMAND(port, SetTxAvailable, len/4);
				else
					COMMAND(port, SetTxAvailable, len);

------ forwarded message follows ------

 From cse.psu.edu!owner-9fans Mon Oct  7 09:22:31 EDT 1996
Received: from cse.psu.edu by plan9; Mon Oct  7 09:22:31 EDT 1996
Received: from localhost (majordom@localhost) by cse.psu.edu (8.7.5/8.7.3) with SMTP id IAA15122; Mon, 7 Oct 1996 08:59:58 -0400 (EDT)
Received: by claven.cse.psu.edu (bulk_mailer v1.5); Mon, 7 Oct 1996 08:58:41 -0400
Received: (from majordom@localhost) by cse.psu.edu (8.7.5/8.7.3) id IAA15085 for 9fans-outgoing; Mon, 7 Oct 1996 08:58:34 -0400 (EDT)
X-Authentication-Warning: claven.cse.psu.edu: majordom set sender to owner-9fans using -f
Received: from hamnavoe.demon.co.uk (miller@hamnavoe.demon.co.uk [158.152.225.204]) by cse.psu.edu (8.7.5/8.7.3) with SMTP id IAA15081 for <9fans@cse.psu.edu>; Mon, 7 Oct 1996 08:58:22 -0400 (EDT)
From: hamnavoe.demon.co.uk!miller
Message-Id: <199610071258.IAA15081@cse.psu.edu>
To: cse.psu.edu!9fans
Date: Mon, 7 Oct 1996 13:52:26 GMT
Subject: Re: Installing & IP
Sender: cse.psu.edu!owner-9fans
Reply-To: cse.psu.edu!9fans
Precedence: bulk

Jim McKie says:

> ... the 3C590 is a 10Mbps card only and should work

I found problems with the 3C590: particularly under the IL protocol,
transmission was very slow and often hung up completely.  Some
investigation showed that the TxAvailable interrupt (which signals
that the adapter's transmit FIFO has space for the next packet) wasn't
being received.  (Presumably only the IL protocol is efficient enough
to overrun the adapter's transmission speed and allow the FIFO to
fill up ...)

I believe the problem is that the TxAvailable threshold needs to be
set in units of longwords rather than bytes (could someone with
access to hardware documentation for the 3C590 please confirm this?).
If this is right, in ether509.c the line

	COMMAND(port, SetTxAvailable, len);

ought to be

	COMMAND(port, SetTxAvailable, len>>2);

After this change on my system, TxAvailable interrupts occur as 
expected and IL transmission runs without a problem.

-- Richard Miller





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-12-08 23:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-08 23:54 [9fans] re: 3c509 driver and XL forsyth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).