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
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")) {
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"