Subject: port-arm/30992: tulip on netwinder problem
To: None <port-arm-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <kiyohara@kk.iij4u.or.jp>
List: netbsd-bugs
Date: 08/15/2005 14:30:00
>Number: 30992
>Category: port-arm
>Synopsis: tulip on netwinder problem
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: port-arm-maintainer
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Aug 15 14:30:00 +0000 2005
>Originator: KIYOHARA Takashi
>Release: 3.99.7
>Organization:
>Environment:
NetBSD malchut.sephiroth 3.99.7 NetBSD 3.99.7 (MALCHUT) #0: Sun Aug 7 05:45:23 JST 2005 lance@highpriestess.fool:/usr/src/sys/arch/netwinder/compile/MALCHUT netwinder
>Description:
Unfortunately the tlp0 interface (tulip) doesn't work as expected.
That is change failed to idle.
My tlp0 output.
tlp0 at pci0 dev 9 function 0: DECchip 21143 Ethernet, pass 3.0
tlp0: interrupting at irq 9
tlp0: Ethernet address 00:10:57:c0:07:88
>How-To-Repeat:
# ifconfig tlp0 192.168.1.100
tlp0: transmit process failed to idle: state RUNNING - READING
tlp0: receive process failed to idle: state RUNNING - CHECK
tlp0: transmit process stopped
tlp0: receive process stopped
tlp0: transmit process failed to idle: state RUNNING - READING
tlp0: receive process failed to idle: state RUNNING - CHECK
tlp0: transmit process stopped
.
.
.
>Fix:
I saw source-code of Linux of netwinder. Their tulip used memory space
(0x00800000). But, our NetBSD/netwinder used I/O space. We should also
use the memory space.
original source in
ftp://ftp.oregonstate.edu/pub/netwinder/pub/netwinder/images/dm-3.1-15.tar.gz
Index: pci_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/netwinder/pci/pci_machdep.c,v
retrieving revision 1.4
diff -u -r1.4 pci_machdep.c
--- pci_machdep.c 15 Jul 2003 02:59:25 -0000 1.4
+++ pci_machdep.c 4 Aug 2005 16:22:11 -0000
@@ -25,6 +25,7 @@
pci_conf_write(pba->pba_pc, tag,
PCI_COMMAND_STATUS_REG,
PCI_COMMAND_IO_ENABLE|
+ PCI_COMMAND_MEM_ENABLE|
PCI_COMMAND_MASTER_ENABLE);
intreg = pci_conf_read(pba->pba_pc, tag, PCI_INTERRUPT_REG);
intreg = PCI_INTERRUPT_CODE(
@@ -34,7 +35,7 @@
0x40|IRQ_IN_L1);
pci_conf_write(pba->pba_pc, tag, PCI_INTERRUPT_REG, intreg);
pci_conf_write(pba->pba_pc, tag, 0x10, 0x400 | PCI_MAPREG_TYPE_IO);
- pci_conf_write(pba->pba_pc, tag, 0x14, 0);
+ pci_conf_write(pba->pba_pc, tag, 0x14, 0x00800000);
/*
* Initialize the PCI NE2000