On IMX6Q-SDB, some PCIe devies can't be dectected?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

On IMX6Q-SDB, some PCIe devies can't be dectected?

18,508 次查看
will_chen
Contributor II

Hello,

I put a PCIe-RS232 Card into the miniPCIe slot, it can be detected. But a PCIe Network Card can't not be detected in the same way. Below is the log,

---------------------PCIe-RS232-------------------

PM driver module loaded

iMX6 PCIe PCIe RC mode imx_pcie_pltfm_probe entering.

PCIE: imx_pcie_pltfm_probe start link up.

IMX PCIe port: link up.

PCI: bus0: Fast back to back transfers disabled

PCI: bus1: Fast back to back transfers disabled

pci 0000:00:00.0: BAR 0: assigned [mem 0x01000000-0x010fffff 64bit pref]

pci 0000:00:00.0: BAR 0: set to [mem 0x01000000-0x010fffff 64bit pref] (PCI address [0x1000000-0x10fffff])

pci 0000:00:00.0: BAR 15: assigned [mem 0x01100000-0x011fffff pref]

pci 0000:00:00.0: BAR 6: assigned [mem 0x01200000-0x0120ffff pref]

pci 0000:00:00.0: BAR 13: assigned [io  0x1e00000-0x1e00fff]

pci 0000:01:00.0: BAR 1: assigned [mem 0x01100000-0x01107fff pref]

pci 0000:01:00.0: BAR 1: set to [mem 0x01100000-0x01107fff pref] (PCI address [0x1100000-0x1107fff])

pci 0000:01:00.0: BAR 6: assigned [mem 0x01108000-0x0110ffff pref]

pci 0000:01:00.0: BAR 0: assigned [io  0x1e00000-0x1e000ff]

pci 0000:01:00.0: BAR 0: set to [io  0x1e00000-0x1e000ff] (PCI address [0x1e00000-0x1e000ff])

pci 0000:01:00.0: BAR 2: assigned [io  0x1e00400-0x1e00403]

pci 0000:01:00.0: BAR 2: set to [io  0x1e00400-0x1e00403] (PCI address [0x1e00400-0x1e00403])

pci 0000:00:00.0: PCI bridge to [bus 01-01]

pci 0000:00:00.0:   bridge window [io  0x1e00000-0x1e00fff]

pci 0000:00:00.0:   bridge window [mem disabled]

pci 0000:00:00.0:   bridge window [mem 0x01100000-0x011fffff pref]

-------------PCIe Network Card (RTL8111C)---------------

PM driver module loaded
iMX6 PCIe PCIe RC mode imx_pcie_pltfm_probe entering.
PCIE: imx_pcie_pltfm_probe start link up.
link up failed, DB_R0:0x00f7bcc2, DB_R1:0x08000000!
IMX PCIe port: link down!

Please help to check it.

Thank you very much!

-Will

2014-01-21

标签 (3)
20 回复数

13,743 次查看
robertferanec
Contributor III

Hi Will,

you are right about some PCIE cards not being detected. We have tested four different PCIE cards - Ethernet, Wifi, SATA, USB.

Ethernet and Wifi were detected ok, SATA is detected only if we force the PCIE GEN1 and the USB was not detected.

I had to tweak the Realtek driver to make the Ethernet card work. I was getting this error:

"NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out"

I had to comment out the line 4064 in r8169.c (function rtl_hw_start_8168e):

"//rtl_tx_performance_tweak(pdev, 0x5 << MAX_READ_REQUEST_SHIFT);"

In the latest RTL driver they handle this line differently. After commenting the line out, the Ethernet now works ok, but to make it perfect it still would need some playing around. I still use the 3.0.35-2666 Linux (I will try the other Linux later). Also, for testing we use our open source iMX6 Rex board.

13,742 次查看
Sasamy
Contributor IV

Thank you Robert !

it works :smileyhappy:

# uname -r

3.10.17

# dmesg | grep r8169

r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded

r8169 0000:01:00.0 eth1: RTL8168evl/8111evl at 0xc091e000, 00:00:00:00:00:03, XID 0c900800 IRQ 384

r8169 0000:01:00.0 eth1: jumbo features [frames: 9200 bytes, tx checksumming: ko]

r8169 0000:01:00.0 eth1: unable to load firmware patch rtl_nic/rtl8168e-3.fw (-2)

r8169 0000:01:00.0: MRRS = 512, MPS = 128

# ifconfig eth1 hw ether 00:13:3B:0E:00:00 192.168.0.136 up

i.mx6 solo  iperf server:

------------------------------------------------------------

Server listening on TCP port 5001

TCP window size: 85.3 KByte (default)

------------------------------------------------------------

[  4] local 192.168.0.136 port 5001 connected with 192.168.0.2 port 51556

