]> err.no Git - linux-2.6/log
linux-2.6
16 years agoUSB: dummy-hcd: use dynamic allocation for platform_devices
Alan Stern [Mon, 7 Apr 2008 19:03:25 +0000 (15:03 -0400)]
USB: dummy-hcd: use dynamic allocation for platform_devices

This patch (as1075) changes dummy-hcd to dynamically allocate its
platform_device structures, using the core platform_device_alloc()
interface.  This is what it should have done all along, because the
dynamically-allocated structures have a release method in the driver
core and are therefore immune to being released after the module has
been unloaded.

Thanks to Richard Purdie for pointing out the need for this change.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: gadget section fixes
David Brownell [Sat, 5 Apr 2008 21:17:14 +0000 (14:17 -0700)]
USB: gadget section fixes

Restore some section annotations:  they were switched to "__devinit"
while they should have been "__init", because of bogus warnings.  The
warnings are now fixed, so the runtime footprint of various drivers
can now shrink a bit.  On ARMv5, it's about 600 bytes except for the
Ethernet gadget, where it can save a bit more.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: rework sysfs removal of interface files
Alan Stern [Sat, 5 Apr 2008 03:46:59 +0000 (23:46 -0400)]
USB: rework sysfs removal of interface files

Removing an interface's sysfs files before unregistering the interface
doesn't work properly, because usb_unbind_interface() will reinstall
altsetting 0 and thereby create new sysfs files.  This patch (as1074)
removes the files after the unregistration is finished.  It's not
quite as clean, but at least it works.

Also, there's no need to check if an interface has been registered
before removing its sysfs files.  If it hasn't been registered then
the files won't have been created, so usb_remove_sysfs_intf_files()
will simply do nothing.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: replace remaining __PRETTY_FUNCTION__ occurrences
Harvey Harrison [Fri, 4 Apr 2008 21:28:01 +0000 (14:28 -0700)]
usb: replace remaining __PRETTY_FUNCTION__ occurrences

The kernel is written in C, not C++, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: OHCI: host-controller resumes leave root hub suspended
Alan Stern [Thu, 3 Apr 2008 22:03:17 +0000 (18:03 -0400)]
USB: OHCI: host-controller resumes leave root hub suspended

Drivers in the ohci-hcd family should perform certain tasks whenever
their controller device is resumed.  These include checking for loss
of power during suspend, turning on port power, and enabling interrupt
requests.

Until now these jobs have been carried out when the root hub is
resumed, not when the controller is.  Many drivers work around the
resulting awkwardness by automatically resuming their root hub
whenever the controller is resumed.  But this is wasteful and
unnecessary.

To simplify the situation, this patch (as1066) adds a new core
routine, ohci_finish_controller_resume(), which can be used by all the
OHCI-variant drivers.  They can call the new routine instead of
resuming their root hubs.  And ohci-pci.c can call it instead of using
its own special-purpose handler.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: clarify usage of hcd->suspend/resume methods
Alan Stern [Thu, 3 Apr 2008 22:03:06 +0000 (18:03 -0400)]
USB: clarify usage of hcd->suspend/resume methods

The .suspend and .resume method pointers in struct usb_hcd have not
been fully understood by host-controller driver writers.  They are
meant for use with PCI controllers; other platform-specific drivers
generally should not refer to them.

To try and clarify matters, this patch (as1065) renames those methods
to .pci_suspend and .pci_resume.  It eliminates corresponding dead code
and bogus references in the ohci-ssb and u132-hcd drivers.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: root hubs don't lie about their number of TTs
Alan Stern [Thu, 3 Apr 2008 22:02:56 +0000 (18:02 -0400)]
USB: root hubs don't lie about their number of TTs

Currently EHCI root hubs enumerate with a bDeviceProtocol code
indicating that they possess a Transaction Translator.  However the
vast majority of controllers do not; they rely on a companion
controller to handle full- and low-speed communications.  This patch
(as1064) changes the root-hub device descriptor to match the actual
situation.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: convert away from urb->status in xpad driver
Oliver Neukum [Thu, 3 Apr 2008 19:40:59 +0000 (21:40 +0200)]
USB: convert away from urb->status in xpad driver

USB is moving to transfering status as a parameter. To ease the transition
urb->status is to be touched only once in a function. The xpad driver has
been overlooked. Dmitry wants this to go through the USB tree.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: OHCI: fix bug in controller resume
Alan Stern [Thu, 3 Apr 2008 15:35:26 +0000 (11:35 -0400)]
USB: OHCI: fix bug in controller resume

This patch (as1063) fixes a bug in the way ohci-hcd resumes its
controllers.  It leaves the Master Interrupt Enable bit turned off.

If the root hub is resumed immediately this won't matter.  But if the
root hub is suspended (say because no devices are plugged in), it won't
ever wake up by itself.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: David Brownell <david-b@pacbell.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: gadget: dummy_hcd.c: fix nested switch statements
Ingo van Lil [Fri, 28 Mar 2008 21:50:26 +0000 (14:50 -0700)]
USB: gadget: dummy_hcd.c: fix nested switch statements

Fix a messed up combination of two nested switch statements in
drivers/usb/gadget/dummy_hcd.c.

According to the USB spec (section 5.8.3) the maximum packet size for bulk
endpoints can be 512 for high-speed devices and 8, 16, 32 or 64 for full-speed
devices.  Low-speed devices must not have bulk endpoints.

Signed-off-by: Ingo van Lil <inguin@gmx.de>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: mem leak fixes for AMD 5536 UDC high/full speed USB device controller driver
Jesper Juhl [Fri, 28 Mar 2008 21:50:27 +0000 (14:50 -0700)]
USB: mem leak fixes for AMD 5536 UDC high/full speed USB device controller driver

In drivers/usb/gadget/amd5536udc.c::udc_pci_probe(), sizeof(struct udc)
storage is allocated for 'dev'.

