kern/122847: [ata] atacontrol reports "ioctl(IOCATADEVICES):
Device not configured" with ATI IXP600
Benjamin Close
Benjamin.Close at clearchain.com
Fri May 9 12:00:05 UTC 2008
The following reply was made to PR kern/122847; it has been noted by GNATS.
From: Benjamin Close <Benjamin.Close at clearchain.com>
To: bug-followup at FreeBSD.org, arnaud.houdelette at tzim.net
Cc:
Subject: Re: kern/122847: [ata] atacontrol reports "ioctl(IOCATADEVICES):
Device not configured" with ATI IXP600
Date: Fri, 09 May 2008 21:05:49 +0930
This bug occurs when there is missing controllers in the 0..n range. Ie,
if the box has controllers:
ata2
ata3
via a atapci but no native controllers (ie ata0, ata1)
atacontrol list
Will fail to list any controllers.
This is due to atacontrol requesting information about a non existent
channel (ata0) as it sequentially goes from 0..n (where n is obtained
from IOATAGMAXCHANNEL). ata(4) notices the invalid controller request
and returns EXIO. Hence atacontrol thinks it's an error and exits.
A potential fix is at:
http://lists.freebsd.org/pipermail/freebsd-stable/2008-April/041991.html
However this simply avoids the real problem, that is, there needs to be
a way to ask the kernel what channels exist.
One potential solution is to introduce a IOATAGCHANNELS ioctl which
returns a list of valid channels taking a struct like:
struct ata_ioc_channels {
int max;
int channels[n];
}
and replace the MAXCHANNELS request.
Till then the patch will ignore the error state.
More information about the freebsd-bugs
mailing list