Date: Thu, 17 Apr 2008 15:59:01 +0400 From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: Arnaud Houdelette <arnaud.houdelette@tzim.net> Cc: koitsu@freebsd.org, freebsd-stable@freebsd.org, =?UTF-8?B?U8O4cmVuIFNj?= =?UTF-8?B?aG1pZHQ=?= <sos@FreeBSD.org> Subject: Re: ATI SB600 Sata controler isn't detected as such. Message-ID: <48073B85.3020509@yandex.ru> In-Reply-To: <480722F4.9010600@tzim.net> References: <48061734.30509@tzim.net> <20080416152254.GA33816@eos.sc1.parodius.com> 9060000000211159472 <103161208360650@webmail30.yandex.ru> <480722F4.9010600@tzim.net>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Arnaud Houdelette wrote:
> I removed the jumpers, and drives are recognised as sata300.
> But I still get the "atacontrol: ioctl(IOCATADEVICES): Device not
> configured" message.
> Thanks anyway. It doesn't really bothers me as long as the controler
> works fine.
Try this patch.
--
WBR, Andrey V. Elsukov
[-- Attachment #2 --]
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 11:56:18 -0000
@@ -259,15 +259,17 @@ ata_cap_print(int fd)
}
static void
-info_print(int fd, int channel, int prchan)
+info_print(int fd, int channel, int prchan, int quiet)
{
struct ata_ioc_devices devices;
devices.channel = channel;
- if (ioctl(fd, IOCATADEVICES, &devices) < 0)
- err(1, "ioctl(IOCATADEVICES)");
-
+ if (ioctl(fd, IOCATADEVICES, &devices) < 0) {
+ if (!quiet)
+ err(1, "ioctl(IOCATADEVICES)");
+ return;
+ }
if (prchan)
printf("ATA channel %d:\n", channel);
printf("%sMaster: ", prchan ? " " : "");
@@ -392,12 +394,12 @@ main(int argc, char **argv)
if (ioctl(fd, IOCATAGMAXCHANNEL, &maxchannel) < 0)
err(1, "ioctl(IOCATAGMAXCHANNEL)");
for (channel = 0; channel < maxchannel; channel++)
- info_print(fd, channel, 1);
+ info_print(fd, channel, 1, 1);
exit(EX_OK);
}
if (!strcmp(argv[1], "info") && argc == 3) {
channel = ata_arg(argv[2]);
- info_print(fd, channel, 0);
+ info_print(fd, channel, 0, 0);
exit(EX_OK);
}
if (!strcmp(argv[1], "detach") && argc == 3) {
@@ -410,14 +412,14 @@ main(int argc, char **argv)
channel = ata_arg(argv[2]);
if (ioctl(fd, IOCATAATTACH, &channel) < 0)
err(1, "ioctl(IOCATAATTACH)");
- info_print(fd, channel, 0);
+ info_print(fd, channel, 0, 0);
exit(EX_OK);
}
if (!strcmp(argv[1], "reinit") && argc == 3) {
channel = ata_arg(argv[2]);
if (ioctl(fd, IOCATAREINIT, &channel) < 0)
warn("ioctl(IOCATAREINIT)");
- info_print(fd, channel, 0);
+ info_print(fd, channel, 0, 0);
exit(EX_OK);
}
if (!strcmp(argv[1], "create")) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48073B85.3020509>
