PCIe driver not working properly after upgrading to linux 3.8.13
HI,
I am facing problem with PCIE driver in new Linux kernel compiled for powerpc architecture (Big endian) ,freescales P2040 processor.I was using old kernel Linux version 3.0.48 previously and now updated to Linux version 3.8.13-rt9.After updating to the new kernel, PCIe device drivers not working properly and i am getting some error messages in the boot-up .My intention is to use EXAR PCIe Multiport serial driver and add 8 serial ports in addition to 4 built in serial ports provided by P2040 processor. The PCIe driver form EXAR is compiled and loaded as kernel module . The same was working with linux kernel 3.0.48 and following prints observed while loading kernel module.
linux 3.0.48 ,working insmod log
========================
Exar PCIe (XR17V35x) serial driver Revision: 1.2
0000:01:00.0: ttyXR0 at MMIO 0xc20000000 (irq = 41) is a XR17v35x
0000:01:00.0: ttyXR1 at MMIO 0xc20000400 (irq = 41) is a XR17v35x
0000:01:00.0: ttyXR2 at MMIO 0xc20000800 (irq = 41) is a XR17v35x
0000:01:00.0: ttyXR3 at MMIO 0xc20000c00 (irq = 41) is a XR17v35x
0000:01:00.0: ttyXR4 at MMIO 0xc20001000 (irq = 41) is a XR17v35x
0000:01:00.0: ttyXR5 at MMIO 0xc20001400 (irq = 41) is a XR17v35x
0000:01:00.0: ttyXR6 at MMIO 0xc20001800 (irq = 41) is a XR17v35x
0000:01:00.0: ttyXR7 at MMIO 0xc20001c00 (irq = 41) is a XR17v35x
After that ttyXR0 to ttyXR7 (7 serial devices) will be displayed under*/dev*directory .
And following PCIe driver messages in*dmesg*(linux 3.0.48 ,working )
----------------------------------------------------------------------
EDAC PCI0: Giving out device to module 'MPC85xx_edac' controller 'mpc85xx_pci_err': DEV 'ffe201000.pcie' (INTERRUPT)
MPC85xx_edac acquired irq 493 for PCI Err
MPC85xx_edac PCI err registered
PCI: Probing PCI hardware
pci 0000:00:00.0: ignoring class b20 (doesn't match header type 01)
PCIE error(s) detected
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
PCIE ERR_DR register: 0x80020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
pci 0000:00:00.0: PCI bridge to [bus 01-01]
pci 0000:00:00.0: bridge window [io 0xfdfea000-0xfdff9fff]
pci 0000:00:00.0: bridge window [mem 0xc20000000-0xc3fffffff]
pci 0000:00:00.0: bridge window [mem pref disabled]
bio: create slab <bio-0> at 0
But after upgrading kernel to 3.8.13 while inserting kernel module only following messages displayed and no ttyXR devices displayed under /dev directory .
Exar PCIe (XR17V35x) serial driver Revision: 1.2
no other messages
And following PCIe driver messages in*dmesg*(linux 3.8.13 ,not working )
----------------------------------------------------------------------
EDAC PCI0: Giving out device to module 'MPC85xx_edac' controller 'mpc85xx_pci_err': DEV 'ffe201000.pcie' (INTERRUPT)
MPC85xx_edac acquired irq 481 for PCI Err
MPC85xx_edac PCI err registered
PCI: Probing PCI hardware
fsl-pci ffe201000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
pci_bus 0000:00: root bus resource [mem 0xc20000000-0xc3fffffff] (bus address [0xe0000000-0xffffffff])
pci_bus 0000:00: root bus resource [bus 00-ff]
PCIE error(s) detected
PCIE ERR_DR register: 0x80020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCI: Cannot allocate resource region 0 of device 0000:00:00.0, will remap
pci 0000:00:00.0: BAR 0: can't assign mem (size 0x1000000)
pci 0000:00:00.0: BAR 9: can't assign mem pref (size 0x200000)
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0: bridge window [io 0x0000-0xffff]
pci 0000:00:00.0: bridge window [mem 0xc20000000-0xc3fffffff]
=========================
-----------
following lines are there in dts related to pci
pcie@ffe200000 {
reg = <0xf 0xfe200000 0x0 0x1000>; ranges = <0x2000000 0x0 0xe0000000 0xc 0x0 0x0 0x20000000 0x10000000x0 0x0 0xf 0xf8000000 0x0 0x10000>;
compatible = "fsl,p2041-pcie", "fsl,qoriq-pcie-v2.2"; device_type = "pci"; #size-cells = <0x2>; #address-cells = <0x3>; bus-range = <0x0 0xff>; clock-frequency = <0x1fca055>; interrupts = <0x10 0x2 0x1 0xf>;
pcie@0 {
ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
reg = <0x0 0x0 0x0 0x0 0x0>;
#interrupt-cells = <0x1>;
#size-cells = <0x2>;
#address-cells = <0x3>;
device_type = "pci";
interrupts = <0x10 0x2 0x1 0xf>;
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x28 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x1 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x2 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x3 0x1 0x0 0x0>;
};
};
pcie@ffe201000 {
reg = <0xf 0xfe201000 0x0 0x1000>; ranges = <0x2000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x200000000x1000000 0x0 0x0 0xf 0xf8010000 0x0 0x10000>;
compatible = "fsl,p2041-pcie", "fsl,qoriq-pcie-v2.2"; device_type = "pci"; #size-cells = <0x2>; #address-cells = <0x3>; bus-range = <0x0 0xff>; clock-frequency = <0x1fca055>; interrupts = <0x10 0x2 0x1 0xe>;
pcie@0 {
ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
reg = <0x0 0x0 0x0 0x0 0x0>;
#interrupt-cells = <0x1>;
#size-cells = <0x2>;
#address-cells = <0x3>;
device_type = "pci";
interrupts = <0x10 0x2 0x1 0xe>;
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x29 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x5 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x6 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x7 0x1 0x0 0x0>;
};
};
pcie@ffe202000 {
reg = <0xf 0xfe202000 0x0 0x1000>; ranges = <0x2000000 0x0 0xe0000000 0xc 0x40000000 0x0 0x200000000x1000000 0x0 0x0 0xf 0xf8020000 0x0 0x10000>;
compatible = "fsl,p2041-pcie", "fsl,qoriq-pcie-v2.2"; device_type = "pci"; #size-cells = <0x2>; #address-cells = <0x3>; bus-range = <0x0 0xff>; clock-frequency = <0x1fca055>; interrupts = <0x10 0x2 0x1 0xd>;
pcie@0 {
ranges = <0x2000000 0x0 0xe0000000 0x2000000 0x0 0xe0000000 0x0 0x20000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;
reg = <0x0 0x0 0x0 0x0 0x0>;
#interrupt-cells = <0x1>;
#size-cells = <0x2>;
#address-cells = <0x3>;
device_type = "pci";
interrupts = <0x10 0x2 0x1 0xd>;
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x2a 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x9 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0xa 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0xb 0x1 0x0 0x0>;
};
};
*
*
only address ffe201000 have PCIe card connected.
====================
here is the lspci output
---------------------------------
root@root:~# lspci -vvv
00:00.0 Class 0604: 1957:0411
01:00.0 Class 0700: 13a8:0358
root@root:~#
make menuconfig compile time options for linux :
---------------------------------------------------------------------
-*- Freescale Local Bus support
? ? [ ] Enable stashing of
FMAN write transactions for ethernet ports
? ? -*- Datapath
Acceleration Queue and Buffer management
? ? [*] PCI support
? ? [*] PCI Express support
? ? < > PCI Express Hotplug
driver
? ? [*] Root Port
Advanced Error Reporting support
? ? [ ] PCI Express
ECRC settings control
? ? < > PCIe AER error
injector support
? ? [ ] PCI Express ASPM
control
? ? [*] Message Signaled
Interrupts (MSI and MSI-X)
? ? [*] PCI Debugging
? ? [ ] Enable PCI resource
re-allocation detection
? ? < > PCI Stub driver
? ? [ ] PCI IOV support
? ? [ ] PCI PRI support
? ? [ ] PCI PASID support
? ? < > PCCard
(PCMCIA/CardBus) support --->
? ? <*> Support for PCI
Hotplug --->
? ? [ ] RapidIO support
I am using same device tree that i used with linux 3.0.48 .
I doubt there is basic problem with PCie driver provided with linux 3.8.x .
When I searched in this Google, I Could find that some people experienced some problem with PCIe driver in linux 3.8 after up-gradation of kernel.
Can anyone help me to get out this issue ?
Did any one faced same issue before?
Signature · 30 lines
Thanks & Regards *Gokul C G * Engineer Product Development Phone : +91-484 2861900 Mobile : Fax : +91-484 2861900 Email : [email protected] <mailto:[email protected]> Web : www.kalkitech.com <http://www.kalkitech.com> <http://www.kalkitech.com> "Disclaimer: This message is being sent from Kalki Communication Technologies Pvt Ltd (KALKITECH). and may contain information which is confidential or privileged. If you are not the intended recipient, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorized use of the content of this message can expose the responsible party to civil and/or criminal penalties, and may constitute a more serious offense. Further the company does not accept liability for any errors, omissions, viruses or computer problems experienced as a result of this transmission. If you have received this message in error, notice is hereby given that no representation, contract or other binding obligation shall be created by this e-mail."
Quoted 8 lines · Gokul C G
HI,
I am facing problem with PCIE driver in new Linux kernel compiled for powerpc architecture (Big endian) ,freescales P2040 processor.I was using old kernel Linux version 3.0.48 previously and now updated to Linux version 3.8.13-rt9.After updating to the new kernel,
3.8.13-rt9 is also an old kernel. :-)
It is also presumably a Freescale SDK kernel (not even the most recent one), so it would be best to stick with community.freescale.com (you didn't follow up to my response there) or, in the case of problems with third party code you've added on to the SDK kernel, the support channels of whoever provided you with the software.
Quoted 12 lines
PCIe device drivers not working properly and i am getting some error
messages in the boot-up .My intention is to use EXAR PCIe Multiport
serial driver and add 8 serial ports in addition to 4 built in serial ports provided by P2040 processor. The PCIe driver form EXAR is compiled and loaded as kernel module . The same was working with linux kernel 3.0.48 and following prints observed while loading kernel module.linux 3.0.48 ,working insmod log
Quoted 6 lines
========================
Exar PCIe (XR17V35x) serial driver Revision: 1.2
I don't see this driver in the kernel tree. We can't help you with code we can't see. Are you sure that the driver is expected to work with 3.8? Have you tried debugging it and/or contacting Exar for support with their driver?
Quoted 32 lines
PCI: Probing PCI hardware
fsl-pci ffe201000.pcie: PCI host bridge to bus 0000:00
pci_bus0000:00: root bus resource [io 0x0000-0xffff]
pci_bus0000:00: root bus resource [mem 0xc20000000-0xc3fffffff] (bus address [0xe0000000-0xffffffff])
pci_bus0000:00: root bus resource [bus 00-ff]PCIE error(s) detected
PCIE
ERR_DRregister:0x80020000PCIE
ERR_CAP_STATregister:0x80000001PCIE
ERR_CAP_R0register:0x00000800pci 0000:00:00.0: PCI bridge to [bus 01-ff]
PCIE
ERR_CAP_R1register:0x00000000PCIE
ERR_CAP_R2register:0x00000000PCIE
ERR_CAP_R3register:0x00000000PCI: Cannot allocate resource region 0 of device 0000:00:00.0, will remap
pci 0000:00:00.0: BAR 0: can't assign mem (size
0x1000000)
Quoted 10 lines
pci 0000:00:00.0: BAR 9: can't assign mem pref (size
0x200000)pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0: bridge window [io 0x0000-0xffff]
pci 0000:00:00.0: bridge window [mem 0xc20000000-0xc3fffffff]
I get very similar errors on Freescale's SDK 1.5 kernel (based on v3.8.13-rt9), and it doesn't stop a PCIe network card from working. So I wouldn't focus too much on these errors.
-Scott
----- Original Message -----
Quoted 5 lines
From: "Gokul C G" <[email protected]>
Sent: Tuesday, August 19, 2014 9:43:38 AMHI,
Quoted 11 lines
I am facing problem with PCIE driver in new Linux kernel compiled for powerpc architecture (Big endian) ,freescales P2040 processor.I was using old kernel Linux version 3.0.48 previously and now updated to Linux version 3.8.13-rt9.After updating to the new kernel, PCIe device drivers not working properly and i am getting some error messages in the boot-up .My intention is to use EXAR PCIe Multiport serial driver and add 8 serial ports in addition to 4 built in serial ports provided by P2040 processor. The PCIe driver form EXAR is compiled and loaded as kernel module . The same was working with linux kernel 3.0.48 and following prints observed while loading kernel module.
Have you attempted to use the XR17V35x support present in the updated version of the kernel that you're using (I assume it's Freescale SDK 1.4.x)?
8250 core support for Exar parts:
http://git.freescale.com/git/cgit.cgi/ppc/sdk/linux.git/tree/drivers/tty/serial/8250/8250.c?h=sdk-v.1.4.x#n296
PCI vendor and device IDs for 2, 4 and 8 port Exar parts:
http://git.freescale.com/git/cgit.cgi/ppc/sdk/linux.git/tree/drivers/tty/serial/8250/8250_pci.c?h=sdk-v.1.4.x#n1722
-Aaron
Quoted 13 lines · Gokul C G
HI all,
Thank you very much for your information .I solved my problem !!!
Here is my findings
=====================
I found out that support for the PCIe serial extension for
( XR17V35x) has been added to the standard Linux serial driver. If I just need to transmit/receive data, then this driver will work perfectly fine. The deficiencies is that you can not use any of the enhanced features in the XR17V35x such as the larger FIFOs, automatic hardware/software flow control, auto RS-485 half-duplex control, etc.
Quoted 5 lines
Now I have 2 options:
1. Remove support for the XR17V35x IDs and re-compile the kernel, then use the module driver.
2. Use an external EEPROM to use different Vendor and/or Device IDs so that you can use the module driver.
3. Remove the generic PCI serial driver from your config.
4. Dynamically unbind the device using sysfs, and either defer module loading until after this, or rebind it to the already-loaded specialized driver using sysfs.
5. Add these features to the standard PCI serial driver. :-)
-Scott