Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Fix PR kern/46828 (6.0_BETA2 and 6.0_RC1 won't s...



details:   https://anonhg.NetBSD.org/src/rev/05dacf96331d
branches:  trunk
changeset: 781678:05dacf96331d
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Sep 22 14:27:24 2012 +0000

description:
Fix PR kern/46828 (6.0_BETA2 and 6.0_RC1 won't start on DL320/G5p):
 In ehci_get_ownership(), don't explicitly clear EHCI_LEG_HC_BIOS_OWNED
 semaphore bit in the driver before asking BIOS to give up ownership.
 The EHCI spec implies that the semaphore should not be changed by
 the other agent and actually the previous one (introduced in rev 1.53
 after 5.x) caused hangup during probe on at least two HP machines
 as mentioned in the PR.  Analyzed and patch provided by Ryo ONODERA.

Should be pulled up to netbsd-6 (fatal hangup during boot).

diffstat:

 sys/dev/pci/ehci_pci.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r 84c587ef3d60 -r 05dacf96331d sys/dev/pci/ehci_pci.c
--- a/sys/dev/pci/ehci_pci.c    Sat Sep 22 09:20:06 2012 +0000
+++ b/sys/dev/pci/ehci_pci.c    Sat Sep 22 14:27:24 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci_pci.c,v 1.56 2012/07/20 01:26:19 uwe Exp $        */
+/*     $NetBSD: ehci_pci.c,v 1.57 2012/09/22 14:27:24 tsutsui Exp $    */
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.56 2012/07/20 01:26:19 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.57 2012/09/22 14:27:24 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -395,10 +395,8 @@
                legsup = pci_conf_read(pc, tag, addr + PCI_EHCI_USBLEGSUP);
                if (legsup & EHCI_LEG_HC_BIOS_OWNED) {
                        /* Ask BIOS to give up ownership */
-                       legsup &= ~EHCI_LEG_HC_BIOS_OWNED;
-                       legsup |= EHCI_LEG_HC_OS_OWNED;
                        pci_conf_write(pc, tag, addr + PCI_EHCI_USBLEGSUP,
-                           legsup);
+                           legsup | EHCI_LEG_HC_OS_OWNED);
                        for (ms = 0; ms < EHCI_MAX_BIOS_WAIT; ms++) {
                                legsup = pci_conf_read(pc, tag,
                                    addr + PCI_EHCI_USBLEGSUP);



Home | Main Index | Thread Index | Old Index