Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2008 16:15:11 +0400
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Arnaud Houdelette <arnaud.houdelette@tzim.net>
Cc:        koitsu@freebsd.org, freebsd-stable@freebsd.org, sos@FreeBSD.org
Subject:   Re: ATI SB600 Sata controler isn't detected as such.
Message-ID:  <48073F4F.3050804@yandex.ru>
In-Reply-To: <48073DF0.5090008@tzim.net>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <Maxtor 6Y120L0/YAR41BW0> ATA/ATAPI revision 7
>    Slave:       no device present
> ATA channel 2:
>    Master:  ad4 <MAXTOR STM3250820AS/3.AAE> Serial ATA II
>    Slave:       no device present
> ATA channel 3:
>    Master:  ad6 <MAXTOR STM3250820AS/3.AAE> Serial ATA II
>    Slave:       no device present
> ATA channel 4:
>    Master:  ad8 <MAXTOR STM3250820AS/3.AAE> Serial ATA II
>    Slave:       no device present
> ATA channel 5:
>    Master: ad10 <MAXTOR STM3250820AS/3.AAE> 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--



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