Commit graph

481793 commits

Author SHA1 Message Date
Antti Palosaari
c3a80cd024 [media] af9033: return 0.1 dB DVBv3 SNR for AF9030 family
Previous patch changed both AF9030 and IT9130 SNR reporting from
dB to relative. Restore AF9030 to old behavior as it has been always
returning 0.1 dB value. Leave IT9130 relative as old IT9130 was
returning relative values.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-04 18:20:51 -02:00
Bimow Chen
6d03f6a875 [media] af9033: fix DVBv3 snr value not correct issue
Snr returns value not correct. Fix it.

Signed-off-by: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-04 18:20:35 -02:00
Antti Palosaari
1620d22184 [media] af9033: improve read_signal_strength error handling slightly
Check return status after each register access routine and avoid
masking return status values.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-04 18:20:06 -02:00
Antti Palosaari
0b0d96281f [media] af9033: fix AF9033 DVBv3 signal strength measurement
Previous patch changes used signal strength firmware register from
0x800048 to 0x80004a in case of AF9033/AF9035 chip. In practice
reported values were running upside-down, when RR strength increases
reported value decreases and vice versa. That is because of 0x80004a
returns values that are dBm scale, but negative RF strength dBm
returned as positive number.

0x800048 returns 0-100, like percentage
0x80004a returns 0-255 dBm, without a negative sign

So restore old measurement now.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-04 18:19:27 -02:00
Bimow Chen
3adec27242 [media] af9033: fix DVBv3 signal strength value not correct issue
Register 0x800048 is not dB measure but relative scale. Fix it and conform to NorDig specifications.

Signed-off-by: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-04 18:19:12 -02:00
Antti Palosaari
45c3cbb184 [media] si2168: do not print device is warm every-time when opened
It repeated "found a 'Silicon Labs Si2168' in warm state" everytime
when device was opened. Message is aimed to point out firmware is
downloaded, up and running. So print it only in case firmware download
is performed.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-04 18:18:13 -02:00
Linus Torvalds
a1cff6e25e Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal
Pull thermal fixes from Eduardo Valentin:
 "Specifics:
   - a few code fixes improving the Exynos code base.  They remove dead
     and unreachable code.  No functional changes here
   - in Exynos code base, fixes regarding the right usage of features
     (TRIMINFO and TRIMRELOAD)
   - documentation of RCAR thermal
   - fix in the of-thermal, regarding the proper usage of of-APIs
   - fixes on thermal-core, removal of unreachable code"

