NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/52767: The wm driver cannot receive traffic on i82583V (rev. 0x00)



On Tue, 28 Nov 2017 18:21:33 +0900
Masanobu SAITOH <msaitoh%execsw.org@localhost> wrote:

> My 82583V machine has an MSI-X cap:
> 
> >   Capability register at 0xc8
> >     type: 0x01 (Power Management)
> >   Capability register at 0xd0
> >     type: 0x05 (MSI)
> >   Capability register at 0xe0
> >     type: 0x10 (PCI Express)
> >   Capability register at 0xa0
> >     type: 0x11 (MSI-X)
> (snip)
> >   MSI-X Capability Register
> >     Message Control register: 0x0000
> >       Table Size: 1
> >       Function Mask: off
> >       MSI-X Enable: off
> >     Table offset register: 0x00000003
> >       Table offset: 0x00000000
> >       BIR: 0x3
> >     Pending bit array register: 0x00002003
> >       Pending bit array offset: 0x00002000
> >       BIR: 0x3
> 
> but the document doesn't say anything about MSI-X.
> The description in the document says 0xa0 is reserved.
> 
> > Address Item			Next Pointer
> > 0xC8-CF PCI power management	0xD0
> > 0xD0-DF MSI			0xE0
> > 0xA0-AB Reserved		0x00   <======= this!
> > 0xE0-F3 PCIe Capabilities	0xA0
> 
> And more, neither linux nor FreeBSD don't use MSI-X.
> 
> Could you test the following patch?
> 
> -------------------------
> Index: if_wm.c
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/pci/if_wm.c,v
> retrieving revision 1.544
> diff -u -p -r1.544 if_wm.c
> --- if_wm.c	22 Nov 2017 02:36:52 -0000	1.544
> +++ if_wm.c	28 Nov 2017 09:19:54 -0000
> @@ -1853,7 +1853,13 @@ wm_attach(device_t parent, device_t self
>   
>   	/* Allocation settings */
>   	max_type = PCI_INTR_TYPE_MSIX;
> -	counts[PCI_INTR_TYPE_MSIX] = sc->sc_nqueues + 1;
> +	/*
> +	 * 82583 has a MSI-X capability in the PCI configuration space but
> +	 * it doesn't support it. At least the document doesn't say anything
> +	 * about MSI-X.
> +	 */
> +	counts[PCI_INTR_TYPE_MSIX]
> +	    = (sc->sc_type == WM_T_82583) ? 0 : sc->sc_nqueues + 1;
>   	counts[PCI_INTR_TYPE_MSI] = 1;
>   	counts[PCI_INTR_TYPE_INTX] = 1;
>   	/* overridden by disable flags */
> -------------------------

The patch seems to be solve the problem of the wm driver
on i82583V.  Thank you.

ppb0: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x1 @ 5.0GT/s
ppb0: link is x1 @ 2.5GT/s
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
wm0 at pci1 dev 0 function 0: Intel i82583V (rev. 0x00)
wm0: interrupting at msi2 vec 0
wm0: PCI-Express bus
wm0: 512 words (8 address bits) SPI EEPROM, version 1.10.0, Image Unique ID ffffffff
wm0: Ethernet address 0c:e8:5c:**:**:**
wm0: 0x2a4440<SPI,IOH_VALID,PCIE,ASF_FIRM,AMT,WOL>
makphy0 at wm0 phy 1: Marvell 88E1149 Gigabit PHY, rev. 1
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto


-- 
Shinichi Doyashiki <clare%csel.org@localhost>


Home | Main Index | Thread Index | Old Index