Bug 95077 - [firewire] fatal trap 19 at fwohci_pci_init
Summary: [firewire] fatal trap 19 at fwohci_pci_init
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-firewire (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-29 16:00 UTC by Gabor MICSKO
Modified: 2007-06-14 07:37 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor MICSKO 2006-03-29 16:00:30 UTC
The theory here is that the device may not be properly initializing its on-chip memory, leaving some of it in a parity errored state, and enabling parity check may result in the device blowing up.

Error message:
http://hup.hu/old/images/trey/work/clevo_core_duo/S3600052.JPG

Fix: Relevant threads:

http://marc.theaimsgroup.com/?l=dragonfly-kernel&m=109967161431080&w=2

See this commit:

http://www.dragonflybsd.org/cvsweb/src/sys/bus/firewire/fwohci_pci.c?rev=1.16&content-type=text/x-cvsweb-markup

Or:



+       /*
+        * Clear PCIM_CMD_MWRICEN as per FreeBSD/1.20, but note that the
+        * problem may have been related to SERR and PERR being
+        * unconditionally enabled in that rev.
+        *
+        * Do not change the SERRESPEN or PERRESPEN bits.  Use the BIOS
+        * values (probably off).  This crashes some machines in
fwohci_init().
+        *
+        * The theory here is that the device may not be properly
initializing
+        * its on-chip memory, leaving some of it in a parity errored
state,
+        * and enabling parity check may result in the device blowing
up.
+        * It's also possible that some hardware is just plain broken.
OpenBSD
+        * does not turn on SERRESPEN or PERRESPEN so we won't either.
+        */
        cmd = pci_read_config(self, PCIR_COMMAND, 2);
-       cmd |= PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MWRICEN
|
-               PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN;
-#if 1  /* for broken hardware */
+       cmd |= PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN;
        cmd &= ~PCIM_CMD_MWRICEN;
-       cmd &= ~(PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN);
-#endif
        pci_write_config(self, PCIR_COMMAND, cmd, 2);

        /*--eYvGKBtip12U9eUPEWikXWPfjq4Rpw8ronq51o9SSnbjVJkK
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- fwohci_pci.c.orig   Mon Mar 27 22:11:47 2006
+++ fwohci_pci.c        Mon Mar 27 22:36:47 2006
@@ -240,13 +240,23 @@
        int olatency, latency, ocache_line, cache_line;
        uint16_t cmd;
How-To-Repeat: Boot with unpatched kernel.
Comment 1 Craig Rodrigues freebsd_committer freebsd_triage 2006-03-29 21:01:56 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-firewire

Firewire bug
Comment 2 dfilter service freebsd_committer freebsd_triage 2007-03-15 14:11:56 UTC
simokawa    2007-03-15 14:11:46 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/firewire     fwohci_pci.c 
  Log:
  Don't mess with PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN.
  This will fix 'NMI RAM parity error' while booting on some machines.
  
  PR: kern/95077
  MFC after: 3 days
  
  Revision  Changes    Path
  1.57      +1 -3      src/sys/dev/firewire/fwohci_pci.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 dfilter service freebsd_committer freebsd_triage 2007-03-19 05:11:15 UTC
simokawa    2007-03-19 05:11:07 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sys/dev/firewire     fwohci_pci.c 
  Log:
  MFC: rev 1.57
  Don't mess with PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN.
  This will fix 'NMI RAM parity error' while booting on some machines.
  
  PR: kern/95077
  
  Revision  Changes    Path
  1.52.2.1  +1 -3      src/sys/dev/firewire/fwohci_pci.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 simokawa freebsd_committer freebsd_triage 2007-03-22 02:52:51 UTC
State Changed
From-To: open->feedback

A fix is committed
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2007-06-14 07:37:27 UTC
State Changed
From-To: feedback->closed

Patched and MFCed.