[ Eduardo is sending the thermal fixes on behalf of Rui Zhang this time.
  Rui is currently unable to send pull requests due to troubles with his
  machine and he's currently in a business trip ]

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
  Thermal:Remove usless if(!result) before return tz
  thermal: exynos: fix IRQ clearing on TMU initialization
  thermal: fix multiple disbalanced device node counters
  thermal: rcar: Add binding docs for new R-Car Gen2 SoCs
  thermal: exynos: Add support for TRIM_RELOAD feature at Exynos3250
  thermal: exynos: Add support for many TRIMINFO_CTRL registers
  thermal: samsung: Exynos5260 and Exynos5420 should not use TRIM_RELOAD flag
  thermal: exynos: remove identical values from exynos*_tmu_registers structures
  thermal: exynos: remove redundant pdata checks from exynos_tmu_control()
  thermal: exynos: cache non_hw_trigger_levels in pdata
  thermal: exynos: simplify temp_to_code() and code_to_temp()
  thermal: exynos: remove redundant threshold_code checks from exynos_tmu_initialize()
  thermal: exynos: remove redundant pdata checks from exynos_tmu_initialize()
  thermal: exynos: remove dead code for HW_MODE calibration
  thermal: exynos: remove unused struct exynos_tmu_registers entries
2014-11-04 11:57:27 -08:00
Linus Torvalds
9319bc1ce0 platform-drivers-x86 for 3.18-2
Quirks and DMI match additions.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUWHINAAoJEKbMaAwKp364uGUH/jfm+247uKXYGUy/FfbpxGNt
 3RQwswAWmg/3urVmMeIQhQntc/rMXwPh0knhyrCXgL9ZdCCTfJQ1ChT67mPoVcEN
 moJq82RrRwq5jKPYgoj4iVSBvyMY1c4Ydht/9jyzhHIUE7ro4P8lOEKw6BCFCctm
 l32zi4rqt3o5ES2IMV9vRW76Y4Z47ijgHKvi2mWwjgva75aGlaPm6IDoU1qpaMG0
 wDVcwvV66YeELon5Uh8gLQzBLZy5ctMTyCALwiLF89I3BZw9/OBy+gLxDaLq8jCW
 8ZBKqM7+2ZQd6kc3Tgi1jygdpFTfWaDtof9AsdzeqRYljP3ZCI4AUU2sjbZ1jvY=
 =WJnO
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v3.18-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86

Pull x86 platform drievr updates from Darren Hart:
 "A short list of patches applying quirks and new DMI matches.  These
  pass my basic build tests and have spent 4 days in linux-next"

* tag 'platform-drivers-x86-v3.18-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
  quirk for Lenovo Yoga 3: no rfkill switch
  acer-wmi: Add acpi_backlight=video quirk for the Acer KAV80
  samsung-laptop: Add broken-acpi-video quirk for NC210/NC110
  asus-nb-wmi: Add wapf4 quirk for the X550VB
  toshiba_acpi: Add Toshiba TECRA A50-A to the alt keymap dmi list
2014-11-04 11:52:45 -08:00
Linus Torvalds
8a97577a59 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Pull powerpc fixes from Michael Ellerman:
 "Some more powerpc fixes if you please"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
  powerpc: use device_online/offline() instead of cpu_up/down()
  powerpc/powernv: Properly fix LPC debugfs endianness
  powerpc: do_notify_resume can be called with bad thread_info flags argument
  powerpc/fadump: Fix endianess issues in firmware assisted dump handling
  powerpc: Fix section mismatch warning
2014-11-04 11:18:29 -08:00
Linus Torvalds
1efa82ecb6 Running the ftracetests on a machine that had the debugfs file system
mounted in two locations caused the ftracetests to fail. This is because
 the ftracetests script does a grep of the /proc/mounts file to find
 where the debugfs file system is mounted. If it is mounted twice, then
 the grep returns two lines instead of just one. This causes the ftracetests
 to get confused and fail.
 
 Use "head -1" to only return the first mount point for debugfs.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUV812AAoJEEjnJuOKh9ldquIIAK1DeSn6QQrA2qytqZmaW/dh
 M1QiG+Ot5Qh7+qli7Sun5E58jbMvclPCiHrtr44KEGDSzABrjjv8TnqCwI9XKfiO
 hn9IGFy2gCU7jNMdE+1MRPwykVwLjYBZLaLyxY/WvwJTtlPORezq7KTdvUPgobCN
 hQfxPyowofbGTsV9+75olSo9ercOKGv4NSopY2fj6fag185emUDLT4GGWGsWh/1j
 heUhe4vYuuB43YAVgk+XeJEOQ8u4uME9lTocuykISazXupZo4+RfZzQPziD5Q/Mt
 LuOg4zUpG7fX2AkECXvTR055CcCVVHKUTBZppIpeKqfAXBU6GeoaP1AM2CDx72I=
 =jKWc
 -----END PGP SIGNATURE-----

Merge tag 'ftracetest-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull ftracetest fix from Steven Rostedt:
 "Running the ftracetests on a machine that had the debugfs file system
  mounted in two locations caused the ftracetests to fail.  This is
  because the ftracetests script does a grep of the /proc/mounts file to
  find where the debugfs file system is mounted.  If it is mounted
  twice, then the grep returns two lines instead of just one.  This
  causes the ftracetests to get confused and fail.

  Use "head -1" to only return the first mount point for debugfs"

* tag 'ftracetest-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  ftracetest: Take the first debugfs mount found
2014-11-04 11:12:25 -08:00
Chris Mason
6e5aafb274 Btrfs: fix kfree on list_head in btrfs_lookup_csums_range error cleanup
If we hit any errors in btrfs_lookup_csums_range, we'll loop through all
the csums we allocate and free them.  But the code was using list_entry
incorrectly, and ended up trying to free the on-stack list_head instead.

This bug came from commit 0678b6185

btrfs: Don't BUG_ON kzalloc error in btrfs_lookup_csums_range()

Signed-off-by: Chris Mason <clm@fb.com>
Reported-by: Erik Berg <btrfs@slipsprogrammoer.no>
cc: stable@vger.kernel.org # 3.3 or newer
2014-11-04 06:59:04 -08:00
Ralf Baechle
0097761013 MIPS: Fix strnlen_user() return value in case of overlong strings.
We were returning maxlen like the userland strnlen if no '\0' character
was encountered while the kernel version is expected to return a value
larger than maxlen.  Fixed to return maxlen + 1.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-11-04 12:46:33 +01:00
Fabio Estevam
89fbec5b97 ARM: imx: Fix the removal of CONFIG_SPI option
Since 64546e9fe3 ("ARM: imx_v6_v7_defconfig updates") and commit
0650f855d2 ("ARM: imx_v4_v5_defconfig: Select CONFIG_IMX_WEIM") CONFIG_SPI
selection was dropped by savedefconfig for imx_v4_v5_defconfig and
imx_v6_v7_defconfig.

In order to keep the same behaviour as previous kernel versions and avoid
regressions, let's add CONFIG_SPI option back.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2014-11-04 19:00:01 +08:00
Alexander Stein
5cc7b04740 spi: fsl-dspi: Fix CTAR selection
There are only 4 CTAR registers (CTAR0 - CTAR3) so we can only use the
lower 2 bits of the chip select to select a CTAR register.
SPI_PUSHR_CTAS used the lower 3 bits which would result in wrong bit values
if the chip selects 4/5 are used. For those chip selects SPI_CTAR even
calculated offsets of non-existing registers.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-11-04 10:52:08 +00:00
Grant Likely
a87fa1d81a of: Fix overflow bug in string property parsing functions
The string property read helpers will run off the end of the buffer if
it is handed a malformed string property. Rework the parsers to make
sure that doesn't happen. At the same time add new test cases to make
sure the functions behave themselves.

The original implementations of of_property_read_string_index() and
of_property_count_strings() both open-coded the same block of parsing
code, each with it's own subtly different bugs. The fix here merges
functions into a single helper and makes the original functions static
inline wrappers around the helper.

One non-bugfix aspect of this patch is the addition of a new wrapper,
of_property_read_string_array(). The new wrapper is needed by the
device_properties feature that Rafael is working on and planning to
merge for v3.19. The implementation is identical both with and without
the new static inline wrapper, so it just got left in to reduce the
churn on the header file.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Darren Hart <darren.hart@intel.com>
Cc: <stable@vger.kernel.org>  # v3.3+: Drop selftest hunks that don't apply
2014-11-04 10:19:48 +00:00
Stefan Agner
c72c553249 ARM: imx: clk-vf610: define PLL's clock tree
So far, the required PLL's (PLL1/PLL2/PLL5) have been initialized
by boot loader and the kernel code defined fixed rates according
to those default configurations. Beginning with the USB PLL7 the
code started to initialize the PLL's itself (using imx_clk_pllv3).

However, since commit dc4805c2e7
(ARM: imx: remove ENABLE and BYPASS bits from clk-pllv3 driver)
imx_clk_pllv3 no longer takes care of the ENABLE and BYPASS bits,
hence the USB PLL were not configured correctly anymore.

This patch not only fixes those USB PLL's, but also makes use of
the imx_clk_pllv3 for all PLL's and alignes the code with the PLL
support of the i.MX6 series.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2014-11-04 13:40:14 +08:00
Linus Torvalds
980d0d51b1 Pin control fixes for the v3.18 series:
- Two fixes for the Baytrail driver affecting IRQs and
   output state in sysfs
 - Use the linux-gpio mailing list also for pinctrl patches
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUV5SiAAoJEEEQszewGV1z5xAQAKEGADd/Y6Qaz/HLORf5ffjg
 R0Jkwy4B6t4nF5cjd1dy72jRWk+tx0bYFHSbtpfxYcyXJK31gYNsGxEng3gZrwOw
 dPKzivZP4FtFem0XQsXq+V6s3wzXqjl4NLSpIFANRpobpqmfov7oyaXaNkPCM7Kw
 Qtb49qPnQk2E7h/HlREE+eNRDylF6ijthmwFxw0upxQ0cZY+JXdbF2SolRM6D+cy
 Bn5lqvsZ1kDOUdwNAnmZxQv/lbtn/m1j0hHFbZItvujA6e899TAEYZSmWiGAECvx
 B3PFB5ivO+fqhi1xtuW0CqUYeUW12MIB5yZleVVn2tmBBWMcAlGV+7PXuyZW+Wwm
 ljuiO8k6jjfS5cUrf3hu9rkBz+IgTbECZCKi5ItwlzLFIHbIEVHFzaOS+RoVrUlT
 mm8cXI64IackRPHSnCdlvVVLC3M46I5DyEfmepnjY4NDRtf+icxNhbOJlK1+DCk5
 AKbfJYMnyNcgGxtct9fSCAg48n0O/hHIvqJQ9lfPxUYeYt1zo4m5SoQVDBfW86fw
 +4fZrlVDIZX6FvREJBJ91fIsgB327p5eGIBcmVpedNcCXr2Sn0e9fVKs4VEPtlf/
 3bNJJDsiBIL3SGMIwlND/uCZBy09pcbjDPLjuPRQCr0zAtajYjwn6teWG6ykS6G+
 /sn8jbBctyjf+9fOTEMF
 =dbx2
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v3.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin-control fixes from Linus Walleij:
 "This kernel cycle has been calm for both pin control and GPIO so far
  but here are three pin control patches for you anyway, only really
  dealing with Baytrail:

   - Two fixes for the Baytrail driver affecting IRQs and output state
     in sysfs
   - Use the linux-gpio mailing list also for pinctrl patches"

* tag 'pinctrl-v3.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: baytrail: show output gpio state correctly on Intel Baytrail
  pinctrl: use linux-gpio mailing list
  pinctrl: baytrail: Clear DIRECT_IRQ bit
2014-11-03 21:06:22 -08:00
Linus Torvalds
f3ed88a6bc Merge branch 'fixes-for-v3.18' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull CMA and DMA-mapping fixes from Marek Szyprowski:
 "This contains important fixes for recently introduced highmem support
  for default contiguous memory region used for dma-mapping subsystem"

* 'fixes-for-v3.18' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
  mm, cma: make parameters order consistent in func declaration and definition
  mm: cma: Use %pa to print physical addresses
  mm: cma: Ensure that reservations never cross the low/high mem boundary
  mm: cma: Always consider a 0 base address reservation as dynamic
  mm: cma: Don't crash on allocation if CMA area can't be activated
2014-11-03 21:01:04 -08:00
Peter Chen
b2108f1e51 usb: core: notify disconnection when core detects disconnect
It is safe to call notify disconnect when the usb core
thinks the device is disconnected.

This commit also fixes one bug found at below situation:
we have not enabled usb wakeup, we do system suspend when
there is an usb device at the port, after suspend, we plug out
the usb device, then plug in device again. At that time,
the nofity disconnect was not called at current code, as
the controller doesn't know the usb device was disconnected
during the suspend, but USB core knows the port has changed
during that periods.

So to fix this problem, and let the usb core call notify disconnect.

Cc: 3.17+ <stable@vger.kernel.org>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 19:29:55 -08:00
Tony Zheng
01ed67dc70 usb: core: need to call usb_phy_notify_connect after device setup
Since we notify disconnecting based on the usb device is existed
(port_dev->child, the child device at roothub is not NULL), we
need to notify connect after device has been registered.

This fixes a bug that do fast plug in/out test, and the notify_disconnect
is not called due to roothub child is NULL and the enumeration has failed.

Cc: v3.17+ <stable@vger.kernel.org>
Signed-off-by: Tony Zheng <Tony.Zheng@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:48:45 -08:00
Hans de Goede
d1d9548256 uas: Add US_FL_NO_ATA_1X quirk for 2 more Seagate models
These drives hang when receiving ATA12 commands, so set the US_FL_NO_ATA_1X
quirk to filter these out.

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-11-03 15:48:45 -08:00
Oliver Neukum
b45abacde3 xhci: no switching back on non-ULT Haswell
The switch back is limited to ULT even on HP. The contrary
finding arose by bad luck in BIOS versions for testing.
This fixes spontaneous resume from S3 on some HP laptops.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:48:45 -08:00
Adel Gadllah
d749947561 USB: quirks: enable device-qualifier quirk for yet another Elan touchscreen
Yet another device affected by this.

Tested-by: Kevin Fenzi <kevin@scrye.com>
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:26:32 -08:00
Adel Gadllah
876af5d454 USB: quirks: enable device-qualifier quirk for another Elan touchscreen
Currently this quirk is enabled for the model with the device id 0x0089, it
is needed for the 0x009b model, which is found on the Fujitsu Lifebook u904
as well.

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:26:16 -08:00
Mark Einon
2e069232fd MAINTAINERS: Remove duplicate entry for usbip driver
The usbip driver was moved out of staging in 3.17-rc3 but the MAINTAINERS file
still has the old staging entry as well as the new one. Remove the old entry.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:26:16 -08:00
Luis Henriques
ec5633ba67 usb: storage: fix build warnings !CONFIG_PM
Functions fw5895_init() and config_autodelink_before_power_down() are used
only when CONFIG_PM is defined.

drivers/usb/storage/realtek_cr.c:699:13: warning: 'fw5895_init' defined but not used [-Wunused-function]
drivers/usb/storage/realtek_cr.c:629:12: warning: 'config_autodelink_before_power_down' defined but not used [-Wunused-function]

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:26:16 -08:00
Sylwester Nawrocki
cd6e245a2d usb: Remove references to non-existent PLAT_S5P symbol
The PLAT_S5P Kconfig symbol was removed in commit d78c16ccde
("ARM: SAMSUNG: Remove remaining legacy code"). There are still
some references left, fix that by replacing them with ARCH_S5PV210.

Fixes: d78c16ccde ("ARM: SAMSUNG: Remove remaining legacy code")
Reported-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:26:16 -08:00
Hans de Goede
673029fe9c uas: Add NO_ATA_1X for VIA VL711 devices
Just like some Seagate enclosures, these devices do not seem to grok ata
pass through commands.

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-11-03 15:26:15 -08:00
Hans de Goede
2391eacbd0 xhci: Disable streams on Asmedia 1042 xhci controllers
Streams seem to be broken on the Asmedia 1042. An uas capable Seagate disk
which is known to work fine with other controllers causes the system to freeze
when connected over usb-3 with this controller, where as it works fine with
uas in usb-2 ports, indicating a problem with streams.

This is a bit bigger hammer then I would like to use for this, but for now it
will have to make do. I've ordered a pci-e usb controller card with an Asmedia
1042, once that arrives I'll try to get streams to work (with a quirk flag if
necessary) and then we can re-enable them. For now this at least makes uas
capable disk enclosures work again by forcing fallback to the usb-storage
driver.

