Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src unifdef -D UGEN_BULK_RA_WB
details: https://anonhg.NetBSD.org/src/rev/4fb885b5c439
branches: trunk
changeset: 750284:4fb885b5c439
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Dec 23 01:04:45 2009 +0000
description:
unifdef -D UGEN_BULK_RA_WB
Default behaviour unchanged, the feature must still be explicitly
enabled for a ugen fd.
diffstat:
share/man/man4/ugen.4 | 18 ++-------
sys/arch/amd64/conf/GENERIC | 6 +--
sys/arch/evbarm/conf/MPCSA_GENERIC | 6 +--
sys/arch/evbppc/conf/OPENBLOCKS266_OPT | 5 +--
sys/arch/i386/conf/ALL | 6 +--
sys/arch/i386/conf/GENERIC | 6 +--
sys/arch/i386/conf/XBOX | 4 +-
sys/arch/iyonix/conf/GENERIC | 6 +--
sys/dev/usb/files.usb | 3 +-
sys/dev/usb/ugen.c | 61 +--------------------------------
10 files changed, 20 insertions(+), 101 deletions(-)
diffs (truncated from 517 to 300 lines):
diff -r eef874b1b88d -r 4fb885b5c439 share/man/man4/ugen.4
--- a/share/man/man4/ugen.4 Wed Dec 23 00:33:25 2009 +0000
+++ b/share/man/man4/ugen.4 Wed Dec 23 01:04:45 2009 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: ugen.4,v 1.28 2009/12/21 19:04:36 gdt Exp $
+.\" $NetBSD: ugen.4,v 1.29 2009/12/23 01:04:45 pooka Exp $
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -35,7 +35,6 @@
.Nd USB generic device support
.Sh SYNOPSIS
.Cd "ugen* at uhub? flags N"
-.Cd options UGEN_BULK_RA_WB
.Sh DESCRIPTION
The
.Nm
@@ -109,29 +108,22 @@
.Xr write 2
should be used.
All IO operations on a bulk endpoint are normally unbuffered.
-On kernels built with the
-.Dv UGEN_BULK_RA_WB
-option, the
+The
.Dv USB_SET_BULK_RA
and
.Dv USB_SET_BULK_WB
.Xr ioctl 2
-calls are available, and enable read-ahead and write-behind buffering
-respectively.
+calls enable read-ahead and write-behind buffering, respectively.
This buffering supports fixed-sized USB transfers and is intended for
devices with regular and continuing data transfers.
When read-ahead or write-behind are enabled, the file descriptor
may be set to use non-blocking IO.
.Pp
-When in a
-.Dv UGEN_BULK_RA_WB
-mode,
+When in a read-ahead/writeback mode,
.Xr select 2
for read and write operates normally, returning true if there is data
in the read buffer and space in the write buffer, respectively.
-When not in a
-.Dv UGEN_BULK_RA_WB
-mode,
+When not,
.Xr select 2
always returns true, because there is no way to predict how the device
will respond to a read or write request.
diff -r eef874b1b88d -r 4fb885b5c439 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC Wed Dec 23 00:33:25 2009 +0000
+++ b/sys/arch/amd64/conf/GENERIC Wed Dec 23 01:04:45 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.259 2009/12/05 20:11:03 pooka Exp $
+# $NetBSD: GENERIC,v 1.260 2009/12/23 01:04:45 pooka Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.259 $"
+#ident "GENERIC-$Revision: 1.260 $"
maxusers 64 # estimated number of users
@@ -905,8 +905,6 @@
# USB Generic driver
ugen* at uhub? port ?
-# On ugen bulk endpoints, perform read-ahead and write-behind.
-options UGEN_BULK_RA_WB
# USB 3G datacards
u3g* at uhub? port ?
diff -r eef874b1b88d -r 4fb885b5c439 sys/arch/evbarm/conf/MPCSA_GENERIC
--- a/sys/arch/evbarm/conf/MPCSA_GENERIC Wed Dec 23 00:33:25 2009 +0000
+++ b/sys/arch/evbarm/conf/MPCSA_GENERIC Wed Dec 23 01:04:45 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: MPCSA_GENERIC,v 1.11 2009/12/05 20:11:11 pooka Exp $
+# $NetBSD: MPCSA_GENERIC,v 1.12 2009/12/23 01:04:46 pooka Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.11 $"
+#ident "GENERIC-$Revision: 1.12 $"
maxusers 32 # estimated number of users
@@ -574,8 +574,6 @@
# USB Generic driver
#ugen* at uhub? port ?
-# On ugen bulk endpoints, perform read-ahead and write-behind.
-#options UGEN_BULK_RA_WB
# IrDA and Consumer Ir devices
diff -r eef874b1b88d -r 4fb885b5c439 sys/arch/evbppc/conf/OPENBLOCKS266_OPT
--- a/sys/arch/evbppc/conf/OPENBLOCKS266_OPT Wed Dec 23 00:33:25 2009 +0000
+++ b/sys/arch/evbppc/conf/OPENBLOCKS266_OPT Wed Dec 23 01:04:45 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: OPENBLOCKS266_OPT,v 1.10 2009/01/03 17:47:24 christos Exp $
+# $NetBSD: OPENBLOCKS266_OPT,v 1.11 2009/12/23 01:04:46 pooka Exp $
#
include "arch/evbppc/conf/OPENBLOCKS266"
@@ -264,9 +264,6 @@
# USB Generic driver
ugen* at uhub? port ?
-# On ugen bulk endpoints, perform read-ahead and write-behind.
-options UGEN_BULK_RA_WB
-
# CardBus IEEE1394 controllers
fwohci* at cardbus? function ? # IEEE1394 Open Host Controller
diff -r eef874b1b88d -r 4fb885b5c439 sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL Wed Dec 23 00:33:25 2009 +0000
+++ b/sys/arch/i386/conf/ALL Wed Dec 23 01:04:45 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.222 2009/12/05 20:11:15 pooka Exp $
+# $NetBSD: ALL,v 1.223 2009/12/23 01:04:46 pooka Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@@ -17,7 +17,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "ALL-$Revision: 1.222 $"
+#ident "ALL-$Revision: 1.223 $"
maxusers 64 # estimated number of users
@@ -1288,8 +1288,6 @@
# USB Generic driver
ugen* at uhub? port ?
-# On ugen bulk endpoints, perform read-ahead and write-behind.
-options UGEN_BULK_RA_WB
# USB 3G datacards
u3g* at uhub? port ?
diff -r eef874b1b88d -r 4fb885b5c439 sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC Wed Dec 23 00:33:25 2009 +0000
+++ b/sys/arch/i386/conf/GENERIC Wed Dec 23 01:04:45 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.954 2009/12/05 20:11:15 pooka Exp $
+# $NetBSD: GENERIC,v 1.955 2009/12/23 01:04:46 pooka Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.954 $"
+#ident "GENERIC-$Revision: 1.955 $"
maxusers 64 # estimated number of users
@@ -1234,8 +1234,6 @@
# USB Generic driver
ugen* at uhub? port ?
-# On ugen bulk endpoints, perform read-ahead and write-behind.
-options UGEN_BULK_RA_WB
# USB 3G datacards
u3g* at uhub? port ?
diff -r eef874b1b88d -r 4fb885b5c439 sys/arch/i386/conf/XBOX
--- a/sys/arch/i386/conf/XBOX Wed Dec 23 00:33:25 2009 +0000
+++ b/sys/arch/i386/conf/XBOX Wed Dec 23 01:04:45 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: XBOX,v 1.16 2009/03/27 21:04:35 ad Exp $
+# $NetBSD: XBOX,v 1.17 2009/12/23 01:04:46 pooka Exp $
#
# XBOX -- A basic Microsoft XBox kernel config file.
#
@@ -244,8 +244,6 @@
# USB Generic driver
ugen* at uhub? port ?
-# On ugen bulk endpoints, perform read-ahead and write-behind.
-options UGEN_BULK_RA_WB
# Audio Devices
diff -r eef874b1b88d -r 4fb885b5c439 sys/arch/iyonix/conf/GENERIC
--- a/sys/arch/iyonix/conf/GENERIC Wed Dec 23 00:33:25 2009 +0000
+++ b/sys/arch/iyonix/conf/GENERIC Wed Dec 23 01:04:45 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.56 2009/12/05 20:11:15 pooka Exp $
+# $NetBSD: GENERIC,v 1.57 2009/12/23 01:04:46 pooka Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.56 $"
+#ident "GENERIC-$Revision: 1.57 $"
maxusers 32 # estimated number of users
@@ -647,8 +647,6 @@
# USB Generic driver
#ugen* at uhub? port ?
-# On ugen bulk endpoints, perform read-ahead and write-behind.
-#options UGEN_BULK_RA_WB
# IrDA and Consumer Ir devices
diff -r eef874b1b88d -r 4fb885b5c439 sys/dev/usb/files.usb
--- a/sys/dev/usb/files.usb Wed Dec 23 00:33:25 2009 +0000
+++ b/sys/dev/usb/files.usb Wed Dec 23 01:04:45 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.usb,v 1.92 2009/11/30 16:18:34 tsutsui Exp $
+# $NetBSD: files.usb,v 1.93 2009/12/23 01:04:45 pooka Exp $
#
# Config file and device description for machine-independent USB code.
# Included by ports that need it. Ports that use it must provide
@@ -54,7 +54,6 @@
# Generic devices
-defflag UGEN_BULK_RA_WB
device ugen
attach ugen at usbdevif
file dev/usb/ugen.c ugen needs-flag
diff -r eef874b1b88d -r 4fb885b5c439 sys/dev/usb/ugen.c
--- a/sys/dev/usb/ugen.c Wed Dec 23 00:33:25 2009 +0000
+++ b/sys/dev/usb/ugen.c Wed Dec 23 01:04:45 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ugen.c,v 1.106 2009/12/06 21:40:31 dyoung Exp $ */
+/* $NetBSD: ugen.c,v 1.107 2009/12/23 01:04:45 pooka Exp $ */
/*
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.106 2009/12/06 21:40:31 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.107 2009/12/23 01:04:45 pooka Exp $");
#include "opt_ugen_bulk_ra_wb.h"
#include "opt_compat_netbsd.h"
@@ -107,13 +107,11 @@
u_char *limit; /* end of circular buffer (isoc) */
u_char *cur; /* current read location (isoc) */
u_int32_t timeout;
-#ifdef UGEN_BULK_RA_WB
u_int32_t ra_wb_bufsize; /* requested size for RA/WB buffer */
u_int32_t ra_wb_reqsize; /* requested xfer length for RA/WB */
u_int32_t ra_wb_used; /* how much is in buffer */
u_int32_t ra_wb_xferlen; /* current xfer length for RA/WB */
usbd_xfer_handle ra_wb_xfer;
-#endif
struct isoreq {
struct ugen_endpoint *sce;
usbd_xfer_handle xfer;
@@ -183,12 +181,10 @@
usbd_status status);
Static void ugen_isoc_rintr(usbd_xfer_handle xfer, usbd_private_handle addr,
usbd_status status);
-#ifdef UGEN_BULK_RA_WB
Static void ugen_bulkra_intr(usbd_xfer_handle xfer, usbd_private_handle addr,
usbd_status status);
Static void ugen_bulkwb_intr(usbd_xfer_handle xfer, usbd_private_handle addr,
usbd_status status);
-#endif
Static int ugen_do_read(struct ugen_softc *, int, struct uio *, int);
Static int ugen_do_write(struct ugen_softc *, int, struct uio *, int);
Static int ugen_do_ioctl(struct ugen_softc *, int, u_long,
@@ -441,14 +437,12 @@
edesc->bEndpointAddress, 0, &sce->pipeh);
if (err)
return (EIO);
-#ifdef UGEN_BULK_RA_WB
sce->ra_wb_bufsize = UGEN_BULK_RA_WB_BUFSIZE;
/*
* Use request size for non-RA/WB transfers
* as the default.
*/
sce->ra_wb_reqsize = UGEN_BBSIZE;
-#endif
break;
case UE_ISOCHRONOUS:
if (dir == OUT)
Home |
Main Index |
Thread Index |
Old Index