NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/46676: AMD64 breaks in ahcisata_core.c



>Number:         46676
>Category:       kern
>Synopsis:       AMD64 breaks in ahcisata_core.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 09 13:40:04 +0000 2012
>Originator:     Chavdar Ivanov
>Release:        6.99.8
>Organization:
Delcam Plc
>Environment:
$ uname -a
NetBSD support5.delcam.local 6.99.8 NetBSD 6.99.8 (GENERIC) #4: Mon Jul  9 
14:20:00 BST 2012  
root@support5.delcam.local:/usr/src/sys/arch/amd64/compile/GENERIC amd64

>Description:
The last amd64 6.99.8 to work for me was from 26/06.

On the newer builds I get
...
ahcisata0 channel 0: clearing WDCTL_RST failed for drive 0
ahcisata0 channel 2: clearing WDCTL_RST failed for drive 0
...

>How-To-Repeat:
Observed on HP Z420 w/s, unmodified GENERIC with sys/dev/ic/ahcisata_core.c 
v.1.35.
>Fix:
Manuel Bouyer suggested the following patch, which works for me:

Index: ahcisata_core.c
===================================================================
RCS file: /home/bouyer/anoncvs/cvs/src/sys/dev/ic/ahcisata_core.c,v
retrieving revision 1.35
diff -u -r1.35 ahcisata_core.c
--- ahcisata_core.c     2 Jul 2012 18:15:46 -0000       1.35
+++ ahcisata_core.c     6 Jul 2012 17:42:09 -0000
@@ -642,8 +642,7 @@
        /* clear port interrupt register */
        AHCI_WRITE(sc, AHCI_P_IS(chp->ch_channel), 0xffffffff);
        /* clear SErrors and start operations */
-       if ((sc->sc_ahci_cap & (AHCI_CAP_SPM | AHCI_CAP_CLO)) ==
-           (AHCI_CAP_SPM | AHCI_CAP_CLO)) {
+       if ((sc->sc_ahci_cap & AHCI_CAP_CLO) == AHCI_CAP_CLO) {
                /*
                 * issue a command list override to clear BSY.
                 * This is needed if there's a PMP with no drive

(submitting his patch, he is AFK for some time). 



Home | Main Index | Thread Index | Old Index