[ ID] Interval      Transfer    Bandwidth

[  4]  0.0-600.0 sec  51.6 GBytes  738 Mbits/sec

i.mx6 solo iperf client:

------------------------------------------------------------

Server listening on TCP port 5001

TCP window size: 85.3 KByte (default)

------------------------------------------------------------

[  4] local 192.168.0.2 port 5001 connected with 192.168.0.136 port 44758

[ ID] Interval      Transfer    Bandwidth

[  4]  0.0-600.0 sec  37.2 GBytes  533 Mbits/sec

# ifconfig eth1

eth1      Link encap:Ethernet  HWaddr 00:13:3B:0E:00:00

          inet addr:192.168.0.136  Bcast:0.0.0.0  Mask:255.255.255.0

          inet6 addr: fe80::213:3bff:fe0e:d110/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:80222312 errors:0 dropped:0 overruns:0 frame:0

          TX packets:32973953 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:115805800848 (107.8 GiB)  TX bytes:48454789290 (45.1 GiB)

Linux config:

Bus support  --->

  [*] PCI support

  [*] Message Signaled Interrupts (MSI and MSI-X)

  PCI host controller drivers  --->

    [*] Freescale i.MX6 PCIe controller

Device Drivers  --->

  [*] Network device support  --->

    [*]   Realtek devices

    <*> Realtek 8169 gigabit ethernet support

0 项奖励
回复

13,742 次查看
MarekVasut
Senior Contributor I

"NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out"

We keep getting this timeout on i.MX6 on both FEC and ( Intel i210 and Intel i82754 via PCIe), but Freescale keeps ignoring any of our attempts to get any support for this. This is obviously a bug somewhere else , not in the network driver ! I wish Freescale finally started to take this problem seriously and came up with a solution :-(

0 项奖励
回复

13,742 次查看
robertferanec
Contributor III

Thank you Marek. This is very important to know.

I have not try the same tests with the FEC - I will do. Before I commented out the line (rtl_tx_performance_tweak), with the Realtek, I could see the "timed out" problem always when I run "ping -s 1000 192.168.0.1". After I commented the line out, the ethernet is running ok. When I run "iperf -s" on my local computer and "iperf -c 192.168.0.86 -t 600000 -i 10" on the iMX6 board, I still occasionally can see the message, but ethernet and everything else is still working oki.

0 项奖励
回复

13,742 次查看
EgleTeam
Contributor V

Hi Robert,

which chipset uses your USB card?

Try a card using VLI800 or similiar (quite cheap cards). We have tested the bandwidth up to 110MB/s on a single USB 3.0 port ("dd").

Regards,

Manuel.

0 项奖励
回复

13,742 次查看
robertferanec
Contributor III

Hi Manuel,

our PCIE USB card uses D720200F1 chip. Please, do you know the exact name of your USB card?

Thank you,

- Robert

0 项奖励
回复

13,742 次查看
EgleTeam
Contributor V

Hi robert,

Sorry I threw the box out and the board doesn't say anything: seems to be generic. Please google "USB 3.0 PCIE" and you will find the card quickly:

pcie_usb.jpg

Is a good card to evaluate but a bad option, my guess, for final products: is thinner than it should be so the card is no stable inside the PCIe socket.

Best regards,

Manuel.

13,742 次查看
robertferanec
Contributor III

Thank you Manuel

0 项奖励
回复

13,742 次查看
robertferanec
Contributor III

Hi Will,

if it helps, our PCIE Ethernet card (RTL8168E) can be detected in our custom board (designed based on SaberSD)

IMX PCIe port: link up.

PCI: bus0: Fast back to back transfers disabled

PCI: bus1: Fast back to back transfers disabled

pci 0000:00:00.0: BAR 0: assigned [mem 0x01000000-0x010fffff 64bit pref]

pci 0000:00:00.0: BAR 0: set to [mem 0x01000000-0x010fffff 64bit pref] (PCI address [0x1000000-0x10fffff])

pci 0000:00:00.0: BAR 8: assigned [mem 0x01100000-0x011fffff]

pci 0000:00:00.0: BAR 9: assigned [mem 0x01200000-0x012fffff pref]

pci 0000:00:00.0: BAR 6: assigned [mem 0x01300000-0x0130ffff pref]

pci 0000:00:00.0: BAR 7: assigned [io  0x1e00000-0x1e00fff]

pci 0000:01:00.0: BAR 4: assigned [mem 0x01200000-0x01203fff 64bit pref]

pci 0000:01:00.0: BAR 4: set to [mem 0x01200000-0x01203fff 64bit pref] (PCI address [0x1200000-0x1203fff])

pci 0000:01:00.0: BAR 2: assigned [mem 0x01100000-0x01100fff 64bit]

pci 0000:01:00.0: BAR 2: set to [mem 0x01100000-0x01100fff 64bit] (PCI address [0x1100000-0x1100fff])

pci 0000:01:00.0: BAR 0: assigned [io  0x1e00000-0x1e000ff]

pci 0000:01:00.0: BAR 0: set to [io  0x1e00000-0x1e000ff] (PCI address [0x1e00000-0x1e000ff])

pci 0000:00:00.0: PCI bridge to [bus 01-01]

pci 0000:00:00.0:   bridge window [io  0x1e00000-0x1e00fff]

pci 0000:00:00.0:   bridge window [mem 0x01100000-0x011fffff]

pci 0000:00:00.0:   bridge window [mem 0x01200000-0x012fffff pref]

1:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06)

        Subsystem: Device 7470:3468

        Flags: fast devsel, IRQ 155

        I/O ports at 1e00000 [disabled] [size=256]

        Memory at 01100000 (64-bit, non-prefetchable) [disabled] [size=4K]

        Memory at 01200000 (64-bit, prefetchable) [disabled] [size=16K]

        Capabilities: [40] Power Management version 3

        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+

        Capabilities: [70] Express Endpoint, MSI 01

        Capabilities: [b0] MSI-X: Enable- Count=4 Masked-

        Capabilities: [d0] Vital Product Data

        Capabilities: [100] Advanced Error Reporting

        Capabilities: [140] Virtual Channel

        Capabilities: [160] Device Serial Number 63-17-00-00-68-4c-e0-00

