On Mon, Sep 29, 2008 at 03:07:48AM +0100, Bruce Cran wrote: > On Sun, 28 Sep 2008 17:36:03 -0700 > Jeremy Chadwick <[EMAIL PROTECTED]> 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 | _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"