1
0
Fork 0
Commit Graph

235177 Commits (b65c7491cb865577e83e6b7fae2aa2f4ea457c38)

Author SHA1 Message Date
Martin K. Petersen c611529e7c sd: Honor block layer integrity handling flags
A set of flags introduced in the block layer enable better control over
how protection information is handled. These flags are useful for both
error injection and data recovery purposes. Checking can be enabled and
disabled for controller and disk, and the guard tag format is now a
per-I/O property.

Update sd_protect_op to communicate the relevant information to the
low-level device driver via a set of flags in scsi_cmnd.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-30 15:17:35 -06:00
Martin K. Petersen 2341c2f8c3 block: Add T10 Protection Information functions
The T10 Protection Information format is also used by some devices that
do not go through the SCSI layer (virtual block devices, NVMe). Relocate
the relevant functions to a block layer library that can be used without
involving SCSI.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-27 09:14:59 -06:00
Martin K. Petersen aae7df5019 block: Integrity checksum flag
Make the choice of checksum a per-I/O property by introducing a flag
that can be inspected by the SCSI layer. There are several reasons for
this:

 1. It allows us to switch choice of checksum without unloading and
    reloading the HBA driver.

 2. During error recovery we need to be able to tell the HBA that
    checksums read from disk should not be verified and converted to IP
    checksums.

 3. For error injection purposes we need to be able to write a bad guard
    tag to storage. Since the storage device only supports T10 CRC we
    need to be able to disable IP checksum conversion on the HBA.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-27 09:14:55 -06:00
Martin K. Petersen b1f0138857 block: Relocate bio integrity flags
Move flags affecting the integrity code out of the bio bi_flags and into
the block integrity payload.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-27 09:14:54 -06:00
Martin K. Petersen 3aec2f41a8 block: Add a disk flag to block integrity profile
So far we have relied on the app tag size to determine whether a disk
has been formatted with T10 protection information or not. However, not
all target devices provide application tag storage.

Add a flag to the block integrity profile that indicates whether the
disk has been formatted with protection information.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Sagi Grimberg <sagig@dev.mellanox.co.il>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-27 09:14:51 -06:00
Martin K. Petersen 1859308853 block: Clean up the code used to generate and verify integrity metadata
Instead of the "operate" parameter we pass in a seed value and a pointer
to a function that can be used to process the integrity metadata. The
generation function is changed to have a return value to fit into this
scheme.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-27 09:14:51 -06:00
Martin K. Petersen 3be91c4a3d block: Deprecate the use of the term sector in the context of block integrity
The protection interval is not necessarily tied to the logical block
size of a block device. Stop using the terms "sector" and "sectors".

Going forward we will use the term "seed" to describe the initial
reference tag value for a given I/O. "Interval" will be used to describe
the portion of the data buffer that a given piece of protection
information is associated with.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-27 09:14:50 -06:00
Martin K. Petersen 8492b68bc4 block: Remove integrity tagging functions
None of the filesystems appear interested in using the integrity tagging
feature. Potentially because very few storage devices actually permit
using the application tag space.

Remove the tagging functions.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-27 09:14:50 -06:00
Martin K. Petersen 180b2f95dd block: Replace bi_integrity with bi_special
For commands like REQ_COPY we need a way to pass extra information along
with each bio. Like integrity metadata this information must be
available at the bottom of the stack so bi_private does not suffice.

Rename the existing bi_integrity field to bi_special and make it a union
so we can have different bio extensions for each class of command.

We previously used bi_integrity != NULL as a way to identify whether a
bio had integrity metadata or not. Introduce a REQ_INTEGRITY to be the
indicator now that bi_special can contain different things.

In addition, bio_integrity(bio) will now return a pointer to the
integrity payload (when applicable).

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-27 09:14:46 -06:00
Christoph Hellwig fe052529e4 scsi: move blk_mq_start_request call earlier
Some ATA drivers need the dma drain size workaround, and thus need to
call blk_mq_start_request before the S/G mapping.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-22 12:00:08 -06:00
Christoph Hellwig 0152fb6b57 blk-mq: pass a reserved argument to the timeout handler
Allow blk-mq to pass an argument to the timeout handler to indicate
if we're timing out a reserved or regular command.  For many drivers
those need to be handled different.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-22 12:00:07 -06:00
Christoph Hellwig c8a446ad69 blk-mq: rename blk_mq_end_io to blk_mq_end_request
Now that we've changed the driver API on the submission side use the
opportunity to fix up the name on the completion side to fit into the
general scheme.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-22 12:00:07 -06:00
Christoph Hellwig e2490073cd blk-mq: call blk_mq_start_request from ->queue_rq
When we call blk_mq_start_request from the core blk-mq code before calling into
->queue_rq there is a racy window where the timeout handler can hit before we've
fully set up the driver specific part of the command.

