Paul Mundt [Wed, 14 Oct 2009 02:51:28 +0000 (11:51 +0900)]
sh: Only invalidate the I-cache range for secondary CPUs stack_start.
Secondary CPUs already take care of the D-cache bits through the common
cache initialization path, and the only thing that is necessary after
twiddling around with stack_start is ensuring that the I-cache changes
are visible (particularly since this tends to be the only part lacking
coherency).
Paul Mundt [Wed, 14 Oct 2009 02:49:49 +0000 (11:49 +0900)]
sh: Provide CALLER_ADDRx definitions even when ftrace is disabled.
Despite being located in the ftrace header, the CALLER_ADDRx definitions
are used by generic code. As such, we have to provide it generically, and
given that there is no real dependence on ftrace in the first place, the
definitions can just be moved out.
Paul Mundt [Tue, 13 Oct 2009 04:32:19 +0000 (13:32 +0900)]
sh: Tidy up the dwarf module helpers.
This enables us to build the dwarf unwinder both with modules enabled and
disabled in addition to reducing code size in the latter case. The
helpers are also consolidated, and modified to resemble the BUG module
helpers.
Paul Mundt [Tue, 13 Oct 2009 04:10:14 +0000 (13:10 +0900)]
sh: Generalize CALLER_ADDRx support.
This splits out the unwinder implementation and adds a new
return_address() abstraction modelled after the ARM code. The DWARF
unwinder is tied in to this, returning NULL otherwise in the case of
being unable to support arbitrary depths.
This enables us to get correct behaviour with the unwinder enabled,
as well as disabling the arbitrary depth support when frame pointers are
enabled, as arbitrary depths with __builtin_return_address() are not
supported regardless.
With this abstraction it's also possible to layer on a simplified
implementation with frame pointers in the event that the unwinder isn't
enabled, although this is left as a future exercise.
Paul Mundt [Tue, 13 Oct 2009 03:42:48 +0000 (12:42 +0900)]
sh: ftrace: Fix up syscall tracepoint support.
Sync up with latest core changes in the syscalls tracing area:
- tracing: Map syscall name to number (syscall_name_to_nr())
- tracing: Call arch_init_ftrace_syscalls at boot
- tracing: add support tracepoint ids (set_syscall_{enter,exit}_id())
Paul Mundt [Tue, 13 Oct 2009 03:30:40 +0000 (12:30 +0900)]
cdrom: gdrom: Kill off PHYSADDR use.
PHYSADDR() is gone, and completely unecessary in all of the cases the
gdrom driver was using it. Kill off all references to it, and change the
one legitimate use over to virt_to_phys() instead.
Paul Mundt [Tue, 13 Oct 2009 02:18:34 +0000 (11:18 +0900)]
sh: force dcache flush if dcache_dirty bit set.
This too follows the ARM change, given that the issue at hand applies to
all platforms that implement lazy D-cache writeback.
This fixes up the case when a page mapping disappears between the
flush_dcache_page() call (when PG_dcache_dirty is set for the page) and
the update_mmu_cache() call -- such as in the case of swap cache being
freed early. This kills off the mapping test in update_mmu_cache() and
switches to simply testing for PG_dcache_dirty.
Paul Mundt [Tue, 13 Oct 2009 01:57:52 +0000 (10:57 +0900)]
sh: update die() output.
This follows the ARM change, as SH had all of the same issues:
Make die() better match x86:
- add printing of the last accessed sysfs file
- ensure console_verbose() is called under the lock
- ensure we panic outside of oops_exit()
Linus Torvalds [Mon, 12 Oct 2009 21:38:34 +0000 (14:38 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI: Prevent AER driver from being loaded on non-root port PCIE devices
PCI: get larger bridge ranges when space is available
PCI: pci.c: fix kernel-doc notation
PCI quirk: TI XIO200a erroneously reports support for fast b2b transfers
PCI PM: Read device power state from register after updating it
PCI: remove pci_assign_resource_fixed()
PCI: PCIe portdrv: remove "-driver" from driver name
Mike Frysinger [Mon, 12 Oct 2009 13:49:56 +0000 (09:49 -0400)]
USB: musb: invert arch depend string
The MUSB code relies on platform implementations that currently only
exists for Arm and Blackfin processors, so have the MUSB Kconfig depend
upon those arches.
This should prevent other arches from building MUSB via randconfig.
Nitin Gupta [Mon, 12 Oct 2009 08:50:23 +0000 (14:20 +0530)]
ARM: force dcache flush if dcache_dirty bit set
On ARM, update_mmu_cache() does dcache flush for a page only if
it has a kernel mapping (page_mapping(page) != NULL). The correct
behavior would be to force the flush based on dcache_dirty bit only.
One of the cases where present logic would be a problem is when
a RAM based block device[1] is used as a swap disk. In this case,
we would have in-memory data corruption as shown in steps below:
do_swap_page()
{
- Allocate a new page (if not already in swap cache)
- Issue read from swap disk
- Block driver issues flush_dcache_page()
- flush_dcache_page() simply sets PG_dcache_dirty bit and does not
actually issue a flush since this page has no user space mapping yet.
- Now, if swap disk is almost full, this newly read page is removed
from swap cache and corrsponding swap slot is freed.
- Map this page anonymously in user space.
- update_mmu_cache()
- Since this page does not have kernel mapping (its not in page/swap
cache and is mapped anonymously), it does not issue dcache flush
even if dcache_dirty bit is set by flush_dcache_page() above.
<user now gets stale data since dcache was never flushed>
}
Same problem exists on mips too.
[1] example:
- brd (RAM based block device)
- ramzswap (RAM based compressed swap device)
Signed-off-by: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Antonio Ospite [Fri, 2 Oct 2009 14:24:02 +0000 (16:24 +0200)]
[ARM] pxamci: fix printing gpio numbers in pxamci_probe
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Julia Lawall [Wed, 16 Sep 2009 09:06:52 +0000 (11:06 +0200)]
[ARM] pxa/csb726: adjust duplicate structure field initialization
Currently the irq_type field of the csb726_lan_config structure is
initialized twice. The value in the first case,
SMSC911X_IRQ_POLARITY_ACTIVE_LOW, is normally stored in the irq_polarity
field, so I have renamed the field in the first initialization to that.
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
We simply can't do the USB handoff at FIXUP_HEADER time, since it will
often require us to have valid IO mappings etc. But that in turn
requires a whole different approach, not this trivial one-liner.
Maybe we could teach all the USB quirk handoff handlers to only do the
quirk if the device has all its registers set up (since if it isn't
initialized, it's unlikely to be active), but regardless that will need
a whole lot more code than just saying "let's do it really early".
The proper fix is almost certainly to just leave the legacy IOMMU
mappings active until after all devices have been initialized.
Reported-by: Nick Piggin <npiggin@suse.de> Cc: David Woodhouse <David.Woodhouse@intel.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Yinghai Lu [Sun, 11 Oct 2009 21:17:16 +0000 (14:17 -0700)]
pci: increase alignment to make more space for hidden code
As reported in
http://bugzilla.kernel.org/show_bug.cgi?id=13940
on some system when acpi are enabled, acpi clears some BAR for some
devices without reason, and kernel will need to allocate devices for
them. It then apparently hits some undocumented resource conflict,
resulting in non-working devices.
Try to increase alignment to get more safe range for unassigned devices.
Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bernd Schmidt [Tue, 6 Oct 2009 08:55:26 +0000 (09:55 +0100)]
ROMFS: fix length used with romfs_dev_strnlen() function
An interestingly corrupted romfs file system exposed a problem with the
romfs_dev_strnlen function: it's passing the wrong value to its helpers.
Rather than limit the string to the length passed in by the callers, it
uses the size of the device as the limit.
Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (32 commits)
USB: serial: no unnecessary GFP_ATOMIC in oti6858
USB: serial: fix race between unthrottle and completion handler in visor
USB: serial: fix assumption that throttle/unthrottle cannot sleep
USB: serial: fix race between unthrottle and completion handler in symbolserial
USB: serial: fix race between unthrottle and completion handler in opticon
USB: ehci: Fix isoc scheduling boundary checking.
USB: storage: When a device returns no sense data, call it a Hardware Error
USB: small fix in error case of suspend in generic usbserial code
USB: visor: fix trivial accounting bug in visor driver
USB: Fix throttling in generic usbserial driver
USB: cp210x: Add support for the DW700 UART
USB: ipaq: fix oops when device is plugged in
USB: isp1362: fix build warnings on 64-bit systems
USB: gadget: imx_udc: Use resource size
USB: storage: iRiver P7 UNUSUAL_DEV patch
USB: musb: make HAVE_CLK support optional
USB: xhci: Fix dropping endpoints from the xHC schedule.
USB: xhci: Don't wait for a disable slot cmd when HC dies.
USB: xhci: Handle canceled URBs when HC dies.
USB: xhci: Stop debugging polling loop when HC dies.
...
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: fix file clone ioctl for bookend extents
Btrfs: fix uninit compiler warning in cow_file_range_nocow
Btrfs: constify dentry_operations
Btrfs: optimize back reference update during btrfs_drop_snapshot
Btrfs: remove negative dentry when deleting subvolumne
Btrfs: optimize fsync for the single writer case
Btrfs: async delalloc flushing under space pressure
Btrfs: release delalloc reservations on extent item insertion
Btrfs: delay clearing EXTENT_DELALLOC for compressed extents
Btrfs: cleanup extent_clear_unlock_delalloc flags
Btrfs: fix possible softlockup in the allocator
Btrfs: fix deadlock on async thread startup
Alexey Dobriyan [Wed, 7 Oct 2009 13:09:06 +0000 (17:09 +0400)]
headers: remove sched.h from interrupt.h
After m68k's task_thread_info() doesn't refer to current,
it's possible to remove sched.h from interrupt.h and not break m68k!
Many thanks to Heiko Carstens for allowing this.
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (34 commits)
[SCSI] qla2xxx: Fix NULL ptr deref bug in fail path during queue create
[SCSI] st: fix possible memory use after free after MTSETBLK ioctl
[SCSI] be2iscsi: Moving to pci_pools v3
[SCSI] libiscsi: iscsi_session_setup to allow for private space
[SCSI] be2iscsi: add 10Gbps iSCSI - BladeEngine 2 driver
[SCSI] zfcp: Fix hang when offlining device with offline chpid
[SCSI] zfcp: Fix lockdep warning when offlining device with offline chpid
[SCSI] zfcp: Fix oops during shutdown of offline device
[SCSI] zfcp: Fix initial device and cfdc for delayed adapter allocation
[SCSI] zfcp: correctly initialize unchained requests
[SCSI] mpt2sas: Bump version 02.100.03.00
[SCSI] mpt2sas: Support dev remove when phy status is MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT
[SCSI] mpt2sas: Timeout occurred within the HANDSHAKE logic while waiting on firmware to ACK.
[SCSI] mpt2sas: Call init_completion on a per request basis.
[SCSI] mpt2sas: Target Reset will be issued from Interrupt context.
[SCSI] mpt2sas: Added SCSIIO, Internal and high priority memory pools to support multiple TM
[SCSI] mpt2sas: Copyright change to 2009.
[SCSI] mpt2sas: Added mpi2_history.txt for MPI2 headers.
[SCSI] mpt2sas: Update driver to MPI2 REV K headers.
[SCSI] bfa: Brocade BFA FC SCSI driver
...
Matt Fleming [Sun, 11 Oct 2009 16:56:17 +0000 (17:56 +0100)]
sh: tracing: Use the DWARF unwinder for CALLER_ADDRx
The major reason for implementing the DWARF unwinder in the first place
was so that we could stop using __builtin_return_address(n), which
doesn't work on SH for n > 0.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Matt Fleming [Fri, 9 Oct 2009 22:20:54 +0000 (23:20 +0100)]
sh: Teach the DWARF unwinder about modules
Pass a module's .eh_frame section to the DWARF unwinder at module load
time so that the section's FDEs and CIEs can be registered with the
DWARF unwinder. This allows us to unwind the stack through module code
when generating backtraces.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Russell King [Sun, 11 Oct 2009 14:25:05 +0000 (15:25 +0100)]
ARM: update die() output
Make die() better match x86:
- add printing of the last accessed sysfs file
- ensure console_verbose() is called under the lock
- ensure we panic outside of oops_exit()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Sun, 11 Oct 2009 14:03:11 +0000 (15:03 +0100)]
ARM: Dump memory and backtrace as one printk per line
dump_mem and dump_backtrace were both using multiple printk statements
to print each line. With DEBUG_LL enabled, this causes OOPS to become
very difficult to read. Solve this by only using one printk per line.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Paul Mundt [Sat, 10 Oct 2009 13:45:41 +0000 (22:45 +0900)]
sh: Reinstate ILSEL -> IRL intc mappings for SH-X3 proto CPU.
In the multi-evt conversion for the SH-X3 proto CPU, IRLs were dropped
down to a single unique masking source, which ended up blowing up on
ILSEL-based IRQs which have special semantics that otherwise confuse the
intc code. While this does result in intc spewing about not having a
unique masking source, we don't really care.
Matt Fleming [Tue, 6 Oct 2009 21:22:33 +0000 (21:22 +0000)]
sh: Fold fixed-PMB support into dynamic PMB support
The initialisation process differs for CONFIG_PMB and for
CONFIG_PMB_FIXED. For CONFIG_PMB_FIXED we need to register the PMB
entries that were allocated by the bootloader.
Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Matt Fleming [Tue, 6 Oct 2009 21:22:30 +0000 (21:22 +0000)]
sh: Remap physical memory into P1 and P2 in pmb_init()
Eventually we'll have complete control over what physical memory gets
mapped where and we can probably do other interesting things. For now
though, when the MMU is in 32-bit mode, we map physical memory into the
P1 and P2 virtual address ranges with the same semantics as they have in
29-bit mode.
Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Matt Fleming [Tue, 6 Oct 2009 21:22:29 +0000 (21:22 +0000)]
sh: Get rid of the kmem cache code
Unfortunately, at the time during in boot when we want to be setting up
the PMB entries, the kmem subsystem hasn't been initialised.
We now match pmb_map slots with pmb_entry_list slots. When we find an
empty slot in pmb_map, we set the bit, thereby acquiring the
corresponding pmb_entry_list entry. There is a benefit in using this
static array of struct pmb_entry's; we don't need to acquire any locks
in order to traverse the list of struct pmb_entry's.
Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Matt Fleming [Tue, 6 Oct 2009 21:22:28 +0000 (21:22 +0000)]
sh: Make most PMB functions static
There's no need to export the internal PMB functions for allocating,
freeing and modifying PMB entries, etc. This way we can restrict the
interface for PMB.
Also remove the static from pmb_init() so that we have more freedom in
setting up the initial PMB entries and turning on MMU 32bit mode.
Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Matt Fleming [Tue, 6 Oct 2009 21:22:24 +0000 (21:22 +0000)]
sh: Obliterate the P1 area macros
Replace the use of PHYSADDR() with __pa(). PHYSADDR() is based on the
idea that all addresses in P1SEG are untranslated, so we can access an
address's physical page as an offset from P1SEG. This doesn't work for
CONFIG_PMB/CONFIG_PMB_FIXED because pages in P1SEG and P2SEG are used
for PMB mappings and so can be translated to any physical address.
Likewise, replace a P1SEGADDR() use with virt_to_phys().
Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Matt Fleming [Tue, 6 Oct 2009 21:22:23 +0000 (21:22 +0000)]
sh: Allocate PMB entry slot earlier
Simplify set_pmb_entry() by removing the possibility of not finding a
free slot in the PMB. Instead we now allocate a slot in pmb_alloc() so
that if there are no free slots we fail at allocation time, rather than
in set_pmb_entry().
Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Hartley Sweeten [Thu, 8 Oct 2009 22:44:41 +0000 (23:44 +0100)]
ARM: 5756/1: ep93xx: introduce clk parent
The clock generation system in the ep93xx uses two external oscillator's
and two internal PLLs to derive all the internal clocks. Many of these
internal clocks can be stopped to save power.
This introduces a "parent" hierarchy for the clocks so that the users
count can be correctly tracked for power management.
The "parent" for the video clock can either be one of the PLL outputs
or the external oscillator. In order to correctly track the "parent"
for the video clock calc_clk_div() needed to be modified. It now
returns an error code if the desired rate cannot be generated.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Hartley Sweeten [Wed, 7 Oct 2009 23:45:00 +0000 (00:45 +0100)]
ARM: 5754/1: ep93xx: update i2c support
Update the ep93xx i2c support:
1) The platform init code passes the configuration data for the
i2c-gpio driver. This allows any gpio pin do be used for the
sda and scl pins. It also allows the platform to specify the
udelay and timeout.
2) Program the gpio configuration register to enable/disable the
open drain drivers. Note that this really only works if the
sda and scl pins are set to EP93XX_GPIO_LINE_EEDAT and
EP93XX_GPIO_LINE_EECLK.
3) Update the edb93xx.c platform init to use the new support.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Hartley Sweeten [Wed, 7 Oct 2009 22:43:26 +0000 (23:43 +0100)]
ARM: 5753/1: ep93xx: remove old EP93XX_GPIO_* defines
Most of the EP93XX_GPIO_*_INT_* register defines in ep93xx-regs.h
not required due to how the ep93xx core and gpiolib support handle
gpio interrupts. Remove the defines to prevent future confusion.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Oliver Neukum [Wed, 7 Oct 2009 08:50:23 +0000 (10:50 +0200)]
USB: serial: fix assumption that throttle/unthrottle cannot sleep
many serial subdrivers are clearly written as if throttle/unthrottle
cannot sleep. This leads to unneeded atomic submissions. This
patch converts affected drivers in a way to makes very clear that
throttle/unthrottle can sleep. Thus future misdesigns can be avoided
and efficiency and reliability improved.
This removes any such assumption using GFP_KERNEL and spin_lock_irq()
Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sarah Sharp [Tue, 6 Oct 2009 20:45:59 +0000 (13:45 -0700)]
USB: ehci: Fix isoc scheduling boundary checking.
The EHCI driver does some bounds checking when it's scheduling an iTD for
an active endpoint. It sets the local variable start to
stream->next_uframe and moves that variable further in the schedule if
necessary. However, the driver fails to do anything with start before
jumping to the ready label and setting the URB's starting frame to
stream->next_uframe. Alan Stern confirms the EHCI driver should set
stream->next_uframe to start before jumping.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 6 Oct 2009 18:07:57 +0000 (14:07 -0400)]
USB: storage: When a device returns no sense data, call it a Hardware Error
This patch (as1294) fixes a problem that has plagued users for several
kernel releases. Some USB mass-storage devices don't return any sense
data when they encounter certain kinds of errors. The SCSI layer
interprets this to mean that the operation should be retried, and the
same thing happens -- over and over again with no limit. In some
circumstances (such as when a bus reset occurs) that is the right
thing to do, but not here.
The patch checks for this condition (a transport failure with no sense
data) and changes the result code to DID_ERROR and the sense code to
Hardware Error. This does get only a limited number of retries, and
so the command will fail relatively quickly instead of getting stuck
in an infinite loop.
The generic usbserial driver in Linux 2.6.31 halts its receiving
channel in response to throttle requests from the line discipline.
Unfortunately it drops the contents of the first URB received after
throttling takes effect. This patch corrects that problem.
Signed-off-by: Joris van Rantwijk <jorispubl@xs4all.nl> Acked-by: Johan Hovold <jhovold@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Éric Piel [Sun, 4 Oct 2009 11:45:07 +0000 (13:45 +0200)]
USB: cp210x: Add support for the DW700 UART
In the Dell inspiron mini 10, the GPS is connected via a cp2102. This patch
adds detection of this USB device. (I haven't managed to use the GPS under
Linux yet, though)
Alan Stern [Mon, 5 Oct 2009 19:53:58 +0000 (15:53 -0400)]
USB: ipaq: fix oops when device is plugged in
This patch (as1293) fixes a problem with the ipaq serial driver. It
tries to bind to all the interfaces, even those that don't have enough
endpoints. The symptom is an invalid memory reference and oops when
the device is plugged in.
Mike Frysinger [Thu, 17 Sep 2009 01:10:53 +0000 (21:10 -0400)]
USB: musb: make HAVE_CLK support optional
The Blackfin port doesn't support HAVE_CLK and the musb driver works fine
with support stubbed out, so take the existing Blackfin clk stubs and move
them to common musb code so we can drop the Kconfig dependency.
Sarah Sharp [Wed, 16 Sep 2009 23:42:39 +0000 (16:42 -0700)]
USB: xhci: Don't wait for a disable slot cmd when HC dies.
When the host controller dies or is removed while a device is plugged in,
the USB core will attempt to deallocate the struct usb_device. That will
call into xhci_free_dev(). This function used to attempt to submit a
disable slot command to the host controller and clean up the device
structures when that command returned. Change xhci_free_dev() to skip the
command submission and just free the memory if the host controller died.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sarah Sharp [Tue, 29 Sep 2009 00:21:37 +0000 (17:21 -0700)]
USB: xhci: Handle canceled URBs when HC dies.
When the host controller dies (e.g. it is removed from a PCI card slot),
the xHCI driver cannot expect commands to complete. The buggy code this
patch fixes would mark an URB as canceled and then expect the URB to be
completed when the stop endpoint command completed. That would never
happen if the host controller was dead, so the USB core would just hang in
the disconnect code.
If the host controller died, and the driver asks to cancel an URB, free
any structures associated with that URB and immediately give it back.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Gergely Imreh [Tue, 15 Sep 2009 08:03:31 +0000 (16:03 +0800)]
USB: usbtmc: fix timeout increase
The current 10ms timeout is too short for some normal USBTMC device
operation, increase it to a value which was tested with previously
affected Tektronix oscilloscopes.
Signed-off-by: Gergely Imreh <imrehg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Fri, 9 Oct 2009 16:43:12 +0000 (12:43 -0400)]
USB: serial: don't call release without attach
This patch (as1295) fixes a recently-added bug in the USB serial core.
If certain kinds of errors occur during probing, the core may call a
serial driver's release method without previously calling the attach
method. This causes some drivers (io_ti in particular) to perform an
invalid memory access.
The patch adds a new flag to keep track of whether or not attach has
been called.
Johan Hovold [Wed, 7 Oct 2009 18:05:07 +0000 (20:05 +0200)]
USB: ftdi_sio: re-implement read processing
- Re-structure read processing.
- Kill obsolete work queue and always push to tty in completion handler.
- Use tty_insert_flip_string instead of per character push when
possible.
- Fix stalled-read regression in 2.6.31 by using urb status to
determine when port is closed rather than port count.
- Fix race with open/close by checking ASYNCB_INITIALIZED in
unthrottle.
- Kill private rx_flag and lock and use throttle flags in
usb_serial_port instead.
Johan Hovold [Wed, 7 Oct 2009 18:05:06 +0000 (20:05 +0200)]
USB: ftdi_sio: clean up read completion handler
Remove superfluous error checks in completion handler:
- No need to check private data and urb pointers as we check urb-status
before dereferencing priv (which is not freed until urb has been killed
on close).
- No need to check tty as it is checked again when processing.
- No need to check urb->number_of_packets on bulk urb.
Note that both private data and tty are checked again before processing
(possibly from work queue which also is cancelled on close).
Ian Abbott [Mon, 21 Sep 2009 19:48:33 +0000 (15:48 -0400)]
Staging: comedi: s526: fixes for pulse generator
Some changes and corrections to handling of
INSN_CONFIG_GPCT_SINGLE_PULSE_GENERATOR, and
INSN_CONFIG_GPCT_PULSE_TRAIN_GENERATOR, so they interpret insn->data[]
as per the comments in the code.
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>