Commit Graph

1020 Commits

Author SHA1 Message Date
Dominik Brodowski 70294b4683 [PATCH] pcmcia: remove unneeded Vcc pseudo setting
As we do not allow setting Vcc in the pcmcia core, and Vpp1 and
Vpp2 can only be set to the same value, a lot of code can be
streamlined.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31 17:15:55 +02:00
Dominik Brodowski 8661bb5b4a [PATCH] pcmcia: default suspend and resume handling
In all but one case, the suspend and resume functions of PCMCIA drivers
contain mostly of calls to pcmcia_release_configuration() and
pcmcia_request_configuration(). Therefore, move this code out of the
drivers and into the core.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31 17:15:52 +02:00
Dominik Brodowski 50db3fdbbc [PATCH] pcmcia: convert remaining users of pcmcia_release_io and _irq
Convert the remaining drivers which use pcmcia_release_io or
pcmcia_release_irq, and remove the EXPORT of these symbols.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-31 17:15:51 +02:00
Jeff Garzik e21a2b0cc5 Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2006-03-29 17:30:19 -05:00
Paul Mackerras bac30d1a78 Merge ../linux-2.6 2006-03-29 13:24:50 +11:00
Alexey Dobriyan 7f927fcc2f [PATCH] Typo fixes
Fix a lot of typos.  Eyeballed by jmc@ in OpenBSD.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-28 09:16:08 -08:00
Arjan van de Ven 99ac48f54a [PATCH] mark f_ops const in the inode
Mark the f_ops members of inodes as const, as well as fix the
ripple-through this causes by places that copy this f_ops and then "do
stuff" with it.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-28 09:16:05 -08:00
Benjamin Herrenschmidt e8222502ee [PATCH] powerpc: Kill _machine and hard-coded platform numbers
This removes statically assigned platform numbers and reworks the
powerpc platform probe code to use a better mechanism.  With this,
board support files can simply declare a new machine type with a
macro, and implement a probe() function that uses the flattened
device-tree to detect if they apply for a given machine.

We now have a machine_is() macro that replaces the comparisons of
_machine with the various PLATFORM_* constants.  This commit also
changes various drivers to use the new macro instead of looking at
_machine.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-03-28 23:15:54 +11:00
Alan Stern e041c68341 [PATCH] Notifier chain update: API changes
The kernel's implementation of notifier chains is unsafe.  There is no
protection against entries being added to or removed from a chain while the
chain is in use.  The issues were discussed in this thread:

    http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2

We noticed that notifier chains in the kernel fall into two basic usage
classes:

	"Blocking" chains are always called from a process context
	and the callout routines are allowed to sleep;

	"Atomic" chains can be called from an atomic context and
	the callout routines are not allowed to sleep.

We decided to codify this distinction and make it part of the API.  Therefore
this set of patches introduces three new, parallel APIs: one for blocking
notifiers, one for atomic notifiers, and one for "raw" notifiers (which is
really just the old API under a new name).  New kinds of data structures are
used for the heads of the chains, and new routines are defined for
registration, unregistration, and calling a chain.  The three APIs are
explained in include/linux/notifier.h and their implementation is in
kernel/sys.c.

With atomic and blocking chains, the implementation guarantees that the chain
links will not be corrupted and that chain callers will not get messed up by
entries being added or removed.  For raw chains the implementation provides no
guarantees at all; users of this API must provide their own protections.  (The
idea was that situations may come up where the assumptions of the atomic and
blocking APIs are not appropriate, so it should be possible for users to
handle these things in their own way.)

There are some limitations, which should not be too hard to live with.  For
atomic/blocking chains, registration and unregistration must always be done in
a process context since the chain is protected by a mutex/rwsem.  Also, a
callout routine for a non-raw chain must not try to register or unregister
entries on its own chain.  (This did happen in a couple of places and the code
had to be changed to avoid it.)

Since atomic chains may be called from within an NMI handler, they cannot use
spinlocks for synchronization.  Instead we use RCU.  The overhead falls almost
entirely in the unregister routine, which is okay since unregistration is much
less frequent that calling a chain.

Here is the list of chains that we adjusted and their classifications.  None
of them use the raw API, so for the moment it is only a placeholder.

  ATOMIC CHAINS
  -------------
arch/i386/kernel/traps.c:		i386die_chain
arch/ia64/kernel/traps.c:		ia64die_chain
arch/powerpc/kernel/traps.c:		powerpc_die_chain
arch/sparc64/kernel/traps.c:		sparc64die_chain
arch/x86_64/kernel/traps.c:		die_chain
drivers/char/ipmi/ipmi_si_intf.c:	xaction_notifier_list
kernel/panic.c:				panic_notifier_list
kernel/profile.c:			task_free_notifier
net/bluetooth/hci_core.c:		hci_notifier
net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_chain
net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_expect_chain
net/ipv6/addrconf.c:			inet6addr_chain
net/netfilter/nf_conntrack_core.c:	nf_conntrack_chain
net/netfilter/nf_conntrack_core.c:	nf_conntrack_expect_chain
net/netlink/af_netlink.c:		netlink_chain

  BLOCKING CHAINS
  ---------------
arch/powerpc/platforms/pseries/reconfig.c:	pSeries_reconfig_chain
arch/s390/kernel/process.c:		idle_chain
arch/x86_64/kernel/process.c		idle_notifier
drivers/base/memory.c:			memory_chain
drivers/cpufreq/cpufreq.c		cpufreq_policy_notifier_list
drivers/cpufreq/cpufreq.c		cpufreq_transition_notifier_list
drivers/macintosh/adb.c:		adb_client_list
drivers/macintosh/via-pmu.c		sleep_notifier_list
drivers/macintosh/via-pmu68k.c		sleep_notifier_list
drivers/macintosh/windfarm_core.c	wf_client_list
drivers/usb/core/notify.c		usb_notifier_list
drivers/video/fbmem.c			fb_notifier_list
kernel/cpu.c				cpu_chain
kernel/module.c				module_notify_list
kernel/profile.c			munmap_notifier
kernel/profile.c			task_exit_notifier
kernel/sys.c				reboot_notifier_list
net/core/dev.c				netdev_chain
net/decnet/dn_dev.c:			dnaddr_chain
net/ipv4/devinet.c:			inetaddr_chain

It's possible that some of these classifications are wrong.  If they are,
please let us know or submit a patch to fix them.  Note that any chain that
gets called very frequently should be atomic, because the rwsem read-locking
used for blocking chains is very likely to incur cache misses on SMP systems.
(However, if the chain's callout routines may sleep then the chain cannot be
atomic.)

The patch set was written by Alan Stern and Chandra Seetharaman, incorporating
material written by Keith Owens and suggestions from Paul McKenney and Andrew
Morton.

[jes@sgi.com: restructure the notifier chain initialization macros]
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-27 08:44:50 -08:00
Jean Tourrilhes 0073602544 [PATCH] zd1201 wireless stat update
The "dev->get_wireless_stats" field is deprecated and slowly
be surely going away. Most drivers have been updated months
ago. Actually, there is an annoying message for driver still using it,
but it seems that user of zd1201 were not annoyed enough ;-)

Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-27 11:39:15 -05:00
Linus Torvalds 1e8c573933 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (21 commits)
  BUG_ON() Conversion in drivers/video/
  BUG_ON() Conversion in drivers/parisc/
  BUG_ON() Conversion in drivers/block/
  BUG_ON() Conversion in sound/sparc/cs4231.c
  BUG_ON() Conversion in drivers/s390/block/dasd.c
  BUG_ON() Conversion in lib/swiotlb.c
  BUG_ON() Conversion in kernel/cpu.c
  BUG_ON() Conversion in ipc/msg.c
  BUG_ON() Conversion in block/elevator.c
  BUG_ON() Conversion in fs/coda/
  BUG_ON() Conversion in fs/binfmt_elf_fdpic.c
  BUG_ON() Conversion in input/serio/hil_mlc.c
  BUG_ON() Conversion in md/dm-hw-handler.c
  BUG_ON() Conversion in md/bitmap.c
  The comment describing how MS_ASYNC works in msync.c is confusing
  rcu: undeclared variable used in documentation
  fix typos "wich" -> "which"
  typo patch for fs/ufs/super.c
  Fix simple typos
  tabify drivers/char/Makefile
  ...
2006-03-25 08:41:09 -08:00
Mauro Carvalho Chehab 9f6933be66 V4L/DVB (3599a): Move drivers/usb/media to drivers/media/video
Because of historic reasons, there are two separate directories with
V4L stuff. Most drivers are located at driver/media/video. However, some
code for USB Webcams were inserted under drivers/usb/media.

This makes difficult for module authors to know were things should be.
Also, makes Kconfig menu confusing for normal users.

This patch moves all V4L content under drivers/usb/media to
drivers/media/video, and fixes Kconfig/Makefile entries.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-25 09:29:04 -03:00
Uwe Zeisberger c30fe7f731 fix typos "wich" -> "which"
Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-03-24 18:23:14 +01:00
Alexey Dobriyan 53b3531bbb [PATCH] s/;;/;/g
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:24 -08:00
Linus Torvalds 2bf2154c6b Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (81 commits)
  [PATCH] USB: omninet: fix up debugging comments
  [PATCH] USB serial: add navman driver
  [PATCH] USB: Fix irda-usb use after use
  [PATCH] USB: rtl8150 small fix
  [PATCH] USB: ftdi_sio: add Icom ID1 USB product and vendor ids
  [PATCH] USB: cp2101: add new device IDs
  [PATCH] USB: fix check_ctrlrecip to allow control transfers in state ADDRESS
  [PATCH] USB: vicam.c: fix a NULL pointer dereference
  [PATCH] USB: ZC0301 driver bugfix
  [PATCH] USB: add support for Creativelabs Silvercrest USB keyboard
  [PATCH] USB: storage: new unusual_devs.h entry: Mitsumi 7in1 Card Reader
  [PATCH] USB: storage: unusual_devs.h entry 0420:0001
  [PATCH] USB: storage: another unusual_devs.h entry
  [PATCH] USB: storage: sandisk unusual_devices entry
  [PATCH] USB: fix initdata issue in isp116x-hcd
  [PATCH] USB: usbcore: usb_set_configuration oops (NULL ptr dereference)
  [PATCH] USB: usbcore: Don't assume a USB configuration includes any interfaces
  [PATCH] USB: ub 03 drop stall clearing
  [PATCH] USB: ub 02 remove diag
  [PATCH] USB: ub 01 remove first_open
  ...
2006-03-21 09:25:47 -08:00
Greg Kroah-Hartman 71a8924bee [PATCH] USB: omninet: fix up debugging comments
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:03 -08:00
Greg Kroah-Hartman e9a66c64bb [PATCH] USB serial: add navman driver
Thanks to Warren Lewis <wlewis@scn.org> for the information needed to
write the driver and for testing it out.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:03 -08:00
Petko Manolov 09abfa8048 [PATCH] USB: rtl8150 small fix
This one is about announcing the device registration after the last check
has been made.

From: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:02 -08:00
A. Maitland Bottoms bf58fbd5e8 [PATCH] USB: ftdi_sio: add Icom ID1 USB product and vendor ids
The Icom ID-1 1.2 GHz band digital transceiver is a new radio
that has a USB interface. With this patch, the ftdi_sio driver
will report "Detected FT8U232AM" and provide a serial device
interface.