Move the call to blk_mq_start_request into the driver so the driver can start
the request only once it is fully set up.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-22 12:00:07 -06:00
Christoph Hellwig bf57229745 blk-mq: remove REQ_END
Pass an explicit parameter for the last request in a batch to ->queue_rq
instead of using a request flag.  Besides being a cleaner and non-stateful
interface this is also required for the next patch, which fixes the blk-mq
I/O submission code to not start a time too early.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-09-22 12:00:07 -06:00
Jens Axboe 6d11fb454b Merge branch 'for-linus' into for-3.18/core
Moving patches from for-linus to 3.18 instead, pull in this changes
that will go to Linus today.
2014-09-22 11:57:32 -06:00
Linus Torvalds 2856db7099 virtio-rng corner case fixes, with cc:stable.
Survived a few days in linux-next.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUF4xtAAoJENkgDmzRrbjx2l8P/jIPBMKpsAxFgqsk72SZjsjj
 UcAIpFS/xoBOd+EoljjtXZ5CHysSTUnAEnV6L8u0i0gMICg36+03sMq4SprzPkGH
 dGcTW8i/Vz7IZOEusdgw9vFCq5Yynyxx480xG42+zPtWOSLJx+j2oXFGtDQPmlpJ
 qJzWvIwGDvn3SvpApUWs9xuNnLiPH6q41UbKqmviPRlBo0HBAXtDDjdwG1mflC1C
 e8li3YNEgs/zlBpZzxQ+Mt/CLtFfAJzNY7Tbgc6uxJvFReUd/qQUXRmTKxzktHAZ
 Kq/bFkdM4xNaH4A/yVRWuic8cXD7KnX5I4z17BFnWS/kaOnAe5RLT82L3QRK6KZD
 aiWC7xtqmKIo2Z5BSffYiv6VQnqILajtKKYtvXLw7rYgbCCcWGv07ZFWiCgO4WaT
 JRpozhTQtaLuLASKULK6lE/SY4QA5yNmJXJBEczVGv1k7evB3VZzPhjj+YjEmz4r
 qU+4EwiPBa1oLF0H26anCqJ0bcjhPF3XJKVqZlYarQOQwMprV81S9C6CblEQ7wMb
 swgSQRnwr73PQEM01MneJT+nUgtaUxqT0a4PbDccIE2UHcmareM+ped1vZgxIAf/
 kKpftyuiX1nS68yCbysO47oyFQS42xDIu7qmhC36yhFDGYlUJ8P/C5HHZnWjQ7pR
 qq8tQa4MnwpDJM22HvyP
 =8Byr
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux

Pull virtio fixes from Rusty Russell:
 "virtio-rng corner case fixes, with cc:stable.

  Survived a few days in linux-next"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  virtio-rng: skip reading when we start to remove the device
  virtio-rng: fix stuck of hot-unplugging busy device
2014-09-15 20:35:32 -07:00
Linus Torvalds 2324067fa9 regmap: Fix registers file debugfs
Ensure that the mode reported for the registers file in debugfs is
 accurate by marking it as read only when the define to enable writes has
 not been set.  This is on the edge of being a bug fix but it's debugfs
 and it makes it much easier for users to spot what's going wrong when
 they forget to enable writeability.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUF218AAoJECTWi3JdVIfQDToIAIPpC20A0Tb2+20pxUDO717d
 QOpLymMm9qe4Fwbb8wdzM/D3Usy4CG0vrZg8cFX2qZnfKrMPQy9/IQ6kh0SWMvpb
 5FQRBd8IkEIMxM9Ng+aAarJIS+xQTdgLDjFIapaBNp0DW5eT0ZaEMYri5Wt2Ut4u
 a33GtvXC8Raqbk6A7GpxijVKuApFVz+SH8HB/NqOyNZWXiXcRkZ6bWwgn7YeAqPy
 ABg+CAQhjwzXjZSn8Vbt6TNS7jhJzXx5v1wEsx4mcthj2GlBlFexvYDqYBM8VuGJ
 GO4F1EHCK/bVRGAgfy1EyeYPqEuedJleap5r8/0T6oFi4VDJ2z6funnt8QwwVDo=
 =NVI6
 -----END PGP SIGNATURE-----

Merge tag 'regmap-v3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull regmap fix from Mark Brown:
 "Fix registers file in debugfs

  Ensure that the mode reported for the registers file in debugfs is
  accurate by marking it as read only when the define to enable writes
  has not been set.  This is on the edge of being a bug fix but it's
  debugfs and it makes it much easier for users to spot what's going
  wrong when they forget to enable writeability"

* tag 'regmap-v3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Fix debugfs-file 'registers' mode
2014-09-15 16:20:56 -07:00
Linus Torvalds b92178623f Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
 "A few quirks for i8042/AT keyboards and a small device tree doc fix
  for Atmel Touchscreens"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: atmel_mxt_ts - fix merge in DT documentation
  Input: i8042 - also set the firmware id for MUXed ports
  Input: i8042 - add nomux quirk for Avatar AVIU-145A6
  Input: i8042 - add Fujitsu U574 to no_timeout dmi table
  Input: atkbd - do not try 'deactivate' keyboard on any LG laptops
2014-09-15 15:12:01 -07:00
Linus Torvalds 83373f7028 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro:
 "double iput() on failure exit in lustre, racy removal of spliced
  dentries from ->s_anon in __d_materialise_dentry() plus a bunch of
  assorted RCU pathwalk fixes"

The RCU pathwalk fixes end up fixing a couple of cases where we
incorrectly dropped out of RCU walking, due to incorrect initialization
and testing of the sequence locks in some corner cases.  Since dropping
out of RCU walk mode forces the slow locked accesses, those corner cases
slowed down quite dramatically.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  be careful with nd->inode in path_init() and follow_dotdot_rcu()
  don't bugger nd->seq on set_root_rcu() from follow_dotdot_rcu()
  fix bogus read_seqretry() checks introduced in b37199e
  move the call of __d_drop(anon) into __d_materialise_unique(dentry, anon)
  [fix] lustre: d_make_root() does iput() on dentry allocation failure
