From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Kleine-Budde Subject: Re: [PATCH 3/3] can: at91_can: make can_id of mailbox 0 configurable Date: Tue, 11 Jan 2011 13:33:49 +0100 Message-ID: <4D2C4E2D.7050309@pengutronix.de> References: <1294741688-22699-1-git-send-email-mkl@pengutronix.de> <1294741688-22699-4-git-send-email-mkl@pengutronix.de> <4D2C42F0.5080703@grandegger.com> <4D2C4586.60207@pengutronix.de> <4D2C4CC1.4070109@grandegger.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8643973702659565235==" Cc: Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Wolfgang Grandegger Return-path: In-Reply-To: <4D2C4CC1.4070109-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org Errors-To: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org List-Id: netdev.vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============8643973702659565235== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3889995BBD6100A3669589EA" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3889995BBD6100A3669589EA Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 01/11/2011 01:27 PM, Wolfgang Grandegger wrote: > On 01/11/2011 12:56 PM, Marc Kleine-Budde wrote: >> On 01/11/2011 12:45 PM, Wolfgang Grandegger wrote: >>> On 01/11/2011 11:28 AM, Marc Kleine-Budde wrote: >>>> Due to a chip bug (errata 50.2.6.3 & 50.3.5.3 in >>>> "AT91SAM9263 Preliminary 6249H-ATARM-27-Jul-09") the contents of mai= lbox >>>> 0 may be send under certain conditions (even if disabled or in rx mo= de). >>>> >>>> The workaround in the errata suggests not to use the mailbox and loa= d it >>>> with a unused identifier. >>>> >>>> This patch implements the second part of the workaround. A sysfs ent= ry >>>> "mb0_id" is introduced. While the interface is down it can be used t= o >>>> configure the can_id of mailbox 0. The default value id 0x7ff. >>>> >>>> In order to use an extended can_id add the CAN_EFF_FLAG (0x80000000U= ) >>>> to the can_id. Example: >>>> >>>> - standard id 0x7ff: >>>> echo 0x7ff > /sys/class/net/can0/mb0_id >>>> >>>> - extended if 0x1fffffff: >> ^^ >> I've fixed the typo on my git repo. I'll send an updated series later.= >> >>>> echo 0x9fffffff > /sys/class/net/can0/mb0_id >>> >>> As this is a device specific property, I think it should go into >>> /sys/class/net/can0/device/. >> >> The attribute goes autoamtically to /sys/class/net/can0 if you add it = to >> the driver via: >> >> + dev->sysfs_groups[0] =3D &at91_sysfs_attr_group; >> >> I've copied this from the janz-ican3 driver[1]. >=20 > Oh, I missed that. And also the Softing driver does it that way :-(. Th= e > member has the comment: >=20 > /* space for optional device, statistics, and wireless sysfs groups *= / > const struct attribute_group *sysfs_groups[4]; >=20 > Therefore it seems to be legal to use it for device specific properties= =2E I'm not really happy with these sysfs approach, but it's quick implemented. Is device specific rtnetlink an option here? cheers, Marc --=20 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 | --------------enig3889995BBD6100A3669589EA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0sTi0ACgkQjTAFq1RaXHP37ACfT6GdHTgr1Ks6yNpGUFB7mJJF 5GUAn0o3n7fhGRoAddNhs4aTCZUc7tzu =70nh -----END PGP SIGNATURE----- --------------enig3889995BBD6100A3669589EA-- --===============8643973702659565235== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Socketcan-core mailing list Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org https://lists.berlios.de/mailman/listinfo/socketcan-core --===============8643973702659565235==--