From owner-freebsd-stable@FreeBSD.ORG Thu Apr 17 12:15:20 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 019FB10656C1; Thu, 17 Apr 2008 12:15:20 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp9.yandex.ru (smtp9.yandex.ru [213.180.223.91]) by mx1.freebsd.org (Postfix) with ESMTP id C8A3E8FC0A; Thu, 17 Apr 2008 12:15:18 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mail.kirov.so-cdu.ru ([77.72.136.145]:47861 "EHLO [127.0.0.1]" smtp-auth: "bu7cher" TLS-CIPHER: "DHE-RSA-AES256-SHA keybits 256/256 version TLSv1/SSLv3" TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S6572046AbYDQMPO (ORCPT + 2 others); Thu, 17 Apr 2008 16:15:14 +0400 X-Yandex-Spam: 1 X-Yandex-Front: smtp9 X-Yandex-TimeMark: 1208434514 X-MsgDayCount: 13 X-Comment: RFC 2476 MSA function at smtp9.yandex.ru logged sender identity as: bu7cher Message-ID: <48073F4F.3050804@yandex.ru> Date: Thu, 17 Apr 2008 16:15:11 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Arnaud Houdelette References: <48061734.30509@tzim.net> <20080416152254.GA33816@eos.sc1.parodius.com> 9060000000211159472 <103161208360650@webmail30.yandex.ru> <480722F4.9010600@tzim.net> <48073B85.3020509@yandex.ru> <48073DF0.5090008@tzim.net> In-Reply-To: <48073DF0.5090008@tzim.net> Content-Type: multipart/mixed; boundary="------------070604020302080803060005" Cc: koitsu@freebsd.org, freebsd-stable@freebsd.org, sos@FreeBSD.org Subject: Re: ATI SB600 Sata controler isn't detected as such. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2008 12:15:20 -0000 This is a multi-part message in MIME format. --------------070604020302080803060005 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Arnaud Houdelette wrote: >> Try this patch. > > Works fine: > [carenath] /usr/src/sbin/atacontrol# atacontrol list > ATA channel 0: > Master: ad0 ATA/ATAPI revision 7 > Slave: no device present > ATA channel 2: > Master: ad4 Serial ATA II > Slave: no device present > ATA channel 3: > Master: ad6 Serial ATA II > Slave: no device present > ATA channel 4: > Master: ad8 Serial ATA II > Slave: no device present > ATA channel 5: > Master: ad10 Serial ATA II > Slave: no device present > > I just filled in a PR (kern/122847) as advised by Jeremy Chadwick. What > should I do with it ? > Thanks for your help. I made it simplest :) Soren, what you think about it? The problem was introduced here: http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/atacontrol/atacontrol.c.diff?r1=1.45;r2=1.46 -- WBR, Andrey V. Elsukov --------------070604020302080803060005 Content-Type: text/plain; name="atacontrol_list_fix.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="atacontrol_list_fix.diff.txt" Index: src/sbin/atacontrol/atacontrol.c =================================================================== RCS file: /ncvs/src/sbin/atacontrol/atacontrol.c,v retrieving revision 1.47 diff -u -p -r1.47 atacontrol.c --- src/sbin/atacontrol/atacontrol.c 17 Mar 2008 10:33:23 -0000 1.47 +++ src/sbin/atacontrol/atacontrol.c 17 Apr 2008 12:11:38 -0000 @@ -265,9 +265,11 @@ info_print(int fd, int channel, int prch devices.channel = channel; - if (ioctl(fd, IOCATADEVICES, &devices) < 0) - err(1, "ioctl(IOCATADEVICES)"); - + if (ioctl(fd, IOCATADEVICES, &devices) < 0) { + if (!prchan) + err(1, "ioctl(IOCATADEVICES)"); + return; + } if (prchan) printf("ATA channel %d:\n", channel); printf("%sMaster: ", prchan ? " " : ""); --------------070604020302080803060005--