EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  2025  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  2025 
<== Date ==> <== Thread ==>

Subject: Re: mrfioc2 Linux driver
From: Steve Kinder - UKRI STFC <[email protected]>
To: Michael Davidsaver <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 10 Aug 2018 08:56:51 +0000
Yes I'm using the 2-2-0 driver. Lines in my 731-738 in my uic_mrf.c match yours. What might lead to the driver expecting 0x18?


The lspci output is as follows:


# lspci -vv -nn -s 81:0.0
81:00.0 Signal processing controller [1180]: Xilinx Corporation Device [10ee:7011]
    Subsystem: Device [1a3e:132c]
    Physical Slot: 6
    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-
    Interrupt: pin A routed to IRQ 38
    NUMA node: 1
    Region 0: Memory at fbe00000 (32-bit, non-prefetchable) [size=256K]
    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: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
        Address: 0000000000000000  Data: 0000
    Capabilities: [60] Express (v2) Endpoint, MSI 00
        DevCap:    MaxPayload 256 bytes, PhantFunc 1, 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 256 bytes, MaxReadReq 512 bytes
        DevSta:    CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
        LnkCap:    Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Exit Latency L0s unlimited, L1 unlimited
            ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
        LnkCtl:    ASPM Disabled; RCB 64 bytes Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta:    Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR-, OBFF Not Supported
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
        LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
             EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
    Capabilities: [100 v1] Device Serial Number 00-00-00-00-00-00-00-00
    Kernel modules: mrf

Steve


________________________________
From: Michael Davidsaver <[email protected]>
Sent: 10 August 2018 06:48:21
To: Kinder, Steve (STFC,DL,TECH)
Cc: [email protected]
Subject: Re: mrfioc2 Linux driver

On 08/09/2018 08:21 AM, Steve Kinder - UKRI STFC wrote:
> Hi Michael
>
>
> Thanks for your response.
>
>
> Yes we require the PSI version for the VME-EVR/M-300s we also use.
>
>
> I have moved on from my original problem. Of course you have to do a make in the mrmShared/linux directory before doing the command documented to install the driver.
>
>
> I got compilation errors when trying to make the 3-0-0 driver. Since it should work with my IOC and a PCIe-EVR-300DC, and the driver with 2-2-0 builds, I have gone over to mrfioc2 2-2-0 for this. I still get the original STACKPOINTER message on installation but the driver is copied to /lib/modules/`uname -r`/extra so I think that's all ok?

>> Makefile:641: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler

This error suggests that your build is using a different gcc version (< 4.9) then was used to
build the kernel.  I don't believe that the gcc stack protector change the ABI or calling
conventions, so it should be ok to mix objects built with and without this option.

https://lwn.net/Articles/584225/

You can add "V=1" to your make to see which gcc executable is being used.

> I executed 'depmod -a', 'modprobe mrf' and rebooted.
>
>
> My current problem (I think) is:
>
>
> 'grep mrf /proc/devices' returns nothing
>
>
> 'dmesg | grep mrf' produces:
>
>
> [    5.296883] mrf-pci 0000:81:00.0: Attaching MRF device w/o PLX bridge (00007011)
> [    5.296898] mrf-pci 0000:81:00.0: no match for version 0x04020017 against 18
>
> Neither of these seem right?

Definitely wrong..  The second message looks like a mixup in the linux driver code,
which is doing a cross comparison between the PCI ID of each device,
and the MRF form factor code.  The card advertises type 0x17 (PCIe EVR) which
is to be expected from a PCIe-EVR-300DC.  However, the driver apparently
wants this to be 0x18 (MTCA EVR).

This doesn't match up with what I have in:

https://github.com/epics-modules/mrfioc2/blob/master/mrmShared/linux/uio_mrf.c#L731-L738

If you are using the kernel module from 2.2.0 then please send the output of

> lspci -vv -nn -s 81:0.0


> 'lsmod | grep mrf' produces:
>
>
> mrf                    18124  0
> uio                    19259  1 mrf
> parport                42348  1 mrf
>
> My attempts to use mrmEvrSetupPCI from the IOC have so far failed. Preumambly in part down to the abover 'error' reported via dmesg?

Correct.  Until the linux driver initializes successfully the userspace component can't do much.
Look for "MRF Setup complete" to be printed, and a file /dev/uio* to be created.

https://github.com/epics-modules/mrfioc2/blob/master/mrmShared/linux/uio_mrf.c#L671

Replies:
Re: mrfioc2 Linux driver Jeong Han Lee
References:
mrfioc2 Linux driver Steve Kinder - UKRI STFC
Re: mrfioc2 Linux driver Michael Davidsaver
Re: mrfioc2 Linux driver Steve Kinder - UKRI STFC
Re: mrfioc2 Linux driver Michael Davidsaver

Navigate by Date:
Prev: Re: mrfioc2 Linux driver Michael Davidsaver
Next: Re: mrfioc2 Linux driver Jeong Han Lee
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  2025 
Navigate by Thread:
Prev: Re: mrfioc2 Linux driver Michael Davidsaver
Next: Re: mrfioc2 Linux driver Jeong Han Lee
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  2025