On 07/19/2011 11:40 PM, Oliver Hartkopp wrote: > Sorry Marc, i was probably wrong with my assumption below:
no problem - I should submit a patch the documents the not using (setting) of the FLEXCAN_MCR_SRX_DIS bit. :) Took me quite long to find that bit again. > There IS a significant difference in the flexcan_chip_start() function of the > 'freescale modified' flexcan driver posted by Mike: > > The FLEXCAN_MCR_SRX_DIS bit is set there, which means: > > ---8<--- > This bit defines whether FlexCAN is allowed to receive frames transmitted by > itself. If this bit is set to 1, frames transmitted by the module are not > stored in any message buffer, regardless if the message buffer is programmed > with an ID that matches the transmitted frame, and no interrupt flag or > interrupt signal is generated due to the frame reception. > 0 Self reception enabled > 1 Self reception disabled > ---8<--- > > See the diff here: > > --- flexcan 2011-07-19 23:30:55.411117151 +0200 > +++ net-next-2.6/drivers/net/can/flexcan.c 2011-06-21 15:20:23.220000347 > +0200 > @@ -540,12 +675,12 @@ > * choose format C > * > */ > - reg_mcr = flexcan_cb->read(®s->mcr); > + reg_mcr = readl(®s->mcr); > reg_mcr |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_FEN | FLEXCAN_MCR_HALT | > - FLEXCAN_MCR_SUPV | FLEXCAN_MCR_WRN_EN | FLEXCAN_MCR_IDAM_C | > - FLEXCAN_MCR_SRX_DIS; > + FLEXCAN_MCR_SUPV | FLEXCAN_MCR_WRN_EN | > + FLEXCAN_MCR_IDAM_C; > dev_dbg(dev->dev.parent, "%s: writing mcr=0x%08x", __func__, reg_mcr); > - flexcan_cb->write(reg_mcr, ®s->mcr); > + writel(reg_mcr, ®s->mcr); > > /* > * CTRL > > > Mike, please check if removing the FLEXCAN_MCR_SRX_DIS bit in reg_mcr fixes > the > problem, when 'dev->flags |= IFF_ECHO' is enabled again. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
