Bug 197266

Summary: DWC interface panics ODROID-C1
Product: Base System Reporter: john
Component: armAssignee: freebsd-arm (Nobody) <freebsd-arm>
Status: Closed FIXED    
Severity: Affects Only Me CC: loos
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch for dwc panic none

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.