Reported-by: Bogdan Mihalcea <bogdan.mihalcea@infim.ro>
Cc: Bogdan Mihalcea <bogdan.mihalcea@infim.ro>
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-11-03 15:26:15 -08:00
Dan Carpenter
cee2448e5b USB: HWA: fix a warning message
We wanted to print the version as (major).(minor) but because the shift
operation is higher precedence than the mask then we print
(minor).(minor).

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:26:15 -08:00
Hans de Goede
aee0ce3ae7 uas: Add US_FL_NO_ATA_1X quirk for 1 more Seagate model
These drives hang when receiving ATA12 commands, so set the US_FL_NO_ATA_1X
quirk to filter these out.

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-11-03 15:26:15 -08:00
Alan Stern
93c9bf4d18 usb-storage: handle a skipped data phase
Sometimes mass-storage devices using the Bulk-only transport will
mistakenly skip the data phase of a command.  Rather than sending the
data expected by the host or sending a zero-length packet, they go
directly to the status phase and send the CSW.

This causes problems for usb-storage, for obvious reasons.  The driver
will interpret the CSW as a short data transfer and will wait to
receive a CSW.  The device won't have anything left to send, so the
command eventually times out.

The SCSI layer doesn't retry commands after they time out (this is a
relatively recent change).  Therefore we should do our best to detect
a skipped data phase and handle it promptly.

