NetBSD Problem Report #51211
From www@NetBSD.org Thu Jun 2 03:19:31 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 3144D7A475
for <gnats-bugs@gnats.NetBSD.org>; Thu, 2 Jun 2016 03:19:31 +0000 (UTC)
Message-Id: <20160602025932.E5C397ABE4@mollari.NetBSD.org>
Date: Thu, 2 Jun 2016 02:59:32 +0000 (UTC)
From: erik@ono-sendai.com
Reply-To: erik@ono-sendai.com
To: gnats-bugs@NetBSD.org
Subject: atactl atabus0 reset causes a panic on Tegra K1
X-Send-Pr-Version: www-1.0
>Number: 51211
>Category: kern
>Synopsis: atactl atabus0 reset causes a panic on Tegra K1
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 02 03:20:03 +0000 2016
>Closed-Date: Wed Jun 22 10:48:28 +0000 2016
>Last-Modified: Wed Jun 22 10:48:28 +0000 2016
>Originator: Erik Berls
>Release: NetBSD armv7 7.99.30 NetBSD 7.99.30 (TEGRA.201606011320Z) evbarm
>Organization:
NetBSD
>Environment:
NetBSD armv7 7.99.30 NetBSD 7.99.30 (TEGRA.201606011320Z) evbarm
Userland from armv7.img.gz
With a SATA Port Multiplier
>Description:
ahcisata0 at fdt0: SATA
ahcisata0: couldn't acquire vddio-supply
ahcisata0: couldn't acquire avdd-supply
ahcisata0: interrupting on LIC irq 55
ahcisata0: AHCI revision 1.31, 2 ports, 32 slots, CAP 0xe620ff01<PSC,SSC,PMD,ISS=0x2=Gen2,SAL,SALP,SSNTF,SNCQ,S64A>
atabus0 at ahcisata0 channel 0
[...]
wd0 at atabus0 drive 0
wd0: <WDC WD1600AAJS-00B4A0>
wd0: 149 GB, 310101 cyl, 16 head, 63 sec, 512 bytes/sect x 312581808 sectors
[...]
armv7# drvctl -r atabus0
drvctl: DRVRESCANBUS: Invalid argument
armv7# atactl atabus0 reset
ahcisata0 port 0: device present, speed: 3.0Gb/s
panic: kernel diagnostic assertion "sc->sc_ahci_cap & AHCI_CAP_CLO" failed: file "/usr/src/sys/dev/ic/ahcisata_core.c", line 1404
cpu3: Begin traceback...
0x9c7c9c0c: netbsd:db_panic+0xc
0x9c7c9c24: netbsd:vpanic+0x1b4
0x9c7c9c3c: netbsd:__udivmoddi4
0x9c7c9c8c: netbsd:ahci_channel_start+0x250
0x9c7c9cbc: netbsd:ahci_reset_channel+0xd4
0x9c7c9cdc: netbsd:ata_reset_channel+0x64
0x9c7c9d04: netbsd:atabusioctl+0xe4
0x9c7c9d44: netbsd:cdev_ioctl+0xcc
0x9c7c9d6c: netbsd:spec_ioctl+0x94
0x9c7c9d9c: netbsd:VOP_IOCTL+0x4c
0x9c7c9e6c: netbsd:vn_ioctl+0xc4
0x9c7c9f34: netbsd:sys_ioctl+0x1b8
0x9c7c9fac: netbsd:syscall+0x94
cpu3: End traceback...
dump to dev 92,1 not possible
rebooting...
>How-To-Repeat:
JTK1 + SATA PM + trying to rescan the bus (eg after hotswap)
>Fix:
>Release-Note:
>Audit-Trail:
From: "Jared D. McNeill" <jmcneill@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51211 CVS commit: src/sys/dev/ic
Date: Fri, 3 Jun 2016 10:34:03 +0000
Module Name: src
Committed By: jmcneill
Date: Fri Jun 3 10:34:03 UTC 2016
Modified Files:
src/sys/dev/ic: ahcisata_core.c
Log Message:
PR kern/51211: atactl atabus0 reset causes a panic on Tegra K1
Fix an issue where ahci_reset_channel calls ahci_channel_start with clo=1
even if CAP.SCLO=0.
To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/ic/ahcisata_core.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Jared McNeill <jmcneill@invisible.ca>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/51211: atactl atabus0 reset causes a panic on Tegra K1
Date: Fri, 3 Jun 2016 11:34:22 -0300 (ADT)
On Thu, 2 Jun 2016, erik@ono-sendai.com wrote:
> armv7# drvctl -r atabus0
> drvctl: DRVRESCANBUS: Invalid argument
For rescan of atabus you need to specify an interface attribute. Try this:
# drvctl -r -a ata_hl atabus0
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 12 Jun 2016 03:23:07 +0000
State-Changed-Why:
fixed?
State-Changed-From-To: feedback->closed
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Wed, 22 Jun 2016 10:48:28 +0000
State-Changed-Why:
Submitter confirmed fixed.
>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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.