Subject: tulip on netwinder problem
To: None <port-arm@netbsd.org>
From: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
List: port-arm
Date: 08/05/2005 02:20:15
Hi! all,


My (old?) netwinder had any problem.
Unfortunately the tlp0 interface (tulip) doesn't work as expected.
That is change failed to idle.

  e.g.
    # 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
      .
      .
      .

  me too.
    http://mail-index.netbsd.org/port-arm/2002/09/05/0000.html


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.


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


Should we implement PCI_NETBSD_CONFIGURE?
--
kiyohara