powerpc.git
17 years agoUSB: sierra: add more checks on shutdown
Greg Kroah-Hartman [Thu, 26 Apr 2007 07:12:01 +0000 (00:12 -0700)]
USB: sierra: add more checks on shutdown

This should help with any potential NULL pointer usages as reported by a
few users.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: add an ohci board-specific quirk
David Brownell [Tue, 17 Apr 2007 20:06:29 +0000 (13:06 -0700)]
USB: add an ohci board-specific quirk

Use the new ohci-pci quirk infrastructure to address the problem it was
created to address: a quirk specific to the Portege 4000, in buzilla as

http://bugzilla.kernel.org/show_bug.cgi?id=6723

Also fix a misuse of "__devinit" for the quirk functions.  It must not
be used without first ensuring that the references from the quirk tables
are gone, and that the function using those quirk tables is also gone.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: usbnet reports minidriver name through ethtool
David Brownell [Tue, 17 Apr 2007 23:10:10 +0000 (16:10 -0700)]
USB: usbnet reports minidriver name through ethtool

Update "usbnet" so that ethtool reports the name of the minidriver in use
(e.g. asix, cdc_ether, dm9601, rndis_host) instead of "usbnet".  This is a
better match to how other network drivers work, resolving a minor open issue.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: rndis_host, various cleanups
David Brownell [Wed, 18 Apr 2007 00:53:20 +0000 (17:53 -0700)]
USB: rndis_host, various cleanups

Cleanups to the rndis_host code, and a tweak that helps talking to
PXA hardware.  Mostly from Ole André Vadla Ravnås <oleavr@gmail.com>

  - Prevent SET_INTERFACE requests, they give PXA hardware bad indigestion
  - For paranoia, null a pointer after freeing its data
  - Wrap up ActiveSync oddities for RNDIS_QUERY in one routine
  - Use that wrapper when getting the Ethernet address
  - Whitespace fixes

Plus add a comment noting the open issues about some RNDIS clients still
needing TBD kinds of browbeating to accept non-jumbogram packets.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: <linux/usb/ch9.h> minor doc update
David Brownell [Wed, 18 Apr 2007 00:51:38 +0000 (17:51 -0700)]
USB: <linux/usb/ch9.h> minor doc update

Minor doc update to <linux/usb/ch9.h> ... say where USB_DT_CS_* came
from and update the definitions to match how they're derived there.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix signed jiffies issue in autosuspend logic
Alan Stern [Wed, 11 Apr 2007 16:06:16 +0000 (12:06 -0400)]
USB: fix signed jiffies issue in autosuspend logic

This patch (as897) changes the autosuspend timer code to use the
standard types and macros in dealing with jiffies values.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousbmon: bus zero
Pete Zaitcev [Wed, 11 Apr 2007 20:47:26 +0000 (13:47 -0700)]
usbmon: bus zero

Add the "bus zero" feature to the usbmon. If a user process specifies bus
with number zero, it receives events from all buses. This is useful when
we wish to see initial enumeration when a bus is created, typically after
a modprobe. Until now, an application had to loop until a new bus could
be open, then start capturing on it. This procedure was cumbersome and
could lose initial events. Also, often it's too bothersome to find exactly
to which bus a specific device is attached.

Paolo Albeni provided the original concept implementation. I added the
handling of "bus->monitored" flag and generally fixed it up.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: Allow transfer_buffer with transfer_dma
Tony Lindgren [Sun, 1 Apr 2007 01:15:43 +0000 (18:15 -0700)]
USB: Allow transfer_buffer with transfer_dma

Some host controller drivers may need a PIO fallback when a DMA channel
is temporarily unavailable.  This patch provides an address that such
drivers can use for PIO in those cases, and nulls that field out when
no such address is available (highmem) which should help usbmon.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: cleanup ofd adutux
Oliver Neukum [Mon, 2 Apr 2007 13:16:36 +0000 (15:16 +0200)]
USB: cleanup ofd adutux

this driver does
- ignore errors during open
- submit a running urb
- use down_interruptible not handling signals
- GFP_KERNEL with a spinlock held

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: add "last_busy" field for use in autosuspend
Alan Stern [Tue, 27 Mar 2007 17:33:59 +0000 (13:33 -0400)]
USB: add "last_busy" field for use in autosuspend

This patch (as877) adds a "last_busy" field to struct usb_device, for
use by the autosuspend framework.  Now if an autosuspend call comes at
a time when the device isn't busy but hasn't yet been idle for long
enough, the timer can be set to exactly the desired value.  And we
will be ready to handle things like HID drivers, which can't maintain
a useful usage count and must rely on the time-of-last-use to decide
when to autosuspend.

The patch also makes some related minor improvements:

Move the calls to the autosuspend condition-checking routine
into usb_suspend_both(), which is the only place where it
really matters.

If the autosuspend timer is already running, don't stop
and restart it.

Replace immediate returns with gotos so that the optional
debugging ouput won't be bypassed.

If autoresume is disabled but the device is already awake,
don't return an error for an autoresume call.

Don't try to autoresume a device if it isn't suspended.
(Yes, this undercuts the previous change -- so sue me.)

Don't duplicate existing code in the autosuspend work routine.

