Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys Do the same as OpenBSD and get rid of the *_handle ...
details: https://anonhg.NetBSD.org/src/rev/ad3f28d2491c
branches: nick-nhusb
changeset: 334159:ad3f28d2491c
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Mar 19 17:26:42 2015 +0000
description:
Do the same as OpenBSD and get rid of the *_handle typedefs and use
plain structures insteads
diffstat:
sys/arch/arm/omap/tiotg.c | 6 +-
sys/arch/mips/adm5120/dev/ahci.c | 156 ++++++++++++------------
sys/arch/mips/adm5120/dev/ahcivar.h | 14 +-
sys/dev/usb/aubtfwl.c | 12 +-
sys/dev/usb/auvitek.c | 6 +-
sys/dev/usb/auvitek_audio.c | 8 +-
sys/dev/usb/auvitek_dtv.c | 11 +-
sys/dev/usb/auvitek_video.c | 9 +-
sys/dev/usb/auvitekvar.h | 16 +-
sys/dev/usb/ehci.c | 205 +++++++++++++++++----------------
sys/dev/usb/ehcivar.h | 6 +-
sys/dev/usb/emdtv.c | 6 +-
sys/dev/usb/emdtv_dtv.c | 10 +-
sys/dev/usb/emdtv_ir.c | 8 +-
sys/dev/usb/emdtvvar.h | 12 +-
sys/dev/usb/ezload.c | 10 +-
sys/dev/usb/ezload.h | 8 +-
sys/dev/usb/if_athn_usb.c | 34 ++--
sys/dev/usb/if_athn_usb.h | 18 +-
sys/dev/usb/if_atu.c | 16 +-
sys/dev/usb/if_atureg.h | 10 +-
sys/dev/usb/if_aue.c | 20 +-
sys/dev/usb/if_auereg.h | 10 +-
sys/dev/usb/if_axe.c | 14 +-
sys/dev/usb/if_axen.c | 12 +-
sys/dev/usb/if_axenreg.h | 6 +-
sys/dev/usb/if_axereg.h | 10 +-
sys/dev/usb/if_cdce.c | 14 +-
sys/dev/usb/if_cdcereg.h | 14 +-
sys/dev/usb/if_cue.c | 16 +-
sys/dev/usb/if_cuereg.h | 10 +-
sys/dev/usb/if_kue.c | 16 +-
sys/dev/usb/if_kuereg.h | 10 +-
sys/dev/usb/if_otus.c | 16 +-
sys/dev/usb/if_otusvar.h | 20 +-
sys/dev/usb/if_rum.c | 16 +-
sys/dev/usb/if_rumvar.h | 16 +-
sys/dev/usb/if_run.c | 12 +-
sys/dev/usb/if_runvar.h | 14 +-
sys/dev/usb/if_smsc.c | 12 +-
sys/dev/usb/if_smscvar.h | 10 +-
sys/dev/usb/if_udav.c | 16 +-
sys/dev/usb/if_udavreg.h | 14 +-
sys/dev/usb/if_upgt.c | 12 +-
sys/dev/usb/if_upgtvar.h | 12 +-
sys/dev/usb/if_upl.c | 28 ++--
sys/dev/usb/if_ural.c | 18 +-
sys/dev/usb/if_uralvar.h | 16 +-
sys/dev/usb/if_url.c | 16 +-
sys/dev/usb/if_urlreg.h | 14 +-
sys/dev/usb/if_urndis.c | 16 +-
sys/dev/usb/if_urndisreg.h | 14 +-
sys/dev/usb/if_urtw.c | 16 +-
sys/dev/usb/if_urtwn.c | 22 +-
sys/dev/usb/if_urtwnvar.h | 16 +-
sys/dev/usb/if_urtwreg.h | 14 +-
sys/dev/usb/if_zyd.c | 18 +-
sys/dev/usb/if_zydreg.h | 12 +-
sys/dev/usb/irmce.c | 16 +-
sys/dev/usb/moscom.c | 10 +-
sys/dev/usb/motg.c | 136 +++++++++++-----------
sys/dev/usb/motgvar.h | 6 +-
sys/dev/usb/ohci.c | 186 +++++++++++++++---------------
sys/dev/usb/ohcivar.h | 8 +-
sys/dev/usb/pseye.c | 14 +-
sys/dev/usb/slurm.c | 8 +-
sys/dev/usb/stuirda.c | 8 +-
sys/dev/usb/u3g.c | 44 +++---
sys/dev/usb/uark.c | 8 +-
sys/dev/usb/uatp.c | 6 +-
sys/dev/usb/uaudio.c | 28 ++--
sys/dev/usb/uberry.c | 8 +-
sys/dev/usb/ubsa.c | 6 +-
sys/dev/usb/ubsa_common.c | 6 +-
sys/dev/usb/ubsavar.h | 10 +-
sys/dev/usb/ubt.c | 74 ++++++------
sys/dev/usb/uchcom.c | 20 +-
sys/dev/usb/ucom.c | 26 ++--
sys/dev/usb/ucomvar.h | 6 +-
sys/dev/usb/ucycom.c | 10 +-
sys/dev/usb/udl.c | 10 +-
sys/dev/usb/udl.h | 10 +-
sys/dev/usb/udsbr.c | 8 +-
sys/dev/usb/udsir.c | 24 +-
sys/dev/usb/uep.c | 16 +-
sys/dev/usb/uftdi.c | 12 +-
sys/dev/usb/ugen.c | 48 +++---
sys/dev/usb/ugensa.c | 12 +-
sys/dev/usb/uhci.c | 192 +++++++++++++++---------------
sys/dev/usb/uhcivar.h | 6 +-
sys/dev/usb/uhidev.c | 10 +-
sys/dev/usb/uhidev.h | 12 +-
sys/dev/usb/uhmodem.c | 30 ++--
sys/dev/usb/uhso.c | 76 ++++++------
sys/dev/usb/uhub.c | 26 ++--
sys/dev/usb/uipad.c | 8 +-
sys/dev/usb/uipaq.c | 12 +-
sys/dev/usb/uirda.c | 14 +-
sys/dev/usb/uirdavar.h | 16 +-
sys/dev/usb/ukbd.c | 8 +-
sys/dev/usb/ulpt.c | 30 ++--
sys/dev/usb/umass.c | 34 ++--
sys/dev/usb/umassvar.h | 12 +-
sys/dev/usb/umcs.c | 18 +-
sys/dev/usb/umct.c | 16 +-
sys/dev/usb/umidi.c | 16 +-
sys/dev/usb/umidivar.h | 10 +-
sys/dev/usb/umodem_common.c | 12 +-
sys/dev/usb/umodemvar.h | 12 +-
sys/dev/usb/uplcom.c | 22 +-
sys/dev/usb/urio.c | 20 +-
sys/dev/usb/usb.c | 28 ++--
sys/dev/usb/usb_mem.c | 10 +-
sys/dev/usb/usb_mem.h | 8 +-
sys/dev/usb/usb_subr.c | 92 +++++++-------
sys/dev/usb/usbdi.c | 156 ++++++++++++------------
sys/dev/usb/usbdi.h | 141 +++++++++++-----------
sys/dev/usb/usbdi_util.c | 68 +++++-----
sys/dev/usb/usbdi_util.h | 58 ++++----
sys/dev/usb/usbdivar.h | 80 ++++++------
sys/dev/usb/usbroothub.c | 30 ++--
sys/dev/usb/uscanner.c | 16 +-
sys/dev/usb/uslsa.c | 8 +-
sys/dev/usb/usscanner.c | 38 +++---
sys/dev/usb/ustir.c | 24 +-
sys/dev/usb/uthum.c | 8 +-
sys/dev/usb/utoppy.c | 22 +-
sys/dev/usb/uvideo.c | 26 ++--
sys/dev/usb/uvisor.c | 12 +-
sys/dev/usb/uvscom.c | 18 +-
sys/dev/usb/uyap.c | 6 +-
sys/dev/usb/uyurex.c | 8 +-
sys/dev/usb/xhci.c | 150 ++++++++++++------------
sys/dev/usb/xhcivar.h | 4 +-
sys/external/bsd/dwc2/dist/dwc2_hcd.c | 6 +-
sys/external/bsd/dwc2/dist/dwc2_hcd.h | 4 +-
sys/external/bsd/dwc2/dwc2.c | 172 ++++++++++++++--------------
sys/external/bsd/dwc2/dwc2var.h | 4 +-
sys/rump/dev/lib/libugenhc/ugenhc.c | 54 ++++----
139 files changed, 1884 insertions(+), 1886 deletions(-)
diffs (truncated from 12269 to 300 lines):
diff -r 37f7bd8024ff -r ad3f28d2491c sys/arch/arm/omap/tiotg.c
--- a/sys/arch/arm/omap/tiotg.c Wed Mar 18 15:45:45 2015 +0000
+++ b/sys/arch/arm/omap/tiotg.c Thu Mar 19 17:26:42 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tiotg.c,v 1.2.8.3 2015/03/09 14:26:31 skrll Exp $ */
+/* $NetBSD: tiotg.c,v 1.2.8.4 2015/03/19 17:26:42 skrll Exp $ */
/*
* Copyright (c) 2013 Manuel Bouyer. All rights reserved.
*
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.2.8.3 2015/03/09 14:26:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.2.8.4 2015/03/19 17:26:42 skrll Exp $");
#include "opt_omap.h"
#include "locators.h"
@@ -227,7 +227,7 @@
}
static int
-tiotg_intr(void * v)
+tiotg_intr(void *v)
{
panic("tiotg_intr");
}
diff -r 37f7bd8024ff -r ad3f28d2491c sys/arch/mips/adm5120/dev/ahci.c
--- a/sys/arch/mips/adm5120/dev/ahci.c Wed Mar 18 15:45:45 2015 +0000
+++ b/sys/arch/mips/adm5120/dev/ahci.c Thu Mar 19 17:26:42 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ahci.c,v 1.12.6.11 2014/12/05 09:37:49 skrll Exp $ */
+/* $NetBSD: ahci.c,v 1.12.6.12 2015/03/19 17:26:42 skrll Exp $ */
/*-
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.12.6.11 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.12.6.12 2015/03/19 17:26:42 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -90,53 +90,53 @@
#include <mips/adm5120/dev/ahcireg.h>
#include <mips/adm5120/dev/ahcivar.h>
-static usbd_status ahci_open(usbd_pipe_handle);
+static usbd_status ahci_open(struct usbd_pipe *);
static void ahci_softintr(void *);
static void ahci_poll(struct usbd_bus *);
static void ahci_poll_hub(void *);
static void ahci_poll_device(void *arg);
-static usbd_xfer_handle ahci_allocx(struct usbd_bus *);
-static void ahci_freex(struct usbd_bus *, usbd_xfer_handle);
+static struct usbd_xfer *ahci_allocx(struct usbd_bus *);
+static void ahci_freex(struct usbd_bus *, struct usbd_xfer *);
static void ahci_get_lock(struct usbd_bus *, kmutex_t **);
static int ahci_roothub_ctrl(struct usbd_bus *, usb_device_request_t *,
void *, int);
-static usbd_status ahci_root_intr_transfer(usbd_xfer_handle);
-static usbd_status ahci_root_intr_start(usbd_xfer_handle);
-static void ahci_root_intr_abort(usbd_xfer_handle);
-static void ahci_root_intr_close(usbd_pipe_handle);
-static void ahci_root_intr_done(usbd_xfer_handle);
+static usbd_status ahci_root_intr_transfer(struct usbd_xfer *);
+static usbd_status ahci_root_intr_start(struct usbd_xfer *);
+static void ahci_root_intr_abort(struct usbd_xfer *);
+static void ahci_root_intr_close(struct usbd_pipe *);
+static void ahci_root_intr_done(struct usbd_xfer *);
-static usbd_status ahci_device_ctrl_transfer(usbd_xfer_handle);
-static usbd_status ahci_device_ctrl_start(usbd_xfer_handle);
-static void ahci_device_ctrl_abort(usbd_xfer_handle);
-static void ahci_device_ctrl_close(usbd_pipe_handle);
-static void ahci_device_ctrl_done(usbd_xfer_handle);
+static usbd_status ahci_device_ctrl_transfer(struct usbd_xfer *);
+static usbd_status ahci_device_ctrl_start(struct usbd_xfer *);
+static void ahci_device_ctrl_abort(struct usbd_xfer *);
+static void ahci_device_ctrl_close(struct usbd_pipe *);
+static void ahci_device_ctrl_done(struct usbd_xfer *);
-static usbd_status ahci_device_intr_transfer(usbd_xfer_handle);
-static usbd_status ahci_device_intr_start(usbd_xfer_handle);
-static void ahci_device_intr_abort(usbd_xfer_handle);
-static void ahci_device_intr_close(usbd_pipe_handle);
-static void ahci_device_intr_done(usbd_xfer_handle);
+static usbd_status ahci_device_intr_transfer(struct usbd_xfer *);
+static usbd_status ahci_device_intr_start(struct usbd_xfer *);
+static void ahci_device_intr_abort(struct usbd_xfer *);
+static void ahci_device_intr_close(struct usbd_pipe *);
+static void ahci_device_intr_done(struct usbd_xfer *);
-static usbd_status ahci_device_isoc_transfer(usbd_xfer_handle);
-static usbd_status ahci_device_isoc_start(usbd_xfer_handle);
-static void ahci_device_isoc_abort(usbd_xfer_handle);
-static void ahci_device_isoc_close(usbd_pipe_handle);
-static void ahci_device_isoc_done(usbd_xfer_handle);
+static usbd_status ahci_device_isoc_transfer(struct usbd_xfer *);
+static usbd_status ahci_device_isoc_start(struct usbd_xfer *);
+static void ahci_device_isoc_abort(struct usbd_xfer *);
+static void ahci_device_isoc_close(struct usbd_pipe *);
+static void ahci_device_isoc_done(struct usbd_xfer *);
-static usbd_status ahci_device_bulk_transfer(usbd_xfer_handle);
-static usbd_status ahci_device_bulk_start(usbd_xfer_handle);
-static void ahci_device_bulk_abort(usbd_xfer_handle);
-static void ahci_device_bulk_close(usbd_pipe_handle);
-static void ahci_device_bulk_done(usbd_xfer_handle);
+static usbd_status ahci_device_bulk_transfer(struct usbd_xfer *);
+static usbd_status ahci_device_bulk_start(struct usbd_xfer *);
+static void ahci_device_bulk_abort(struct usbd_xfer *);
+static void ahci_device_bulk_close(struct usbd_pipe *);
+static void ahci_device_bulk_done(struct usbd_xfer *);
static int ahci_transaction(struct ahci_softc *,
- usbd_pipe_handle, uint8_t, int, u_char *, uint8_t);
-static void ahci_noop(usbd_pipe_handle);
-static void ahci_abort_xfer(usbd_xfer_handle, usbd_status);
-static void ahci_device_clear_toggle(usbd_pipe_handle);
+ struct usbd_pipe *, uint8_t, int, u_char *, uint8_t);
+static void ahci_noop(struct usbd_pipe *);
+static void ahci_abort_xfer(struct usbd_xfer *, usbd_status);
+static void ahci_device_clear_toggle(struct usbd_pipe *);
extern int usbdebug;
extern int uhubdebug;
@@ -156,7 +156,7 @@
void print_req(usb_device_request_t *);
void print_req_hub(usb_device_request_t *);
void print_dumpreg(struct ahci_softc *);
-void print_xfer(usbd_xfer_handle);
+void print_xfer(struct usbd_xfer *);
#else
#define DPRINTF(z,x)
#endif
@@ -349,9 +349,9 @@
}
usbd_status
-ahci_open(usbd_pipe_handle pipe)
+ahci_open(struct usbd_pipe *pipe)
{
- usbd_device_handle dev = pipe->up_dev;
+ struct usbd_device *dev = pipe->up_dev;
struct ahci_pipe *apipe = (struct ahci_pipe *)pipe;
usb_endpoint_descriptor_t *ed = pipe->up_endpoint->ue_edesc;
uint8_t rhaddr = dev->ud_bus->ub_rhaddr;
@@ -415,8 +415,8 @@
void
ahci_poll_hub(void *arg)
{
- usbd_xfer_handle xfer = arg;
- usbd_pipe_handle pipe = xfer->ux_pipe;
+ struct usbd_xfer *xfer = arg;
+ struct usbd_pipe *pipe = xfer->ux_pipe;
struct ahci_softc *sc = (struct ahci_softc *)pipe->up_dev->ud_bus;
u_char *p;
static int p0_state=0;
@@ -449,11 +449,11 @@
mutex_exit(&sc->sc_lock);
}
-usbd_xfer_handle
+struct usbd_xfer *
ahci_allocx(struct usbd_bus *bus)
{
struct ahci_softc *sc = (struct ahci_softc *)bus;
- usbd_xfer_handle xfer;
+ struct usbd_xfer *xfer;
DPRINTF(D_MEM, ("SLallocx"));
@@ -481,7 +481,7 @@
}
void
-ahci_freex(struct usbd_bus *bus, usbd_xfer_handle xfer)
+ahci_freex(struct usbd_bus *bus, struct usbd_xfer *xfer)
{
struct ahci_softc *sc = (struct ahci_softc *)bus;
@@ -507,7 +507,7 @@
}
void
-ahci_noop(usbd_pipe_handle pipe)
+ahci_noop(struct usbd_pipe *pipe)
{
DPRINTF(D_TRACE, ("%s()", __func__));
}
@@ -697,7 +697,7 @@
}
static usbd_status
-ahci_root_intr_transfer(usbd_xfer_handle xfer)
+ahci_root_intr_transfer(struct usbd_xfer *xfer)
{
struct ahci_softc *sc = (struct ahci_softc *)xfer->ux_pipe->up_dev->ud_bus;
usbd_status error;
@@ -719,9 +719,9 @@
}
static usbd_status
-ahci_root_intr_start(usbd_xfer_handle xfer)
+ahci_root_intr_start(struct usbd_xfer *xfer)
{
- usbd_pipe_handle pipe = xfer->ux_pipe;
+ struct usbd_pipe *pipe = xfer->ux_pipe;
struct ahci_softc *sc = (struct ahci_softc *)pipe->up_dev->ud_bus;
DPRINTF(D_TRACE, ("SLRIstart "));
@@ -733,13 +733,13 @@
}
static void
-ahci_root_intr_abort(usbd_xfer_handle xfer)
+ahci_root_intr_abort(struct usbd_xfer *xfer)
{
DPRINTF(D_TRACE, ("SLRIabort "));
}
static void
-ahci_root_intr_close(usbd_pipe_handle pipe)
+ahci_root_intr_close(struct usbd_pipe *pipe)
{
struct ahci_softc *sc = (struct ahci_softc *)pipe->up_dev->ud_bus;
@@ -750,13 +750,13 @@
}
static void
-ahci_root_intr_done(usbd_xfer_handle xfer)
+ahci_root_intr_done(struct usbd_xfer *xfer)
{
//DPRINTF(D_XFER, ("RIdn "));
}
static usbd_status
-ahci_device_ctrl_transfer(usbd_xfer_handle xfer)
+ahci_device_ctrl_transfer(struct usbd_xfer *xfer)
{
struct ahci_softc *sc = (struct ahci_softc *)xfer->ux_pipe->up_dev->ud_bus;
usbd_status error;
@@ -773,14 +773,14 @@
}
static usbd_status
-ahci_device_ctrl_start(usbd_xfer_handle xfer)
+ahci_device_ctrl_start(struct usbd_xfer *xfer)
{
usbd_status status = USBD_NORMAL_COMPLETION;
int s, err;
static struct admhcd_ed ep_v __attribute__((aligned(16))), *ep;
static struct admhcd_td td_v[4] __attribute__((aligned(16))), *td, *td1, *td2, *td3;
static usb_dma_t reqdma;
- usbd_pipe_handle pipe = xfer->ux_pipe;
+ struct usbd_pipe *pipe = xfer->ux_pipe;
usb_device_request_t *req = &xfer->ux_request;
struct ahci_softc *sc = (struct ahci_softc *)pipe->up_dev->ud_bus;
int len, isread;
@@ -924,26 +924,26 @@
}
static void
-ahci_device_ctrl_abort(usbd_xfer_handle xfer)
+ahci_device_ctrl_abort(struct usbd_xfer *xfer)
{
DPRINTF(D_TRACE, ("Cab "));
ahci_abort_xfer(xfer, USBD_CANCELLED);
}
static void
-ahci_device_ctrl_close(usbd_pipe_handle pipe)
+ahci_device_ctrl_close(struct usbd_pipe *pipe)
{
DPRINTF(D_TRACE, ("Ccl "));
}
static void
-ahci_device_ctrl_done(usbd_xfer_handle xfer)
+ahci_device_ctrl_done(struct usbd_xfer *xfer)
{
DPRINTF(D_TRACE, ("Cdn "));
}
static usbd_status
-ahci_device_intr_transfer(usbd_xfer_handle xfer)
+ahci_device_intr_transfer(struct usbd_xfer *xfer)
{
struct ahci_softc *sc = (struct ahci_softc *)xfer->ux_pipe->up_dev->ud_bus;
usbd_status error;
@@ -960,9 +960,9 @@
}
static usbd_status
Home |
Main Index |
Thread Index |
Old Index