There are many exit points from the function where 'dev' is not free'd but has
also not yet been used for anything.  The following patch free's 'dev' at the
return points where it has not yet been used.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: usb-storage: use adaptive DMA mask
Alan Stern [Thu, 27 Mar 2008 18:52:57 +0000 (14:52 -0400)]
USB: usb-storage: use adaptive DMA mask

This patch (as1060) makes usb-storage set the DMA alignment mask for
SCSI slaves to match the maxpacket size of the bulk-IN endpoint,
rather than always setting it to 511.  For full-speed devices that
mask is too restrictive, and wireless USB devices can have maxpacket
sizes larger than 512.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: g_printer bugfixes
Craig W. Nadler [Thu, 20 Mar 2008 21:46:26 +0000 (14:46 -0700)]
USB: g_printer bugfixes

G_PRINTER: Bug fix for blocking reads and a fix for a memory leak.

This fixes bugs in blocking IO calls. When the poll() entry point
is called receive transfers will be setup if they have not already
been. Another bug fix is that the poll() entry point now checks the
current receive buffer for data when reporting if any data had been
received. A memory leak was fixed that could have occurred when a
USB reset happened.

Signed-off-by: Craig W. Nadler <craig@nadler.us>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: test for NULL return from platform_get_resource() in ohci_hcd_sm501_drv_remove()
Jesper Juhl [Fri, 21 Mar 2008 21:55:45 +0000 (22:55 +0100)]
USB: test for NULL return from platform_get_resource() in ohci_hcd_sm501_drv_remove()

platform_get_resource() may return null, so although it seems it will never
do so here unless there's a bug elsewhere, it does no harm to be defensive
and test.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: serial: Remove obsolete contact addresses
Matti Linnanvuori [Sun, 23 Mar 2008 11:08:01 +0000 (04:08 -0700)]
USB: serial: Remove obsolete contact addresses

Remove obsolete contact addresses.

Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix comments of 2 functions in hcd.c
Ming Lei [Sun, 23 Mar 2008 12:58:28 +0000 (20:58 +0800)]
USB: fix comments of 2 functions in hcd.c

Remove useless @type note for rh_string() and @r note for usb_hcd_irq()
since this two parameters were removed.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: u132-hcd driver: semaphore to mutex
Daniel Walker [Sun, 23 Mar 2008 07:00:02 +0000 (00:00 -0700)]
usb: u132-hcd driver: semaphore to mutex

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: u132-hcd driver style clean up
Daniel Walker [Sun, 23 Mar 2008 07:00:01 +0000 (00:00 -0700)]
usb: u132-hcd driver style clean up

I was converting a semaphore in this file to a mutex when I noticed that
this file has some fairly rampant style problems. Practically every line
has spaces instead of tabs .. Once I cleared that up, checkpatch.pl showed
a number of other problem.. I think this file might be a good one to review
for new style checks that could be added..

Below are the only two remaining which I didn't remove.

#5083: FILE: drivers/usb/host/u132-hcd.c:2907:
+               error:

WARNING: labels should not be indented
#5087: FILE: drivers/usb/host/u132-hcd.c:2911:
+               stall:

These labels are actually inside a switch statement, and they are right
under "default:". "default:" appears to be exempt and these other label
should be too, or default shouldn't be exempt.

I also deleted a few lines due to single statements inside { } ,

if (is_error()) {
return;
}

becomes,

if (is_error())
return;

with one line deleted.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: add usb-serial spcp8x5 driver
Greg Kroah-Hartman [Thu, 7 Feb 2008 22:59:03 +0000 (23:59 +0100)]
USB: add usb-serial spcp8x5 driver

Original version of the driver done by Linxb, changes by Harald, and
lots of cleanups by me in order to get it into a mergable state.

Cc: Linxb <xubin.lin@worldplus.com.cn>
Cc: Harald Klein <hari@vt100.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb/usb-serial-sierra-add-new-dev-group
Kevin Lloyd [Wed, 2 Apr 2008 18:24:56 +0000 (11:24 -0700)]
usb/usb-serial-sierra-add-new-dev-group

This patch is for the sierra driver and adds support for a new group of
devices that have a new USB configuration.
This targets kernel 2.6.25-rc7

Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Serial: Sierra: C597 fix
Kevin Lloyd [Mon, 31 Mar 2008 17:20:54 +0000 (10:20 -0700)]
USB: Serial: Sierra: C597 fix

This patch is for the sierra driver and fixes a Compass 597 bug that
allows users to access the SD-Card.

This targets kernel 2.6.25-rc7

Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Serial: Sierra: Clean up
Kevin Lloyd [Fri, 28 Mar 2008 17:05:08 +0000 (10:05 -0700)]
USB: Serial: Sierra: Clean up

This patch cleans up some of the sierra driver code. Please package this
with the other patches in this group as I would like the driver version
to reflect their changes as well.

Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: increase cdc-acm write throughput
David Engraf [Thu, 20 Mar 2008 09:01:34 +0000 (10:01 +0100)]
USB: increase cdc-acm write throughput

the following patch uses 16 write urbs and a writsize of wMaxPacketSize
* 20.  With this patch I get the maximum througput from my linux system
with 20MB/sec read and 15 MB/sec write (full speed 1 MB/sec both)

I also deleted the flag URB_NO_FSBR for the writeurbs, because this
makes my full speed devices significant slower.

Signed-off-by: David Engraf <david.engraf@netcom.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: cdc-acm tell tty layer not to split things up.
David Engraf [Thu, 20 Mar 2008 09:53:52 +0000 (10:53 +0100)]
USB: cdc-acm tell tty layer not to split things up.

It ensures that the tty level do not split
the send buffer into 2KB blocks.

Signed-off-by: David Engraf <david.engraf@netcom.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousbmon: restore mmap
Pete Zaitcev [Thu, 20 Mar 2008 05:29:51 +0000 (22:29 -0700)]
usbmon: restore mmap

Paolo asked to enable the mmap. I kept it off because I'm do not
entirely understand how it workse these days after ->nopage etc.
But it seems like working somewhat at least.