2014-09-14 17:37:36 -07:00
Linus Torvalds 5910cfdce3 Merge branch 'parisc-3.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller:
 "The most important patch is a new Light Weigth Syscall (LWS) for 8,
  16, 32 and 64 bit atomic CAS operations which is required in order to
  be able to implement the atomic gcc builtins on our platform.

  Other than that, we wire up the seccomp, getrandom and memfd_create
  syscalls, fixes a minor off-by-one bug and a wrong printk string"

* 'parisc-3.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Implement new LWS CAS supporting 64 bit operations.
  parisc: Wire up seccomp, getrandom and memfd_create syscalls
  parisc: dino: fix %d confusingly prefixed with 0x in format string
  parisc: sys_hpux: NUL terminator is one past the end
2014-09-14 12:28:08 -07:00
Linus Torvalds 02c1be3d0c NTB driver fixes for queue spread and buffer alignment. Also, update to
MAINTAINERS to reflect new e-mail address.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUFR7/AAoJEG5mS6x6i9Ij/84P/RniNXGFS4Kh+YuS5E6KdZ+C
 6rzpxlUkeEWkL+1Oy8xpLSJdWsCYajOmteP2V3ubQNlqzd0H/zN5W52/i4tIhVc1
 W7SXexh1tr18BeeiQZ0sX5IlBGzixJ9QDzsuf0cg5keX9RphVBNbm16d8DvW/Le3
 fj2LXyN+K82vy0GPZE0awi9TWfgj1oZobsKswjBp6Kz/z4gq11/rKQBeBvJbxSF/
 WttgvDWONHiuUyHuKYJq53KQ+B7Q6ANwtKfIvd2CpFb8dWlsYYMnr1eRmz4ZC5OM
 NDj2T4Dn5VrxqivmFJ+6d4EZK1agZXYXly+mkW21N2sMqL2/fq7b6CgbKzy76PLz
 sDc1e5WUTJu0AjfrtTQBKG/ZbxXxvpMsarO3rI3C2Oos9DUPnDG8eHsHeOSoZQXi
 tyUyIu4IyH4x7BWO//srU7l82YXWrrGN8+YU+GcLsMGDfsOaR4DDURUu9iYNX3cA
 RoGfhmb+H41X+zOnzgnioyGMcK6mwVvsPxIzZ4CwsSa64aWlud6vbxoJr+q6K2ap
 KEGxT78gy32Jw9wsfYUJKQpa5By7FdpGUDFk/rTt4ZYVU8TR1e+ShCz2l7Ny5Ioh
 u13/vZ/VGVG3+MFjZ5In02egYx3fPnbilbavGCNRQM31/GJxHSc5p8xnoPxLmg70
 tVREVtRX23KREqt38CBf
 =uhqP
 -----END PGP SIGNATURE-----

Merge tag 'ntb-3.17' of git://github.com/jonmason/ntb

Pull ntb driver bugfixes from Jon Mason:
 "NTB driver fixes for queue spread and buffer alignment.  Also, update
  to MAINTAINERS to reflect new e-mail address"

* tag 'ntb-3.17' of git://github.com/jonmason/ntb:
  ntb: Add alignment check to meet hardware requirement
  MAINTAINERS: update NTB info
  NTB: correct the spread of queues over mw's
2014-09-14 10:54:12 -07:00
Linus Torvalds 8ac19f0d90 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull ARM irq chip fixes from Thomas Gleixner:
 "Another pile of ARM specific irq chip fixlets:

   - off by one bugs in the crossbar driver
   - missing annotations
   - a bunch of "make it compile" updates

  I pulled the lot today from Jason, but it has been in -next for at
  least a week"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip: gic-v3: Declare rdist as __percpu pointer to __iomem pointer
  irqchip: gic: Make gic_default_routable_irq_domain_ops static
  irqchip: exynos-combiner: Fix compilation error on ARM64
  irqchip: crossbar: Off by one bugs in init
  irqchip: gic-v3: Tag all low level accessors __maybe_unused
  irqchip: gic-v3: Only define gic_peek_irq() when building SMP
