From owner-freebsd-bugs@FreeBSD.ORG Fri May 9 12:00:05 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31BC91065670 for ; Fri, 9 May 2008 12:00:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1E8F18FC0A for ; Fri, 9 May 2008 12:00:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m49C0488048533 for ; Fri, 9 May 2008 12:00:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m49C04fC048532; Fri, 9 May 2008 12:00:04 GMT (envelope-from gnats) Date: Fri, 9 May 2008 12:00:04 GMT Message-Id: <200805091200.m49C04fC048532@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Benjamin Close Cc: Subject: Re: kern/122847: [ata] atacontrol reports "ioctl(IOCATADEVICES): Device not configured" with ATI IXP600 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Benjamin Close List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 12:00:05 -0000 The following reply was made to PR kern/122847; it has been noted by GNATS. From: Benjamin Close To: bug-followup@FreeBSD.org, arnaud.houdelette@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.