Tony Jones [Tue, 11 Sep 2007 21:07:31 +0000 (14:07 -0700)]
USB: convert ohci debug files to use debugfs instead of sysfs
We should not have multiple line files in sysfs, this moves the data to
debugfs instead, like the UHCI driver.
Signed-off-by: Tony Jones <tonyj@suse.de> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB: always announce a device has been added to the system
Distros (like SuSE) want to know this information, to make it easier
to handle support issues. Might as well let everyone benefit from this.
This is also enabled whenever CONFIG_USB_DEBUG is enabled, to help with
debugging.
Alan Stern [Tue, 20 Nov 2007 21:28:55 +0000 (16:28 -0500)]
USB: dummy_hcd: don't register drivers on the platform bus
This patch (as1017) makes dummy_hcd behave more like the other USB
peripheral controller drivers by no longer registering its
gadget driver on the platform bus. Doing that has always been a
mistake, since a usb_gadget_driver isn't a platform_driver. Instead
the gadget driver is left unregistered in sysfs.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Patrik Sevallius [Tue, 20 Nov 2007 17:32:00 +0000 (09:32 -0800)]
USB: usb peripheral controller driver oops avoidance
I'm having problem with oopses when rebooting, if I modprobe g_serial
and rmmod g_serial and do a reboot I get an oops in device_shutdown().
The reason seems to be that usb_gadget_unregister_driver() doesn't do
enough cleanup. With this at91_udc patch I don't get the oops.
Signed-off-by: Patrik Sevallius <patrik.sevallius@enea.com>
[ Same bug was in other peripheral controller drivers; fixed ] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sarah Sharp [Wed, 14 Nov 2007 01:10:09 +0000 (17:10 -0800)]
USB: Prepare serial core for autosuspend.
Claim the interface for a USB to serial converter when the tty is open,
and release the interface when the tty is closed.
If a driver doesn't provide a resume function, use the generic resume
instead.
Make sure the generic resume function does not submit the URBs if we're
coming back from autosuspend. On autoresume, we know that the open
function will be called next, which will attempt to submit the URBs. If
we submit them in the resume function, the open will fail.
This works for:
- autosuspend
- suspending with the tty open or closed
- hibernate with the tty closed
A hibernate (or a suspend that causes the USB subsystem to lose power)
has issues. If you have the tty open when you hibernate, a new tty will
be created when the device re-enumerates during resume.
Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Mon, 19 Nov 2007 20:58:36 +0000 (12:58 -0800)]
USB: gadget code switches to pr_err() and friends
We now have pr_err(), pr_warning(), and friends ... start using
them in the gadget stack instead of printk(KERN_ERR) and friends.
This gives us shorter lines and somewhat increased readability.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 19 Nov 2007 20:57:45 +0000 (15:57 -0500)]
USB: don't change HC power state for a FREEZE
This patch (as1016) prevents PCI-based host controllers from
undergoing a power-state change during a FREEZE or a PRETHAW. Such
changes are needed only during a SUSPEND.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 19 Nov 2007 15:15:02 +0000 (10:15 -0500)]
USB: make ksuspend_usbd thread non-freezable
This patch (as1012b) makes the ksuspend_usbd kernel thread
non-freezable. Since the PM core has been changed to lock all devices
during a system sleep, the thread no longer needs to be frozen. It
won't interfere with a system sleep because before trying to resume a
root hub device, it acquires the device's lock.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aristeu Rozanski [Tue, 13 Nov 2007 22:22:07 +0000 (17:22 -0500)]
USB: usb_serial_console: allocate fake tty and termios before calling driver open() method
The usb serial method set_termios() is called for the first time from
open() method in order to set up the termios structure with the default
device's settings, ignoring the current settings. Once it's initialized,
the next set_termios() calls will update the device with the
tty->termios settings.
Currently USB serial console code calls the driver open() method without
a tty and after that will allocate a fake tty and termios so the command
line arguments can be applied to the device
(console=ttyUSB0,115200,...). This makes the driver overwrite the
termios with the default settings and not applying the command line
options.
This patch changes usb_console_setup() to allocate the fake tty and
termios before the open() method is called.
Aristeu Rozanski [Mon, 12 Nov 2007 20:15:02 +0000 (15:15 -0500)]
USB: usb_serial: clean tty reference in the last close
When a usb serial adapter is used as console, the usb serial console
driver bumps the open_count on the port struct used but doesn't attach
a real tty to it (only a fake one temporaly). If this port is opened later
using the regular character device interface, the open method won't
initialize the port, which is the expected, and will receive a brand new
tty struct created by tty layer, which will be stored in port->tty.
When the last close is issued, open_count won't be 0 because of the
console usage and the port->tty will still contain the old tty value. This
is the last ttyUSB<n> close so the allocated tty will be freed by the
tty layer. The usb_serial and usb_serial_port are still in use by the
console, so port_free() won't be called (serial_close() ->
usb_serial_put() -> destroy_serial() -> port_free()), so the scheduled
work (port->work, usb_serial_port_work()) will still run. And
usb_serial_port_work() does:
(...)
tty = port->tty;
if (!tty)
return;
Craig W. Nadler [Sun, 11 Nov 2007 23:00:15 +0000 (15:00 -0800)]
USB: add Printer Gadget Driver
G_PRINTER: Adds a USB printer gadget driver for use in printer firmware.
This adds a USB printer gadget driver for use in printer firmware.
The printer gadget channels data between the USB host and a userspace
program driving the print engine. The user space program reads and
writes the device file /dev/g_printer to receive or send printer data.
It can use ioctl calls to the device file to get or set printer status.
Signed-off-by: Craig W. Nadler <craig@nadler.us> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Thu, 8 Nov 2007 20:15:28 +0000 (15:15 -0500)]
USB: usb-storage: new "lockable" subclass 0x07
This patch (as1011) adds a #define for the newly-created Lockable
(i.e., password-protected) subclass 0x07 for USB mass-storage devices.
The private ISD200 entry (which had been mapped to subclass 0x07) is
moved to 0xf0, which is unlikely to conflict with any official
subclass designation.
The US_SC_MIN and US_SC_MAX constants aren't used anywhere, so the
patch removes them.
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>
Kyungmin Park [Wed, 21 Nov 2007 23:13:15 +0000 (15:13 -0800)]
USB: device DMA support on OMAP2
The current omap udc dosen't support the DMA mode and it has some problem
at setup time on OMAP2 with previous patch file. I found that the code
assumes bulk out required the big data transfer. But MODE SELECT(6) sent
the only 24 bytes. it makes a problem. So I implement the small packets
handling for it.
It is tested with both linux and windows.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: David Brownell <david-b@pacbell.net> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB: sis FB driver: *_ioctl32_conversion functions do not exist in recent kernels
Remove dead code while at it.
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Cc: Thomas Winischhofer <thomas@winischhofer.net> Cc: Greg KH <greg@kroah.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* add ATA_REG_{ERROR,LCYL,HCYL,STATUS}_OFFSET defines and use them
instead of IDE_{ERROR,LCYL,HCYL,STATUS}_OFFSET from <linux/ide.h>
* remove no longer needed <linux/ide.h> include
* remove incorrect comment added by the last commit:
- isd200.c is not the only user of struct hd_driveid besides IDE
(see drivers/block/xsysace.c and arch/um/drivers/ubd_kern.c)
Some crazy devices in the wild have a vendor id of 0x0000. If we try to
add a module alias with this id, we just can't do it due to a check in
the file2alias.c file. Change the test to verify that both the vendor
and product ids are 0x0000 to show a real "blank" module alias.
Note, the module-init-tools package also needs to be changed to properly
generate the depmod tables.
Cc: Janusz <janumix@poczta.fm> Cc: stable <stable@kernel.org> Cc: Jon Masters <jcm@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Grant Grundler [Thu, 24 Jan 2008 05:31:03 +0000 (21:31 -0800)]
USB: storage: Add unusual_dev for HP r707
Add "FIX_CAPACITY" entry for HP Photosmart r707 Camera in "Disk" mode.
Camera will wedge when /lib/udev/vol_id attempts to access the last sector,
EIO gets reported to dmesg, and block device is marked "offline" (it is).
Reproduced vol_id behavior with:
"dd if=/dev/sda of=/dev/null skip=60800 count=1"
Cc: stable <stable@kernel.org> Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Nate Carlson [Thu, 24 Jan 2008 18:45:07 +0000 (12:45 -0600)]
USB: Variant of the Dell Wireless 5520 driver
I've got a Dell wireless 5520 card with a different USB ID - specifically, 8136
instead of 8137. Attached a small patch to add support, and the output of an
'ati3'.
If we could get this in, that'd be sweet. ;) Thanks!
Peter Stark [Tue, 25 Dec 2007 17:32:08 +0000 (18:32 +0100)]
USB: ftdi_sio - enabling multiple ELV devices, adding EM1010PC
I work with a group of people on a free home automation tool called
FHEM. Some of the users own more than one USB-serial device by ELV. The
ftdi_sio driver has most of the ELV devices disabled by default and
needs to be re-enabled every time you get a new kernel. Additionally a
new device (EM 1010 PC - enegry monitor) is missing in the list.
Currently our users have to follow the instructions we provide at
http://www.koeniglich.de/fhem/linux.html ... However, to some users it
is too complicated to compile their own kernel module.
We are aware that you can specify one additional device using the
vendor/product option of the module. But lot's of users own more than
one device.
Cc: stable <stable@kernel.org> Signed-off-by: Peter Stark <peter.stark@t-online.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Damien Stuart [Sun, 6 Jan 2008 18:51:39 +0000 (13:51 -0500)]
USB: Adding YC Cable USB Serial device to pl2303
This simply adds the "YC Cable" as a vendor and its pl2303-based
USB<->Serial adapter as a product. This particular adapter is sold by
Radio Shack. I've done limited testing on a few different systems with
no issues.
Alan Cox [Thu, 3 Jan 2008 16:59:04 +0000 (16:59 +0000)]
USB: keyspan: Fix oops
If we get a data URB back from the hardware after we have put the tty to
bed we go kaboom. Fortunately all we need to do is process the URB
without trying to ram its contents down the throat of an ex-tty.
Linus Torvalds [Fri, 1 Feb 2008 10:48:45 +0000 (21:48 +1100)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
block: kill swap_io_context()
as-iosched: fix inconsistent ioc->lock context
ide-cd: fix leftover data BUG
block: make elevator lib checkpatch compliant
cfq-iosched: make checkpatch compliant
block: make core bits checkpatch compliant
block: new end request handling interface should take unsigned byte counts
unexport add_disk_randomness
block/sunvdc.c:print_version() must be __devinit
splice: always updated atime in direct splice
Greg Ungerer [Fri, 1 Feb 2008 07:38:24 +0000 (17:38 +1000)]
m68knommu: fix 528x ColdFire cache settings
Fix problems with the 528x ColdFire CPU cache setup.
Do not cache the flash region (if present), and make the runtime
settings consistent with the init setting.
Problems pointed out by Bernd Buttner <b.buettner@mkc-gmbh.de>
Greg Ungerer [Fri, 1 Feb 2008 07:38:03 +0000 (17:38 +1000)]
m68knommu: create common DMA table for ColdFire CPUs
Move the ColdFire DMA address table into its own file, and out
of each of the different CPU config files. No need to have a copy
of it in each of the config setup files.
Greg Ungerer [Fri, 1 Feb 2008 07:37:56 +0000 (17:37 +1000)]
m68knommu: modify Makefiles to support common coldfire directory
Modify Makefiles to support separate coldfire platform directory.
Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.
Greg Ungerer [Fri, 1 Feb 2008 07:37:46 +0000 (17:37 +1000)]
m68knommu: move ColdFire vectors.c to its own coldfire directory
Move common ColdFire CPU vectors.c to common coldfire platform directory.
Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.
Greg Ungerer [Fri, 1 Feb 2008 07:37:39 +0000 (17:37 +1000)]
m68knommu: move ColdFire timers.c to its own coldfire directory
Move common ColdFire CPU timers.c to common coldfire platform directory.
Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.
Greg Ungerer [Fri, 1 Feb 2008 07:37:36 +0000 (17:37 +1000)]
m68knommu: move ColdFire pit.c to its own coldfire directory
Move common ColdFire CPU pit.c to common coldfire platform directory.
Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.
Greg Ungerer [Fri, 1 Feb 2008 07:37:28 +0000 (17:37 +1000)]
m68knommu: move ColdFire head.S to its own coldfire directory
Move common ColdFire CPU head.S to common coldfire platform directory.
Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.
Greg Ungerer [Fri, 1 Feb 2008 07:37:18 +0000 (17:37 +1000)]
m68knommu: move ColdFire entry.S to its own coldfire directory
Move common ColdFire CPU entry.S to common coldfire platform directory.
Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.
Greg Ungerer [Fri, 1 Feb 2008 07:35:03 +0000 (17:35 +1000)]
m68knommu: platform setup for 5407 ColdFire parts
Switch to platform style configuration for 5407 ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.
Greg Ungerer [Fri, 1 Feb 2008 07:34:58 +0000 (17:34 +1000)]
m68knommu: platform setup for 532x ColdFire parts
Switch to platform style configuration for 532x ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.
Greg Ungerer [Fri, 1 Feb 2008 07:34:40 +0000 (17:34 +1000)]
m68knommu: platform setup for 527x ColdFire parts
Switch to platform style configuration for 527x ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.
Greg Ungerer [Fri, 1 Feb 2008 07:34:55 +0000 (17:34 +1000)]
m68knommu: platform setup for 5307 ColdFire parts
Switch to platform style configuration for 5307 ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.
Greg Ungerer [Fri, 1 Feb 2008 07:34:50 +0000 (17:34 +1000)]
m68knommu: platform setup for 528x ColdFire parts
Switch to platform style configuration for 528x ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.
Greg Ungerer [Fri, 1 Feb 2008 07:34:30 +0000 (17:34 +1000)]
m68knommu: platform setup for 5249 ColdFire parts
Switch to platform style configuration for 5249 ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.
Greg Ungerer [Fri, 1 Feb 2008 07:34:32 +0000 (17:34 +1000)]
m68knommu: platform setup for 5272 ColdFire parts
Switch to platform style configuration for 5272 ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.
Greg Ungerer [Fri, 1 Feb 2008 07:34:10 +0000 (17:34 +1000)]
m68knommu: platform setup for 520x ColdFire parts
Switch to platform style configuration for 520x ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.
Greg Ungerer [Fri, 1 Feb 2008 07:34:15 +0000 (17:34 +1000)]
m68knommu: platform setup for 523x ColdFire parts
Switch to platform style configuration for 523x ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.
Greg Ungerer [Fri, 1 Feb 2008 07:34:04 +0000 (17:34 +1000)]
m68knommu: platform setup for 5206 ColdFire parts
Switch to platform style configuration for 5206 ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.
Al Viro [Fri, 1 Feb 2008 07:05:44 +0000 (07:05 +0000)]
Fix dl2k constants
The MSSR constants didn't match the reality - bitfield declarations used
to be correct (1000BT_FD - bit 11, 1000BT_HD - bit 10), but enum had
them the other way round. Went unnoticed until the switch from the
bitfields use to the explicit arithmetics and I hadn't caught that one
when verifying correctness of change...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jens Axboe [Fri, 1 Feb 2008 08:44:28 +0000 (09:44 +0100)]
as-iosched: fix inconsistent ioc->lock context
Since it's acquired from irq context, all locking must be of the
irq safe variant. Most are already inside the queue lock (which
already disables interrupts), but the io scheduler rmmod path
always has irqs enabled and the put_io_context() path may legally
be called with irqs enabled (even if it isn't usually). So fixup
those two.
Jens Axboe [Thu, 31 Jan 2008 12:57:51 +0000 (13:57 +0100)]
ide-cd: fix leftover data BUG
It's perfectly legal to have data leftovers when a drive signals
completion, it happens all the time when a user issues a command
with a transfer count that is too large.
Adrian Bunk [Wed, 30 Jan 2008 20:17:23 +0000 (21:17 +0100)]
block/sunvdc.c:print_version() must be __devinit
This patch fixes the following section mismatches:
<-- snip -->
...
WARNING: drivers/block/sunvdc.o(.text+0xf0): Section mismatch in reference from the function print_version() to the variable .devinit.data:version
WARNING: drivers/block/sunvdc.o(.text+0xf8): Section mismatch in reference from the function print_version() to the variable .devinit.data:version
...
<-- snip -->
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Jens Axboe [Wed, 30 Jan 2008 11:24:48 +0000 (12:24 +0100)]
splice: always updated atime in direct splice
Andre Majorel <aym-xunil@teaser.fr> points out that if we only updated
the atime when we transfer some data, we deviate from the standard
of always updating the atime. So change splice to always call
file_accessed() even if splice_direct_to_actor() didn't transfer
any data.
Sam Ravnborg [Fri, 1 Feb 2008 00:48:49 +0000 (16:48 -0800)]
[SPARC64]: Fix inconsistent .section usage in lib/
A few places missed the "a" specifier for the __ex_table section. Add
these so we avoid generation an additional section at link time.
Latest modpost would otherwise complain like this:
WARNING: vmlinux.o (__ex_table.2): section name inconsistency.
(.[number]+) following section name.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.
WARNING: vmlinux.o (__ex_table.4): section name inconsistency.
(.[number]+) following section name.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>