2014-09-14 10:37:10 -07:00
Thomas Gleixner 938c04a870 irqchip fixes for v3.17
- gic-v3
     - SMP build fix
     - tag low level accessors __maybe_unused
     - declare rdist as __percpu
 
  - gic
     - staticize
 
  - crossbar
     - fix off-by-one bug
 
  - exynos-combiner
     - fix arm64 build error
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUFUvDAAoJEP45WPkGe8Znvz8P/0uRjF7iabU2yJjWnZypo96W
 ir62rSy9tn1ITqHoLh9fv98CPvwGtIit1Kjkg+heLFCR5KMao8h+gov6clMMaf8b
 wQQUK+eezfN0Uxx2nM0wbcdpsbjFWQnIxQjreoADcneoRqZu8UZIWIoBU/VAC1PP
 m4jaUFWCaktQVCtvC4/gG60Zi4GQO2ll08Ixh71BWmmoS4A08RQV8PjlNfDm4E7H
 VoQI4ALCui1hl+BRIZw35Em0EDd+u8fYJTMfqP7750rgtSF4bNDCjuZQ8dCmfwoo
 MbNHgOGDfAfIC7kK4X6IUxqveqaDxIYvjoeek/Xq9Vc7p8xY3G5rJ8asd8ZxHOd7
 oOEexLbQeg7dLwAqPXjASppE4M7VyhzOwX9KVBoQz1oXIGvYIBuZ3FeOFEOnZW1K
 YdPCIdggnFI7yrResVgIz09bMfi4f4AflUWFrBO4nMseOrTesx1myg2rymp9mjzN
 WVV4vOl+xn0EhU/G4bTtn8MVjKZ5DhREtS33lTlN84kZktcQAxXbV/TY2oLPtFXu
 f8lPZpEkEvBa32IYQoA85UYbYouVo5yl7OAYKIM/DpEmZYUEnsdFR6DwgX/t4ghz
 4JLnOb0GJbYNyziLtGwp4sMGkdFIQ264STov+5Rf/Q5EkUl6G13TWRbkOcXCrkvP
 sSNXMGwgVKDKlZImU/IA
 =3wED
 -----END PGP SIGNATURE-----

Merge tag 'irqchip-urgent-3.17' of git://git.infradead.org/users/jcooper/linux into irq/urgent

irqchip fixes for v3.17 from Jason Cooper

 - GIC/GICV3: Various fixlets
 - crossbar: Fix off-by-one bug
 - exynos-combiner: Fix arm64 build error
2014-09-14 15:20:54 +02:00
Dave Jiang 3cc5ba1938 ntb: Add alignment check to meet hardware requirement
The NTB translate register must have the value to be BAR size aligned.
This alignment check make sure that the DMA memory allocated has the
proper alignment. Another requirement for NTB to function properly with
memory window BAR size greater or equal to 4M is to use the CMA feature
in 3.16 kernel with the appropriate CONFIG_CMA_ALIGNMENT and
CONFIG_CMA_SIZE_MBYTES set.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
2014-09-14 00:10:38 -04:00
Jon Mason a1413cfbcb NTB: correct the spread of queues over mw's
The detection of an uneven number of queues on the given memory windows
was not correct.  The mw_num is zero based and the mod should be
division to spread them evenly over the mw's.

Signed-off-by: Jon Mason <jon.mason@intel.com>
2014-09-14 00:10:38 -04:00
Al Viro f77ced6637 [fix] lustre: d_make_root() does iput() on dentry allocation failure
double-free is a bad thing

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-09-13 22:13:39 -04:00
Linus Torvalds 186cec317e Fix a race in the DM cache target that caused dirty blocks to be marked
as clean.  This could cause no writeback to occur or spurious dirty
 block counts.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUEG6eAAoJEMUj8QotnQNabuUIALF4UnJov622hmGIcBC91j8m
 HRD1gNqu8hOLrtQEP+E7fdrDwHqyxAdL2kFN6nowbvuWmSVAUpQmsLCbXOvQOttx
 mELPFSOw2s1FpBbt63pIi8icAPCvzJYeR+jGN3m//b0eVFkmQ6xQGazhbd3JF+xP
 mHeEVNTF7acbUYDdfejF8kNJcUbpU63IF5UzRGOXMTNZ2DnFvEiBJHtgXJKiIkhN
 MhZNFgqeRdIppoDImnGJ9kQrWzoXGIpAXbxFbvjLofpr6HK2FxWLayeib0Jdm+Ze
 znHjSqyRRBhtszk/c8Rxqzy9dotMi3fI/O4pVkziSMYKCjtt9dCRFbP1Gkwaf3w=
 =6q2l
 -----END PGP SIGNATURE-----

Merge tag 'dm-3.17-fix2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm

Pull device mapper fix from Mike Snitzer:
 "Fix a race in the DM cache target that caused dirty blocks to be
  marked as clean.  This could cause no writeback to occur or spurious
  dirty block counts"

* tag 'dm-3.17-fix2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm cache: fix race causing dirty blocks to be marked as clean
2014-09-13 10:04:10 -07:00
Linus Torvalds 645cc09381 Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
 "A small collection of fixes for the current rc series.  This contains:

   - Two small blk-mq patches from Rob Elliott, cleaning up error case
     at init time.

   - A fix from Ming Lei, fixing SG merging for blk-mq where
     QUEUE_FLAG_SG_NO_MERGE is the default.

   - A dev_t minor lifetime fix from Keith, fixing an issue where a
     minor might be reused before all references to it were gone.

   - Fix from Alan Stern where an unbalanced queue bypass caused SCSI
     some headaches when it does a series of add/del on devices without
     fully registrering the queue.

   - A fix from me for improving the scaling of tag depth in blk-mq if
     we are short on memory"

* 'for-linus' of git://git.kernel.dk/linux-block:
  blk-mq: scale depth and rq map appropriate if low on memory
  Block: fix unbalanced bypass-disable in blk_register_queue
  block: Fix dev_t minor allocation lifetime
  blk-mq: cleanup after blk_mq_init_rq_map failures
  blk-mq: pass along blk_mq_alloc_tag_set return values
  blk-merge: fix blk_recount_segments