Signed-off-by: "A. Maitland Bottoms" <bottoms@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:02 -08:00
Craig Shelley 59224f5352 [PATCH] USB: cp2101: add new device IDs
This patch adds a new device ID to the cp2101 driver

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:02 -08:00
Horst Schirmeier 24f8b116c4 [PATCH] USB: fix check_ctrlrecip to allow control transfers in state ADDRESS
check_ctrlrecip() disallows any control transfers if the device is
deconfigured (in configuration 0, ie.  state ADDRESS).  This for example
makes it impossible to read the device descriptors without configuring the
device, although most standard device requests are allowed in this state by
the spec.  This patch allows control transfers for the ADDRESS state, too.

Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:02 -08:00
Adrian Bunk f88f8295d8 [PATCH] USB: vicam.c: fix a NULL pointer dereference
This patch fixes a NULL pointer dereference spotted by the Coverity
checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:02 -08:00
Luca Risolia 6e0755a4b2 [PATCH] USB: ZC0301 driver bugfix
ZC0301 driver bugfix.

Use correct PID/VID USB entries.

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Wolfgang Rohdewald 2e56222ed5 [PATCH] USB: add support for Creativelabs Silvercrest USB keyboard
Signed-off-by: Wolfgang Rohdewald <wolfgang@rohdewald.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Rodolfo Quesada 9d5847bc1a [PATCH] USB: storage: new unusual_devs.h entry: Mitsumi 7in1 Card Reader
This patch (as661) adds an unusual_devs entry for the Mitsumi 7in1 Card
Reader.

From: Rodolfo Quesada <rquesada@roqz.net>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Pete Zaitcev 23b7885d50 [PATCH] USB: storage: unusual_devs.h entry 0420:0001
Ref
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176584

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Pete Zaitcev c713c973fb [PATCH] USB: storage: another unusual_devs.h entry
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Phil Dibowitz 1e7a5a84e4 [PATCH] USB: storage: sandisk unusual_devices entry
The following adds an unusual_devs entry for the SanDisk ImageMate CompactFlash
USB drive, for the US_FL_FIX_CAPACITY flag. Additionally, it removes trailing
whitespace from the previous entry. It's based on the patch sent by Roman Hodek
<roman@hodek.net>.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Greg Kroah-Hartman b712548c5d [PATCH] USB: fix initdata issue in isp116x-hcd
As found by Sam's scripts.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Horst Schirmeier f48219db93 [PATCH] USB: usbcore: usb_set_configuration oops (NULL ptr dereference)
When trying to deconfigure a device via usb_set_configuration(dev, 0),
2.6.16-rc kernels after 55c527187c oops
with "Unable to handle NULL pointer dereference at...". This is due to
an unchecked dereference of cp in the power budget part.

Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Alan Stern 6aa35675bb [PATCH] USB: usbcore: Don't assume a USB configuration includes any interfaces
In a couple of places, usbcore assumes that a USB device configuration
will have a nonzero number of interfaces.  Having no interfaces may or
may not be allowed by the USB spec; in any event we shouldn't die if we
encounter such a thing.  This patch (as662) removes the assumptions.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Alan Stern ae55717584 [PATCH] USB: UHCI: Increase port-reset completion delay for HP controllers
This patch (as657) increases the port-reset completion delay in uhci-hcd
for HP's embedded controllers.  Unlike other UHCI controllers, the HP
chips can take as long as 250 us to carry out the processing associated
with finishing a port reset.

This fixes Novell bug #148761.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Dick Streefland 491b04ce1c [PATCH] USB: support for USB-to-serial cable from Speed Dragon Multimedia
The USB data cable for my Samsung GSM phone contains the USB-to-serial
converter chip MS3303H from Speed Dragon Multimedia, Inc.  that appears to
be compatible with the PL2303 chip.  The following patch adds support for
this chip to the pl2303 driver.

Signed-off-by: Dick Streefland <dick@streefland.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Julian Bradfield 96050b11f6 [PATCH] USB: PL2303 and TIOCMIWAIT
A while ago, I posted about TIOCMIWAIT not working with the PL2303
USB-serial adapter.

After a brief exchange with Greg, I tracked this to a missing wake-up
in the USB interrupt procedures. I got our systems staff to install
the enclosed very simple patch to our 2.6.12 kernels, and it all works
fine as expected. I guess this should also apply to the latest version
and go into the mainstream.

Apologies for the long delay in posting the result.

The routine being patched is pl2303_update_line_status

Signed-off-by: Julian Bradfield <jcb+luu@inf.ed.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Lonnie Mendez a5c44e29e5 [PATCH] USB: cypress_m8: add support for the Nokia ca42-version 2 cable
This patch adds support for the Nokia ca42 version 2 cable to the
cypress_m8 driver.  The device was tested by others with this patch and
found to be compatible with the cypress_m8 driver.  A special note
should be taken that this cable seems to vary in the type of chipset
used.  This patch supports the cable with product id 0x4101.

Signed-off-by: Lonnie Mendez <lmendez19@austin.rr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Luca Risolia a847423905 [PATCH] USB: ZC0301 driver updates
ZC0301 driver updates.

Changes: + new, - removed, * cleanup, @ bugfix

@ Need usb_get|put_dev() when disconnecting, if the device is open
* Cleanups and updates in the documentation
+ Use per-device sensor structures
+ Add frame_timeout module parameter

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Luca Risolia ccad7789d5 [PATCH] USB: ET61X[12]51 driver updates
USB: ET61X[12]51 driver updates

Changes: + new, - removed, * cleanup, @ bugfix

@ Fix stream_interrupt()
@ Fix vidioc_enum_input() and split vidioc_gs_input()
@ Need usb_get|put_dev() when disconnecting, if the device is open
* Use wait_event_interruptible_timeout() instead of wait_event_interruptible()
  when waiting for video frames
* replace wake_up_interruptible(&wait_stream) with wake_up(&wait_stream)
* Cleanups and updates in the documentation
* Use mutexes instead of semaphores
+ Use per-device sensor structures
+ Add support for PAS202BCA image sensors
+ Add frame_timeout module parameter

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:59 -08:00
Luca Risolia 2ffab02fea [PATCH] USB: SN9C10x driver updates
SN9C10x driver updates.

Changes: + new, - removed, * cleanup, @ bugfix

@ Fix stream_interrupt()
@ Fix vidioc_enum_input() and split vidioc_gs_input()
@ Need usb_get|put_dev() when disconnecting, if the device is open
* Use wait_event_interruptible_timeout() instead of wait_event_interruptible()
  when waiting for video frames
* replace wake_up_interruptible(&wait_stream) with wake_up(&wait_stream)
* Cleanups and updates in the documentation
+ Use per-device sensor structures
+ Add support for PAS202BCA image sensors
+ Add frame_timeout module parameter

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:59 -08:00
Eric Sesterhenn 7039f4224d [PATCH] USB: kzalloc() conversion in drivers/usb/gadget
this patch converts drivers/usb to kzalloc usage.
Compile tested with allyes config.

I think there was a bug in drivers/usb/gadget/inode.c because
it used sizeof(*data) for the kmalloc() and sizeof(data) for
the memset(), since sizeof(data) just returns the size for a pointer.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:59 -08:00
Eric Sesterhenn 80b6ca4832 [PATCH] USB: kzalloc() conversion for rest of drivers/usb
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:59 -08:00
Luca Risolia 9e47a52bf3 [PATCH] USB: ZC0301 driver updates
"Cosmetic" driver updates for the ZC0301 driver:

- Fix stream_interrupt() (and work around a possible kernel bug);

- Fix vidioc_enum_input() and split vidioc_gs_input() in two parts;
- Use wait_event_interruptible_timeout() instead of wait_event_interruptible()
  when waiting for video frames;
- replace erroneous wake_up_interruptible(&wait_stream) with
  wake_up(&wait_stream);
- Cosmetic cleanups in the documentation.

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:59 -08:00
Matthew Martin addf36fec0 [PATCH] USB: Fix warning in drivers/usb/media/ov511.c
Gcc 4.0.2 had the warning:

drivers/usb/media/ov511.c: In function 'show_exposure':
drivers/usb/media/ov511.c:5642: warning: 'exp' may be used uninitialized
in this function

Here is the patch to fix that warning.

Signed-off-by: Matthew Martin <lihnucks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
Aras Vaichas 1afc64a3d6 [PATCH] USB: ethernet gadget driver section fixups
This patch allows you to set the iSerialNumber field in the
usb_device_descriptor structure for your USB ethernet gadget.

It also changes the parameters shown through sysfs so they're
no longer declared as __initdata, preventing potential oopses.

That's most useful for the Ethernet addresses, which may in
some cases be random "locally administered" addresses.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
David Brownell 329af28b14 [PATCH] USB: gadget driver section fixups
This adds __init section annotations to gadget driver bind() routines to
remove calls from .text into .init sections (for endpoint autoconfig).
Likewise it adds __exit section annotations to their unbind() routines.

The specification of the gadget driver register/unregister functions is
updated to explicitly allow use of those sections.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
Alan Stern 43c5d5aaaf [PATCH] usbcore: fix compile error with CONFIG_USB_SUSPEND=n
This patch (as647) fixes a small error introduced by a recent change to
the USB core suspend/resume code.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
Alan Stern 6a8e87b23f [PATCH] USB core and HCDs: don't put_device while atomic
This patch (as640) removes several put_device and the corresponding
get_device calls from the USB core and HCDs.  Some of the puts were done
in atomic contexts, and none of them are needed since the core now
guarantees that every endpoint will be disabled and every URB completed
before a USB device is released.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
Alan Stern 1393adb2eb [PATCH] uhci-hcd: fix mistaken usage of list_prepare_entry
A recent update to the uhci-hcd driver invoked the list_prepare_entry
macro incorrectly.  This patch (as646) corrects it.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
Alan Stern dbf4fcad62 [PATCH] UHCI: Don't log short transfers
Even when the URB_SHORT_NOT_OK flag is set, a short transfer shouldn't
generate a debugging log message.  Especially not one with the confusing
claim that the transfer "failed with status 0".  This patch (as627)
fixes that behavior in uhci-hcd.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Alan Stern 8d402e1ae0 [PATCH] UHCI: improve debugging code
This patch (as626) makes some improvements to the debugging code in
uhci-hcd.  The main change is that now the code won't get compiled if
CONFIG_USB_DEBUG isn't set.  But there are other changes too, like
adding a missing .owner field and printing a debugging dump if the
controller dies.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Alan Stern 0ed8fee1c1 [PATCH] UHCI: remove main list of URBs
As part of reorienting uhci-hcd away from URBs and toward endpoint
queues, this patch (as625) eliminates the driver's main list of URBs.
The list wsa used mainly in checking for URB completions; now the driver
goes through the list of active endpoints and checks the members of the
queues.

