]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] char/moxa.c: fix endianess and multiple-card issues
authorDirk Eibach <eibach@gdsys.de>
Sun, 27 Aug 2006 08:23:36 +0000 (01:23 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 27 Aug 2006 18:01:29 +0000 (11:01 -0700)
commitdfd7a0d723d7c22d3e06f2b4c1e75e2d95a25748
treef4db2c5759345e4b06310b633b8cee241842bdf6
parent30e9921a2d0d6c324cfe18a37b1551134906c45a
[PATCH] char/moxa.c: fix endianess and multiple-card issues

While testing Moxa C218T/PCI on PowerPC 405EP I found that loading firmware
using the linux kernel driver fails because calculation of the checksum is
not endianess independent in the original code.

After I fixed this I found that uploading firmware in a system with
multiple cards causes a kernel oops.  I had a look in the recent moxa
sources and found that they do some kind of locking there.  Applying this
lock fixed the problem.

Alan sayeth:

  Checksum changes are clearly correct.  Other changes is an improvement but
  not I think enough to handle malicious firmware attacks.  That said such an
  attacker has CAP_SYS_RAWIO anyway so that part is irrelevant except for
  neatness.

[akpm@osdl.org: cleanups]
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/moxa.c