diff options
| author | thorpej <thorpej@NetBSD.org> | 2003-09-21 19:27:27 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2003-09-21 19:27:27 +0000 |
| commit | 21809f0c305291ddab2aa7bf4599e7c49a709769 (patch) | |
| tree | c21427745b12f823972520234f455ef280e74c50 /sys/dev | |
| parent | b02749036cad0b9b6d51ef2fab1faab1a22d4ec6 (diff) | |
Expose the "param get" functions.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/twe.c | 17 | ||||
| -rw-r--r-- | sys/dev/pci/twevar.h | 8 |
2 files changed, 13 insertions, 12 deletions
diff --git a/sys/dev/pci/twe.c b/sys/dev/pci/twe.c index 3768f32e9f4..676bb5339b7 100644 --- a/sys/dev/pci/twe.c +++ b/sys/dev/pci/twe.c @@ -1,4 +1,4 @@ -/* $NetBSD: twe.c,v 1.42 2003/09/21 19:20:18 thorpej Exp $ */ +/* $NetBSD: twe.c,v 1.43 2003/09/21 19:27:27 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.42 2003/09/21 19:20:18 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.43 2003/09/21 19:27:27 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -103,11 +103,6 @@ static void twe_attach(struct device *, struct device *, void *); static int twe_init_connection(struct twe_softc *); static int twe_intr(void *); static int twe_match(struct device *, struct cfdata *, void *); -static int twe_param_get(struct twe_softc *, int, int, size_t, - void (*)(struct twe_ccb *, int), struct twe_param **); -static int twe_param_get_1(struct twe_softc *, int, int, uint8_t *); -static int twe_param_get_2(struct twe_softc *, int, int, uint16_t *); -static int twe_param_get_4(struct twe_softc *, int, int, uint32_t *); static int twe_param_set(struct twe_softc *, int, int, size_t, void *); static void twe_poll(struct twe_softc *); static int twe_print(void *, const char *); @@ -752,7 +747,7 @@ twe_aen_handler(struct twe_ccb *ccb, int error) * These are short-hand functions that execute TWE_OP_GET_PARAM to * fetch 1, 2, and 4 byte parameter values, respectively. */ -static int +int twe_param_get_1(struct twe_softc *sc, int table_id, int param_id, uint8_t *valp) { @@ -767,7 +762,7 @@ twe_param_get_1(struct twe_softc *sc, int table_id, int param_id, return (0); } -static int +int twe_param_get_2(struct twe_softc *sc, int table_id, int param_id, uint16_t *valp) { @@ -782,7 +777,7 @@ twe_param_get_2(struct twe_softc *sc, int table_id, int param_id, return (0); } -static int +int twe_param_get_4(struct twe_softc *sc, int table_id, int param_id, uint32_t *valp) { @@ -805,7 +800,7 @@ twe_param_get_4(struct twe_softc *sc, int table_id, int param_id, * * The caller or callback is responsible for freeing the buffer. */ -static int +int twe_param_get(struct twe_softc *sc, int table_id, int param_id, size_t size, void (*func)(struct twe_ccb *, int), struct twe_param **pbuf) { diff --git a/sys/dev/pci/twevar.h b/sys/dev/pci/twevar.h index 8cfba0bb440..3bddb4b204b 100644 --- a/sys/dev/pci/twevar.h +++ b/sys/dev/pci/twevar.h @@ -1,4 +1,4 @@ -/* $NetBSD: twevar.h,v 1.15 2003/09/21 19:20:19 thorpej Exp $ */ +/* $NetBSD: twevar.h,v 1.16 2003/09/21 19:27:28 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -116,6 +116,12 @@ int twe_ccb_poll(struct twe_softc *, struct twe_ccb *, int); int twe_ccb_submit(struct twe_softc *, struct twe_ccb *); void twe_ccb_unmap(struct twe_softc *, struct twe_ccb *); +int twe_param_get(struct twe_softc *, int, int, size_t, + void (*)(struct twe_ccb *, int), struct twe_param **); +int twe_param_get_1(struct twe_softc *, int, int, uint8_t *); +int twe_param_get_2(struct twe_softc *, int, int, uint16_t *); +int twe_param_get_4(struct twe_softc *, int, int, uint32_t *); + static __inline__ size_t twe_get_maxsegs(void) { size_t max_segs = ((MAXPHYS + PAGE_SIZE - 1) / PAGE_SIZE) + 1; #ifdef TWE_SG_SIZE |