This patch adds code to do that.  If usb-storage receives a short
13-byte data transfer from the device, and if the first four bytes of
the data match the CSW signature, the driver will set the residue to
the full transfer length and interpret the data as a CSW.

This fixes Bugzilla #86611.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Tested-by: Paul Osmialowski <newchief@king.net.pl>
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:26:15 -08:00
Hans de Goede
90a646c770 usb: Do not allow usb_alloc_streams on unconfigured devices
This commit fixes the following oops:

[10238.622067] scsi host3: uas_eh_bus_reset_handler start
[10240.766164] usb 3-4: reset SuperSpeed USB device number 3 using xhci_hcd
[10245.779365] usb 3-4: device descriptor read/8, error -110
[10245.883331] usb 3-4: reset SuperSpeed USB device number 3 using xhci_hcd
[10250.897603] usb 3-4: device descriptor read/8, error -110
[10251.058200] BUG: unable to handle kernel NULL pointer dereference at  0000000000000040
[10251.058244] IP: [<ffffffff815ac6e1>] xhci_check_streams_endpoint+0x91/0x140
<snip>
[10251.059473] Call Trace:
[10251.059487]  [<ffffffff815aca6c>] xhci_calculate_streams_and_bitmask+0xbc/0x130
[10251.059520]  [<ffffffff815aeb5f>] xhci_alloc_streams+0x10f/0x5a0
[10251.059548]  [<ffffffff810a4685>] ? check_preempt_curr+0x75/0xa0
[10251.059575]  [<ffffffff810a46dc>] ? ttwu_do_wakeup+0x2c/0x100
[10251.059601]  [<ffffffff810a49e6>] ? ttwu_do_activate.constprop.111+0x66/0x70
[10251.059635]  [<ffffffff815779ab>] usb_alloc_streams+0xab/0xf0
[10251.059662]  [<ffffffffc0616b48>] uas_configure_endpoints+0x128/0x150 [uas]
[10251.059694]  [<ffffffffc0616bac>] uas_post_reset+0x3c/0xb0 [uas]
[10251.059722]  [<ffffffff815727d9>] usb_reset_device+0x1b9/0x2a0
[10251.059749]  [<ffffffffc0616f42>] uas_eh_bus_reset_handler+0xb2/0x190 [uas]
[10251.059781]  [<ffffffff81514293>] scsi_try_bus_reset+0x53/0x110
[10251.059808]  [<ffffffff815163b7>] scsi_eh_bus_reset+0xf7/0x270
<snip>