2014-09-13 09:39:55 -07:00
Linus Torvalds 471cff7c42 Char/Misc driver fix for 3.17-rc5
Here is one misc driver fix for 3.17-rc5.  It resolves a kernel oops
 that can happen in the lattice FPGA driver if the firmware isn't
 present on the system.
 
 It's been in the linux-next tree for a while now.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlQTOR4ACgkQMUfUDdst+ylXvACeKk2PemIzfaUoGTmgkGoOioX4
 BIsAoLE2jr9/ivh9r+0hkudNGnmBzVI4
 =PSdY
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fix from Greg KH:
 "Here is one misc driver fix for 3.17-rc5.  It resolves a kernel oops
  that can happen in the lattice FPGA driver if the firmware isn't
  present on the system.

  It's been in the linux-next tree for a while now"

* tag 'char-misc-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  Lattice ECP3 FPGA: Check firmware pointer
2014-09-12 12:00:49 -07:00
Linus Torvalds a6988b3343 Staging driver fixes for 3.17-rc5
Here are 3 tiny staging driver fixes for 3.17-rc5.  Two are fixes for
 the imx-drm driver, resolving issues that have been reported.  The other
 is a memory leak fix for the Android sync driver, due to changes that
 went into 3.17-rc1.
 
 All have been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlQTOKgACgkQMUfUDdst+ykAowCg1HK4Ur/8WFty0TQyaZiz3sTX
 j0sAnRBGo8Cqe1hPk5D5WADTdyuTYVtv
 =TvOc
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg KH:
 "Here are 3 tiny staging driver fixes for 3.17-rc5.

  Two are fixes for the imx-drm driver, resolving issues that have been
  reported.  The other is a memory leak fix for the Android sync driver,
  due to changes that went into 3.17-rc1.

  All have been in linux-next for a while"

* tag 'staging-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  android: fix reference leak in sync_fence_create
  imx-drm: imx-ldb: fix NULL pointer in imx_ldb_unbind()
  imx-drm: ipuv3-plane: fix ipu_plane_dpms()
2014-09-12 12:00:18 -07:00
Linus Torvalds 09db9d6340 TTY/Serial fixes for 3.17-rc5
Here are 3 patches for 3.17-rc5.  Two serial driver fixes that resolve
 some reported issues, and one new device id.
 
 All have been in linux-next just fine.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlQTNocACgkQMUfUDdst+ylSFQCfcarOgwBv2UaO9rR7IxrBXL5P
 z5AAnR5wa7Ip5UpfSyqhg67qg42ffq2J
 =G50/
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are 3 patches for 3.17-rc5.  Two serial driver fixes that resolve
  some reported issues, and one new device id.

  All have been in linux-next just fine"

* tag 'tty-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: xuartps: Fix tx_emtpy() callback
  tty/serial: at91: BUG: disable interrupts when !UART_ENABLE_MS()
  serial: 8250_dw: Add ACPI ID for Intel Braswell
2014-09-12 11:59:48 -07:00
Linus Torvalds 90a3c48fbf USB fixes for 3.17-rc5
Here are some USB and PHY fixes for 3.17-rc5.
 
 Nothing major here, just a number of tiny fixes for reported issues, and
 some new device ids as well.
 
 All have been tested in linux-next.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlQTNfsACgkQMUfUDdst+yk2ZwCfQOF5dNNui7FbtSWWy6h82CBN
 25YAoKXJtipABRJo5q+bztCIDYGk0PgA
 =4Ial
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some USB and PHY fixes for 3.17-rc5.

  Nothing major here, just a number of tiny fixes for reported issues,
  and some new device ids as well.

  All have been tested in linux-next"

* tag 'usb-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (46 commits)
  xhci: fix oops when xhci resumes from hibernate with hw lpm capable devices
  usb: xhci: Fix OOPS in xhci error handling code
  xhci: Fix null pointer dereference if xhci initialization fails
  storage: Add single-LUN quirk for Jaz USB Adapter
  uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check
  usb: chipidea: msm: Initialize PHY on reset event
  usb: chipidea: msm: Use USB PHY API to control PHY state
  usb: hub: take hub->hdev reference when processing from eventlist
  uas: Disable uas on ASM1051 devices
  usb: dwc2/gadget: avoid disabling ep0
  usb: dwc2/gadget: delay enabling irq once hardware is configured properly
  usb: dwc2/gadget: do not call disconnect method in pullup
  usb: dwc2/gadget: break infinite loop in endpoint disable code
  usb: dwc2/gadget: fix phy initialization sequence
  usb: dwc2/gadget: fix phy disable sequence
  uwb: init beacon cache entry before registering uwb device
  USB: ftdi_sio: Add support for GE Healthcare Nemo Tracker device
  USB: document the 'u' flag for usb-storage quirks parameter
  usb: host: xhci: fix compliance mode workaround
  usb: dwc3: fix TRB completion when multiple TRBs are started
  ...
