PERFORCE change 106449 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Sep 21 04:26:59 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=106449
Change 106449 by hselasky at hselasky_mini_itx on 2006/09/21 11:26:24
IFC post cleanup:
=================
o Remove duplicate __FBSDID.
o Remove extra header files, that are included by "usb_port.h".
Else the code will not compile on NetBSD.
o Remove extra code that has already been integrated.
o Add some missing files.
o Remove undefined function prototypes.
o Compile fix.
o Compile fix for FreeBSD 6.x.
Affected files ...
.. //depot/projects/usb/src/sys/dev/ata/ata-usb.c#9 edit
.. //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#5 edit
.. //depot/projects/usb/src/sys/dev/usb/ehci.c#13 edit
.. //depot/projects/usb/src/sys/dev/usb/ehci_pci.c#9 edit
.. //depot/projects/usb/src/sys/dev/usb/if_aue.c#12 edit
.. //depot/projects/usb/src/sys/dev/usb/if_axe.c#11 edit
.. //depot/projects/usb/src/sys/dev/usb/if_rue.c#10 edit
.. //depot/projects/usb/src/sys/dev/usb/if_udav.c#10 edit
.. //depot/projects/usb/src/sys/dev/usb/if_ural.c#12 edit
.. //depot/projects/usb/src/sys/dev/usb/ohci.c#12 edit
.. //depot/projects/usb/src/sys/dev/usb/ohci_pci.c#9 edit
.. //depot/projects/usb/src/sys/dev/usb/sl811hsreg.h#3 add
.. //depot/projects/usb/src/sys/dev/usb/sl811hsvar.h#3 add
.. //depot/projects/usb/src/sys/dev/usb/ubsa.c#10 edit
.. //depot/projects/usb/src/sys/dev/usb/ubser.c#6 edit
.. //depot/projects/usb/src/sys/dev/usb/ucom.c#10 edit
.. //depot/projects/usb/src/sys/dev/usb/ufm.c#8 edit
.. //depot/projects/usb/src/sys/dev/usb/ufoma.c#8 edit
.. //depot/projects/usb/src/sys/dev/usb/uftdi.c#9 edit
.. //depot/projects/usb/src/sys/dev/usb/ugen.c#8 edit
.. //depot/projects/usb/src/sys/dev/usb/uhci.c#12 edit
.. //depot/projects/usb/src/sys/dev/usb/uhci_pci.c#9 edit
.. //depot/projects/usb/src/sys/dev/usb/uhid.c#11 edit
.. //depot/projects/usb/src/sys/dev/usb/ums.c#14 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/ata/ata-usb.c#9 (text) ====
@@ -48,8 +48,6 @@
#include <dev/ata/ata-all.h>
#include <ata_if.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-usb.c,v 1.4 2006/03/31 08:09:05 sos Exp $");
-
#define ATAUSB_BULK_SIZE (1<<17) /* don't set this lower than (1 << 16) */
/* Command Block Wrapper */
@@ -85,10 +83,6 @@
/* USB-ATA 'controller' softc */
struct atausb_softc {
- device_t dev; /* base device */
- int maxlun;
- struct ata_request *ata_request;
- usb_device_request_t usb_request;
struct bbb_cbw cbw;
struct bbb_csw csw;
struct mtx locked_mtx;
==== //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#5 (text+ko) ====
@@ -2079,7 +2079,6 @@
const struct usb_audio_extension_unit_1 *e1;
const struct usb_audio_processing_unit_1 *u1;
-}
union {
const usb_descriptor_t *desc;
const struct usb_audio_input_terminal *it;
==== //depot/projects/usb/src/sys/dev/usb/ehci.c#13 (text+ko) ====
@@ -69,8 +69,6 @@
#include <dev/usb/usb_subr.h>
#include <dev/usb/ehci.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ehci.c,v 1.18 2004/11/09 20:51:32 iedowse Exp $");
-
#define MS_TO_TICKS(ms) (((ms) * hz) / 1000)
#define EHCI_BUS2SC(bus) ((ehci_softc_t *)(((u_int8_t *)(bus)) - \
POINTER_TO_UNSIGNED(&(((ehci_softc_t *)0)->sc_bus))))
==== //depot/projects/usb/src/sys/dev/usb/ehci_pci.c#9 (text+ko) ====
@@ -52,9 +52,6 @@
* sharing of code between *BSD's
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.23 2006/09/07 00:06:41 imp Exp $");
-
#include "opt_bus.h"
#include <sys/param.h>
@@ -63,7 +60,6 @@
#include <sys/endian.h>
#include <sys/queue.h> /* LIST_XXX() */
#include <sys/lock.h>
-#include <sys/mutex.h>
#include <sys/malloc.h>
#define INCLUDE_PCIXXX_H
==== //depot/projects/usb/src/sys/dev/usb/if_aue.c#12 (text+ko) ====
@@ -682,7 +682,6 @@
struct aue_config_copy *cc, u_int16_t refcount)
{
u_int16_t i;
- u_int8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
if (cc == NULL) {
/* nothing to do */
@@ -706,10 +705,6 @@
for (i = 0; i < 8; i++) {
aue_cfg_csr_write_1(sc, AUE_MAR0 + i, cc->if_hash[i]);
}
- /* write the hashtable */
- for (i = 0; i < 8; i++)
- aue_csr_write_1(sc, AUE_MAR0 + i, hashtbl[i]);
-
return;
}
==== //depot/projects/usb/src/sys/dev/usb/if_axe.c#11 (text+ko) ====
@@ -325,7 +325,6 @@
usbd_status err;
u_int16_t length = AXE_CMD_LEN(cmd);
- AXE_SLEEPLOCKASSERT(sc);
req.bmRequestType = (AXE_CMD_IS_WRITE(cmd) ?
UT_WRITE_VENDOR_DEVICE :
UT_READ_VENDOR_DEVICE);
@@ -363,7 +362,6 @@
mtx_lock(&(sc->sc_mtx)); /* XXX */
- AXE_SLEEPLOCKASSERT(sc);
#if 0
/*
* The chip tells us the MII address of any supported
@@ -410,7 +408,6 @@
mtx_lock(&(sc->sc_mtx)); /* XXX */
- AXE_SLEEPLOCKASSERT(sc);
axe_cfg_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL);
axe_cfg_cmd(sc, AXE_CMD_MII_WRITE_REG, reg, phy, &val);
axe_cfg_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL);
@@ -653,8 +650,6 @@
goto detach;
}
- usb_init_task(&sc->axe_tick_task, axe_tick_task, sc);
-
error = usbd_config_td_setup(&(sc->sc_config_td), sc, &(sc->sc_mtx),
&axe_config_copy, NULL,
sizeof(struct axe_config_copy), 16);
@@ -807,7 +802,6 @@
__callout_drain(&(sc->sc_watchdog));
mtx_destroy(&(sc->sc_mtx));
- AXE_SLEEPUNLOCK(sc);
return 0;
}
@@ -1032,7 +1026,6 @@
usbd_m_copy_in(&(xfer->buf_data), 0,
m, 0, m->m_pkthdr.len);
- AXE_SLEEPLOCK(sc);
/*
* if there's a BPF listener, bounce a copy
* of this frame to him:
@@ -1146,7 +1139,6 @@
sc->sc_flags |= AXE_FLAG_HL_READY;
- AXE_SLEEPLOCK(sc);
return;
}
@@ -1218,7 +1210,6 @@
axe_cfg_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, rxmode, NULL);
axe_cfg_setmulti(sc, cc, 0);
- AXE_SLEEPUNLOCK(sc);
return;
}
@@ -1247,22 +1238,18 @@
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
usbd_config_td_queue_command
(&(sc->sc_config_td), &axe_cfg_stop, 0);
- AXE_SLEEPUNLOCK(sc);
- }
}
}
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- AXE_SLEEPLOCK(sc);
usbd_config_td_queue_command
(&(sc->sc_config_td), &axe_cfg_setmulti, 0);
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
- AXE_SLEEPLOCK(sc);
mii = GET_MII(sc);
if (mii == NULL) {
error = EINVAL;
@@ -1308,7 +1295,6 @@
{
if (cc == NULL) {
- AXE_SLEEPLOCKASSERT(sc);
/* immediate configuration */
struct ifnet *ifp = sc->sc_ifp;
@@ -1366,9 +1352,7 @@
usbd_config_td_queue_command
(&(sc->sc_config_td), &axe_cfg_stop, 0);
- AXE_SLEEPLOCK(sc);
mtx_unlock(&(sc->sc_mtx));
- AXE_SLEEPUNLOCK(sc);
return 0;
}
==== //depot/projects/usb/src/sys/dev/usb/if_rue.c#10 (text+ko) ====
@@ -107,8 +107,6 @@
/* "device miibus" required. See GENERIC if you get errors here. */
#include "miibus_if.h"
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_rue.c,v 1.28 2006/02/14 12:44:55 glebius Exp $");
-
#ifdef USB_DEBUG
#define DPRINTF(sc,n,fmt,...) \
do { if (rue_debug > (n)) { \
==== //depot/projects/usb/src/sys/dev/usb/if_udav.c#10 (text+ko) ====
@@ -89,8 +89,6 @@
#include <dev/usb/if_udavreg.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_udav.c,v 1.21 2006/02/14 12:44:55 glebius Exp $");
-
/* prototypes */
static device_probe_t udav_probe;
==== //depot/projects/usb/src/sys/dev/usb/if_ural.c#12 (text+ko) ====
@@ -22,6 +22,9 @@
*
* NOTE: all function names beginning like "ural_cfg_" can only
* be called from within the config thread function !
+ *
+ * TODO: add support for raw transmit trough BPF. See:
+ * http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/if_ural.c.diff?r1=1.41&r2=1.42
*/
#include <sys/cdefs.h>
@@ -70,8 +73,6 @@
#include <dev/usb/if_uralreg.h>
#include <dev/usb/if_uralvar.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_ural.c,v 1.38 2006/05/16 14:36:32 phk Exp $");
-
#ifdef USB_DEBUG
#define DPRINTF(sc,n,fmt,...) \
do { if (ural_debug > (n)) { \
@@ -2726,52 +2727,6 @@
return;
}
-static int
-ural_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
- const struct ieee80211_bpf_params *params)
-{
- struct ieee80211com *ic = ni->ni_ic;
- struct ifnet *ifp = ic->ic_ifp;
- struct ural_softc *sc = ifp->if_softc;
-
- /* prevent management frames from being sent if we're not ready */
- if (!(ifp->if_drv_flags & IFF_DRV_RUNNING))
- return ENETDOWN;
- if (sc->tx_queued >= RAL_TX_LIST_COUNT) {
- ifp->if_drv_flags |= IFF_DRV_OACTIVE;
- return EIO;
- }
-
- if (bpf_peers_present(ic->ic_rawbpf))
- bpf_mtap(ic->ic_rawbpf, m);
-
- ifp->if_opackets++;
-
- if (params == NULL) {
- /*
- * Legacy path; interpret frame contents to decide
- * precisely how to send the frame.
- */
- if (ural_tx_mgt(sc, m, ni) != 0)
- goto bad;
- } else {
- /*
- * Caller supplied explicit parameters to use in
- * sending the frame.
- */
- if (ural_tx_raw(sc, m, ni, params) != 0)
- goto bad;
- }
- sc->sc_tx_timer = 5;
- ifp->if_timer = 1;
-
- return 0;
-bad:
- ifp->if_oerrors++;
- ieee80211_free_node(ni);
- return EIO; /* XXX */
-}
-
#define URAL_AMRR_MIN_SUCCESS_THRESHOLD 1
#define URAL_AMRR_MAX_SUCCESS_THRESHOLD 10
==== //depot/projects/usb/src/sys/dev/usb/ohci.c#12 (text+ko) ====
@@ -59,7 +59,6 @@
* USB spec: http://www.usb.org/developers/docs/usbspec.zip
*/
-#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -75,8 +74,6 @@
#include <dev/usb/usb_subr.h>
#include <dev/usb/ohci.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ohci.c,v 1.145 2004/11/09 20:51:32 iedowse Exp $");
-
#define MS_TO_TICKS(ms) (((ms) * hz) / 1000)
#define OHCI_BUS2SC(bus) ((ohci_softc_t *)(((u_int8_t *)(bus)) - \
POINTER_TO_UNSIGNED(&(((ohci_softc_t *)0)->sc_bus))))
@@ -258,7 +255,6 @@
ohci_init(ohci_softc_t *sc)
{
u_int i;
- u_int32_t rev;
u_int16_t bit;
u_int16_t x;
u_int16_t y;
@@ -362,7 +358,6 @@
if(ohci_controller_init(sc))
{
- error:
mtx_unlock(&sc->sc_bus.mtx);
return (USBD_INVAL);
}
@@ -1051,12 +1046,6 @@
ptr->xfer = xfer;
ptr->refcount = xfer->usb_refcount;
ptr++;
- for (sitd = xfer->hcpriv; sitd->xfer == xfer;
- sitd = next) {
- next = sitd->nextitd;
- ohci_free_sitd(sc, sitd);
- }
-
xfer->usb_root->memory_refcount++;
}
@@ -1804,7 +1793,6 @@
/* data underflow */
xfer->pipe->isoc_next = (nframes + 5) & ((1<<16)-1);
DPRINTFN(2,("start next=%d\n", xfer->pipe->isoc_next));
- return;
}
nframes = xfer->nframes;
@@ -2704,7 +2692,6 @@
/* align data to 8 byte boundary */
size[0] += ((-size[0]) & (USB_HOST_ALIGN-1));
- xfer->actlen = 0;
xfer->buffer = ADD_BYTES(buf,size[0]);
@@ -2814,15 +2801,6 @@
/* store offset temporarily */
n = size[0];
- } else {
- sitd->itd.itd_flags = htole32(
- OHCI_ITD_NOCC |
- OHCI_ITD_SET_SF(iso->next) |
- OHCI_ITD_SET_DI(0) |
- OHCI_ITD_SET_FC(ncur));
- sitd->flags = OHCI_CALL_DONE | OHCI_ITD_ACTIVE;
- }
- iso->next += ncur;
size[0] += (sizeof(*page_ptr) * total_size[1]);
==== //depot/projects/usb/src/sys/dev/usb/ohci_pci.c#9 (text+ko) ====
@@ -51,14 +51,12 @@
#include "opt_bus.h"
-#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/endian.h>
#include <sys/queue.h> /* LIST_XXX() */
#include <sys/lock.h>
-#include <sys/mutex.h>
#include <sys/malloc.h>
#define INCLUDE_PCIXXX_H
@@ -68,8 +66,6 @@
#include <dev/usb/usb_subr.h>
#include <dev/usb/ohci.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ohci_pci.c,v 1.40 2004/08/02 15:37:35 iedowse Exp $");
-
#define PCI_OHCI_VENDORID_ACERLABS 0x10b9
#define PCI_OHCI_VENDORID_AMD 0x1022
#define PCI_OHCI_VENDORID_APPLE 0x106b
==== //depot/projects/usb/src/sys/dev/usb/ubsa.c#10 (text+ko) ====
@@ -79,8 +79,6 @@
#include "usbdevs.h"
-__FBSDID("$FreeBSD: src/sys/dev/usb/ubsa.c $");
-
#ifdef USB_DEBUG
#define DPRINTF(n,fmt,...) \
do { if (ubsa_debug > (n)) { \
==== //depot/projects/usb/src/sys/dev/usb/ubser.c#6 (text+ko) ====
@@ -72,6 +72,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/dev/usb/ubser.c,v 1.20 2006/09/07 00:06:41 imp Exp $");
+#if 0
+
/*
* BWCT serial adapter driver
*/
@@ -870,3 +872,5 @@
}
DRIVER_MODULE(ubser, uhub, ubser_driver, ubser_devclass, usbd_driver_load, 0);
+#endif
+
==== //depot/projects/usb/src/sys/dev/usb/ucom.c#10 (text+ko) ====
@@ -185,6 +185,9 @@
DPRINTF(0, "tp = %p\n", tp);
+#ifndef TS_CALLOUT
+#define TS_CALLOUT NULL, unit, MINOR_CALLOUT /* compile fix for FreeBSD 6.x */
+#endif
error = ttycreate(tp, TS_CALLOUT, "U%d", unit);
if (error) {
ttyfree(tp);
@@ -286,27 +289,6 @@
ucom_modem(tp, SER_DTR | SER_RTS, 0);
- /* Open the bulk pipes */
- /* Bulk-in pipe */
- err = usbd_open_pipe(sc->sc_iface, sc->sc_bulkin_no, 0,
- &sc->sc_bulkin_pipe);
- if (err) {
- printf("%s: open bulk in error (addr %d): %s\n",
- device_get_nameunit(sc->sc_dev), sc->sc_bulkin_no,
- usbd_errstr(err));
- error = EIO;
- goto fail;
- }
- /* Bulk-out pipe */
- err = usbd_open_pipe(sc->sc_iface, sc->sc_bulkout_no,
- USBD_EXCLUSIVE_USE, &sc->sc_bulkout_pipe);
- if (err) {
- printf("%s: open bulk out error (addr %d): %s\n",
- device_get_nameunit(sc->sc_dev), sc->sc_bulkout_no,
- usbd_errstr(err));
- error = EIO;
- goto fail;
- }
if (sc->sc_callback->ucom_open) {
error = (sc->sc_callback->ucom_open)(sc);
==== //depot/projects/usb/src/sys/dev/usb/ufm.c#8 (text+ko) ====
@@ -49,8 +49,6 @@
#include <dev/usb/dsbr100io.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ufm.c,v 1.23 2005/01/06 01:43:28 imp Exp $");
-
#ifdef USB_DEBUG
#define DPRINTF(sc,n,fmt,...) \
do { if (ufm_debug > (n)) { \
==== //depot/projects/usb/src/sys/dev/usb/ufoma.c#8 (text+ko) ====
@@ -102,8 +102,6 @@
#include "usbdevs.h"
-__FBSDID("$FreeBSD: src/sys/dev/usb/ufoma.c,v 1.1 2006/01/09 17:46:36 takawata Exp $");
-
typedef struct ufoma_mobile_acm_descriptor{
u_int8_t bFunctionLength;
u_int8_t bDescriptorType;
==== //depot/projects/usb/src/sys/dev/usb/uftdi.c#9 (text+ko) ====
@@ -69,8 +69,6 @@
#include "usbdevs.h"
-__FBSDID("$FreeBSD: src/sys/dev/usb/uftdi.c,v 1.22 2005/04/05 22:09:18 ticso Exp $");
-
#ifdef USB_DEBUG
#define DPRINTF(sc,n,fmt,...) \
do { if (uftdi_debug > (n)) { \
==== //depot/projects/usb/src/sys/dev/usb/ugen.c#8 (text+ko) ====
@@ -47,13 +47,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
-#include <sys/module.h>
-#include <sys/bus.h>
#include <sys/ioccom.h>
#include <sys/filio.h>
#include <sys/tty.h>
@@ -65,8 +62,6 @@
#include <dev/usb/usb.h>
#include <dev/usb/usb_subr.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/ugen.c $");
-
#define UGEN_BULK_BUFFER_SIZE (1024*64) /* bytes */
#define UGEN_HW_FRAMES 50 /* number of milliseconds per transfer */
@@ -82,6 +77,7 @@
void *buf;
};
+struct ugen_endpoint {
struct ugen_softc * sc;
struct cdev * dev;
struct usbd_pipe * pipe_in; /* pipe for reading data from USB */
@@ -321,8 +317,6 @@
(ufr->buf,
ufr->frame_size*ufr->output_index);
- prev_sc_dying = sc->sc_dying;
- sc->sc_dying = 1;
*len = ufr->frlengths[ufr->output_index];
}
return;
@@ -777,11 +771,6 @@
sce->xfer_in[1];
break;
- switch (sce->edesc->bmAttributes & UE_XFERTYPE) {
- case UE_INTERRUPT:
- ndflush(&sce->q, sce->q.c_cc);
- clist_free_cblocks(&sce->q);
- break;
case UE_ISOCHRONOUS:
isize = UGETW(ed->wMaxPacketSize);
@@ -1054,6 +1043,7 @@
* for sake of synchronization!
*/
len = uio->uio_resid;
+ }
PRINTFN(10, ("transferring %d bytes\n", len));
@@ -1111,6 +1101,7 @@
error = (xfer->error == USBD_CANCELLED) ?
EINTR : EIO;
break;
+ }
PRINTFN(1, ("got %d of %d bytes\n", xfer->actlen, n));
error = __uiomove
@@ -1357,20 +1348,6 @@
tr_error:
usbd_start_hardware(xfer);
return;
- if (sce->state & UGEN_ASLP) {
- DPRINTFN(5, ("ugenpurge: waking %p\n", sce));
- wakeup(sce);
- }
- selwakeuppri(&sce->rsel, PZERO);
-
- sce = &sc->sc_endpoints[endpt][OUT];
- if (sce->pipeh)
- usbd_abort_pipe(sce->pipeh);
- if (sce->state & UGEN_ASLP) {
- DPRINTFN(5, ("ugenpurge: waking %p\n", sce));
- wakeup(sce);
- }
- selwakeuppri(&sce->rsel, PZERO);
}
static void
==== //depot/projects/usb/src/sys/dev/usb/uhci.c#12 (text+ko) ====
@@ -76,8 +76,6 @@
#include <dev/usb/usb_subr.h>
#include <dev/usb/uhci.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/uhci.c $");
-
#define MS_TO_TICKS(ms) (((ms) * hz) / 1000)
#define UHCI_BUS2SC(bus) ((uhci_softc_t *)(((u_int8_t *)(bus)) - \
POINTER_TO_UNSIGNED(&(((uhci_softc_t *)0)->sc_bus))))
@@ -1086,13 +1084,6 @@
uhci_dumpregs(sc);
}
#endif
- if (std->aux_dma.block != NULL) {
- usb_freemem(&sc->sc_bus, &std->aux_dma);
- std->aux_dma.block = NULL;
- std->aux_data = NULL;
- std->aux_len = 0;
- }
-
status = UREAD2(sc, UHCI_STS) & UHCI_STS_ALLINTRS;
if(status == 0)
{
@@ -1127,59 +1118,6 @@
#endif
}
-/*
- * Allocate a physically contiguous buffer to handle cases where UHCI
- * cannot handle a packet because it is not physically contiguous.
- * If the usb_dma_t was already allocated this just ensures it is
- * large enough for the specified size.
- */
-static usbd_status
-uhci_aux_dma_alloc(uhci_softc_t *sc, uhci_soft_td_t *std, void *data, int len)
-{
- int err, align;
-
- if (std->aux_dma.block == NULL || std->aux_dma.block->size < len) {
- /* Align to avoid crossing a page boundary. */
- if (powerof2(len))
- align = len;
- else
- align = 1 << fls(len);
-
- if (std->aux_dma.block != NULL)
- usb_freemem(&sc->sc_bus, &std->aux_dma);
- std->aux_dma.block = NULL;
- err = usb_allocmem(&sc->sc_bus, len, align, &std->aux_dma);
- if (err)
- return (err);
- }
- std->aux_data = data;
- std->aux_len = len;
-
- return (USBD_NORMAL_COMPLETION);
-}
-
-static uhci_physaddr_t
-uhci_aux_dma_prepare(uhci_soft_td_t *std, int isread)
-{
- if (!isread) {
- bcopy(std->aux_data, KERNADDR(&std->aux_dma, 0), std->aux_len);
- bus_dmamap_sync(std->aux_dma.block->tag,
- std->aux_dma.block->map, BUS_DMASYNC_PREWRITE);
- }
-
- return (DMAADDR(&std->aux_dma, 0));
-}
-
-static void
-uhci_aux_dma_complete(uhci_soft_td_t *std, int isread)
-{
- if (isread) {
- bus_dmamap_sync(std->aux_dma.block->tag,
- std->aux_dma.block->map, BUS_DMASYNC_POSTREAD);
- bcopy(KERNADDR(&std->aux_dma, 0), std->aux_data, std->aux_len);
- }
-}
-
/* get acknowledge bits */
status &= (UHCI_STS_USBINT|
UHCI_STS_USBEI|
@@ -1965,8 +1903,6 @@
/* store starting position */
xfer->qh_pos = xfer->pipe->isoc_next;
- ii->stdstart = NULL;
- ii->stdend = NULL;
while(nframes--)
{
@@ -2005,8 +1941,6 @@
/* need to do a fixup */
td->td_buffer = htole32(fix_res.physaddr);
- ii->stdstart = NULL;
- ii->stdend = NULL;
if (!isread) {
==== //depot/projects/usb/src/sys/dev/usb/uhci_pci.c#9 (text+ko) ====
@@ -57,7 +57,6 @@
#include <sys/endian.h>
#include <sys/queue.h> /* LIST_XXX() */
#include <sys/lock.h>
-#include <sys/mutex.h>
#include <sys/malloc.h>
#define INCLUDE_PCIXXX_H
@@ -67,8 +66,6 @@
#include <dev/usb/usb_subr.h>
#include <dev/usb/uhci.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/uhci_pci.c $");
-
#define PCI_UHCI_VENDORID_INTEL 0x8086
#define PCI_UHCI_VENDORID_VIA 0x1106
==== //depot/projects/usb/src/sys/dev/usb/uhid.c#11 (text+ko) ====
@@ -68,8 +68,6 @@
#include "usbdevs.h"
-__FBSDID("$FreeBSD: src/sys/dev/usb/uhid.c $");
-
#ifdef USB_DEBUG
#define DPRINTF(n,fmt,...) \
do { if (uhid_debug > (n)) { \
==== //depot/projects/usb/src/sys/dev/usb/ums.c#14 (text+ko) ====
@@ -42,7 +42,6 @@
* HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf
*/
-#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -60,8 +59,6 @@
#include <dev/usb/usb_subr.h>
#include <dev/usb/usb_hid.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ums.c,v 1.80 2005/12/29 18:35:28 netchild Exp $");
-
#ifdef USB_DEBUG
#define DPRINTF(n,fmt,...) \
do { if (ums_debug > (n)) { \
@@ -133,7 +130,6 @@
static void
ums_stop_read(struct usb_cdev *cdev);
-static void ums_add_to_queue_timeout(void *priv);
static int32_t
ums_open(struct usb_cdev *cdev, int32_t fflags,
int32_t devtype, struct thread *td);
More information about the p4-projects
mailing list