The problem is the following call sequence (simplified):

1) usb_reset_device
2)  usb_reset_and_verify_device
2)   hub_port_init
3)    hub_port_finish_reset
3)     xhci_discover_or_reset_device
        This frees xhci->devs[slot_id]->eps[ep_index].ring for all eps but 0
4)    usb_get_device_descriptor
       This fails
5)   hub_port_init fails
6)  usb_reset_and_verify_device fails, does not restore device config
7)  uas_post_reset
8)   xhci_alloc_streams
      NULL deref on the free-ed ring

This commit fixes this by not allowing usb_alloc_streams to continue if
the device is not configured.

Note that we do allow usb_free_streams to continue after a (logical)
disconnect, as it is necessary to explicitly free the streams at the xhci
controller level.

Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:26:15 -08:00
Jim Paris
24cb4502c9 cdc-acm: ensure that termios get set when the port is activated
The driver wasn't properly configuring the hardware for the current
termios settings under all conditions.  Ensure that termios are
written to the device when the port is activated.

Signed-off-by: Jim Paris <jim@jtan.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:26:15 -08:00
Johan Hovold
cf84a691a6 USB: cdc-acm: add device id for GW Instek AFG-2225
Add device-id entry for GW Instek AFG-2225, which has a byte swapped
bInterfaceSubClass (0x20).