2014-09-12 11:59:10 -07:00
Linus Torvalds 753a6cb7e4 IOMMU Fixes for Linux v3.17-rc4
Including:
 
 	* Two fixes for issues found by Coverity
 	* Various fixes for the ARM SMMU driver
 	* A warning fix for the FSL PAMU driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJUEvbvAAoJECvwRC2XARrjTbgQAKfSftH7StWiVgR3MyiO1JVy
 c0AAImQZ2rk7LO1R3xMxDn6DZD9sLTJNy9ogWr5YEyqMIVOdJt7hicrbgo0gGSS1
 zU8numZweMPD7tzvFk93GjsSEdy+T4PYpmR2KncYB2OQ3szMd7GqooKohp1P1BfC
 3fb9k9rjstnZXn0nKN6KxZ7QWaGme8e02cRz+5U+8N+AYHmV6ZcUumqig6KmYjuP
 AtyQz2Sj8v2VAnVr+3yOz/bBLBSRChfc1q9aFSrD3mLhTLlJ7uk0+4NviGsPbZww
 vGvWqy3w8aLzRDA9x+036FU6BoBQtaRdF/JCCPw8yOmfmUi6hA6kvTJbfgxIJPRK
 ZZM6KBdPWfo8y83dVXsT3NpineA622VhstZVT7NGczDVtimnxI6wjLlNUj0ve4g5
 AbaujBbnRtBclEWk23AjLpoiEA3iGw4putvCxFlWaclh0AEX0wx4W2scqCtF6hP5
 w3d6HiuYnB5lKl+IMb1jYvybRLc1CrXbnsJGsyjjfYMztv31pY3s0gO9xAQldLCV
 8Ah0njJ1GDKwXcmNUAgLcgrnmLIPat6IMT44vH15OYgjczsx0mN8ZChto24iOwx1
 ZrSfBWQ2IVylHyIuGrIe6C1+HR6ixrzcOaCXJaa7cTvo7vXWL6E8KZa4uth74Jq1
 VjmkefTgBjtrs656E+fr
 =jHx2
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v3.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:
 - two fixes for issues found by Coverity
 - various fixes for the ARM SMMU driver
 - a warning fix for the FSL PAMU driver

* tag 'iommu-fixes-v3.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/fsl: Fix warning resulting from adding PCI device twice
  iommu/arm-smmu: fix corner cases in address size calculations
  iommu/arm-smmu: fix decimal printf format specifiers prefixed with 0x
  iommu/arm-smmu: Do not access non-existing S2CR registers
  iommu/arm-smmu: fix s2cr and smr teardown on device detach from domain
  iommu/arm-smmu: remove pgtable_page_{c,d}tor()
  iommu/arm-smmu: fix programming of SMMU_CBn_TCR for stage 1
  iommu/arm-smmu: avoid calling request_irq in atomic context
  iommu/vt-d: Check return value of acpi_bus_get_device()
  iommu/core: Make iommu_group_get_for_dev() more robust
2014-09-12 09:26:49 -07:00
Linus Torvalds 5874cfed0b fbdev fixes for 3.17
Minor fixes for amba-clcd and video DT bindings.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUEre2AAoJEPo9qoy8lh71NCgP+weX6PBaOLzRqxW1n40uFPKX
 +e6YFwhgDNz4agDSI5gyc8DfZmMyN9v2kGF6tzoSc5+GIeEf3dksQ5xeeGI8f1Pc
 EpMs+dkjv+NJHs42sB9pcPruSkiuhqler8/ucjM/AEmXEF6UOvOa3mkg5Ub9vFLR
 zaqFDz2Pi1luopcDzUW7R3N1QRo8FwlmSAXggd4muoSYKjGPxf/Ufg7GFnJvidzs
 v65OyBo3OEkb8Clh7El096Y4giylbgtbS5ekwW4hMRZK+Ql8UNqldHIMnJMobYfb
 fmWyMxTSC+3G1WUdABVlczqDg6IITc7u98AVwXBbayfBcDK+0UN67TRhdyIEtXKC
 +9AvtCW4ZKndDYBSICfeOy6hNDWGWPABmOwdhmR6zlnsJ4lLj89XEUMmkfGRlNBx
 psW85WDQxzN2aEkXE1llrMUgmtVuiFEnLdmfzQ2H8SgZTUf4odfp+piU/6ohKZzJ
 P6vAD/+O7qiy8BRYnhRFtGjFdk5QqWeZOUcvWoMANTuHwBJEDD6sjxSsNhMR4DCy
 z039xMvfsDFs64An90eHqOM+osvvQtB0AkYWc2eIlaaI3I7g0iTvyVelACpbOmFj
 eqduFKCCTCLi02d+0ZvyYLBC9FANmluc4e94VHtaqbL4lw+ldgd18Z3em5q/Kgzf
 xtHhzHkZ3soIlK5qZJBc
 =u5mP
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-fixes-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux

Pull fbdev fixes from Tomi Valkeinen:
 "Minor fixes for amba-clcd and video DT bindings"

* tag 'fbdev-fixes-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
  video: ARM CLCD: Fix color model capabilities for DT platforms
  video: fix composite video connector compatible string
2014-09-12 09:11:37 -07:00
Linus Torvalds 850ebc0c0c Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "AST, i915, radeon and msm fixes, all over the place.

  All fixing build issues, regressions, oopses or failure to detect
  cards"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/ast: AST2000 cannot be detected correctly
  drm/ast: open key before detect chips
  drm/msm: don't crash if no msm.vram param
  drm/msm/hdmi: fix build break on non-CCF platforms
  drm/msm: Change nested function to static function
  drm/radeon/dpm: set the thermal type properly for special configs
  drm/radeon: reduce memory footprint for debugging
  drm/radeon: add connector quirk for fujitsu board
  drm/radeon: fix semaphore value init
  drm/radeon: only use me/pfp sync on evergreen+
  drm/i915: Wait for vblank before enabling the TV encoder
  drm/i915: Evict CS TLBs between batches
  drm/i915: Fix irq enable tracking in driver load
  drm/i915: Fix EIO/wedged handling in gem fault handler
  drm/i915: Prevent recursive deadlock on releasing a busy userptr
2014-09-12 08:27:40 -07:00
Pawel Moll e4cf39ea47 video: ARM CLCD: Fix color model capabilities for DT platforms
The DT-based panel capabilities selection was picking up
a subset of available modes based on hardware configuration.
This was wrong, as the capabilities describe available
memory models and adapt the display controller to them
that the RGB output is wired up correctly (as in: R and
B components are not swapped).

This patch fixes it by removing the unnecessary limitation.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-09-12 11:45:10 +03:00
Hans de Goede 266e43c4eb Input: i8042 - also set the firmware id for MUXed ports
So that firmware-id matching can be used with multiplexed aux ports too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-11 23:32:52 -07:00
Hans de Goede d2682118f4 Input: i8042 - add nomux quirk for Avatar AVIU-145A6
The sys_vendor / product_name are somewhat generic unfortunately, so this
may lead to some false positives. But nomux usually does no harm, where as
not having it clearly is causing problems on the Avatar AVIU-145A6.

https://bugzilla.kernel.org/show_bug.cgi?id=77391

Cc: stable@vger.kernel.org
Reported-by: Hugo P <saurosii@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-11 23:32:07 -07:00
Hans de Goede cc18a69c92 Input: i8042 - add Fujitsu U574 to no_timeout dmi table
https://bugzilla.kernel.org/show_bug.cgi?id=69731

Cc: stable@vger.kernel.org
Reported-by: Jason Robinson <mail@jasonrobinson.me>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-11 23:31:52 -07:00
Dmitry Torokhov c012067961 Input: atkbd - do not try 'deactivate' keyboard on any LG laptops
We are getting more and more reports about LG laptops not having
functioning keyboard if we try to deactivate keyboard during probe.
Given that having keyboard deactivated is merely "nice to have"
instead of a hard requirement for probing, let's disable it on all
LG boxes instead of trying to hunt down particular models.

This change is prompted by patches trying to add "LG Electronics"/"ROCKY"
and "LG Electronics"/"LW60-F27B" to the DMI list.

https://bugzilla.kernel.org/show_bug.cgi?id=77051

Cc: stable@vger.kernel.org
Reported-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Reported-by: Georgios Tsalikis <georgios@tsalikis.net>
Tested-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-11 23:31:36 -07:00
Y.C. Chen 83502a5d34 drm/ast: AST2000 cannot be detected correctly
Type error and cause AST2000 cannot be detected correctly

Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
Reviewed-by: Egbert Eich <eich@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-12 13:41:39 +10:00
Y.C. Chen 8f372e250a drm/ast: open key before detect chips
Some config settings like 3rd TX chips will not get correctly
if the extended reg is protected

Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
Reviewed-by: Egbert Eich <eich@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-12 13:41:27 +10:00
Linus Torvalds c73f6fdf2f Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph fixes from Sage Weil:
 "The main thing here is a set of three patches that fix a buffer
  overrun for large authentication tickets (sigh).

  There is also a trivial warning fix and an error path fix that are
  both regressions"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  libceph: do not hard code max auth ticket len
  libceph: add process_one_ticket() helper
  libceph: gracefully handle large reply messages from the mon
  rbd: fix error return code in rbd_dev_device_setup()
  rbd: avoid format-security warning inside alloc_workqueue()
2014-09-11 18:03:21 -07:00
Linus Torvalds 7ee2d2d671 xen: bug fixes for 3.17-rc4
- Fix for PVHVM suspend/resume and migration
 - Don't pointlessly retry certain ballooning ops
 - Fix gntalloc when grefs have run out.
 - Fix PV boot if KSALR is enable or very large modules are used.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAABAgAGBQJUEZw4AAoJEFxbo/MsZsTRoHkIAJ5h287Wer2Yf4ALlFI47Esl
 AhcgVKi7WMJ6mBQUk/xpbSS3MZEuTuPJVbuiabJwRaZk9vX7w8q08yrAD8SOrCwY
 6iGooaWEZ96P5DPI5fmWBuOgt5f2wfqzAp//wl/dK/kzr6Kw63huTXa0H0fmd8BY
 Gy13pN4JEPDyvjjZWFvDcrcEUA9eTcTaXQZisBUGuGictXySr5ovz9G3EKOtJP0D
 vkmDzApijFEEjJwZMGazgipng4mwh94fW4+7bs57s6iREpMzOJDTRKrl9suaXdza
 5HA2ed7Au/qL8IwiQAFGxQpMBqNQxEGerlFfPBhRPuGQ+Ek3/pZF3BTU56w/nt4=
 =y/Ol
 -----END PGP SIGNATURE-----

Merge tag 'stable/for-linus-3.17-b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull Xen bug fixes from David Vrabel:
 - fix for PVHVM suspend/resume and migration
 - don't pointlessly retry certain ballooning ops
 - fix gntalloc when grefs have run out.
 - fix PV boot if KSALR is enable or very large modules are used.

