Bug 197266 - DWC interface panics ODROID-C1
Summary: DWC interface panics ODROID-C1
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-02-02 06:54 UTC by john
Modified: 2015-07-02 14:07 UTC (History)
1 user (show)

See Also:


Attachments
patch for dwc panic (1.94 KB, patch)
2015-02-02 06:54 UTC, john
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description john 2015-02-02 06:54:23 UTC
Created attachment 152470 [details]
patch for dwc panic

Description:

I'm in the process of bringing up the ethernet interface on
the ODROID-C1 which uses the DWC MAC.

Currently FreeBSD reports that the DWC attach failed due to
"Can't reset DWC.\n" and shortly afterwards panics in dwc_intr
when it executes DWC_LOCK(sc).

The problem is resetting the DWC checks for "i == 0" as a sign
that the reset failed, however the loop starts at zero and counts
up ... the condition being checked is incorrect.  Also the interrupt
handler probably shouldn't be installed so early (currently attach
doesn't cleanup on failure).

How-To-Repeat:

Build FreeBSD for the ODROID-C1 (this requires patches not yet
committed to the source tree) and boot the OS.

Fix:

With the supplied patch DWC successfully attaches.  There are other
issues preventing DWC from sending / receiving packets which I'm
still looking at.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2015-03-12 05:09:50 UTC
This patch will be more likely to get attention here.
Comment 2 john 2015-03-12 17:24:38 UTC
I believe Ruslan Bukin address this in commit 278670.
Comment 3 Luiz Otavio O Souza,+55 (14) 99772-1255 freebsd_committer freebsd_triage 2015-07-02 14:07:52 UTC
Fixed in r278670.