Reported-by: Karl Palsson <karlp@tweak.net.au>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:26:15 -08:00
Linus Torvalds
ce1928da84 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull ceph fixes from Sage Weil:
 "There is a GFP flag fix from Mike Christie, an error code fix from
  Jan, and fixes for two unnecessary allocations (kmalloc and workqueue)
  from Ilya.  All are well tested.

  Ilya has one other fix on the way but it didn't get tested in time"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  libceph: eliminate unnecessary allocation in process_one_ticket()
  rbd: Fix error recovery in rbd_obj_read_sync()
  libceph: use memalloc flags for net IO
  rbd: use a single workqueue for all devices
2014-11-03 15:04:26 -08:00
Yao Dongdong
1401586056 Thermal:Remove usless if(!result) before return tz
result is always zero when comes here.

Signed-off-by: Yao Dongdong <yaodongdong@huawei.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2014-11-03 18:59:50 -04:00
Linus Torvalds
f4ca536f71 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k update from Geert Uytterhoeven.

Just wiring up the bpf system call.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Wire up bpf
2014-11-03 14:09:33 -08:00
Linus Torvalds
2084becbe1 ARM: SoC fixes for 3.8-rc3
A surprisingly small batch of fixes for -rc3. Suspiciously small, I'd say.
 
 Anyway, most of this are a few defconfig updates. Some for omap to deal
 with kernel binary size (moving ipv6 to module, etc). A larger one for
 socfpga that refreshes with some churn, but also turns on a few options
 that makes the newly-added board in my bootfarm usable for testing.
 
 OMAP3 will also now warn when booted with legacy (non-DT) boot protocols,
 hopefully encouraging those who still care about some of those platforms
 to submit DT support and report bugs where needed. Nothing stops working
 though, this is just to warn for future deprecation.
 
 Beyond this, very few actual bugfixes. A PXA fix for DEBUG_LL boot hangs,
 a missing terminting entry in a dt_match array on RealView a MTD fix on
 OMAP with NAND.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJUVqZOAAoJEIwa5zzehBx322EP/3qID6KdT6d5AF2ywaHpKse/
 LSV3sQbwViGJfKo0jurcfpYUbIaT1QYXMsbjUy9ZFPa7zujgKBx6ugmoLiPKSanP
 wQODZXCvUXOXBspq17U6+kA5pKvethG9zdfFhsStLgIpw44YhWqFhGr2oK9az/pd
 ZOiI5n/96n35WIETNQdp/P/JHZziatELNUseXd7xsp6vzfaIo3CudYRj0fqX8YCy
 l+iFKUJY9gD9zdMNAzoCcXnFmol00UhDDqWrkE+5QKS+T7GVEgtIzaYmYjACyzKA
 YsTohQQPXrtdKHsnNko/7PPAUhd1xLV2gqD3Subi8m65QdDZw62xbGdVWgfD3Pa+
 TjBeIqunPBQ9rambWzpV/uWUjmgu9e7eX18MjDxChUOiBZuKtYeW1kfwS0mfybXw
 TKxJCd9HYBY94bj8sJMLGs8DlDViVjiVeuv9pBf/MzqYS+CGXFeB/yadyrsLHEjG
 bawKUIL3/bfkPbvxNlMs1tmRlVpMmBu1AVU3SwCtoDZpf/OcnRizFM4yzI9bUMkd
 0FDFYZCUvvMNeTraiptHRE3cG7io9gPX4ocIf/9LaT1jdxMedlU3O0j18HY7ZO33
 Fzr4Mr9OmEpUT1UTjTiwzE1uDTlfbawAROb8DCuzTfcW2KiIKR1ZAX4RsdE+YSvZ
 D+f0FzqEOZ07gkb08lUW
 =JasG
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-for-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "A surprisingly small batch of fixes for -rc3.  Suspiciously small, I'd
  say.

  Anyway, most of this are a few defconfig updates.  Some for omap to
  deal with kernel binary size (moving ipv6 to module, etc).  A larger
  one for socfpga that refreshes with some churn, but also turns on a
  few options that makes the newly-added board in my bootfarm usable for
  testing.

  OMAP3 will also now warn when booted with legacy (non-DT) boot
  protocols, hopefully encouraging those who still care about some of
  those platforms to submit DT support and report bugs where needed.
  Nothing stops working though, this is just to warn for future
  deprecation.

  Beyond this, very few actual bugfixes.  A PXA fix for DEBUG_LL boot
  hangs, a missing terminting entry in a dt_match array on RealView a
  MTD fix on OMAP with NAND"

