[RTEMS Project] #2370: rtems/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c:1560: possible bad if ?

RTEMS trac trac at rtems.org
Tue Jul 14 20:19:51 UTC 2015


#2370: rtems/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c:1560:
possible bad if ?
---------------------+---------------------
 Reporter:  dcb      |       Owner:
     Type:  defect   |      Status:  new
 Priority:  normal   |   Milestone:  4.11.1
Component:  General  |     Version:  4.12
 Severity:  normal   |  Resolution:
 Keywords:           |
---------------------+---------------------

Comment (by joel.sherrill):

 I didn't check this file but assume it is based on the one in NetBSD.

 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/pci/if_wm.c?rev=1.336
 &content-type=text/x-cvsweb-markup&only_with_tag=MAIN

 Double check me but I think the code is now this:

                 /* XXX Hardware bug?? */
                 if (sc->sc_type == WM_T_82544 && (reg & 0xe) == 1) {
                         bit = CSR_READ(sc, mta_reg + ((reg - 1) << 2));

 That looks better to me.

 If that resolves the issue and the code still works, update this ticket
 with a patch.

--
Ticket URL: <http://devel.rtems.org/ticket/2370#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list