Fix the kerneldoc in usb_autopm_put_interface(): If an
autoresume call fails, the usage counter is left unchanged.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: whiteheat: Convert to generic boolean
Richard Knutsson [Tue, 27 Mar 2007 06:00:28 +0000 (22:00 -0800)]
USB: whiteheat: Convert to generic boolean

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Acked-by: Stuart MacDonald <stuartm@connecttech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix omninet write vs. close race
Oliver Neukum [Tue, 27 Mar 2007 14:02:34 +0000 (16:02 +0200)]
USB: fix omninet write vs. close race

omninet kills all URBs in close. However write() returns as soon as
the URB has been submitted. Killing the last URB means a race that
can lose that date written in the last call to write().
As a fix this is moved to shutdown().

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix error handling for mct_u232
Oliver Neukum [Thu, 29 Mar 2007 08:45:17 +0000 (10:45 +0200)]
USB: fix error handling for mct_u232

we report errors to the caller. THis patch adds error handling to the driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix error handling in kl5kusb
Oliver Neukum [Thu, 29 Mar 2007 09:23:54 +0000 (11:23 +0200)]
USB: fix error handling in kl5kusb

- report errors
- cleanup in error case
- use of endianness macros

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix catc error handling
Oliver Neukum [Fri, 30 Mar 2007 11:11:00 +0000 (13:11 +0200)]
USB: fix catc error handling

this driver ignores errors while starting the transmit queue. It will
never be reported stopped as the completion handler won't run
and it will never be started again as it will be considered started.
This patch adds error handling.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: cypress_cy7c63: race disconnect/sysfs read-write leading to following NULL pointer
Oliver Neukum [Fri, 30 Mar 2007 08:52:16 +0000 (10:52 +0200)]
USB: cypress_cy7c63: race disconnect/sysfs read-write leading to following NULL pointer

this driver sets intfdata to NULL while it still can be read and happily followed.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix ark3116 memory leak
Oliver Neukum [Mon, 26 Mar 2007 16:12:44 +0000 (18:12 +0200)]
USB: fix ark3116 memory leak

this driver has a memory leak in an error case.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: ftdi_sio: Add USB ID of ADSTech USBX-707
Jelle Foks [Mon, 26 Mar 2007 01:08:35 +0000 (21:08 -0400)]
USB: ftdi_sio: Add USB ID of ADSTech USBX-707

This patch adds the USB ID of the ADS Tech USBX-707 USB IR blaster (that
comes with the ADS Tech PTV-305 grabber card), which has a ftdi232bm
inside hooked up to a pic.

With this it should be fairly straightforward to make at least lirc
receiving work with this device. I will submit a patch to lirc for that
as soon as I have one ready, I'm getting data with minicom with this
patch, but need to figure out some more details such as best/correct
baudrate.

Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix race in ftdio_write
Oliver Neukum [Fri, 23 Mar 2007 13:30:16 +0000 (14:30 +0100)]
USB: fix race in ftdio_write

this has the same race as the visor driver. The counter must be incremented
under the lock it is checked under.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix race in visor_write
Oliver Neukum [Fri, 23 Mar 2007 10:58:03 +0000 (11:58 +0100)]
USB: fix race in visor_write

this fixes a small race in visor_write.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: aircable cleanup
Oliver Neukum [Mon, 26 Mar 2007 14:55:16 +0000 (16:55 +0200)]
USB: aircable cleanup

- proper endianness macros
- scheduling in interrupt in error case

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Naranjo Manuel Francisco <naranjo.manuel@gmail.com>
17 years agoUSB: make usbdevices export their device nodes instead of using a separate class
Kay Sievers [Tue, 13 Mar 2007 14:59:31 +0000 (15:59 +0100)]
USB: make usbdevices export their device nodes instead of using a separate class

o The "real" usb-devices export now a device node which can
  populate /dev/bus/usb.

o The usb_device class is optional now and can be disabled in the
  kernel config. Major/minor of the "real" devices and class devices
  are the same.

o The environment of the usb-device event contains DEVNUM and BUSNUM to
  help udev and get rid of the ugly udev rule we need for the class
  devices.

o The usb-devices and usb-interfaces share the same bus, so I used
  the new "struct device_type" to let these devices identify
  themselves. This also removes the current logic of using a magic
  platform-pointer.
  The name of the device_type is also added to the environment
  which makes it easier to distinguish the different kinds of devices
  on the same subsystem.

  It looks like this:
    add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1
    SUBSYSTEM=usb
    SEQNUM=1533
    MAJOR=189
    MINOR=131
    DEVTYPE=usb_device
    PRODUCT=46d/c03e/2000
    TYPE=0/0/0
    BUSNUM=002
    DEVNUM=004

This udev rule works as a replacement for usb_device class devices:
  SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
    NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"

Updated patch, which needs the device_type patches in Greg's tree.

I also got a bugzilla assigned for this. :)
  https://bugzilla.novell.com/show_bug.cgi?id=250659

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: gadget-storage needs BLOCK
Randy Dunlap [Wed, 21 Mar 2007 20:57:51 +0000 (13:57 -0700)]
USB: gadget-storage needs BLOCK