Signed-Off-By: Pete Zaitcev <zaitcev@gmail.com>
Cc: Paolo Abeni <paolo.abeni@email.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Fix "cut and paste" booboo in usbmon Makefile.
Robert P. J. Day [Sun, 9 Mar 2008 17:55:01 +0000 (13:55 -0400)]
USB: Fix "cut and paste" booboo in usbmon Makefile.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Remove EXPERIMENTAL designation from USB_EHCI_ROOT_HUB_TT.
Robert P. J. Day [Sat, 8 Mar 2008 08:27:44 +0000 (03:27 -0500)]
USB: Remove EXPERIMENTAL designation from USB_EHCI_ROOT_HUB_TT.

According to David Brownell, this feature doesn't require an
experimental designation any longer.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Remove EXPERIMENTAL from dynamic USB minor allocation.
Robert P. J. Day [Sat, 8 Mar 2008 08:12:44 +0000 (03:12 -0500)]
USB: Remove EXPERIMENTAL from dynamic USB minor allocation.

Since this USB feature seems non-experimental, remove that dependency.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Remove EXPERIMENTAL designation from USB MDC800 support.
Robert P. J. Day [Sat, 8 Mar 2008 08:04:05 +0000 (03:04 -0500)]
USB: Remove EXPERIMENTAL designation from USB MDC800 support.

Since support for the USB Mustek MDC800 Digital Camera has apparently
been around since the beginning of the git repository, it's safe to
assume it's no longer experimental.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Remove EXPERIMENTAL designation from USB serial/ Kconfig entries
Robert P. J. Day [Sat, 8 Mar 2008 08:00:04 +0000 (03:00 -0500)]
USB: Remove EXPERIMENTAL designation from USB serial/ Kconfig entries

Since nothing under the USB serial/ directory seems to be obviously
experimental, remove the EXPERIMENTAL dependency from all of those
Kconfig entries.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Remove EXPERIMENTAL designation from USB misc/ Kconfig entries
Robert P. J. Day [Sat, 8 Mar 2008 07:46:57 +0000 (02:46 -0500)]
USB: Remove EXPERIMENTAL designation from USB misc/ Kconfig entries

Since nothing under the USB misc/ seems to be obviously experimental,
remove the EXPERIMENTAL dependency from those Kconfig entries.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Remove EXPERIMENTAL tags from some USB gadget Kconfig entries.
Robert P. J. Day [Mon, 10 Mar 2008 19:09:51 +0000 (15:09 -0400)]
USB: Remove EXPERIMENTAL tags from some USB gadget Kconfig entries.

Based on a recent discussion on the Linux USB mailing list, remove the
designation of EXPERIMENTAL from some USB gadget entries, and tag some
of them as DEVELOPMENT.

just for fun, i added a bit of help for gadgetfs, explaining the
race condition.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
16 years agoUSB: Remove EXPERIMENTAL designation from USB storage Kconfig entries.
Robert P. J. Day [Sat, 8 Mar 2008 07:17:55 +0000 (02:17 -0500)]
USB: Remove EXPERIMENTAL designation from USB storage Kconfig entries.

Since there seems to be little reason to mark the current USB storage
features as "EXPERIMENTAL," remove that dependency.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: mass storage: emulation of sat scsi_pass_thru with ATACB
matthieu castet [Wed, 19 Mar 2008 18:40:52 +0000 (19:40 +0100)]
USB: mass storage: emulation of sat scsi_pass_thru with ATACB

I have got a cypress usb-ide bridge and I would like to tune or monitor
my disk with tools like hdparm, hddtemp or smartctl.

