From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 03:07:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 314F21065689 for ; Mon, 29 Sep 2008 03:07:47 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [76.96.62.96]) by mx1.freebsd.org (Postfix) with ESMTP id CC9418FC1C for ; Mon, 29 Sep 2008 03:07:46 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA13.westchester.pa.mail.comcast.net ([76.96.62.52]) by QMTA09.westchester.pa.mail.comcast.net with comcast id LCtm1a00617dt5G59T7mwu; Mon, 29 Sep 2008 03:07:46 +0000 Received: from koitsu.dyndns.org ([67.180.253.227]) by OMTA13.westchester.pa.mail.comcast.net with comcast id LT7k1a0084v8bD73ZT7lWZ; Mon, 29 Sep 2008 03:07:46 +0000 X-Authority-Analysis: v=1.0 c=1 a=QycZ5dHgAAAA:8 a=qvR8AE5FgCwQHAAWRt0A:9 a=S_ydvDUO7vCvsDmyiN8A:7 a=Lr86B7Flg4f0hSxBomc2xttaQKIA:4 a=EoioJ0NPDVgA:10 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 6A8FCC9432; Sun, 28 Sep 2008 20:07:44 -0700 (PDT) Date: Sun, 28 Sep 2008 20:07:44 -0700 From: Jeremy Chadwick To: Bruce Cran Message-ID: <20080929030744.GA95060@icarus.home.lan> References: <20080928103937.U51561@hercules.mthelicon.com> <20080928232438.5d0c4a55@tau.draftnet> <20080929000226.GA92057@icarus.home.lan> <20080929003603.GA92998@icarus.home.lan> <20080929030748.08b19c52@tau.draftnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080929030748.08b19c52@tau.draftnet> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org, Andrey Elsukov , Pegasus McCleaft , sos@freebsd.org Subject: Re: atacontrol broken in 7.1-PR X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2008 03:07:47 -0000 On Mon, Sep 29, 2008 at 03:07:48AM +0100, Bruce Cran wrote: > On Sun, 28 Sep 2008 17:36:03 -0700 > Jeremy Chadwick wrote: > > Bruce and Pegasus, > > > > Can you please apply the below patch to src/sbin/atacontrol.c and let > > me know what the output is when doing "atacontrol list"? > > > > This won't solve the problem, but it will help in determining which > > piece of code in src/sys/dev/ata/ata-all.c is returning an error to > > ioctl() (different pieces of the code return different errors, either > > ENXIO, ENODEV, or another error depending upon what gets returned > > from ata_raid_ioctl_func()). I misread part of the code. ata_raid_ioctl() only gets called if the ata_raid_ioctl_func pointer is non-NULL (it defaults to NULL unless your system is found to need/require ataraid support; need/require does not mean "compiled in", I assume it means "we found devices/metadata that ataraid can handle"). In your case, there are no arX devices, and the only ATA device you have is an ATAPI CD/DVD drive. > ATA channel 0: > Master: acd0 ATA/ATAPI revision 5 > Slave: no device present > atacontrol: ioctl(IOCATADEVICES) returned -1: Device not configured Right, silly me. Here I was hoping I could get the return code of ata_ioctl(), but that's not the case. There's no way for me to get that information; ioctl() returns -1 on failure, and 0 on success. truss isn't going to be enough for this, because I need to see into the kernel ioctl() layer to find out what's going on in the ATA code. Simply put, I don't know how to efficiently debug this problem under FreeBSD. dtrace is available on 7.1-PRERELEASE, but I'm unfamiliar with it. > This laptop's running GENERIC, so ATA_STATIC_ID is in my kernel config. Thanks. I realised on all of my systems I also use ATA_STATIC_ID (I must've missed it when I was skimming the config), so neither atapicam nor ATA_STATIC_ID are responsible for this. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |