NetBSD Problem Report #40531
From www@NetBSD.org Sun Feb 1 15:59:18 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id DB07163B99A
for <gnats-bugs@gnats.netbsd.org>; Sun, 1 Feb 2009 15:59:18 +0000 (UTC)
Message-Id: <20090201155918.5B2E363B879@narn.NetBSD.org>
Date: Sun, 1 Feb 2009 15:59:18 +0000 (UTC)
From: denbrok@uni-bonn.de
Reply-To: denbrok@uni-bonn.de
To: gnats-bugs@NetBSD.org
Subject: 5.0_BETA/i386 doesn't power off on Dell Latitude X1 with CF card plugged in
X-Send-Pr-Version: www-1.0
>Number: 40531
>Notify-List: uwe@netbsd.org
>Category: kern
>Synopsis: 5.0_BETA/i386 doesn't power off on Dell Latitude X1 with CF card plugged in
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: drochner
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 01 16:00:00 +0000 2009
>Closed-Date: Sat Mar 20 13:29:58 +0000 2010
>Last-Modified: Sat Mar 20 13:29:58 +0000 2010
>Originator: Dennis den Brok
>Release: 5.0_BETA
>Organization:
-
>Environment:
NetBSD 5.0_BETA i386
>Description:
As in one-line summary. Unplugging the CF card solves the problem, which didn't occur at all under 4.0.1.
dmesg output:
NetBSD 5.0_BETA (GENERIC) #0: Fri Jan 23 00:16:07 UTC 2009
builds@b0.netbsd.org:/home/builds/ab/netbsd-5/i386/200901220000Z-obj/home/builds/ab/netbsd-5/src/sys/arch/i386/compile/GENERIC
total memory = 1271 MB
avail memory = 1237 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Dell Inc. Latitude X1
mainbus0 (root)
cpu0 at mainbus0 apid 0: Intel 686-class, 1097MHz, id 0x6d8
cpu0: Enhanced SpeedStep (940 mV) 1100 MHz
cpu0: Enhanced SpeedStep frequencies available (MHz): 1100 1000 900 800 600
ioapic0 at mainbus0 apid 1: pa 0xfec00000, version 20, 24 pins
acpi0 at mainbus0: Intel ACPICA 20080321
acpi0: X/RSDT: OemId <DELL , CPi R ,27d50c19>, AslId <ASL ,00000061>
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Safe" frequency 3579545 Hz quality 900
ACPI-Safe 24-bit timer
acpiacad0 at acpi0 (AC, ACPI0003): ACPI AC Adapter
acpibat0 at acpi0 (BAT0, PNP0C0A-1): ACPI Battery (Control Method)
acpilid0 at acpi0 (LID, PNP0C0D): ACPI Lid Switch
acpibut0 at acpi0 (PBTN, PNP0C0C): ACPI Power Button
acpibut1 at acpi0 (SBTN, PNP0C0E): ACPI Sleep Button
pckbc1 at acpi0 (PS2M, PNP0F13): aux port
pckbc1: irq 12
pckbc2 at acpi0 (KBC, PNP0303): kbd port
pckbc2: io 0x60,0x64,0x62,0x66 irq 1
attimer1 at acpi0 (TMR, PNP0100): AT Timer
attimer1: io 0x40-0x43,0x50-0x53 irq 2
pcppi1 at acpi0 (SPKR, PNP0800)
pcppi1: io 0x61,0x63,0x65,0x67
midi0 at pcppi1: PC speaker (CPU-intensive output)
sysbeep0 at pcppi1
npx1 at acpi0 (COPR, PNP0C04)
npx1: io 0xf0-0xff irq 13
npx1: reported by CPUID; using exception 16
acpitz0 at acpi0 (THM): critical 95.0C, passive cooling
apm0 at acpi0: Power Management spec V1.2
pckbd0 at pckbc2 (kbd slot)
pckbc2: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc2 (aux slot)
pms0: Synaptics touchpad version 6.2
pms0: Palm detect, Multi-finger
pckbc2: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer1: attached to pcppi1
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x8086 product 0x2590 (rev. 0x03)
agp0 at pchb0: detected 7932k stolen memory
agp0: aperture at 0xc0000000, size 0x10000000
vga1 at pci0 dev 2 function 0: vendor 0x8086 product 0x2592 (rev. 0x03)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
drm at vga1 not configured
vendor 0x8086 product 0x2792 (miscellaneous display, revision 0x03) at pci0 dev 2 function 1 not configured
ppb0 at pci0 dev 28 function 0: vendor 0x8086 product 0x2660 (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
bge0 at pci1 dev 0 function 0: Broadcom BCM5751 Gigabit Ethernet
bge0: interrupting at ioapic0 pin 16
bge0: ASIC BCM5750 A1 (0x4001), Ethernet address 00:13:72:6a:f5:80
bge0: setting short Tx thresholds
brgphy0 at bge0 phy 1: BCM5750 1000BASE-T media interface, rev. 0
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
uhci0 at pci0 dev 29 function 0: vendor 0x8086 product 0x2658 (rev. 0x03)
uhci0: interrupting at ioapic0 pin 16
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 29 function 2: vendor 0x8086 product 0x265a (rev. 0x03)
uhci1: interrupting at ioapic0 pin 18
usb1 at uhci1: USB revision 1.0
uhci2 at pci0 dev 29 function 3: vendor 0x8086 product 0x265b (rev. 0x03)
uhci2: interrupting at ioapic0 pin 19
usb2 at uhci2: USB revision 1.0
ehci0 at pci0 dev 29 function 7: vendor 0x8086 product 0x265c (rev. 0x03)
ehci0: interrupting at ioapic0 pin 16
ehci0: EHCI version 1.0
ehci0: wrong number of companions (4 != 3)
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
usb3 at ehci0: USB revision 2.0
ppb1 at pci0 dev 30 function 0: vendor 0x8086 product 0x2448 (rev. 0xd3)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled
cbb0 at pci2 dev 1 function 0: vendor 0x1180 product 0x0476 (rev. 0xb3)
fwohci0 at pci2 dev 1 function 1: vendor 0x1180 product 0x0552 (rev. 0x08)
fwohci0: interrupting at ioapic0 pin 18
fwohci0: OHCI version 1.10 (ROM=0)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 32:4f:c0:00:04:15:a4:50
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
ieee1394if0 at fwohci0: IEEE1394 bus
fwip0 at ieee1394if0: IP over IEEE1394
fwohci0: Initiate bus reset
vendor 0x1180 product 0x0822 (SD Host Controller system, interface 0x01, revision 0x17) at pci2 dev 1 function 2 not configured
iwi0 at pci2 dev 3 function 0: vendor 0x8086 product 0x4220 (rev. 0x05)
iwi0: interrupting at ioapic0 pin 17
iwi0: 802.11 address 00:16:6f:73:96:e2
iwi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
cbb0: cacheline 0x0 lattimer 0x40
cbb0: bhlc 0x824000
cbb0: interrupting at ioapic0 pin 19
cardslot0 at cbb0
cardbus0 at cardslot0: bus 3
pcmcia0 at cardslot0
auich0 at pci0 dev 30 function 2: i82801FB (ICH6) AC-97 Audio
auich0: interrupting at ioapic0 pin 16
auich0: ac97: SigmaTel STAC9752/53 codec; headphone, 20 bit DAC, 20 bit ADC, SigmaTel 3D
auich0: ac97: ext id a01<AC97_23,AMAP,VRA>
ichlpcib0 at pci0 dev 31 function 0
ichlpcib0: vendor 0x8086 product 0x2641 (rev. 0x03)
timecounter: Timecounter "ichlpcib0" frequency 3579545 Hz quality 1000
ichlpcib0: 24-bit timer
ichlpcib0: TCO (watchdog) timer configured.
piixide0 at pci0 dev 31 function 1
piixide0: Intel 82801FB IDE Controller (ICH6) (rev. 0x03)
piixide0: bus-master DMA support present
piixide0: primary channel configured to compatibility mode
piixide0: primary channel interrupting at ioapic0 pin 14
atabus0 at piixide0 channel 0
piixide0: secondary channel configured to compatibility mode
piixide0: secondary channel ignored (disabled)
ichsmb0 at pci0 dev 31 function 3: vendor 0x8086 product 0x266a (rev. 0x03)
ichsmb0: interrupting at SMI
iic0 at ichsmb0: I2C bus
isa0 at ichlpcib0
fwohci0: BUS reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
ieee1394if0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
ieee1394if0: bus manager 0 (me)
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
acpiacad0: AC adapter online.
auich0: measured ac97 link rate at 47998 Hz, will use 48000 Hz
audio0 at auich0: full duplex, mmap, independent
uhub0 at usb0: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1 at usb1: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2 at usb2: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhub3 at usb3: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 8 ports with 8 removable, self powered
wdc2 at pcmcia0 function 0: <TRANSCEND, TS1GCF80, >
wdc2: i/o mapped mode
atabus1 at wdc2 channel 0
wd0 at atabus0 drive 0: <SanDisk SDCFX3-004G>
wd0: drive supports 4-sector PIO transfers, LBA addressing
wd0: 3919 MB, 7964 cyl, 16 head, 63 sec, 512 bytes/sect x 8027712 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA)
wd1 at atabus1 drive 0: <TRANSCEND>
wd1: drive supports 1-sector PIO transfers, LBA addressing
wd1: 991 MB, 2014 cyl, 16 head, 63 sec, 512 bytes/sect x 2030112 sectors
wd1: drive supports PIO mode 4
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: Matthias Drochner <M.Drochner@fz-juelich.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
netbsd-bugs@NetBSD.org
Subject: Re: kern/40531: 5.0_BETA/i386 doesn't power off on Dell Latitude X1
withCF card plugged in
Date: Wed, 04 Feb 2009 13:11:23 +0100
This is a multipart MIME message.
--==_Exmh_3044667170070
Content-Type: text/plain; charset=us-ascii
denbrok@uni-bonn.de said:
> wdc2 at pcmcia0 function 0: <TRANSCEND, TS1GCF80, >
> wdc2: i/o mapped mode
> atabus1 at wdc2 channel 0
> [...]
> wd1 at atabus1 drive 0: <TRANSCEND>
> wd1: drive supports 1-sector PIO transfers, LBA addressing
> wd1: 991 MB, 2014 cyl, 16 head, 63 sec, 512 bytes/sect x 2030112 sectors
> wd1: drive supports PIO mode 4
Can you try the appended patch?
(just to narrow down the problem)
The CF card might not support power management.
best regards
Matthias
-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
--==_Exmh_3044667170070
Content-Type: text/plain ; name="wd.txt"; charset=us-ascii
Content-Description: wd.txt
Content-Disposition: attachment; filename="wd.txt"
#
# old_revision [884ce8c5452fc4dfbe943834a593e6de60e97b28]
#
# patch "sys/dev/ata/wd.c"
# from [e3585309ef6464d47751fccb6e89f2bc201e0d9c]
# to [1d5cdddc1b26d2b566dc6200b75e4a4e6e73cbd6]
#
============================================================
--- sys/dev/ata/wd.c e3585309ef6464d47751fccb6e89f2bc201e0d9c
+++ sys/dev/ata/wd.c 1d5cdddc1b26d2b566dc6200b75e4a4e6e73cbd6
@@ -1948,8 +1948,10 @@ wd_shutdown(device_t dev, int how)
struct wd_softc *wd = device_private(dev);
wd_flushcache(wd, AT_POLL);
+#if 0
if ((how & RB_POWERDOWN) == RB_POWERDOWN)
wd_standby(wd, AT_POLL);
+#endif
return true;
}
--==_Exmh_3044667170070--
From: Matthias Drochner <drochner@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/40531 CVS commit: src/sys/dev
Date: Fri, 6 Feb 2009 13:43:12 +0000 (UTC)
Module Name: src
Committed By: drochner
Date: Fri Feb 6 13:43:11 UTC 2009
Modified Files:
src/sys/dev/ata: wd.c
src/sys/dev/pcmcia: wdc_pcmcia.c
Log Message:
-in the wdc@pcmcia driver, don't try to powerup/down while cold or
shutting down -- this is only supposed to happen from the pcmcia
kernel thread while the system is running
-in wd_shutdown, call ata_addref first, so that the adapter is either
active or we know that it isn't
This fixes a hang on shutdown-p reported by Dennis den Brok per
PR kern/40531. Verified by by Dennis and me.
(reported against 5.0-Beta, so this is a pullup candidate)
To generate a diff of this commit:
cvs rdiff -r1.367 -r1.368 src/sys/dev/ata/wd.c
cvs rdiff -r1.112 -r1.113 src/sys/dev/pcmcia/wdc_pcmcia.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: kern-bug-people->drochner
Responsible-Changed-By: drochner@NetBSD.org
Responsible-Changed-When: Fri, 06 Feb 2009 14:01:50 +0000
Responsible-Changed-Why:
committed a fix, will request pullup in a few days
State-Changed-From-To: open->feedback
State-Changed-By: drochner@NetBSD.org
State-Changed-When: Fri, 06 Feb 2009 14:01:50 +0000
State-Changed-Why:
fixed in -current
From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/40531 CVS commit: [netbsd-5] src/sys/dev
Date: Wed, 18 Feb 2009 00:23:09 +0000 (UTC)
Module Name: src
Committed By: snj
Date: Wed Feb 18 00:23:09 UTC 2009
Modified Files:
src/sys/dev/ata [netbsd-5]: wd.c
src/sys/dev/pcmcia [netbsd-5]: wdc_pcmcia.c
Log Message:
Pull up following revision(s) (requested by drochner in ticket #441):
sys/dev/ata/wd.c: revision 1.368
sys/dev/pcmcia/wdc_pcmcia.c: revision 1.113
-in the wdc@pcmcia driver, don't try to powerup/down while cold or
shutting down -- this is only supposed to happen from the pcmcia
kernel thread while the system is running
-in wd_shutdown, call ata_addref first, so that the adapter is either
active or we know that it isn't
This fixes a hang on shutdown-p reported by Dennis den Brok per
PR kern/40531. Verified by by Dennis and me.
(reported against 5.0-Beta, so this is a pullup candidate)
To generate a diff of this commit:
cvs rdiff -r1.363 -r1.363.8.1 src/sys/dev/ata/wd.c
cvs rdiff -r1.112 -r1.112.8.1 src/sys/dev/pcmcia/wdc_pcmcia.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: feedback->open
State-Changed-By: uwe@NetBSD.org
State-Changed-When: Fri, 06 Mar 2009 23:04:31 +0000
State-Changed-Why:
The change introduces regression for platforms with their primary disk
on wdc@pcmcia (at least all hpc* platforms, I guess). See
http://mail-index.netbsd.org/port-hpcsh/2009/02/26/msg000834.html
From: "Valeriy E. Ushakov" <uwe@stderr.spb.ru>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/40531 (5.0_BETA/i386 doesn't power off on Dell Latitude X1 with CF card plugged in)
Date: Sat, 7 Mar 2009 02:23:37 +0300
On Fri, Mar 06, 2009 at 23:04:32 +0000, uwe@NetBSD.org wrote:
> State-Changed-From-To: feedback->open
> State-Changed-By: uwe@NetBSD.org
> State-Changed-Why:
> The change introduces regression for platforms with their primary disk
> on wdc@pcmcia (at least all hpc* platforms, I guess). See
> http://mail-index.netbsd.org/port-hpcsh/2009/02/26/msg000834.html
The following patch makes my hpcsh properly attach CF at boot time.
Please, review and test.
--- wdc_pcmcia.c 21 Feb 2009 03:29:25 +0300 1.113
+++ wdc_pcmcia.c 07 Mar 2009 02:16:09 +0300
@@ -86,6 +86,7 @@
static int wdc_pcmcia_validate_config_io(struct pcmcia_config_entry *);
static int wdc_pcmcia_validate_config_memory(struct pcmcia_config_entry *);
static void wdc_pcmcia_attach(device_t, device_t, void *);
+static void wdc_pcmcia_interrupts(device_t);
static int wdc_pcmcia_detach(device_t, int);
CFATTACH_DECL_NEW(wdc_pcmcia, sizeof(struct wdc_pcmcia_softc),
@@ -302,15 +303,28 @@
sc->ata_channel.ch_ndrive = wdcp ? wdcp->wdc_ndrive : 2;
wdc_init_shadow_regs(&sc->ata_channel);
- error = wdc_pcmcia_enable(self, 1);
- if (error)
- goto fail;
-
/* We can enable and disable the controller. */
sc->sc_wdcdev.sc_atac.atac_atapi_adapter._generic.adapt_enable =
wdc_pcmcia_enable;
sc->sc_wdcdev.sc_atac.atac_atapi_adapter._generic.adapt_refcnt = 1;
+ config_interrupts(self, wdc_pcmcia_interrupts);
+ return;
+
+fail:
+ pcmcia_function_unconfigure(pa->pf);
+}
+
+static void
+wdc_pcmcia_interrupts(device_t self)
+{
+ struct wdc_pcmcia_softc *sc = device_private(self);
+ int error;
+
+ error = wdc_pcmcia_enable(self, 1);
+ if (error)
+ goto fail;
+
/*
* Some devices needs some more delay after power up to stabilize
* and probe properly, so give them half a second.
@@ -318,15 +332,15 @@
*/
config_pending_incr();
tsleep(wdc_pcmcia_attach, PWAIT, "wdcattach", hz / 2);
-
wdcattach(&sc->ata_channel);
config_pending_decr();
+
ata_delref(&sc->ata_channel);
sc->sc_state = WDC_PCMCIA_ATTACHED;
return;
fail:
- pcmcia_function_unconfigure(pa->pf);
+ pcmcia_function_unconfigure(sc->sc_pf);
}
static int
-uwe
From: John Klos <john@ziaspace.com>
To: "Valeriy E. Ushakov" <uwe@stderr.spb.ru>
Cc: gnats-bugs@NetBSD.org, port-hpcsh@NetBSD.org
Subject: Re: kern/40531 (5.0_BETA/i386 doesn't power off on Dell Latitude X1
with CF card plugged in)
Date: Sat, 14 Mar 2009 19:56:40 +0000 (UTC)
> The following patch makes my hpcsh properly attach CF at boot time.
> Please, review and test.
>
> --- wdc_pcmcia.c 21 Feb 2009 03:29:25 +0300 1.113
> +++ wdc_pcmcia.c 07 Mar 2009 02:16:09 +0300
Tested and happy with wdc_pcmcia.c in netbsd-5 on hpcsh (Jornada 690).
Thanks,
John Klos
State-Changed-From-To: open->feedback
State-Changed-By: snj@NetBSD.org
State-Changed-When: Mon, 16 Mar 2009 16:25:24 +0000
State-Changed-Why:
Additional feedback was requested.
State-Changed-From-To: feedback->closed
State-Changed-By: christos@NetBSD.org
State-Changed-When: Sat, 20 Mar 2010 09:29:58 -0400
State-Changed-Why:
at submitters request
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.