public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
* [Bug 1001668] New: Fix: phy_read() function returns bad values if interrupt occurs
@ 2012-09-06 22:32 bugzilla-daemon
  2012-09-09  9:37 ` [Bug 1001668] " bugzilla-daemon
  2012-09-20 22:34 ` bugzilla-daemon
  0 siblings, 2 replies; 3+ messages in thread
From: bugzilla-daemon @ 2012-09-06 22:32 UTC (permalink / raw)
  To: ecos-patches

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001668

           Summary: Fix: phy_read() function returns bad values if
                    interrupt occurs
           Product: eCos
           Version: CVS
          Platform: Custom (Customer specific)
        OS/Version: PowerPC
            Status: UNCONFIRMED
          Severity: minor
          Priority: low
         Component: Patches and contributions
        AssignedTo: unassigned@bugs.ecos.sourceware.org
        ReportedBy: sarcastic.mannequin@gmail.com
                CC: ecos-patches@ecos.sourceware.org
             Class: Advice Request


Created an attachment (id=1931)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1931)
cvs diff: if_fec.c interrupt handling fix

The phy_read() function can return bad values if interrupts occurs during
reading a PHY register.

During interrupt handling the iEvent_MII bit is incorrectly cleared. That bit
is polled in phy_read() and phy_write() functions and should not be cleared in
the interrupt handler.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug 1001668] Fix: phy_read() function returns bad values if interrupt occurs
  2012-09-06 22:32 [Bug 1001668] New: Fix: phy_read() function returns bad values if interrupt occurs bugzilla-daemon
@ 2012-09-09  9:37 ` bugzilla-daemon
  2012-09-20 22:34 ` bugzilla-daemon
  1 sibling, 0 replies; 3+ messages in thread
From: bugzilla-daemon @ 2012-09-09  9:37 UTC (permalink / raw)
  To: ecos-patches

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001668

Bernd Edlinger <bernd.edlinger@hotmail.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernd.edlinger@hotmail.de

--- Comment #1 from Bernd Edlinger <bernd.edlinger@hotmail.de> 2012-09-09 10:37:09 BST ---
Well, when I look at that code I wonder
if this can really happen. The reason for this is:

phy_read() and phy_write() are static functions
which are only called from fec_eth_init().

And as far as I know the fec_eth_deliver should never
be called within fec_eth_init(), even if Interrupts
are enabled. The dsr function eth_drv_dsr() should only
trigger the execution of fec_eth_deliver() in the
ethernet handler thread, but threading is not enabled
when fec_eth_init() is called. Right?

Are you using FreeBSD or lwIP?

Are you able to reproduce this in a debugger?

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug 1001668] Fix: phy_read() function returns bad values if interrupt occurs
  2012-09-06 22:32 [Bug 1001668] New: Fix: phy_read() function returns bad values if interrupt occurs bugzilla-daemon
  2012-09-09  9:37 ` [Bug 1001668] " bugzilla-daemon
@ 2012-09-20 22:34 ` bugzilla-daemon
  1 sibling, 0 replies; 3+ messages in thread
From: bugzilla-daemon @ 2012-09-20 22:34 UTC (permalink / raw)
  To: ecos-patches

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001668

--- Comment #2 from sarcastic.mannequin@gmail.com 2012-09-20 23:33:41 BST ---
Ah, sorry, I've gotten ahead of myself. The current public version of this
Ethernet driver does not yet support reading/writing of PHY registers.

The current driver does not have ETH_PHY_REG_LEVEL_ACCESS_FUNS macro. But
when/if it does, it will be an error to be clearing event bits in the ISR/DSR
that should not be touched. We have seen this issue cause problems on a
modified driver.

You are correct, it is not an error now. This bug can be closed or applied as
you see fit.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-20 22:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-06 22:32 [Bug 1001668] New: Fix: phy_read() function returns bad values if interrupt occurs bugzilla-daemon
2012-09-09  9:37 ` [Bug 1001668] " bugzilla-daemon
2012-09-20 22:34 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).