summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-08-27 12:53:18 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-08-27 12:53:18 +0000
commit7921c34ed3a2bb3e9eaee3b482d19213138ae4ce (patch)
tree75996521418af70d16397d75330ce8d62601846d
parentf2a9aa7f507365e6a83ceb60d5ef535c1b0874ff (diff)
iosize is no longer used, use correct esc->mc_iosize instead. This fixes a
panic on attach failure. The MUSYCC_MAXFRM_MASK was incorrectly defined and use correct device name in an error message. OK deraadt@
-rw-r--r--sys/dev/pci/musycc_obsd.c8
-rw-r--r--sys/dev/pci/musyccreg.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/pci/musycc_obsd.c b/sys/dev/pci/musycc_obsd.c
index 340c014c720..b6e4f6c03b2 100644
--- a/sys/dev/pci/musycc_obsd.c
+++ b/sys/dev/pci/musycc_obsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: musycc_obsd.c,v 1.6 2005/08/14 22:28:47 claudio Exp $ */
+/* $OpenBSD: musycc_obsd.c,v 1.7 2005/08/27 12:53:17 claudio Exp $ */
/*
* Copyright (c) 2004,2005 Internet Business Solutions AG, Zurich, Switzerland
@@ -152,7 +152,7 @@ musycc_ebus_attach(struct device *parent, struct musycc_softc *esc,
#endif
struct musycc_rom baseconf;
struct musycc_rom_framer framerconf;
- bus_size_t iosize, offset;
+ bus_size_t offset;
int i;
/* find HDLC controller softc ... */
@@ -220,7 +220,7 @@ musycc_ebus_attach(struct device *parent, struct musycc_softc *esc,
for (i = 0; i < baseconf.numframer; i++) {
if (offset >= 0x400) {
- printf("%s: bad rom\n", esc->mc_dev.dv_xname);
+ printf("%s: bad rom\n", sc->mc_dev.dv_xname);
goto failed;
}
ebus_read_buf(&rom, offset, &framerconf, sizeof(framerconf));
@@ -244,7 +244,7 @@ failed:
if (esc->mc_ih != NULL)
pci_intr_disestablish(pc, esc->mc_ih);
bus_space_unmap(sc->mc_st, sc->mc_sh, sc->mc_iosize);
- bus_space_unmap(esc->mc_st, esc->mc_sh, iosize);
+ bus_space_unmap(esc->mc_st, esc->mc_sh, esc->mc_iosize);
return;
}
diff --git a/sys/dev/pci/musyccreg.h b/sys/dev/pci/musyccreg.h
index d4a361424cd..c3b39740b1d 100644
--- a/sys/dev/pci/musyccreg.h
+++ b/sys/dev/pci/musyccreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: musyccreg.h,v 1.2 2005/08/13 23:52:49 claudio Exp $ */
+/* $OpenBSD: musyccreg.h,v 1.3 2005/08/27 12:53:17 claudio Exp $ */
/*
* Copyright (c) 2004,2005 Internet Business Solutions AG, Zurich, Switzerland
@@ -167,7 +167,7 @@ struct musycc_grpdesc {
/* Message Length Descriptor [page 5-20] */
#define MUSYCC_MAXFRM_MAX 4094 /* maximum message length */
-#define MUSYCC_MAXFRM_MASK 0x0eff
+#define MUSYCC_MAXFRM_MASK 0x0fff
#define MUSYCC_MAXFRM2_SHIFT 16
/* Time Slot Descriptor [page 5-23] */