1
0
Fork 0
Commit Graph

111653 Commits (5a8b424276f7ba50c51e7caf485b2be23739e5b8)

Author SHA1 Message Date
Konrad Rzeszutek Wilk 0faa8cca88 xen/blkback: remove per-queue plugging
commit 7eaceaccab ("block: remove per-queue plugging")
added two new interfaces to plug and unplug: blk_start_plug
and blk_finish_plug. Lets use those.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:35 -04:00
Konrad Rzeszutek Wilk 2e9977c21f xen/blkback: Fix checkpatch warnings in blkback.c
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:34 -04:00
Konrad Rzeszutek Wilk d6091b217d xen/blkback: Fix checkpatch warnings of xenbus.c
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:33 -04:00
Konrad Rzeszutek Wilk e5f4b3c498 xen/blkback: Fix interface.c checkpatch warnings .. except
+               sring_x86_64 = (struct blkif_x86_64_sring *)blkif->blk_ring_area->addr;

WARNING: line over 80 characters
+               BACK_RING_INIT(&blkif->blk_rings.x86_64, sring_x86_64, PAGE_SIZE);

as breaking them up really does not help that much.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:32 -04:00
Konrad Rzeszutek Wilk 3c64b58cd6 xen/blkback: Fix checkpatch warnings in vbd.c
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:30 -04:00
Konrad Rzeszutek Wilk 5489377ce4 xen/blkback: blkif->struct blkif_st
checkpatch.pl suggested that we don't use the typdef in common.h
and this triggered this avalanche of patches.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:29 -04:00
Konrad Rzeszutek Wilk a1397fa309 xen/blkback: Add some comments.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:28 -04:00
Tom Goetz 314146e515 xen/blkback: Fix the WRITE_BARRIER
The WRITE_BARRIER was missing the REQ_WRITE option. This
was causing the blktap to die.

Signed-off-by: Tom Goetz <tom.goetz@virtualcomputer.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:27 -04:00
Konrad Rzeszutek Wilk a742b02c75 xen/blkback: Use kzalloc's, and GFP_KERNEL for data structures.
The patch titled:"xen/blkback: Use 'vzalloc' for page arrays and pre-allocate pages."
allocates the structures and its member variables using the 'vzalloc'.

Daniel Stodden pointed out that vzalloc is good when we use
big number of pages - while these are at the max two pages.

We can do this using kzalloc. Also the GFP_HIGHMEM does not
work properly with Xen, so take that out.

We will have to revisit this when a "get_empty_pages_and_pagevec"
type API shows up to leverage that.

BugLink: http://mid.gmane.org/1299898639.11681.227.camel@agari.van.xensource.com

CC: Daniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:25 -04:00
Konrad Rzeszutek Wilk 5dc03639cc xen/blkback: Utilize the M2P override mechanism for GNTMAP_host_map
Instead of doing copy grants lets do mapping grants using
the M2P(and P2M) override mechanism.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Conflicts:

	drivers/xen/blkback/blkback.c
2011-04-14 18:26:24 -04:00
Konrad Rzeszutek Wilk 464fb419e1 xen/blkback: Use 'vzalloc' for page arrays and pre-allocate pages.
Previously we would allocate the array for page using 'kmalloc' which
we can as easily do with 'vzalloc'. The pre-allocation of pages
was done a bit differently in the past - it used to be that
the balloon driver would export "alloc_empty_pages_and_pagevec"
which would have in one function created an array, allocated
the pages, balloned the pages out (so the memory behind those
pages would be non-present), and provide us those pages.

This was OK as those pages were shared between other guest and
the only thing we needed was to "swizzel" the MFN of those pages
to point to the other guest MFN. We can still "swizzel" the MFNs
using the M2P (and P2M) override API calls, but for the sake of
simplicity we are dropping the balloon API calls. We can return
to those later on.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:23 -04:00
Konrad Rzeszutek Wilk c35950bfa9 xen/blkback: Union the blkif_request request specific fields
Following in the steps of patch:
"xen: Union the blkif_request request specific fields" this patch
changes the blkback. Per the original patch:

"Prepare for extending the block device ring to allow request
specific fields, by moving the request specific fields for
reads, writes and barrier requests to a union member."

Cc: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:22 -04:00
Konrad Rzeszutek Wilk e8e28871ed xen/blkback: Move global/static variables into struct xen_blkbk.
Bundle the lot of discrete variables into a single structure.
This is based on what was done in the xen-netback driver:
xen: netback: Move global/static variables into struct xen_netbk.
(094944631cc5a9d6e623302c987f78117c0bf7ac)

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:20 -04:00
Jan Beulich efe08a3eec xen/blkback: simplify address translations
Cherry-pick and modified from 69d64727c42eecd47fdf82c15a54474d21a4012a
("blkback/blktap2: simplify address translations"):

"There are quite a number of places where e.g. page->va->page
translations happen.

Besides yielding smaller code (source and binary), a second goal is to
make it easier to determine where virtual addresses of pages allocated
through alloc_empty_pages_and_pagevec() are really used (in turn in
order to determine whether using highmem pages would be possible
there)."

The second goal is not the purpose of this patch - it is just to
make it easier to read the code.

linux-2.6-pvops:
 * Stripped drivers/xen/gntdev/*
 * Stripped drivers/xen/netback/*

[v2: Stripped blktap off]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-14 18:26:19 -04:00
Konrad Rzeszutek Wilk bc0c081b0e xen/blkback: Update to use blkdev_get_by_dev instead of open_by_devnum.
The API for opening a block device has changed since 2.6.32. The
correct function to open a device is blkdev_get_by_dev.
2011-04-14 18:26:18 -04:00
Konrad Rzeszutek Wilk 248e9f7539 xen/blkback: Replace WRITE_BARRIER with (REQ_FLUSH | REQ_FUA)
TODO: Double check xen-blkfront.c
2011-04-14 18:26:17 -04:00
Keir Fraser 313d7b003c blkback: Fix CVE-2010-3699
A guest can cause the backend driver to leak a kernel thread. Such
leaked threads hold references to the device, whichmakes the device
impossible to tear down. If shut down, the guest remains a zombie
domain, the xenwatch process hangs, and most xm commands will stop
working.

This patch tries to do the following for blkback:
    - identify/extract idempotent teardown operations,
    - add/move the invocation of said teardown operation
      right before we're about to allocate new resources in the
      Connected states.

[ linux-2.6.18-xen.hg 59f097ef181b ]

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-04-14 18:26:15 -04:00
K. Y. Srinivasan a81135d90b xen/blkback: Print additional information when a vbd is resized.
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-04-14 18:26:14 -04:00
Chris Lalancette cbf462908c xen/blkback: Flush blkback data when connecting.
First cut at flushing blkback data when first connecting
blkback.  This should avoid the pygrub issues we are experiencing
in (RedHat bugzilla) 466681.

[ 2.6.18-xen.hg commit 63b4d7f56688 ]

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-04-14 18:26:13 -04:00
Jeremy Fitzhardinge 98e036a356 xen/blkback: add accessor for xenbus backend device
Since backend_info is hidden away now.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-04-14 18:26:12 -04:00
K. Y. Srinivasan 2ccbfe26c1 xen/blkback: Propagate changed size of VBDs
Support dynamic resizing of virtual block devices. This patch supports
both file backed block devices as well as physical devices that can be
dynamically resized on the host side.

Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-04-14 18:26:10 -04:00
Jeremy Fitzhardinge 5cf6e4f6f6 xen/blkback: use drv_get/set_drvdata rather than directly accessing driver_data.
Direct driver_data access is obsolete and will disappear.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-04-14 18:26:09 -04:00
Ian Campbell e7579a99b5 xen: rename blkbk module xen-blkback.
blkbk is rather generic for a modular distro style kernel.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-04-14 18:26:08 -04:00
Konrad Rzeszutek Wilk 8770b2683f Fix compile warnings: ignoring return value of 'xenbus_register_backend' ..
We neglect to check the return value of xenbus_register_backend
and take actions when that fails. This patch fixes that and adds
code to deal with those type of failures.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-04-14 18:26:07 -04:00
Jeremy Fitzhardinge afd91d07ff xen/blkback: little cleanups
Remove unused local prototype; group headers.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-04-14 18:26:06 -04:00
Jeremy Fitzhardinge 0660c7dbf2 xen/blkback: remove spurious debug output noise
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-04-14 18:26:04 -04:00
Jeremy Fitzhardinge 05d43865dd xen/blkback: deal with hardsect_size to logical_block_size rename
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-04-14 18:26:03 -04:00
Keir Fraser 8270b45bc8 blkback: Fix potential resource leak. 2011-04-14 18:26:00 -04:00
Jeremy Fitzhardinge dd3672424c xen/blkback: don't include xen/evtchn.h
It's a user-mode header for users of /dev/evtchn

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
2011-04-14 18:25:59 -04:00
Jeremy Fitzhardinge 8812293323 xen-blkback-porting 2011-04-14 18:25:58 -04:00
Konrad Rzeszutek Wilk 4d05a28db5 xen: add blkback support
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Conflicts:

	drivers/xen/Makefile
2011-04-14 18:25:47 -04:00
Greg Kroah-Hartman 753d8534cc Revert "USB: isp1760-hcd: move imask clear after pending work is done"
This reverts commit 5808544690.

To quote Richard:
	I don't think this should be mainlined. It was a
	misunderstanding on my part.  If you see all the other hdc
	drivers in the same location, they all do the same thing (i.e.
	clear the interrupt status first, then do the work) that
	"glitch" I think I saw was actually two back-to-back
	interrupts.

	Sebastian (the original author of isp1760) explained it to me a
	few days after my submission.

	sorry for the confusion

Cc: Richard Retanubun <RichardRetanubun@ruggedcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14 13:37:07 -07:00
Andiry Xu c41136b05d xHCI: Implement AMD PLL quirk
This patch disable the optional PM feature inside the Hudson3 platform under
the following conditions:

1. If an isochronous device is connected to xHCI port and is active;
2. Optional PM feature that powers down the internal Bus PLL when the link is
   in low power state is enabled.

The PM feature needs to be disabled to eliminate PLL startup delays when the
link comes out of low power state. The performance of DMA data transfer could
be impacted if system delay were encountered and in addition to the PLL start
up delays. Disabling the PM would leave room for unpredictable system delays
in order to guarantee uninterrupted data transfer to isochronous audio or
video stream devices that require time sensitive information. If data in an
audio/video stream was interrupted then erratic audio or video performance
may be encountered.

AMD PLL quirk is already implemented in OHCI/EHCI driver. After moving the
quirk code to pci-quirks.c and export them, xHCI driver can call it directly
without having the quirk implementation in itself.

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2011-04-13 16:57:37 -07:00
Sarah Sharp fedd383e33 xhci: Tell USB core both roothubs lost power.
On a resume, when the power is lost during hibernate, the USB core will
call hub_reset_resume for the xHCI USB 2.0 roothub, but not for the USB
3.0 roothub:

[  164.748310] usb usb1: root hub lost power or was reset
[  164.748353] usb usb2: root hub lost power or was reset
[  164.748487] usb usb3: root hub lost power or was reset
[  164.748488] xhci_hcd 0000:01:00.0: Stop HCD
...
[  164.870039] hub 4-0:1.0: hub_resume
...
[  164.870054] hub 3-0:1.0: hub_reset_resume

This causes issues later, because the USB core assumes the USB 3.0 hub
attached to the USB 3.0 roothub is still active.  It attempts to queue a
control URB for the external hub, which fails because all the device
slot contexts were released when the USB 3.0 roothub lost power:

[  164.980044] hub 4-1:1.0: hub_resume
[  164.980047] xhci_hcd 0000:01:00.0: Get port status returned 0x10101
[  164.980049] xHCI xhci_urb_enqueue called with unaddressed device
[  164.980053] hub 3-0:1.0: port 1: status 0101 change 0001
[  164.980056] hub 4-1:1.0: hub_port_status failed (err = -22)
[  164.980060] xhci_hcd 0000:01:00.0: `MEM_WRITE_DWORD(3'b000, 32'hffffc90008948440, 32'h202e1, 4'hf);
[  164.980062] xHCI xhci_urb_enqueue called with unaddressed device
[  164.980066] xhci_hcd 0000:01:00.0: clear port connect change, actual port 0 status  = 0x2e1
[  164.980069] hub 4-1:1.0: hub_port_status failed (err = -22)
[  164.980072] xhci_hcd 0000:01:00.0: get port status, actual port 1 status  = 0x2a0
[  164.980074] xHCI xhci_urb_enqueue called with unaddressed device
[  164.980077] xhci_hcd 0000:01:00.0: Get port status returned 0x100
[  164.980079] hub 4-1:1.0: hub_port_status failed (err = -22)
[  164.980082] xHCI xhci_urb_enqueue called with unaddressed device
[  164.980085] hub 4-1:1.0: hub_port_status failed (err = -22)
[  164.980088] hub 4-1:1.0: port 4: status 0000 change 0000
[  164.980091] xHCI xhci_urb_enqueue called with unaddressed device
[  164.980094] hub 4-1:1.0: activate --> -22
[  164.980113] xHCI xhci_urb_enqueue called with unaddressed device
[  164.980117] hub 4-1:1.0: hub_port_status failed (err = -22)
[  164.980119] xHCI xhci_urb_enqueue called with unaddressed device
[  164.980123] hub 4-1:1.0: can't resume port 4, status -22
[  164.980126] hub 4-1:1.0: port 4 status ffff.ffff after resume, -22
[  164.980129] usb 4-1.4: can't resume, status -22
[  164.980131] hub 4-1:1.0: logical disconnect on port 4

This causes issues when a USB 3.0 hard drive is attached to the external
USB 3.0 hub when the system is hibernated:

[ 6249.849653] sd 8:0:0:0: [sdb] Unhandled error code
[ 6249.849659] sd 8:0:0:0: [sdb]  Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 6249.849663] sd 8:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 2a 08 00 00 02 00
[ 6249.849671] end_request: I/O error, dev sdb, sector 10760

Make sure to inform the USB core that *both* xHCI roothubs lost power.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2011-04-13 16:57:36 -07:00
Andiry Xu a8f08d86db usbcore: Bug fix: system can't suspend with USB3.0 device connected to USB3.0 hub
This patch clear PORT_POWER when suspend a USB3.0 device behind a USB3.0
external hub, so the system can suspend and resume.

Note USB3.0 device may not work after system resume and this is a temporary
workaround. The correct fix will be in future patches.

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2011-04-13 16:57:34 -07:00
Matthew Wilcox b214f191d9 USB: Fix unplug of device with active streams
If I unplug a device while the UAS driver is loaded, I get an oops
in usb_free_streams().  This is because usb_unbind_interface() calls
usb_disable_interface() which calls usb_disable_endpoint() which sets
ep_out and ep_in to NULL.  Then the UAS driver calls usb_pipe_endpoint()
which returns a NULL pointer and passes an array of NULL pointers to
usb_free_streams().

I think the correct fix for this is to check for the NULL pointer
in usb_free_streams() rather than making the driver check for this
situation.  My original patch for this checked for dev->state ==
USB_STATE_NOTATTACHED, but the call to usb_disable_interface() is
conditional, so not all drivers would want this check.

Note from Sarah Sharp: This patch does avoid a potential dereference,
but the real fix (which will be implemented later) is to set the
.soft_unbind flag in the usb_driver structure for the UAS driver, and
all drivers that allocate streams.  The driver should free any streams
when it is unbound from the interface.  This avoids leaking stream rings
in the xHCI driver when usb_disable_interface() is called.

This should be queued for stable trees back to 2.6.35.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
2011-04-13 16:57:33 -07:00
Dmitry Torokhov 2dea75d96a USB: xhci - also free streams when resetting devices
Currently, when resetting a device, xHCI driver disables all but one
endpoints and frees their rings, but leaves alone any streams that
might have been allocated. Later, when users try to free allocated
streams, we oops in xhci_setup_no_streams_ep_input_ctx() because
ep->ring is NULL.

Let's free not only rings but also stream data as well, so that
calling free_streams() on a device that was reset will be safe.

This should be queued for stable trees back to 2.6.35.

Reviewed-by: Micah Elizabeth Scott <micah@vmware.com>
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
2011-04-13 16:57:31 -07:00
Sarah Sharp 386139d7c8 xhci: Fix NULL pointer deref in handle_port_status()
When we get a port status change event, we need to figure out what type of
port it came from: a USB 3.0 port, or a USB 2.0/1.1 port.  We can't know
which usb_hcd to use until that point, so hcd will be NULL for part of the
function.  Unfortunately, if any of the sanity checks fail, we'll jump to
the cleanup label before hcd is set to a valid pointer, and then we'll
attempt to tell the USB core to kick the hcd, which is NULL.

Skip kicking the roothub if the sanity checks fail.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2011-04-13 16:19:49 -07:00
Dmitry Torokhov dfa49c4ad1 USB: xhci - fix math in xhci_get_endpoint_interval()
When parsing exponent-expressed intervals we subtract 1 from the
value and then expect it to match with original + 1, which is
highly unlikely, and we end with frequent spew:

	usb 3-4: ep 0x83 - rounding interval to 512 microframes

Also, parsing interval for fullspeed isochronous endpoints was
incorrect - according to USB spec they use exponent-based
intervals (but xHCI spec claims frame-based intervals). I trust
USB spec more, especially since USB core agrees with it.

This should be queued for stable kernels back to 2.6.31.

Reviewed-by: Micah Elizabeth Scott <micah@vmware.com>
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
2011-04-13 16:19:48 -07:00
Dmitry Torokhov 926008c938 USB: xhci: simplify logic of skipping missed isoc TDs
The logic of the handling Missed Service Error Events was pretty
confusing as we were checking the same condition several times.
In addition, it caused compiler warning since the compiler could
not figure out that event_trb is actually unused in case we are
skipping current TD.

Fix that by rearranging "skip" condition checks, and factor out
skip_isoc_td() so that it is called explicitly.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2011-04-13 16:19:48 -07:00
Dmitry Torokhov 575688e1e5 USB: xhci - remove excessive 'inline' markings
Remove 'inline' markings from file-local functions and let compiler
do its job and inline what makes sense for given architecture.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2011-04-13 16:19:47 -07:00
Dan Carpenter 22e0487047 USB: xhci: unsigned char never equals -1
There were some places that compared port_speed == -1 where port_speed
is a u8.  This doesn't work unless we cast the -1 to u8.  Some places
did it correctly.

Instead of using -1 directly, I've created a DUPLICATE_ENTRY define
which does the cast and is more descriptive as well.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2011-04-13 16:19:47 -07:00
Dmitry Torokhov 5a6c2f3ff0 USB: xhci - fix unsafe macro definitions
Macro arguments used in expressions need to be enclosed in parenthesis
to avoid unpleasant surprises.

This should be queued for kernels back to 2.6.31

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
2011-04-13 16:19:46 -07:00
Dmitry Torokhov 2868a2b1ba USB: fix formatting of SuperSpeed endpoints in /proc/bus/usb/devices
Isochronous and interrupt SuperSpeed endpoints use the same mechanisms
for decoding bInterval values as HighSpeed ones so adjust the code
accordingly.

Also bandwidth reservation for SuperSpeed matches highspeed, not
low/full speed.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 16:13:46 -07:00
Richard Retanubun 5808544690 USB: isp1760-hcd: move imask clear after pending work is done
This patch moves the HcInterrupt register write to clear the
pending interrupt to after the isr work is done, doing this removes
glitches in the irq line.

Signed-off-by: Richard Retanubun <richardretanubun@ruggedcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:57:19 -07:00
Valentin Longchamp d834508e15 USB: fsl_qe_udc: send ZLP when zero flag and length % maxpacket == 0
The driver did not take the zero flag in the USB request. If the
request length is the same as the endpoint's maxpacket, an additional
ZLP with no data has to be transmitted.

The method used here is inspired to what is done in fsl_udc_core.c
(and pxa27x_udc.c and at91_udc.c) where this is supported.

There already was a discussion about this topic with people from
Keymile, and I propose here a better implementation:

http://thread.gmane.org/gmane.linux.usb.general/38951

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Acked-by: Li Yang <leoli@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:57:19 -07:00
Steven Hardy cb62d65f96 usb: qcserial add missing errorpath kfrees
There are two -ENODEV error paths in qcprobe where the allocated private
data is not freed, this patch adds the two missing kfrees to avoid
leaking memory on the error path

Signed-off-by: Steven Hardy <shardy@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:53:16 -07:00
Steven Hardy 99ab3f9e4e usb: qcserial avoid pointing to freed memory
Rework the qcprobe logic such that serial->private is not set when
qcprobe exits with -ENODEV, otherwise serial->private will point to freed
memory on -ENODEV

Signed-off-by: Steven Hardy <shardy@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:53:16 -07:00
Steven Hardy 10c9ab15d6 usb: Fix qcserial memory leak on rmmod
qcprobe function allocates serial->private but this is never freed, this
patch adds a new function qc_release() which frees serial->private, after
calling usb_wwan_release

Signed-off-by: Steven Hardy <shardy@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:53:16 -07:00
Paul Friedrich c53c2fab40 USB: ftdi_sio: add ids for Hameg HO720 and HO730
usb serial: ftdi_sio: add two missing USB ID's for Hameg interfaces HO720
and HO730

Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:52:19 -07:00
Marius B. Kotsbak 80f9df3e00 USB: option: Added support for Samsung GT-B3730/GT-B3710 LTE USB modem.
Bind only modem AT command endpoint to option.

Signed-off-by: Marius B. Kotsbak <marius@kotsbak.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:49:25 -07:00
Dan Carpenter 485707116b usb: pch_udc: unlock on allocation failure
There was an unlock missing on the error path.

Also I did a small cleanup by changing ep->dev->lock for just dev->lock.
They're the same lock, but dev->lock is shorter and that's how it is
used for the spin_unlock_irqrestore() call.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:44:05 -07:00
Joerg Roedel 9ab7927bb8 USB host: Fix lockdep warning in AMD PLL quirk
Booting latest kernel on my test machine produces a lockdep
warning from the usb_amd_find_chipset_info() function:

 WARNING: at /data/lemmy/linux.trees.git/kernel/lockdep.c:2465 lockdep_trace_alloc+0x95/0xc2()
 Hardware name: Snook
 Modules linked in:
 Pid: 959, comm: work_for_cpu Not tainted 2.6.39-rc2+ #22
 Call Trace:
  [<ffffffff8103c0d4>] warn_slowpath_common+0x80/0x98
  [<ffffffff812387e6>] ? T.492+0x24/0x26
  [<ffffffff8103c101>] warn_slowpath_null+0x15/0x17
  [<ffffffff81068667>] lockdep_trace_alloc+0x95/0xc2
  [<ffffffff810ed9ac>] slab_pre_alloc_hook+0x18/0x3b
  [<ffffffff810ef227>] kmem_cache_alloc_trace+0x25/0xba
  [<ffffffff812387e6>] T.492+0x24/0x26
  [<ffffffff81238816>] pci_get_subsys+0x2e/0x73
  [<ffffffff8123886c>] pci_get_device+0x11/0x13
  [<ffffffff814082a9>] usb_amd_find_chipset_info+0x3f/0x18a
...

It turns out that this function calls pci_get_device under a spin_lock
with irqs disabled, but the pci_get_device function is only allowed in
preemptible context.

This patch fixes the warning by making all data-structure
modifications on temporal storage and commiting this back
into the visible structure at the end. While at it, this
patch also moves the pci_dev_put calls out of the spinlocks
because this function might sleep too.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:44:04 -07:00
Sebastian Andrzej Siewior 16a2f970f3 usb/gadget: don't leak hs_descriptors
We should free both descriptors.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:44:03 -07:00
Yoichi Yuasa 0fdf65c339 USB: ohci-au1xxx: fix warning "__BIG_ENDIAN" is not defined
In file included from drivers/usb/host/ohci-hcd.c:1028:0:
drivers/usb/host/ohci-au1xxx.c:36:7: warning: "__BIG_ENDIAN" is not defined

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:44:03 -07:00
Johan Hovold 11a31d8412 USB: ftdi_sio: add PID for OCT DK201 docking station
Add PID 0x0103 for serial port of the OCT DK201 docking station.

Reported-by: Jan Hoogenraad <jan@hoogenraad.net>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:44:03 -07:00
Johan Hovold 36a52c009a usb: musb: omap2430: fix build failure
Fix build failure introduced by commit
7acc6197b7 (usb: musb: Idle path retention
and offmode support for OMAP3) when building without gadget
support.

  CC      drivers/usb/musb/omap2430.o
drivers/usb/musb/omap2430.c: In function ‘musb_otg_notifications’:
drivers/usb/musb/omap2430.c:262: error: ‘struct musb’ has no member named ‘gadget_driver’

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:44:02 -07:00
Alan Stern 94ae4976e2 USB: EHCI: unlink unused QHs when the controller is stopped
This patch (as1458) fixes a problem affecting ultra-reliable systems:
When hardware failover of an EHCI controller occurs, the data
structures do not get released correctly.  This is because the routine
responsible for removing unused QHs from the async schedule assumes
the controller is running properly (the frame counter is used in
determining how long the QH has been idle) -- but when a failover
causes the controller to be electronically disconnected from the PCI
bus, obviously it stops running.

The solution is simple: Allow scan_async() to remove a QH from the
async schedule if it has been idle for long enough _or_ if the
controller is stopped.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-Tested-by: Dan Duval <dan.duval@stratus.com>
CC: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:44:02 -07:00
Yauheni Kaliuta 505d1f69ec usb: gadget: eem: fix echo command processing
During processing of bunch of eem frames if "echo" command is found
skb is cloned and the cloned version should be used to send reply.
Unfortunately, the data of the original skb were actually used and
the cloned skb is never freed.

Using the cloned skb and freeing the skb in the completion callback
for usb request.

Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@nokia.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:44:01 -07:00
Christian Simon 5a9443f08c USB: ftdi_sio: Added IDs for CTI USB Serial Devices
I added new ProdutIds for two devices from CTI GmbH Leipzig.

Signed-off-by: Christian Simon <simon@swine.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:44:01 -07:00
Yoshihiro Shimoda 2c2da1799b usb: r8a66597-udc: fix spinlock usage
Because the disconnect function in the composite driver will call spin_lock,
this driver has to call spin_unlock before calling driver->disconnet().

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:44:00 -07:00
Michal Simek 0291303d37 usb: Fix Kconfig unmet dependencies for Microblaze EHCI
Disable USB_ARCH_HAS_EHCI in arch Kconfig and enable it in usb Kconfig

Warning log:
warning: (MICROBLAZE) selects USB_ARCH_HAS_EHCI which has unmet
direct dependencies (USB_SUPPORT)

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:43:59 -07:00
Alexey Khoroshilov 00cc7a5faf USB: usb-gadget: unlock data->lock mutex on error path in ep_read()
ep_read() acquires data->lock mutex in get_ready_ep() and releases it on
all paths except for one: when usb_endpoint_xfer_isoc() failed. The
patch adds mutex_unlock(&data->lock) at that path.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:43:59 -07:00
Randy Dunlap d06847fec2 usb: fix ips1760-hcd printk format warning
Fix printk format build warning and grammar typo on same line.

drivers/usb/host/isp1760-hcd.c:300: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 15:43:58 -07:00
Greg Kroah-Hartman 86a45a023d Merge branch 'for-greg' of git://gitorious.org/usb/usb into usb-linus
* 'for-greg' of git://gitorious.org/usb/usb:
  USB: musb: blackfin: work around anomaly 05000450
  usb: musb: Fix the crash issue during reboot
  usb: musb: gadget: check the correct list_head
  usb: musb: temporarily make it bool
  USB: musb: dereferencing an iomem pointer
  USB: musb: silence printk format warning
  USB: musb: using 0 instead of NULL
  USB: musb: add missing unlock in cppi_interrupt()
  usb: musb: ux500: copy dma mask from platform device to musb device
  usb: musb: clear AUTOSET while clearing DMAENAB
2011-04-13 14:33:52 -07:00
Linus Torvalds 85f2e689a5 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
  x86 platform drivers: Build fix for intel_pmic_gpio
2011-04-13 09:15:55 -07:00
Linus Torvalds 1f4f8eeaec 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: (22 commits)
  Revert "i915: restore only the mode of this driver on lastclose"
  Revert "ttm: Utilize the DMA API for pages that have TTM_PAGE_FLAG_DMA32 set."
  i915: select VIDEO_OUTPUT_CONTROL for ACPI_VIDEO
  drm/radeon/kms: properly program vddci on evergreen+
  drm/radeon/kms: add voltage type to atom set voltage function
  drm/radeon/kms: fix pcie_p callbacks on btc and cayman
  drm/radeon/kms: fix suspend on rv530 asics
  drm/radeon/kms: clean up gart dummy page handling
  drm/radeon/kms: make radeon i2c put/get bytes less noisy
  drm/radeon/kms: pll tweaks for rv6xx
  drm/radeon: Fix KMS legacy backlight support if CONFIG_BACKLIGHT_CLASS_DEVICE=m.
  radeon: Fix KMS CP writeback on big endian machines.
  i915: restore only the mode of this driver on lastclose
  drm/nvc0: improve vm flush function
  drm/nv50-nvc0: remove some code that doesn't belong here
  drm/nv50: use "nv86" tlb flush method on everything except 0x50/0xac
  drm/nouveau: quirk for XFX GT-240X-YA
  drm/nv50-nvc0: work around an evo channel hang that some people see
  drm/nouveau: implement init table opcode 0x5c
  drm/nouveau: fix oops on unload with disabled LVDS panel
  ...
2011-04-13 09:10:25 -07:00
Matthew Garrett 21a8d026e0 x86 platform drivers: Build fix for intel_pmic_gpio
Fix an incorrect function name so the driver builds.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-04-13 11:52:16 -04:00
Mike Frysinger 132543074a USB: musb: blackfin: work around anomaly 05000450
DMA mode 1 data corruption anomaly on Blackfin systems.  This issue is
specific to the Blackfin silicon as the bug appears to be related to the
connection of the musb ip to the bus/dma fabric.

Data corruption when using USB DMA mode 1. (Issue manager 17-01-0105)
DMA mode 1 allows large size transfers to generate a single interrupt
at the end of the entire transfer.  The transfer is split up in packets
of length specified in the Maximum Packet Size field for that endpoint.
If the transfer size is not an integer multiple of the Maximum Packet
Size, a short packet will be present at the end of the transfer.

Under certain conditions this packet may be corrupted in the USB FIFO.

Workaround:
Use DMA mode 1 to transfer (n* Maximum Packet Size) and schedule DMA
mode 0 to transfer the short packet.

As an example if your transfer size is 33168 bytes and Maximum Packet
Size equals 512, schedule [33168 - (33168 mod 512)] in DMA mode 1 and
the remainder (33168 mod 512) in DMA mode 0.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-04-13 11:51:28 +03:00
Hema HK 4f9edd2d7e usb: musb: Fix the crash issue during reboot
Below crash observed with commit 7acc6197b7
(usb: musb: Idle path retention and offmode support for OMAP3)
during board reboot.

The musb clock was disabled when musb_shutdown() was called by
platform_drv_shutdown in which there are register accesses.
call pm_runtime_get_sync() and pm_runtime_put_sync() in the
musb_shutdown function.

/ # [  172.368774] Unhandled fault: imprecise external abort (0x1406) at 0x400f0000
[  172.376190] Internal error: : 1406 [#1] SMP
[  172.380554] last sysfs file: /sys/devices/platform/omap/omap_i2c.4/i2c-4/i2c-dev/i2c-4/dev
[  172.389221] Modules linked in:
[  172.392456] CPU: 0    Tainted: G        W    (2.6.38-06671-geddecbb #33)
[  172.399475] PC is at do_raw_spin_unlock+0x50/0xc0
[  172.404418] LR is at _raw_spin_unlock_irqrestore+0x24/0x44
[  172.410186] pc : [<c069bfdc>]    lr : [<c085a7f8>]    psr: 60000093
[  172.410186] sp : ee993e40  ip : c0d00240  fp : bea9cf14
[  172.422241] r10: 00000000  r9 : ee992000  r8 : c04b2fa8
[  172.427703] r7 : 00000000  r6 : c0fa46c0  r5 : ef966124  r4 : ef966124
[  172.434539] r3 : ef92cbc0  r2 : ef92cbc0  r1 : 00000000  r0 : ef966124
[  172.441406] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  172.448974] Control: 10c5387d  Table: ae8d804a  DAC: 00000015
[  172.454986] Process init (pid: 1094, stack limit = 0xee9922f8)
[  172.461120] Stack: (0xee993e40 to 0xee994000)
[  172.465667] 3e40: a0000013 c085a7f8 ef966124 a0000013 c0fa46c0 c0761ab4 c0761a70 ef95c008
[  172.474273] 3e60: ef95c014 c06e2fd0 c06e2fbc c06dea90 00000000 01234567 28121969 c04fccb4
[  172.482849] 3e80: 00000000 c04fcd04 c0a302bc c04fce44 c0a02600 00000001 00000000 c085cd04
[  172.491424] 3ea0: 00000000 00000002 c09ea000 c085afc0 ee993f24 00000000 00040001 00000445
[  172.499999] 3ec0: a8eb9d34 00000027 00000000 00000000 00000000 c0a56a4c 00000000 00000000
[  172.508575] 3ee0: 00000002 60000093 00000000 c0519aac 00000002 00000080 00000000 c0550420
[  172.517150] 3f00: 00000000 00000002 ee970000 c0a56a3c c0a56a20 00000002 c0a56a3c 00000000
[  172.525726] 3f20: c0a56a3c 0000000a c1580e00 c0a56a20 00000002 c0a56a3c c1580e00 c0a56a20
[  172.534301] 3f40: ef92cbc0 c05173a0 00000001 ef92cbc0 c0576190 c04e3174 20000013 c0517324
[  172.542877] 3f60: ef815c00 ee90b720 c04e3174 c0576190 00000001 ef92cbc0 c04b2f00 ffffffff
[  172.551483] 3f80: 00000058 c0517324 00000000 00000000 ffffffff 00000000 00000000 ffffffff
[  172.560058] 3fa0: 00000058 c04b2de0 00000000 00000000 fee1dead 28121969 01234567 00000000
[  172.568634] 3fc0: 00000000 00000000 ffffffff 00000058 00000000 00000001 400aa000 bea9cf14
[  172.577209] 3fe0: 000ea148 bea9c958 000aa750 40225728 60000010 fee1dead 00000000 00000000
[  172.585784] [<c069bfdc>] (do_raw_spin_unlock+0x50/0xc0) from [<c085a7f8>] (_raw_spin_unlock_irqrestore+0x24/0x44)
[  172.596588] [<c085a7f8>] (_raw_spin_unlock_irqrestore+0x24/0x44) from [<c0761ab4>] (musb_shutdown+0x44/0x88)
[  172.606933] [<c0761ab4>] (musb_shutdown+0x44/0x88) from [<c06e2fd0>] (platform_drv_shutdown+0x14/0x18)
[  172.616699] [<c06e2fd0>] (platform_drv_shutdown+0x14/0x18) from [<c06dea90>] (device_shutdown+0x74/0xb4)
[  172.626647] [<c06dea90>] (device_shutdown+0x74/0xb4) from [<c04fccb4>] (kernel_restart_prepare+0x24/0x38)
[  172.636688] [<c04fccb4>] (kernel_restart_prepare+0x24/0x38) from [<c04fcd04>] (kernel_restart+0xc/0x48)
[  172.646545] [<c04fcd04>] (kernel_restart+0xc/0x48) from [<c04fce44>] (sys_reboot+0xfc/0x1d8)
[  172.655426] [<c04fce44>] (sys_reboot+0xfc/0x1d8) from [<c04b2de0>] (ret_fast_syscall+0x0/0x3c)
[  172.664459] Code: e3c3303f e594200c e593300c e1520003 (0a000002)
[  172.670867] ------------[ cut here ]------------

Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-04-13 11:51:28 +03:00
Felipe Balbi 3d5ad13eac usb: musb: gadget: check the correct list_head
We are now using our own list_head, so we should
be checking against that, not the gadget driver's
list_head.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-04-13 11:51:26 +03:00
Felipe Balbi 7a180e70cf usb: musb: temporarily make it bool
Due to the recent changes to musb's glue layers,
we can't compile musb-hdrc as a module - compilation
will break due to undefined symbol musb_debug. In
order to fix that, we need a big re-work of the
debug support on the MUSB driver.

Because that would mean a lot of new code coming
into the -rc series, it's best to defer that to
next merge window and for now just disable module
support for MUSB.

Once we get the refactor of the debugging support
done, we can simply revert this patch and things
will go back to normal again.

Cc: stable@kernel.org # v2.6.38
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-04-13 11:51:25 +03:00
Dan Carpenter 2e10f5e70f USB: musb: dereferencing an iomem pointer
"tx_ram" points to io memory.  We can't dereference it directly.  Sparse
complains about this: "drivers/usb/musb/cppi_dma.c:1205:25: warning:
dereference of noderef expression"

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-04-13 11:51:24 +03:00
Dan Carpenter 2fbcf3fa43 USB: musb: silence printk format warning
Gcc gives the following warnings:

drivers/usb/musb/cppi_dma.c: In function ‘cppi_next_tx_segment’:
drivers/usb/musb/cppi_dma.c:600: warning: format ‘%x’ expects type ‘unsigned int’, but argument 8 has type ‘dma_addr_t’
drivers/usb/musb/cppi_dma.c: In function ‘cppi_next_rx_segment’:
drivers/usb/musb/cppi_dma.c:822: warning: format ‘%x’ expects type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’
drivers/usb/musb/cppi_dma.c: In function ‘cppi_rx_scan’:
drivers/usb/musb/cppi_dma.c:1042: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 4 has type ‘dma_addr_t’
drivers/usb/musb/cppi_dma.c:1114: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’

dma_addr_t is sometimes 32 bit and sometimes 64.  We normally cast them
to unsigned long long for printk().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-04-13 11:51:23 +03:00
Dan Carpenter aca7f35321 USB: musb: using 0 instead of NULL
Sparse complains (and rightly so):
drivers/usb/musb/cppi_dma.c:1458:33:
	warning: Using plain integer as NULL pointer

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-04-13 11:51:21 +03:00
Dan Carpenter ec63bf6c06 USB: musb: add missing unlock in cppi_interrupt()
We should unlock before returning here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-04-13 11:50:58 +03:00
Mian Yousaf Kaukab 8726606424 usb: musb: ux500: copy dma mask from platform device to musb device
musb code checks dma mask before calling dma hooks.

Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-04-13 11:50:57 +03:00
Mian Yousaf Kaukab 100d4a9d20 usb: musb: clear AUTOSET while clearing DMAENAB
On the completion of tx dma, dma is disabled by clearing MUSB_TXCSR_DMAENAB in
TXCSR. If MUSB_TXCSR_AUTOSET was set in txstate() it will remain set although
it is not needed in PIO mode. Clear it as soon as it is not needed.

Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-04-13 11:50:55 +03:00
Jeff Brown 9fb0f14e31 Input: evdev - indicate buffer overrun with SYN_DROPPED
Add a new EV_SYN code, SYN_DROPPED, to inform the client when input
events have been dropped from the evdev input buffer due to a
buffer overrun.  The client should use this event as a hint to
reset its state or ignore all following events until the next
packet begins.

Signed-off-by: Jeff Brown <jeffbrown@android.com>
[dtor@mail.ru: Implement Henrik's suggestion and drop old events in
 case of overflow.]
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-12 23:35:24 -07:00
Eric Miao 7db6a7fa09 ARM: pxa: convert incorrect IRQ_TO_IRQ() to irq_to_gpio()
This fixes the failure to register the IRQ_RTCAlrm alarm as a wakeup
event.  It is misinterpreted as a gpio irq not a PWER bitmask. Fixed
this by converting the incorrect IRQ_TO_IRQ() to a correct version of
irq_to_gpio().

Reported-by: Nick Bane <nickbane1@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-13 09:30:40 +08:00
Linus Torvalds aaa119a3d4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  fix XEN_SAVE_RESTORE Kconfig dependencies
  PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS
2011-04-12 17:18:05 -07:00
Thomas Gleixner 92f73a62a1 Merge branch 'fortglx/39/tip/timers/rtc' of git://git.linaro.org/people/jstultz/linux into timers/urgent 2011-04-13 01:54:09 +02:00
Dave Airlie 2582b6efce Revert "i915: restore only the mode of this driver on lastclose"
This reverts commit 0a0883c843.

this was in my tree by accident, I meant to rebase it out and
didn't realise in time.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-13 09:20:24 +10:00
Dave Airlie d87dfdbfc9 Revert "ttm: Utilize the DMA API for pages that have TTM_PAGE_FLAG_DMA32 set."
This reverts commit 69a07f0b11.

We've tracked a number of problems back to this, and Thomas
thinks we should redesign this for .40/41 anyways so I'm
happy to revert it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-13 09:15:09 +10:00
Konstantin Khlebnikov cbf15bdbbd i915: select VIDEO_OUTPUT_CONTROL for ACPI_VIDEO
fix Kconfig warning:

(DRM_I915 && STUB_POULSBO) selects ACPI_VIDEO which has unmet direct dependencies
(ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT)

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-13 09:10:25 +10:00
Alex Deucher 2feea49ae3 drm/radeon/kms: properly program vddci on evergreen+
Change vddci as well as vddc when changing power modes
on evergreen/ni.  Also, properly set vddci on boot up
for ni cards.  The vbios only sets the limited clocks
and voltages on boot until the mc ucode is loaded.  This
should fix stability problems on some btc cards.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-13 09:09:44 +10:00
Alex Deucher 8a83ec5ee8 drm/radeon/kms: add voltage type to atom set voltage function
This is needed for setting voltages other than vddc.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-13 09:09:42 +10:00
Alex Deucher b4df8be104 drm/radeon/kms: fix pcie_p callbacks on btc and cayman
btc and cayman asics use the same callback for
pcie port registers.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-13 09:09:30 +10:00
Alex Deucher 71e16bfbd2 drm/radeon/kms: fix suspend on rv530 asics
Apparently only rv515 asics need the workaround
added in f24d86f1a4
(drm/radeon/kms: fix resume regression for some r5xx laptops).

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=34709

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-13 09:09:27 +10:00
Alex Deucher 92656d707e drm/radeon/kms: clean up gart dummy page handling
As per Konrad's original patch, the dummy page used
by the gart code and allocated in radeon_gart_init()
was not freed properly in radeon_gart_fini().

At the same time r6xx and newer allocated and freed the
dummy page on their own.  So to do Konrad's patch one
better, just remove the allocation and freeing of the
dummy page in the r6xx, 7xx, evergreen, and ni code and
allocate and free in the gart_init/fini() functions for
all asics.

Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-13 09:09:22 +10:00
Linus Torvalds d77d9597ad Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
  thinkpad-acpi fails to load with newer Thinkpad X201s BIOS
  acer-wmi: Fix capitalisation of GUID in module alias
  sony-laptop: keyboard backlight fixes
  sony-laptop: only show the handles sysfs file in debug mode
  samsung-laptop: set backlight type
  staging: samsung-laptop has moved to platform/x86
  samsung-laptop: Samsung R410P backlight driver
  samsung-laptop: add support for N230 model
  platform-drivers: x86: pmic: Restore the dropped buslock/unlock
  sony-laptop: fix early NULL pointer dereference
  msi-laptop: fix config-dependent build error
  eeepc-wmi: add keys found on EeePC 1215T
  asus-wmi: swap input name and phys
  asus-laptop: remove removed features from feature-removal-schedule.txt
2011-04-12 15:24:23 -07:00
Linus Torvalds e328f05dd6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: Fetch cell pointer from platform_device->mfd_cell
2011-04-12 14:25:10 -07:00
Keith Packard b569ab3911 thinkpad-acpi fails to load with newer Thinkpad X201s BIOS
The new BIOS has a slightly different EC version string.

From a1541710300b083a1a9acff2890d721d15ede62b Mon Sep 17 00:00:00 2001
From: Keith Packard <keithp@keithp.com>
Date: Sun, 13 Mar 2011 23:46:22 -0700
Subject: [PATCH] thinkpad-acpi: Some BIOS versions don't end in WW, remove check

My X201s BIOS version string is 6QET46V1 (1.16 ). The
EC version string is 6QHT28WW-1.09. The driver was requiring that both
of these have 'WW' in positions 6 and 7. I don't know what the
significance of having 'V1' there instead is, but removing the test
makes the driver load on my machine.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-04-12 11:27:48 -04:00
Lee, Chun-Yi 08a0799d57 acer-wmi: Fix capitalisation of GUID in module alias
wmi:6AF4F258-B401-42Fd-BE91-3D4AC2D7C0D3 needs to be
wmi:6AF4F258-B401-42FD-BE91-3D4AC2D7C0D3 in module alias for acer-wmi is
automatically loaded.

Cc: Pali Rohár <pali.rohar@gmail.com>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-04-12 11:27:46 -04:00
Marco Chiappero df410d5224 sony-laptop: keyboard backlight fixes
Restore the original state on module removal, set the latest values on
resume.
When setting the keyboard backlight mode try to turn on/off backlight
immediately.

[malattia@linux.it: patch taken from a largely modified sony-laptop.c,
ported and slightly modified to use defines already available.]

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-04-12 11:27:44 -04:00
Mattia Dongili 855b8bc995 sony-laptop: only show the handles sysfs file in debug mode
It makes no sense to expose this type of information to userspace unless
the driver was explicitly loaded with the debug option.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-04-12 11:27:42 -04:00
Michal Marek 8713b04ab8 samsung-laptop: set backlight type
Cherry-picked from drivers/staging/samsung-laptop/samsung-laptop.c

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-04-12 11:27:40 -04:00
Michal Marek 993819c563 staging: samsung-laptop has moved to platform/x86
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-04-12 11:27:31 -04:00
Alberto Mardegan 3d536ed415 samsung-laptop: Samsung R410P backlight driver
Here's a trivial patch which adds support to the backlight device found
in Samsung R410 Plus laptops.

Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[mmarek: cherry-picked from staging commit d542f180]
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-04-12 11:10:53 -04:00
Greg Kroah-Hartman 101650726e samsung-laptop: add support for N230 model
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[mmarek: cherry-picked from staging commit 0789b003]
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-04-12 11:10:51 -04:00
Dmitry Eremin-Solenikov 735443fede pcmcia: limit pxa2xx_trizeps4 subdriver to trizeps4 platform
pxa2xx_trizeps4 tries to register pxa2xx-pcmcia device not checking whether
machine is really trizeps4, thus messing multi-machine kernels. Fix it up.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-12 23:07:42 +08:00
Dmitry Eremin-Solenikov af21cbb1ef pcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform
pxa2xx_balloon3 tries to register pxa2xx-pcmcia device not checking whether
machine is really balloon3, thus messing multi-machine kernels. Fix it up.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-12 23:07:42 +08:00
Marek Vasut a6d710fefd ARM: pxafb: Fix access to nonexistent member of pxafb_info
In case CONFIG_FB_PXA_OVERLAY is not defined, the pxafb_freq_transition()
function tests nonexistent member of pxafb_info (since the member is not
part of the structure).

Fix this by wraping the test in ifdef, even if I don't really like how the code
looks now. The check doesn't have to happen if overlays are disabled at all as
the check is always true then.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-12 23:07:42 +08:00
Samuel Ortiz e710d7d5a9 mfd: Fetch cell pointer from platform_device->mfd_cell
In order for MFD drivers to fetch their cell pointer but also their
platform data one, an mfd cell pointer is added to the platform_device
structure.
That allows all MFD sub devices drivers to be MFD agnostic, unless
they really need to access their MFD cell data. Most of them don't,
especially the ones for IPs used by both MFD and non MFD SoCs.

Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Greg KH <gregkh@suse.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-04-12 11:13:00 +02:00
Axel Lin c68b208125 Input: twl4030_keypad - fix potential NULL dereference in twl4030_kp_probe()
We should first check whether platform data is NULL or not, before
dereferencing it to get the keymap.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-11 23:51:18 -07:00
Linus Torvalds 16ad56972c Merge branch 'stable/bug-fixes-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
* 'stable/bug-fixes-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen: Allow PV-OPS kernel to detect whether XSAVE is supported
  xen: just completely disable XSAVE
  xen/debug: Don't be so verbose with WARN on 1-1 mapping errors.
  xen: events: fix error checks in bind_*_to_irqhandler()
2011-04-11 20:01:04 -07:00
Linus Torvalds 6b98cd5aad Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6
* 'spi/merge' of git://git.secretlab.ca/git/linux-2.6:
  dt/fsldma: fix build warning caused by of_platform_device changes
  spi: Fix race condition in stop_queue()
  gpio/pch_gpio: Fix output value of pch_gpio_direction_output()
  gpio/ml_ioh_gpio: Fix output value of ioh_gpio_direction_output()
  gpio/pca953x: fix error handling path in probe() call
2011-04-11 15:44:38 -07:00
Rafael J. Wysocki 1f112cee07 PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS
Xen save/restore is going to use hibernate device callbacks for
quiescing devices and putting them back to normal operations and it
would need to select CONFIG_HIBERNATION for this purpose.  However,
that also would cause the hibernate interfaces for user space to be
enabled, which might confuse user space, because the Xen kernels
don't support hibernation.  Moreover, it would be wasteful, as it
would make the Xen kernels include a substantial amount of code that
they would never use.

To address this issue introduce new power management Kconfig option
CONFIG_HIBERNATE_CALLBACKS, such that it will only select the code
that is necessary for the hibernate device callbacks to work and make
CONFIG_HIBERNATION select it.  Then, Xen save/restore will be able to
select CONFIG_HIBERNATE_CALLBACKS without dragging the entire
hibernate code along with it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
2011-04-11 22:54:42 +02:00
Linus Torvalds b42282e5a0 pci: fix PCI bus allocation alignment handling
In commit 13583b1659 ("PCI: refactor io size calculation code") Ram
had a thinko in the refactorization of the code: the end result used the
variable 'align' for the bus alignment, but the original code used
'min_align'.

Since then, another use of that 'align' variable got introduced by
commit c8adf9a3e8 ("PCI: pre-allocate additional resources to devices
only after successful allocation of essential resources.")

Fix both of those uses to use 'min_align' as they should.

Daniel Hellstrom <daniel@gaisler.com>
Acked-by: Ram Pai <linuxram@us.ibm.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-11 10:53:11 -07:00
Linus Torvalds c44eaf41a5 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: (34 commits)
  net: Add support for SMSC LAN9530, LAN9730 and LAN89530
  mlx4_en: Restoring RX buffer pointer in case of failure
  mlx4: Sensing link type at device initialization
  ipv4: Fix "Set rt->rt_iif more sanely on output routes."
  MAINTAINERS: add entry for Xen network backend
  be2net: Fix suspend/resume operation
  be2net: Rename some struct members for clarity
  pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev
  dsa/mv88e6131: add support for mv88e6085 switch
  ipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2)
  be2net: Fix a potential crash during shutdown.
  bna: Fix for handling firmware heartbeat failure
  can: mcp251x: Allow pass IRQ flags through platform data.
  smsc911x: fix mac_lock acquision before calling smsc911x_mac_read
  iwlwifi: accept EEPROM version 0x423 for iwl6000
  rt2x00: fix cancelling uninitialized work
  rtlwifi: Fix some warnings/bugs
  p54usb: IDs for two new devices
  wl12xx: fix potential buffer overflow in testmode nvs push
  zd1211rw: reset rx idle timer from tasklet
  ...
2011-04-11 07:27:24 -07:00
Ira W. Snyder 8faa7cf828 dt/fsldma: fix build warning caused by of_platform_device changes
Commit 000061245a, "dt/powerpc:
Eliminate users of of_platform_{,un}register_driver" forgot to convert
the type of structure passed into platform_device_register() when it
was converted from of_platform_device_register. Fix it.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-04-10 23:34:38 -07:00
Dave Airlie d85023a3cd Merge remote branch 'nouveau/drm-nouveau-fixes' of /ssd/git/drm-nouveau-next into drm-fixes
* 'nouveau/drm-nouveau-fixes' of /ssd/git/drm-nouveau-next:
  drm/nvc0: improve vm flush function
  drm/nv50-nvc0: remove some code that doesn't belong here
  drm/nv50: use "nv86" tlb flush method on everything except 0x50/0xac
  drm/nouveau: quirk for XFX GT-240X-YA
  drm/nv50-nvc0: work around an evo channel hang that some people see
  drm/nouveau: implement init table opcode 0x5c
  drm/nouveau: fix oops on unload with disabled LVDS panel
  nv30: Fix parsing of perf table
  drm/nouveau: correct memtiming table parsing for nv4x
2011-04-11 15:26:01 +10:00
Steve Glendinning 88edaa4159 net: Add support for SMSC LAN9530, LAN9730 and LAN89530
This patch adds support for SMSC's LAN9530, LAN9730 and LAN89530 USB
ethernet controllers to the existing smsc95xx driver by adding
their new USB VID/PID pairs.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:59:27 -07:00
Linus Torvalds 510ec7bc3b Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
  mtd: atmel_nand: use CPU I/O when buffer is in vmalloc(ed) region
  mtd: atmel_nand: modify test case for using DMA operations
  mtd: atmel_nand: fix support for CPUs that do not support DMA access
  mtd: atmel_nand: trivial: change DMA usage information trace
  mtd: mtdswap: fix printk format warning
2011-04-09 13:23:50 -07:00
Alex Deucher d4864d604a drm/radeon/kms: make radeon i2c put/get bytes less noisy
Switch some errors to debug output.  These are generally harmless
and tend to confuse users.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-09 16:21:13 +10:00
Alex Deucher 9bb09fa1b5 drm/radeon/kms: pll tweaks for rv6xx
Prefer minm over maxp.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=35994

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-09 16:20:41 +10:00
Michel Dänzer 88a2b75cce drm/radeon: Fix KMS legacy backlight support if CONFIG_BACKLIGHT_CLASS_DEVICE=m.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-09 16:20:36 +10:00
Michel Dänzer dc66b325f1 radeon: Fix KMS CP writeback on big endian machines.
This is necessary even with PCI(e) GART, and it makes writeback work even with
AGP on my PowerBook. Might still be unreliable with older revisions of UniNorth
and other AGP bridges though.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Reviewed-by: Alex Deucher <alex.deucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-09 16:20:15 +10:00
Dave Airlie 0a0883c843 i915: restore only the mode of this driver on lastclose
This has always used a big hammer, but that hammer is probably
too big, I'm also not sure its necessary but at least this
should be safe.

Should fix: https://bugzilla.kernel.org/show_bug.cgi?id=23592

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-09 12:08:30 +10:00
Linus Torvalds bb3c90f0de Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] compile fix for latest binutils
  [S390] cio: prevent purging of CCW devices in the online state
  [S390] qdio: fix init sequence
  [S390] Fix parameter passing for smp_switch_to_cpu()
  [S390] oprofile s390: prevent stack corruption
2011-04-08 07:36:14 -07:00
Yevgeny Petrilin 60b1809f7e mlx4_en: Restoring RX buffer pointer in case of failure
If not done, second attempt to open the RX ring would cause memory corruption.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 20:36:13 -07:00
Yevgeny Petrilin ab6dc30da5 mlx4: Sensing link type at device initialization
When bringing the port up, performing a SENSE_PORT command
To try and check to which physical link type (IB or Ethernet) the physical
port is connected.
In case there is no valid link partner, the port will come up as its
supported default.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 20:36:12 -07:00
Linus Torvalds 0c3efe54d0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  watchdog: mpc8xxx_wdt: fix build
2011-04-07 13:34:41 -07:00
Peter Korsgaard d856b41846 watchdog: mpc8xxx_wdt: fix build
Since 1c48a5c93d (dt: Eliminate of_platform_{,un}register_driver)
mpc8xxx_wdt no longer builds as it tries to refer to a 'match' variable
rather than ofdev->dev.of_match that it checks just before.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2011-04-07 20:20:24 +00:00
Linus Torvalds 132452ee23 Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6:
  efifb: Add override for 11" Macbook Air 3,1
  efifb: Support overriding fields FW tells us with the DMI data.
  fb: Reduce priority of resource conflict message
  savagefb: Remove obsolete else clause in savage_setup_i2c_bus
  savagefb: Set up I2C based on chip family instead of card id
  savagefb: Replace magic register address with define
  drivers/video/bfin-lq035q1-fb.c: introduce missing kfree
  video: s3c-fb: fix checkpatch errors and warning
  efifb: support AMD Radeon HD 6490
  s3fb: fix Virge/GX2
  fbcon: Remove unused 'display *p' variable from fb_flashcursor()
  fbdev: sh_mobile_lcdcfb: fix module lock acquisition
  fbdev: sh_mobile_lcdcfb: add blanking support
  viafb: initialize margins correct
  viafb: refresh rate bug collection
  sh: mach-ap325rxa: move backlight control code
  sh: mach-ecovec24: support for main lcd backlight
2011-04-07 12:49:17 -07:00
Linus Torvalds 26cf445721 Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: select ARCH_NO_SYSDEV_OPS.
  sh: fix build error in board-sh7757lcr.c
  sh: landisk: Remove whitespace
  sh: landisk: Remove mv_nr_irqs
  sh: sh-sci: Fix double initialization by serial_console_setup
  serial: sh-sci: prevent setup of uninitialized serial console
  dma: shdma: add checking the DMAOR_AE in sh_dmae_err
2011-04-07 12:48:45 -07:00
Linus Torvalds 8b9686ff4d Merge branches 'x86-fixes-for-linus', 'sched-fixes-for-linus', 'timers-fixes-for-linus', 'irq-fixes-for-linus' and 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86-32, fpu: Fix FPU exception handling on non-SSE systems
  x86, hibernate: Initialize mmu_cr4_features during boot
  x86-32, NUMA: Fix ACPI NUMA init broken by recent x86-64 change
  x86: visws: Fixup irq overhaul fallout

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: Clean up rebalance_domains() load-balance interval calculation

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86/mrst/vrtc: Fix boot crash in mrst_rtc_init()
  rtc, x86/mrst/vrtc: Fix boot crash in rtc_read_alarm()

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: Fix cpumask leak in __setup_irq()

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf probe: Fix listing incorrect line number with inline function
  perf probe: Fix to find recursively inlined function
  perf probe: Fix multiple --vars options behavior
  perf probe: Fix to remove redundant close
  perf probe: Fix to ensure function declared file
2011-04-07 12:12:58 -07:00
Linus Torvalds df9b29d13e Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (28 commits)
  staging: usbip: bugfix for isochronous packets and optimization
  staging: usbip: bugfix add number of packets for isochronous frames
  staging: usbip: bugfixes related to kthread conversion
  staging: usbip: fix shutdown problems.
  staging: hv: Fix GARP not sent after Quick Migration
  staging: IIO: IMU: ADIS16400: Avoid using printk facility directly
  staging: IIO: IMU: ADIS16400: Fix product ID check, skip embedded revision number
  staging: IIO: IMU: ADIS16400: Make sure only enabled scan_elements are pushed into the ring
  staging: IIO: IMU: ADIS16400: Fix addresses of GYRO and ACCEL calibration offset
  staging: IIO: IMU: ADIS16400: Add delay after self test
  staging: IIO: IMU: ADIS16400: Fix up SPI messages cs_change behavior
  staging/rtl81*: build as loadable modules only
  staging: brcm80211: removed 'is_amsdu causing toss' log spam
  staging: brcm80211: fix for 'Short CCK' log spam
  staging: brcm80211: fix for 'AC_BE txop..' logs spammed problem
  staging: memrar: remove driver from tree
  staging: sep: remove last memrar remnants
  staging: fix hv_mouse build, needs delay.h
  staging: fix olpc_dcon build errors
  staging: sm7xx: fixed defines
  ...

Fix up trivial conflict in drivers/staging/memrar/memrar_handler.c
(deleted vs trivial spelling fixes)
2011-04-07 11:36:44 -07:00
Linus Torvalds ccfeef0ff7 Merge branch 'for-linus' of git://git.infradead.org/ubifs-2.6
* 'for-linus' of git://git.infradead.org/ubifs-2.6:
  UBI: do not select KALLSYMS_ALL
  UBI: do not compare array with NULL
  UBI: check if we are in RO mode in the erase routine
  UBIFS: fix debugging failure in dbg_check_space_info
  UBIFS: fix error path in dbg_debugfs_init_fs
  UBIFS: unify error path dbg_debugfs_init_fs
  UBIFS: do not select KALLSYMS_ALL
  UBIFS: fix assertion warnings
  UBIFS: fix oops on error path in read_pnode
  UBIFS: do not read flash unnecessarily
2011-04-07 11:31:03 -07:00
Vasily Khoruzhick 850a28ecd8 spi: Fix race condition in stop_queue()
There's a race condition in stop_queue() in some drivers -
if drv_data->queue is empty, but drv_data->busy is still set
(or opposite situation) stop_queue will return -EBUSY.
So fix loop condition to check that both drv_data->queue is empty
and drv_data->busy is not set.

This patch affects following drivers:
pxa2xx_spi
spi_bfin5xx
amba-pl022
dw_spi

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-04-07 11:17:45 -07:00
Grant Likely 454abcc57f Merge commit 'v2.6.39-rc2' into spi/merge 2011-04-07 11:15:50 -07:00
Linus Torvalds 42933bac11 Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
2011-04-07 11:14:49 -07:00
Linus Torvalds 2b9accbee5 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: Add support for CH Pro Throttle
  HID: hid-magicmouse: Increase evdev buffer size
  HID: add FF support for Logitech G25/G27
  HID: roccat: Add support for wireless variant of Pyra
  HID: Fix typo Keyoutch -> Keytouch
  HID: add support for Skycable 0x3f07 wireless presenter
2011-04-07 09:42:13 -07:00
Youquan Song 7e3bf1d330 fix build fail for hv_mouse indefine udelay
Fix build failure issue for hv_mouse
When build 2.6.39-rc1 kernel, it will be blocked at build hv_mouse.

  drivers/staging/hv/hv_mouse.c: In function ‘ReleaseInputDevice’:
  drivers/staging/hv/hv_mouse.c:293: error: implicit declaration of function ‘udelay’

Signed-off-by: Youquan Song <youquan.song@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-07 09:41:47 -07:00
Feng Tang de97a21a23 rtc, x86/mrst/vrtc: Fix boot crash in rtc_read_alarm()
Commit f44f7f96a2 ("RTC: Initialize kernel state from RTC") caused a
boot regression on the MRST platform.

The reason is that rtc_device_register() calls rtc_read_alarm() after
that change, which function does not have all driver data set up yet.

The rtc-mrst driver needs to call dev_set_drvdata() before rtc_device_register()
gets called.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1302140384-27571-1-git-send-email-feng.tang@intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-04-07 11:27:42 +02:00
Feng Tang 67c1b8c6aa RTC: rtc-mrst: follow on to the change of rtc_device_register()
commit f44f7f96a2 (RTC: Initialize kernel state from RTC) will
call rtc_read_alarm() inside rtc_device_register(), so rtc-mrst
driver need to call dev_set_drvdata() before rtc_device_register()
get called.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2011-04-06 19:17:55 -07:00
Arjan Mels 28276a28d8 staging: usbip: bugfix for isochronous packets and optimization
For isochronous packets the actual_length is the sum of the actual
length of each of the packets, however between the packets might be
padding, so it is not sufficient to just send the first actual_length
bytes of the buffer. To fix this and simultanesouly optimize the
bandwidth the content of the isochronous packets are send without the
padding, the padding is restored on the receiving end.

Signed-off-by: Arjan Mels <arjan.mels@gmx.net>
Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
Cc: Max Vozeler <max@vozeler.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-06 15:51:14 -07:00
Arjan Mels 1325f85fa4 staging: usbip: bugfix add number of packets for isochronous frames
The number_of_packets was not transmitted for RET_SUBMIT packets. The
linux client used the stored number_of_packet from the submitted
request. The windows userland client does not do this however and needs
to know the number_of_packets to determine the size of the transmission.

Signed-off-by: Arjan Mels <arjan.mels@gmx.net>
Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
Cc: Max Vozeler <max@vozeler.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-06 15:51:14 -07:00
Arjan Mels d2dd0b07c3 staging: usbip: bugfixes related to kthread conversion
When doing a usb port reset do a queued reset instead to prevent a
deadlock: the reset will cause the driver to unbind, causing the
usb_driver_lock_for_reset to stall.

Signed-off-by: Arjan Mels <arjan.mels@gmx.net>
Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
Cc: Max Vozeler <max@vozeler.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-06 15:51:13 -07:00
Arjan Mels 2f8c4c5494 staging: usbip: fix shutdown problems.
When shuting down the tcp_rx and tcp_tx threads first check if they are
not closed already (maybe because an error caused them to return).

Signed-off-by: Arjan Mels <arjan.mels@gmx.net>
Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
Cc: Max Vozeler <max@vozeler.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-06 15:51:13 -07:00
Haiyang Zhang c996edcf1c staging: hv: Fix GARP not sent after Quick Migration
After Quick Migration, the network is not immediately operational in the
current context when receiving RNDIS_STATUS_MEDIA_CONNECT event. So, I added
another netif_notify_peers() into a scheduled work, otherwise GARP packet will
not be sent after quick migration, and cause network disconnection.

Thanks to Mike Surcouf <mike@surcouf.co.uk> for reporting the bug and
testing the patch.

Reported-by: Mike Surcouf <mike@surcouf.co.uk>
Tested-by: Mike Surcouf <mike@surcouf.co.uk>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-06 15:44:05 -07:00
Christoph Fritz 908433833c Input: h3600_ts - fix error handling at connect
In case of an error in h3600ts_connect(), deconstruct in correct order
and with the right calls.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-06 15:34:32 -07:00
Shubhrajyoti D 8f74c0661c Input: twl4030_keypad - avoid potential NULL-pointer dereference
Signed-off-by: Shubhrajyoti D <a0393217@india.ti.com>
Acked-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-06 15:32:10 -07:00
Padmanabh Ratnakar 1f5db83375 be2net: Fix suspend/resume operation
eq_next_idx is not getting reset to zero during suspend.
This causes resume to fail. Added the fix.

Signed-off-by: Sarveswara Rao Mygapula <sarveswararao.mygapula@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 14:40:15 -07:00
Padmanabh Ratnakar ecd6210765 be2net: Rename some struct members for clarity
Renamed msix_vec_idx to eq_idx in be_eq_obj struct.
Renamed msix_vec_next_idx to eq_next_idx in be_adapter structure.
These members are used in INTX mode also.

Signed-off-by: Sarveswara Rao Mygapula <sarveswararao.mygapula@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 14:40:15 -07:00
Ulrich Weber ae07b0b221 pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev
otherwise we loop forever if a PPPoE socket was set
to PPPOX_ZOMBIE state by a PADT message when the
ethernet device is going down afterwards.

Signed-off-by: Ulrich Weber <uweber@astaro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 14:04:49 -07:00
David S. Miller a25a32ab71 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2011-04-06 13:34:15 -07:00
Ajit Khaparde 2d5d415465 be2net: Fix a potential crash during shutdown.
adapter could remain uninitialized if probe fails for some reason.
A null pointer access could cause a crash if be_shutdown
is called after that.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 12:40:18 -07:00
Rasesh Mody 1e58148670 bna: Fix for handling firmware heartbeat failure
This patch contains a fix for gracefully handling firmware heartbeat
failure instead of forcing panic.

Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 12:39:07 -07:00
Enric Balletbo i Serra 34206f2671 can: mcp251x: Allow pass IRQ flags through platform data.
When an interrupt occurs, the INT pin is driven low by the
MCP251x controller (falling edge) but in some cases the INT
pin can be connected to the MPU through a transistor or level
translator which inverts this signal. In this case interrupt
should be configured in rising edge.

This patch adds support to pass the IRQ flags via
mcp251x_platform_data.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-06 12:24:26 -07:00