Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Expose the "param get" functions.



details:   https://anonhg.NetBSD.org/src/rev/5b5017b6b455
branches:  trunk
changeset: 552216:5b5017b6b455
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Sep 21 19:27:27 2003 +0000

description:
Expose the "param get" functions.

diffstat:

 sys/dev/pci/twe.c    |  17 ++++++-----------
 sys/dev/pci/twevar.h |   8 +++++++-
 2 files changed, 13 insertions(+), 12 deletions(-)

diffs (88 lines):

diff -r c750fcde314a -r 5b5017b6b455 sys/dev/pci/twe.c
--- a/sys/dev/pci/twe.c Sun Sep 21 19:26:02 2003 +0000
+++ b/sys/dev/pci/twe.c Sun Sep 21 19:27:27 2003 +0000
@@ -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 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 @@
  * 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 @@
        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 @@
        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 @@
  *
  * 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 -r c750fcde314a -r 5b5017b6b455 sys/dev/pci/twevar.h
--- a/sys/dev/pci/twevar.h      Sun Sep 21 19:26:02 2003 +0000
+++ b/sys/dev/pci/twevar.h      Sun Sep 21 19:27:27 2003 +0000
@@ -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_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



Home | Main Index | Thread Index | Old Index