Subject: Re: LAN Adapter driver
To: None <port-dreamcast@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-dreamcast
Date: 09/29/2002 19:19:56
Hi,
Today I've got the Allied-Telesis RE2000 and the Fujitsu FMV-181,
and also got datasheet of MB86960 and MB86965.
I'll work to clean up mb86960 drivers (in my spare time :-)
cpg@aladdin.de wrote:
> What is "FE_D7_IDENT_NICE"? Is it that nice?
According to MB86960 manual, NICE is an alias of MB86960, which
stands for "Network Interface Controller with Encoder/decorder."
I think "FE_D7_IDENT_86960" is more readable, and current
FE_D7_IDENT_NICE in mb86960reg.h is wrong (it should be 0x00).
> Ok, I've added them. The only place one of the old devices was used,
> was in mb86860.c (FE_D7_IDENT_EC):
Maybe "EC" means "EtherCoupler," which is also a nickname of MB86965.
> My data sheet (for the 86967) says that bits 6 and 7 of DLCR7
> shouldn't be written. It says "Writing to these bits is invalid." I
> take this as "Writing _ones_ to these bits is invalid."
> So the above line is at least suspect.
On MB86960, these bits have a different function, encoder/decorder
configuration. Maybe we should have definitions like:
#define FE_D7_ED_NORMAL 0x00 /* Normal NICE */
#define FE_D7_ED_MON 0x40 /* NICE + Monitor */
#define FE_D7_ED_BYPASS 0x80 /* Encoder/Decorder Bypass */
#define FE_D7_ED_TEST 0xc0 /* Encoder/Decorder Test */
I'll update mb86960reg.h for these bits.
(I'm not sure that "ED_TEST" is appropriate settings, though..)
> >>> /* Is this really needs to be done here? XXX */
> >>> /* Turn the "master interrupt control" flag of ASIC on. */
> >>> bus_space_write_1(memt, memh, FE_FMV3, FE_FMV3_ENABLE_FLAG);
>
> Removed (and it still works :-)
Good. (I've already cleaned up some code around if_fereg.h)
>>> file dev/ic/ate_subr.c mbe_g2bus
> This didn't work, config reported an error about this file used twice.
Ah, I see, it actually has problem. Sorry.
> I did this change in conf/files:
:
> -file dev/ic/ate_subr.c ate
> +file dev/ic/ate_subr.c ate | mbe_g2bus
:
> I don't know if this is correct and doesn't break other things...
Hmm, it isn't good thing to add a MD definition in MI conf/files.
It might cause error on other ports.
Ok, I'll merge dev/ic/ate_subr.c into dev/ic/mb86960.c
since RE2000 seems to have only the MB86965 chip and some SRAM/TTLs
so it would not have any Allied-Telesis specific feature.
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp