summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2001-07-11 17:31:26 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2001-07-11 17:31:26 +0000
commit849dbb7341a09204d76891e6964771ee2d58ea0f (patch)
tree993111f499e1241e79586365305605c1c688854c /sys/dev
parente5c6b07b5e1796780db8c0a1fed80a6b54b3aa71 (diff)
Eliminate use of static functions in line with normal OpenBSD
preferences. Having more debugging info available during fixup of this driver to work on powerpc can't hurt either! Change adwminphys() to adw_minphys() to make consistant with all other function names in adw.c.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/adw.c86
-rw-r--r--sys/dev/ic/adwlib.c32
-rw-r--r--sys/dev/pci/adw_pci.c10
3 files changed, 63 insertions, 65 deletions
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c
index df17e5d820f..ad2c2abcf3e 100644
--- a/sys/dev/ic/adw.c
+++ b/sys/dev/ic/adw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw.c,v 1.19 2001/05/16 19:19:28 mickey Exp $ */
+/* $OpenBSD: adw.c,v 1.20 2001/07/11 17:31:24 krw Exp $ */
/* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */
/*
@@ -70,30 +70,30 @@
/******************************************************************************/
-static void adw_enqueue __P((ADW_SOFTC *, struct scsi_xfer *, int));
-static struct scsi_xfer *adw_dequeue __P((ADW_SOFTC *));
+void adw_enqueue __P((ADW_SOFTC *, struct scsi_xfer *, int));
+struct scsi_xfer *adw_dequeue __P((ADW_SOFTC *));
-static int adw_alloc_controls __P((ADW_SOFTC *));
-static int adw_alloc_carriers __P((ADW_SOFTC *));
-static int adw_create_ccbs __P((ADW_SOFTC *, ADW_CCB *, int));
-static void adw_free_ccb __P((ADW_SOFTC *, ADW_CCB *));
-static void adw_reset_ccb __P((ADW_CCB *));
-static int adw_init_ccb __P((ADW_SOFTC *, ADW_CCB *));
-static ADW_CCB *adw_get_ccb __P((ADW_SOFTC *, int));
-static int adw_queue_ccb __P((ADW_SOFTC *, ADW_CCB *, int));
+int adw_alloc_controls __P((ADW_SOFTC *));
+int adw_alloc_carriers __P((ADW_SOFTC *));
+int adw_create_ccbs __P((ADW_SOFTC *, ADW_CCB *, int));
+void adw_free_ccb __P((ADW_SOFTC *, ADW_CCB *));
+void adw_reset_ccb __P((ADW_CCB *));
+int adw_init_ccb __P((ADW_SOFTC *, ADW_CCB *));
+ADW_CCB *adw_get_ccb __P((ADW_SOFTC *, int));
+int adw_queue_ccb __P((ADW_SOFTC *, ADW_CCB *, int));
-static int adw_scsi_cmd __P((struct scsi_xfer *));
-static int adw_build_req __P((struct scsi_xfer *, ADW_CCB *, int));
-static void adw_build_sglist __P((ADW_CCB *, ADW_SCSI_REQ_Q *, ADW_SG_BLOCK *));
-static void adwminphys __P((struct buf *));
-static void adw_isr_callback __P((ADW_SOFTC *, ADW_SCSI_REQ_Q *));
-static void adw_async_callback __P((ADW_SOFTC *, u_int8_t));
+int adw_scsi_cmd __P((struct scsi_xfer *));
+int adw_build_req __P((struct scsi_xfer *, ADW_CCB *, int));
+void adw_build_sglist __P((ADW_CCB *, ADW_SCSI_REQ_Q *, ADW_SG_BLOCK *));
+void adw_minphys __P((struct buf *));
+void adw_isr_callback __P((ADW_SOFTC *, ADW_SCSI_REQ_Q *));
+void adw_async_callback __P((ADW_SOFTC *, u_int8_t));
-static void adw_print_info __P((ADW_SOFTC *, int));
+void adw_print_info __P((ADW_SOFTC *, int));
-static int adw_poll __P((ADW_SOFTC *, struct scsi_xfer *, int));
-static void adw_timeout __P((void *));
-static void adw_reset_bus __P((ADW_SOFTC *));
+int adw_poll __P((ADW_SOFTC *, struct scsi_xfer *, int));
+void adw_timeout __P((void *));
+void adw_reset_bus __P((ADW_SOFTC *));
/******************************************************************************/
@@ -122,7 +122,7 @@ struct scsi_device adw_dev =
* to avoid having to allocate additional resources (since we're used
* only during resource shortages anyhow.
*/
-static void
+void
adw_enqueue(sc, xs, infront)
ADW_SOFTC *sc;
struct scsi_xfer *xs;
@@ -143,7 +143,7 @@ adw_enqueue(sc, xs, infront)
/*
* Pull a scsi_xfer off the front of the software queue.
*/
-static struct scsi_xfer *
+struct scsi_xfer *
adw_dequeue(sc)
ADW_SOFTC *sc;
{
@@ -163,7 +163,7 @@ adw_dequeue(sc)
/******************************************************************************/
-static int
+int
adw_alloc_controls(sc)
ADW_SOFTC *sc;
{
@@ -209,7 +209,7 @@ adw_alloc_controls(sc)
}
-static int
+int
adw_alloc_carriers(sc)
ADW_SOFTC *sc;
{
@@ -275,7 +275,7 @@ adw_alloc_carriers(sc)
* Create a set of ccbs and add them to the free list. Called once
* by adw_init(). We return the number of CCBs successfully created.
*/
-static int
+int
adw_create_ccbs(sc, ccbstore, count)
ADW_SOFTC *sc;
ADW_CCB *ccbstore;
@@ -301,7 +301,7 @@ adw_create_ccbs(sc, ccbstore, count)
/*
* A ccb is put onto the free list.
*/
-static void
+void
adw_free_ccb(sc, ccb)
ADW_SOFTC *sc;
ADW_CCB *ccb;
@@ -324,7 +324,7 @@ adw_free_ccb(sc, ccb)
}
-static void
+void
adw_reset_ccb(ccb)
ADW_CCB *ccb;
{
@@ -333,7 +333,7 @@ adw_reset_ccb(ccb)
}
-static int
+int
adw_init_ccb(sc, ccb)
ADW_SOFTC *sc;
ADW_CCB *ccb;
@@ -372,7 +372,7 @@ adw_init_ccb(sc, ccb)
*
* If there are none, see if we can allocate a new one
*/
-static ADW_CCB *
+ADW_CCB *
adw_get_ccb(sc, flags)
ADW_SOFTC *sc;
int flags;
@@ -429,7 +429,7 @@ adw_ccb_phys_kv(sc, ccb_phys)
/*
* Queue a CCB to be sent to the controller, and send it if possible.
*/
-static int
+int
adw_queue_ccb(sc, ccb, retry)
ADW_SOFTC *sc;
ADW_CCB *ccb;
@@ -618,7 +618,7 @@ adw_attach(sc)
* Fill in the adapter.
*/
sc->sc_adapter.scsi_cmd = adw_scsi_cmd;
- sc->sc_adapter.scsi_minphys = adwminphys;
+ sc->sc_adapter.scsi_minphys = adw_minphys;
/*
* fill in the prototype scsi_link.
@@ -634,8 +634,8 @@ adw_attach(sc)
}
-static void
-adwminphys(bp)
+void
+adw_minphys(bp)
struct buf *bp;
{
@@ -649,7 +649,7 @@ adwminphys(bp)
* start a scsi operation given the command and the data address.
* Also needs the unit, target and lu.
*/
-static int
+int
adw_scsi_cmd(xs)
struct scsi_xfer *xs;
{
@@ -774,7 +774,7 @@ retryagain:
/*
* Build a request structure for the Wide Boards.
*/
-static int
+int
adw_build_req(xs, ccb, flags)
struct scsi_xfer *xs;
ADW_CCB *ccb;
@@ -882,7 +882,7 @@ adw_build_req(xs, ccb, flags)
/*
* Build scatter-gather list for Wide Boards.
*/
-static void
+void
adw_build_sglist(ccb, scsiqp, sg_block)
ADW_CCB *ccb;
ADW_SCSI_REQ_Q *scsiqp;
@@ -963,7 +963,7 @@ adw_intr(arg)
/*
* Poll a particular unit, looking for a particular xs
*/
-static int
+int
adw_poll(sc, xs, count)
ADW_SOFTC *sc;
struct scsi_xfer *xs;
@@ -987,7 +987,7 @@ adw_poll(sc, xs, count)
}
-static void
+void
adw_timeout(arg)
void *arg;
{
@@ -1084,7 +1084,7 @@ adw_timeout(arg)
}
-static void
+void
adw_reset_bus(sc)
ADW_SOFTC *sc;
{
@@ -1112,7 +1112,7 @@ adw_reset_bus(sc)
/******************************************************************************/
-static void
+void
adw_print_info(sc, tid)
ADW_SOFTC *sc;
int tid;
@@ -1174,7 +1174,7 @@ adw_print_info(sc, tid)
* Interrupts are disabled by the caller (AdwISR() function), and will be
* enabled at the end of the caller.
*/
-static void
+void
adw_isr_callback(sc, scsiq)
ADW_SOFTC *sc;
ADW_SCSI_REQ_Q *scsiq;
@@ -1361,7 +1361,7 @@ NO_ERROR:
/*
* adw_async_callback() - Adw Library asynchronous event callback function.
*/
-static void
+void
adw_async_callback(sc, code)
ADW_SOFTC *sc;
u_int8_t code;
diff --git a/sys/dev/ic/adwlib.c b/sys/dev/ic/adwlib.c
index 21a3475c02b..9c32768b15e 100644
--- a/sys/dev/ic/adwlib.c
+++ b/sys/dev/ic/adwlib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adwlib.c,v 1.13 2001/04/11 04:05:16 krw Exp $ */
+/* $OpenBSD: adwlib.c,v 1.14 2001/07/11 17:31:25 krw Exp $ */
/* $NetBSD: adwlib.c,v 1.20 2000/07/04 04:17:03 itojun Exp $ */
/*
@@ -75,8 +75,6 @@
#include <dev/ic/adw.h>
-/* Static Functions */
-
int AdwRamSelfTest __P((bus_space_tag_t, bus_space_handle_t, u_int8_t));
int AdwLoadMCode __P((bus_space_tag_t, bus_space_handle_t, u_int16_t *,
u_int8_t));
@@ -86,17 +84,17 @@ int AdwASC38C0800Cabling __P((bus_space_tag_t, bus_space_handle_t,
int AdwASC38C1600Cabling __P((bus_space_tag_t, bus_space_handle_t,
ADW_DVC_CFG *));
-static u_int16_t AdwGetEEPROMConfig __P((bus_space_tag_t, bus_space_handle_t,
+u_int16_t AdwGetEEPROMConfig __P((bus_space_tag_t, bus_space_handle_t,
ADW_EEPROM *));
-static void AdwSetEEPROMConfig __P((bus_space_tag_t, bus_space_handle_t,
+void AdwSetEEPROMConfig __P((bus_space_tag_t, bus_space_handle_t,
ADW_EEPROM *));
-static u_int16_t AdwReadEEPWord __P((bus_space_tag_t, bus_space_handle_t, int));
-static void AdwWaitEEPCmd __P((bus_space_tag_t, bus_space_handle_t));
+u_int16_t AdwReadEEPWord __P((bus_space_tag_t, bus_space_handle_t, int));
+void AdwWaitEEPCmd __P((bus_space_tag_t, bus_space_handle_t));
-static void AdwInquiryHandling __P((ADW_SOFTC *, ADW_SCSI_REQ_Q *));
+void AdwInquiryHandling __P((ADW_SOFTC *, ADW_SCSI_REQ_Q *));
-static void AdwSleepMilliSecond __P((u_int32_t));
-static void AdwDelayMicroSecond __P((u_int32_t));
+void AdwSleepMilliSecond __P((u_int32_t));
+void AdwDelayMicroSecond __P((u_int32_t));
/*
@@ -1560,7 +1558,7 @@ AdwASC38C1600Cabling(iot, ioh, cfg)
*
* Return a checksum based on the EEPROM configuration read.
*/
-static u_int16_t
+u_int16_t
AdwGetEEPROMConfig(iot, ioh, cfg_buf)
bus_space_tag_t iot;
bus_space_handle_t ioh;
@@ -1597,7 +1595,7 @@ AdwGetEEPROMConfig(iot, ioh, cfg_buf)
/*
* Read the EEPROM from specified location
*/
-static u_int16_t
+u_int16_t
AdwReadEEPWord(iot, ioh, eep_word_addr)
bus_space_tag_t iot;
bus_space_handle_t ioh;
@@ -1614,7 +1612,7 @@ AdwReadEEPWord(iot, ioh, eep_word_addr)
/*
* Wait for EEPROM command to complete
*/
-static void
+void
AdwWaitEEPCmd(iot, ioh)
bus_space_tag_t iot;
bus_space_handle_t ioh;
@@ -1637,7 +1635,7 @@ AdwWaitEEPCmd(iot, ioh)
/*
* Write the EEPROM from 'cfg_buf'.
*/
-static void
+void
AdwSetEEPROMConfig(iot, ioh, cfg_buf)
bus_space_tag_t iot;
bus_space_handle_t ioh;
@@ -2217,7 +2215,7 @@ u_int32_t idle_cmd_parameter;
* microcode operating variables that affect WDTR, SDTR, and Tag
* Queuing.
*/
-static void
+void
AdwInquiryHandling(sc, scsiq)
ADW_SOFTC *sc;
ADW_SCSI_REQ_Q *scsiq;
@@ -2392,7 +2390,7 @@ ADW_SCSI_REQ_Q *scsiq;
}
-static void
+void
AdwSleepMilliSecond(n)
u_int32_t n;
{
@@ -2401,7 +2399,7 @@ u_int32_t n;
}
-static void
+void
AdwDelayMicroSecond(n)
u_int32_t n;
{
diff --git a/sys/dev/pci/adw_pci.c b/sys/dev/pci/adw_pci.c
index 5e78c83543e..d354d7adbdc 100644
--- a/sys/dev/pci/adw_pci.c
+++ b/sys/dev/pci/adw_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw_pci.c,v 1.8 2001/06/12 15:40:29 niklas Exp $ */
+/* $OpenBSD: adw_pci.c,v 1.9 2001/07/11 17:31:24 krw Exp $ */
/* $NetBSD: adw_pci.c,v 1.7 2000/05/26 15:13:46 dante Exp $ */
/*
@@ -77,8 +77,8 @@
/******************************************************************************/
-static int adw_pci_match __P((struct device *, void *, void *));
-static void adw_pci_attach __P((struct device *, struct device *, void *));
+int adw_pci_match __P((struct device *, void *, void *));
+void adw_pci_attach __P((struct device *, struct device *, void *));
struct cfattach adw_pci_ca =
{
@@ -91,7 +91,7 @@ struct cfattach adw_pci_ca =
* If we find one, note it's address (slot) and call
* the actual probe routine to check it out.
*/
-static int
+int
adw_pci_match(parent, match, aux)
struct device *parent;
void *match;
@@ -111,7 +111,7 @@ adw_pci_match(parent, match, aux)
}
-static void
+void
adw_pci_attach(parent, self, aux)
struct device *parent, *self;
void *aux;