Elina Pasheva [Tue, 12 May 2009 20:12:37 +0000 (13:12 -0700)]
USB: serial: sierra driver interrupt urb resubmit fix
- Fixed a problem when re-submitting urb from interrupt callback in
function sierra_instat_callback(). This suppresses also issuing of
error messages in /var/log/kern.log
- Removed redundant debug message at the beginning of
sierra_instat_callback() function
- Changed a debug message to be an error message
Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Elina Pasheva [Tue, 12 May 2009 20:12:24 +0000 (13:12 -0700)]
USB: serial: sierra driver zero length packet fix
- Fixed a problem with transferring packets with size a multiple of Bulk
Xfer size in function sierra_write(). Added transfer flag
URB_ZERO_PACKET before submitting the urb to trigger Zero-length data
transfer when packet size is a multiple of Bulk Xfer.
Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jason Wessel [Mon, 11 May 2009 20:24:10 +0000 (15:24 -0500)]
USB: serial: ftd_sio: implement sysrq handling on break
Change driver to make use of the new functions in
include/linux/usb/serial.h so as to allow the driver to handle the
sysrq
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jason Wessel [Mon, 11 May 2009 20:24:09 +0000 (15:24 -0500)]
USB: serial: usb_debug,usb_generic_serial: implement sysrq and serial break
The usb_debug driver was modified to implement serial break handling
by using a "magic" data packet comprised of the sequence:
0x00 0xff 0x01 0xfe 0x00 0xfe 0x01 0xff
When the tty layer requests a serial break the usb_debug driver sends
the magic packet. On the receiving side the magic packet is thrown
away or a sysrq is activated depending on what kernel .config options
have been set.
The generic serial driver was modified as well as the usb serial
headers to generically implement sysrq processing in the same way the
non usb uart based drivers implement the sysrq handling. This will
allow other usb serial devices to implement sysrq handling as desired.
The new usb serial functions are named similarly and implemented
similarly to the uart functions as follows:
usb_serial_handle_break <-> uart_handle_break
usb_serial_handle_sysrq_char <-> uart_handle_sysrq_char
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jason Wessel [Mon, 11 May 2009 20:24:08 +0000 (15:24 -0500)]
USB: serial: ftd_sio usb: move status check
Alan Stern commented that the private driver counts must be updated
regard less of the status return on the urb when the write call back
is executed.
This patch alters the behavior to update the private driver counts by
simply moving the status check to after the driver count update.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jason Wessel [Mon, 11 May 2009 20:24:07 +0000 (15:24 -0500)]
USB: usb_debug, usb_generic_serial: implement multi urb write
The usb_debug driver, when used as the console, will always fail to
insert the carriage return and new line sequence as well as randomly
drop console output. This is a result of only having the single
write_urb and that the tty layer will have a lock that prevents the
processing of the back to back urb requests.
The solution is to allow more than one urb to be outstanding and have
a slightly deeper transmit queue. The idea and some code is borrowed
from the ftdi_sio usb driver.
The generic usb serial driver was modified so as to allow the classic
method of 1 write urb, or a multi write urb scheme with N allowed
outstanding urbs where N is controlled by max_in_flight_urbs. When
max_in_flight_urbs in a "struct usb_serial_driver" is non zero the
multi write urb scheme will be used.
The size of 4000 was selected for the usb_debug driver so that the
driver lowers possibility of losing the queued console messages during
the kernel startup.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Elina Pasheva [Wed, 29 Apr 2009 17:29:21 +0000 (10:29 -0700)]
USB: serial: sierra driver read path bug fix
This patch fixes a problem in function sierra_indat_callback() which
would stop receiving traffic from a modem if a number of URB failures
occur. Failed URBs are not resubmitted for the next read and there is
only a limited number of URBs allocated for the IN path. After this
number of failures, the receive path stops working on a particular
interface.
Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Elina Pasheva [Wed, 29 Apr 2009 17:26:46 +0000 (10:26 -0700)]
USB: serial: sierra driver write path improvements
- Updated Copyright notice with new authors names
- Version number set to 1.3.6
- Added a MAX_TRANSFER constant following Greg Kroah-Hartman's
recommended setting of PAGE_SIZE-512 for USB transfer buffers and
modified accordingly sierra_write() function.
Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pete Zaitcev [Wed, 29 Apr 2009 22:02:18 +0000 (16:02 -0600)]
USB: janitor storage initializers
We all know that pointless janitoring is bad, but this code is just
offensive. So:
- The error code goes directly to probe return, so don't return -1.
- Don't return return internal usb-storage codes either.
- usb_stor_control_msg takes timeout in milliseconds.
- Sanitize messages.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Thu, 30 Apr 2009 04:02:49 +0000 (21:02 -0700)]
USB: usb.h: change private: kernel-doc for new format requirement
Use "/* private:" to mark struct members as private so that
scripts/kernel-doc will handle them correctly.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Thu, 30 Apr 2009 04:04:19 +0000 (21:04 -0700)]
USB: composite.h: mark private struct members as private:
Mark internal struct members as /* private: */ so that kernel-doc
won't produce warnings about missing descriptions for them.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Paul Mundt [Thu, 30 Apr 2009 08:41:02 +0000 (17:41 +0900)]
wusb: hwa-hc: Drop unused pci_suspend/resume hooks.
CC drivers/usb/host/hwa-hc.o
drivers/usb/host/hwa-hc.c:601: warning: initialization from incompatible pointer type
drivers/usb/host/hwa-hc.c:602: warning: initialization from incompatible pointer type
The prototype for these changed, so the message itself was dropped. As the only
thing these hooks were doing was printing out the message for debugging, there
is not much point in keeping them around. So, just kill them off.
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Hermann Kneissel [Sun, 26 Apr 2009 20:42:04 +0000 (22:42 +0200)]
USB: garmin_gps: removes usb_reset_device from garmin_close
The following patch removes the call to usb_reset_device which may occur
when closing the driver by implementing a new session initialization
code based on the method used by gpsbabel.
The patch is against linux-2.6.30-rc3-git1.
Signed-off-by: Hermann Kneissel herkne@users.sourceforge.net
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Richard Laager [Mon, 27 Apr 2009 01:56:20 +0000 (20:56 -0500)]
USB: Identify Novatel MC760 in option driver
Identify the Novatel MC760/U760/USB760 in the option USB serial driver.
Signed-off-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 27 Apr 2009 17:33:41 +0000 (13:33 -0400)]
USB: new flag for resume-from-hibernation
This patch (as1237) changes the way the PCI host controller drivers
avoid retaining bogus hardware states during resume-from-hibernation.
Previously we had reset the hardware as part of preparing to reinstate
the memory image. But we can do better now with the new PM framework,
since we know exactly which resume operations are from hibernation.
The pci_resume method is changed to accept a flag indicating whether
the system is resuming from hibernation. When this flag is set, the
drivers will reset the hardware to get rid of any existing state.
Similarly, the pci_suspend method is changed to remove the
pm_message_t argument. It's no longer needed, since no special action
has to be taken when preparing to reinstate the memory image.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 27 Apr 2009 17:33:24 +0000 (13:33 -0400)]
USB: move PCI host controllers to new PM framework
This patch (as1236) converts the USB PCI power management routines
over to the new PM framework.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 27 Apr 2009 17:33:16 +0000 (13:33 -0400)]
PCI: add power-state name strings
This patch (as1235) adds an array of PCI power-state names, together
with a simple inline accessor routine.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 27 Apr 2009 17:19:41 +0000 (13:19 -0400)]
USB: g_file_storage: use the "unaligned" accessors
This patch (as1233) makes g_file_storage use the "unaligned" accessors.
This is based on work originally done by Harvey Harrison.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Elina Pasheva [Tue, 28 Apr 2009 01:41:52 +0000 (18:41 -0700)]
USB: serial: sierra driver debug info visibility improvement
- Version number set to 1.3.5
- Added "\n" at the end of each string in dev_dbg() code to improve the debug
information visibility. Without this change the debug logs are very
difficult to read.
Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Elina Pasheva [Sat, 25 Apr 2009 01:41:49 +0000 (18:41 -0700)]
USB: serial: sierra driver performance improvements
- Version number set to 1.3.4
- Increased the number of input/output URBs for improved performance
(numbers based on an measurement study triggered by a user request).
We performed the testing using a network simulator that provided full
speeds in the uplink and downlink directions and this combination of
URBs provided the best throughput.
Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Mon, 27 Apr 2009 20:17:21 +0000 (13:17 -0700)]
USB: remove unused usb_host class
The usb_host class isn't used for anything anymore (it was used for
debug files, but they have moved to debugfs a few kernel releases ago),
so let's delete it before someone accidentally puts a file in it.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Mon, 27 Apr 2009 20:15:38 +0000 (13:15 -0700)]
USB: EHCI: create sysfs companion files directly in the controller device
The controller device is where we want this sysfs file, especially as
the dev pointer is about to go away...
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Mon, 27 Apr 2009 20:12:58 +0000 (13:12 -0700)]
USB: OHCI: use the ohci structure directly in debugfs files.
Right now we jump through some hoops to get to the struct ohci_hcd
struct in the ohci debugfs files. Remove all of the fun casting around
and just use the pointer directly.
This is needed as the dev pointer in the hcd structure is going away,
and it makes the code simpler and smaller
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Thu, 30 Apr 2009 14:08:18 +0000 (10:08 -0400)]
NLS: update handling of Unicode
This patch (as1239) updates the kernel's treatment of Unicode. The
character-set conversion routines are well behind the current state of
the Unicode specification: They don't recognize the existence of code
points beyond plane 0 or of surrogate pairs in the UTF-16 encoding.
The old wchar_t 16-bit type is retained because it's still used in
lots of places. This shouldn't cause any new problems; if a
conversion now results in an invalid 16-bit code then before it must
have yielded an undefined code.
Difficult-to-read names like "utf_mbstowcs" are replaced with more
transparent names like "utf8s_to_utf16s" and the ordering of the
parameters is rationalized (buffer lengths come immediate after the
pointers they refer to, and the inputs precede the outputs).
Fortunately the low-level conversion routines are used in only a few
places; the interfaces to the higher-level uni2char and char2uni
methods have been left unchanged.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Clemens Ladisch [Fri, 24 Apr 2009 08:12:18 +0000 (10:12 +0200)]
usb: return device strings in UTF-8
Change the encoding of strings returned by usb_string() from ISO 8859-1
to UTF-8.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Clemens Ladisch [Fri, 24 Apr 2009 08:11:56 +0000 (10:11 +0200)]
nls: utf8_wcstombs: fix buffer overflow
utf8_wcstombs forgot to include one-byte UTF-8 characters when
calculating the output buffer size, i.e., theoretically, it was possible
to overflow the output buffer with an input string that contains enough
ASCII characters.
In practice, this was no problem because the only user so far (VFAT)
always uses a big enough output buffer.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Clemens Ladisch [Fri, 24 Apr 2009 08:11:40 +0000 (10:11 +0200)]
nls: utf8_wcstombs: use correct buffer size in error case
When utf8_wcstombs encounters a character that cannot be encoded, we
must not decrease the remaining output buffer size because nothing has
been written to the output buffer.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 24 Apr 2009 22:16:04 +0000 (15:16 -0700)]
USB: add the usbfs devices file to debugfs
People are very used to the devices file in usbfs. Now that we have
moved usbfs to be an "embedded" option only, the developers miss the
file, they had grown quite attached to it over all of these years. This
patch brings it back and puts it in the usb debugfs directory, so that
the developers don't feel sad anymore.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 24 Apr 2009 22:15:49 +0000 (15:15 -0700)]
USB: usbmon: use the new usb debugfs directory
All usb debugfs files should be behind the usb directory, not at the
root of debugfs.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 24 Apr 2009 22:15:00 +0000 (15:15 -0700)]
USB: UHCI: use the new usb debugfs directory
All usb debugfs files should be behind the usb directory, not at the
root of debugfs.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 24 Apr 2009 22:14:38 +0000 (15:14 -0700)]
USB: OHCI: use the new usb debugfs directory
All usb debugfs files should be behind the usb directory, not at the
root of debugfs.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 24 Apr 2009 22:14:25 +0000 (15:14 -0700)]
USB: FHCI: use the new usb debugfs directory
All usb debugfs files should be behind the usb directory, not at the
root of debugfs.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 24 Apr 2009 22:13:18 +0000 (15:13 -0700)]
USB: EHCI: use the new usb debugfs directory
All usb debugfs files should be behind the usb directory, not at the
root of debugfs.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 24 Apr 2009 21:56:26 +0000 (14:56 -0700)]
USB: add usb debugfs directory
Add a common usb directory in debugfs that the usb subsystem can use.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tony Cook [Sat, 18 Apr 2009 13:25:06 +0000 (22:55 +0930)]
USB: mos7840: fix debug log messages
This patch removes all the unnecessary "\n"s that the debug print
statements have, which result in everything appearing double spaced
and unreadable in the logs.
Signed-off-by: Tony Cook <tony-cook@bigpond.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
H Hartley Sweeten [Wed, 22 Apr 2009 20:03:05 +0000 (16:03 -0400)]
USB: hub.c: fix sparse warnings
Fix sparse warning in drivers/usb/core/hub.c.
The following sparse warning is seen when building on ARM due
do the macro raw_local_irq_save():
warning: symbol 'temp' shadows an earlier one
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
H Hartley Sweeten [Wed, 22 Apr 2009 20:18:59 +0000 (16:18 -0400)]
USB: host/ohci-hcd.c: fix sparse warnings
Fix sparse warnings in drivers/usb/host/ohci-hcd.c.
Four of the following sparse warning are seen when building on
ARM due do the macro raw_local_irq_save():
warning: symbol 'temp' shadows an earlier one
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Robert Jarzmik [Wed, 22 Apr 2009 03:41:03 +0000 (20:41 -0700)]
USB: pxa27x_udc: single-thread setup requests
Since the PXA 27x UDC automatically ACK's some control
packets such as SET_INTERFACE, the gadgets may not get a
chance to process the request before another control packet
is received. The Linux gadgets do not expect to receive
setup callbacks out of order. The file storage gadget only
saves the "highest" priority request.
The PXA27x UDC driver must make sure it only sends one up at
a time, allowing the gadget to make changes before
continuing. In theory, the host would be NACK'd while the
gadget processes the change but the UDC has already ACK'd
the request. If another request is sent by the host that is
not automatically ACK'd by the UDC, then the throttling
happens properly to regain sync.
The observed case was the file_storage gadget timing out on
a BulkReset request because the SET_INTERFACE was being
processed by the gadget. Since SET_INTERFACE is higher
priority than BulkReset, the BulkReset was dropped. This
was exacerbated by turning on the debug which delayed the
fsg signal processing thread.
This also fixes the "should never get in
WAIT_ACK_SET_CONF_INTERF state here!!!" warning.
Reported-by: Vernon Sauder <vernoninhand@gmail.com>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
index
51790b0..
1937d8c 100644
Robert Jarzmik [Wed, 22 Apr 2009 03:34:44 +0000 (20:34 -0700)]
USB: pxa27x_udc: compatibility with pxa320 SoC
Got pxa27x_udc working on the pxa320 Nomad platform. The
problem was that the pxa3xx UDC is not quite compatible with
the pxa27x UDC in how it handles back-to-back control
packets. The pxa27x probably drops them by default, but the
pxa320 does not, and you have to detect it and set the OPC
bit to clear the zero-length packet.
Signed-off-by: Aric Blumer <aric@sdgsystems.com>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Wed, 22 Apr 2009 03:34:24 +0000 (20:34 -0700)]
USB: pxa27x_udc: introduce pxa27x_clear_otgph()
Follow pxa27x change in OTGPH handling, and use the newly
defined pxa27x_clear_otgph().
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Eric Miao <eric.miao@marvell.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Matthias Kaehlcke [Wed, 15 Apr 2009 20:28:28 +0000 (22:28 +0200)]
USB: UHCI queue: use usb_endpoint_type()
use usb_endpoint_type() instead of fiddling manually with bmAttributes
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Matthias Kaehlcke [Wed, 15 Apr 2009 20:28:32 +0000 (22:28 +0200)]
USB: gadgetfs: use helper functions to determine endpoint type and direction
Use helper functions to determine the type and direction of an endpoint
instead of fiddling with bEndpointAddress and bmAttributes
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Matthias Kaehlcke [Wed, 15 Apr 2009 20:28:21 +0000 (22:28 +0200)]
USB: Goku-S: use helper functions to determine endpoint type and direction
Use helper functions to determine the type and direction of an endpoint
instead of fiddling with bEndpointAddress and bmAttributes
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Matthias Kaehlcke [Wed, 15 Apr 2009 20:28:02 +0000 (22:28 +0200)]
USB: at91_udc: use helper functions to determine endpoint type and direction
Use helper functions to determine the type and direction of an endpoint
instead of fiddling with bEndpointAddress and bmAttributes
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Matthias Kaehlcke [Wed, 15 Apr 2009 20:27:49 +0000 (22:27 +0200)]
USB: atmel_usba_udc: use helper functions to determine endpoint type and direction
Use helper functions to determine the type and direction of an endpoint
instead of fiddling with bEndpointAddress and bmAttributes
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Matthias Kaehlcke [Wed, 15 Apr 2009 20:28:41 +0000 (22:28 +0200)]
USB: ci13xxx_udc: use helper functions to determine endpoint type and direction
Use helper functions to determine the type and direction of an endpoint
instead of fiddling with bEndpointAddress and bmAttributes
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
H Hartley Sweeten [Thu, 16 Apr 2009 01:34:40 +0000 (21:34 -0400)]
USB: core/sysfs: fix sparse warnings
Fix 3 sparse warning in drivers/usb/core/sysfs.c.
warning: symbol '__mptr' shadows an earlier one
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pascal Terjan [Thu, 16 Apr 2009 17:00:45 +0000 (19:00 +0200)]
USB: Ignore storage device in modem mode on DWN-652
D-Link DWN-652 in Modem mode exposes 3 interfaces
- First one is the USB storage one
- Second one is for both control and connection
- Third one is unknown
This patch avoids usb-storage trying to switch again when already in
modem mode, and exposes only 2 ttyUSB instead of 3 by not attaching
to the storage interface
Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Scott James Remnant [Tue, 21 Apr 2009 16:21:40 +0000 (17:21 +0100)]
USB: usbfs: deprecate and hide option for !embedded
Modern systems do not use usbfs; the entries within it are files,
not device nodes, and do not support ACLs which are the default way to
provide access to USB devices to untrusted users.
It is replaced by device-nodes maintained by udev in /dev/bus/usb,
libusb uses this device nodes.
Mark the option as deprecated, and hide entirely for non-embedded builds
(which may not be using udev but require raw USB device access).
Signed-off-by: Scott James Remnant <scott@canonical.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Thu, 16 Apr 2009 19:35:09 +0000 (15:35 -0400)]
USB: consolidate usb_unbind_interface and usb_driver_release_interface
This patch (as1230) consolidates code in usb_unbind_interface() and
usb_driver_release_interface(). In fact, it makes release_interface
call unbind_interface, thereby removing the need for duplicated code.
It works like this: If the interface has already been registered with
the driver core when a driver releases it, then the usual driver-core
mechanism will call unbind_interface. If it hasn't been unregistered
then we will make the call ourselves.
As a nice bonus, drivers now don't have to worry about whether their
disconnect method will get called when they release an interface -- it
always will. Previously it would be called only if the interface was
registered.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Adamson [Fri, 1 May 2009 10:48:45 +0000 (11:48 +0100)]
USB: ftdi_sio: fix hi-speed device packet size calculation
Added a function to set the packet size to be used based on the value from the
device endpoint descriptor. The FT2232H and FT4232H hi-speed devices will have
wMaxPacketSize of 512 bytes when connected to a USB 2.0 hi-speed host, but will
use alternative descriptors with wMaxPacketSize of 64 bytes if connected to a
USB 1.1 host or hub. All other FTDI devices have wMaxPacketSize of 64 bytes,
except some FT232R and FT245R devices which customers have mistakenly
programmed to have wMaxPacketSize of 0 - this is an error and will be
overridden to use wMaxPacketSize of 64 bytes. The packet size used is
important as it determines where the driver removes the status bytes from the
incoming data. If it is incorrect, it will lead to data corruption.
Signed-off-by: Mark J. Adamson <mark.adamson@ftdichip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Adamson [Thu, 9 Apr 2009 14:03:09 +0000 (15:03 +0100)]
USB: serial: FTDI: add high speed device support
Added support for FTDI's USB 2.0 hi-speed devices - FT2232H (2
interfaces) and FT4232H (4 interfaces), including a new baud rate
calculation for these devices which can now achieve up to 12Mbaud by
turning off a divide by 2.5 in the baud rate generator of the chips. In
order to achieve baud rates of <1200 baud, the divide by 2.5 must be
active. The default product ID of the FT2232H is 0x6010 (same as the
FT2232C IC). The default PID of the FT4232H is 0x6011.
Signed-off-by: Mark J. Adamson <mark.adamson@ftdichip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ajay Kumar Gupta [Fri, 3 Apr 2009 23:16:17 +0000 (16:16 -0700)]
musb: add high bandwidth ISO support
Tested on OMAP3 host side with Creative (Live! Cam Optia) USB camera
which uses high bandwidth isochronous IN endpoints. FIFO mode 4 is
updated to provide the needed 4K endpoint buffer without breaking
the g_nokia composite gadget configuration. (This is the only
gadget driver known to use enough endpoints to notice the change.)
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Anand Gadiyar [Thu, 2 Apr 2009 19:07:08 +0000 (12:07 -0700)]
musb: use dma mode 1 for TX if transfer size equals maxpacket (v2)
Currently, with Inventra DMA, we use Mode 0 if transfer size is less
than or equal to the endpoint's maxpacket size. This requires that
we explicitly set TXPKTRDY for that transfer.
However the musb_g_tx code will not set TXPKTRDY twice if the last
transfer is exactly equal to maxpacket, even if request->zero is set.
Using Mode 1 will solve this; a better fix might be in musb_g_tx().
Without this change, musb will not correctly send out a ZLP if the
last transfer is the maxpacket size and request->zero is set.
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 31 Mar 2009 19:35:09 +0000 (12:35 -0700)]
musb: support disconnect after HNP roleswitch
Adjust HNP state machines in MUSB driver so that they handle the
case where the cable is disconnected. The A-side machine was
very wrong (unrecoverable); the B-Side was much less so.
- A_PERIPHERAL ... as usual, the non-observability of the ID
pin through Mentor's registers makes trouble. We can't go
directly to A_WAIT_VFALL to end the session and start the
disconnect processing. We can however sense link suspending,
go to A_WAIT_BCON, and from there use OTG timeouts to finally
trigger that A_WAIT_VFALL transition. (Hoping that nobody
reconnects quickly to that port and notices the wrong state.)
- B_HOST ... actually clear the Host Request (HR) bit as the
messages say, disconnect the peripheral from the root hub,
and don't detour through a suspend state. (In some cases
this would eventually have cleaned up.)
Also adjust the A_SUSPEND transition to respect the A_AIDL_BDIS
timeout, so if HNP doesn't trigger quickly enough the A_WAIT_VFALL
transition happens as it should.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Thu, 2 Apr 2009 17:16:11 +0000 (10:16 -0700)]
musb: make initial HNP roleswitch work (v2)
Minor HNP bugfixes, so the initial role switch works:
- A-Device:
* disconnect-during-suspend enters A_PERIPHERAL state
* kill OTG timer after reset as A_PERIPHERAL ...
* ... and also pass that reset to the gadget
* once HNP succeeds, clear the "ignore_disconnect" flag
* from A_PERIPHERAL, disconnect transitions to A_WAIT_BCON
- B-Device:
* kill OTG timer on entry to B_HOST state (HNP succeeded)
* once HNP succeeds, clear "ignore_disconnect" flag
* kick the root hub only _after_ the state is adjusted
Other state transitions are left alone. Notably, exit paths from
the "roles have switched" state ... A_PERIPHERAL handling of that
stays seriously broken.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 31 Mar 2009 19:32:12 +0000 (12:32 -0700)]
musb: otg timer cleanup
Minor cleanup of OTG timer handling:
* unify decls for OTG time constants, in the core header
* set up and use that timer in a more normal way
* move to the driver struct, so it's usable outside core
And tighten use and setup of T(a_wait_bcon) so that if it's used,
it's always valid. (If that timer expires, the A-device will
stop powering VBUS. For non-OTG systems, that will be a surprise.)
No behavioral changes, other than more consistency when applying
that core HNP timeout.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 31 Mar 2009 19:30:04 +0000 (12:30 -0700)]
musb: proper hookup to transceiver drivers
Let the otg_transceiver in MUSB be managed by an external driver;
don't assume it's integrated. OMAP3 chips need it to be external,
and there may be ways to interact with the transceiver which add
functionality to the system.
Platform init code is responsible for setting up the transeciver,
probably using the NOP transceiver for integrated transceivers.
External ones will use whatever the board init code provided,
such as twl4030 or something more hands-off.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 31 Mar 2009 19:28:31 +0000 (12:28 -0700)]
USB: nop-usb-xceiv: behave when linked as a module
The NOP OTG transceiver driver needs to be usable from modules.
Make sure its symbols are always accessible at both compile and
link time, and make sure the device instance is allocated from
the heap so that device lifetime rules are obeyed.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 31 Mar 2009 19:26:10 +0000 (12:26 -0700)]
USB: twl4030-usb: fix minor reporting goofage
Fix a reporting glitch in the twl4030 USB transceiver code.
It wasn't properly distinguishing the two types of active
USB link: ID grounded, vs not. In the current code that
distinction doesn't much matter; in the future this bugfix
should help support better USB controller communications.
Provide a comment sorting out some of the cryptic bits of
the manual: different sections use different names for
key signals, and the register definitions don't help much
without the explanations and diagrams.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Uwe Kleine-König [Fri, 27 Mar 2009 23:26:33 +0000 (00:26 +0100)]
USB: move orion-ehci's probe function to .devinit.text
A pointer to ehci_orion_drv_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Ronen Shitrit <rshitrit@marvell.com>
Cc: Lennert Buytenhek <buytenh@marvell.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Cc: Nicolas Pitre <nico@marvell.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Tzachi Perelstein <tzachi@marvell.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Uwe Kleine-König [Fri, 27 Mar 2009 23:27:00 +0000 (00:27 +0100)]
USB: move r8a66597_hcd's probe function to .devinit.text
A pointer to r8a66597_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Cc: Magnus Damm <damm@igel.co.jp>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Uwe Kleine-König [Fri, 27 Mar 2009 23:27:13 +0000 (00:27 +0100)]
USB: move twl4030_usb's probe function to .devinit.text
A pointer to twl4030_usb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jouni Hogander <jouni.hogander@nokia.com>
Cc: Kalle Jokiniemi <kalle.jokiniemi@digia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:59:46 +0000 (12:59 -0700)]
musb: split out CPPI interrupt handler
As DaVinci DM646x has a dedicated CPPI DMA interrupt, replace
cppi_completion() (which has always been kind of layering
violation) by a complete CPPI interrupt handler.
[ dbrownell@users.sourceforge.net: only cppi_dma.c needs platform
device header, not cppi_dma.h ]
Signed-off-by: Dmitry Krivoschekov <dkrivoschekov@ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:58:31 +0000 (12:58 -0700)]
musb_host: refactor URB giveback
As musb_advance_schedule() is now the only remaning
caller of musb_giveback() (and the only valid context
of such call), just fold the latter into the former
and then rename __musb_giveback() into musb_giveback().
This is a net minor shrink.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:57:50 +0000 (12:57 -0700)]
musb_host: streamline musb_cleanup_urb() calls
The argument for the 'is_in' parameter of musb_cleanup_urb()
is always extracted from an URB that's passed to the function.
So that parameter is superfluous; remove it.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:56:26 +0000 (12:56 -0700)]
musb_host: simplify check for active URB
The existance of the scheduling list shouldn't matter in
determining whether there's currectly an URB executing on a
hardware endpoint. What should actually matter is the 'in_qh'
or 'out_qh' fields of the 'struct musb_hw_ep' -- those are
set in musb_start_urb() and cleared in musb_giveback() when
the endpoint's URB list drains. Hence we should be able to
replace the big *switch* statements in musb_urb_dequeue()
and musb_h_disable() with mere musb_ep_get_qh() calls...
While at it, do some more changes:
- add 'is_in' variable to musb_urb_dequeue();
- remove the unnecessary 'epnum' variable from musb_h_disable();
- fix the comment style in the vicinity.
This is a minor shrink of source and object code.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:55:16 +0000 (12:55 -0700)]
musb_host: factor out musb_ep_{get|set}_qh()
Factor out the often used code to get/set the active 'qh'
pointer for the hardware endpoint. Change the way the case
of a shared FIFO is handled by setting *both* 'in_qh' and
'out_qh' fields of 'struct musb_hw_ep'. That seems more
consistent and makes getting to the current 'qh' easy when
the code knows the direction beforehand.
While at it, turn some assignments into intializers and
fix declaration style in the vicinity.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:54:21 +0000 (12:54 -0700)]
musb_host: refactor musb_save_toggle() (take 2)
Refactor musb_save_toggle() as follows:
- replace 'struct musb_hw_ep *ep' parameter by 'struct
musb_qh *qh' to avoid re-calculating this value
- move usb_settogle() call out of the *if* operator.
This is a net minor shrink of source and object code.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:53:32 +0000 (12:53 -0700)]
musb_gadget: suppress "parasitic" TX interrupts with CPPI
Suppress "parasitic" endpoint interrupts in the DMA mode
when using CPPI DMA driver; they're caused by the MUSB gadget
driver using the DMA request mode 0 instead of the mode 1.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:52:43 +0000 (12:52 -0700)]
musb_gadget: fix unhandled endpoint 0 IRQs
The gadget EP0 code routinely ignores an interrupt at end of
the data phase because of musb_g_ep0_giveback() resetting the
state machine to "idle, waiting for SETUP" phase prematurely.
The driver also prematurely leaves the status phase on
receiving the SetupEnd interrupt.
As there were still unhandled endpoint 0 interrupts happening
from time to time after fixing these issues, there turned to
be yet another culprit: two distinct gadget states collapsed
into one.
The (missing) state that comes after STATUS IN/OUT states was
typically indiscernible from them since the corresponding
interrupts tend to happen within too little period of time
(due to only a zero-length status packet in between) and so
they got coalesced; yet this state is not the same as the next
one which is associated with the reception of a SETUP packet.
Adding this extra state seems to have fixed the rest of the
unhandled interrupts that generic_interrupt() and
davinci_interrupt() hid by faking their result and only
emitting a debug message -- so, stop doing that.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bryan Wu [Tue, 2 Jun 2009 07:25:58 +0000 (03:25 -0400)]
usb: misc: SiS usbvga dangle: accept MUSB_HDRC as a fast enough host controller
Acked-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michele Valzelli [Tue, 26 May 2009 22:09:12 +0000 (00:09 +0200)]
USB: option.c: add Toshiba 3G HSDPA SM-Bus Minicard device id
This patch adds support for the Toshiba HSDPA Minicard (which is just a
rebranded Novatel EU870D) used in some Toshiba laptops.
This is my first patch attempt, I hope I got the conventions right.
Signed-off-by: Michele Valzelli <valz@messagenet.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Daniel Suchy [Wed, 13 May 2009 08:05:48 +0000 (10:05 +0200)]
USB: FTDI-SIO new device ids
I would like to have added new device to usbserial/ftdi_sio driver.
These ids used USB track device (http://www.l-and-b.dk/access_alt.html).
They use differend device IDs, but it works as standard usb-serial
conventer.
From: Daniel Suchy <danny@danysek.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linus Torvalds [Mon, 15 Jun 2009 17:38:06 +0000 (10:38 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] fix compile error in arch/ia64/mm/extable.c
Linus Torvalds [Mon, 15 Jun 2009 17:06:19 +0000 (10:06 -0700)]
Merge branch 'timers-for-linus-migration' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus-migration' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
timers: Logic to move non pinned timers
timers: /proc/sys sysctl hook to enable timer migration
timers: Identifying the existing pinned timers
timers: Framework for identifying pinned timers
timers: allow deferrable timers for intervals tv2-tv5 to be deferred
Fix up conflicts in kernel/sched.c and kernel/timer.c manually
Linus Torvalds [Mon, 15 Jun 2009 16:58:50 +0000 (09:58 -0700)]
Merge branch 'timers-for-linus-clockevents' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus-clockevents' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
clockevent: export register_device and delta2ns
clockevents: tick_broadcast_device can become static
Linus Torvalds [Mon, 15 Jun 2009 16:58:33 +0000 (09:58 -0700)]
Merge branch 'timers-for-linus-clocksource' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus-clocksource' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
clocksource: prevent selection of low resolution clocksourse also for nohz=on
clocksource: sanity check sysfs clocksource changes
Linus Torvalds [Mon, 15 Jun 2009 16:43:24 +0000 (09:43 -0700)]
Merge branch 'timers-for-linus-ntp' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus-ntp' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
ntp: fix comment typos
ntp: adjust SHIFT_PLL to improve NTP convergence
Linus Torvalds [Mon, 15 Jun 2009 16:40:05 +0000 (09:40 -0700)]
Merge git://git./linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1244 commits)
pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
ipv4: Fix fib_trie rebalancing
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
Bluetooth: Fix Kconfig issue with RFKILL integration
PIM-SM: namespace changes
ipv4: update ARPD help text
net: use a deferred timer in rt_check_expire
ieee802154: fix kconfig bool/tristate muckup
bonding: initialization rework
bonding: use is_zero_ether_addr
bonding: network device names are case sensative
bonding: elminate bad refcount code
bonding: fix style issues
bonding: fix destructor
bonding: remove bonding read/write semaphore
bonding: initialize before registration
bonding: bond_create always called with default parameters
x_tables: Convert printk to pr_err
netfilter: conntrack: optional reliable conntrack event delivery
list_nulls: add hlist_nulls_add_head and hlist_nulls_del
...
Linus Torvalds [Mon, 15 Jun 2009 16:32:52 +0000 (09:32 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (103 commits)
powerpc: Fix bug in move of altivec code to vector.S
powerpc: Add support for swiotlb on 32-bit
powerpc/spufs: Remove unused error path
powerpc: Fix warning when printing a resource_size_t
powerpc/xmon: Remove unused variable in xmon.c
powerpc/pseries: Fix warnings when printing resource_size_t
powerpc: Shield code specific to 64-bit server processors
powerpc: Separate PACA fields for server CPUs
powerpc: Split exception handling out of head_64.S
powerpc: Introduce CONFIG_PPC_BOOK3S
powerpc: Move VMX and VSX asm code to vector.S
powerpc: Set init_bootmem_done on NUMA platforms as well
powerpc/mm: Fix a AB->BA deadlock scenario with nohash MMU context lock
powerpc/mm: Fix some SMP issues with MMU context handling
powerpc: Add PTRACE_SINGLEBLOCK support
fbdev: Add PLB support and cleanup DCR in xilinxfb driver.
powerpc/virtex: Add ml510 reference design device tree
powerpc/virtex: Add Xilinx ML510 reference design support
powerpc/virtex: refactor intc driver and add support for i8259 cascading
powerpc/virtex: Add support for Xilinx PCI host bridge
...
Linus Torvalds [Mon, 15 Jun 2009 16:27:37 +0000 (09:27 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
regulator/max1586: fix V3 gain calculation integer overflow
regulator/max1586: support increased V3 voltage range
regulator: lp3971 - fix driver link error when built-in.
LP3971 PMIC regulator driver (updated and combined version)
regulator: remove driver_data direct access of struct device
regulator: Set MODULE_ALIAS for regulator drivers
regulator: Support list_voltage for fixed voltage regulator
regulator: Move regulator drivers to subsys_initcall()
regulator: build fix for powerpc - renamed show_state
regulator: add userspace-consumer driver
Maxim 1586 regulator driver
Rusty Russell [Sat, 13 Jun 2009 05:20:15 +0000 (14:50 +0930)]
[IA64] fix compile error in arch/ia64/mm/extable.c
ad6561dffa17f17bb68d7207d422c26c381c4313 ("module: trim exception table on init
free.") put a bogus trim_init_extable() function into ia64 which didn't compile.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Linus Torvalds [Mon, 15 Jun 2009 16:13:49 +0000 (09:13 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: (22 commits)
nilfs2: support contiguous lookup of blocks
nilfs2: add sync_page method to page caches of meta data
nilfs2: use device's backing_dev_info for btree node caches
nilfs2: return EBUSY against delete request on snapshot
nilfs2: modify list of unsupported features in caveats
nilfs2: enable sync_page method
nilfs2: set bio unplug flag for the last bio in segment
nilfs2: allow future expansion of metadata read out via get info ioctl
NILFS2: Pagecache usage optimization on NILFS2
nilfs2: remove nilfs_btree_operations from btree mapping
nilfs2: remove nilfs_direct_operations from direct mapping
nilfs2: remove bmap pointer operations
nilfs2: remove useless b_low and b_high fields from nilfs_bmap struct
nilfs2: remove pointless NULL check of bpop_commit_alloc_ptr function
nilfs2: move get block functions in bmap.c into btree codes
nilfs2: remove nilfs_bmap_delete_block
nilfs2: remove nilfs_bmap_put_block
nilfs2: remove header file for segment list operations
nilfs2: eliminate removal list of segments
nilfs2: add sufile function that can modify multiple segment usages
...
Philipp Zabel [Thu, 28 May 2009 19:00:03 +0000 (21:00 +0200)]
regulator/max1586: fix V3 gain calculation integer overflow
On Thu, May 28, 2009 at 10:59 AM, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> On Thu, May 28, 2009 at 07:15:16AM +0200, Philipp Zabel wrote:
>> The V3 regulator can be configured with an external resistor
>> connected to the feedback pin (R24 in the data sheet) to
>> increase the voltage range.
>>
>> For example, hx4700 has R24 = 3.32 kOhm to achieve a maximum
>> V3 voltage of 1.55 V which is needed for 624 MHz CPU frequency.
>>
>> Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
>
> Looks good.
>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Thanks, but it turns out I hit a 32 bit integer overflow in
the gain calculation. I'd like to mend that with the following
patch. Now max_uV could be increased up to 4.294 V, enough to
charge LiPo cells.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Philipp Zabel [Thu, 28 May 2009 05:15:16 +0000 (07:15 +0200)]
regulator/max1586: support increased V3 voltage range
The V3 regulator can be configured with an external resistor
connected to the feedback pin (R24 in the data sheet) to
increase the voltage range.
For example, hx4700 has R24 = 3.32 kOhm to achieve a maximum
V3 voltage of 1.55 V which is needed for 624 MHz CPU frequency.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Liam Girdwood [Tue, 19 May 2009 10:44:37 +0000 (11:44 +0100)]
regulator: lp3971 - fix driver link error when built-in.
lp3971_i2c_remove' referenced in section `.data' of drivers/built-in.o:
defined in discarded section `.devexit.text' of drivers/built-in.o
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Marek Szyprowski [Tue, 19 May 2009 05:33:55 +0000 (07:33 +0200)]
LP3971 PMIC regulator driver (updated and combined version)
This patch adds regulator drivers for National Semiconductors LP3971 PMIC.
This LP3971 PMIC controller has 3 DC/DC voltage converters and 5 low
drop-out (LDO) regulators. LP3971 PMIC controller uses I2C interface.
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Greg Kroah-Hartman [Thu, 30 Apr 2009 22:21:37 +0000 (15:21 -0700)]
regulator: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Tue, 28 Apr 2009 10:13:55 +0000 (11:13 +0100)]
regulator: Set MODULE_ALIAS for regulator drivers
Several of the regulator drivers didn't have MODULE_ALIAS so couldn't be
auto loaded. Add the MODULE_ALIAS in case they do get built as modules.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Tue, 28 Apr 2009 10:13:54 +0000 (11:13 +0100)]
regulator: Support list_voltage for fixed voltage regulator
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Mon, 27 Apr 2009 17:21:18 +0000 (18:21 +0100)]
regulator: Move regulator drivers to subsys_initcall()
Regulators need to be available early in init in order to allow them
to be available for consumers when requested. This is generally done
by registering them at subsys_initcall() time but not all regulator
drivers have done that. Convert these drivers to do so in order to
mimimise future support.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Liam Girdwood [Tue, 28 Apr 2009 11:01:16 +0000 (12:01 +0100)]
regulator: build fix for powerpc - renamed show_state
This patch fixes the follwing build failure on powerpc:-
> Today's linux-next build (powerpc allyesconfig) failed like this:
>
> drivers/regulator/userspace-consumer.c:43: error: conflicting types
> for 'show_state'
> include/linux/sched.h:273: note: previous definition of 'show_state'
> was here
>
> Caused by commit
5defa2bce704ca4151cfe24e4297aa7797cafd22 ("regulator:
> add userspace-consumer driver") which I have reverted for today.
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mike Rapoport [Sun, 26 Apr 2009 13:49:39 +0000 (16:49 +0300)]
regulator: add userspace-consumer driver
The userspace-consumer driver allows control of voltage and current
regulator state from userspace. This is required for fine-grained
power management of devices that are completely controller by userspace
applications, e.g. a GPS transciever connected to a serial port.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Robert Jarzmik [Thu, 23 Apr 2009 18:10:43 +0000 (20:10 +0200)]
Maxim 1586 regulator driver
The Maxim 1586 regulator is a voltage regulator with 2
voltage outputs, specially suitable for Marvell PXA
chips. One output is in the range of required VCC_CORE by
the PXA27x chips, the other in the VCC_USIM required as well
by PXA27x chips.
The chip is controlled through the I2C bus.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
David S. Miller [Mon, 15 Jun 2009 10:02:23 +0000 (03:02 -0700)]
Merge branch 'master' of /linux/kernel/git/torvalds/linux-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/scsi/fcoe/fcoe.c
net/core/drop_monitor.c
net/core/net-traces.c
Jarek Poplawski [Mon, 15 Jun 2009 09:31:47 +0000 (02:31 -0700)]
pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
Let's use TICKS instead of US, so PSCHED_TICKS2NS and PSCHED_NS2TICKS
(like in PSCHED_TICKS_PER_SEC already) to avoid misleading.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Mon, 15 Jun 2009 09:31:29 +0000 (02:31 -0700)]
ipv4: Fix fib_trie rebalancing
While doing trie_rebalance(): resize(), inflate(), halve() RCU free
tnodes before updating their parents. It depends on RCU delaying the
real destruction, but if RCU readers start after call_rcu() and before
parent update they could access freed memory.
It is currently prevented with preempt_disable() on the update side,
but it's not safe, except maybe classic RCU, plus it conflicts with
memory allocations with GFP_KERNEL flag used from these functions.
This patch explicitly delays freeing of tnodes by adding them to the
list, which is flushed after the update is finished.
Reported-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mike Frysinger [Sun, 14 Jun 2009 21:56:48 +0000 (22:56 +0100)]
ramfs: ignore unknown mount options
On systems where CONFIG_SHMEM is disabled, mounting tmpfs filesystems can
fail when tmpfs options are used. This is because tmpfs creates a small
wrapper around ramfs which rejects unknown options, and ramfs itself only
supports a tiny subset of what tmpfs supports. This makes it pretty hard
to use the same userspace systems across different configuration systems.
As such, ramfs should ignore the tmpfs options when tmpfs is merely a
wrapper around ramfs.
This used to work before commit
c3b1b1cbf0 as previously, ramfs would
ignore all options. But now, we get:
ramfs: bad mount option: size=10M
mount: mounting mdev on /dev failed: Invalid argument
Another option might be to restore the previous behavior, where ramfs
simply ignored all unknown mount options ... which is what Hugh prefers.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Matt Mackall <mpm@selenic.com>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 14 Jun 2009 21:12:18 +0000 (14:12 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/sam/kbuild-next
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (53 commits)
.gitignore: ignore *.lzma files
kbuild: add generic --set-str option to scripts/config
kbuild: simplify argument loop in scripts/config
kbuild: handle non-existing options in scripts/config
kallsyms: generalize text region handling
kallsyms: support kernel symbols in Blackfin on-chip memory
documentation: make version fix
kbuild: fix a compile warning
gitignore: Add GNU GLOBAL files to top .gitignore
kbuild: fix delay in setlocalversion on readonly source
README: fix misleading pointer to the defconf directory
vmlinux.lds.h update
kernel-doc: cleanup perl script
Improve vmlinux.lds.h support for arch specific linker scripts
kbuild: fix headers_exports with boolean expression
kbuild/headers_check: refine extern check
kbuild: fix "Argument list too long" error for "make headers_check",
ignore *.patch files
Remove bashisms from scripts
menu: fix embedded menu presentation
...