[ Obviously missed rc3, will make rc4 instead ;) ]

* tag 'armsoc-for-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  MAINTAINERS: drop list entry for davinci
  ARM: OMAP2+: Warn about deprecated legacy booting mode
  ARM: omap2plus_defconfig: Fix errors with NAND BCH
  ARM: multi_v7_defconfig: fix support for APQ8084
  soc: versatile: Add terminating entry for realview_soc_of_match
  ARM: ixp4xx: remove compilation warnings in io.h
  MAINTAINERS: Add Soren as reviewer for Zynq
  ARM: omap2plus_defconfig: Fix bloat caused by having ipv6 built-in
  ARM: socfpga_defconfig: Update defconfig for SoCFPGA
  ARM: pxa: fix hang on startup with DEBUG_LL
2014-11-03 14:07:05 -08:00
Sakari Ailus
094f1ca516 [media] media: Fix a compiler warning in media_entity_pipeline_start()
Patch "[media] media: Print information on failed link validation" cause a
harmless compiler warning in printing a debug message. Fix this.

The type casting is done do ensure the type really is suitable for printing
as %u, as find_first_zero_bit() does return int on some architectures and
unsigned long on others.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 19:09:13 -02:00
Fengguang Wu
167921cb0f [media] sp2: sp2_init() can be static
drivers/media/dvb-frontends/sp2.c:269:5: sparse: symbol 'sp2_init' was not declared. Should it be static?
drivers/media/dvb-frontends/sp2.c:351:5: sparse: symbol 'sp2_exit' was not declared. Should it be static?

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 19:08:06 -02:00
Mauro Carvalho Chehab
7e16e3fe1b [media] cx231xx: Remove a bogus check for NULL
As reported by kbuild test robot:
	drivers/media/usb/cx231xx/cx231xx-audio.c:445:16-20: ERROR: dev is NULL but dereferenced.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 18:56:48 -02:00
nibble.max
f4df95bcbb [media] m88ds3103: add support for the demod of M88RS6000
M88RS6000 is the integrated chip, which includes tuner and demod. Its
internal demod is similar with M88DS3103 except some registers
definition.

The main different part of this internal demod from others is its
clock/pll generation IP block sitting inside the tuner die. So clock/pll
functions should be configed through its tuner i2c bus, NOT its demod
i2c bus.

The demod of M88RS6000 need the firmware: dvb-demod-m88rs6000.fw
firmware download link:
	http://www.dvbsky.net/download/linux/dvbsky-firmware.tar.gz

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 18:24:15 -02:00
nibble.max
333829110f [media] m88rs6000t: add new dvb-s/s2 tuner for integrated chip M88RS6000
M88RS6000 is the integrated chip, which includes tuner and demod.
Here splite its tuner as a standalone driver.
.set_config is used to config its demod clock, which sits inside tuner die.

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 18:23:43 -02:00
Mauro Carvalho Chehab
232228763b [media] smipcie: fix two small CodingStyle issues
Fix two small CodingStyle issues

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 18:13:33 -02:00
nibble.max
d32f9ff737 [media] smipcie: SMI pcie bridge driver for DVBSky S950 V3 dvb-s/s2 cards
There is a new PCIe bridge chip(from SMI) used in DVBSky V3 seris cards, include S950 V3 and S952 V3 cards.
SMI pcie bridge chip is PCIe 1.1 compliant, supports MSI feature.
Main interface blocks:
1>Two DVB transport stream input ports(ts0,ts1).
2>Two I2C master bus(i2c0, i2c1).
3>IR controller.
4>reset pins and other GPIOs.

DVBSky S950 V3 card has a single channel of dvb-s/s2.
1>Frontend: tuner: M88TS2022, demod: M88DS3103
2>PCIe bridge: SMI PCIe
The current driver does not support SMI IR function.

[mchehab@osg.samsung.com: fix Makefile to find m88ts2022.h]
Signed-off-by: Max nibble <nibble.max@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 18:06:45 -02:00
Fabio Estevam
74d08d55ed [media] coda: Unregister v4l2 upon alloc_workqueue() error
If alloc_workqueue() fails, we should go to the 'err_v4l2_register' label, which
will unregister the v4l2 device.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 17:55:22 -02:00
Fabio Estevam
b7bd660a51 [media] coda: Call v4l2_device_unregister() from a single location
Instead of calling v4l2_device_unregister() in multiple locations within the
error paths, let's call it from a single location to make the error handling
simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 17:54:56 -02:00
Steven Rostedt (Red Hat)
e7dbb48958 ftracetest: Take the first debugfs mount found
Running ftracetests on a box that mounted debugfs in two locations
made the ftracetests fail. This is because the tests uses a grep
of debugfs from the /proc/mounts file to find the debugfs mount
point, and then appends "/tracing" to that string to get the tracing
directory.

If the debugfs directory is mounted twice, then that grep will return
two answers and appending "/tracing" to a string with two lines will
not work.

Use "head -1" to only take the first mount point found.

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-03 13:42:49 -05:00
Akihiro Tsukada
01bd399a10 [media] dvb:tc90522: fix always-false expression
Signed-off-by: Akihiro Tsukada <tskd08@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 16:40:10 -02:00