Fwd: panic after upgrade to 10

John Baldwin jhb at freebsd.org
Wed Feb 26 16:33:43 UTC 2014


On Saturday, February 22, 2014 10:06:50 am Sergey Matveychuk wrote:
> Hi.
> 
> I've tried to upgrade my home router to FreeBSD 10-STABLE from 8.x. And
> got this panic: https://www.dropbox.com/s/fxsily501x50vtw/A8eRRRJKbYM.jpg
> 
> panic: make_dev_credv: bad si_name (error=17, si_name=agpgart)
> 
> How it could be fixed or how work around to boot?

I think the problem is there can only be one /dev/agpgart and this tried to 
create two.  Odd that you would have two agp devices though.

Try this patch which should fix the panic, but then capture a dmesg and 
'pciconf -lcb' output.

Index: sys/dev/agp.c
===================================================================
--- agp.c	(revision 262488)
+++ agp.c	(working copy)
@@ -212,6 +212,7 @@ int
 agp_generic_attach(device_t dev)
 {
 	struct agp_softc *sc = device_get_softc(dev);
+	struct cdev *cdev;
 	int i;
 	u_int memsize;
 
@@ -256,10 +257,11 @@ agp_generic_attach(device_t dev)
 	TAILQ_INIT(&sc->as_memory);
 	sc->as_nextid = 1;
 
-	sc->as_devnode = make_dev(&agp_cdevsw,
-	    0, UID_ROOT, GID_WHEEL, 0600, "agpgart");
-	sc->as_devnode->si_drv1 = dev;
-
+	if (make_dev_p(MAKEDEV_CHECKNAME, &cdev, &agp_cdevsw, NULL, UID_ROOT,
+	    GID_WHEEL, 0600, "agpgart") == 0) {
+		cdev->si_drv1 = dev;
+		sc->as_devnode = cdev;
+	}
 	return 0;
 }
 
@@ -268,7 +270,8 @@ agp_free_cdev(device_t dev)
 {
 	struct agp_softc *sc = device_get_softc(dev);
 
-	destroy_dev(sc->as_devnode);
+	if (sc->as_devnode != NULL)
+		destroy_dev(sc->as_devnode);
 }
 
 void


-- 
John Baldwin


More information about the freebsd-stable mailing list