My controller support a way to send raw ATA command to the disk with
something call atacb (see
http://download.cypress.com.edgesuite.net/design_resources/datasheets/contents/cy7c68300c_8.pdf).

Atacb support can be added for each application, but there is some disadvantages :
- all application need to be patched
- A race is possible if there other accesses, because the emulation can
be split in 2 atacb scsi transactions. One for sending the command, one
for reading the register (if ck_cond is set).

I have implemented the emulation in usb-storage with a special proto_handler,
and an unsual entry.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Standardize inclusion protection and add where missing.
Robert P. J. Day [Fri, 7 Mar 2008 18:45:32 +0000 (13:45 -0500)]
USB: Standardize inclusion protection and add where missing.

For the header files in include/linux/usb, add missing multiple
inclusion protection and standardize what's already there.  The
apparent standards:

  * macro name of __LINUX_USB_headerfile_H
  * inclusion protection placed after leading comment block
  * macro name added as a comment on the final #endif
  * any obvious trivial whitespace cleanup associated with the above

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: usb.h: reduce syslog clutter [v3]
Tilman Schmidt [Thu, 13 Mar 2008 18:51:42 +0000 (19:51 +0100)]
USB: usb.h: reduce syslog clutter [v3]

The the err() / info() / warn() macros in usb.h inserted __FILE__ at
the beginning of the message, which expands to the complete pathname
of the source file within the kernel tree, frequently taking up half
of an 80 character screen line before the actual message even begins.
Use the module name instead.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodrivers/usb/core/devio.c: suppress warning with 64k PAGE_SIZE
Andrew Morton [Wed, 12 Mar 2008 20:32:24 +0000 (13:32 -0700)]
drivers/usb/core/devio.c: suppress warning with 64k PAGE_SIZE

drivers/usb/core/devio.c: In function 'proc_control':
drivers/usb/core/devio.c:657: warning: comparison is always false due to limited range of data type

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: cypress_m8: Speed handling
Alan Cox [Mon, 10 Mar 2008 21:59:28 +0000 (21:59 +0000)]
USB: cypress_m8: Speed handling

The recent changes to this driver cleaned it up a lot, follow that up
by sorting the speed side of things out as well

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ehci: paranoia, reject large control transfers
David Brownell [Tue, 4 Mar 2008 23:11:07 +0000 (15:11 -0800)]
USB: ehci: paranoia, reject large control transfers

Some EHCI fault paths with large control transfers aren't coded.  Avoid
problems by rejecting transfers that may need two qTDs (16+ KB).  This is
mostly paranoia; even 4 KB transfers are rare, and most HCDs use lower
limits (so it's unlikely anyone would ever try such a thing).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: remove dev->power.power_state
Alan Stern [Thu, 6 Mar 2008 22:00:58 +0000 (17:00 -0500)]
USB: remove dev->power.power_state

power.power_state is scheduled for removal.  This patch (as1053)
removes all uses of that field from drivers/usb.  Almost all of them
were write-only, the most significant exceptions being sl811-hcd.c and
u132-hcd.c.

Part of this patch was written by Pavel Machek.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ipaq: fix devices having more than one endpoint
Matthias Geissert [Thu, 6 Mar 2008 21:00:33 +0000 (22:00 +0100)]
USB: ipaq: fix devices having more than one endpoint

The ipaq module  supports devices with one endpoint only. Some devices,
e.g. Yakumo Delta 300, have more than one endpoint.

This patch fixes support for devices having up to 2 endpoints which used
to work on older kernel versions.

Signed-off-by: Matthias Geissert <matthias.geissert@web.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ehci: remove obsolete workaround for bogus IRQs
David Brownell [Thu, 6 Mar 2008 07:37:52 +0000 (23:37 -0800)]
USB: ehci: remove obsolete workaround for bogus IRQs

It was pointed out that we found and fixed the cause of the "bogus"
fatal IRQ reports some time ago ... this patch removes the code
which was working around that bug ("status" got clobbered), and a
comment which needlessly confused folk reading this code.

This also includes a minor cleanup to the code which fixed that bug.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: partial USB embedded host support
Robin Getz [Thu, 6 Mar 2008 07:17:38 +0000 (23:17 -0800)]
USB: partial USB embedded host support

This provides better support for USB "Embedded Host" functionality, which
is a subset of the USB OTG options:

 * External hub support can be disabled;

 * USB peripherals not whitelisted in "otg_whitelist.h" will be rejected
   during enumeration.

These options can allow some savings in software and support.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: io_ti.c: remove unneeded null tty check
Ray Lee [Tue, 4 Mar 2008 23:25:12 +0000 (15:25 -0800)]
USB: io_ti.c: remove unneeded null tty check

The Coverity checker (and Adrian Bunk) spotted an inconsistent NULL check of
port->tty (it's blindly dereferenced later without the check).

Alan Cox confirmed the check can go.

Signed-off-by: Ray Lee <ray-lk@madrabbit.org>
Cc: Adrian Bunk <bunk@kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: use DIV_ROUND_UP
Julia Lawall [Tue, 4 Mar 2008 23:25:11 +0000 (15:25 -0800)]
USB: use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

An extract of the semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: io_ti: lock mcr and msr shadows properly
Alan Cox [Wed, 20 Feb 2008 21:38:32 +0000 (21:38 +0000)]
USB: io_ti: lock mcr and msr shadows properly

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ti_usb_3410_5052: Extend locking to msr and shadow mcr
Alan Cox [Wed, 20 Feb 2008 21:41:40 +0000 (21:41 +0000)]
USB: ti_usb_3410_5052: Extend locking to msr and shadow mcr

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: kobil_sct: Get rid of unneeded priv->line_state
Alan Cox [Wed, 20 Feb 2008 21:40:34 +0000 (21:40 +0000)]
USB: kobil_sct: Get rid of unneeded priv->line_state

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: iuu_phoenix: lock priv->tiostatus properly
Alan Cox [Wed, 20 Feb 2008 21:39:25 +0000 (21:39 +0000)]
USB: iuu_phoenix: lock priv->tiostatus properly

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: serial: Note mos7480 and option don't lock modem status
Alan Cox [Wed, 20 Feb 2008 20:51:45 +0000 (20:51 +0000)]
USB: serial: Note mos7480 and option don't lock modem status

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ftdi_sio: Note missing locking
Alan Cox [Wed, 20 Feb 2008 20:49:53 +0000 (20:49 +0000)]
USB: ftdi_sio: Note missing locking

The ftdi_sio driver has no internal locking on the dtr/rts state. Flag
that up for someone to fix.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: usb-serial: Prepare for BKL push down
Alan Cox [Wed, 20 Feb 2008 20:47:56 +0000 (20:47 +0000)]
USB: usb-serial: Prepare for BKL push down

Take the lock in usb-serial instead. As it relies on the BKL internally
we can't push it any deeper yet.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: minor ehci xITD simplifications
Karsten Wiese [Tue, 19 Feb 2008 20:31:49 +0000 (12:31 -0800)]
USB: minor ehci xITD simplifications

Remove two (or one) conditional tests in per-urb isochronous
transfer setup code paths.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: auerswald: Convert ccp->mutex in a mutex
matthias@kaehlcke.net [Mon, 18 Feb 2008 19:45:36 +0000 (20:45 +0100)]
USB: auerswald: Convert ccp->mutex in a mutex

The semaphore ccp->mutex is used as mutex, convert it to the mutex API

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Cc: Wolfgang Mües <wolfgang@iksw-muees.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: auerswald: Convert ccp->readmutex in a mutex
matthias@kaehlcke.net [Mon, 18 Feb 2008 19:45:35 +0000 (20:45 +0100)]
USB: auerswald: Convert ccp->readmutex in a mutex

The semaphore ccp->readmutex is used as mutex, convert it to the mutex API

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Cc: Wolfgang Mües <wolfgang@iksw-muees.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: auerswald: Convert stats_sem in a mutex
matthias@kaehlcke.net [Mon, 18 Feb 2008 19:45:34 +0000 (20:45 +0100)]
USB: auerswald: Convert stats_sem in a mutex

The semaphore cp->mutex is used as mutex, convert it to the mutex API

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Cc: Wolfgang Mües <wolfgang@iksw-muees.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: cypress_m8: Limit baud rate to <=4800 for USB low speed devices
Mike Isely [Mon, 11 Feb 2008 02:23:32 +0000 (20:23 -0600)]
USB: cypress_m8: Limit baud rate to <=4800 for USB low speed devices

The cypress app note for the M8 states that for the USB low speed
version of the part, throughput is effectively limited to 800
bytes/sec.  So if we were to try a faster baud rate in such cases then
we risk overrun errors on receive.  Best to just identify this case
and limit the rate to 4800 baud or less (by ignoring any request to
set a faster rate).  The old baud rate setting code was somewhat
fragile; this change also hopefully makes it easier in the future to
better checking / limiting.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: cypress_m8: Get rid of pointless NULL check
Mike Isely [Mon, 11 Feb 2008 02:23:28 +0000 (20:23 -0600)]
USB: cypress_m8: Get rid of pointless NULL check

Remove a NULL check in cypress_m8; the check is useless in this
context because it is referenced earlier in the same code path thus
the kernel would be oops'ed before reaching this point anyway.  (And
it's really pointless here anyway; if this pointer somehow is NULL the
driver is going to have serious problems in many other places.)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: cypress_m8: Don't issue GET_CONFIG for certain devices
Mike Isely [Mon, 11 Feb 2008 02:23:24 +0000 (20:23 -0600)]
USB: cypress_m8: Don't issue GET_CONFIG for certain devices

Earthmate LT-20 devices (both "old" and "new" versions) can't tolerate
a GET_CONFIG command.  The original Earthmate has no trouble with
this.  Presumably other non-Earthmate devices are still OK as well.
This change disables the use of GET_CONFIG for cases where it is known
not to work.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: cypress_m8: Packet format is separate from characteristic size
Mike Isely [Mon, 11 Feb 2008 02:23:19 +0000 (20:23 -0600)]
USB: cypress_m8: Packet format is separate from characteristic size

cypress_m8: Packet format is separate from characteristic size

The Cypress app note states that when using an 8 byte packet buffer
size that the packet format is modified (to be more compact).  However
I have since discovered that newer DeLorme Earthmate LT-20 devices
(those that are low speed USB with 8 byte packet size) STILL use the
format that is really supposed to correspond to 32 byte packets.
Further confusing things is the subsequent discovery that there are
actually two different types of LT-20 - older LT-20's use 32 byte
packets which is probably why this issue wasn't originally
encountered.  The solution here is to flag the packet format
separately from the buffer size.  Then at initialization time,
identify the correct combination and set it up.  This is a critical
fix for anyone with a newer LT-20.  Older devices and non-Earthmate
devices should remain unaffected by this change.  (If other devices
behave in this, uh, unexpected manner, it's now just a simple 1 line
change to fix them as well (change the pkt_fmt member for that
device).  Default behavior with this patch is still to drive the
format as per the app-note; of course for Earthmate devices this is
overridden.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: cypress_m8: Feature buffer fixes
Mike Isely [Mon, 11 Feb 2008 02:23:14 +0000 (20:23 -0600)]
USB: cypress_m8: Feature buffer fixes

cypress_m8: Feature buffer fixes

From: Mike Isely <isely@pobox.com>

Don't hardcode the feature buffer size; use sizeof() instead.  That
way we can easily specify the size in a single spot.  Speaking of the
feature buffer size, the Cypress app note (and further testing with a
DeLorme Earthmate) suggests that this size should be 5 not 8 bytes.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: io_ti.c: remove pointless eye-candy in debug statements
Andrew Morton [Tue, 5 Feb 2008 07:57:50 +0000 (23:57 -0800)]
USB: io_ti.c: remove pointless eye-candy in debug statements

These strings always come up as false positives whenever I'm doing
git-conflict fixups (ie: about 1000 times/day).

I don't think the zillion "<" and ">" characters are very useful and removing
them makes my life that little bit easier.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: gadget: Hangup tty on g_serial disconnect
Savin Zlobec [Fri, 15 Feb 2008 12:42:01 +0000 (13:42 +0100)]
USB: gadget: Hangup tty on g_serial disconnect

On USB cable disconnect g_serial doesn't hangup the port tty,
which results in an endless read on the tty device. With the
following patch the read and select behave correctly when
the cable is unplugged.

Tested on at91rm9200

Signed-off-by: Savin Zlobec <savin@epiko.si>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: EHCI: Refactor "if (handshake()) state = HC_STATE_HALT"
Karsten Wiese [Sat, 16 Feb 2008 21:44:42 +0000 (13:44 -0800)]
USB: EHCI: Refactor "if (handshake()) state = HC_STATE_HALT"

Refactor the EHCI "if (handshake()) state = HC_STATE_HALT" idiom,
which appears 4 times, by replacing it with calls to a new function
called handshake_on_error_set_halt().  Saves a few bytes too.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: m66592-udc: reduce size of data structure.
Paul Mundt [Wed, 13 Feb 2008 08:02:33 +0000 (17:02 +0900)]
USB: m66592-udc: reduce size of data structure.

Poking around with pahole, we see that m66592 handily shoves a u16 in
between larger types on 2 separate occasions leaving us with 2 2-byte
holes:

struct m66592 {
...

/* size: 1196, cachelines: 38 */
/* sum members: 1192, holes: 2, sum holes: 4 */
/* last cacheline: 12 bytes */
}; /* definitions: 1 */

Pairing them gets back 4-bytes:

struct m66592 {
...

/* size: 1192, cachelines: 38 */
/* last cacheline: 8 bytes */
}; /* definitions: 1 */

Unfortunately it's not enough to save a cacheline with this massive
structure, but every byte helps.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ehci minor SOC bus glue fixes
David Brownell [Tue, 12 Feb 2008 02:40:46 +0000 (18:40 -0800)]
USB: ehci minor SOC bus glue fixes

Various minor fixes to some SOC bus glue for EHCI:

 - Remove a bogus copyright (by "me"!) which someone added to the FSL
   driver, and an irrelevant comment.

 - Un-break MODULE_ALIAS() directives after platform_bus hotplugging
   acquired a backwards-incompatible change.  (Which didn't fix ANY
   of the in-tree drivers it prevented from hotplugging -- sigh.)

 - Remove some bogus assignments of platform_bus_type; that's done by
   the platform_bus code.

 - Add some FIXMEs for drivers with that pointless two-level idiom for
   probe() and remove() routines.  ("Obfuscation" is a non-goal.)
   That should help avoid future bus glue which copies that idiom.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ehci tolerates some buggy devices
David Brownell [Fri, 8 Feb 2008 23:08:44 +0000 (15:08 -0800)]
USB: ehci tolerates some buggy devices

This teaches EHCI how to to work around bugs in certain high speed
devices, by accomodating "bulk" packets that exceed the 512 byte
constant value required by the USB 2.0 specification.  (Have a
look at section 5.8.3, paragraphs 1 and 3.)

It also makes the descriptor parsing code warn when it encounters
such bugs.  (We've had reports of maybe two or three such devices,
all pretty recent.)

Such devices are nonconformant.  The proper fix is have the vendors
of those devices do the simple, obvious, and correct thing ... which
will let them be used with USB hosts that don't have workarounds for
this particular vendor bug.  But unless/until they do, we can at least
have one of the high speed HCDs work with such buggy devices.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ohci: port reset paranoia timeout
David Brownell [Sat, 2 Feb 2008 10:42:52 +0000 (02:42 -0800)]
USB: ohci: port reset paranoia timeout

This limits how long the OHCI port reset loop waits for the hardware
to do its job, if the controller either (a) dies, or (b) can't finish
the reset.  Such limits are always a good idea.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ehci: minor cleanups
David Brownell [Fri, 1 Feb 2008 19:42:05 +0000 (11:42 -0800)]
USB: ehci: minor cleanups

Minor cleanups to the EHCI code:  revision history is what source
code repositories should have.  Switch to a more standard way to
kick in verbose debugging -- don't be EHCI-specific.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: defines for USB "Link Power Management" (LPM) ECN
David Brownell [Sun, 10 Feb 2008 20:24:00 +0000 (12:24 -0800)]
USB: defines for USB "Link Power Management" (LPM) ECN

There's a new PM-related change notice for the USB 2.0 specification
called "Link Power Management" (LPM).  It defines a new "L1 Suspend"
state which resembles the current (L2) suspend state, except that it
can be entered and exited much more quickly.  It should thus be more
useful for runtime PM, even though it doesn't mandate reduced power
draw from VBUS.

This patch provides the relevant #defines for usbcore.  Actually
implementing these mechanisms requires host silicon that can generate
new USB packets, plus hubs handling some new requests and peripherals
which understand the new packets.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: usbatm: convert heavy init dances to kthread API
Pavel Emelyanov [Mon, 11 Feb 2008 12:26:09 +0000 (15:26 +0300)]
USB: usbatm: convert heavy init dances to kthread API

This is an attempt to kill two birds with one stone.

First, we kill one more user of kernel_thread, which is scheduled
for removal. Second - we kill one of the last users of kill_proc -
the function which is also to be removed, because it uses a pid_t
which is not safe now.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: usb-ohci-sm501-driver: use the conventional convention for suspend and resume
Andrew Morton [Tue, 5 Feb 2008 07:57:48 +0000 (23:57 -0800)]
USB: usb-ohci-sm501-driver: use the conventional convention for suspend and resume

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: make USB_STORAGE_ONETOUCH available with PM
Adrian Bunk [Tue, 5 Feb 2008 07:57:45 +0000 (23:57 -0800)]
USB: make USB_STORAGE_ONETOUCH available with PM

As Torsten Kaiser pointed out, it seems the dependency of
USB_STORAGE_ONETOUCH on !PM should have been removed in commit
7931e1c6f8007d5fef8a0bb2dc71bd97315eeae9.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Torsten Kaiser <just.for.lkml@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: libusual: locking cleanup
Daniel Walker [Tue, 5 Feb 2008 07:57:42 +0000 (23:57 -0800)]
USB: libusual: locking cleanup

I converted the usu_init_notify semaphore to normal mutex usage, and it
should still prevent the request_module before the init routine is
complete.  Before it acted more like a complete, now the mutex protects two
distinct section from running at the same time.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: microtek: remove unused semaphore
Daniel Walker [Tue, 5 Feb 2008 07:57:42 +0000 (23:57 -0800)]
USB: microtek: remove unused semaphore

No current references, so removing it.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: convert usb.h struct usb_device to kernel-doc
Randy Dunlap [Thu, 14 Feb 2008 02:33:15 +0000 (18:33 -0800)]
USB: convert usb.h struct usb_device to kernel-doc

Convert struct usb_device to use kernel-doc notation.
Please especially check the @filelist and @usb_classdev descriptions.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: add USB_DT_CS_RADIO_CONTROL define to ch9.h
Greg Kroah-Hartman [Tue, 8 Apr 2008 20:24:46 +0000 (13:24 -0700)]
USB: add USB_DT_CS_RADIO_CONTROL define to ch9.h

This is needed by the wireless usb developers, and is part of the USB spec.

Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agocheckpatch: usb_free_urb() can take NULL
Greg Kroah-Hartman [Mon, 14 Apr 2008 21:17:29 +0000 (14:17 -0700)]
checkpatch: usb_free_urb() can take NULL

usb_free_urb() can take a NULL, so let's check and warn about that.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: enable USB-PERSIST by default
Alan Stern [Thu, 6 Mar 2008 16:04:13 +0000 (11:04 -0500)]
USB: enable USB-PERSIST by default

This patch (as1052) enables USB-PERSIST for all devices by default.
The user won't have to remember to enable it explicitly for devices
containing mounted filesystems.

Eventually userspace tools like hal may be able to set the persist
attribute automatically when a filesystem is mounted on a USB device.
When that time comes this patch can be reverted, if people think it
matters.

This approach has the advantage of giving the user the ability to turn
off USB-PERSIST for devices with mounted filesystems, rather than
making the kernel always assume it should be on.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: check serial-number string after device reset
Alan Stern [Mon, 3 Mar 2008 20:16:04 +0000 (15:16 -0500)]
USB: check serial-number string after device reset

This patch (as1048) extends the descriptor checking after a device is
reset.  Now the SerialNumber string descriptor is compared to its old
value, in addition to the device and configuration descriptors.

As a consequence, the kmalloc() call in usb_string() is now on the
error-handling pathway for usb-storage.  Hence its allocation type is
changed to GFO_NOIO.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: remove CONFIG_USB_PERSIST setting
Alan Stern [Mon, 3 Mar 2008 20:15:59 +0000 (15:15 -0500)]
USB: remove CONFIG_USB_PERSIST setting

This patch (as1047) removes the USB_PERSIST Kconfig option, enabling
it permanently.  It also prevents the power/persist attribute from
being created for hub devices; there's no point in having it since
USB-PERSIST is always turned on for hubs.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: make USB-PERSIST work after every system sleep
Alan Stern [Mon, 3 Mar 2008 20:15:51 +0000 (15:15 -0500)]
USB: make USB-PERSIST work after every system sleep

This patch (as1046) makes USB-PERSIST work more in accordance with
the documentation.  Currently it takes effect only in cases where the
root hub has lost power or been reset, but it is supposed to operate
whenever a power session was dropped during a system sleep.

A new hub_restart() routine carries out the duties required during a
reset or a reset-resume.  It checks to see whether occupied ports are
still enabled, and if they aren't then it clears the enable-change and
connect-change features (to prevent interference by khubd) and sets
the child device's reset_resume flag.  It also checks ports that are
supposed to be unoccupied to verify that the firmware hasn't left the
port in an enabled state.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: reorganize code in hub.c
Alan Stern [Mon, 3 Mar 2008 20:15:43 +0000 (15:15 -0500)]
USB: reorganize code in hub.c

This patch (as1045) reorganizes some code in the hub driver.
hub_port_status() is moved earlier in the file, and a new hub_stop()
routine is created to do the work currently in hub_preset() (i.e.,
disconnect all child devices and quiesce the hub).

There are no functional changes.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: EHCI: carry out port handover during each root-hub resume
Alan Stern [Mon, 3 Mar 2008 20:15:36 +0000 (15:15 -0500)]
USB: EHCI: carry out port handover during each root-hub resume

This patch (as1044) causes EHCI port handover for non-high-speed
devices to occur during every root-hub resume, not just in cases where
the controller lost power or was reset.  This is necessary because:

When some machines go into suspend, they remove power from
on-board USB devices while retaining suspend current for USB
controllers.

The user might well unplug a USB device while the system is
suspended and then plug it back in before resuming.

A corresponding change is made to the core resume routine; now
high-speed root hubs will always be resumed when the system wakes up,
even if they were suspended before the system went to sleep.  If this
weren't done then EHCI port handover wouldn't work, since it is called
when the EHCI root hub is resumed.

Finally, a comment is added to the hub driver explaining the khubd has
to be freezable; if it weren't frozen then it could interfere with
port handover.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Add HP hs2300 Broadband Wireless Module to sierra.c
Stefan Seyfried [Thu, 17 Apr 2008 05:47:34 +0000 (07:47 +0200)]
USB: Add HP hs2300 Broadband Wireless Module to sierra.c

Add the HP hs2300 Broadband Wireless Module (relabeled MC8775) USB IDs

Signed-off-by: Stefan Seyfried <seife@suse.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Fix memory leak in mon_stat_release
Ming Lei [Mon, 14 Apr 2008 13:27:00 +0000 (21:27 +0800)]
USB: Fix memory leak in mon_stat_release

Fix the leak of the snap structure allocated in mon_stat_open().

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: CP2101 Add new device IDs
Craig Shelley [Sat, 12 Apr 2008 15:15:54 +0000 (16:15 +0100)]
USB: CP2101 Add new device IDs

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
Linus Torvalds [Thu, 24 Apr 2008 21:41:20 +0000 (14:41 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes:
  "make namespacecheck" fixes
  x86: fix compilation error in VisWS
  x86: voyager fix
  x86: Drop duplicate from setup.c
  intel-iommu.c: dma ops fix

16 years ago"make namespacecheck" fixes
Ingo Molnar [Wed, 23 Apr 2008 11:20:56 +0000 (13:20 +0200)]
"make namespacecheck" fixes

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix compilation error in VisWS
Alexey Starikovskiy [Mon, 21 Apr 2008 09:32:01 +0000 (13:32 +0400)]
x86: fix compilation error in VisWS

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: voyager fix
Ingo Molnar [Mon, 21 Apr 2008 11:39:53 +0000 (13:39 +0200)]
x86: voyager fix

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: Drop duplicate from setup.c
Alexey Starikovskiy [Mon, 21 Apr 2008 09:31:55 +0000 (13:31 +0400)]
x86: Drop duplicate from setup.c

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agointel-iommu.c: dma ops fix
Ingo Molnar [Tue, 22 Apr 2008 09:09:04 +0000 (11:09 +0200)]
intel-iommu.c: dma ops fix

Stephen Rothwell noticed that:

Commit 2be621498d461b63ca6124f86e3b9582e1a8e722 ("x86: dma-ops on highmem
fix") in Linus' tree introduced a new warning (noticed in the x86_64
allmodconfig build of linux-next):

drivers/pci/intel-iommu.c:2240: warning: initialization from incompatible pointer type

Which points at an instance of map_single that needs updating.

Fix it to the new prototype.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Thu, 24 Apr 2008 20:47:31 +0000 (13:47 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Fix typo in previous commit
  [CIFS] Fix define for new proxy cap to match documentation
  [CIFS] Fix UNC path prefix on QueryUnixPathInfo to have correct slash
  [CIFS] Reserve new proxy cap for WAFS
  [CIFS] Add various missing flags and defintions
  [CIFS] make cifs_dfs_automount_list_static
  [CIFS] Fix oops when slow oplock process races with unmount
  [CIFS] Fix acl length when very short ACL being modified by chmod
  [CIFS] Fix looping on reconnect to Samba when unexpected tree connect fail on reconnect
  [CIFS] minor update to change log

16 years agoRxRPC: Fix a regression in the RXKAD security module
David Howells [Thu, 24 Apr 2008 19:38:56 +0000 (20:38 +0100)]
RxRPC: Fix a regression in the RXKAD security module

Fix a regression in the RXKAD security module introduced in:

commit 91e916cffec7c0153c5cbaa447151862a7a9a047
Author: Al Viro <viro@ftp.linux.org.uk>
Date:   Sat Mar 29 03:08:38 2008 +0000

net/rxrpc trivial annotations

A variable was declared as a 16-bit type rather than a 32-bit type.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-with-apologies-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-of-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRemove -numa from EXTRAVERSION
Sebastian Siewior [Thu, 24 Apr 2008 19:32:28 +0000 (21:32 +0200)]
Remove -numa from EXTRAVERSION

This snuck in through 919ee677b656c52c5f86d3d916786891220d5452
("[SPARC64]: Add NUMA support")

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Thu, 24 Apr 2008 18:46:16 +0000 (11:46 -0700)]
Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (80 commits)
  SUNRPC: Invalidate the RPCSEC_GSS session if the server dropped the request
  make nfs_automount_list static
  NFS: remove duplicate flags assignment from nfs_validate_mount_data
  NFS - fix potential NULL pointer dereference v2
  SUNRPC: Don't change the RPCSEC_GSS context on a credential that is in use
  SUNRPC: Fix a race in gss_refresh_upcall()
  SUNRPC: Don't disconnect more than once if retransmitting NFSv4 requests
  SUNRPC: Remove the unused export of xprt_force_disconnect
  SUNRPC: remove XS_SENDMSG_RETRY
  SUNRPC: Protect creds against early garbage collection
  NFSv4: Attempt to use machine credentials in SETCLIENTID calls
  NFSv4: Reintroduce machine creds
  NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid()
  nfs: fix printout of multiword bitfields
  nfs: return negative error value from nfs{,4}_stat_to_errno
  NLM/lockd: Ensure client locking calls use correct credentials
  NFS: Remove the buggy lock-if-signalled case from do_setlk()
  NLM/lockd: Fix a race when cancelling a blocking lock
  NLM/lockd: Ensure that nlmclnt_cancel() returns results of the CANCEL call
  NLM: Remove the signal masking in nlmclnt_proc/nlmclnt_cancel
  ...

16 years agoMerge branch 'for-linus' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Thu, 24 Apr 2008 18:45:00 +0000 (11:45 -0700)]
Merge branch 'for-linus' of git://linux-nfs.org/~bfields/linux

* 'for-linus' of git://linux-nfs.org/~bfields/linux: (52 commits)
  knfsd: clear both setuid and setgid whenever a chown is done
  knfsd: get rid of imode variable in nfsd_setattr
  SUNRPC: Use unsigned loop and array index in svc_init_buffer()
  SUNRPC: Use unsigned index when looping over arrays
  SUNRPC: Update RPC server's TCP record marker decoder
  SUNRPC: RPC server still uses 2.4 method for disabling TCP Nagle
  NLM: don't let lockd exit on unexpected svc_recv errors (try #2)
  NFS: don't let nfs_callback_svc exit on unexpected svc_recv errors (try #2)
  Use a zero sized array for raw field in struct fid
  nfsd: use static memory for callback program and stats
  SUNRPC: remove svc_create_thread()
  nfsd: fix comment
  lockd: Fix stale nlmsvc_unlink_block comment
  NFSD: Strip __KERNEL__ testing from unexported header files.
  sunrpc: make token header values less confusing
  gss_krb5: consistently use unsigned for seqnum
  NFSD: Remove NFSv4 dependency on NFSv3
  SUNRPC: Remove PROC_FS dependency
  NFSD: Use "depends on" for PROC_FS dependency
  nfsd: move most of fh_verify to separate function
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Thu, 24 Apr 2008 18:21:08 +0000 (11:21 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (452 commits)
  V4L/DVB (7731): tuner-xc2028: fix signal strength calculus
  V4L/DVB (7730): tuner-xc2028: Fix SCODE load for MTS firmwares
  V4L/DVB (7729): Fix VIDIOCGAP corruption in ivtv
  V4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken
  V4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800
  V4L/DVB (7725): cx23885: Add generic cx23417 hardware encoder support
  V4L/DVB (7723): pvrusb2: Clean up input selection list generation in V4L interface
  V4L/DVB (7722): pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2
  V4L/DVB (7721): pvrusb2: Restructure cx23416 firmware loading to have a common exit point
  V4L/DVB (7720): pvrusb2: Fix bad error code on cx23416 firmware load failure
  V4L/DVB (7719): pvrusb2: Implement input selection enforcement
  V4L/DVB (7718): pvrusb2-dvb: update Kbuild selections
  V4L/DVB (7717): pvrusb2-dvb: add DVB-T support for Hauppauge pvrusb2 model 73xxx
  V4L/DVB (7716): pvrusb2: clean up global functions
  V4L/DVB (7715): pvrusb2: Clean out all use of __FUNCTION__
  V4L/DVB (7714): pvrusb2: Fix hang on module removal
  V4L/DVB (7713): pvrusb2: Implement cleaner DVB kernel thread shutdown
  V4L/DVB (7712): pvrusb2: Close connect/disconnect race
  V4L/DVB (7711): pvrusb2: Fix race on module unload
  V4L/DVB (7710): pvrusb2: Implement critical digital streaming quirk for onair devices
  ...

16 years agoMerge branch 'devel'
Trond Myklebust [Thu, 24 Apr 2008 18:01:02 +0000 (14:01 -0400)]
Merge branch 'devel'