diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ata/ata.c | 3 | ||||
-rw-r--r-- | sys/dev/ata/wd.c | 18 | ||||
-rw-r--r-- | sys/dev/ic/wdc.c | 3 |
3 files changed, 9 insertions, 15 deletions
diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c index 679ceeaadfa..7de13970f1c 100644 --- a/sys/dev/ata/ata.c +++ b/sys/dev/ata/ata.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ata.c,v 1.24 2004/01/15 21:37:57 grange Exp $ */ +/* $OpenBSD: ata.c,v 1.25 2005/11/09 19:05:48 uwe Exp $ */ /* $NetBSD: ata.c,v 1.9 1999/04/15 09:41:09 bouyer Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -73,7 +73,6 @@ ata_get_params(struct ata_drive_datas *drvp, u_int8_t flags, WDCDEBUG_PRINT(("ata_get_parms\n"), DEBUG_FUNCS); bzero(tb, sizeof(tb)); - bzero(prms, sizeof(struct ataparams)); bzero(&wdc_c, sizeof(struct wdc_command)); if (drvp->drive_flags & DRIVE_ATA) { diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 41e2a51068a..89fb2089b52 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.44 2005/09/01 02:16:56 uwe Exp $ */ +/* $OpenBSD: wd.c,v 1.45 2005/11/09 19:05:48 uwe Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -1258,29 +1258,23 @@ bad144intern(struct wd_softc *wd) int wd_get_params(struct wd_softc *wd, u_int8_t flags, struct ataparams *params) { -#ifdef __zaurus__ - /* XXX fix after 3.8 release */ - /* We already have the drive parameters; just return them. */ - if (params == &wd->sc_params && wd->sc_params.atap_cylinders != 0) - return 0; -#endif /* __zaurus__ */ switch (ata_get_params(wd->drvp, flags, params)) { case CMD_AGAIN: return 1; case CMD_ERR: -#ifdef __zaurus__ - /* XXX fix after 3.8 release */ - /* We already have the drive parameters; reuse them. */ + /* If we already have drive parameters, reuse them. */ if (wd->sc_params.atap_cylinders != 0) { - *params = wd->sc_params; + if (params != &wd->sc_params) + bcopy(&wd->sc_params, params, + sizeof(struct ataparams)); return 0; } -#endif /* __zaurus__ */ /* * We `know' there's a drive here; just assume it's old. * This geometry is only used to read the MBR and print a * (false) attach message. */ + bzero(params, sizeof(struct ataparams)); strncpy(params->atap_model, "ST506", sizeof params->atap_model); params->atap_config = ATA_CFG_FIXED; diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index 23a4146f453..62599e113bf 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.87 2005/10/21 08:50:50 grange Exp $ */ +/* $OpenBSD: wdc.c,v 1.88 2005/11/09 19:05:48 uwe Exp $ */ /* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */ @@ -851,6 +851,7 @@ wdcattach(chp) /* If IDENTIFY succeeded, this is not an OLD ctrl */ drvp->drive_flags &= ~DRIVE_OLD; } else { + bzero(&drvp->id, sizeof(struct ataparams)); drvp->drive_flags &= ~(DRIVE_ATA | DRIVE_ATAPI); WDCDEBUG_PRINT(("%s:%d:%d: IDENTIFY failed\n", |