NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/53389: ataraid doesn't work without _MODULE
>Number: 53389
>Category: kern
>Synopsis: ataraid doesn't work without _MODULE
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 22 03:45:00 +0000 2018
>Originator: Est Suzumenomiya
>Release: 8.0_RC1
>Organization:
>Environment:
NetBSD 8.0_RC1 NetBSD 8.0_RC1 (GENERIC) #5: Fri Jun 22 11:31:21 JST 2018 est%izumi.ceres.ne.jp@localhost:/private/build/20180622/amd64/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
ataraid (e.g. Intel MatrixRAID) doesn't configured, because config_cfattach_attach() never called by sys/dev/ata/ata_raid.c without _MODULE.
>How-To-Repeat:
Boot GENERIC kernel on PC with ATA RAID device.
>Fix:
--- sys/dev/ata/ata_raid.c.ORIG 2018-05-14 17:28:37.422105691 +0900
+++ sys/dev/ata/ata_raid.c 2018-06-15 18:01:25.820474782 +0900
@@ -161,6 +161,9 @@
.cf_unit = 0,
.cf_fstate = FSTATE_STAR,
};
+#ifndef _MODULE
+ int error;
+#endif
/*
* Only run once for each instantiation
@@ -172,6 +175,16 @@
if (TAILQ_EMPTY(&ataraid_array_info_list))
goto out;
+#ifndef _MODULE
+ error = config_cfattach_attach(ataraid_cd.cd_name, &ataraid_ca);
+ if (error) {
+ printf("%s: unable to register cfattach, error = %d\n",
+ ataraid_cd.cd_name, error);
+ (void) config_cfdriver_detach(&ataraid_cd);
+ goto out;
+ }
+#endif
+
if (config_attach_pseudo(&ataraid_cfdata) == NULL)
printf("%s: unable to attach an instance\n",
ataraid_cd.cd_name);
Home |
Main Index |
Thread Index |
Old Index