Subject: kern/20680: Another 64-bit gsip NIC
To: None <gnats-bugs@gnats.netbsd.org>
From: None <pavel.cahyna@st.mff.cuni.cz>
List: netbsd-bugs
Date: 03/13/2003 04:52:40
>Number:         20680
>Category:       kern
>Synopsis:       Another 64-bit gsip NIC
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 13 04:53:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Pavel Cahyna
>Release:        1.6_STABLE
>Organization:
>Environment:
>Description:
I have a 64-bit PCI gigabit card, named SMC9462TX.
This card could be added to the list of known 64-bit devices in the 
gsip driver.

Dmesg shows:

gsip0 at pci0 dev 6 function 0: NatSemi DP83820 Gigabit Ethernet, rev 00
gsip0: interrupting at eb164 irq 0
gsip0: Ethernet address 00:04:e2:10:55:16
gsip0: 64-bit PCI slot detected
gphyter0 at gsip0 phy 1: DP83861 1000BASE-T media interface, rev. 1
gphyter0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
+1000baseT-FDX, auto
gphyter0: strapped to slave mode, pre-C5 BCM5400 compat enabled

(the card is in a 64-bit slot of AlphaPC 164LX.)

pcictl pci0 dump -d 6 shows:

PCI configuration registers:
  Common header:
    0x00: 0x0022100b 0x02b00007 0x02000000 0x00000000

    Vendor Name: National Semiconductor (0x100b)
    Device Name: DP83820 10/100/1000 Ethernet (0x0022)
    Command register: 0x0007
      I/O space accesses: on
      Memory space accesses: on
      Bus mastering: on
      Special cycles: off
      MWI transactions: off
      Palette snooping: off
      Parity error checking: off
      Address/data stepping: off
      System error (SERR): off
      Fast back-to-back transactions: off
    Status register: 0x02b0
      Capability List support: on
      66 MHz capable: on
      User Definable Features (UDF) support: off
      Fast back-to-back capable: on
      Data parity error detected: off
      DEVSEL timing: medium (0x1)
      Slave signaled Target Abort: off
      Master received Target Abort: off
      Master received Master Abort: off
      Asserted System Error (SERR): off
      Parity error detected: off
    Class Name: network (0x02)
    Subclass Name: ethernet (0x00)
    Interface: 0x00
    Revision ID: 0x00
    BIST: 0x00
    Header Type: 0x00 (0x00)
    Latency Timer: 0x00
    Cache Line Size: 0x00

  Type 0 ("normal" device) header:
    0x10: 0x00001001 0x82240000 0x00000000 0x00000000
    0x20: 0x00000000 0x00000000 0x00000000 0x946210b8
    0x30: 0x82230000 0x00000040 0x00000000 0x340b0100

    Base address register at 0x10
      type: i/o
      base: 0x00001000, not sized
    Base address register at 0x14
      type: 32-bit nonprefetchable memory
      base: 0x82240000, not sized
    Base address register at 0x18
      not implemented(?)
    Base address register at 0x1c
      not implemented(?)
    Base address register at 0x20
      not implemented(?)
    Base address register at 0x24
      not implemented(?)
    Cardbus CIS Pointer: 0x00000000
    Subsystem vendor ID: 0x10b8
    Subsystem ID: 0x9462
    Expansion ROM Base Address: 0x82230000
    Capability list pointer: 0x40
    Reserved @ 0x38: 0x00000000
    Maximum Latency: 0x34
    Minimum Grant: 0x0b
    Interrupt pin: 0x01 (pin A)
    Interrupt line: 0x00
    Capability register at 0x40
      type: 0x01 (Power Management, rev. 1.0)

  Device-dependent header:
    0x40: 0x7e020001 0x00000000 0x00000000 0x00000000
    0x50: 0x00000000 0x00000000 0x00000000 0x00000000
    0x60: 0x00000000 0x00000000 0x00000000 0x00000000
    0x70: 0x00000000 0x00000000 0x00000000 0x00000000
    0x80: 0x00000000 0x00000000 0x00000000 0x00000000
    0x90: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf0: 0x00000000 0x00000000 0x00000000 0x00000000


>How-To-Repeat:

>Fix:
Add the entry
                /* SMC EZ Card */
                { 0x10b8,       0x9462 },
to the card64 array in sys/dev/pci/if_sip.c .

After recompile and reboot, the card is probed as

gsip0 at pci0 dev 6 function 0: NatSemi DP83820 Gigabit Ethernet, rev 00
gsip0: interrupting at eb164 irq 0
gsip0: Ethernet address 00:04:e2:10:51:aa
gsip0: 64-bit PCI slot detected, using 64-bit data transfers
gphyter0 at gsip0 phy 1: DP83861 1000BASE-T media interface, rev. 2
gphyter0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
gphyter0: strapped to slave mode, pre-C5 BCM5400 compat enabled

(note "using 64-bit data transfers").


>Release-Note:
>Audit-Trail:
>Unformatted: