Oliver Neukum [Thu, 26 Aug 2004 08:56:59 +0000 (01:56 -0700)]
[PATCH] USB: cdc acm patch
Fix tty layer sleep/locking problem (again) ... when this is
called through the network stack (PPP) sleeping isn't allowed.
There's some bugtraq ID for this.
From: Oliver Neukum <oliver@neukum.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Alan Stern [Wed, 25 Aug 2004 03:48:14 +0000 (20:48 -0700)]
[PATCH] USB: Add missing cleanup to usb_register_root_hub()
This patch adds some simple cleanups that are missing for one of the error
case in usb_register_root_hub(). I would be very surprised if this code
ever gets executed, but we might as well be correct.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Alan Stern [Wed, 25 Aug 2004 03:47:42 +0000 (20:47 -0700)]
[PATCH] USB: Use 8-byte hub status URB buffer
This patch changes the size of the buffer allocated for each hub's status
URB from 3 bytes to 8. The purpose is to avoid "babble" errors with
certain buggy hubs. Although I only know of one type of device which does
this, the patch does solve its problem and it adds no overhead for anyone
else since kmalloc doesn't dole out memory in chunks smaller than 8 bytes
(32 actually, on a PC).
This is a small thing, but it doesn't hurt and it will make life easier
for a few people.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Wed, 25 Aug 2004 03:25:30 +0000 (20:25 -0700)]
[PATCH] USB: ethernet gadget, minor fixes
Minor tweaks to the ethernet gadget driver:
- mention that it requires full-duplex hardware
- correct the string description: they're always UTF-8
- fix minor C error: don't "&array" (Al Borchers)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Wed, 25 Aug 2004 03:24:39 +0000 (20:24 -0700)]
[PATCH] USB: add omap_udc driver
This patch adds a UDC driver for OMAP, which should work on most
OMAP processors. It's been tested most on OMAP 1611/5912. The
driver supports all USB transfer types (including ISO), has limited
DMA support, and seems to work with all gadget drivers, both to
Linux hosts and to MS-Windows ones.
One reason this UDC is particularly interesting is that recent OMAP
processors all support "USB On-The-Go" (OTG) ... and this driver
supports it on at least "H2-like" boards.
Another reason is that the UDC is very flexible and fully featured;
gadget drivers can allocate fifo space to endpoints in the way that's
most convenient for the application.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Alan Stern [Tue, 24 Aug 2004 09:34:01 +0000 (02:34 -0700)]
[PATCH] USB: Update unlink testing code in the usbtest driver
Greg:
This patch updates the part of the usbtest driver that tests URB
unlinking. The move to usb_kill_urb() invalidated some of the old tests.
There's a corresponding change to the UHCI driver, causing it to return a
more descriptive error code in the rare event that an URB is cancelled
after it has been linked but before it has been queued.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Tue, 24 Aug 2004 09:12:03 +0000 (02:12 -0700)]
[PATCH] USB: isp1301_omap driver (OTG core)
This adds the isp1301_omap driver, supporting USB OTG on OMAP systems.
The driver tightly couples two different chunks of hardware, which are
used to implement the OTG protocols:
- The Philips ISP1301 OTG transceiver (an I2C device) senses voltage
levels and sources VBUS current in the A-Device roles.
- OMAP's OTG controller handles lots of OTG transitions, and
tells the transceiver what to do.
The driver implements the abstract "otg_transceiver" API, since it's got to
talk to both the host controller (OHCI on current OMAPs) and the peripheral
controller (omap_udc) while hiding a variety of implementation details. It
should be easy to tweak to work on other OMAP boards using the isp1301 chip;
OMAP boards with other transceivers, or non-OMAP boards using isp1301, will
probably find things to learn from.
Note that this also supports two non-OTG modes, with the OTG controller
disabled; very handy for debugging just the host side USB stack, or just the
peripheral side USB stack.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Tue, 24 Aug 2004 09:07:32 +0000 (02:07 -0700)]
[PATCH] USB: ohci_omap updates
This updates the OMAP OHCI support to match the latest from the
Linux-OMAP tree. Notable changes from the preceding version:
- Use the new USB init model (arch/arm/mach-omap/usb.c).
- The OMAP-specific bus is gone; it now uses platform_device.
(Update from Tony Lindgren.)
- Works on the H2 board, which requires the external isp1301
transceiver even in non-OTG configurations.
- Adds OTG support.
- Adds basic power management calls.
The mach-omap/Kconfig file in the main Linux tree is a bit out of
date, it doesn't know about CONFIG_ARCH_OMAP_OTG (for the OMAPs that
have OTG silicon).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Tue, 24 Aug 2004 04:56:52 +0000 (21:56 -0700)]
[PATCH] USB OTG: doc updates (5/5)
Gadget API update. Covers OTG support, lists a few more
types of hardware support, mentions gadget driver updates
including RNDIS, serial with CDC-ACM, and gadgetfs AIO.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Tue, 24 Aug 2004 04:55:57 +0000 (21:55 -0700)]
[PATCH] USB OTG: usbcore enumeration (3/5)
Teach usbcore how to enumerate OTG devices and perform HNP:
- CONFIG_USB_OTG is a boolean; it selects CONFIG_USB_SUSPEND.
Boards with a Mini-AB connector should offer it as a config
option; no other hardware could support OTG.
- Before resetting a port, make sure it's not still suspended.
(For example, after an HNP role switch.)
- When an OTG A-Host enumerates a dual-role device, set the
appropriate device feature: B_HNP_ENABLE if it's connected
to the OTG port, otherwise A_ALT_HNP_SUPPORT.
- When an OTG B-Host enumerates a dual-role device, don't
bother debouncing ... the power session is stable already,
the A-Host already debounced.
- The OTG "Targeted Peripheral List" lives in a product-customized
"otg_whitelist.h" header.
- CONFIG_USB_OTG_WHITELIST lets developers choose to ignore whitelist
failures, so unsupported devices can be configured anyway.
- If the whitelist check fails, immediately suspend the device.
* For dual-role devices, that triggers HNP so the other device
can try to act as host.
* For peripheral-only devices, that conserves power ... but not
quite as much as turning off power on that port, which should
eventually be done with OTG ports (and all other ports that
support SRP).
The whitelist logic tries to make use of the existing usb_device_id
logic, but since the interface info isn't available that early it's
a bit awkward use information anywhere outside the device descriptor.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Tue, 24 Aug 2004 04:55:24 +0000 (21:55 -0700)]
[PATCH] USB OTG: ohci reset updates (2/5)
Generic OTG and reset support for OTG.
- Declare and use a start_hnp() board-specific procedure. The OMAP
implementation will come separately, it can't yet be configured.
- When OTG is configured, implement the usb_bus_start_enum() hook;
that just starts a root port reset.
- When some task (usually khubd) resets a root port, make sure it takes
the full 50 msec. The OHCI reset timer is in hardware, and the host
may need to issue multiple resets to guard against concurrent resume.
- For backward compatibility, don't kick in the new 50 msec logic unless
it could be needed: without CONFIG_USB_SUSPEND, nothing will suspend
so nothing could resume. Which is good, at least until we start to
measure how long a reset takes ... it seems chip-specific.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Tue, 24 Aug 2004 04:54:54 +0000 (21:54 -0700)]
[PATCH] USB OTG: add usb_bus_start_enum() (1/5)
Define a new usb_bus_start_enum() routine that's available with OTG.
It starts immediate enumeration (port reset) and makes khubd wake up
later. Non-OTG code could start to use this, given some attention to
HC-specific reset timing issues.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Andrew Morton [Tue, 24 Aug 2004 04:43:27 +0000 (21:43 -0700)]
[PATCH] USB: legousbtower.c module_param fix
drivers/usb/misc/legousbtower.c: In function `__check_read_buffer_size':
drivers/usb/misc/legousbtower.c:119: warning: return from incompatible pointer type
drivers/usb/misc/legousbtower.c: In function `__check_write_buffer_size':
drivers/usb/misc/legousbtower.c:129: warning: return from incompatible pointer type
The fix is awkward - module_param() doesn't like size_t's.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Matthew Dharm [Tue, 24 Aug 2004 04:43:00 +0000 (21:43 -0700)]
[PATCH] USB Storage: help vendors count to 1...
It turns out that the Konica-Minolta DiMAGE A2 camera, in addition to all
its other problems, returns a 0-length reply to the GetMaxLUN request.
With this patch (accept a null reply as meaning a single LUN) it is
somewhat useable.
It's amazing to me that vendors have this much trouble counting to 1....
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Alan Stern [Tue, 24 Aug 2004 04:42:35 +0000 (21:42 -0700)]
[PATCH] USB: unusual_devs.h entry
This patch adds an unusual_devs.h entry for the Apacer Audio Steno, which
reports its capacity as total number of blocks rather than largest block
number (i.e., the value is off by one). Please apply.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Alan Stern [Tue, 24 Aug 2004 04:42:09 +0000 (21:42 -0700)]
[PATCH] USB: Fix submission-error bug in the USB scatter-gather
This patch has been hanging around for a while and seems to have been
forgotten. It fixes a bug in the USB scatter-gather library that crops up
when submission of an URB fails, and it fixes a bug in the cleanup routine
when some of the URBs being cleaned up have already completed.
I think David will agree that the patch is correct. Please apply.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Tue, 24 Aug 2004 04:41:43 +0000 (21:41 -0700)]
[PATCH] USB: net2280 patch
Don't clear ep0 status phase handshake during endpoint reset ... at least
one driver emits so much debug output before resetting endpoints that the
reset happens late enough to make the chip break protocol.
Also handle resets IRQs a bit differently: they can happen twice during
enumeration, which can worsen the other problem.
From: Alex Sanks <alex@netchip.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Tue, 24 Aug 2004 04:41:16 +0000 (21:41 -0700)]
[PATCH] USB: gadget drivers learn about LH7A40x
Recognize the UDC for the Sharp LH7A40x chips (ARMv4t SOCs)
- define gadget_is_lh7a40x() macro
- gadget drivers use it to assign bcdDevice
- supports CDC Ethernet (and RNDIS)
From: Bo Henriksen Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Luca Risolia [Tue, 24 Aug 2004 04:39:16 +0000 (21:39 -0700)]
[PATCH] USB: SN9C10[12] driver update
Changes:
- Delete the correct entry in the outgoing queue during DQBUF
- Implement correct image downscaling selection through VIDIOC_S_[CROP|FTM]
- Replace darkness controls with brightness (simple swapping) for PAS106B and
PAS202BCB
- Implement gain control for TAS5110C1B and TAS5130D1B
- Add a note to the documentation about correct image downscaling selection
Alan Stern [Tue, 24 Aug 2004 04:38:47 +0000 (21:38 -0700)]
[PATCH] USB: Set QH bit in UHCI framelist entries
This patch fixes the error in the UHCI driver found by Stuart Hayes. It
adds the UHCI_PTR_QH bit into the initial entries stored in the hardware
framelist. It's not entirely clear how the driver ever managed to work
with these bits not set; apparently by coincidence the QH entries
resembled TD entries sufficiently closely to fool the hardware.
On Tue, 10 Aug 2004 Stuart_Hayes@Dell.com wrote:
> Never mind, I figured it out. It looks like the uhci-hcd driver
> doesn't add a "| UHCI_PTR_QH" to the pointers that it puts
> in the frame list. This causes the ICH to think that the frame list
> is pointing to a bunch of TDs instead of QHs for purposes of
> checking for TD errors. I can only assume that the ICH
> is actually treating the frame list entries as QH pointers in spite
> of that bit not being set when it is actually executing the
> schedule, or else I don't think it would work generally.
>
> I guess the high addresses were just making the QH look like an
> invalid TD instead of a valid TD... not sure exactly what the ICH
> is checking for!
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Sean Young [Tue, 24 Aug 2004 04:38:15 +0000 (21:38 -0700)]
[PATCH] USB: USB PhidgetServo driver update
Once again a (small) patch for the phidgetservo driver.
Some servos have a very high maximum angle, set upper limit to the
maximum allowed by the hardware. Reported by Mario Scholz
<mario@expires-0409.mail.trial-n-error.net>
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Paul Mackerras [Mon, 23 Aug 2004 16:39:00 +0000 (09:39 -0700)]
[PATCH] ppc64: use struct list_head for hose_list
This patch changes hose_list from a simple linked list to a
"list.h"-style list. This is in preparation for the runtime
addition/removal of PCI Host Bridges.
Signed-off-by: John Rose <johnrose@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Nathan Fontenot [Mon, 23 Aug 2004 16:38:48 +0000 (09:38 -0700)]
[PATCH] ppc64: fix enable_surveillance() for power5
On some platforms (notably power5) you can't enable surveillance
(firmware/service processor watchdog) from the kernel - you have to do
it in the firmware.
This patch changes enable_surveillance() to make the message that is
printed in this situation more informative. Additionaly, the rtas_call
was changed to rtas_set_indicator so as to avoid having to handle
RTAS_BUSY returns.
Linus Torvalds [Mon, 23 Aug 2004 14:13:03 +0000 (07:13 -0700)]
Use F_SETLK instead of F_SETLK64 in nfs locking code.
The code doesn't actually _care_ about 32/64-bit issues,
only about F_SETLK vs F_SETLKW, and the F_SETLK64 doesn't
exist except as a compatibility thing on 64-bit architectures
(since the regular one already _is_ 64-bit, of course).
Trond Myklebust [Mon, 23 Aug 2004 16:02:36 +0000 (12:02 -0400)]
RPC,NFSv4: NFSv4 operations that create or destroy state on the
server are not allowed to be interrupted as that may result in the
client and server disagreeing.
Trond Myklebust [Mon, 23 Aug 2004 15:21:20 +0000 (11:21 -0400)]
NFSv2/v3/v4: Make the rpc_ops->getattr method take a filehandle
rather than an inode argument. Fix up nfs_instantiate() and
_nfs4_do_open to use this since doing a new lookup might be racy.
Trond Myklebust [Mon, 23 Aug 2004 15:19:03 +0000 (11:19 -0400)]
NFSv2/v3/v4: Place NFS nfs_page shared data into a single structure
that hangs off filp->private_data. As a side effect, this also
cleans up the NFSv4 private file state info.
Trond Myklebust [Mon, 23 Aug 2004 14:18:16 +0000 (10:18 -0400)]
NFSv2: In the NFSv3 RFC, the sattr3 structure passed in the SETATTR
call allows for the client to request that the mtime and/or atime
of an inode be set to the current server time, the given (client)
time, or not changed. The set-to-current-server value is used
when you run "touch file" on the client.
The NFSv2 RFC defines no such encoding for the sattr structure.
However Solaris and Irix machine obey a convention where passing
the invalid value mtime.useconds=1000000 means "set both mtime and
atime to the current server time". The convention is documented
in the book "NFS Illustrated" by Brent Callaghan. The patch below
implements this convention for the Linux client and server (hence
multiple To:s).
Trond Myklebust [Mon, 23 Aug 2004 14:17:20 +0000 (10:17 -0400)]
KCONFIG: In the kernel help for NFSv3 & NFSv4 client support both are
listed as "the newer version ... of the NFS protocol". Obviously
both can't be the newer version at the same time, so here's a
patch to correct the text in such a way that only v4 is listed as
the newer version. Patch is against 2.6.7-rc3 - please consider
including it.
Trond Myklebust [Mon, 23 Aug 2004 14:16:26 +0000 (10:16 -0400)]
NFS: Now that file handle comparison ignores the unused parts of the
file handle container, there is no longer any need to clear the
file handle container before copying in a file handle. This
allows us to remove a 128 byte memset() from several hot paths.
Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:15:49 +0000 (10:15 -0400)]
NFS: While the storage container for NFS file handles must be able to
store 128 bytes, usually NFS servers don't use file handles that
are more than 32 bytes in size. This patch creates an efficient
mechanism for comparing file handles that ignores the unused bytes
in a file handle.
Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:15:13 +0000 (10:15 -0400)]
NFS: In 2.4, NFS O_DIRECT used the VFS's O_DIRECT logic to provide
direct I/O support for NFS files. The 2.4 VFS O_DIRECT logic was
block based, thus the NFS client had to provide a minimum
allowable blocksize for O_DIRECT reads and writes on NFS files.
For various reasons we chose 512 bytes. In 2.6, there is no
requirement for a minimum blocksize. NFS O_DIRECT reads and
writes can go to any byte at any offset in a file. Thus we revert
the blocksize setting for NFS file systems to the previous
behavior, which was to advertise the "wsize" setting as the
optimal I/O block size. This improves the performance of
applications like 'cp' which use this value as their transfer
size.
This patch also exposes the server's reported disk block size in the
f_frsize of the vfsstat structure.
Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:13:19 +0000 (10:13 -0400)]
NFS: Break the nfs_wreq_lock into per-mount locks. This helps prevent
a heavy read and write workload on one mount point from
interfering with workloads on other mount points.
Note that there is still some serialization due to the big kernel
lock.
Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:12:24 +0000 (10:12 -0400)]
RPCSEC_GSS: Add the spkm3 common and client-side code.
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:10:18 +0000 (10:10 -0400)]
NFSv4: OK, so it's trivial and probably superfluous, but I don't see
why we shouldn't be slightly stricter here, so I'm just going to
keep sending this until I'm told to stop.... Make sure that
unmapped errors are approximately in the range of defined NFS4
errors.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:01:57 +0000 (10:01 -0400)]
RPC: Reduce stack utilization for all synchronous NFS operations by
using a dynamically allocated rpc_task structure instead of
allocating one on the stack. This reduces stack utilization by
over 200 bytes for all synchronous NFS operations.
Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Linus Torvalds [Mon, 23 Aug 2004 10:59:22 +0000 (03:59 -0700)]
Remove pointless cast-as-lvalue usage from modedb.c
It's evil, people. Don't use that particular gcc extension.
I've yet to meet anybody who could read the resulting code
and tell me what the heck it does.
Linus Torvalds [Mon, 23 Aug 2004 10:10:29 +0000 (03:10 -0700)]
Don't use signed one-bit bitfields.
We assign 0 and 1 to it, but since it's signed, that's
actually already overflowing the poor thing. So make
it unsigned, which is what it really was supposed to be
in the first place.
David S. Miller [Mon, 23 Aug 2004 07:34:58 +0000 (00:34 -0700)]
[SPARC64]: Fix bugs in new U1memcpy code.
- U1copy_from_user needs PREAMBLE since it uses
explicit ASI_BLK_AIUS references.
- Need to use EX_RETVAL() in U1memcpy.S
- U1memcpy.S can load one 64-bit word too
many, passing the source buffer boundary
and thus potentially causing exceptions.
David S. Miller [Mon, 23 Aug 2004 07:33:47 +0000 (00:33 -0700)]
[SPARC64]: Revamped memcpy infrastructure.
- Make it easier to maintain the Ultra-I vs. Ultra-III
memcpy implementations. Before you had to maintain
3 different entire copies of the routines.
- Kill %asi register writing Ultra-I single memcpy loop
for both user and kernel. Was not worth it.
- Simplify exception detection and handling enormously.