Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 2008 20:07:44 -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:  <20080929030744.GA95060@icarus.home.lan>
In-Reply-To: <20080929030748.08b19c52@tau.draftnet>
References:  <20080928103937.U51561@hercules.mthelicon.com> <20080928232438.5d0c4a55@tau.draftnet> <20080929000226.GA92057@icarus.home.lan> <20080929003603.GA92998@icarus.home.lan> <20080929030748.08b19c52@tau.draftnet>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

> 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 |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080929030744.GA95060>