From owner-p4-projects@FreeBSD.ORG Fri Jun 2 06:20:04 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A93E916AB40; Fri, 2 Jun 2006 06:20:04 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 581D716AB3C for ; Fri, 2 Jun 2006 06:20:04 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B8B143D46 for ; Fri, 2 Jun 2006 06:20:04 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k526IYxf043872 for ; Fri, 2 Jun 2006 06:18:34 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k526IYG8043869 for perforce@freebsd.org; Fri, 2 Jun 2006 06:18:34 GMT (envelope-from imp@freebsd.org) Date: Fri, 2 Jun 2006 06:18:34 GMT Message-Id: <200606020618.k526IYG8043869@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 98308 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2006 06:20:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=98308 Change 98308 by imp@imp_lighthouse on 2006/06/02 06:18:16 pci attachment now links. malloc the ivars, rather than get them to avoid a core dump Affected files ... .. //depot/projects/arm/src/sys/dev/sdhc/sdhc.c#1 add .. //depot/projects/arm/src/sys/dev/sdhc/sdhc_pci.c#2 edit .. //depot/projects/arm/src/sys/modules/sdhc/Makefile#2 edit Differences ... ==== //depot/projects/arm/src/sys/dev/sdhc/sdhc_pci.c#2 (text+ko) ==== @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -80,7 +81,8 @@ bus_release_resource(dev, SYS_RES_MEMORY, i, res); continue; } - ivars = (struct sdhc_ivars *) device_get_ivars(child); + ivars = (struct sdhc_ivars *) malloc(sizeof *ivars, M_DEVBUF, + M_WAITOK); ivars->res = res; device_set_ivars(child, ivars); } ==== //depot/projects/arm/src/sys/modules/sdhc/Makefile#2 (text+ko) ==== @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../dev/sdhc KMOD= sdhc -SRCS= sdhc_pci.c \ +SRCS= sdhc_pci.c sdhc.c \ device_if.h bus_if.h pci_if.h .include