ATI SB600 Sata controler isn't detected as such.

Andrey V. Elsukov bu7cher at yandex.ru
Thu Apr 17 12:15:20 UTC 2008


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
-------------- next part --------------
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 ? "    " : "");


More information about the freebsd-stable mailing list