Hello Ulrich!

On Tue, 16 May 2006 [EMAIL PROTECTED] wrote:
> I don't know your hardware, but i think it's a not a hardware problem.
> Your desctription sounds more than a compiler optimization problem.
>
> Ok, this is your READ_REG definition,
>
>  /** Read access to a register of the SJA1000 CAN controller */
> #define READ_REG(base, register) \
>     readb((void *)(base+register))
>
> please try this one:
>
>  /** Read access to a register of the SJA1000 CAN controller */
> #define READ_REG(base, register) \
>     readb((volatile void *)(base+register))

Thank you for your suggestion. In my initial mail I forgot to mention that
the problem of an over-optimising compiler came into my mind, too. I tried
several workarounds to exclude every effect of the compiler (compiling
with -O0 instead of -O2, replacing readb directly with the definition
used in the Linux Kernel sources, and lastly disassembling the driver to
assure myself that there are really memory access commands to the IO
memory). Also, when I compile the driver with the change you suggested,
the kernel module is not different to that compiled without that change.
But I am desperate enough to try this one out. (That means mailing your
suggestion to the person who owns the Advantech CAN card; developing a
driver without the possibility to test it is really difficult.)


Regards,

Sebastian

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to