Date: Sun, 28 Sep 2008 20:13:24 -0700 From: Jeremy Chadwick <koitsu@FreeBSD.org> To: Bruce Cran <bruce@cran.org.uk> Cc: freebsd-hackers@freebsd.org, Andrey Elsukov <bu7cher@yandex.ru>, Pegasus McCleaft <ken@hercules.mthelicon.com>, sos@freebsd.org Subject: Re: atacontrol broken in 7.1-PR Message-ID: <20080929031324.GA96457@icarus.home.lan> In-Reply-To: <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> <20080929030744.GA95060@icarus.home.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 28, 2008 at 08:07:44PM -0700, Jeremy Chadwick wrote: > On Mon, Sep 29, 2008 at 03:07:48AM +0100, Bruce Cran wrote: > > On Sun, 28 Sep 2008 17:36:03 -0700 > > Jeremy Chadwick <koitsu@FreeBSD.org> 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 <HL-DT-ST DVD+/-RW GSA-T11N/A102> 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. Lucky! While working on some other ATA-related code on a test/dev box I just built about 30 minutes ago, I decided to do "atacontrol list" to see what would happen: testbox# atacontrol list ATA channel 0: Master: ad0 <ST3120026AS/3.05> Serial ATA v1.0 Slave: no device present ATA channel 1: Master: acd0 <CD-224E/1.9A> ATA/ATAPI revision 0 Slave: no device present atacontrol: ioctl(IOCATADEVICES): Device not configured testbox# This box I have physical + serial access to, so I should be able to try and track this down, now that I have something to work with. :-) I'll let you guys know what I find. -- | 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 |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080929031324.GA96457>