Commit graph

45664 commits

Author SHA1 Message Date
Benjamin Herrenschmidt 57a20d8fb0 fbdev: Teaches offb about palette on radeon r5xx/r6xx
The offb driver already has a collection of hacks to be able to set
the palette on various chips. This adds support for r5xx/r6xx radeons.

This is needed as offb is the only console solution on these currently
and the firmware in some cases sets a really bad color palette. This
fixes using some Radeon X16xx on the Powerstation for example.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-07-22 10:39:36 +10:00
Maxim Shchetynin c134fd868f powerpc/cell/edac: Log a syndrome code in case of correctable error
If correctable error occurs the syndrome code was logged as 0. This patch
lets EDAC to log a correct syndrome code to make problem investigation
easier.

Signed-off-by: Maxim Shchetynin <maxim@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-07-22 10:39:36 +10:00
Masakazu Mokuno 059e4938f8 powerpc/ps3: Add a sub-match id to ps3_system_bus
Add sub match id for ps3 system bus so that two different system bus
devices can be connected to a shared device.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-07-22 10:39:33 +10:00
Linus Torvalds 93ded9b8fd Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (100 commits)
  usb-storage: revert DMA-alignment change for Wireless USB
  USB: use reset_resume when normal resume fails
  usb_gadget: composite cdc gadget fault handling
  usb gadget: minor USBCV fix for composite framework
  USB: Fix bug with byte order in isp116x-hcd.c fio write/read
  USB: fix double kfree in ipaq in error case
  USB: fix build error in cdc-acm for CONFIG_PM=n
  USB: remove board-specific UP2OCR configuration from pxa27x-udc
  USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx
  USB: Fix pointer/int cast in USB devio code
  usb gadget: g_cdc dependso on NET
  USB: Au1xxx-usb: suspend/resume support.
  USB: Au1xxx-usb: clean up ohci/ehci bus glue sources.
  usbfs: don't store bad pointers in registration
  usbfs: fix race between open and unregister
  usbfs: simplify the lookup-by-minor routines
  usbfs: send disconnect signals when device is unregistered
  USB: Force unbinding of drivers lacking reset_resume or other methods
  USB: ohci-pnx4008: I2C cleanups and fixes
  USB: debug port converter does not accept more than 8 byte packets
  ...
2008-07-21 15:42:53 -07:00
Alan Stern f756cbd458 usb-storage: revert DMA-alignment change for Wireless USB
This patch (as1110) reverts an earlier patch meant to help with
Wireless USB host controllers.  These controllers can have bulk
maxpacket values larger than 512, which puts unusual constraints on
the sizes of scatter-gather list elements.  However it turns out that
the block layer does not provide the support we need to enforce these
constraints; merely changing the DMA alignment mask doesn't help.
Hence there's no reason to keep the original patch.  The Wireless USB
problem will have to be solved a different way.

In addition, there is a reason to get rid of the earlier patch.  By
dereferencing a pointer stored in the ep_in array of struct
usb_device, the current code risks an invalid memory access when it
runs concurrently with device removal.  The members of that array are
cleared before the driver's disconnect method is called, so it should
not try to use them.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:51 -07:00
Alan Stern 86c57edf60 USB: use reset_resume when normal resume fails
This patch (as1109b) makes USB-Persist more resilient to errors.  With
the current code, if a normal resume fails, it's an unrecoverable
error.  With the patch, if a normal resume fails (and if the device is
enabled for USB-Persist) then a reset-resume is tried.

This fixes the problem reported in Bugzilla #10977.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:48 -07:00
David Brownell ac90e36592 usb_gadget: composite cdc gadget fault handling
These two fixes ensure the new "CDC Composite Device" gadget
fails cleanly when it's loaded on hardware that can't support
this particular gadget driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:48 -07:00
David Lopo c24f42276b usb gadget: minor USBCV fix for composite framework
Fill in a reserved/unused device qualifier field to ensure that
the USBCV tests will always pass.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:48 -07:00
Julien May 28874b7ec4 USB: Fix bug with byte order in isp116x-hcd.c fio write/read
URB payload data are transfered in wrong byte order on a big endinan
architecture (AVR32).

Signed-off-by: Julien May <mailinglist@miromico.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:48 -07:00
Oliver Neukum df3e1ab733 USB: fix double kfree in ipaq in error case
in the error case the ipaq driver leaves a dangling pointer to already
freed memory that will be freed again.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:47 -07:00
Oliver Neukum 357585892e USB: fix build error in cdc-acm for CONFIG_PM=n
Here's the fix. cdc-wdm has the same problem. The fix is the same.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:47 -07:00
Daniel Ribeiro 95f371f24c USB: remove board-specific UP2OCR configuration from pxa27x-udc
Remove the board-specific UP2OCR configuration from the
pxa27x-udc driver.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:46 -07:00
Srikanth Srinivasan 4f5342583c USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx
A couple of USB register initializations had to be changed on MPC85xx
platforms.  This is due to the internal SoC buses being different on
MPC83xx SoCs vs MPC85xx SoCs.

We currently handle this via an ifdef since 83xx and 85xx are mutually
exclusive kernel builds.

Signed-off-by: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:45 -07:00
David Howells a80d5ff0d7 USB: Fix pointer/int cast in USB devio code
Fix pointer/int cast in USB devio code, and thus avoid a compiler warning.

A void* data argument passed to bus_find_device() and thence to match_devt()
is used to carry a 32-bit datum.  However, casting directly between a u32 and
a pointer is not permitted - there must be an intermediate cast via (unsigned)
long.

This was introduced by the following patch:

	commit 94b1c9fa060ece2c8f080583beb6cc6008e41413
	Author: Alan Stern <stern@rowland.harvard.edu>
	Date:   Tue Jun 24 14:47:12 2008 -0400

	    usbfs: simplify the lookup-by-minor routines

	    This patch (as1105) simplifies the lookup-by-minor-number code in
	    usbfs.  Instead of passing the minor number to the callback, which
	    must then reconstruct the entire dev_t value, the patch passes the
	    dev_t value directly.

	    Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
	    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:44 -07:00
Randy Dunlap 4ddd9ec17a usb gadget: g_cdc dependso on NET
g_cdc needs to depend on NET, otherwise net-related build errors happen:

ERROR: "netif_carrier_on" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "netif_carrier_off" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "netif_rx" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "alloc_etherdev_mq" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "free_netdev" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "register_netdev" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "print_mac" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "dev_kfree_skb_any" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "__alloc_skb" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "eth_type_trans" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "unregister_netdev" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "__netif_schedule" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "skb_put" [drivers/usb/gadget/g_cdc.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:44 -07:00
Manuel Lauss 42bfc7b44f USB: Au1xxx-usb: suspend/resume support.
Copy the OHCI/EHCI PM callbacks of the PCI implementation since
they work equally well on Au1xxx hardware.

Tested on Au1200.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:44 -07:00
Manuel Lauss 53c81a348f USB: Au1xxx-usb: clean up ohci/ehci bus glue sources.
- Fold multiple probe/remove callbacks into one function;
- minor style fixes, no functional changes.

Tested on Au1200.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:44 -07:00
Alan Stern e04199b216 usbfs: don't store bad pointers in registration
This patch (as1107) fixes a small bug in the usbfs registration and
unregistration code.  It avoids leaving an error value stored in the
device's usb_classdev field and it avoids trying to unregister a NULL
pointer.  (It also fixes a rather extreme overuse of whitespace.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:43 -07:00
Alan Stern d64aac3639 usbfs: fix race between open and unregister
This patch (as1106) fixes a race between opening and unregistering
device files in usbfs.  The current code drops its reference to the
device and then reacquires it, ignoring the possibility that the
device structure might have been removed in the meantime.  It also
doesn't check whether the device is already in the NOTATTACHED state
when the file is opened.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:42 -07:00
Alan Stern 61ad04a89f usbfs: simplify the lookup-by-minor routines
This patch (as1105) simplifies the lookup-by-minor-number code in
usbfs.  Instead of passing the minor number to the callback, which
must then reconstruct the entire dev_t value, the patch passes the
dev_t value directly.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:41 -07:00
Alan Stern cd9f03759d usbfs: send disconnect signals when device is unregistered
USB device files are accessible in two ways: as files in usbfs and as
character device nodes.  The two paths are supposed to behave
identically, but they don't.  When the underlying USB device is
unplugged, disconnect signals are sent to processes with open usbfs
files (if they requested these signals) but not to processes with open
device node files.

This patch (as1104) fixes the bug by moving the disconnect-signalling
code into a common subroutine which is called from both paths.
Putting this subroutine in devio.c removes the only out-of-file
reference to struct dev_state, and so the structure's declaration can
be moved from usb.h into devio.c.

Finally, the new subroutine performs one extra action: It kills all
the outstanding async URBs.  (I'd kill the outstanding synchronous
URBs too, if there was any way to do it.)  In the past this hasn't
mattered much, because devices were unregistered from usbfs only
when they were disconnected.  But now the unregistration can also
occur whenever devices are unbound from the usb_generic driver.  At
any rate, killing URBs when a device is unregistered from usbfs seems
like a good thing to do.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:40 -07:00
Alan Stern 78d9a487ee USB: Force unbinding of drivers lacking reset_resume or other methods
This patch (as1024) takes care of a FIXME issue: Drivers that don't
have the necessary suspend, resume, reset_resume, pre_reset, or
post_reset methods will be unbound and their interface reprobed when
one of the unsupported events occurs.

This is made slightly more difficult by the fact that bind operations
won't work during a system sleep transition.  So instead the code has
to defer the operation until the transition ends.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:40 -07:00
Jean Delvare 64b3d6d119 USB: ohci-pnx4008: I2C cleanups and fixes
Various cleanups and fixes to the i2c code in ohci-pnx4008:
* Delete empty isp1301_command. The i2c driver command implementation
  is optional, so there's no point in providing an empty
  implementation.
* Give a name to isp1301_driver. I'm surprised that i2c-core accepted
  to register this driver at all. I've chosen "isp1301_pnx" as the
  name, because it's not a generic ISP1301 driver (much like the
  isp1301_omap driver.) We might want to make the name even more
  specific (but "isp1301_ohci_pnx4008" doesn't fit.)
* The ISP1301 is definitely not a hardware monitoring device.
* Fix a memory leak on failure in isp1301_attach. If
  i2c_attach_client fails, the client is not registered so
  isp1301_detach is never called and the i2c_client memory is lost.
* Use strlcpy instead of strcpy.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Vitaly Wool <vitalywool@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:38 -07:00
Aleksey Gorelov 71be4f81e9 USB: debug port converter does not accept more than 8 byte packets
USB debug port only supports 8 byte rx/tx packets. Although spec implies that
"if a packet larger than eight bytes is received from the remote computer, the
device must break the larger packet into eight-byte packets before sending the
data to the Debug Port", the real PLX NET20DC device does not handle it right -
data is corrupted on debug port end if serial interface sends >8 byte urbs.
Patch below fixes the issue by limiting tx urb to 8 byte.

Signed off by: Aleks Gorelov <dared1st@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:37 -07:00
Oliver Neukum 830f4021a8 USB: fix disconnect bug in cdc-acm
cdc-acm must give up secondary interfaces if the primary is disconnected
and vice versa. This wasn't done correctly.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:37 -07:00
Oliver Neukum 62ad296b6c USB: fix usb serial pm counter decrement for disconnected interfaces
usb serial decrements the pm counter even if an interface has been
disconnected. If it was a logical disconnect the interface may belong
already to another driver. This patch introduces a check for disconnected
interfaces.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: Stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:36 -07:00
Oliver Neukum 17d80d562f USB: autosuspend for cdc-wdm
this patch implements

- suspend/resume
- aggressive autosuspend for the cdc-wdm driver
- pre/post_reset

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:36 -07:00
Oliver Neukum 11ea859d64 USB: additional power savings for cdc-acm devices that support remote wakeup
this patch saves power for cdc-acm devices that support remote wakeup
while the device is connected.

- request needs_remote_wakeup when needed
- delayed write while a device is autoresumed
- the device is marked busy when appropriate

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:36 -07:00
Ben Collins 188d636027 USB: keyspan: Remove duplicate device entries
The 28xb, as documented in comments, has the same ID's as the 28x.
Remove the duplicated ID's from the device tables, and expand the
comment to document this.

Signed-off-by: Ben Collins <ben.collins@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:35 -07:00
Benny Halevy 3b36a8fd67 usb: fix uninitialized variable warning in keyspan_pda
This fixes the compiler warning.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:35 -07:00
Yoshihiro Shimoda 397f519a0d usb: r8a66597-hcd: fix iinterval for Full/Low speed device
fix interrupt transfer interval for Full/Low speed device.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:35 -07:00
Yoshihiro Shimoda 0bf32b807f usb: r8a66597-hcd: fix interrupt trigger
fix the problem that did not set IRQF_TRIGGER_ flag.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:34 -07:00
Ming Lei 742120c631 USB: fix usb_reset_device and usb_reset_composite_device(take 3)
This patch renames the existing usb_reset_device in hub.c to
usb_reset_and_verify_device and renames the existing
usb_reset_composite_device to usb_reset_device. Also the new
usb_reset_and_verify_device does't need to be EXPORTED .

The idea of the patch is that external interface driver
should warn the other interfaces' driver of the same
device before and after reseting the usb device. One interface
driver shoud call _old_ usb_reset_composite_device instead of
_old_ usb_reset_device since it can't assume the device contains
only one interface. The _old_ usb_reset_composite_device
is safe for single interface device also. we rename the two
functions to make the change easily.

This patch is under guideline from Alan Stern.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
2008-07-21 15:16:33 -07:00
Andre Haupt dd9ca5d9be USB: usb-serial: fix a sparse warning about different signedness
fix the following sparse warning:

drivers/usb/serial/usb-serial.c:927:43: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/usb-serial.c:927:43:    expected unsigned int *minor
drivers/usb/serial/usb-serial.c:927:43:    got int *<noident>
  CHECK   drivers/usb/serial/generic.c

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:33 -07:00
Nate Case 3faefc88c1 USB: isp1760: Support board-specific hardware configurations
This adds support for hardware configurations that don't match the
chip default register settings (e.g., 16-bit data bus, DACK and
DREQ pulled up instead of down, analog overcurrent mode).

These settings are passed in via the OF device tree.  The PCI
interface still assumes the same default values.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:33 -07:00
Ming Lei 6d243e5c76 USB: fix comment of usb_set_configuration
It is the usb interface driver probe() methods that
can't call usb_set_configuration, not usb device driver.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:32 -07:00
Alan Stern 7c3e28bc56 USB: use standard SG iterator in the scatter-gather library
This patch (as1103) changes the iteration in the USB scatter-gather to
use a standard SG iterator.  Otherwise the iteration will fail if it
encounters a chained SG list.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:32 -07:00
Ming Lei 625f694936 USB: remove interface parameter of usb_reset_composite_device
From the current implementation of usb_reset_composite_device
function, the iface parameter is no longer useful. This function
doesn't do something special for the iface usb_interface,compared
with other interfaces in the usb_device. So remove the parameter
and fix the related caller.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:32 -07:00
Christophe Jaillet 33578bd706 USB: AccessRunner: avoid unnecessary memset
Remove an explicit memset(.., 0, ...) to a variable allocated with kzalloc
(i.e.  'card_info' array of the structure 'instance').

Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:32 -07:00
Andrew Morton d249afddff USB: drivers/usb/host/isp1760-hcd.c: processor flags have type `unsigned long'
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:32 -07:00
Oliver Neukum 87d65e54b6 USB: cdc-wdm cleanup
- fixes an error with filling out control requests
- increases grepability and error logging
- fixes the short read code path

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:31 -07:00
Greg Kroah-Hartman 640c1bce86 USB: delete airprime driver
This driver is only for one device id, and the option driver should be
used instead for it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:31 -07:00
Akinobu Mita 518386c7d4 USB: usbmon: use simple_read_from_buffer()
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:31 -07:00
Ming Lei bef4665a2e USB: uhci: mark root_hub_hub_des[] as const
mark this array as const because it is read-only

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:30 -07:00
Ming Lei fe9b9034aa USB: host: mark const variable tables as "const"
Mark the tables as const so that they end up in .rodata
section and don't cacheline share with things that get
written to.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:29 -07:00
Felipe Balbi e0d795e4f3 usb: irda: cleanup on ir-usb module
General cleanup on ir-usb module. Introduced
a common header that could be used also on
usb gadget framework.

Lot's of cleanups and now using macros from the header
file.

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:27 -07:00
David Brownell b963801164 USB: ehci-hcd unlink speedups
This patch fixes some performance bugs observed with some workloads
when unlinking EHCI queue header (QH) descriptors from the async ring
(control/bulk schedule).

The mechanism intended to defer unlinking an empty QH (so there is no
penalty in common cases where it's quickly reused) was not working as
intended.  Sometimes the unlink was scheduled:

 - too quickly ... which can be a *strong* negative effect, since
   that QH becomes unavailable for immediate re-use;

 - too slowly ... wasting DMA cycles, usually a minor issue except
   for increased bus contention and power usage;

Plus there was an extreme case of "too slowly":  a logical error in the
IAA watchdog-timer conversion meant that sometimes the unlink never
got scheduled.

The fix replaces a simple counter with a timestamp derived from the
controller's 8 KHz microframe counter, and adjusts the timer usage
for some issues associated with HZ being less than 8K.

(Based on a patch originally by Alan Stern, and good troubleshooting
from  Leonid.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Leonid <leonidv11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:27 -07:00
Felipe Balbi 38f3ad5e74 usb: hub: add check for unsupported bus topology
We can't allow hubs on the 7th tier as they would allow
devices on the 8th tier.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:26 -07:00
Pete Zaitcev 6deb270b5c USB: ohci_hcd hang: submit vs. rmmod race
If we do rmmod ohci_hcd while an application is doing something, the
following may happen:

- a control URB completes (in finish_urb) and the ohci's endpoint is
  set into ED_UNLINK in ed_deschedule
- same URB is (re)submitted because of the open/close loop or other
  such application behaviour
- rmmod sets the state to HC_STATE_QUESCING
- finish_unlinks happens at next SOF; normally it would set ed into
  ED_IDLE and immediately call ed_schedule (since URB had extra TDs
  queued), which sets it into ED_OPER. But the check in ed_schedule
  makes it fail with -EAGAIN (which is ignored)
- from now on we have a dead URB stuck; it cannot even be unlinked
  because the ed status is not ED_OPER, and thus start_ed_unlink is
  not invoked.

This patch removes the check. In 2.6.25, all callers check for
__ACTIVE bit before invoking ed_schedule, which is more appropriate.

Alan Stern and David Brownell approved of this (cautiously).

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:25 -07:00
Eric Miao 6381fad77e USB: make SA1111 OHCI driver SA11x0 specific
As RMK pointed out,  considering the fact that the _only_ platform with
a PXA and SA1111 is the Lubbock, and that SA1111 DMA doesn't work there,
(i.e. the SA1111 OHCI doesn't work there) the SA1111 OHCI driver should
really be made SA11x0 specific.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:24 -07:00
Pete Zaitcev 421b4bf5f2 USB: missing usb_put_hcd to ohci-at91
Looks like usb_put_hcd was missing. Also, make an always-zero function
return void.

Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:24 -07:00
Harvey Harrison abe28c00b9 USB: speedtch.c fix sparse shadowed variable warning
i is used only as a for-loop index no need to declare another.
drivers/usb/atm/speedtch.c:832:7: warning: symbol 'i' shadows an earlier one
drivers/usb/atm/speedtch.c:766:6: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:24 -07:00
Harvey Harrison b2bdd1f504 USB: cp2101.c fix sparse signedness mismatch warnings
The get/set 2101_config helpers take an unsigned int rather than an
int.  It is safe to change these in each case and may even produce
better code as it will be an unsigned divide rather than a signed
divide in places.  All other manipulation was setting/masking bits
which will not be affected by the sign change.

Fixes the following sparse warnings:
drivers/usb/serial/cp2101.c:378:44: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:378:44:    expected unsigned int *data
drivers/usb/serial/cp2101.c:378:44:    got int *<noident>
drivers/usb/serial/cp2101.c:388:40: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:388:40:    expected unsigned int *data
drivers/usb/serial/cp2101.c:388:40:    got int *<noident>
drivers/usb/serial/cp2101.c:413:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:413:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:413:42:    got int *<noident>
drivers/usb/serial/cp2101.c:421:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:421:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:421:42:    got int *<noident>
drivers/usb/serial/cp2101.c:444:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:444:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:444:42:    got int *<noident>
drivers/usb/serial/cp2101.c:451:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:451:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:451:42:    got int *<noident>
drivers/usb/serial/cp2101.c:458:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:458:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:458:42:    got int *<noident>
drivers/usb/serial/cp2101.c:471:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:471:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:471:42:    got int *<noident>
drivers/usb/serial/cp2101.c:481:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:481:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:481:42:    got int *<noident>
drivers/usb/serial/cp2101.c:561:41: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:561:41:    expected unsigned int *data
drivers/usb/serial/cp2101.c:561:41:    got int *<noident>
drivers/usb/serial/cp2101.c:591:45: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:591:45:    expected unsigned int *data
drivers/usb/serial/cp2101.c:591:45:    got int *<noident>
drivers/usb/serial/cp2101.c:597:41: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:597:41:    expected unsigned int *data
drivers/usb/serial/cp2101.c:597:41:    got int *<noident>
drivers/usb/serial/cp2101.c:608:45: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:608:45:    expected unsigned int *data
drivers/usb/serial/cp2101.c:608:45:    got int *<noident>
drivers/usb/serial/cp2101.c:614:41: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:614:41:    expected unsigned int *data
drivers/usb/serial/cp2101.c:614:41:    got int *<noident>
drivers/usb/serial/cp2101.c:623:45: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:623:45:    expected unsigned int *data
drivers/usb/serial/cp2101.c:623:45:    got int *<noident>
drivers/usb/serial/cp2101.c:680:50: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:680:50:    expected unsigned int *data
drivers/usb/serial/cp2101.c:680:50:    got int *<noident>
drivers/usb/serial/cp2101.c:690:43: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:690:43:    expected unsigned int *data
drivers/usb/serial/cp2101.c:690:43:    got int *<noident>
drivers/usb/serial/cp2101.c:715:41: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:715:41:    expected unsigned int *data
drivers/usb/serial/cp2101.c:715:41:    got int *<noident>

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:23 -07:00
Harvey Harrison 5a33956a30 USB: digi_accelport.c trivial sparse lock annotation
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:22 -07:00
Stephen Rothwell 554cc171e3 USB: ohci-ppc-of: use linux/of_platform.h instead of asm
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:22 -07:00
Alan Cox 49f1525546 USB: sisusb: Push down the BKL
This is another case where the lock_kernel appears to be unneccessary and
could be removed with a bit more investigative work

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:21 -07:00
Alan Cox 54592157c7 USB: rio100: Push down the BKL
The BKL is actually probably not needed as the mutex seems sufficient. If
so then a further patch to drop it would be a good followup.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:20 -07:00
Alan Cox f1b5a7fe17 USB: auerwald: Push down the BKL into the driver
Also fix the unknown ioctl return code

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:20 -07:00
Alan Cox 824f16fda5 USB: iowarrior: Push down BKL
I'm pretty sure the mutex is sufficient for all locking but will come
back to that later if the USB folks don't beat me to it. For now get rid
of the old BKL ioctl method and wrap the ioctl handler

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:19 -07:00
Alan Cox 5cb4aeca8e USB: usblcd: Push down BKL into driver
I'm pretty sure this can be eliminated however I couldn't prove (or find)
what stopped the device vanishing mid IOCTL_GET_HARD_VERSION. Perhaps a
USB wizard could double check that and see if the lock_kernel can go
entirely.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:18 -07:00
Alan Cox 1160d07656 USB: ftdi_usb: Eliminate ioctl and BKL ioctl use
ftdi has one ioctl, which is buggy and for debugging. Kill it off

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:18 -07:00
Alan Cox 44c389a00f USB: gadget: Push BKL down into drivers
This keeps the gadget ioctl method wrapped but pushes the BKL down into
the gadget code so we can use unlocked_ioctl().

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:18 -07:00
David Brownell 0391c828ce usb ethernet gadget: use composite gadget framework
Building on the previous patches which took code from this driver and
pakaged it in more-reusable network "function" components, this patch
gets rid of the original code and uses those components instead.

As seen with the other gadget driver conversions, the resulting code
is much easier to understand and (presumably) work with.  In this case
that's especially true, since the Ethernet gadget had grown to handle
three (!) different Ethernet-over-USB protocols.  This modularization
should make it much easier to add a fourth option for the newish CDC
"Ethernet Emulation Model" (or EEM).

Lightly tested, primarily at full speed.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:17 -07:00
David Brownell 19e2068015 usb gadget: new "CDC Composite" gadget driver
This is a simple example of a composite gadget, combining two
Communications Class Device (CDC) functions:  ECM and ACM.

This provides a clear example of how the composite gadget framework
is intended to work.  It's surprising that MS-Windows (or at least,
XP and previous) won't "just work" with something this simple...

One /proc/bus/usb/devices listing looks like:

  T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 46 Spd=480 MxCh= 0
  D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
  P:  Vendor=0525 ProdID=a4aa Rev= 3.01
  S:  Manufacturer=Linux 2.6.26-rc6-pnut with net2280
  S:  Product=CDC Composite Gadget
  C:* #Ifs= 4 Cfg#= 1 Atr=c0 MxPwr=  2mA
  I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
  E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
  I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
  I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
  E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
  E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
  I:* If#= 2 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
  E:  Ad=86(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
  I:* If#= 3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
  E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
  E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Not all USB peripheral controller hardware can support this driver.
All the highspeed-capable peripheral controllers with drivers now in
the mainline kernel seem to support this, as does omap_udc.  But
many full speed controllers don't have enough endpoints, or (as with
the PXA controllers) don't support altsettings.

Lightly tested.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:16 -07:00
David Brownell 45fe3b8e53 usb ethernet gadget: split RNDIS function
This is a RNDIS function driver, extracted from the all-in-one
Ethernet gadget driver.

Lightly tested ... there seems to be a pre-existing problem when
talking to Windows XP SP2, not quite sure what's up with that yet.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:15 -07:00
David Brownell da741b8c56 usb ethernet gadget: split CDC Ethernet function
This is a "CDC Ethernet" (ECM) function driver, extracted from the
all-in-one Ethernet gadget driver.

This is a good example of how to implement interface altsettings.
In fact it's currently the only such example in the gadget stack,
pending addition of OBEX support.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:13 -07:00
David Brownell 8a40819e97 usb ethernet gadget: split CDC Subset function
This is a simple "CDC Subset" (and MCCI "SAFE") function driver, extracted
from the all-in-one Ethernet gadget driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:13 -07:00
David Brownell 2b3d942c48 usb ethernet gadget: split out network core
Abstract the peripheral side Ethernet-over-USB link layer code from
the all-in-one Ethernet gadget driver into a component that can be
called by various functions, so the various flavors can be split
apart and selectively reused.

A notable difference from the approach taken with the serial link
layer code (beyond talking to NET not TTY) is that because of the
initialization requirements, this only supports one network link.
(And one set of Ethernet link addresses.)

That is, each configuration may have only one instance of a network
function.  This doesn't change behavior; the current code has that
same restriction.  If you want multiple logical links, that can
easily be done using network layer tools.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:12 -07:00
David Brownell 15b2d2b529 usb gadget: RNDIS cleanups
Some cleanup to the RNDIS code:

 - Minor bugfix:  rndis_unit() is supposed to put the link into the
   RNDIS_UNINITIALIZED state, which does not mean "unused".  There's
   a separate method to stop using the link.  (Bug doesn't affect
   anything right now because of how the code is used.)

 - Reduce coupling between RNDIS code and its user(s), in preparation
   for updates in that code:

    * Decouple RNDIS_RESPONSE_AVAILABLE notifications from net_device
      by passing just a void* handle.  (Also, remove the unused return
      value of the notification callback.)
    * When it needs a copy of net_device stats, just ask for it

 - Remove unused/untested code backing various never-used OIDs:

    * RNDIS_PM, RNDIS_WAKEUP ... "should" get implemented, but the
      relevant docs were unclear, ambguous, and incomplete.  Someone
      with access to the Hidden Gospels (maybe in the EU?) might be
      able to figure out what this should do.
    * RNDIS_OPTIONAL_STATS ... as the name suggests, optional.  Never
      implemented in part because not all the semantics were clear.
    * OID_GEN_RNDIS_CONFIG_PARAMETER, which has been #if 0 forever.

 - A few small whitespace fixes

Plus switch the VERBOSE symbol over to the newer VERBOSE_DEBUG style.

There should be no functional changes because of this patch; it's a
net source code shrink (because of the dead/unused code removal) and
a small object code shrink (a couple hundred bytes on ARMv5).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:10 -07:00
David Brownell 7bb5ea54be usb gadget serial: use composite gadget framework
This switches the serial gadget over to using the new "function"
versions of the serial port interfacing code.  The remaining code
in the main source file is quite small...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:09 -07:00
David Brownell 61d8baea5d usb gadget serial: split out generic serial function
Split out the generic serial support into a "function driver".  This
closely mimics the ACM support, but with a MUCH simpler control model.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:07 -07:00
David Brownell 4d5a73dc39 usb gadget serial: split out CDC ACM function
Split out CDC ACM parts of "gadget serial" to a "function driver".
Some key structural differences from the previous ACM support, shared
with with the generic serial function (next patch):

 - As a function driver, it can be combined with other functions.
   One gadget configuration could offer both serial and network
   links, as an example.

 - One serial port can be exposed in multiple configurations;
   the /dev/ttyGS0 node could be exposed regardless of which
   config the host selected.

 - One configuration can expose multiple serial ports, such as
   ttyGS0, ttyGS1, ttyGS2, and ttyGS3.

This code should be a lot easier to understand than the previous
all-in-one-big-file version of the driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:06 -07:00
David Brownell 097db1d034 usb gadget zero: use composite gadget framework
Update Gadget Zero to use the more modular versions of the loopback
and source/sink configuration drivers which build on the new gadget
framework code.

The core code is a LOT simpler, and it should be much easier now to
understand how the parts fit together.  The conversion is an overall
source shrink in terms of this gadget, since it uses more midlayer
support.  However, it's an overall increase in object size because
there's less sharing between the two configurations (improves code
clarity) and because the midlayer is a bit more functional than this
driver actually needs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:04 -07:00
David Brownell e5760fdac8 usb gadget zero: split out loopback config
This splits the gadget zero "loopback" configuration into a standalone
"configuration driver", building on the composite gadget framework code.
It doesn't yet pull the original code out of gadget zero or update how
that driver is built.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:03 -07:00
David Brownell a400cadc07 usb gadget zero: split out source/sink config
This splits the gadget zero "source/sink" configuration into a standalone
"configuration driver", building on the composite gadget framework code.
It doesn't yet pull the original code out of gadget zero or update how
that driver is built.

Neither this, nor its sibling "loopback" configuration, is a function
driver that can be combined with other functions.  (The host "usbtest"
driver wouldn't know how to deal with that!)  However the code becomes
simpler because of this conversion, so it's a net win.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:02 -07:00
David Brownell 40982be52d usb gadget: composite gadget core
Add <linux/usb/composite.h> interfaces for composite gadget drivers, and
basic implementation support behind it:

  - struct usb_function ... groups one or more interfaces into a function
    managed as one unit within a configuration, to which it's added by
    usb_add_function().

  - struct usb_configuration ... groups one or more such functions into
    a configuration managed as one unit by a driver, to which it's added
    by usb_add_config().  These operate at either high or full/low speeds
    and at a given bMaxPower.

  - struct usb_composite_driver ... groups one or more such configurations
    into a gadget driver, which may be registered or unregistered.

  - struct usb_composite_dev ... a usb_composite_driver manages this; it
    wraps the usb_gadget exposed by the controller driver.

This also includes some basic kerneldoc.

How to use it (the short version):  provide a usb_composite_driver with a
bind() that calls usb_add_config() for each of the needed configurations.
The configurations in turn have bind() calls, which will usb_add_function()
for each function required.  Each function's bind() allocates resources
needed to perform its tasks, like endpoints; sometimes configurations will
allocate resources too.

Separate patches will convert most gadget drivers to this infrastructure.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:01 -07:00
David Brownell a4c39c41bf usb gadget: descriptor copying support
Define three new descriptor manipulation utilities, for use when
setting up functions that may have multiple instances:

	usb_copy_descriptors() to copy a vector of descriptors
	usb_free_descriptors() to free the copy
	usb_find_endpoint() to find a copied version

These will be used as follows.  Functions will continue to have static
tables of descriptors they update, now used as __initdata templates.

When a function creates a new instance, it patches those tables with
relevant interface and string IDs, plus endpoint assignments.  Then it
copies those morphed descriptors, associates the copies with the new
function instance, and records the endpoint descriptors to use when
activating the endpoints.  When initialization is done, only the copies
remain in memory.  The copies are freed on driver removal.

This ensures that each instance has descriptors which hold the right
instance-specific data.  Two instances in the same configuration will
obviously never share the same interface IDs or use the same endpoints.
Instances in different configurations won't do so either, which means
this is slightly less memory-efficient in some cases.

This also includes a bugfix to the epautoconf code that shows up with
this usage model.  It must replace the previous endpoint number when
updating the template descriptors, not just mask in a few more bits.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:00 -07:00
David Brownell a7707adf9e usb gadget: use new serial core
Teach "gadget serial" to use the new abstracted (and bugfixed) TTY glue,
and remove all the orignal tangled-up code.  Update the documentation
accordingly.  This is a net object code shrink and cleanup; it should
make it a lot easier to see how the TTY glue should accomodate updates
to the TTY layer, be bugfixed, etc.

Notable behavior changes include:  it can now support getty even when
there's no USB connection; it fits properly into the mdev/udev world;
and RX handling is better (throttling works, and low latency).

Configurations with scripts setting up the /dev/ttygserial device node
(with "experimental" major number) may want to change that to be a
symlink pointing to the /dev/ttyGS0 file, as a migration aid; else,
just switch entirely over to mdev/udev.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:59 -07:00
David Brownell c1dca562be usb gadget: split out serial core
This abstracts the "gadget serial" driver TTY glue into a separate
component, cleaning it up and disentangling it from connection state.

It also changed some behaviors for the better:

  - Stops using "experimental" major #127, and switches over to
    having the TTY layer allocate the dev_t numbers.
    
  - Provides /sys/class/tty/ttyGS* nodes, thus mdev/udev support.
    (Note "mdev" hotplug bug in Busybox v1.7.2: /dev/ttyGS0 will
    be a *block* device without CONFIG_SYSFS_DEPRECATED_V2.)

  - The tty nodes no longer reject opens when there's no host.
    Now they can support normal getty configs in /etc/inttab...

  - Now implements RX throttling.  When the line discipline says
    it doesn't want any more data, only packets in flight will be
    delivered (currently, max 1K/8K at full/high speeds) until it
    unthrottles the data.

  - Supports low_latency.  This is a good policy for all USB serial
    adapters, since it eliminates scheduler overhead on RX paths.

This also includes much cleanup including better comments, fixing
memory leaks and other bugs (including some locking fixes), messaging
cleanup, and an interface audit and tightening.  This added up to a
significant object code shrinkage, on the order of 20% (!) depending
on CPU and compiler.

A separate patch actually kicks in this new code, using the functions
declared in this new header, and removes the previous glue.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:59 -07:00
David Brownell bb24280ffc USB: at91_udc: updated fifo sizes
It turns out newer versions of the AT91 UDC hardware have increased
sizes of some of the FIFOs.  Reporting that is a Good Thing.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:58 -07:00
Alexey Dobriyan e184d5fcaa USB: rndis: switch to seq_files
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:57 -07:00
Adrian Bunk ea05af61a8 USB: remove CVS keywords
This patch removes CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:55 -07:00
Alan Stern 543f7810fb usb-storage: implement "soft" unbinding
This patch (as1092) implements "soft" unbinding for usb-storage.  When
the disconnect routine is called, all commands and reset delays are
allowed to complete normally until after scsi_remove_host() returns.
This means that the commands needed for an orderly shutdown will be
sent through to the device.

Unlike before, the driver will now execute every command that it
accepts.  Hence there's no need for special code to catch unexecuted
commands and fail them.

The new sequence of events when disconnect runs goes as follows:

	If the device is truly unplugged, set the DISCONNECTING
	flag so we won't try to access it any more.

	If the SCSI-scanning thread hasn't started up yet, prevent
	it from doing anything by setting the new DONT_SCAN flag.
	Then wake it up and wait for it to terminate.

	Remove the SCSI host.  This unbinds the upper-level drivers,
	doing an orderly shutdown.  Commands sent to quiesce the
	device will be transmitted normally, unless the device is
	unplugged.

	Set the DISCONNECTING flag so that we won't accept any new
	commands that might get submitted (there aren't supposed to be
	any) and we won't try to access the device for resets.

	Tell the control thread to exit by waking it up with no
	pending command, and wait for it to terminate.

	Go on to do all the other normal stuff: releasing resources,
	freeing memory, and so on.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:54 -07:00
Alan Stern 9da82bd464 USB: implement "soft" unbinding
This patch (as1091) changes the way usbcore handles interface
unbinding.  If the interface's driver supports "soft" unbinding (a new
flag in the driver structure) then in-flight URBs are not cancelled
and endpoints are not disabled.  Instead the driver is allowed to
continue communicating with the device (although of course it should
stop before its disconnect routine returns).

The purpose of this change is to allow drivers to do a clean shutdown
when they get unbound from a device that is still plugged in.  Killing
all the URBs and disabling the endpoints before calling the driver's
disconnect method doesn't give the driver any control over what
happens, and it can leave devices in indeterminate states.  For
example, when usb-storage unbinds it doesn't want to stop while in the
middle of transmitting a SCSI command.

The soft_unbind flag is added because in the past, a number of drivers
have experienced problems related to ongoing I/O after their disconnect
routine returned.  Hence "soft" unbinding is made available only to
drivers that claim to support it.

The patch also replaces "interface_to_usbdev(intf)" with "udev" in a
couple of places, a minor simplification.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:54 -07:00
Adrian Bunk 473bca94ba USB: isp1760-hcd.c: make 2 functions static
This patch makes the following needlessly global functions static:
- enqueue_an_ATL_packet()
- enqueue_an_INT_packet()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:54 -07:00
Alan Stern 7119e3c37f usb-storage: change remaining semaphore to completion
This patch (as1090) converts the one remaining semaphore in
usb-storage into a completion.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:53 -07:00
Alan Stern 7e4d6c3879 usb-storage: separate dynamic flags from fixed flags
This patch (as1089) separates out the dynamic atomic bitflags and the
static bitfields in usb-storage.  Until now the two sorts of flags
have been sharing the same word; this has always been awkward.

To help prevent possible confusion, the two new fields each have a
different name from the original.  us->fflags contains the fixed
bitfields (mostly taken from the USB ID table in unusual_devs.h), and
us->dflags contains the dynamic atomic bitflags (used with set_bit,
test_bit, and so on).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:53 -07:00
Alan Cox 2742fd8899 USB: io_ti: FIrst cut at a big clean up
Sort out the insane naming like "OperationalFirmwareVersion" which seems
	designed to cause formatting problems and RSI
Merge various common code together
Clean up the pointlessly complex and spread about MCR handling

This is really just the low hanging fruit.

Needs lots of testing before it goes upstream so testers and reports
appreciated

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:53 -07:00
Alan Stern 4330354f76 USB: combine hub_quiesce and hub_stop
This patch (as1083) combines hub_quiesce() and hub_stop() into a
single routine.  There's no point keeping them separate since they are
usually called together.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:52 -07:00
Alan Stern f2835219ed USB: combine hub_activate and hub_restart
This patch (as1071) combines hub_activate() and hub_restart() into a
single routine.  There's no point keeping them separate, since they
are always called together.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:52 -07:00
Alan Stern 948fea37dc USB: optimize port debouncing during hub activation
This patch (as1082) makes a small optimization to the way the hub
driver carries out port debouncing immediately after a hub is
activated (i.e., initialized, reset, or resumed).  If any port-change
statuses are observed, the code will delay for a minimal debounce
period -- thereby making a good start at debouncing all the ports at
once.

If this wasn't sufficient then khubd will debounce any port that still
requires attention.  But in most cases it should suffice; it's rare
for a device to need more than a minimal debounce delay.  (In the
cases of hub initialization or reset even that is most likely not
needed, since any devices plugged in at such times have probably been
attached for a while.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:52 -07:00
Alan Stern 8808f00c7a USB: try to salvage lost power sessions
This patch (as1073) adds to khubd a way to recover from power-session
interruption caused by transient connect-change or enable-change
events.  After the debouncing period, khubd attempts to do a
USB-Persist-style reset or reset-resume.  If it works, the connection
will remain unscathed.

The upshot is that we will be more immune to noise caused by EMI.  The
grace period is on the order of 100 ms, so this won't permit recovery
from the "accidentally knocked the USB cable out of its socket" type
of event, but it's a start.

As an added bonus, if a device was suspended when the system goes to
sleep then we no longer need to check for power-session interruptions
when the system wakes up.  Khubd will naturally see the status change
while processing the device's parent hub and will do the right thing.

The remote_wakeup() routine is changed; now it expects the caller to
acquire the device lock rather than acquiring the lock itself.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:51 -07:00
Alan Stern 6ee0b270c7 USB: simplify hub_restart() logic
This patch (as1081) straightens out the logic of the hub_restart()
routine.  Each port of the hub is scanned and the driver makes sure
that ports which are supposed to be disabled really _are_ disabled.
Any ports with a significant change in status are flagged in
hub->change_bits, so that khubd can focus on them without the need to
scan all the ports a second time -- which means the hub->activating
flag is no longer needed.

Also, it is now recognized explicitly that the only reason for
resuming a port which was not suspended is to carry out a reset-resume
operation, which happens only in a non-CONFIG_USB_SUSPEND setting.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:50 -07:00
Greg Kroah-Hartman 9e5eace734 USB: revert "don't use reset-resume if drivers don't support it"
This reverts Linus's previous patch that is in mainline to make it
easier for the USB hub.c patches that follow this to apply cleanly.  The
functionality will be added back in a followon patch in this series.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:48 -07:00
Alan Stern 24618b0cd4 USB: debounce before unregistering
This patch (as1080) makes a significant change to the way khubd
handles port connect-change and enable-change events.  Both types of
event are now debounced, and the debouncing is carried out _before_ an
existing usb_device is unregistered, instead of afterward.

This means that drivers will have to deal with longer runs of errors
when a device is unplugged, but they are supposed to be prepared for
that in any case.

The advantage is that when an enable-change occurs (caused for example
by electromagnetic interference), the debouncing period will provide
time for the cause of the problem to die away.  A simple port reset
(added in a forthcoming patch) will then allow us to recover from the
fault.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:47 -07:00
Alan Stern b01b03f3ad USB: add new routine for checking port-resume type
This patch (as1070) creates a new subroutine to check whether a device
can be resumed.  This code is needed even when CONFIG_USB_SUSPEND
isn't set, because devices do suspend themselves when the root hub
(and hence the entire bus) is suspended, and power sessions can get
lost during a system sleep even without individual port suspends.

The patch also fixes a loose end in USB-Persist reset-resume handling.
When a low- or full-speed device is attached to an EHCI's companion
controller, the port handoff during resume will cause the companion
port's connect-status-change feature to be set.  If that flag isn't
cleared, the port-reset code will think it indicates that the device
has been unplugged and the reset-resume will fail.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:47 -07:00
Harvey Harrison bd2c784595 USB: use get_unaligned_* helpers for kl5kusb105 driver
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:47 -07:00
Kay Sievers 0031a06e2f USB: usb dev_set_name() instead of dev->bus_id
The bus_id field is going away, use the dev_set_name() function
to set it properly.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:47 -07:00
Kay Sievers 7071a3ce0c USB: usb dev_name() instead of dev->bus_id
The bus_id field is going away, use the dev_name() function instead.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:46 -07:00
Greg Kroah-Hartman 36aa81172e USB: revert "don't lose disconnections during suspend"
This reverts Alan's previous patch so that the recent Hub changes will
apply cleanly.  The above mentioned patch was needed for 2.6.26 to work
properly.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:46 -07:00
Greg Kroah-Hartman 1b26da1510 USB: handle pci_name() being const
This changes usb_create_hcd() to be able to handle the fact that
pci_name() has changed to a constant string.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:46 -07:00
Andrew Lunn c5e46007e9 USB: storage: UNUSUAL_DEVS() for PanDigital Picture frame.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:46 -07:00
Linus Torvalds 6d52dcbe56 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] cpufreq: remove CVS keywords
  [CPUFREQ] change cpu freq arrays to per_cpu variables
2008-07-21 15:10:37 -07:00
Linus Torvalds eb4225b2da Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: (25 commits)
  mmtimer: Push BKL down into the ioctl handler
  [IA64] Remove experimental status of kdump
  [IA64] Update ia64 mmr list for SGI uv
  [IA64] Avoid overflowing ia64_cpu_to_sapicid in acpi_map_lsapic()
  [IA64] adding parameter check to module_free()
  [IA64] improper printk format in acpi-cpufreq
  [IA64] pv_ops: move some functions in ivt.S to avoid lack of space.
  [IA64] pvops: documentation on ia64/pv_ops
  [IA64] pvops: add to hooks, pv_time_ops, for steal time accounting.
  [IA64] pvops: add hooks, pv_irq_ops, to paravirtualized irq related operations.
  [IA64] pvops: add hooks, pv_iosapic_ops, to paravirtualize iosapic.
  [IA64] pvops: define initialization hooks, pv_init_ops, for paravirtualized environment.
  [IA64] pvops: paravirtualize NR_IRQS
  [IA64] pvops: paravirtualize entry.S
  [IA64] pvops: paravirtualize ivt.S
  [IA64] pvops: paravirtualize minstate.h.
  [IA64] pvops: define paravirtualized instructions for native.
  [IA64] pvops: preparation for paravirtulization of hand written assembly code.
  [IA64] pvops: introduce pv_cpu_ops to paravirtualize privileged instructions.
  [IA64] pvops: add an early setup hook for pv_ops.
  ...
2008-07-21 14:55:23 -07:00
Ian Schram 3a33cc108d mac80211_hwsim.c: fix: BUG: unable to handle kernel NULL pointer dereference at 0000000000000370
I was looking at this out of interest, but I'm in no way familiar with
the code.

Looks to me that the error handling code in mac80211_hwsim is awkward.
Which leads to it calling ieee80211_unregister_hw even when
ieee80211_register_hw failed.

The function has a for loop where it generates all simulated radios.
when something fails, the error handling will call mac80211_hwsim_free
which frees all simulated radios who's pointer isn't zero. However the
information stored is insufficient to determine whether or not the call
to ieee80211_register_hw succeeded or not for a specific radio. The
included patch makes init_mac80211_hwsim clean up the current simulated
radio, and then calls into mac80211_hwsim_free to clean up all the
radios that did succeed.

This however doesn't explain why the rate control registration failed..
build tested this, but had some problems reproducing the original
problem.

Signed-off-by: Ian Schram <ischram@telenet.be>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 13:19:35 -07:00
Linus Torvalds e89970aa93 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  netfilter: nf_conntrack_sctp: fix sparse warnings
  netfilter: nf_nat_sip: c= is optional for session
  netfilter: xt_TCPMSS: collapse tcpmss_reverse_mtu{4,6} into one function
  netfilter: nfnetlink_log: send complete hardware header
  netfilter: xt_time: fix time's time_mt()'s use of do_div()
  netfilter: accounting rework: ct_extend + 64bit counters (v4)
  netlink: add NLA_PUT_BE64 macro
  netfilter: nf_nat_core: eliminate useless find_appropriate_src for IP_NAT_RANGE_PROTO_RANDOM
  hdlcdrv: Fix CRC calculation.
  Revert "pkt_sched: Make default qdisc nonshared-multiqueue safe."
  net: In __netif_schedule() use WARN_ON instead of BUG_ON
  net: Improve simple_tx_hash().
  pkt_sched: Remove unused variable skb in dev_deactivate_queue function.
  sunhme: Remove stop/wake TX queue calls in set-multicast-list handler.
  ucc_geth: do not touch net queue in adjust_link phylib callback
  gianfar: do not touch net queue in adjust_link phylib callback
  atl1: Do not wake queue before queue has been started.
2008-07-21 11:29:52 -07:00
Randy Dunlap 443bd1c4dd pci kernel-doc fatal error
Fix kernel-doc comments so that they don't produce errors.
Also cut some extraneous copy-paste text.

Error(linhead//drivers/pci/pci.c:1133): duplicate section name 'Description'
Error(linhead//drivers/pci/pci.c:1189): duplicate section name 'Description'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-21 10:43:26 -07:00
Linus Torvalds 72a73693aa Merge branch 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (160 commits)
  x86: remove extra calling to get ext cpuid level
  x86: use setup_clear_cpu_cap() when disabling the lapic
  KVM: fix exception entry / build bug, on 64-bit
  x86: add unknown_nmi_panic kernel parameter
  x86, VisWS: turn into generic arch, eliminate leftover files
  x86: add ->pre_time_init to x86_quirks
  x86: extend and use x86_quirks to clean up NUMAQ code
  x86: introduce x86_quirks
  x86: improve debug printout: add target bootmem range in early_res_to_bootmem()
  Subject: devmem, x86: fix rename of CONFIG_NONPROMISC_DEVMEM
  x86: remove arch_get_ram_range
  x86: Add a debugfs interface to dump PAT memtype
  x86: Add a arch directory for x86 under debugfs
  x86: i386: reduce boot fixmap space
  i386/xen: add proper unwind annotations to xen_sysenter_target
  x86: reduce force_mwait visibility
  x86: reduce forbid_dac's visibility
  x86: fix two modpost warnings
  x86: check function status in EDD boot code
  x86_64: ia32_signal.c: remove signal number conversion
  ...
2008-07-21 10:34:25 -07:00
Linus Torvalds b7e6f62fe2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
  dm crypt: add merge
  dm table: remove merge_bvec sector restriction
  dm: linear add merge
  dm: introduce merge_bvec_fn
  dm snapshot: use per device mempools
  dm snapshot: fix race during exception creation
  dm snapshot: track snapshot reads
  dm mpath: fix test for reinstate_path
  dm mpath: return parameter error
  dm io: remove struct padding
  dm log: make dm_dirty_log init and exit static
  dm mpath: free path selector on invalid args
2008-07-21 10:30:10 -07:00
Linus Torvalds 8a392625b6 Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: (52 commits)
  md: Protect access to mddev->disks list using RCU
  md: only count actual openers as access which prevent a 'stop'
  md: linear: Make array_size sector-based and rename it to array_sectors.
  md: Make mddev->array_size sector-based.
  md: Make super_type->rdev_size_change() take sector-based sizes.
  md: Fix check for overlapping devices.
  md: Tidy up rdev_size_store a bit:
  md: Remove some unused macros.
  md: Turn rdev->sb_offset into a sector-based quantity.
  md: Make calc_dev_sboffset() return a sector count.
  md: Replace calc_dev_size() by calc_num_sectors().
  md: Make update_size() take the number of sectors.
  md: Better control of when do_md_stop is allowed to stop the array.
  md: get_disk_info(): Don't convert between signed and unsigned and back.
  md: Simplify restart_array().
  md: alloc_disk_sb(): Return proper error value.
  md: Simplify sb_equal().
  md: Simplify uuid_equal().
  md: sb_equal(): Fix misleading printk.
  md: Fix a typo in the comment to cmd_match().
  ...
2008-07-21 10:29:12 -07:00
Linus Torvalds 519f0141f1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (48 commits)
  Input: add switch for dock events
  Input: add microphone insert switch definition
  Input: i8042 - add Arima-Rioworks HDAMB board to noloop list
  Input: sgi_btns - add support for SGI Indy volume buttons
  Input: add option to disable HP SDC driver
  Input: serio - trivial documentation fix
  Input: add new serio driver for Xilinx XPS PS2 IP
  Input: add driver for Tabletkiosk Sahara TouchIT-213 touchscreen
  Input: new driver for SGI O2 volume buttons
  Input: yealink - reliably kill urbs
  Input: q40kbd - make q40kbd_lock static
  Input: gtco - eliminate early return
  Input: i8042 - add Dritek quirk for Acer Aspire 5720
  Input: usbtouchscreen - ignore eGalax screens supporting HID protocol
  Input: i8042 - add Medion NAM 2070 to noloop blacklist
  Input: i8042 - add Gericom Bellagio to nomux blacklist
  Input: i8042 - add Acer Aspire 1360 to nomux blacklist
  Input: hp_sdc_mlc.c - make a struct static
  Input: hil_mlc.c - make code static
  Input: wistron - generate normal key event if bluetooth or wifi not present
  ...
2008-07-21 10:27:31 -07:00
Micah Dowty ae6134bdf3 hdlcdrv: Fix CRC calculation.
This is a trivial patch against the hdlcdrv module that fixes its CRC
calculation. The finished CRC was overwriting the first two bytes of
each packet rather than being appended to the end.

I've tested this with 2.6.8 and 2.6.10-rc1, but hdlcdrv hasn't changed
much recently so it should work with many other kernel versions.

Signed-off-by: Micah Dowty <micah@navi.cx>
Acked-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 10:10:56 -07:00
Linus Torvalds f8b71a3a92 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: (44 commits)
  sparc: Remove Sparc's asm-offsets for sclow.S
  sparc64: Update defconfig.
  sparc64: Add Niagara2 RNG driver.
  sparc64: Add missing hypervisor service group numbers.
  sparc64: Remove 4MB and 512K base page size options.
  sparc64: Convert to generic helpers for IPI function calls.
  sparc: Use new '%pS' infrastructure to print symbols.
  sparc32: fix init.c allnoconfig build error
  sparc64: Config category "Processor type and features" absent
  sparc: arch/sparc/kernel/apc.c to unlocked_ioctl
  sparc: join the remaining header files
  sparc: merge header files with trivial differences
  sparc: when header files are equal use asm-sparc version
  sparc: copy sparc64 specific files to asm-sparc
  sparc: Merge asm-sparc{,64}/asi.h
  sparc: export openprom.h to userspace
  sparc: Merge asm-sparc{,64}/types.h
  sparc: Merge asm-sparc{,64}/termios.h
  sparc: Merge asm-sparc{,64}/termbits.h
  sparc: Merge asm-sparc{,64}/setup.h
  ...
2008-07-21 09:40:26 -07:00
Wang Chen 42a77a1b8f Fix istallion build failure
Commits b02f5ad6a3 ("istallion: use
tty_port") and a352def21a ("tty: Ldisc
revamp") broke the istallion driver.

Fix the compile error and silence a warning.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-21 09:39:15 -07:00
David S. Miller fd24c4af6e sunhme: Remove stop/wake TX queue calls in set-multicast-list handler.
Based upon a bug report by Alexander Beregalov and commentary
from Ben Hutchings.

These are totally unnecessary, in particular because this
driver's ->hard_start_xmit() handler takes the same driver
spinlock that the set-multicast-list handler uses.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 08:34:49 -07:00
Anton Vorontsov ebbdbd7c02 ucc_geth: do not touch net queue in adjust_link phylib callback
If the net queue has not been started, we'll get this nice oops
and non-working ethernet:

------------[ cut here ]------------
Kernel BUG at c01f4648 [verbose debug info unavailable]
Oops: Exception in kernel mode, sig: 5 [#1]
MPC836x RDK
Modules linked in:
NIP: c01f4648 LR: c01c0a10 CTR: c01c08e4
REGS: cf839e40 TRAP: 0700   Not tainted  (2.6.26-05254-gc7b9969)
MSR: 00021032 <ME,IR,DR>  CR: 22042044  XER: 00000000
TASK = cf828c30[4] 'events/0' THREAD: cf838000
GPR00: c01c0a10 cf839ef0 cf828c30 c035ceb0 cf8469a0 00000064 00000000 00000000
GPR08: c035ceb0 00000001 00000001 cf99c280 22044044 7ca81020 0fffc000 00000000
GPR16: 0fff2544 0fff63c0 00000000 0fff78e0 0ffa5580 00000004 00000000 00000000
GPR24: 02082000 cf9d0000 d1068000 00009032 cf846800 cf846b80 00000001 00000014
NIP [c01f4648] __netif_schedule+0x28/0x8c
LR [c01c0a10] adjust_link+0x12c/0x1e4
Call Trace:
[cf839ef0] [c0380f50] 0xc0380f50 (unreliable)
[cf839f10] [c01c0a10] adjust_link+0x12c/0x1e4
[cf839f40] [c01c2628] phy_state_machine+0x2e0/0x448
[cf839f60] [c00425e8] run_workqueue+0xc8/0x168
[cf839f90] [c0042c6c] worker_thread+0x70/0xd0
[cf839fd0] [c0046954] kthread+0x48/0x84
[cf839ff0] [c0012488] kernel_thread+0x44/0x60
Instruction dump:
7c0803a6 4e800020 3d20c036 9421ffe0 7c0802a6 7c681b78 3929ceb0 7c694a78
7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028
---[ end trace a57d367843bd2904 ]---

Since the driver is using phylib (which is doing netif_carrier_on/off()),
we should simply remove netif_tx_schedule_all() from adjust_link().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 08:30:36 -07:00
Anton Vorontsov afc079465e gianfar: do not touch net queue in adjust_link phylib callback
If the net queue has not been started, we'll get this nice oops
and non-working ethernet:

PHY: 0:01 - Link is Up - 1000/Full
------------[ cut here ]------------
kernel BUG at net/core/dev.c:1328!
Oops: Exception in kernel mode, sig: 5 [#1]
MPC837x RDB
Modules linked in:
NIP: c02544a0 LR: c01a17d0 CTR: c01a16ac
REGS: cf837e40 TRAP: 0700   Not tainted  (2.6.26-05253-g14b395e)
MSR: 00021032 <ME,IR,DR>  CR: 22042044  XER: 00000000
TASK = cf819400[5] 'events/0' THREAD: cf836000
GPR00: c01a17d0 cf837ef0 cf819400 c03d8d08 cf8469a0 00000064 00000000 00000000
GPR08: c03d8d08 00000001 00000001 cf899ba0 22044044 00000000 0fffd000 00000000
GPR16: 0fff3028 0fff6cf0 00000000 0fff8390 0ff494a0 00000004 00000000 00000000
GPR24: c0361a00 00001058 cf9f6600 00009032 cf846800 cf846b80 00000001 00000014
NIP [c02544a0] __netif_schedule+0x28/0x8c
LR [c01a17d0] adjust_link+0x124/0x1cc
Call Trace:
[cf837ef0] [c03fb3a0] 0xc03fb3a0 (unreliable)
[cf837f10] [c01a17d0] adjust_link+0x124/0x1cc
[cf837f40] [c01a8e28] phy_state_machine+0x2e0/0x448
[cf837f60] [c0040254] run_workqueue+0xc8/0x168
[cf837f90] [c00408d8] worker_thread+0x70/0xd0
[cf837fd0] [c0044630] kthread+0x48/0x84
[cf837ff0] [c0012610] kernel_thread+0x44/0x60
Instruction dump:
7c0803a6 4e800020 3d20c03e 9421ffe0 7c0802a6 7c681b78 39298d08 7c694a78
7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028
---[ end trace 13dfd73ee42d0c30 ]---

Since the driver is using phylib (which is doing netif_carrier_on/off()),
we should simply remove netif_tx_schedule_all() from adjust_link().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 08:29:54 -07:00
David S. Miller 39d48157ac atl1: Do not wake queue before queue has been started.
Based upon a bug report by Alexey Dobriyan, the patch is
also tested by him and confirmed to fix the problem.

Packet flow during link state events should not be done by
waking and stopping the TX queue anyways, that is handled
transparently by netif_carrier_{on,off}().

So, remove the netif_{wake,stop}_queue() calls in the link
check code, and add the necessary netif_start_queue() call
to atl1_up().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 08:28:37 -07:00
Ingo Molnar 2e2dcc7631 Merge branch 'x86/paravirt-spinlocks' into x86/for-linus 2008-07-21 16:45:56 +02:00
Ingo Molnar acee709cab Merge branches 'x86/urgent', 'x86/amd-iommu', 'x86/apic', 'x86/cleanups', 'x86/core', 'x86/cpu', 'x86/fixmap', 'x86/gart', 'x86/kprobes', 'x86/memtest', 'x86/modules', 'x86/nmi', 'x86/pat', 'x86/reboot', 'x86/setup', 'x86/step', 'x86/unify-pci', 'x86/uv', 'x86/xen' and 'xen-64bit' into x86/for-linus 2008-07-21 16:37:17 +02:00
Ingo Molnar e66d90fb4a Merge branch 'linus' into xen-64bit 2008-07-21 15:06:09 +02:00
Ingo Molnar 1c29dd9a9e Merge branch 'linus' into x86/paravirt-spinlocks 2008-07-21 15:05:58 +02:00
Milan Broz d41e26b901 dm crypt: add merge
This patch implements biovec merge function for crypt target.

If the underlying device has merge function defined, call it.
If not, keep precomputed value.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:40 +01:00
Milan Broz 9980c638a6 dm table: remove merge_bvec sector restriction
Remove max_sector restriction - merge function replaced it.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:39 +01:00
Milan Broz 7bc3447b69 dm: linear add merge
This patch implements biovec merge function for linear target.

If the underlying device has merge function defined, call it.
If not, keep precomputed value.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:38 +01:00
Milan Broz f6fccb1213 dm: introduce merge_bvec_fn
Introduce a bvec merge function for device mapper devices
for dynamic size restrictions.

This code ensures the requested biovec lies within a single
target and then calls a target-specific function to check
against any constraints imposed by underlying devices.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:37 +01:00
Mikulas Patocka 92e868122e dm snapshot: use per device mempools
Change snapshot per-module mempool to per-device mempool.

Per-module mempools could cause a deadlock if multiple
snapshot devices are stacked above each other.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:35 +01:00
Mikulas Patocka a8d41b59f3 dm snapshot: fix race during exception creation
Fix a race condition that returns incorrect data when a write causes an
exception to be allocated whilst a read is still in flight.

The race condition happens as follows:
* A read to non-reallocated sector in the snapshot is submitted so that the
  read is routed to the original device.
* A write to the original device is submitted. The write causes an exception
  that reallocates the block.  The write proceeds.
* The original read is dequeued and reads the wrong data.

This race can be triggered with CFQ scheduler and one thread writing and
multiple threads reading simultaneously.

(This patch relies upon the earlier dm-kcopyd-per-device.patch to avoid a
deadlock.)

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:34 +01:00
Mikulas Patocka cd45daffd1 dm snapshot: track snapshot reads
Whenever a snapshot read gets mapped through to the origin, track it in
a per-snapshot hash table indexed by chunk number, using memory allocated
from a new per-snapshot mempool.

We need to track these reads to avoid race conditions which will be fixed
by patches that follow.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:32 +01:00
Alasdair G Kergon def052d21c dm mpath: fix test for reinstate_path
Fix test for reinstate_path method before attempting to use it.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: Julia Lawall <julia@diku.dk>
2008-07-21 12:00:31 +01:00
Mikulas Patocka 148acff615 dm mpath: return parameter error
Return a specific error message if there are an invalid number of multipath
arguments.

This invalid command returns an "Unknown error" because the ti->error field is
not set

dmsetup create --table '0 2 multipath 0 0 1 1 round-robin 0 1 1 /dev/sdh' mpath0

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:30 +01:00
Richard Kennedy 6ae2fa6718 dm io: remove struct padding
Rearrange struct dm_io.
Shrinks size from 40 -> 32 allowing more objects/slab.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:28 +01:00
Adrian Bunk c8da2f8dd8 dm log: make dm_dirty_log init and exit static
dm_dirty_log_{init,exit}() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:27 +01:00
Mikulas Patocka 371b2e348b dm mpath: free path selector on invalid args
Free path selector if the arguments are invalid.

This command (note that it is invalid) causes reference leak on module
"dm_round_robin" and prevents the module from being removed.

dmsetup create --table '0 2 multipath 0 0 1 1 round-robin /dev/sdh' mpath0

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:24 +01:00
Ingo Molnar e27772b48d Merge branch 'linus' into x86/urgent 2008-07-21 11:02:45 +02:00
NeilBrown 4b80991c6c md: Protect access to mddev->disks list using RCU
All modifications and most access to the mddev->disks list are made
under the reconfig_mutex lock.  However there are three places where
the list is walked without any locking.  If a reconfig happens at this
time, havoc (and oops) can ensue.

So use RCU to protect these accesses:
  - wrap them in rcu_read_{,un}lock()
  - use list_for_each_entry_rcu
  - add to the list with list_add_rcu
  - delete from the list with list_del_rcu
  - delay the 'free' with call_rcu rather than schedule_work

Note that export_rdev did a list_del_init on this list.  In almost all
cases the entry was not in the list anymore so it was a no-op and so
safe.  It is no longer safe as after list_del_rcu we may not touch
the list_head.
An audit shows that export_rdev is called:
  - after unbind_rdev_from_array, in which case the delete has
     already been done,
  - after bind_rdev_to_array fails, in which case the delete isn't needed.
  - before the device has been put on a list at all (e.g. in
      add_new_disk where reading the superblock fails).
  - and in autorun devices after a failure when the device is on a
      different list.

So remove the list_del_init call from export_rdev, and add it back
immediately before the called to export_rdev for that last case.

Note also that ->same_set is sometimes used for lists other than
mddev->list (e.g. candidates).  In these cases rcu is not needed.

Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 17:05:25 +10:00
NeilBrown f2ea68cf42 md: only count actual openers as access which prevent a 'stop'
Open isn't the only thing that increments ->active.  e.g. reading
/proc/mdstat will increment it briefly.  So to avoid false positives
in testing for concurrent access, introduce a new counter that counts
just the number of times the md device it open.

Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 17:05:25 +10:00
Andre Noll d6e2215052 md: linear: Make array_size sector-based and rename it to array_sectors.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 17:05:25 +10:00
Andre Noll f233ea5c9e md: Make mddev->array_size sector-based.
This patch renames the array_size field of struct mddev_s to array_sectors
and converts all instances to use units of 512 byte sectors instead of 1k
blocks.

Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 17:05:22 +10:00
Dmitry Torokhov 908cf4b925 Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next 2008-07-21 00:55:14 -04:00
Andre Noll 15f4a5fdf3 md: Make super_type->rdev_size_change() take sector-based sizes.
Also, change the type of the size parameter from unsigned long long to
sector_t and rename it to num_sectors.

Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 14:42:12 +10:00
Andre Noll d07bd3bcc4 md: Fix check for overlapping devices.
The checks in overlaps() expect all parameters either in block-based
or sector-based quantities. However, its single caller passes two
rdev->data_offset arguments as well as two rdev->size arguments, the
former being sector counts while the latter are measured in 1K blocks.

This could cause rdev_size_store() to accept an invalid size from user
space. Fix it by passing only sector-based quantities to overlaps().

Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 14:42:07 +10:00
Neil Brown d7027458d6 md: Tidy up rdev_size_store a bit:
- used strict_strtoull in place of simple_strtoull
 - use my_mddev in place of rdev->mddev (they have the same value)
and more significantly,
 - don't adjust mddev->size to fit, rather reject changes which make
   rdev->size smaller than mddev->size

Adjusting mddev->size is a hangover from bind_rdev_to_array which
does a similar thing.  But it really is a better design to insist that
mddev->size is set as required, then the rdev->sizes are set to allow
for that.  The previous way invites confusion.

Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 14:22:18 +10:00
Linus Torvalds 734b397cd1 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  gpu: re-order GPU subdirectory vs char for AGP vs DRM startup.
2008-07-20 21:19:17 -07:00
Linus Torvalds ae0645a451 Merge branch 'for-linus' of git://git.o-hand.com/linux-mfd
* 'for-linus' of git://git.o-hand.com/linux-mfd:
  mfd: let asic3 use mem resource instead of bus_shift
  mfd: remove DS1WM register definitions from asic3.h
  mfd: add ASIC3_CONFIG_GPIO templates
  mfd: fix the asic3 irq demux code
  mfd: asic3 should depend on gpiolib
  mfd: fix asic3 config array initialisation
  mfd: move asic3 probe functions into __init section
  mfd: Use uppercase only for asic3 macros and defines
  mfd: use dev_* macros for asic3 debugging
  mfd: New asic3 gpio configuration code
  mfd: asic3 children platform data removal
  mfd: asic3 gpiolib support
2008-07-20 21:16:27 -07:00
Linus Torvalds f894d18380 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (277 commits)
  V4L/DVB (8415): gspca: Infinite loop in i2c_w() of etoms.
  V4L/DVB (8414): videodev/cx18: fix get_index bug and error-handling lock-ups
  V4L/DVB (8411): videobuf-dma-contig.c: fix 64-bit build for pre-2.6.24 kernels
  V4L/DVB (8410): sh_mobile_ceu_camera: fix 64-bit compiler warnings
  V4L/DVB (8397): video: convert select VIDEO_ZORAN_ZR36060 into depends on
  V4L/DVB (8396): video: Fix Kbuild dependency for VIDEO_IR_I2C
  V4L/DVB (8395): saa7134: Fix Kbuild dependency of ir-kbd-i2c
  V4L/DVB (8394): ir-common: CodingStyle fix: move EXPORT_SYMBOL_GPL to their proper places
  V4L/DVB (8393): media/video: Fix depencencies for VIDEOBUF
  V4L/DVB (8392): media/Kconfig: Convert V4L1_COMPAT select into "depends on"
  V4L/DVB (8390): videodev: add comment and remove magic number.
  V4L/DVB (8389): videodev: simplify get_index()
  V4L/DVB (8387): Some cosmetic changes
  V4L/DVB (8381): ov7670: fix compile warnings
  V4L/DVB (8380): saa7115: use saa7115_auto instead of saa711x as the autodetect driver name.
  V4L/DVB (8379): saa7127: Make device detection optional
  V4L/DVB (8378): cx18: move cx18_av_vbi_setup to av-core.c and rename to cx18_av_std_setup
  V4L/DVB (8377): ivtv/cx18: ensure the default control values are correct
  V4L/DVB (8376): cx25840: move cx25840_vbi_setup to core.c and rename to cx25840_std_setup
  V4L/DVB (8374): gspca: No conflict of 0c45:6011 with the sn9c102 driver.
  ...
2008-07-20 21:14:42 -07:00
Linus Torvalds db6d8c7a40 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (1232 commits)
  iucv: Fix bad merging.
  net_sched: Add size table for qdiscs
  net_sched: Add accessor function for packet length for qdiscs
  net_sched: Add qdisc_enqueue wrapper
  highmem: Export totalhigh_pages.
  ipv6 mcast: Omit redundant address family checks in ip6_mc_source().
  net: Use standard structures for generic socket address structures.
  ipv6 netns: Make several "global" sysctl variables namespace aware.
  netns: Use net_eq() to compare net-namespaces for optimization.
  ipv6: remove unused macros from net/ipv6.h
  ipv6: remove unused parameter from ip6_ra_control
  tcp: fix kernel panic with listening_get_next
  tcp: Remove redundant checks when setting eff_sacks
  tcp: options clean up
  tcp: Fix MD5 signatures for non-linear skbs
  sctp: Update sctp global memory limit allocations.
  sctp: remove unnecessary byteshifting, calculate directly in big-endian
  sctp: Allow only 1 listening socket with SO_REUSEADDR
  sctp: Do not leak memory on multiple listen() calls
  sctp: Support ipv6only AF_INET6 sockets.
  ...
2008-07-20 17:43:29 -07:00
Akinobu Mita 18c993629a dio: use dio_match_device() in dio_bus_match()
dio_bus_match() can use dio_match_device().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:40 -07:00
Geert Uytterhoeven 3fadd06ebc m68k/Apollo: remove the unused APOLLO_ELPLUS option
Looking at older kernel sources the APOLLO_ELPLUS option was added
somewhere during kernel 2.1, but even kernel 2.2.0 does not contain
any driver that would be enabled through it...

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:40 -07:00
Adrian Bunk 880e5e212e export c2p
This patch fixes the following build error:

<--  snip  -->

..
  Building modules, stage 2.
  MODPOST 1203 modules
ERROR: "c2p" [drivers/video/amifb.ko] undefined!
..
make[2]: *** [__modpost] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:39 -07:00
Adrian Bunk 8b54b6135a drivers/video/c2p.c: add MODULE_LICENSE
This patch adds the missing MODULE_LICENSE("GPL").

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:39 -07:00
Geert Uytterhoeven da8513c9b8 atafb: Register Atari-specific video modes with sysfs
Register the Atari-specific video modes with sysfs, so you can see them in
/sys/class/graphics/fb0/modes and change the video mode by writing to
/sys/class/graphics/fb0/mode.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:39 -07:00
Geert Uytterhoeven db3e5289f5 amifb: Register Amiga-specific video modes with sysfs
Register the Amiga-specific video modes with sysfs, so you can see them in
/sys/class/graphics/fb0/modes and change the video mode by writing to
/sys/class/graphics/fb0/mode.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:39 -07:00
akinobu.mita@gmail.com fa7f289396 zorro: use memory_read_from_buffer
zorro: use memory_read_from_buffer

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:38 -07:00
Robert P. J. Day a6a26a3e65 ZORRO: Replace deprecated __initcall with equivalent device_initcall.
ZORRO: Replace deprecated __initcall with equivalent device_initcall.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:38 -07:00
Geert Uytterhoeven e945b568e2 m68k: Return -ENODEV if no device is found
According to the tests in do_initcalls(), the proper error code in case no
device is found is -ENODEV, not -ENXIO or -EIO.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:38 -07:00
Paulius Zaleckas 038eddd9ac ariadne: use netstats in net_device structure
Use net_device_stats from net_device structure instead of local.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:38 -07:00
Adrian Bunk f30828a674 m68k: remove CVS keywords
This patch removes CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:38 -07:00
Linus Torvalds f7df406dce Merge branch 'configfs-fixup-ptr-error' of git://oss.oracle.com/git/jlbec/linux-2.6
* 'configfs-fixup-ptr-error' of git://oss.oracle.com/git/jlbec/linux-2.6:
  configfs: Allow ->make_item() and ->make_group() to return detailed errors.
  Revert "configfs: Allow ->make_item() and ->make_group() to return detailed errors."
2008-07-20 17:17:52 -07:00
Thomas Gleixner 5e248ac9a5 APCI: revert another duplicated patch
commit d185705690 ("ACPI: don't walk
tables if ACPI was disabled") is another superfluous duplicate commit
caused by git -> quilt -> git conversion.

Revert it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:14:57 -07:00
Thomas Gleixner 392798a17b APCI: revert duplicated patch
commit 816c2eda3c ("dock: bay: Don't call
acpi_walk_namespace() when ACPI is disabled.") was merged between
2.6.26-rc8 and -rc9)

Due to rebasing the ACPI tree via quilt the same patch got applied again
via commit cc7e51666d ("dock: bay: Don't
call acpi_walk_namespace() when ACPI is disabled.")

Revert it, as it is obviously bogus.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:14:57 -07:00
Alan Cox 4e4f64da58 Fix strip driver back up for ldisc/tty changes
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:38 -07:00
Alan Cox 44b7d1b37f tty: add more tty_port fields
Move more bits into the tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:38 -07:00
Alan Cox 77451e53e0 cyclades: use tty_port
Switch cyclades to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:38 -07:00
Alan Cox ae67751785 tty: Clean up tiocmset
Reverse the order of one test and it gets much more readable

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox 8fb06c7713 synclink: use tty_port
Switch the synclink ports to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox f8ae476416 stallion: use tty_port
Switch the stallion driver to use the tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Haavard Skinnemoen b1d1619b4a atmel_serial: Fix tty_port breakage
The tty pointer has been moved into a tty_port field, so we need to use
->info->port.tty instead of just ->info->tty. Fixes these build errors:

David Brownell <david-b@pacbell.net> wrote:
> drivers/serial/atmel_serial.c: In function 'atmel_rx_from_ring':
> drivers/serial/atmel_serial.c:665: error: 'struct uart_info' has no member named 'tty'
> drivers/serial/atmel_serial.c: In function 'atmel_rx_from_dma':
> drivers/serial/atmel_serial.c:672: error: 'struct uart_info' has no member named 'tty'
> drivers/serial/atmel_serial.c: In function 'atmel_startup':
> drivers/serial/atmel_serial.c:797: error: 'struct uart_info' has no member named 'tty'
> make[2]: *** [drivers/serial/atmel_serial.o] Error 1

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox e60a108448 rocket: use tty_port
Switch the rocketport to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox 0ad9e7d1d6 mxser: use tty_port
Switch mxser to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox 9de6a51fee moxa: use tty_port
Switch MOXA to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox b02f5ad6a3 istallion: use tty_port
Switch istallion to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox f1d03228ea isicom: use tty_port
Switch isicom to use a tty_port structure for some fields

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox d99101fda0 riscom8: remove bogus checks
Chris Malley posted a patch removing a NULL check in the riscom8 driver.
Further analysis shows that even more of the tests are irrelevant so we
can delete lots of stuff

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Alan Cox 85f8f81052 riscom8: use tty_port
Switch riscom8 to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Alan Cox b5391e29f4 gs: use tty_port
Switch drivers using the old "generic serial" driver to use the tty_port
structures

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Alan Cox 4982d6b37a esp: use tty_port
Switch esp to use the new tty_port structures

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Alan Cox 52d417388d epca: use tty_port
Switch the EPCA driver to include and begin using a tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Takashi Iwai a88487c79b Fix compile errors in SGI console drivers (linux-next tree)
The below is the patch to replace blindly all possible places,
including Jack's fixes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
(Reviewed and checked rather than blindly added)
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Jack Steiner b1ca7e7a0b - Fix compile errors in SGI console drivers (linux-next tree)
Fix compile errors in SGI console drivers caused by changes to the
tty_port structures in the linux-next tree.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Stephen Rothwell 87c25ef0a4 ttydev: fix pamc_zilog for tty pointer move
Today's linux-next build (powerpc allyesconfig) failed like this:

drivers/serial/pmac_zilog.c: In function 'pmz_receive_chars':
drivers/serial/pmac_zilog.c:245: error: 'struct uart_info' has no member named 'tty'
drivers/serial/pmac_zilog.c:250: error: 'struct uart_info' has no member named 'tty'

I applied the patch below (which builds but may, or may not, be correct).
--
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Stephen Rothwell 2f7a697a13 ttydev: fix pamc_zilog for tty pointer move
Today's linux-next build (sparc64 defconfig) failed like this:

drivers/serial/sunhv.c: In function `receive_chars':
drivers/serial/sunhv.c:188: error: structure has no member named `tty'
drivers/serial/sunsu.c: In function `receive_chars':
drivers/serial/sunsu.c:314: error: structure has no member named `tty'
drivers/serial/sunsab.c: In function `receive_chars':
drivers/serial/sunsab.c:121: error: structure has no member named `tty'

I applied the following patch (which, again, may not be correct).

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:35 -07:00
Alan Cox df4f4dd429 serial: use tty_port
Switch the serial_core based drivers to use the new tty_port structure.
We can't quite use all of it yet because of the dynamically allocated
extras in the serial_core layer.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:35 -07:00
Alan Cox 6f67048cd0 tty: Introduce a tty_port common structure
Every tty driver has its own concept of a port structure and because
they all differ we cannot extract commonality.  Begin fixing this by
creating a structure drivers can elect to use so that over time we can
push fields into this and create commonality and then introduce common
methods.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:35 -07:00
Adrian Bunk d87a6d951c drivers/serial/: remove CVS keywords
This patch removes CVS keywords that weren't updated for a long time in
comments, printk's and MODULE_DESCRIPTION's (no printk's or
MODULE_DESCRIPTION's are completely removed).

While doing this I also found and fixed a missing \n in a printk
in m32r_sio.c

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:35 -07:00
Adrian Bunk 59247ca2fd drivers/char/rio/: remove VCS tags
This patch removes ancient VCS tags (either protected
by #ifdef SCCS_LABELS or commented out).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:35 -07:00
Alan Cox a352def21a tty: Ldisc revamp
Move the line disciplines towards a conventional ->ops arrangement.  For
the moment the actual 'tty_ldisc' struct in the tty is kept as part of
the tty struct but this can then be changed if it turns out that when it
all settles down we want to refcount ldiscs separately to the tty.

Pull the ldisc code out of /proc and put it with our ldisc code.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:34 -07:00
Jiri Slaby e1e5770bb6 tty: isicom, enable/disable pci device
Don't forget to enable and disable PCI devices.  The device might be
unusable without that.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:34 -07:00
Haavard Skinnemoen 9afd561aca Subject: [PATCH 2/2] atmel_serial: Implement flush_buffer() hook
Avoid dumping garbage to the serial port when the tty is flushed. This
tends to happen when rebooting from a serial console.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:34 -07:00
Haavard Skinnemoen 6bb0e3a59a Subject: [PATCH 1/2] serial: Add flush_buffer() operation to uart_ops
Serial drivers using DMA (like the atmel_serial driver) tend to get very
confused when the xmit buffer is flushed and nobody told them.  They
also tend to spew a lot of garbage since the DMA engine keeps running
after the buffer is flushed and possibly refilled with unrelated data.

This patch adds a new flush_buffer operation to the uart_ops struct,
along with a call to it from uart_flush_buffer() right after the xmit
buffer has been cleared. The driver can implement this in order to
syncronize its internal DMA state with the xmit buffer when the buffer
is flushed.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:34 -07:00
Dave Airlie e6b51632b3 gpu: re-order GPU subdirectory vs char for AGP vs DRM startup.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-07-21 08:42:49 +10:00
Philipp Zabel 99cdb0c8c5 mfd: let asic3 use mem resource instead of bus_shift
The bus_shift parameter in platform_data is not needed
as we can tell the driver with the IOMEM_RESOURCE whether
the ASIC is located on a 16bit or 32bit memory bus.

The htc-egpio driver uses a more descriptive bus_width parameter,
but for drivers where the register map size fixed, we don't even
need this.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-07-20 19:56:44 +02:00
Philipp Zabel de0d23c12c mfd: fix the asic3 irq demux code
Wrong irq numbers were given to desc->handle_irq, which on some devices
caused endless loops (asic3_irq_demux calling itself, basically).

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:56:12 +02:00
Samuel Ortiz 30250b457f mfd: asic3 should depend on gpiolib
Now that asic3 implements the gpiolib API, it should depend on it at
build time.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:56:01 +02:00
Philipp Zabel 786bef3768 mfd: fix asic3 config array initialisation
Our memset length was incorrect.

Tested-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:55:44 +02:00
Philipp Zabel 065032f61b mfd: move asic3 probe functions into __init section
Potentially free some memory by moving the _probe functions into __init.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:55:30 +02:00
Samuel Ortiz 3b8139f8b1 mfd: Use uppercase only for asic3 macros and defines
Let's be consistent and use uppercase only, for both macro and defines.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:55:14 +02:00
Samuel Ortiz 24f4f2eef2 mfd: use dev_* macros for asic3 debugging
We replace the various printks, and use the dev_* macros instead.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:55:08 +02:00
Samuel Ortiz 3b26bf1722 mfd: New asic3 gpio configuration code
The ASIC3 GPIO configuration code is a bit obscure and hardly readable.
This patch changes it so that it is now more readable and understandable,
by being more explicit.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:55:00 +02:00
Samuel Ortiz 1effe5bc6c mfd: asic3 children platform data removal
Platform devices should be dynamically allocated, and each supported
device should have its own platform data.
For now we just remove this buggy code.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:54:51 +02:00
Samuel Ortiz 6f2384c4bd mfd: asic3 gpiolib support
ASIC3 is, among other things, a GPIO extender. We should thus have it
supporting the current gpiolib API.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:52:38 +02:00
Marcus Sundberg 77332894c2 r8169: avoid thrashing PCI conf space above RTL_GIGA_MAC_VER_06
The magic write to register 0x82 will often cause PCI config space on
my 8168 (PCI ID 10ec:8168, revision 2. mounted in an LG P300 laptop)
to be filled with ones during driver load, and thus breaking NIC
operation until reboot. If it does not happen on first driver load it
can easily be reproduced by unloading and loading the driver a few
times.

The magic write was added long ago by this commit:

Author: François Romieu <romieu@fr.zoreil.com>
Date:   Sat Jan 10 06:00:46 2004 -0500

     [netdrvr r8169] Merge of changes done by Realtek to rtl8169_init_one():
     - phy capability settings allows lower or equal capability as suggested
       in Realtek's changes;
     - I/O voodoo;
     - no need to s/mdio_write/RTL8169_WRITE_GMII_REG/;
     - s/rtl8169_hw_PHY_config/rtl8169_hw_phy_config/;
     - rtl8169_hw_phy_config(): ad-hoc struct "phy_magic" to limit duplication
       of code (yep, the u16 -> int conversions should work as expected);
     - variable renames and whitepace changes ignored.

As the 8168 wasn't supported by that version this patch simply removes
the bogus write from mac versions <= RTL_GIGA_MAC_VER_06.

[The change above makes sense for the 8101/8102 too -- Ueimor]

Signed-off-by: Marcus Sundberg <marcus@ingate.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-07-20 19:49:30 +02:00
Francois Romieu f887cce8de r8169: multicast register update
The layout of the 8101 series is identical to that of the 8168 one,
thus allowing to pack everything not 8169 related above MAC_VER_06.
New 810x and 8168 chipsets should automagically behave correctly.

It matches code in Realtek's 1.008.00 8101 and 8.007.00 8168 drivers.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-07-20 19:48:20 +02:00
Jean-Francois Moine d20b27478d V4L/DVB (8415): gspca: Infinite loop in i2c_w() of etoms.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:33 -03:00
Hans Verkuil fac3639d88 V4L/DVB (8414): videodev/cx18: fix get_index bug and error-handling lock-ups
Fix a bug in get_index that was introduced earlier.
Also fix two error handling lock-ups in videodev and cx18 that
where found thanks to that bug.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:27 -03:00
Hans Verkuil f19ad39014 V4L/DVB (8411): videobuf-dma-contig.c: fix 64-bit build for pre-2.6.24 kernels
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:22 -03:00
Hans Verkuil 86751b016f V4L/DVB (8410): sh_mobile_ceu_camera: fix 64-bit compiler warnings
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:17 -03:00
Mauro Carvalho Chehab af8b303e96 V4L/DVB (8397): video: convert select VIDEO_ZORAN_ZR36060 into depends on
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:12 -03:00
Mauro Carvalho Chehab 367394ac5c V4L/DVB (8396): video: Fix Kbuild dependency for VIDEO_IR_I2C
Instead of letting VIDEO_IR_I2C to be selected by VIDEO_IR, if I2C, convert it
into a symbol that depends on both VIDEO_IR and I2C.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:08 -03:00
Mauro Carvalho Chehab 1c22dad8ab V4L/DVB (8395): saa7134: Fix Kbuild dependency of ir-kbd-i2c
Currently, saa7134 is dependent of ir-kbd-i2c, since it uses a symbol that is
defined there. However, as this symbol is used only on saa7134, there's no
sense on keeping it defined there (or on ir-commons).

So, let's move it to saa7134 and remove one symbol for being exported.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:03 -03:00
Mauro Carvalho Chehab 4db16db4f6 V4L/DVB (8394): ir-common: CodingStyle fix: move EXPORT_SYMBOL_GPL to their proper places
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:59 -03:00
Mauro Carvalho Chehab 432aa3b64d V4L/DVB (8393): media/video: Fix depencencies for VIDEOBUF
VIDEOBUF_DVB depends on VIDEOBUF_CORE, not on VIDEOBUF_DMA_SG

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:54 -03:00
Mauro Carvalho Chehab d4216488c0 V4L/DVB (8392): media/Kconfig: Convert V4L1_COMPAT select into "depends on"
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:49 -03:00
Hans Verkuil c3fb62bf92 V4L/DVB (8390): videodev: add comment and remove magic number.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:44 -03:00
Brandon Philips 8373a3e512 V4L/DVB (8389): videodev: simplify get_index()
Use Hans Verkuil's suggested method of implementing get_index which doesn't
depend on class_for_each_device and instead uses the video_device array. This
simplifies the code and reduces its memory footprint.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:39 -03:00
Hans Verkuil 2bc93aa304 V4L/DVB (8387): Some cosmetic changes
Those changes, together with some proper patches, will allow out-of-tree 
compilation for for kernels < 2.6.19

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:32 -03:00
Hans Verkuil e3bf20de33 V4L/DVB (8381): ov7670: fix compile warnings
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:27 -03:00
Hans Verkuil 9edd350f51 V4L/DVB (8380): saa7115: use saa7115_auto instead of saa711x as the autodetect driver name.
Having an _auto suffix is less ambiguous than a 'saa711x' identifier.
It's also used like this in the saa7127 driver.

Thanks to Jean Delvare for suggesting this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:23 -03:00
Jean Delvare 5daed07401 V4L/DVB (8379): saa7127: Make device detection optional
The saa7127 driver supports all of SAA7126, SAA7127, SAA7128 and
SAA1729 devices. Declare all these devices, so that board drivers can
tell which device is present, instead of always relying on
auto-detection (which needs to write to the chip, eek!).

We still need the detection for ivtv, so a special device name
"saa7127_auto" can be used when the caller doesn't know exactly which
device is present.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:17 -03:00
Hans Verkuil 03b52c36a3 V4L/DVB (8378): cx18: move cx18_av_vbi_setup to av-core.c and rename to cx18_av_std_setup
Same issue as for cx25840: this function sets up the standard timings
and has nothing to do with VBI setup.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:12 -03:00
Hans Verkuil ca130eef2c V4L/DVB (8377): ivtv/cx18: ensure the default control values are correct
For several MPEG controls and the volume control the default as returned
by VIDIOC_QUERYCTRL was incorrect and did not match the actual initial
value.

This is now fixed for cx18 and ivtv.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:07 -03:00
Hans Verkuil cb5aa1c62d V4L/DVB (8376): cx25840: move cx25840_vbi_setup to core.c and rename to cx25840_std_setup
cx25840_vbi_setup has nothing to do with setting up VBI, but everything
with setting up the standard. Move to cx25840-core.c and rename.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:00 -03:00
Hans de Goede 5de39b2b1f V4L/DVB (8374): gspca: No conflict of 0c45:6011 with the sn9c102 driver.
The sn9c102 driver claims to support usb-ID 0x0c45:0x6011, which is
a sn9c102 with ov6650 sensor, but the sn9c102 driver does not support the
ov6650 sensor (tested). Also the sn9c102 driver claims to support usb-ID
0x0c45:0x603f, which is a sn9c102 with CISVF10 sensor, but the sn9c102
driver does not support the CISVF10 sensor (not tested).

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:52 -03:00
Hans de Goede 12ff91264c V4L/DVB (8373): gspca: Hue, saturation and contrast controls added for sn9c10x ovxxxx.
(does not work with ov6650)

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:46 -03:00
Hans de Goede 722103e390 V4L/DVB (8372): gspca: Small ov6650 fixes.
1) Don't change  the red and blue pre-gain's from their defaults
2) Actually make the powerline freq ctrl available to userspace

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:42 -03:00
Jean-Francois Moine c91256c27b V4L/DVB (8371): gspca: Webcam 08ca:2050 added.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:37 -03:00
Jean-Francois Moine 100f7f2a34 V4L/DVB (8370): gspca: Webcam 0461:0821 added.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:32 -03:00
Jean-Francois Moine 1ff1e48442 V4L/DVB (8369): gspca: Bad initialization of sn9c102 ov7630.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:28 -03:00
Andoni Zubimendi d87616f5a5 V4L/DVB (8367): gspca: Light frequency filter / exposure / clean-up for sn9c103 ov7630.
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:24 -03:00
Hans de Goede a975a5279e V4L/DVB (8366): gspca: Better code for ov6650 and ov7630.
sonixb:   Common code between ov6650 and ov7630.
          Fix brightness oscillation with ov6650 sensor.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:19 -03:00
Hans de Goede 66f358211d V4L/DVB (8364): gspca: Support of powerline frequency for ov6650.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:15 -03:00
Hans de Goede 5c6644f305 V4L/DVB (8363): gspca: Bad image size with spca501.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:10 -03:00
Hans de Goede c36260ee27 V4L/DVB (8362): gspca: Bad offset of the brightness sum in sn9c103 packets.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:05 -03:00
Andoni Zubimendi b7474cf9f6 V4L/DVB (8361): gspca: Bad check of i2c write to sn9c10x.
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:01 -03:00
Andoni Zubimendi 794af52a4c V4L/DVB (8360): gspca: Bad initialization of sn9c103 - ov7630.
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:56 -03:00
Mauro Carvalho Chehab 9a97a2abe4 V4L/DVB (8359): gspca: Adds register aliases for zc03xx registers
Thanks to http://zc0302.sourceforge.net/zc0302.php, we have some hints
about what each zc3xx register means.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-07-20 07:26:49 -03:00
Jean-Francois Moine 568788a771 V4L/DVB (8358): gspca: Better initialization of sn9c120 - ov7660.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:43 -03:00
Hans de Goede f4d520258d V4L/DVB (8357): gspca: Perfect exposure for sn9c10x, sensor ov6650.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:37 -03:00
Hans de Goede 3647fea840 V4L/DVB (8356): gspca: 352x288 mode fix and source clean-up for Sonix bridges.
sonixb:   Bad initialization of sensor for 352x288 mode.
                (from Hans de Goede)
sonixj:   Clean-up source.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:33 -03:00
Hans de Goede ad5ef80dd7 V4L/DVB (8354): gspca: Better gain for bridge sn9c10x - sensor ov6650.
sonixb:   Better gain for ov6650.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:28 -03:00
Andoni Zubimendi 4b972d29bb V4L/DVB (8353): gspca: 640x480 for bridge sn9c103 / sensor ov7630.
sonixb:   640x480 mode for sn9c103 - ov7630.

Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:24 -03:00
Jean-Francois Moine 739570bb21 V4L/DVB (8352): gspca: Buffers for USB exchanges cannot be in the stack.
gspca:    Protect dq_callback() against simultaneous USB exchanges.
          Temporary buffer for USB exchanges added in the device struct.
(all)     Use a temporary buffer for all USB exchanges.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:14 -03:00
Jean-Francois Moine 5b77ae7776 V4L/DVB (8350): gspca: Conform to v4l2 spec and mutex unlock fix.
gspca:    Empty the application queues on streamoff ioctl.
          streamon/off and qbuf ioctls may be done by any application.
          Don't handle MJPEG pixel format as JPEG.
                (thanks to Hans de Goede)
          Authorize reqbufs ioctl when streaming.
          Bad mutex unlock in poll() when streaming problem.
                (thanks to Mauro Carvalho Chehab)
          Don't handle 'webcam disconnected' in stream off.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:09 -03:00
Andoni Zubimendi 51fc8e3bc0 V4L/DVB (8349): gspca: SN9C103 OV7630 fixes in sonixb.
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:04 -03:00
Hans de Goede dcef3237b6 V4L/DVB (8348): gspca: Add auto gain/exposure to sonixb and tas5110 / ov6650 sensors.
sonixb:   Do auto gain for tas5110 / ov6650 sensors.
pac207:   Move the auto_gain function to gspca.
gspca:    New function gspca_auto_gain_n_exposure().

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:59 -03:00
Jean-Francois Moine d0d0e39bc5 V4L/DVB (8346): gspca: Bad pixel format of bridge VC0321.
vc032x:   Light frequency was not initialized.
          Change the pixel format of bridge VC0321 to V4L2_PIX_FMT_YUV420
              ('YU12').
          Set a bridge to all webcams.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:54 -03:00
Magnus Damm 326c986207 V4L/DVB (8343): soc_camera_platform: Add SoC Camera Platform driver
This patch adds a simple platform camera device. Useful for testing
cameras with SoC camera host drivers. Only one single pixel format
and resolution combination is supported.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:49 -03:00
Magnus Damm 0d3244d643 V4L/DVB (8342): sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3
This is V3 of the SuperH Mobile CEU soc_camera driver.

The CEU hardware block is configured in a transparent data fetch
mode, frames are captured from the attached camera and written to
physically contiguous memory buffers provided by the newly added
videobuf-dma-contig queue. Tested on sh7722 and sh7723 processors.

 Changes since V2:
 - remove SUPERH Kconfig dependency
 - move sh_mobile_ceu.h to include/media
 - add board callback support with enable_camera()/disable_camera()
 - add support for declare_coherent_memory
 - rework video memory limit
 - more verbose error messages

 Changes since V1:
 - fixed the CEU driver to work with the newly updated patches

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:43 -03:00
Magnus Damm 2cc45cf25a V4L/DVB (8341): videobuf: Add physically contiguous queue code V3
This is V3 of the physically contiguous videobuf queues patch.
Useful for hardware such as the SuperH Mobile CEU which doesn't
support scatter gatter bus mastering.

Since it may be difficult to allocate large chunks of physically
contiguous memory after some uptime due to fragmentation, this code
allocates memory using dma_alloc_coherent(). Architectures supporting
dma_declare_coherent_memory() can easily avoid fragmentation issues
by using dma_declare_coherent_memory() to force dma_alloc_coherent()
to allocate from a certain pre-allocated memory area.

 Changes since V2
  - use dma_handle for physical address
  - use "scatter gather" instead of "scatter gatter"

 Changes since V1:
  - use dev_err() instead of pr_err()
  - remember size in struct videobuf_dma_contig_memory
  - keep struct videobuf_dma_contig_memory in .c file
  - let videobuf_to_dma_contig() return dma_addr_t
  - implement __videobuf_sync()
  - return statements, white space and other minor fixes

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:37 -03:00
Magnus Damm 5d6aaf50e2 V4L/DVB (8340): videobuf: Fix gather spelling
Use "scatter gather" instead of "scatter gatter".

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:32 -03:00