With CONFIG_BLOCK=n, this build error happens:
WARNING: "bdev_read_only" [drivers/usb/gadget/g_file_storage.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: add power/level sysfs attribute
Alan Stern [Tue, 20 Mar 2007 18:59:39 +0000 (14:59 -0400)]
USB: add power/level sysfs attribute

This patch (as874) adds another piece to the user-visible part of the
USB autosuspend interface.  The new power/level sysfs attribute allows
users to force the device on (with autosuspend off), force the device
to sleep (with autoresume off), or return to normal automatic operation.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: ati_remote2: Add channel support
Peter Stokes [Sat, 17 Mar 2007 14:14:12 +0000 (16:14 +0200)]
USB: ati_remote2: Add channel support

Add logical channel support for ATI Remote Wonder II

The ATI Remote Wonder II can be configured with one of 16 unique logical
channels. Allowing up to 16 remotes to be used independently within
range of each other. This change adds functionality to configure the
receiver and filter the input data to respond or exclude remotes
configured with different logical channels.

Signed-off-by: Peter Stokes <linux@dadeos.freeserve.co.uk>
Acked-by: Ville Syrjala <syrjala@sci.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: sierra close race
Oliver Neukum [Tue, 20 Mar 2007 12:54:05 +0000 (13:54 +0100)]
USB: sierra close race

the sierra driver does not directly use usb_kill_urb(). It uses a wrapper.
This wrapper means that callbacks which are running are not killed during
close, resubmitting and illicitly pushing data into the tty layer.
The whole purpose of usb_kill_urb() is subverted. The wrapper must be removed.
The same problem as the option driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: option close race
Oliver Neukum [Tue, 20 Mar 2007 12:41:21 +0000 (13:41 +0100)]
USB: option close race

the option driver does not directly use usb_kill_urb(). It uses a wrapper.
This wrapper means that callbacks which are running are not killed during
close, resubmitting and illicitly pushing data into the tty layer.
The whole purpose of usb_kill_urb() is subverted. The wrapper must be removed.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: omninet memory leak in error case
Oliver Neukum [Tue, 20 Mar 2007 12:15:05 +0000 (13:15 +0100)]
USB: omninet memory leak in error case

memory allocated must be freed in the error case.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUHCI: Add some WARN_ON()s
Alan Stern [Mon, 19 Mar 2007 19:33:11 +0000 (15:33 -0400)]
UHCI: Add some WARN_ON()s

This patch (as872) adds some WARN_ON()s to various error checks which
are never supposed to fail.  Unsettlingly, one of them has shown up in
a user's log!  Maybe making the warning more visible and having the
call-stack information available will help pinpoint the source of the
problem.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix endianness in mos7720
Oliver Neukum [Mon, 19 Mar 2007 12:58:29 +0000 (13:58 +0100)]
USB: fix endianness in mos7720

there's code unclean w.r.t. endianness in the mos7720 driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: gtco.c: fix a use-before-check
Adrian Bunk [Mon, 19 Mar 2007 09:26:32 +0000 (10:26 +0100)]
USB: gtco.c: fix a use-before-check

NULL checks should be before the first dereference.

Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: iowarrior.c: fix NULL dereference
Oliver Neukum [Mon, 19 Mar 2007 10:39:13 +0000 (11:39 +0100)]
USB: iowarrior.c: fix NULL dereference

Am Montag, 19. 2007 10:25 schrieb Adrian Bunk:
> The Coverity checker spotted the following NULL dereference:

And this fixes an oops upon allocation failures.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: dm9601: fix sparse NULL warnings
Randy Dunlap [Sat, 17 Mar 2007 01:33:13 +0000 (18:33 -0700)]
USB: dm9601: fix sparse NULL warnings

Fix sparse NULL warnings:

drivers/usb/net/dm9601.c:88:23: warning: Using plain integer as NULL pointer
drivers/usb/net/dm9601.c:174:22: warning: Using plain integer as NULL pointer

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: io_edgeport: Convert to generic boolean
Richard Knutsson [Sat, 17 Mar 2007 00:35:53 +0000 (01:35 +0100)]
USB: io_edgeport: Convert to generic boolean

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: overhaul of mos7840 driver
Oliver Neukum [Fri, 16 Mar 2007 19:28:28 +0000 (20:28 +0100)]
USB: overhaul of mos7840 driver

This fixes:

- breaking DMA rules about buffers
- usage of _global_ variables to save a single device's attributes
- racy access to urb->status
- smp monotonity issue with statistics
- use of one buffer for many simultaneous URBs
- error handling introduced
- several instances of following NULL pointers
- use after free
- unnecessary GFP_ATOMIC
- GFP_KERNEL in interrupt
- various cleanups
- write room granularity issue that bit cdc-acm
- race in shutdown

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: io_edgeport race condition in counters
Oliver Neukum [Thu, 15 Mar 2007 14:27:17 +0000 (15:27 +0100)]
USB: io_edgeport race condition in counters

io_edgeport is using a global variable without locking.
This is _the_ classical race condition. This patch switches to atomic_t.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoEHCI: add delay to bus_resume before accessing ports
Alan Stern [Thu, 15 Mar 2007 19:54:30 +0000 (15:54 -0400)]
EHCI: add delay to bus_resume before accessing ports

This patch (as870) adds a delay to ehci-hcd's bus_resume routine.
Apparently there are controllers and/or BIOSes out there which need
such a delay to get the ports back into their correct state.  This
fixes Bugzilla #8190.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: Allow autosuspend delay to equal 0
Alan Stern [Tue, 13 Mar 2007 20:39:15 +0000 (16:39 -0400)]
USB: Allow autosuspend delay to equal 0

This patch (as867) adds an entry for the new power/autosuspend
attribute in Documentation/ABI/testing, and it changes the behavior of
the delay value.  Now a delay of 0 means to autosuspend as soon as
possible, and negative values will prevent autosuspend.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: separate autosuspend from external suspend
Alan Stern [Tue, 13 Mar 2007 20:37:30 +0000 (16:37 -0400)]
USB: separate autosuspend from external suspend

This patch (as866) adds new entry points for external USB device
suspend and resume requests, as opposed to internally-generated
autosuspend or autoresume.  It also changes the existing
remote-wakeup code paths to use the new routines, since remote wakeup
is not the same as autoresume.

As part of the change, it turns out to be necessary to do remote
wakeup of root hubs from a workqueue.  We had been using khubd, but it
does autoresume rather than an external resume.  Using the
ksuspend_usb_wq workqueue for this purpose seemed a logical choice.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: help text for mos 7720 driver
Oliver Neukum [Wed, 14 Mar 2007 14:23:56 +0000 (15:23 +0100)]
USB: help text for mos 7720 driver

this driver's help text incorrectly claims to support only single port
devices.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomos7720 update
Oliver Neukum [Wed, 14 Mar 2007 14:22:25 +0000 (15:22 +0100)]
mos7720 update

this driver has an interesting way of handling ENOMEM: complain and ignore.
If you decide to live with allocation failures, you must

1. guard against URBs without corresponding buffers
2. complete allocation failures
3. always test entries for NULL before you follow the pointers

This patch does so.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoehci-fsl: change SI_CTRL, PRI_CTRL register offsets according to errata
Christian Engelmayer [Mon, 12 Mar 2007 08:08:36 +0000 (09:08 +0100)]
ehci-fsl: change SI_CTRL, PRI_CTRL register offsets according to errata

Correct the offsets of the SI_CTRL, PRI_CTRL registers according to
the Reference Manual errata sheet in order to prevent unwanted
settings regarding burst transactions and priority states.

Signed-off-by: Christian Engelmayer <Christian.Engelmayer@frequentis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix race in HCD removal
Alan Stern [Tue, 13 Mar 2007 15:10:52 +0000 (11:10 -0400)]
USB: fix race in HCD removal

This patch (as865) fixes a race in the HCD removal code discovered by
Milan Plzik.  Arrival of an interrupt after the root hub was
unregistered could cause the root-hub status timer to start up, even
after it was supposed to have been shut down.  The problem is fixed by
moving the del_timer_sync() call to after the HCD's stop() method, at
which time IRQ generation should be disabled.

Cc: Milan Plzik <milan.plzik@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: MAINTAINERS: cxacru
Simon Arlott [Tue, 6 Mar 2007 10:47:46 +0000 (02:47 -0800)]
USB: MAINTAINERS: cxacru

I've acquired a second device for testing and plan to make some changes in
the near future to export all the device stats to sysfs (based on my
proposed patch to add them to the proc file ~2007-01-30).

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Acked-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: cxacru: export detailed device info through sysfs
Simon Arlott [Tue, 6 Mar 2007 10:47:45 +0000 (02:47 -0800)]
USB: cxacru: export detailed device info through sysfs

When the device is polled for status there is a lot of useful status
information available that is ignored.  This patch stores the device info
array when the status is polled and adds sysfs files to the usb device to
allow userspace to query it.  Since the device updates its status
internally once a second the poll time is changed to this, and
round_jiffies_relative is used to avoid waking the cpu unnecessarily.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Cc: Duncan Sands <duncan.sands@free.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousbatm: create sysfs link "device" from atm class device to usb interface
Simon Arlott [Tue, 6 Mar 2007 10:47:43 +0000 (02:47 -0800)]
usbatm: create sysfs link "device" from atm class device to usb interface

There is currently no path from the ATM device in /sys to the USB device's
interface that the driver is using; this patch creates a "device" symlink.  It
is then possible to get to the cxacru ADSL statistics
(http://lkml.org/lkml/2007/2/23/328):

/sys/class/atm/cxacru0/device $ ls *_rate *_margin *_attenuation
downstream_attenuation  downstream_snr_margin  upstream_rate
downstream_rate         upstream_attenuation   upstream_snr_margin

If this link is not appropriate I'd have to create device files in
/sys/class/atm/cxacru0 instead - which seems less appropriate since the ADSL
statistics are for the USB device not ATM (which is running over the ADSL).

[akpm@linux-foundation.org: cleanups]
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Cc: Duncan Sands <duncan.sands@math.u-psud.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: unnecessary GFP_ATOMIC in mos7720 driver
Oliver Neukum [Tue, 6 Mar 2007 15:21:22 +0000 (16:21 +0100)]
USB: unnecessary GFP_ATOMIC in mos7720 driver

GFP_KERNEL will do.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousbcore: move usb_autosuspend_work
Alan Stern [Fri, 9 Mar 2007 20:41:13 +0000 (15:41 -0500)]
usbcore: move usb_autosuspend_work

This patch (as864) moves the work routine for USB autosuspend from one
source file to another.  This permits the removal of one whole global
symbol (!) and should smooth the way for more changes in the future.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agolibusual: change block scope variable to function scope
Pete Zaitcev [Fri, 9 Mar 2007 04:02:26 +0000 (20:02 -0800)]
libusual: change block scope variable to function scope

Someone changed the code to kthread and used his style instead of mine.

The problem with the block variables is that they provoke shadowing,
which is actually exactly what has happened in my other tree which
has the class patch.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoub: Bind to first endpoint, not to last
Pete Zaitcev [Fri, 9 Mar 2007 03:56:23 +0000 (19:56 -0800)]
ub: Bind to first endpoint, not to last

The usb-storage switched to binding to first endpoint recently. Apparently,
there are devices out there with extra endpoints. It is perfectly legal.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: cdc-acm: export parsed capabilities through sysfs
Oliver Neukum [Tue, 27 Feb 2007 14:28:55 +0000 (15:28 +0100)]
USB: cdc-acm: export parsed capabilities through sysfs

this patch exports the attributes cdc-acm knows about a device through sysfs.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: additional structure from cdc spec
Oliver Neukum [Tue, 27 Feb 2007 10:30:24 +0000 (11:30 +0100)]
USB: additional structure from cdc spec

this adds another structure for CDC devices to cdc.h.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousbmon: Extended text API
Pete Zaitcev [Sun, 25 Feb 2007 03:27:33 +0000 (19:27 -0800)]
usbmon: Extended text API

This patch adds a new text API, codenamed '1u', which captures more URB
fields than old '1t' interface did. Also the '1u' text API is compatible
with the future "bus zero" extension.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: kill BKL in usblcd
Oliver Neukum [Mon, 5 Mar 2007 14:11:14 +0000 (15:11 +0100)]
USB: kill BKL in usblcd

this patch removes usage of BKL from usblcd, which got it from the old
skeleton driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: kill BKL in skeleton driver
Oliver Neukum [Thu, 1 Mar 2007 22:07:32 +0000 (23:07 +0100)]
USB: kill BKL in skeleton driver

Iet's kill BKL where we can. This is relative to the last patch to the
skeleton driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix skeleton driver
Oliver Neukum [Thu, 1 Mar 2007 13:31:02 +0000 (14:31 +0100)]
USB: fix skeleton driver

compilation of the skeleton driver is currently broken. It doesn't compile.
So while I am it:

- fix typo
- add comments to answer common questions
- actually allow autosuspend in the driver struct
- increase paralellism by restricting code under locks

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: pxa2xx_udc: fix hardcoded irq number
Milan Svoboda [Tue, 27 Feb 2007 09:20:09 +0000 (09:20 +0000)]
USB: pxa2xx_udc: fix hardcoded irq number

This patch changes last use of hardcoded number of irq to
use platfrom_get_irq.

Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopxa2xx_udc: cleanups, use platform_get_irq
David Brownell [Sat, 24 Feb 2007 20:23:52 +0000 (12:23 -0800)]
pxa2xx_udc: cleanups, use platform_get_irq

Make the pxa2xx_udc driver fetch its IRQ from platform resources
rather than using compile-time constants, so that it works properly
on IXP4xx systems not just PXA21x/25x/26x.

Other updates:
 - Do that using platform_get_irq()
 - Switch to platform_driver_probe()
 - Handle device_add() errors
 - Remove "function" sysfs attribute and its potential errors
 - Whitespace cleanups

Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoAdding PID of SHARP S01SH for ipaq.c
Norihiko Tomiyama [Thu, 5 Apr 2007 01:05:40 +0000 (10:05 +0900)]
Adding PID of SHARP S01SH for ipaq.c

I write a patch adding support "SHARP EMONE(S01SH)" device for ipaq.c.
EMONE is a PDA with built-in HSDPA function.

From: Norihiko Tomiyama <norihiko.tomiyama@ctc-g.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Fri, 27 Apr 2007 19:58:54 +0000 (12:58 -0700)]
Merge /pub/scm/linux/kernel/git/gregkh/driver-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (46 commits)
  dev_dbg: check dev_dbg() arguments
  drivers/base/attribute_container.c: use mutex instead of binary semaphore
  mod_sysfs_setup() doesn't return errno when kobject_add_dir() failure occurs
  s2ram: add arch irq disable/enable hooks
  define platform wakeup hook, use in pci_enable_wake()
  security: prevent permission checking of file removal via sysfs_remove_group()
  device_schedule_callback() needs a module reference
  s390: cio: Delay uevents for subchannels
  sysfs: bin.c printk fix
  Driver core: use mutex instead of semaphore in DMA pool handler
  driver core: bus_add_driver should return an error if no bus
  debugfs: Add debugfs_create_u64()
  the overdue removal of the mount/umount uevents
  kobject: Comment and warning fixes to kobject.c
  Driver core: warn when userspace writes to the uevent file in a non-supported way
  Driver core: make uevent-environment available in uevent-file
  kobject core: remove rwsem from struct subsystem
  qeth: Remove usage of subsys.rwsem
  PHY: remove rwsem use from phy core
  IEEE1394: remove rwsem use from ieee1394 core
  ...

17 years agoV4L/DVB (5563): Radio-maestro.c Replace radio_ioctl to use video_ioctl2
Douglas Landgraf [Thu, 26 Apr 2007 19:44:55 +0000 (16:44 -0300)]
V4L/DVB (5563): Radio-maestro.c Replace radio_ioctl to use video_ioctl2

Convert radio-maestro to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5562): Radio-gemtek-pci.c Replace gemtek_pci_ioctl to use video_ioctl2
Douglas Landgraf [Thu, 26 Apr 2007 13:42:12 +0000 (10:42 -0300)]
V4L/DVB (5562): Radio-gemtek-pci.c Replace gemtek_pci_ioctl to use video_ioctl2

Convert radio-gemtek-pci to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5560): Ivtv: fix incorrect bitwise-and for command flags.
Hans Verkuil [Tue, 10 Apr 2007 21:59:09 +0000 (18:59 -0300)]
V4L/DVB (5560): Ivtv: fix incorrect bitwise-and for command flags.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5558): Opera: use 7-bit i2c addresses
Marco Gittler [Mon, 23 Apr 2007 20:52:58 +0000 (17:52 -0300)]
V4L/DVB (5558): Opera: use 7-bit i2c addresses

- the tuner i2c addr now without define (as wanted).
- now 7 bit addr are used (the power_ctrl fkt ist ok so,
  because this is a raw write)
- the addr >> 1 , addr << 1 is ok so, i think beause the
  read write is now taken from the last bit.
- now i have no datasheet for the device, all taken from usb-logs

Signed-off-by: Marco Gittler <g.marco@freenet.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5557): Cafe_ccic: check return value of pci_enable_device
Trent Piepho [Wed, 25 Apr 2007 03:20:13 +0000 (00:20 -0300)]
V4L/DVB (5557): Cafe_ccic: check return value of pci_enable_device

Remove warnings

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5556): Radio-gemtek.c Replace gemtek_ioctl to use video_ioctl2
Douglas Landgraf [Wed, 25 Apr 2007 03:15:46 +0000 (00:15 -0300)]
V4L/DVB (5556): Radio-gemtek.c Replace gemtek_ioctl to use video_ioctl2

Convert radio-gemtek to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5555): Radio-aimslab.c Replace rt_ioctl to use video_ioctl2
Douglas Landgraf [Wed, 25 Apr 2007 03:14:36 +0000 (00:14 -0300)]
V4L/DVB (5555): Radio-aimslab.c Replace rt_ioctl to use video_ioctl2

Convert radio-aimslab to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5554): Fix: vidioc_g_parm were not zeroing the memory
Mauro Carvalho Chehab [Tue, 24 Apr 2007 16:40:07 +0000 (13:40 -0300)]
V4L/DVB (5554): Fix: vidioc_g_parm were not zeroing the memory

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5553): Replace typhoon_do_ioctl to use video_ioctl2
Douglas Landgraf [Tue, 24 Apr 2007 11:40:06 +0000 (08:40 -0300)]
V4L/DVB (5553): Replace typhoon_do_ioctl to use video_ioctl2

Convert radio-typhoon to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5552): Plan-b: Switch to refcounting PCI API
Alan Cox [Mon, 23 Apr 2007 20:57:28 +0000 (17:57 -0300)]
V4L/DVB (5552): Plan-b: Switch to refcounting PCI API

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5551): Plan-b: header change
Alan Cox [Mon, 23 Apr 2007 20:57:22 +0000 (17:57 -0300)]
V4L/DVB (5551): Plan-b: header change

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5550): Radio-sf16fmi.c Replace fmi_do_ioctl to use video_ioctl2
Douglas Landgraf [Mon, 23 Apr 2007 20:52:12 +0000 (17:52 -0300)]
V4L/DVB (5550): Radio-sf16fmi.c Replace fmi_do_ioctl to use video_ioctl2

Convert radio-sf16fmi to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5549): Radio-sf16fmr2.c Replace fmr2_do_ioctl to use video_ioctl2
Douglas Landgraf [Mon, 23 Apr 2007 20:51:37 +0000 (17:51 -0300)]
V4L/DVB (5549): Radio-sf16fmr2.c Replace fmr2_do_ioctl to use video_ioctl2

Convert radio-sf16fmr2 to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5548): Fix v4l2 buffer to the length
Luc Saillard [Mon, 23 Apr 2007 02:55:10 +0000 (23:55 -0300)]
V4L/DVB (5548): Fix v4l2 buffer to the length

Set the length of the v4l2 buffer to the length of the mapped memory.

This should fix the problem with amsn.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5547): Add ENUM_FRAMESIZES and ENUM_FRAMEINTERVALS ioctls
Luc Saillard [Mon, 23 Apr 2007 02:54:36 +0000 (23:54 -0300)]
V4L/DVB (5547): Add ENUM_FRAMESIZES and ENUM_FRAMEINTERVALS ioctls

This patch add support for the VIDIOC_ENUM_FRAMESIZES and
VIDIOC_ENUM_FRAMEINTERVALS ioctl.
* check if the maximum native framesize for raw mode is correct
* raw mode framerates for all three chipset types

Signed-off-by: Gregor Jasny <gjasny@web.de>
Signed-off-by: Luc Saillard <luc@saillard.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5546): Radio-terratec.c Replace tt_do_ioctl to use video_ioctl2
Douglas Landgraf [Mon, 23 Apr 2007 02:15:47 +0000 (23:15 -0300)]
V4L/DVB (5546): Radio-terratec.c Replace tt_do_ioctl to use video_ioctl2

Convert radio-terratec to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5545): Saa7146: Release capture buffers on device close
Hartmut Birr [Sun, 22 Apr 2007 09:57:26 +0000 (06:57 -0300)]
V4L/DVB (5545): Saa7146: Release capture buffers on device close

If the video device (saa7146 on a FF card) was open for capturing,
the close call didn't release the capture buffers.

Signed-off-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5544): Budget-av: Make inversion setting configurable, add KNC ONE V1.0...
Hartmut Birr [Sat, 21 Apr 2007 22:44:10 +0000 (19:44 -0300)]
V4L/DVB (5544): Budget-av: Make inversion setting configurable, add KNC ONE V1.0 card

Make the inversion setting configurable. The KNC ONE V1.0 uses
non inverted setting for the inversion and add the KNC ONE V1.0 card.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5543): Tda10023: Add support for frontend TDA10023
Hartmut Birr [Sat, 21 Apr 2007 22:37:17 +0000 (19:37 -0300)]
V4L/DVB (5543): Tda10023: Add support for frontend TDA10023

Add support for the frontend TDA10023 and add cards that need the
tda10023.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Georg Acher <acher@in.tum.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5542): Budget-av: Remove polarity switching of the clock for DVB-C
Hartmut Birr [Sat, 21 Apr 2007 22:17:49 +0000 (19:17 -0300)]
V4L/DVB (5542): Budget-av: Remove polarity switching of the clock for DVB-C

Remove the polarity switching of the clock for the DVB-C cards in
budget-av.c. This hack is no longer necessary because the saa7146 can
do the job to remove the additional FEC bytes from the TS.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5541): Radio-zoltrix.c Replace zol_do_ioctl to use video_ioctl2
Douglas Landgraf [Fri, 20 Apr 2007 21:23:38 +0000 (18:23 -0300)]
V4L/DVB (5541): Radio-zoltrix.c Replace zol_do_ioctl to use video_ioctl2

Convert radio-zoltrix to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5540): Radio-trust.c Replace tr_do_ioctl to use video_ioctl2
Douglas Landgraf [Fri, 20 Apr 2007 21:22:19 +0000 (18:22 -0300)]
V4L/DVB (5540): Radio-trust.c Replace tr_do_ioctl to use video_ioctl2

Convert radio-trust to use video ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5539): Radio-rtrack2.c Added VIDIOC_[GS]_AUDIO and VIDIOC_[S|G]_INPUT
Douglas Landgraf [Fri, 20 Apr 2007 09:37:36 +0000 (06:37 -0300)]
V4L/DVB (5539): Radio-rtrack2.c Added VIDIOC_[GS]_AUDIO and VIDIOC_[S|G]_INPUT

Implements VIDIOC_[GS]_AUDIO and VIDIOC_[S|G]_INPUT on radio-rtrack2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5530): Usbvision: remove CustomDevice facility
Thierry MERLE [Tue, 17 Apr 2007 05:28:32 +0000 (02:28 -0300)]
V4L/DVB (5530): Usbvision: remove CustomDevice facility

usbvision has a module parameter that ables the user to add a new USB
entry at driver load. This functionality is useless by experience
(adding statically the entry is easy).

Furthermore, the USB_DEVICE(0xfff0, 0xfff0) USB entry caused
usbvision_probe to be called for all unclaimed devices.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Acked-by: Dwaine Garden <DwaineGarden@rogers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5534): Radio-rtrack2.c Replace rt_ioctl to use video_ioctl2
Douglas Landgraf [Thu, 19 Apr 2007 19:42:25 +0000 (16:42 -0300)]
V4L/DVB (5534): Radio-rtrack2.c Replace rt_ioctl to use video_ioctl2

Convert radio-rtrack2 to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5532): Add support for Opera S1- DVB-USB
Marco Gittler [Thu, 19 Apr 2007 14:26:47 +0000 (11:26 -0300)]
V4L/DVB (5532): Add support for Opera S1- DVB-USB

This patch adds support for DVB-Opera S1 USB 2.0 BOX.

Signed-off-by: Marco Gittler <g.marco@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5529): Usbvision: remove not needed TUNER_SET_TYPE_ADDR call
Thierry MERLE [Mon, 16 Apr 2007 20:47:08 +0000 (17:47 -0300)]
V4L/DVB (5529): Usbvision: remove not needed TUNER_SET_TYPE_ADDR call

usbvision_i2c: remove TUNER_SET_TYPE_ADDR call in attach_inform
since it is done by tuner_core.
Acked-by: Dwaine Garden <DwaineGarden@rogers.com>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5528): Usbvision: reverting some i2c cleanups
Thierry MERLE [Mon, 16 Apr 2007 21:00:49 +0000 (18:00 -0300)]
V4L/DVB (5528): Usbvision: reverting some i2c cleanups

usbvision-i2c.c: reverting some i2c cleanups in order to recover a safe state.
Acked-by: Dwaine Garden <DwaineGarden@rogers.com>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5526): Cx88-alsa.c: Use kzalloc
vignesh.babu@wipro.com [Mon, 16 Apr 2007 13:34:33 +0000 (10:34 -0300)]
V4L/DVB (5526): Cx88-alsa.c: Use kzalloc

Replacing kmalloc/memset combination with kzalloc.

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5525): Usbvision: fix confusion over 7-bit vs 8-bit TDDA9887 addresses
Trent Piepho [Sun, 15 Apr 2007 13:09:56 +0000 (10:09 -0300)]
V4L/DVB (5525): Usbvision: fix confusion over 7-bit vs 8-bit TDDA9887 addresses

The code was testing an 8-bit address against a 7-bit address.  Will the
confusion of the two never cease?
Biggest flaw of the I2C protocol:  the R/W bit is the LSB instead of the
MSB.  No one can ever agree if addresses are 7-bits and the R/W bit
follows them, or if they are 8-bit and the R/W bit is OR-ed into the
address byte.  If the R/W bit was first, it wouldn't make any difference!

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5513): Bt878: prevent probing wrong card entry
Akinobu Mita [Sat, 14 Apr 2007 13:24:15 +0000 (10:24 -0300)]
V4L/DVB (5513): Bt878: prevent probing wrong card entry

I got strange message when I did modprobe bt878:
bt878_probe: card id=[0x0],[ <NULL> ] has DVB functions.
The card_list array is terminated by sentinel entry.
But this list is traversed by:
for (i = 0, dvb_cards = card_list; i < ARRAY_SIZE(card_list);
     i++, dvb_cards++) {
...
}
in bt878_probe().
So this loop checks dummy sentinel entry, too.
This patch removes unnecessary sentinel entry.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5524): Usbvision: fix TDA9887 detection
Thierry MERLE [Sun, 15 Apr 2007 07:29:13 +0000 (04:29 -0300)]
V4L/DVB (5524): Usbvision: fix TDA9887 detection

- Adding 0x86 as possible I2C addresses for TDA9887 to call TUNER_SET_TYPE_ADDR.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5523): Usbvision: fix a debug message in usb probe function
Thierry MERLE [Sat, 14 Apr 2007 20:53:55 +0000 (17:53 -0300)]
V4L/DVB (5523): Usbvision: fix a debug message in usb probe function

- change a printk to PDEBUG when USB probe detects an unknown device.
This will avoid a message log from usbvision when an unclaimed device is inserted.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5522): Usbvision: i2c function cleanups
Thierry MERLE [Sat, 14 Apr 2007 19:23:49 +0000 (16:23 -0300)]
V4L/DVB (5522): Usbvision: i2c function cleanups

usbvision-i2c function renamings, code cleanup

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5521): Usb_get_dev were called twice. Removing the extra call.
Mauro Carvalho Chehab [Sat, 14 Apr 2007 19:19:13 +0000 (16:19 -0300)]
V4L/DVB (5521): Usb_get_dev were called twice. Removing the extra call.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5520): Add support for the extra keys in the black Technotrend 1500 IR
Ville-Pekka Vainio [Sat, 14 Apr 2007 18:38:23 +0000 (15:38 -0300)]
V4L/DVB (5520): Add support for the extra keys in the black Technotrend 1500 IR

It has come to my knowledge that the Technotrend 1500 DVB cards have
been sold bundled with at least two different kinds of remotes, a grey
one and a black one.
This patch adds support for the extra keys in the black remote to
ir-keymaps.c.

Signed-off-by: Ville-Pekka Vainio <vpivaini@cs.helsinki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5518): Fix a bug on device detection
Mauro Carvalho Chehab [Sat, 14 Apr 2007 18:17:35 +0000 (15:17 -0300)]
V4L/DVB (5518): Fix a bug on device detection

Thanks to: Thierry MERLE <thierry.merle@free.fr> for pointing this

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5517): Usbvision: store the device database more efficiently
Trent Piepho [Sat, 14 Apr 2007 18:16:26 +0000 (15:16 -0300)]
V4L/DVB (5517): Usbvision: store the device database more efficiently

One bit wide bitfields need to declared unsigned to have the range 0 to
1, or they have the range -1 to 0.

A few techniques to reduce the driver's size by about 1700 bytes on ia32,
probably more on x86-64.

Put the biggest fields first, less padding is necessary that way.

Put fields with a limited range into a smaller type.  For example
VideoChannels will fit in 3 bits, and TunerType can use 8 bits.

Vin_Reg1, Vin_Reg2, and Dvi_yuv define values for 8-bit registers, but
they can't just go into an 8-bit field with no changes, since -1 was used
as a flag to indicate a value was not present.  So what we do is create a
one-bit flag for each one to indicate if a value is or is not present.

This only takes 9 bits and has the added advantage that when the register
isn't overridden (Vin_Reg[12] never are) it doesn't need to appear in the
structure definition since the default value for the flag will be zero.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5516): Reduce usbvision data size
Mauro Carvalho Chehab [Sat, 14 Apr 2007 18:15:43 +0000 (15:15 -0300)]
V4L/DVB (5516): Reduce usbvision data size

This patch reduces usbvision driver on about 1Kb on i386 over the
original version with the old struct:
   text    data     bss     dec     hex filename
  52312   11848      60   64220    fadc old/usbvision.ko
  52474   10708      60   63242    f70a new/usbvision.ko

Acked-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5515): Use a better format to represent usbvision supported boards
Mauro Carvalho Chehab [Sat, 14 Apr 2007 18:09:59 +0000 (15:09 -0300)]
V4L/DVB (5515): Use a better format to represent usbvision supported boards

Changed usbvision cards table to allow:
1) Not repeat USB ID on two structs;
2) Not need to specify both usb and card description tables at
   the same order, removing some magic;
Some cards had duplicated names. Fixed.
A test for an specific board were doing by using a string comparation.
The comparation were wrong. Also, it is not a good practice to recognize
a board based on his string name.
Acked-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>