From 5fd7a9d468ef1d46eeba0507c7493f5dcf0bb58d Mon Sep 17 00:00:00 2001 From: Alexander Yurchenko Date: Fri, 6 Feb 2009 20:16:42 +0000 Subject: Fix crash on zaurus when sd memory card plugged by providing an attachment structure that slave devices like sbt expect. --- sys/dev/sdmmc/sdmmc_scsi.c | 6 +++--- sys/dev/sdmmc/sdmmcvar.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/dev/sdmmc') diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c index 101fe0218a3..9e10a8760e6 100644 --- a/sys/dev/sdmmc/sdmmc_scsi.c +++ b/sys/dev/sdmmc/sdmmc_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdmmc_scsi.c,v 1.12 2009/01/21 21:54:00 grange Exp $ */ +/* $OpenBSD: sdmmc_scsi.c,v 1.13 2009/02/06 20:16:41 grange Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler @@ -95,7 +95,7 @@ void sdmmc_scsi_minphys(struct buf *); void sdmmc_scsi_attach(struct sdmmc_softc *sc) { - struct scsibus_attach_args saa; + struct sdmmc_attach_args saa; struct sdmmc_scsi_softc *scbus; struct sdmmc_function *sf; @@ -136,7 +136,7 @@ sdmmc_scsi_attach(struct sdmmc_softc *sc) scbus->sc_link.adapter = &scbus->sc_adapter; bzero(&saa, sizeof(saa)); - saa.saa_sc_link = &scbus->sc_link; + saa.scsi_link = &scbus->sc_link; scbus->sc_child = config_found(&sc->sc_dev, &saa, scsiprint); if (scbus->sc_child == NULL) { diff --git a/sys/dev/sdmmc/sdmmcvar.h b/sys/dev/sdmmc/sdmmcvar.h index 4570e9377a0..a24335a4eb3 100644 --- a/sys/dev/sdmmc/sdmmcvar.h +++ b/sys/dev/sdmmc/sdmmcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sdmmcvar.h,v 1.13 2009/01/09 10:55:22 jsg Exp $ */ +/* $OpenBSD: sdmmcvar.h,v 1.14 2009/02/06 20:16:41 grange Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler @@ -180,7 +180,7 @@ struct sdmmc_softc { * Attach devices at the sdmmc bus. */ struct sdmmc_attach_args { - struct scsi_link scsi_link; /* XXX */ + struct scsi_link *scsi_link; /* XXX */ struct sdmmc_function *sf; }; -- cgit v1.2.3