Subject: kern/20436: Intel EtherExpress16 driver requires shared memory even for PIO mode ?
To: None <gnats-bugs@gnats.netbsd.org>
From: None <djbarnes@ieee.org>
List: netbsd-bugs
Date: 02/19/2003 20:50:23
>Number: 20436
>Category: kern
>Synopsis: Intel EtherExpress16 driver requires shared memory even for PIO mode ?
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 19 20:51:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Dave Barnes
>Release: 1.5, 1.6, 1.6-current I386
>Organization:
>Environment:
>Description:
It should be possible to set the Intel EtherExpress16 to no shared memory with Intel's softset program and have the board still work with NetBSD but in PIO mode. The current driver depends upon having a shared memory address range defined before it will fall back to PIO mode. EEPROM location 6 is 0 when no memory is mapped.
>How-To-Repeat:
With softset set up an Intel EtherExpress16 NIC to some valid port and interrupt but with no shared memory defined. The board will not even be recognised by the boot driver probes.
>Fix:
A little rearrangement in ix_match, thusly.......
======================================================================
*** dev/isa/if_ix.c.orig Wed Feb 19 22:44:02 2003
--- dev/isa/if_ix.c Wed Feb 19 22:43:43 2003
***************
*** 595,607 ****
val = val >> 1;
}
- if (pg == 8) {
- DPRINTF(("Invalid or unsupported memory config\n"));
- goto out;
- }
-
- maddr = 0xc0000 + (pg * 0x4000);
-
switch (val) {
case 0x00:
msize = 0;
--- 595,600 ----
***************
*** 628,638 ****
goto out;
}
if (ia->ia_iomem[0].ir_addr != ISACF_IOMEM_DEFAULT &&
ia->ia_iomem[0].ir_addr != maddr) {
DPRINTF((
"ix_match: memaddr of board @ 0x%x doesn't match config\n",
! ia->ia_iobase));
goto out;
}
--- 621,637 ----
goto out;
}
+ if (pg == 8) {
+ DPRINTF(("No shared memory config, using PIO.\n"));
+ }
+ else {
+ maddr = 0xc0000 + (pg * 0x4000);
+
if (ia->ia_iomem[0].ir_addr != ISACF_IOMEM_DEFAULT &&
ia->ia_iomem[0].ir_addr != maddr) {
DPRINTF((
"ix_match: memaddr of board @ 0x%x doesn't match config\n",
! ia->ia_iomem[0].ir_addr));
goto out;
}
***************
*** 640,648 ****
ia->ia_iomem[0].ir_size != msize) {
DPRINTF((
"ix_match: memsize of board @ 0x%x doesn't match config\n",
! ia->ia_iobase));
goto out;
}
/* need to put the 586 in RESET, and leave it */
bus_space_write_1(iot, ioh, IX_ECTRL, IX_RESET_586);
--- 639,648 ----
ia->ia_iomem[0].ir_size != msize) {
DPRINTF((
"ix_match: memsize of board @ 0x%x doesn't match config\n",
! ia->ia_iomem[0].ir_addr));
goto out;
}
+ }
/* need to put the 586 in RESET, and leave it */
bus_space_write_1(iot, ioh, IX_ECTRL, IX_RESET_586);
========================================================================
Now ix* will attach without having to set any shared memory config what so ever.
>Release-Note:
>Audit-Trail:
>Unformatted: