Marc Kleine-Budde <[email protected]> schrieb am 01.08.2011 14:55:55:
> > i've attached a patch for the Peak CAN PCI driver, which enables
support
> > for the 3rd and 4th channel available on some cards. It works* for me.
>
> Thanks for the patch. Please don't attach patches, rather post them
> inline. Please follow the cannonical patch format as documented here:
> http://lxr.linux.no/linux+v3.0/Documentation/SubmittingPatches
Thank You for the comments, i will try to make it more beautiful, test it
and send it again it next week.
> I just noticed that this patch is against the berlios tree. I don't know
> if there is a mainline driver that supports the peak pci cards.
Sorry i forgot to mention that, i thought the mailing list was only for
this (berlios) tree.
> > + if ((err = peak_pci_add_chan(pdev, 2, &master_dev))) { goto
> failure_cleanup; }
> > + }
> > +
> > + if (sub_sys_id >= 12) { // 4th channel
> > + if ((err = peak_pci_add_chan(pdev, 3, &master_dev))) { goto
> failure_cleanup; }
> > }
>
> please fix the comments, and reformat the if:
>
> if (foo)
> bar();
>
> If the "8" would be correct, you cae use a "for" look to activate the
> slave channels.
The value is correct, I re-checked it against the driver from Peak
Systems. Also, a for-loop would be much too slow, as we need the system to
start up as fast as possible. An unrolled loop saves us a few nanoseconds
during start up :p
Regards,
Thomas
--------
Thomas Wiedemann
Entwicklungsingenieur / Fahrerassistenz & Funktionale Sicherheit
IAV GmbH / Kauffahrtei 25 / 09120 CHEMNITZ / GERMANY
Sitz/Registered Office: Berlin,
Registergericht/Registration Court: Amtsgericht Charlottenburg,
Registernummer/Company Registration Number: HRB 21 280,
Geschäftsführer/Managing Directors: Kurt Blumenröder, Michael Schubert,
Dr. Rüdiger Goyk
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users