Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install gasket-dkms #223

Closed
Harishrelysys opened this issue Sep 18, 2020 · 8 comments
Closed

Unable to install gasket-dkms #223

Harishrelysys opened this issue Sep 18, 2020 · 8 comments
Labels
documentation Improvements or additions to documentation PCIe Issue relating to our pcie modules

Comments

@Harishrelysys
Copy link

I'm trying to install pcie drivers on my armv8 board which has yocto. I'm using Renesas G2M processor with 4.19 kernel. I installed dkms but now it is asking for linux-headers, which isn't there. Is there any other way to install gasket-dkms without apt-get ??

@Namburger Namburger added the PCIe Issue relating to our pcie modules label Sep 18, 2020
@Namburger
Copy link

@Harishrelysys the linux-hearders package is requires to do a dkms build.
The source code is available here: https://coral.googlesource.com/linux-imx/+/refs/heads/release-day/drivers/staging/gasket
The only way I believe this could work is to add this to your kernel source and build but I'm not sure the exact procedure for this.
Keep in mind that currently we are only supporting debian: https://coral.ai/docs/m2/get-started#requirements

@Harishrelysys
Copy link
Author

Harishrelysys commented Sep 21, 2020

Hi Namburger,
Thank you for the fast reply.We copied the source code from : https://coral.googlesource.com/linux-imx/+/refs/heads/release-day/drivers/staging/gasket and enabled the driver.We got /dev/apex_0 device.

But in dmesg we are getting error like

[ 2.471002] apex 0000:01:00.0: Couldn't initialize interrupts: -22

Below is my pcie and apex log

dmesg | grep -i "pcie"
[ 0.138955] rcar-pcie fe000000.pcie: host bridge /soc/pcie@fe000000 ranges:
[ 0.138984] rcar-pcie fe000000.pcie: IO 0xfe100000..0xfe1fffff -> 0x00000000
[ 0.139001] rcar-pcie fe000000.pcie: MEM 0xfe200000..0xfe3fffff -> 0xfe200000
[ 0.139015] rcar-pcie fe000000.pcie: MEM 0x30000000..0x37ffffff -> 0x30000000
[ 0.139026] rcar-pcie fe000000.pcie: MEM 0x38000000..0x3fffffff -> 0x38000000
[ 0.153273] rcar-pcie fe000000.pcie: PCIe x1: link up
[ 0.163424] rcar-pcie fe000000.pcie: Current link speed is 5 GT/s
[ 0.163519] rcar-pcie fe000000.pcie: PCI host bridge to bus 0000:00
[ 0.177358] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[ 0.177447] pcieport 0000:00:00.0: Signaling PME with IRQ 220

dmesg | grep -i "apex"
[ 2.462274] apex 0000:01:00.0: enabling device (0000 -> 0002)
[ 2.468483] apex 0000:01:00.0: Couldn't initialize interrupts: -22

And also I have an sample application which works fine with usb coral tpu.But with pcie it is giving same initialize interrupts:-22 error.

We have pcie gen 2.0

lspci -vvv log:

./lspci -vvv
00:00.0 PCI bridge: Renesas Technology Corp. Device 002b (prog-if 00 [Normal decode])
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin ? routed to IRQ 222
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        I/O behind bridge: 0000f000-00000fff [empty]
        Memory behind bridge: fff00000-000fffff [empty]
        Prefetchable memory behind bridge: 38000000-381fffff [size=2M]
        Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
        BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable+ 64bit+
                Address: 00000000bcf24000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [70] Express (v2) Root Port (Slot-), MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0
                        ExtTag+ RBE+
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s, Exit Latency L0s unlimited
                        ClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 5GT/s, Width x1, TrErr- Train- SlotClk- DLActive+ BWMgmt- ABWMgmt-
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                         AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                         AtomicOpsCtl: ReqEn- EgressBlck-
                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [100 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Kernel driver in use: pcieport

01:00.0 System peripheral: Device 1ac1:089a (prog-if ff)
        Subsystem: Device 1ac1:089a
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 194
        Region 0: Memory at 38100000 (64-bit, prefetchable) [size=16K]
        Region 2: Memory at 38000000 (64-bit, prefetchable) [size=1M]
        Capabilities: [80] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0.000W
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range ABCD, TimeoutDis+, LTR+, OBFF Not Supported
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
                         AtomicOpsCtl: ReqEn-
                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [d0] MSI-X: Enable- Count=128 Masked-
                Vector table: BAR=2 offset=00046800
                PBA: BAR=2 offset=00046068
        Capabilities: [e0] MSI: Enable- Count=1/32 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [f8] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [100 v1] Vendor Specific Information: ID=1556 Rev=1 Len=008 <?>
        Capabilities: [108 v1] Latency Tolerance Reporting
                Max snoop latency: 0ns
                Max no snoop latency: 0ns
        Capabilities: [110 v1] L1 PM Substates
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                          PortCommonModeRestoreTime=10us PortTPowerOnTime=10us
                L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                           T_CommonMode=0us LTR1.2_Threshold=0ns
                L1SubCtl2: T_PwrOn=10us
        Capabilities: [200 v2] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 14, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 40000001 0000000f bcf24000 00000000
        Kernel driver in use: apex

Thanks and regards,
Harish

@Namburger
Copy link

Hey Harish - apologies for the issue, it seems that your CPU doesn't support MSI-X which is necessary for our pcie devices:

        Capabilities: [d0] MSI-X: Enable- Count=128 Masked-

I'll work with my team to get this documented

@Namburger Namburger added the documentation Improvements or additions to documentation label Sep 21, 2020
@Harishrelysys
Copy link
Author

Hi Namburger,
Thanks for your inputs.Do you have any plan to support pcie with MSI interrupt in future.

Thanks and regards,
Harish

@Namburger
Copy link

@Harishrelysys unfortunately, we don't have a plan to support MSI on our side

@gavan1
Copy link

gavan1 commented Feb 4, 2021

Hey Harish - apologies for the issue, it seems that your CPU doesn't support MSI-X which is necessary for our pcie devices:

        Capabilities: [d0] MSI-X: Enable- Count=128 Masked-

I'll work with my team to get this documented

@Namburger who is we? Are you part of the coral team? Could you elaborate on steps to take to verify if the Bananapi M4 supports MSI-X, unless you have a device in your lab. I can loop you in with Banana Pi’s team.

@Namburger
Copy link

@gavan1 with with coral team, our engs have a bananapi now but as I mentioned, msi-x is required at the moment for our gasket driver. It is now documented on the requirements part of our m.2 getting started page. There are on going work to make this possible but we are experiencing road blocks

@Namburger
Copy link

See here: #280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation PCIe Issue relating to our pcie modules
Projects
None yet
Development

No branches or pull requests

3 participants