Our kernel is 3.0.35-2666-gbdde708. Problem is now, how to make it work :smileyhappy:

0 项奖励
回复

13,742 次查看
thouswave
Contributor III

Hi Robert

I have the analogous design with you,IMX6Q custom board (designed based on SaberSD) with RTL8168E.Till now,the PCIE card can not be dectected.Can you give me any advices?

The following is my question's URL link:

https://community.freescale.com/thread/321333

Best appreciations.

0 项奖励
回复

13,742 次查看
will_chen
Contributor II

Thank you Robert.

My kernel version is 3.0.35-06433-g8e02e5d-dirty.

Because of RTL8168E can be detected in your custom board, I think maybe the hardware version of RTL ICs I tested before is too old(RTL8111C, RTL8168B, RTL8211E), or the Ethernet cards I tested are in nonstandard designing. 

I would get another RTL PCIE Ethernet card with RTL8168E for testing.

Thank you very much.

-Will

0 项奖励
回复

13,742 次查看
robertferanec
Contributor III

If it helps, we have this card:

TG-3468 - Welcome to TP-LINK


The card is now working oki, I have enabled the driver through: make menuconfig -> Device drivers -> Network device support -> Ethernet 1000Mb -> Realtek 8169 Gigabit Ethernet Support

0 项奖励
回复

13,742 次查看
will_chen
Contributor II

Hello Robert,

Can you help to check if the RTL8168E work fine in IMX6 board?

If the driver is not in kernel source, here is an url:

ftp://23.251.207.30/cn/nic/r8168-8.037.00.tar.bz2

---

By the way, did you test in linux or linux-next?

Thank,

-Will

0 项奖励
回复

13,742 次查看
robertferanec
Contributor III

Hi Will,

your link asks for login/password. The RTL8168E works oki on our board, just see my message below to Marek.

- Robert

0 项奖励
回复

13,742 次查看
MarekVasut
Senior Contributor I

Can you please try with linux-next ?

0 项奖励
回复

13,742 次查看
will_chen
Contributor II

Hello Marek,

I would try with linux-next if RTL8168E can not be detected. Thank you very much!

-Will

0 项奖励
回复

13,742 次查看
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi will.

You can have a try the newest linux BSP L3.0.35_4.1.0_130816_source.tar.gz, which you can download it from freescale website. The link is http://http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&fpsp=1&tab=Design_Tools... below Operating System Software-Board Support Packages .


0 项奖励
回复

13,742 次查看
will_chen
Contributor II

Hi Dan,

That is the verion I am using now.

So the PCIe Network Card can't be detected in this version.

Attached files are the full logs.

Thank you very much!

-Will

0 项奖励
回复

13,741 次查看
will_chen
Contributor II

Hi,

The PCIe Network Card with IC Intel PC82573L can be detected. I think the PCIe bus driver is not compatible for Realtek Network Card IC(RTL8111, RTL8211, RTL8168...).

Is there anyone can help to check it?

Thanks,

-Will

0 项奖励
回复

13,742 次查看
MarekVasut
Senior Contributor I

I'd suggest you to try with linux-next , since it contains quite a load of PCIe fixes and the PCIe bus driver is different there. But it seems like you want to use the Freescale stuff, so I'll leave this decision up to you ...

0 项奖励
回复