As a side effect, I had to remove the code that looks for FSBR timeouts.
For now, FSBR will remain on so long as any URBs on a full-speed control
or bulk queue request it, even if the queue isn't advancing.  A later
patch can add more intelligent handling.  This isn't a huge drawback;
it's pretty rare for an URB to get stuck for more than a fraction of a
second.  (And it will help the people trying to use those insane HP USB
devices.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Alan Stern af0bb5998a [PATCH] UHCI: use dummy TDs
This patch (as624) fixes a hardware race in uhci-hcd by adding a dummy
TD to the end of each endpoint's queue.  Without the dummy the host
controller will effectively turn off the queue when it reaches the end,
which happens asynchronously.  This leads to a potential problem when
new transfer descriptors are added to the end of the queue; they may
never get used.

With a dummy TD present the controller never turns off the queue;
instead it just stops at the dummy and leaves the queue on but inactive.
When new TDs are added to the end of the queue, the first new one gets
written over the dummy.  Thus there's never any question about whether
the queue is running or needs to be restarted.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Alan Stern dccf4a48d4 [PATCH] UHCI: use one QH per endpoint, not per URB
This patch (as623) changes the uhci-hcd driver to make it use one QH per
device endpoint, instead of a QH per URB as it does now.  Numerous areas
of the code are affected by this.  For example, the distinction between
"queued" URBs and non-"queued" URBs no longer exists; all URBs belong to
a queue and some just happen to be at the queue's head.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Kumar Gala 499003e815 [PATCH] USB: Fix masking bug initialization of Freescale EHCI controller
In setting up the of PHY we masked off too many bits, instead just
initialize PORTSC for the type of PHY we are using.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Franck Bui-Huu 0eb8c7cafe [PATCH] USB: Zero driver: Removed duplicated code
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Malte Doersam efafe6fb72 [PATCH] USB: Pegasus: Linksys USBVPN1 support + cleanup
This patch adds a second linksys vendor-id (077b) and the product id of the
pegasus based adapter USBVPN1

http://www1.linksys.com/Products/product.asp?prid=3D543&scid=3D30

Furthermore it replaces all LINKSYS_GPIO_RESET with DEFAULT_GPIO_RESET as both
are declared like this:
#define        DEFAULT_GPIO_RESET      0x24
#define        LINKSYS_GPIO_RESET      0x24

This is misleading and confusing.
The check is now done via the VENDOR_ID in pegasus.c:
if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS

Signed-off-by: Malte Doersam <mdoersam@arcor.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
Alan Stern aef4e26696 [PATCH] usbhid: add error handling
This patch (as628c) adds error handling to the USB HID core.  When an
error is reported for an interrupt URB, the driver will do delayed
retries, at increasing intervals, for up to one second.  If that doesn't
work, it will try to reset the device.  Testing by users has shown that
both the retries and the resets end up getting used.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell fb669cc01e [PATCH] USB: remove usbcore-specific wakeup flags
This makes usbcore use the driver model wakeup flags for host controllers
and for their root hubs.  Since previous patches have removed all users of
the HCD flags they replace, this converts the last users of those flags.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell 6a9062f393 [PATCH] USB: ohci uses driver model wakeup flags
This makes OHCI use the driver model wakeup control bits for its root hub
(e.g. disable on amd756, because of chip erratum) and for the controller
itself.  It no longer uses the hcd glue bits with those roles, and depends
on the previous patch making the root hub available earlier.

Note that on most platforms (boot code properly setting the RWC bit) this
gives a partial workaround for the way PCI isn't currently flagging devices
that support PME# signals.  (Because of odd PCI init sequencing on PPC.)
That's because many OHCI controllers support "legacy PCI PM" ... without
involving any PCI PM capability.

USB wakeup from STR, if it works on your system, may still involve
tweaking things by hand in /proc/acpi/wakeup.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell b1e8f0a6a8 [PATCH] USB: usbcore sets up root hubs earlier
Make the HCD initialization sequence more sane ... notably, setting up
root hubs before HCDs are asked to do their one-time init.  Among other
things, that lets the HCDs do custom root hub init along with all the
other one-time initialization done in the (now misnamed) reset() method.

This also copies the controller wakeup flags into the root hub; it's
done a bit later than would be ideal, but that'll be necessary until
the PCI code initializes them correctly.  (The PCI patch breaks on PPC
due to how it sequences PCI initialization.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell 1c05ad4447 [PATCH] recognize three more usb peripheral controllers
This adds declarations for three USB peripheral controllers:

  - Two high speed USB cores that can be licensed from Mentor Graphics
    to be integrated into silicon:

      * "musbhsfc" is for peripherals only, as found in for example the
        IBM/AMCC 44EP processors.

      * "musbhdrc" is OTG-capable (dual role), and is found in various
        products including OMAP 2430 and the new DaVinci SOCs.

    The "musbh" standing for "Mentor USB Highspeed", the rest standing
    for "Function Controller" or "Dual Role Controller" (OTG-capable).

  - The full speed controller on the FreeScale MPC8272.

Adding these definitions just allows gadget driver code to handle any
controller-specific logic; controller drivers are quite separate.

Signed-off-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell 7802ac5c29 [PATCH] USB: minor gadget/rndis tweak
Resove a minor FIXME:  don't change MTU while RNDIS link is active,
the other end won't expect such things...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell bae4bd848d [PATCH] USB: add support for AT91 gadget
This adds support for the USB peripheral controller on AT91
(rm9200, eventually also sam9261 or uClinux) platforms.

More SOC support for Linux-USB ... an uncomplicated pure PIO driver.
It'd be worth using this as a model, if you're starting a driver
for some other peripheral controller.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
Andrew Victor 39a269c09f [PATCH] USB: add support for OCHI on AT91rm9200
This adds support for OHCI on AT91rm9200 based boards.

Possibly of interest here is the way this uses <linux/clk.h> to
gate clocks on/off during system pm state transitions.  That's
typical for non-PCI systems.  Some can go further; Mini-A host
side connectors enable ID-pin sensing.

From: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
David Brownell d085229938 [PATCH] USB: EHCI unlink tweaks
This patch modifies the behavior of the EHCI driver in an unlink path
that seems to be causing various issues on some systems.  Those problems
have included issues with disconnection, driver unbinding, and similar
cases where urb unlinking would just not work right.

This patch should help avoid those problems by not turning off the async
(control/bulk) schedule until it's not expecting an "async advance" IRQ,
which comes from the processing passing the schedule head.  Whether the
driver attempts to do such things is dependent on system timings, so
many folk would never have seen these problems.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Jordan Crouse d5fb7f1b5b [PATCH] USB: OHCI for AU1200
ALCHEMY:  Add OHCI support for AU1200

Updated by moving the OHCI support out of the EHCI patch.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Jordan Crouse 76fa9a240d [PATCH] USB: EHCI for AU1200
ALCHEMY:  Add EHCI support for AU1200

Updated by removing the OHCI support

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Kumar Gala 8cd42e97bf [PATCH] USB: EHCI and Freescale 83xx quirk
On the MPC834x processors the multiport host (MPH) EHCI controller has an
erratum in which the port number in the queue head expects to be 0..N-1
instead of 1..N.  If we are on one of these chips we subtract one from
the port number before putting it into the queue head.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Randy Vinson 80cb9aee01 [PATCH] USB: EHCI for Freescale 83xx
Adding a Host Mode USB driver for the Freescale 83xx.

This driver supports both the Dual-Role (DR) controller and the
Multi-Port-Host (MPH) controller present in the Freescale MPC8349. It has
been tested with the MPC8349CDS reference system. This driver depends on
platform support code for setting up the pins on the device package in a
manner appropriate for the board in use. Note that this patch requires
selecting the EHCI controller option under the USB Host menu.

Signed-off-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Clemens Ladisch 469d02293d [PATCH] USB: EHCI full speed ISO bugfixes
This patch replaces the split ISO raw_mask calculation code in the
iso_stream_init() function that computed incorrect numbers of high
speed transactions for both input and output transfers.

In the output case, it added a superfluous start-split transaction for
all maxmimum packet sizes that are a multiple of 188.

In the input case, it forgot to add complete-split transactions for all
microframes covered by the full speed transaction, and the additional
complete-split transaction needed for the case when full speed data
starts arriving near the end of a microframe.

These changes don't affect the lack of full speed bandwidth, but at
least it removes the MMF errors that the HC raised with some input
streams.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
David Brownell f8aeb3bb86 [PATCH] USB: EHCI and NF2 quirk
This teaches the EHCI driver about a quirk seen in older NForce2 chips,
adding a workaround to ignore selective suspend requests.  Bus-wide
(so-called "global") suspend still works, as does USB wakeup of a
root hub that's globally suspended.

There's still a hole in this support though.  Strictly speaking, this
should _fail_ selective suspend requests, rather than ignoring them,
since doing it this way means that devices which should be able to issue
remote wakeup are not going to be able to do that.  For now, we'll just
live with that problem ... since usbcore expects to do selective suspend
on the way towards a full bus suspend, and usbcore needs to be able to
do full bus suspend.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Arjan van de Ven 4186ecf8ad [PATCH] USB: convert a bunch of USB semaphores to mutexes
the patch below converts a bunch of semaphores-used-as-mutex in the USB
code to mutexes

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Pekka Enberg 35cce732d9 [PATCH] USB: remove LINUX_VERSION_CODE macro usage
This patch removes unnecessary LINUX_VERSION_CODE macro usage from
drivers/usb/.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:54 -08:00
Adrian Bunk e266a12492 [PATCH] USB: drivers/usb/core/message.c: make usb_get_string() static
After the removal of usb-midi.c, there's no longer any external user of
usb_get_string().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:54 -08:00
Adrian Bunk 9628416a54 [PATCH] USB: remove OBSOLETE_OSS_USB_DRIVER drivers
This patch removes the obsolete USB_MIDI and USB_AUDIO drivers.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:54 -08:00
Oliver Neukum 9ee884cc89 [PATCH] USB: kzalloc in sisusbvga
this does two things:
- use kzalloc where appropriate
- correct error return codes in ioctl

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:54 -08:00
Oliver Neukum 06d694748b [PATCH] USB: kzalloc in usbled
another one for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:54 -08:00
Oliver Neukum d874a2bade [PATCH] USB: kzalloc in PhidgetServo
another for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum 17590840dc [PATCH] USB: kzalloc in PhidgetInterfaceKit
another for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum 1144cf7af2 [PATCH] USB: kzalloc in ldusb
another one for kzalloc

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum 092e462a53 [PATCH] USB: kzalloc in idmouse
another for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum 5f7481337c [PATCH] USB: kzalloc in cytherm
another one for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum 51b208ddf6 [PATCH] USB: kzalloc in usbvideo
another for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum b10b417788 [PATCH] USB: kzalloc in w9968cf
another one for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum d8e298dc9f [PATCH] USB: kzalloc in dabusb
kzalloc in dabusb.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum bbdb7dafb5 [PATCH] USB: kzalloc for hid
this uses kzalloc in hid.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Oliver Neukum 887c2560b6 [PATCH] USB: kzalloc for storage
another one for kzalloc. This covers the storage subdirectory.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Oliver Neukum 9ff87d7326 [PATCH] USB: mdc800.c to kzalloc
one more conversion to kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Andrew Morton 9fcd5c322c [PATCH] USB: optimise devio.c usbdev_read fix
drivers/usb/core/devio.c: In function `usbdev_read':
drivers/usb/core/devio.c:140: error: invalid type argument of `->'
drivers/usb/core/devio.c:141: error: invalid type argument of `->'
drivers/usb/core/devio.c:142: error: invalid type argument of `->'
drivers/usb/core/devio.c:143: error: invalid type argument of `->'

Cc: Oliver Neukum <oliver@neukum.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Oliver Neukum 8781ba0aa9 [PATCH] USB: optimise devio.c::usbdev_read
this is a small optimisation. It is ridiculous to do a kmalloc for
18 bytes. This puts it onto the stack.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Luca Risolia 60f780528f [PATCH] USB: Add ZC0301 Video4Linux2 driver
This patch adds a Video4Linux2 driver for ZC0301
Image Processor and Control Chip.

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Greg Kroah-Hartman b87ba0a33a [PATCH] add EXPORT_SYMBOL_GPL_FUTURE() to USB subsystem
The USB core symbols will be converted to GPL-only in a few years.  Mark
this as such and update the documentation explaining why, and provide a
pointer for developers to receive help if they need it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:58 -08:00
David Vrabel 489447380a [PATCH] handle errors returned by platform_get_irq*()
platform_get_irq*() now returns on -ENXIO when the resource cannot be
found.  Ensure all users of platform_get_irq*() handle this error
appropriately.

Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:57 -08:00
Micah F. Galizia 50a598de40 Input: HID - fix duplicate key mapping for Logitech UltraX remote
This patch makes the "cc/teletext" key emit "KEY_TEXT" event instead of
"KEY_SUBTITLE" which is already mapped to "subtitle" button.

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-03-14 00:09:34 -05:00
Greg Kroah-Hartman 91c0bce29e [PATCH] USB Serial: fix use-after-free bug in usb-serial core
This fixes a use-after-free bug in the usb-serial core.  It is simple to
trigger this (open a usb-serial port, then yank the device out before
closing the port.)  Thanks to Stefan Seyfried <seife@suse.de> for
reporting this, and to the slab debugging code which enabled it to be
tracked down.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-06 13:29:00 -08:00
Ian Abbott 34d1a8aa88 [PATCH] USB: ftdi_sio: new microHAM device IDs
This patch adds a bunch of new device IDs to the ftdi_sio driver for
various devices from microHAM using FTDI chips.

Micheal Studer supplied the PID for the USB-Y9 device.  I examined the
INF file in microHAM's Windows driver package for the USB-KW, USB-YS,
USB-IC, USB-DB9 and USB-RS232 devices.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-28 12:42:07 -08:00
Hendrik Schweppe 04d52461c6 [PATCH] USB: visor.c id for gspda smartphone
Added the USB vendorID of GSPDA and the productID of GSPDA's palm
smartphone 'xplore m68' to the list of known devices.

Signed-off-by: Hendrik Schweppe <linuxkpatch@hendrik.fam-schweppe.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-28 12:42:07 -08:00
Shaun Tancheff 8763716bfe [PATCH] USB: Gadget RNDIS fix alloc bug. (buffer overflow)
Remote NDIS response to OID_GEN_SUPPORTED_LIST only allocated space
for the data attached to the reply, and not the reply structure
itself. This caused other kmalloc'd memory to be corrupted.

Signed-off-by: Shaun Tancheff <shaun@tancheff.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-28 12:42:06 -08:00
Franck Bui-Huu d5ec33490c [PATCH] USB: lh7a40x gadget driver: Fixed a dead lock
There is a dead lock in lh7a40x udc driver. When the driver receive a
SET_FEATURE HALT request, the dev lock is taken by the interrupt
handler lh7a40x_udc_irq then the handler will call lh7a40x_set_halt
function which in its turn will try to acquire the dev lock.

Signed-off-by: Franck Bui-Huu <franck.bui-huu@innova-card.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-28 12:42:06 -08:00
Alan Stern 754501b324 [PATCH] USB: unusual_devs entry for Lyra RCA RD1080
This patch (as656) adds an unusual_devs.h entry for the Lyra RCA RD1080
MP3 player.  Its card-reader firmware has the common
report-one-too-many-sectors bug.  This fixes Novell bug #152175.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-28 12:42:06 -08:00
Andrew Fuller e65335ef18 [PATCH] USB: Wisegroup MP-8866 Dual USB Joypad
This patch is for the Dual USB Joypad [0925:8866] from Wisegroup.  The
HID_QUIRK_NOGET is necessary for it to respond to input, and the
HID_QUIRK_MULTI_INPUT is necessary to have two js# nodes appear.

Signed-off-by: Andrew Fuller <mactalla.obair@gmail.com>
Cc: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-28 12:42:06 -08:00
David Brownell 8c450802a3 [PATCH] USB: fix EHCI BIOS handshake
Fix http://bugzilla.kernel.org/show_bug.cgi?id=6128

Finish morphing the "early handoff" version of the EHCI BIOS handshake over
to match the previous implementation inside the EHCI driver (except that
now we forcibly disable the SMI).  The version that had been with the PCI
code was surprisingly full of bugs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: <yazar256@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-28 12:42:06 -08:00
Phil Dibowitz 16f05be7be [PATCH] USB: unusual-devs bugfix
The following patch looks good to me. It adds an unusual_devs entry as
well as fixing an ordering bug. Please apply.

From: Bohdan Linda <bohdan.linda@gmail.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-13 21:33:40 -08:00
Alan Stern 982db2a127 [PATCH] USB: unusual_devs.h entry: iAUDIO M5
Another unusual_devs.h entry (as652).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-13 21:33:40 -08:00
Alan Stern 1d614a4b0d [PATCH] USB: unusual_devs.h entry: TrekStor i.Beat
A new unusual_devs.h entry (as651).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-13 21:33:40 -08:00
Alan Stern ba3e93ad3c [PATCH] usb-storage: unusual_devs entry
Here is a new entry for unusual_devs.h (as630).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-13 21:33:40 -08:00
Alan Stern a2149bce25 [PATCH] usb-storage: new unusual_devs entry
This patch (as631) for unusual_devs.h fixes bugzilla entry 5913.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-13 21:33:40 -08:00
David Brownell a0c53f1dca [PATCH] USB: sl811_cs needs platform_device conversion too
The switchover to "platform_driver" from "device_driver" missed
one rather essential usage, which broke the sl811_cs driver ...
this resolves the omission.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-13 21:33:39 -08:00
Christian Lindner c6c27721a4 [PATCH] USB: PL2303: Leadtek 9531 GPS-Mouse
The patch adds the USB ID (0413:2101) for the Leadtek GPS-Mouse 9531 to
the driver pl2303.

Signed-off-by: Christian Lindner <christian.lindner@gmx.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-13 21:33:39 -08:00
Michael Hund 343a65cadb [PATCH] USB: change ldusb's experimental state
Signed-off-by: Michael Hund <mhund@ld-didactic.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-13 21:33:39 -08:00
Michael Hund ba3e66e94b [PATCH] USB: add new device ids to ldusb
Signed-off-by: Michael Hund <mhund@ld-didactic.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-13 21:33:39 -08:00
David Brownell a38408cd8d [PATCH] USB: fix up the usb early handoff logic for EHCI
Disable some dubious "early" USB handoff code that allegedly works around bugs
on some systems (we don't know which ones) but rudely breaks some others.

Also make the kernel warnings reporting BIOS handoff problems be more useful,
reporting the register whose value displays the trouble.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-13 21:33:39 -08:00
Greg KH 410c05427a [PATCH] USB: Fix GPL markings on usb core functions.
I thought we had fixed up all non-gpl USB drivers, and was wrong to do
this.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-05 14:20:14 -08:00
Linus Torvalds d20e6336ea Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input 2006-01-31 21:18:17 -08:00
David Brownell 69396dcfa3 [PATCH] USB: gadget zero and dma-coherent buffers
This makes sure that the correct length is reported when freeing
a dma-coherent buffer; some platforms complain if that's wrong.
It also makes two parameters readonly in sysfs, as they're not
safe to change while tests are running.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:44 -08:00
Andrew Morton 877260bd26 [PATCH] USB: yealink printk warning fix
drivers/usb/input/yealink.c: In function `usb_probe':
drivers/usb/input/yealink.c:910: warning: int format, different type arg (arg 4)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:43 -08:00
Alan Cox 6d453b9e30 [PATCH] USB: libusual: fix warning on 64bit boxes
We cast an int to a void * which not unreasonably makes gcc suspicious.
We don't actually care what type "type" is so use unsigned long so it
matches pointer length on all platforms.

Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:43 -08:00
Alexey Dobriyan 5d68dfcf3a [PATCH] USB: arm26: fix compilation of drivers/usb/core/message.c
drivers/usb/core/message.c:395: error: invalid use of undefined type `struct scatterlist'

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:43 -08:00
Sergei Shtylylov 05090fc969 [PATCH] USB: Au1xx0: replace casual readl() with au_readl() in the drivers
au_readl() does needed byteswapping, etc.

Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:43 -08:00
Olaf Hering de289fdf6f [PATCH] USB: remove extra newline in hid_init_reports
The warn() macro in include/linux/usb.h adds a newline.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:43 -08:00
Adrian Bunk 532a3de170 [PATCH] USB: drivers/usb/media/ov511.c: remove hooks for the decomp module
- the decomp module is not intended for inclusion into the kernel
- people using the decomp module from upstream will usually simply use
  the complete upstream 2.xx driver

Therefore, there seems to be no good reason spending some bytes of
kernel memory for hooks for this module.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mark McClelland <mark@ovcam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:42 -08:00
Adrian Bunk 7f2c01ab8a [PATCH] USB: drivers/usb/media/w9968cf.c: remove hooks for the vpp module
- the w9968cf-vpp module is not intended for inclusion into the kernel
- the upstream w9968cf package shipping the w9968cf-vpp module suggests
  to simply replace the w9968cf module shipped with the kernel

Therefore, there seems to be no good reason spending some bytes of
kernel memory for hooks for the w9968cf-vpp module.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:42 -08:00
Randy Dunlap bf8b2b5345 [PATCH] USB EHCI: fix gfp_t sparse warning
Fix sparse warning:
drivers/usb/host/ehci-hcd.c:719:35: warning: incorrect type in argument 3 (different base types)
drivers/usb/host/ehci-hcd.c:719:35:    expected unsigned int [unsigned] mem_flags
drivers/usb/host/ehci-hcd.c:719:35:    got restricted unsigned int [usertype] mem_flags

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:42 -08:00
Eric Sesterhenn / snakebyte 52ea1619d5 [PATCH] USB: Remove LINUX_VERSION_CODE check in pwc/pwc-ctrl.c
this patch removes compatibility with 2.4 kernel, which makes
the code much easier to read.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:42 -08:00
Alan Stern 9790636927 [PATCH] USB: gadgetfs: set "zero" flag for short control-IN response
This patch (as622) makes gadgetfs set the "zero" flag for control-IN
responses, when the length of the response is shorter than the length of
the request.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:42 -08:00
Olav Kongas 0be930c546 [PATCH] USB: isp116x-hcd: replace mdelay() by msleep()
Replace mdelay() by msleep() in bus_suspend(); the rest of the system will
gain 7ms. The related code is reorganized to minimize the number of
locking/unlocking calls.

The last hunk of the patch is the formatting change by Lindent.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:42 -08:00
Greg Kroah-Hartman e9aa795aae [PATCH] USB: add might_sleep() to usb_unlink_urb() to warn developers
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:42 -08:00
David Brownell 682d4c803f [PATCH] USB: net2280 warning fix
For some reason alpha doesn't include <linux/dma-mapping.h> where other
architectures do; this makes net2280 include it explicitly.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:42 -08:00
Greg Kroah-Hartman 595b14cbcc [PATCH] USB: remove some left over devfs droppings hanging around in the usb drivers
As there is no more usb devfs support, these bits would just confuse
people.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:41 -08:00
Alan Stern 630aa3cfd5 [PATCH] USB: UHCI: No FSBR until device is configured
Some USB devices don't enumerate well with FSBR turned on.  This patch
keeps devices on the low-speed part of the schedule (which doesn't use
FSBR) until they have been fully configured.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:41 -08:00
Clemens Ladisch 0c7346229c [PATCH] USB: EHCI, another full speed iso fix
This patch adds a reinitializion for the uf variable that got modified
by the preceding start-split bandwidth check.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:41 -08:00
Vojtech Pavlik dc41baf818 [PATCH] USB HID: add blacklist entry for HP keyboard
My earlier experiment (adding a clear-halt for the interrupt-in
endpoint)  failed.  It turns out that it does cause problems for other
devices.  And it wasn't needed anyway; a simple blacklist entry was
enough to get my HP keyboard working.

This patch (as643) removes the clear-halt call and adds the blacklist
entry.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:41 -08:00
Andrew Morton 885e77430d [PATCH] USB: add new auerswald device ids
Add device support for a couple more Auerswald TK-devices.

Via Thomas Jackle <dj-tj@gmx.de>, typed in from
http://bugzilla.kernel.org/show_bug.cgi?id=5908.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:41 -08:00
matthieu castet fdf290fd6d [PATCH] UEAGLE : cmv name bug (was cosmetic)
this patch correct a possible bug with cmv_name being static. If there
is 2 modems and the driver is scheduled when filling cmv_name this could
result with garbage in cmv_name. We allocate cmv_name on the stack but
with a small size in order to avoid that.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:41 -08:00
matthieu castet e40abaf633 [PATCH] UEAGLE : cosmetic
this patch is purely cosmetic. There is :
- indentation cleaning
- unneeded cast removing
- comments cleaning

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:41 -08:00
matthieu castet 3c9666cc18 [PATCH] UEAGLE : add iso support
This patch adds the support for isochronous pipe.

A new module parameter is added to select iso mode.  It is set to iso by
default because bulk mode doesn't work well at high speed rate (>3 Mbps
for upload).

We use UDSL_IGNORE_EILSEQ flags because ADI firmware doesn't reply to
ISO IN when it has nothing to send [1].

[1]
from cypress datasheet :

The ISOSEND0 Bit (bit 7 in the USBPAIR Register) is used when the EZ-USB
FX chip receives an isochronous IN token while the IN FIFO is empty. If
ISOSEND0=0 (the default value), the USB core does not respond to the IN
token. If ISOSEND0=1, the USB core sends a zero-length data packet in
response to the IN token. The action to take depends on the overall
system design. The ISOSEND0 Bit applies to all of the isochronous IN
endpoints, IN-8 through IN-15.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:40 -08:00
Arjan van de Ven ab3c81ff63 [PATCH] USBATM: semaphore to mutex conversion
This is the usbatm part of the Arjan, Jes and Ingo
mass semaphore to mutex conversion, reworked to apply on top
of the patches I just sent to you.  This time, with correct
attribution and signed-off lines.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:40 -08:00
Duncan Sands a3673d3cd1 [PATCH] USBATM: -EILSEQ workaround
Don't throttle on -EILSEQ urb status if requested by a minidriver.
It seems the ueagle modems are buggy, giving -EILSEQ when they
have no data to send.  The ueagle change will be sent separately
by the ueagle guys.  Patch by Matthieu Castet.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:40 -08:00
Duncan Sands 9b0e54addf [PATCH] USBATM: bump version numbers
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:40 -08:00
Duncan Sands e3fb2f641f [PATCH] USBATM: handle urbs containing partial cells
The receive logic has always assumed that urbs contain an integral
number of ATM cells, which is a bit naughty, though it never caused
any problems with bulk transfers.  Isochronous urbs spank us soundly
for this.  Fixed thanks to this patch, mostly by Stanislaw Gruszka.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:40 -08:00
Duncan Sands 80aae7a17a [PATCH] USBATM: allow isochronous transfer
While the usbatm core has had some support for using isoc urbs
for some time, there was no way for users to turn it on.  While
use of isoc transfer should still be considered experimental, it
now works well enough to let users turn it on.  Minidrivers signal
to the core that they want to use isoc transfer by setting the new
UDSL_USE_ISOC flag.  The speedtch minidriver gets a new module
parameter enable_isoc (defaults to false), plus some logic that
checks for the existence of an isoc receive endpoint (not all
speedtouch modems have one).

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:40 -08:00
Duncan Sands 6f74947598 [PATCH] USBATM: measure buffer size in bytes; force valid sizes
Change the module parameters rcv_buf_size and snd_buf_size to
specify buffer sizes in bytes rather than ATM cells.  Since
there is some danger that users may not notice this change,
the parameters are renamed to rcv_buf_bytes etc.  The transmit
buffer needs to be a multiple of the ATM cell size in length,
while the receive buffer should be a multiple of the endpoint
maxpacket size (this wasn't enforced before, which causes trouble
with isochronous transfers), so enforce these restrictions.  Now
that the usbatm probe method inspects the endpoint maxpacket size,
minidriver bind routines need to set the correct alternate setting
for the interface in their bind routine.  This is the reason for
the speedtch changes.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:40 -08:00
Duncan Sands 227d77611b [PATCH] USBATM: use dev_kfree_skb_any rather than dev_kfree_skb
In one spot (usbatm_cancel_send) we were calling dev_kfree_skb with irqs
disabled.  This mistake is just too easy to make, so systematically use
dev_kfree_skb_any rather than dev_kfree_skb.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:40 -08:00
Duncan Sands 72ef8ab43f [PATCH] USBATM: return correct error code when out of memory
We weren't always returning -ENOMEM.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:39 -08:00
Duncan Sands 0e42a627ec [PATCH] USBATM: shutdown open connections when disconnected
This patch causes vcc_release_async to be applied to any open
vcc's when the modem is disconnected.  This signals a socket
shutdown, letting the socket user know that the game is up.
I wrote this patch because of reports that pppd would keep
connections open forever when the modem is disconnected.
This patch does not fix that problem, but it's a step in the
right direction.  It doesn't help because the pppoatm module
doesn't yet monitor state changes on the ATM socket, so simply
never realises that the ATM connection has gone down (meaning
it doesn't tell the ppp layer).  But at least there is a socket
state change now.  Unfortunately this patch may create problems
for those rare users like me who use routed IP or some other
non-ppp connection method that goes via the ATM ARP daemon: the
daemon is buggy, and with this patch will crash when the modem
is disconnected.  Users with a buggy atmarpd can simply restart
it after disconnecting the modem.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:39 -08:00
Duncan Sands 233c08e0ff [PATCH] USBATM: xusbatm rewrite
The xusbatm driver is for otherwise unsupported modems.
All it does is grab hold of a user-specified set of
interfaces - the generic usbatm core methods (hopefully)
do the rest.  As Aurelio Arroyo discovered when he tried
to use xusbatm (big mistake!), the interface grabbing logic
was completely borked.  Here is a rewrite that works.

Signed-off-by:	Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:39 -08:00
Duncan Sands 9a734efec3 [PATCH] USBATM: kzalloc conversion
Convert kmalloc + memset to kzalloc.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:39 -08:00
Duncan Sands 0dfcd3e444 [PATCH] USBATM: remove .owner
Remove the unused .owner field in struct usbatm_driver.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:39 -08:00
Duncan Sands 35644b0cce [PATCH] USBATM: add flags field
Have minidrivers and the core signal special requirements
using a flags field in struct usbatm_data.  For the moment
this is only used to replace the need_heavy_init bind
parameter, but there'll be new flags in later patches.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:39 -08:00
Duncan Sands 0ec3c7e856 [PATCH] USBATM: trivial modifications
Formatting, changes to variable names, comments, log level changes,
printk rate limiting.

Signed-off-by:	Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:39 -08:00
Luca Risolia 7ce08c93e3 [PATCH] USB: Add ET61X[12]51 Video4Linux2 driver
This patch adds a Video4Linux2 driver giving support
to ET61X151 and ET61X251 PC Camera Controllers made by
Etoms Electronics.

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:39 -08:00
Luca Risolia cd6fcc555f [PATCH] USB: SN9C10x driver updates
SN9C10x driver updates:

- Use kzalloc() instead of kmalloc()
- Move some macro definitions from sn9c102.h to sn9c102_core.c
- Use vfree() and vmalloc_32() instead of rvfree() and rvmalloc()
- Fix mmap() sys call
- Documentation updates

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:38 -08:00
Craig Shelley e988fc8a56 [PATCH] USB: cp2101 Add new device IDs
The attached patch adds four new device IDs for the CP2101 driver.
Also 3 tab characters have been removed from device ID table.

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:38 -08:00
Denis MONTERRAT 6cceb05f8d [PATCH] USB: add new pl2303 device ids
Signed-off-by: FALIPOU F Developer <fred.falipou@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:38 -08:00
Martin Gingras 838b42814c [PATCH] USB: pl2303: Added support for CA-42 clone cable
Added support for CA-42 clone cable (www.ca-42.com)

Signed-off-by: Martin Gingras <martin.gingras@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:38 -08:00
Juergen Schindele a001100d8e [PATCH] USB: touchkitusb.c (eGalax driver) fix
This patch corrects the URB initialisation for transfers
like this is done in other drivers too.
Without this patch no data was transmitted on a PXA270 OHCI
platform. May apply to others too.

Signed-off-by: Juergen Schindele <schindele@nentec.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:38 -08:00
David Hollis 5732ce8424 [PATCH] USB: asix - Add device IDs for 0G0 Cable Ethernet
Add device IDs for the 0G0 Cable Ethernet device as reported by
Charles Lepple <clepple@gmail.com>.

Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:38 -08:00
Luca Risolia a966f3e751 [PATCH] USB: SN9C10x driver updates and bugfixes
SN9C10x driver updates and bugfixes.

Changes: + new, - removed, * cleanup, @ bugfix:

@ fix poll()
@ Remove bad get_ctrl()'s
* Reduce ioctl stack usage
* Remove final ";" from some macro definitions
* Better support for SN9C103
+ Add sn9c102_write_regs()
+ Add 0x0c45/0x602d to the list of SN9C10x based devices
+ Add support for OV7630 image sensors
+ Provide support for the built-in microphone interface of the SN9C103
+ Documentation updates
+ Add 0x0c45/0x602e to the list of SN9C10x based devices

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:38 -08:00
Alexandre Duret-Lutz ec7dc8d254 [PATCH] USB: usb-storage support for SONY DSC-T5 still camera
I've been offered a nice Sony DSC-T5 digital camera, with a USB connection.
Unfortunately it is not recognized by Linux 2.6.14.4's usb-storage.

With the following change I'm able to mount and read my pictures:

Signed-off-by: Phil Dibowitz <phil@ipom.com>
2006-01-31 17:23:37 -08:00
Oliver Neukum 86067eead5 [PATCH] USB: fix oops in acm disconnect
this fixes an oops with disconnection in acm.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:37 -08:00
Oliver Neukum 8e695cdbff [PATCH] USB: cleanup of usblp
this fixes
-potential hang by disconnecting through usbfs
-kzalloc
-general cleanup
-micro optimisation in interrupt handlers

It compiles and I am printing.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:37 -08:00
Matthew Dharm abb02fdf83 [PATCH] USB: usb-storage: Add support for Rio Karma
This patch from Bob Copeland adds support for the Rio Karma portable
digital audio player to the usb-storage driver.  The only thing needed to
support this device is a one-time (per plugin) init command which is sent
to the device.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:37 -08:00
Henk 8e2ce4f92a [PATCH] drivers/usb/input/yealink.c: Cleanup device matching code
This should fix things mentioned below:

	"I was curious why my firewall was loading a 'phone driver'.
	It turns out that the probing in the yealink driver is
	a little too assuming..

	static struct usb_device_id usb_table [] = {
	    { USB_INTERFACE_INFO(USB_CLASS_HID, 0, 0) },
	    { }
	};

	So it picked up my UPS, and loaded the driver.
	Whilst no harm came, because it later checks the vendor/product IDs,
	this driver should probably be rewritten to only probe
	for the device IDs it actually knows about.

	Dave"

Signed-off-by: Henk Vergonet <henk.vergonet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:37 -08:00
Rui Santos 09c280a246 [PATCH] USB: ftdi: Two new ATIK based USB astronomical CCD cameras
Documentation: Specify grayscale specification on ATIK-ATK16
   and ATIK-ATK16HR comments.
New: Add ProductID and VendorID for devices ATIK-ATK16C and
   ATIK-ATK16HRC. These devices are also USB Astronomical CCD
   cameras that work through an FTDI 245BM chip, share the
   same base hardware but, it has a colour CCD chip instead
   of a grayscale one.

Signed-off-by: Rui Santos <rsantos@grupopie.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:37 -08:00
Wouter Paesen ce40d290c1 [PATCH] USB: ftdi_sio: new PID for PCDJ DAC2
The attached patch adds a new PID for the ftdi_sio driver.  It will
enable support for PC-DJ's DAC-2 controller module
(more information on http://www.pcdjhardware.com/DAC2.asp)

Signed-off-by: Wouter Paesen <wouter@kangaroot.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:36 -08:00
Ian Abbott a94b52ac84 [PATCH] USB: ftdi_sio: new IDs for Westrex devices
This patch adds two new devices to the ftdi_sio driver's device ID
table.  The device IDs were supplied by Cory Lee to support two POS
printers made by Westrex International (Model 777 and Model 8900F).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:36 -08:00
Louis Nyffenegger 641adaaee1 [PATCH] USB: new id for ftdi_sio.c and ftdi_sio.h
this patch includes the Vendor Id for a optic fiber to USB device named
TTUSB from thought Technology. It's just add the vendor Id to
ftdi_sio.h and add the Vendor ID and model Id to table_combined.

Signed-off-by: Louis Nyffenegger <louis.nyffenegger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:36 -08:00
Andrew Morton b6daf7f508 [PATCH] USB: fix ehci early handoff issues warning
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:36 -08:00
David Brownell 401feafa62 [PATCH] USB: fix EHCI early handoff issues
This moves the previously widely-used ehci-pci.c BIOS handoff
code into the pci-quirks.c file, replacing the less widely used
"early handoff" version that seems to cause problems lately.

One notable change:  the "early handoff" version always enabled
an SMI IRQ ... and did so even if the pre-Linux code said it was
not using EHCI (and not expecting EHCI SMIs).  Looks like a goof
in a workaround for some unknown BIOS version.

This merged version only forcibly enables those IRQs when pre-Linux
code says it's using EHCI.  And now it always forces them off "just
in case".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:35 -08:00
Ben Collins 6dea93477c Input: hiddev - fix off-by-one for num_values in uref_multi requests
Found this when working with a HAPP UGCI device. It has a usage with 7
indexes. I could read them all one at a time, but using a multiref it
would only allow me to read the first 6. The patch below fixed it.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-31 01:31:13 -05:00
Arjan van de Ven 858119e159 [PATCH] Unlinline a bunch of other functions
Remove the "inline" keyword from a bunch of big functions in the kernel with
the goal of shrinking it by 30kb to 40kb

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:06 -08:00
Linus Torvalds 3e2b32b693 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2006-01-14 10:42:40 -08:00
Adrian Bunk 3824ba7df9 [PATCH] remove unused tmp_buf_sem's
tmp_buf_sem sems to be a common name for something completely unused...

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> ("usb portion")
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 10:41:42 -08:00
Linus Torvalds e7de369050 Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input 2006-01-14 09:49:16 -08:00
Michael Hanselmann eab9edd27f Input: HID - add support for fn key on Apple PowerBooks
This patch implements support for the fn key on Apple PowerBooks using
USB based keyboards and makes them behave like their ADB counterparts.

Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Acked-by: Rene Nussbaumer <linux-kernel@killerfox.forkbomb.ch>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-14 10:08:06 -05:00
Dmitry Torokhov 1e27ffd4d7 Input: wacom - fix compile on PowerPC
Rename G4 (new Graphire4) to WACOM_G4 to avoid clashes on PowerPC

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-14 00:28:04 -05:00
Dmitry Torokhov 5fce9d7bc5 Input: HID - add more simulation usages
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-14 00:27:51 -05:00
Dmitry Torokhov b65d0d1bac Input: HID - fix an oops in PID initialization code
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-14 00:26:15 -05:00
Vojtech Pavlik 940824b0ac Input: HID - add support for Cherry Cymotion keyboard
The Cherry Cymotion is a special Linux keyboard made by Cherry, with
only one little problem: it doesn't work with Linux. This patch
(originally by hexten.net, cleaned up by me) makes it work including
all the special keys.

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-14 00:25:39 -05:00
Russell King d78967fb03 [PATCH] Remove usb gadget generic driver methods
USB gadget drivers make no use of these, remove the pointless
comments.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-13 11:26:11 -08:00
Russell King ac33bc3d54 [PATCH] Add usb_serial_bus_type probe and remove methods
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-13 11:26:09 -08:00
Alan Cox 33f0f88f1c [PATCH] TTY layer buffering revamp
The API and code have been through various bits of initial review by
serial driver people but they definitely need to live somewhere for a
while so the unconverted drivers can get knocked into shape, existing
drivers that have been updated can be better tuned and bugs whacked out.

This replaces the tty flip buffers with kmalloc objects in rings. In the
normal situation for an IRQ driven serial port at typical speeds the
behaviour is pretty much the same, two buffers end up allocated and the
kernel cycles between them as before.

When there are delays or at high speed we now behave far better as the
buffer pool can grow a bit rather than lose characters. This also means
that we can operate at higher speeds reliably.

For drivers that receive characters in blocks (DMA based, USB and
especially virtualisation) the layer allows a lot of driver specific
code that works around the tty layer with private secondary queues to be
removed. The IBM folks need this sort of layer, the smart serial port
people do, the virtualisers do (because a virtualised tty typically
operates at infinite speed rather than emulating 9600 baud).

Finally many drivers had invalid and unsafe attempts to avoid buffer
overflows by directly invoking tty methods extracted out of the innards
of work queue structs. These are no longer needed and all go away. That
fixes various random hangs with serial ports on overflow.

The other change in here is to optimise the receive_room path that is
used by some callers. It turns out that only one ldisc uses receive room
except asa constant and it updates it far far less than the value is
read. We thus make it a variable not a function call.

I expect the code to contain bugs due to the size alone but I'll be
watching and squashing them and feeding out new patches as it goes.

Because the buffers now dynamically expand you should only run out of
buffering when the kernel runs out of memory for real.  That means a lot of
the horrible hacks high performance drivers used to do just aren't needed any
more.

Description:

tty_insert_flip_char is an old API and continues to work as before, as does
tty_flip_buffer_push() [this is why many drivers dont need modification].  It
does now also return the number of chars inserted

There are also

tty_buffer_request_room(tty, len)

which asks for a buffer block of the length requested and returns the space
found.  This improves efficiency with hardware that knows how much to
transfer.

and tty_insert_flip_string_flags(tty, str, flags, len)

to insert a string of characters and flags

For a smart interface the usual code is

    len = tty_request_buffer_room(tty, amount_hardware_says);
    tty_insert_flip_string(tty, buffer_from_card, len);

More description!

At the moment tty buffers are attached directly to the tty.  This is causing a
lot of the problems related to tty layer locking, also problems at high speed
and also with bursty data (such as occurs in virtualised environments)

I'm working on ripping out the flip buffers and replacing them with a pool of
dynamically allocated buffers.  This allows both for old style "byte I/O"
devices and also helps virtualisation and smart devices where large blocks of
data suddenely materialise and need storing.

So far so good.  Lots of drivers reference tty->flip.*.  Several of them also
call directly and unsafely into function pointers it provides.  This will all
break.  Most drivers can use tty_insert_flip_char which can be kept as an API
but others need more.

At the moment I've added the following interfaces, if people think more will
be needed now is a good time to say

 int tty_buffer_request_room(tty, size)

Try and ensure at least size bytes are available, returns actual room (may be
zero).  At the moment it just uses the flipbuf space but that will change.
Repeated calls without characters being added are not cumulative.  (ie if you
call it with 1, 1, 1, and then 4 you'll have four characters of space.  The
other functions will also try and grow buffers in future but this will be a
more efficient way when you know block sizes.

 int tty_insert_flip_char(tty, ch, flag)

As before insert a character if there is room.  Now returns 1 for success, 0
for failure.

 int tty_insert_flip_string(tty, str, len)

Insert a block of non error characters.  Returns the number inserted.

 int tty_prepare_flip_string(tty, strptr, len)

Adjust the buffer to allow len characters to be added.  Returns a buffer
pointer in strptr and the length available.  This allows for hardware that
needs to use functions like insl or mencpy_fromio.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:59 -08:00
Jesper Juhl 3c6bee1d40 [PATCH] turn "const static" into "static const"
ICC likes to complain about storage class not being first, GCC doesn't
care much (except for cases like "inline static").
have a hard time seeing how it could break anything.

Thanks to Gabriel A. Devenyi for pointing out
http://linuxicc.sourceforge.net/ which is what made me create this patch.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:55 -08:00
Linus Torvalds 80c0531514 Merge master.kernel.org:/pub/scm/linux/kernel/git/mingo/mutex-2.6 2006-01-09 17:31:38 -08:00
Jes Sorensen 1b1dcc1b57 [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.

Modified-by: Ingo Molnar <mingo@elte.hu>

(finished the conversion)

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2006-01-09 15:59:24 -08:00
Jesper Juhl b3c29d85bf Small fixups to the EHCI Kconfig help text
Here's a small patch with a few tiny fixups for the EHCI Kconfig help
text. Please consider applying.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-10 00:35:22 +01:00
Adrian Bunk 93b1fae491 spelling: s/trough/through/
Additionally, one comment was reformulated by Joe Perches <joe@perches.com>.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-10 00:13:33 +01:00
Adrian Bunk 943ffb587c spelling: s/retreive/retrieve/
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-10 00:10:13 +01:00
Arnd Bergmann 0d0fbf8152 V4L (926_2): Moves compat32 functions from fs to v4l subsystem
This moves the 32 bit ioctl compatibility handlers for
Video4Linux into a new file and adds explicit calls to them
to each v4l device driver.

Unfortunately, there does not seem to be any code handling
the v4l2 ioctls, so quite often the code goes through two
separate conversions, first from 32 bit v4l to 64 bit v4l,
and from there to 64 bit v4l2. My patch does not change
that, so there is still much room for improvement.

Also, some drivers have additional ioctl numbers, for
which the conversion should be handled internally to
that driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-09 15:24:57 -02:00
Eric Dumazet 5160ee6fc8 [PATCH] shrink dentry struct
Some long time ago, dentry struct was carefully tuned so that on 32 bits
UP, sizeof(struct dentry) was exactly 128, ie a power of 2, and a multiple
of memory cache lines.

Then RCU was added and dentry struct enlarged by two pointers, with nice
results for SMP, but not so good on UP, because breaking the above tuning
(128 + 8 = 136 bytes)

This patch reverts this unwanted side effect, by using an union (d_u),
where d_rcu and d_child are placed so that these two fields can share their
memory needs.

At the time d_free() is called (and d_rcu is really used), d_child is known
to be empty and not touched by the dentry freeing.

Lockless lookups only access d_name, d_parent, d_lock, d_op, d_flags (so
the previous content of d_child is not needed if said dentry was unhashed
but still accessed by a CPU because of RCU constraints)

As dentry cache easily contains millions of entries, a size reduction is
worth the extra complexity of the ugly C union.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: Maneesh Soni <maneesh@in.ibm.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Paul Jackson <pj@sgi.com>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:13:58 -08:00
Tim Schmielau de25968cc8 [PATCH] fix more missing includes
Include fixes for 2.6.14-git11.  Should allow to remove sched.h from
module.h on i386, x86_64, arm, ia64, ppc, ppc64, and s390.  Probably more
to come since I haven't yet checked the other archs.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:13:45 -08:00
Linus Torvalds b9abaa3fb7 Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2006-01-07 11:29:51 -08:00
Russell King f8ce25476d [ARM] Move asm/hardware/clock.h to linux/clk.h
This is needs to be visible to other architectures using the AMBA
bus and peripherals.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-07 16:15:52 +00:00
Russell King 123656d4cc Merge with Linus' kernel. 2006-01-07 14:40:05 +00:00
Laurent Riffard 604f28e2b8 [PATCH] i2c: Drop i2c_driver.{owner,name}, 5 of 11
We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.

This patch updates the drivers/media/video and usb/media drivers.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:23 -08:00
Michael Hanselmann 1f85145c58 Input: add missing keys from input.h to hid-debug.h
Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-05 23:00:26 -05:00
Dmitry Torokhov fed8bf19ec Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-01-05 22:25:13 -05:00
Dominik Brodowski f8cfa618dc [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback
Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
probe() callback. As all in-kernel drivers are changed to this new
callback, there will be no temporary backwards-compatibility. Inside a
probe() function, each driver _must_ set struct pcmcia_device
*p_dev->instance and instance->handle correctly.

With these patches, the basic driver interface for 16-bit PCMCIA drivers
now has the classic four callbacks known also from other buses:

        int (*probe)            (struct pcmcia_device *dev);
        void (*remove)          (struct pcmcia_device *dev);

        int (*suspend)          (struct pcmcia_device *dev);
        int (*resume)           (struct pcmcia_device *dev);

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:24 +01:00
Dominik Brodowski b463581154 [PATCH] pcmcia: remove dev_list from drivers
The linked list of devices managed by each PCMCIA driver is, in very most
cases, unused. Therefore, remove it from many drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:20 +01:00
Dominik Brodowski cc3b4866be [PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callback
Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function.
Old functionality is preserved, for the moment.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:10 +01:00
Dominik Brodowski 98e4c28b7e [PATCH] pcmcia: new suspend core
Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.

Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew Morton <akpm@osdl.org>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-05 23:59:02 +01:00
Linus Torvalds db9edfd7e3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Trivial manual merge fixup for usb_find_interface clashes.
2006-01-04 18:44:12 -08:00
Linus Torvalds 52347f4e81 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-01-04 16:34:57 -08:00
Kay Sievers 312c004d36 [PATCH] driver core: replace "hotplug" by "uevent"
Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 16:18:08 -08:00
Sam Bishop c8dd7709c5 [PATCH] USB: fix usb-skeleton limit resource usage patch.
Prevents a compiler warning and uses down_interruptible() instead of down() in
process context.

Signed-off-by: Sam Bishop <sam@bishop.dhs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:45 -08:00
Olav Kongas cb5b3f6950 [PATCH] USB: fix buffer size limiting in skeleton driver
Fix buffer size limiting.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:45 -08:00
Pete Zaitcev f5691d70d4 [PATCH] USB: fix usb_find_interface for ppc64
Fix usb_find_interface. You cannot case pointers to int and long on
a big-endian 64-bitter without consequences.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
David Woodhouse a9714c845c [PATCH] USB: Export IEEE-1284 device id in sysfs for usblp devices
I looked at the userspace code which uses the LPIOC_GET_DEVICE_ID ioctl
and I almost went blind. Let's export it in sysfs instead, and just as a
string instead of with a big-endian length at the beginning of it.

This also prints the message about finding the printer _after_ we know
the minor device number it's going to have, rather than reporting all
printers as 'usblp0'.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
Pete Zaitcev 318e479eb7 [PATCH] USB: ioctl compat for usblp.c
From: David Woodhouse <dwmw2>

David has a G5 with a printer. I am quite surprised that nobody else noticed
this before. Linus has a G5. Hackers hate printing in general, maybe.

We do not use BKL anymore, because one of code paths had a sleeping call,
so we had to use a semaphore. I am sure it's safe to use unlocked_ioctl.

The new ioctls return long and retval is int. It looks completely fine to me.
We never want these extra bits, and the sign extension ought to work right.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

--
2006-01-04 13:51:44 -08:00
Nathan Lynch a083dec0ed [PATCH] USB: zd1201: make sysfs device symlink
Noticed that my zd1201 adapter isn't "seen" by hal and NetworkManager.
The problem seems to be that unlike other network device drivers I
checked, zd1201 does not do a SET_NETDEV_DEV(), which makes it so a
"device" symlink is created under /sys/class/net/wlan0.

With the following patch the device symlink shows up, and now I am
happily using NetworkManager to control the adapter:

$ ls -l /sys/class/net/wlan0
total 0
-r--r--r--  1 root root 4096 Dec 18 13:42 address
-r--r--r--  1 root root 4096 Dec 18 13:42 addr_len
-r--r--r--  1 root root 4096 Dec 18 13:42 broadcast
-r--r--r--  1 root root 4096 Dec 18 13:42 carrier
lrwxrwxrwx  1 root root    0 Dec 18 13:42 device -> ../../../devices/pci0001:10/0001:10:1b.1/usb4/4-1
-r--r--r--  1 root root 4096 Dec 18 13:42 features

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
Oliver Neukum ff90651883 [PATCH] USB: Limiting of resource use in skeleton driver
this introduces limits whose lack in the skeleton driver someone recently
complained about.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
Pete Zaitcev aafbf24a11 [PATCH] USB: replace __setup("nousb") with __module_param_call
Fedora users complain that passing "nousbstorage" to the installer causes
the rest of the USB support to disappear. The installer uses kernel command
line as a way to pass options through Syslinux. The problem stems from the
use of strncmp() in obsolete_checksetup().

I used __module_param_call() instead of module_param because I wanted to
preserve the old syntax in grub.conf, and it's the only macro which allows
to remove the prefix.

The fix is tested to accept the option "nousb" correctly now.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
David Hollis 5e0f76c6bb [PATCH] USB: asix.c - Add Linksys USB200M Rev 2 ids
Attached patch adds device IDs for the Linksys USB200M Rev 2 device
which uses the AX88772 chipset.

Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
Phil Dibowitz 3e220e9505 [PATCH] USB Storage: Fix unusual_devs.h order
Alan Stern pointed out there was an ordering issue in unusual_devs.h,
and this patch fixes it.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
Daniel Marjamki 6b495f4c5a [PATCH] USB: isp116x-hcd.c: Removed unused variable
Removed unused variable

Signed-off-by: Daniel Marjamki <daniel.marjamaki@comhem.se>
Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Jesper Juhl 0e8eb0f06b [PATCH] USB: Remove unneeded kmalloc() return value casts
Remove kmalloc() return value casts that we don't need from
drivers/usb/*

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Ian Abbott 740a4282ed [PATCH] USB: ftdi_sio: new IDs for Teratronik devices
This patch adds vendor and product IDs to the ftdi_sio driver's device
ID table for two devices from teratronik.de.  The device IDs were
submitted by O. Wlfelschneider of Teratronik Elektronische Systeme
GmbH.

The charset of the patch is latin-1, same as the original files.

Please apply, thanks!  (I've tried to avoid a clash with Andrew Morton's
patch to add support for Posiflex PP-7700 printer to the same driver.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Pavel Fedin effac8be4e [PATCH] USB: Support for Posiflex PP-7000 retail printer in Linux
This little patch adds recognition of Posiflex PP-7000 retail printer to
ftdo_sio module. The printer uses FT232BM bridge programmed with custom
VID/PID.  The patch posted to lkml and sf.net was for 2.6.11.1 kernel,
here is one reworked for 2.6.12.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Ville Syrjl 735b0cbb5b [PATCH] USB: add driver for ATI/Philips USB RF remotes
Summary: Driver for ATI/Philips USB RF remotes

This is a new input driver for ATI/Philips USB RF remotes (eg. ATI
Remote Wonder II).

Signed-off-by: Ville Syrjl <syrjala@sci.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Tobias Klauser 52950ed40d [PATCH] USB: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of ARRAY_SIZE. Some trailing whitespaces are also removed.

Patch is compile-tested on i386.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Alan Stern f3d34ed48c [PATCH] USB: fix local variable clash
This patch (as621) fixes a local variable conflict I accidently
introduced into usb_set_configuration.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:42 -08:00
Paul Walmsley 3717f2952b [PATCH] USB: usb-storage: add debug entry for REPORT LUNS
Bugs involving the REPORT LUNS SCSI-3 command are much easier to track
down if usb-storage displays the command's name, rather than "(Unknown
command)".

Signed-off-by: Paul Walmsley <paul@booyaka.com>
Cc: <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:42 -08:00
Matthew Dharm e80b0fade0 [PATCH] USB Storage: add alauda support
This patch adds another usb-storage subdriver, which supports two fairly
old dual-XD/SmartMedia reader-writers (USB1.1 devices).

This driver was written by Daniel Drake <dsd@gentoo.org> -- he notes
that he wrote this driver without specs, however a vendor-supplied GPL
driver for the previous generation of products ("sma03") did prove to be
quite useful, as did the sddr09 driver which also has to deal with
low-level physical block layout on SmartMedia.

The original patch has been reformed by me, as it clashed with the
libusual patches.

We really need to consolidate some of this common SmartMedia code, and
get together with the MTD guys to share it with them as well.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:42 -08:00
Matthew Dharm a6c976c6c4 [PATCH] USB Storage: more sddr09 cleanups
This is the third of three patches to prepare the sddr09 subdriver for
conversion to the Sim-SCSI framework.  This patch (as596) moves the
computation of the LBA to the start of the read/write routines, so that
addresses completely beyond the end of the device can be detected and
reported differently from transfers that are partially within the
device's capacity.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Andries Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:42 -08:00
Matthew Dharm 0dc08a3575 [PATCH] USB Storage: sddr09 cleanups
This is the second of three patches to prepare the sddr09 subdriver for
conversion to the Sim-SCSI framework.  This patch (as595) updates the
code to use standard error values for return codes instead of our
special-purpose USB_STOR_TRANSPORT_... codes.  The reverse update is
then needed in the transport routine, but with the Sim-SCSI framework
that routine will go away.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Andries Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Matthew Dharm f5b8cb9c91 [PATCH] USB Storage: cleanups of sddr09
This is the first of three patches to prepare the sddr09 subdriver for
conversion to the Sim-SCSI framework.  This patch (as594) straightens
out the initialization procedures and headers:

	Some ugly code from usb.c was moved into sddr09.c.

	Set-up of the private data structures was moved into the
	initialization routine.

	The connection between the "dpcm" version and the standalone
	version was clarified.

	A private declaration was moved from a header file into the
	subdriver's .c file.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Andries Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Matthew Dharm 7931e1c6f8 [PATCH] USB Storage: make OneTouch PM-aware
The OneTouch subdriver submits its own interrupt URB for notifications
about button presses.  Consequently it needs to know about suspend and
resume events, so it can cancel or restart the URB.

This patch (as593) adds a hook to struct us_data, to be used for
notifying subdrivers about Power Management events, and it implements
the hook in the OneTouch driver.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Nick Sillik <n.sillik@temple.edu>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Pete Zaitcev b9b0942257 [PATCH] USB: Let usbmon collect less garbage
Alan Stern pointed out that (in 2.6 kernel) one successful submission results
in one callback, even for ISO-out transfers. Thus, the silly check can be
removed from usbmon. This reduces the amount of garbage printed in case
of ISO and Interrupt transfers.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Alan Stern 687f5f3428 [PATCH] USB: UHCI: edit some comments
This patch (as615b) edits a large number of comments in the uhci-hcd code,
mainly removing excess apostrophes.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Alan Stern fa3465689f [PATCH] USB: UHCI: change uhci_explen macro
This patch (as616) changed the uhci_explen macro in uhci-hcd.h so that
it now accepts the desired length, rather than length - 1 with special
handling for 0.  This also fixes a minor bug that would show up only
when a driver submits a 0-length bulk URB.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Marcelo Feitoza Parisi f0b80fbf29 [PATCH] USB: ati_remote: use time_before() and friends
They deal with wrapping correctly and are nicer to read.

Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Horst Schirmeier 95f209f936 [PATCH] USB: pl2303_update_line_status data length fix
Minimum data length must be UART_STATE + 1, as data[UART_STATE] is being
accessed for the new line_state. Although PL-2303 hardware is not
expected to send data with exactly UART_STATE length, this keeps it on
the safe side.

Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
fabien COSSE 17fa6e552f [PATCH] USB Storage: add unusual_devs entry for NIKON Coolpix 2000
This patch adds an unusual_devs.h entry for NIKON Coolpix 2000 camera
wich cause error: "Not Ready: Medium not present"
Works fine with th patched kernel...

Here are the informations in /proc/bus/usb/devices:

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=04b0 ProdID=0301 Rev= 0.10
S:  Manufacturer=NIKON
S:  Product=NIKON DSC E2000
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=16ms

Signed-off-by: Fabien COSSE <fabien.cosse@wanadoo.fr>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:40 -08:00
Richard Purdie a5e36d2089 [PATCH] USB: Correct ohci-pxa27x suspend/resume struct confusion
The device data in ohci-pxa27x is a struct hcd, not a struct ohci_hcd.
This correct the suspend/resume calls to account for this and adds some
code to invalidate the platform data when the module is removed.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:40 -08:00
Arjan van de Ven 4c4c9432a6 [PATCH] USB: mark various usb tables const
patch below marks various USB tables and variables as const so that they
end up in .rodata section and don't cacheline share with things that get
written to. For the non-array variables it also allows gcc to optimize
more.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:40 -08:00
Adrian Bunk 9fe6fcd8cc [PATCH] USB: drivers/usb/misc/sisusbvga/sisusb.c: remove dead code
The Coverity checker found this dead code.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:40 -08:00
Alan Stern 2425e9fe67 [PATCH] USB: Don't assume root-hub resume succeeds
This patch (as614) makes a small change to the part of the hub driver
responsible for remote wakeup of root hubs.  When these wakeups occur
the driver is suspended, and in case the resume fails the driver should
remain suspended -- it shouldn't try to proceed with its normal
processing.

This will hardly ever matter in normal use, but it did crop up while I
was debugging a different problem.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:40 -08:00
Alan Stern 3cf0a22e8b [PATCH] USB Gadget: dummy_hcd: updates to hcd->state
This patch (as613) moves the updates to hcd->state in the dummy_hcd
driver to where they now belong.  It also uses the new
HC_FLAG_HW_ACCESSIBLE flag in a way that simulates a real PCI
controller, and it adds checks for attempts to resume the bus while the
controller is suspended or to suspend the controller while the bus is
active.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:40 -08:00
Alan Stern a21d4fed4b [PATCH] USB Gadget: file_storage: remove "volatile" declarations
This patch (as612) removes the "volatile" declarations from the
file-storage gadget.  It turns out that they aren't needed for anything
much; adding a few memory barriers does a sufficient job.

The patch also removes a wait_queue.  Not much point having a queue when
only one task is ever going to be on it!

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:40 -08:00
Chris Humbert bd39b7f195 [PATCH] USB: don't allocate dma pools for PIO HCDs
USB: don't allocate dma pools for PIO HCDs

hcd_buffer_alloc() and hcd_buffer_free() have a similar dma_mask
check and revert to kmalloc()/kfree(), but hcd_buffer_create()
doesn't check dma_mask and allocates unused dma pools.

Signed-off-by: Chris Humbert <mahadri-kernel@drigon.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:39 -08:00
Daniel Ritz 5d3202949c [PATCH] USB: input/touchkitusb: handle multiple packets
Some versions of the controller seem to put multiple report packet into a
single urb. also it can happen that a packet is split across multiple urbs.
unpatched you get a jumpy cursor on some screens.
the patch does:
- handle multiple packets per urb
- handle packets split across multiple urb
- check packet type
- cleanups

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:39 -08:00
Luiz Fernando Capitulino 8a4613f01f [PATCH] USB: usbserial: race-condition fix.
There is a race-condition in usb-serial driver that can be triggered if
a processes does 'port->tty->driver_data = NULL' in serial_close() while
other processes is in kernel-space about to call serial_ioctl() on the
same port.

This happens because a process can open the device while there is
another one closing it.

The patch below fixes that by adding a semaphore to ensure that no
process will open the device while another process is closing it.

Note that we can't use spinlocks here, since serial_open() and
serial_close() can sleep.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:35 -08:00
Luiz Fernando Capitulino 487f9c6710 [PATCH] USB: usbserial: Adds missing checks and bug fix.
Checks if 'port' is NULL before using it in all tty operations, this
can avoid NULL pointer dereferences.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:35 -08:00
Olav Kongas 717f736d93 [PATCH] USB: isp116x-hcd: minor cleanup
When going to suspend, there's no point in setting HC state in
host controller driver as USB core takes care of this.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:35 -08:00
Pavel Machek 3aea4a76a3 [PATCH] USB: Cleanups for usb gadget mass-storage
Remove useless initalizers.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
2006-01-04 13:48:35 -08:00
Alan Stern 12c3da346e [PATCH] USB: Store port number in usb_device
This patch (as610) adds a field to struct usb_device to store the device's
port number.  This allows us to remove several loops in the hub driver
(searching for a particular device among all the entries in the parent's
array of children).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:35 -08:00
Alan Stern 55c527187c [PATCH] USB: Consider power budget when choosing configuration
This patch (as609) changes the way we keep track of power budgeting for
USB hubs and devices, and it updates the choose_configuration routine to
take this information into account.  (This is something we should have
been doing all along.)  A new field in struct usb_device holds the amount
of bus current available from the upstream port, and the usb_hub structure
keeps track of the current available for each downstream port.

Two new rules for configuration selection are added:

	Don't select a self-powered configuration when only bus power
	is available.

	Don't select a configuration requiring more bus power than is
	available.

However the first rule is #if-ed out, because I found that the internal
hub in my HP USB keyboard claims that its only configuration is
self-powered.  The rule would prevent the configuration from being chosen,
leaving the hub & keyboard unconfigured.  Since similar descriptor errors
may turn out to be fairly common, it seemed wise not to include a rule
that would break automatic configuration unnecessarily for such devices.

The second rule may also trigger unnecessarily, although this should be
less common.  More likely it will annoy people by sometimes failing to
accept configurations that should never have been chosen in the first
place.

The patch also changes usbcore's reaction when no configuration is
suitable.  Instead of raising an error and rejecting the device, now
the core will simply leave the device unconfigured.  People can always
work around such problems by installing configurations manually through
sysfs.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:34 -08:00
Fengwei Yin 949bf64311 [PATCH] USB: One potential problem in gadget/serial.c
It looks like that the gs_serial module maybe sleep with spinlock in gs_close.
Sometimes, system hang when I remove the gs_serial module.

From: Fengwei Yin <xaityyy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:34 -08:00
Adrian Bunk 3d48586cfa [PATCH] USB: small cleanups
This patch contains the following cleanups:
- make needlessly global functions static
- every file should #include the headers containing the prototypes for
  it's global functions

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:34 -08:00
Alan Stern 4bf0ba8614 [PATCH] USB: Fix locking for USB suspend/resume
The earlier USB locking updates didn't touch the suspend/resume
routines.  They need updating as well, since now the caller holds the
device semaphore.  This patch (as608) makes the necessary changes.  It
also adds a line to store the correct power state when a device is
resumed, something which was unaccountably missing.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:34 -08:00
Alan Stern 7d069b7d80 [PATCH] USB: Disconnect children during hub unbind
This patch (as606b) is an updated version of my earlier patch to
disconnect children from a hub device when the hub driver is unbound.
Thanks to the changes in the driver core locking, we now know that the
entire hub device (and not just the interface) is locked whenever the
hub driver's disconnect method runs.  Hence it is safe to disconnect the
child device structures immediately instead of deferring the job.

The earlier version of the patch neglected to disable the hub's ports.
We don't want to forget that; otherwise we'd end up with live devices
using addresses that have been recycled.  This update adds the necessary
code.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:34 -08:00