* tag 'stable/for-linus-3.17-b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  x86/xen: don't copy bogus duplicate entries into kernel page tables
  xen/gntalloc: safely delete grefs in add_grefs() undo path
  xen/gntalloc: fix oops after runnning out of grant refs
  xen/balloon: cancel ballooning if adding new memory failed
  xen/manage: Always freeze/thaw processes when suspend/resuming
2014-09-11 16:52:29 -07:00
Greg Kroah-Hartman e2c60989dc usb: fixes for v3.17-rc4
Some late fixes for dwc3 so we have something more stable
 on v3.17-final.
 
 Most bugs have been there for quite a while and nobody
 noticed, except for TRB completion when multiple TRBs
 are started.
 
 Patches were tested on AM437x SK and J6 EVM and are passing
 my tests.
 
 Signed-of-by: Felipe Balbi <balbi@ti.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUEhtjAAoJEIaOsuA1yqREmoIP/AxYZMK/EU06WaOIGkKr0JA4
 nAJLVIivJva4A6M4Pln8fXnwOj4Nfyo25CqU51czyAKEn2qBjStXOe5Tr6xiFU9e
 omlhHFltnDbIukDpqX0lJitFbHxZU7mKl4JZ3+XxEIVvYNS4eGhd4cmWC7Lin9Jy
 gEaIhErnRUofx9/+Mdn+E0ReV0ZY1ZM771CbI+Bzl/bL5cppqEYuegW8APguYVoF
 /NyHnQ6CL0wjcXcekqIsErlhNUqa9Y1YNUqfMBJdoWSpLCEb55yH3SLES+hpiYT7
 RjD39wmyCcn6FxUlcv2n0kAEcLJPFjXswHzexnMZetGAcSxb2A3oMN7WbU437b2m
 PXigtEcTKq6Nn73bpJu+z3WHElpYLICurtU2zjZt6LxD6MKhLWVJ7LdKpPu941uy
 D6AxGUSSYrTwTId5pzx0iqmyKttQbWHWBim0950/XgF6KC8uV0ativ2K0GO+C8ao
 PzUQOprcFHaW+hE5RHsGdr+PWHHriFpsAx6CYZDpgXmdBZcFu8jFZBEf6KJu/fDZ
 ZrLX3c4F3SBTtYQPogf2f2Ta36V91m3iUhcotK45YXsFvqc6sUbA+A1wfgXOAuzO
 cqR18TEN+qv3VNvcitc0b6jznIsbvcFPK3c7FmAPS4fi9zMGIGBdad9FyFObly5R
 aLvfAMPOcJcF+BUVk1bF
 =CdSO
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v3.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v3.17-rc4

Some late fixes for dwc3 so we have something more stable
on v3.17-final.

Most bugs have been there for quite a while and nobody
noticed, except for TRB completion when multiple TRBs
are started.

Patches were tested on AM437x SK and J6 EVM and are passing
my tests.

Signed-of-by: Felipe Balbi <balbi@ti.com>
2014-09-11 15:08:14 -07:00
Mathias Nyman 96044694b8 xhci: fix oops when xhci resumes from hibernate with hw lpm capable devices
Resuming from hibernate (S4) will restart and re-initialize xHC.
The device contexts are freed and will be re-allocated later during device reset.

Usb core will disable link pm in device resume before device reset, which will
try to change the max exit latency, accessing the device contexts before they are re-allocated.

There is no need to zero (disable) the max exit latency when disabling hw lpm
for a freshly re-initialized xHC. So check that device context exists before
doing anything. The max exit latency will be set again after device reset when usb core
enables the link pm.

Reported-by: Imre Deak <imre.deak@intel.com>
Tested-by: Imre Deak <imre.deak@intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:23:52 -07:00
Al Cooper 0eda06c7c1 usb: xhci: Fix OOPS in xhci error handling code
The xhci driver will OOPS on resume from S2/S3 if dma_alloc_coherent()
is out of memory. This is a result of two things:
1. xhci_mem_cleanup() in xhci-mem.c free's xhci->lpm_command if
it's not NULL, but doesn't set it to NULL after the free.
2. xhci_mem_cleanup() is called twice on resume, once for normal
restart and once from xhci_mem_init() if dma_alloc_coherent() fails,
resulting in a free of xhci->lpm_command that has already been freed.
The fix is to set xhci->lpm_command to NULL after freeing it.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:23:52 -07:00
Mathias Nyman c207e7c50f xhci: Fix null pointer dereference if xhci initialization fails
If xhci initialization fails before the roothub bandwidth
domains (xhci->rh_bw[i]) are allocated it will oops when
trying to access rh_bw members in xhci_mem_cleanup().

Reported-by: Manuel Reimer <manuel.reimer@gmx.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:23:52 -07:00
Mark c66f1c62e8 storage: Add single-LUN quirk for Jaz USB Adapter
The Iomega Jaz USB Adapter is a SCSI-USB converter cable. The hardware
seems to be identical to e.g. the Microtech XpressSCSI, using a Shuttle/
SCM chip set. However its firmware restricts it to only work with Jaz
drives.

On connecting the cable a message like this appears four times in the log:
 reset full speed USB device number 4 using uhci_hcd

That's non-fatal but the US_FL_SINGLE_LUN quirk fixes it.

Signed-off-by: Mark Knibbs <markk@clara.co.uk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:22:25 -07:00
Hans de Goede a79e5bc53a uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: stable@vger.kernel.org # 3.16
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:21:43 -07:00