summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2015-02-04Merge remote-tracking branches 'spi/fix/fsl-dspi' and 'spi/fix/imx' into ↵Mark Brown2-2/+16
spi-linus
2015-02-04spi: spi-imx: cleanup wait_for_completion handlingNicholas Mc Guire1-7/+8
return type of wait_for_completion_timeout is unsigned long not int and always returns >=0 , this patch adds a suitable return variable and simplifies the return value checking as there is no < 0 case. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04spi: sh-msiof: cleanup wait_for_completion return handlingNicholas Mc Guire1-4/+2
return type of wait_for_completion_timeout is unsigned long not int, this patch uses the return value of wait_for_completion_timeout in the condition directly rather than assigning it to an incorrect type variable. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04spi: match var type to return type of wait_for_completionNicholas Mc Guire1-1/+1
return type of wait_for_completion_timeout is unsigned long not int, this patch changes the type of m from int to unsigned long. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04regmap: Fix i2c word access when using SMBus access functionsGuenter Roeck1-1/+45
SMBus access functions assume that 16-bit values are formatted as little endian numbers. The direct i2c access functions in regmap, however, assume that 16-bit values are formatted as big endian numbers. As a result, the current code returns different values if an i2c chip's 16-bit registers are accessed through i2c access functions vs. SMBus access functions. Use regmap_smbus_read_word_swapped and regmap_smbus_write_word_swapped for 16-bit SMBus accesses if a chip is configured as REGMAP_ENDIAN_BIG. If the chip is configured as REGMAP_ENDIAN_LITTLE, keep using regmap_smbus_write_word_data and regmap_smbus_read_word_data. Otherwise reject registration if the controller does not support direct i2c accesses. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04regmap: Export regmap_get_val_endianGuenter Roeck2-3/+8
We'll need to call it from regmap-i2c.c, which can be built as module. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04spi: spi-pxa2xx: only include mach/dma.h for legacy DMARob Herring1-0/+1
Move the include of mach/dma.h to the legacy PXA DMA code where it is used. This enables building spi-pxa2xx on ARM64. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04spi: atmel: cleanup wait_for_completion return handlingNicholas Mc Guire1-7/+5
return type of wait_for_completion_timeout is unsigned long not int, this patch adds an appropriate variable and fixes up the assignment. It removes the else branch as the only thing it was doing is assigning ret = 0; - but ret is never used thereafter so that is not needed. As the string in dev_err already states "timeout" there is little point in printing the 0. A typo in "trasfer" -> transfer is also fixed. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04Revert "drivers/net: Disable UFO through virtio"Vlad Yasevich3-30/+26
This reverts commit 3d0ad09412ffe00c9afa201d01effdb6023d09b4. Now that GSO functionality can correctly track if the fragment id has been selected and select a fragment id if necessary, we can re-enable UFO on tap/macvap and virtio devices. Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-04Revert "drivers/net, ipv6: Select IPv6 fragment idents for virtio UFO packets"Vlad Yasevich2-8/+1
This reverts commit 5188cd44c55db3e92cd9e77a40b5baa7ed4340f7. Now that GSO layer can track if fragment id has been selected and can allocate one if necessary, we don't need to do this in tap and macvtap. This reverts most of the code and only keeps the new ipv6 fragment id generation function that is still needed. Fixes: 3d0ad09412ff (drivers/net: Disable UFO through virtio) Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-04Merge tag 'rdma-for-linus' of ↵Linus Torvalds7-241/+134
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband Pull infiniband reverts from Roland Dreier: "Last minute InfiniBand/RDMA changes for 3.19: - Revert IPoIB driver back to 3.18 state. We had a number of fixes go into 3.19, but they introduced regressions. We tried to get everything fixed up but ran out of time, so we'll try again for 3.20. - Similarly, turn off the new "extended query port" verb. Late in the cycle we realized the ABI is not quite right, and rather than freeze something in a rush and make a mistake, we'll take a bit more time and get it right in 3.20" * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/core: Temporarily disable ex_query_device uverb Revert "IPoIB: Consolidate rtnl_lock tasks in workqueue" Revert "IPoIB: Make the carrier_on_task race aware" Revert "IPoIB: fix MCAST_FLAG_BUSY usage" Revert "IPoIB: fix mcast_dev_flush/mcast_restart_task race" Revert "IPoIB: change init sequence ordering" Revert "IPoIB: Use dedicated workqueues per interface" Revert "IPoIB: Make ipoib_mcast_stop_thread flush the workqueue" Revert "IPoIB: No longer use flush as a parameter"
2015-02-04Merge tag 'md/3.19-fixes' of git://neil.brown.name/mdLinus Torvalds2-0/+18
Pull two fixes for md from Neil Brown: - Another live lock, needs backporting - work-around false positive with new warnings. * tag 'md/3.19-fixes' of git://neil.brown.name/md: md/bitmap: fix a might_sleep() warning. md/raid5: fix another livelock caused by non-aligned writes.
2015-02-04PCI: Handle read-only BARs on AMD CS553x devicesMyron Stowe1-3/+37
Some AMD CS553x devices have read-only BARs because of a firmware or hardware defect. There's a workaround in quirk_cs5536_vsa(), but it no longer works after 36e8164882ca ("PCI: Restore detection of read-only BARs"). Prior to 36e8164882ca, we filled in res->start; afterwards we leave it zeroed out. The quirk only updated the size, so the driver tried to use a region starting at zero, which didn't work. Expand quirk_cs5536_vsa() to read the base addresses from the BARs and hard-code the sizes. On Nix's system BAR 2's read-only value is 0x6200. Prior to 36e8164882ca, we interpret that as a 512-byte BAR based on the lowest-order bit set. Per datasheet sec 5.6.1, that BAR (MFGPT) requires only 64 bytes; use that to avoid clearing any address bits if a platform uses only 64-byte alignment. [bhelgaas: changelog, reduce BAR 2 size to 64] Fixes: 36e8164882ca ("PCI: Restore detection of read-only BARs") Link: https://bugzilla.kernel.org/show_bug.cgi?id=85991#c4 Link: http://support.amd.com/TechDocs/31506_cs5535_databook.pdf Link: http://support.amd.com/TechDocs/33238G_cs5536_db.pdf Reported-and-tested-by: Nix <nix@esperi.org.uk> Signed-off-by: Myron Stowe <myron.stowe@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: stable@vger.kernel.org # v.2.6.27+
2015-02-03hwmon: (tmp102) add hibernation callbacksGrygorii Strashko1-11/+4
Setting a dev_pm_ops suspend/resume pair but not a set of hibernation functions means those pm functions will not be called upon hibernation. Fix this by using SIMPLE_DEV_PM_OPS, which appropriately assigns the suspend and hibernation handlers and move mp102_suspend/tmp102_resume under CONFIG_PM_SLEEP to avoid build warnings. Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org> [groeck: Declare tmp102_dev_pm_ops as static variable] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-02-03Merge tag 'gpio-v3.19-5' of ↵Linus Torvalds3-14/+45
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull gpio fixes from Linus Walleij: "Yet more GPIO fixes for the v3.19 series. There is a high bug-spot activity in GPIO this merge window, much due to Johan Hovolds spearheading into actually exercising the removal path for GPIO chips, something that was never really exercised before. The other two fixes are augmenting erroneous behaviours in two specific drivers for minor systems. Summary from signed tag: - Two fixes stabilizing that which was never stable before: removal of GPIO chips, now let's stop leaking memory. - Make sure OMAP IRQs are usable when the irqchip API is used orthogonally to the gpiochip API. - Provide a default GPIO base for the mcp23s08 driver" * tag 'gpio-v3.19-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: sysfs: fix memory leak in gpiod_sysfs_set_active_low gpio: sysfs: fix memory leak in gpiod_export_link gpio: mcp23s08: handle default gpio base gpio: omap: Fix bad device access with setup_irq()
2015-02-03Merge branches 'ipoib' and 'odp' into for-nextRoland Dreier1-1/+0
2015-02-03IB/core: Temporarily disable ex_query_device uverbHaggai Eran1-1/+0
Commit 5a77abf9a97a ("IB/core: Add support for extended query device caps") added a new extended verb to query the capabilities of RDMA devices, but the semantics of this verb are still under debate [1]. Don't expose this verb to userspace until the ABI is nailed down. [1] [PATCH v1 0/5] IB/core: extended query device caps cleanup for v3.19 http://www.spinics.net/lists/linux-rdma/msg22904.html Signed-off-by: Haggai Eran <haggaie@mellanox.com> Reviewed-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
2015-02-03ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode ↵Suman Tripathi1-1/+2
command. This patch addresses the issue with ATA_CMD_SMART pio mode command for enumeration and device detection with ATA devices. The X-Gene AHCI controller has an errata in which it cannot clear the BSY bit after the PIO setup FIS. The dma state machine enters CMFatalErrorUpdate state and locks up. It is the same issue as in the commit 2a0bdff6b958 ("ahci-xgene: fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode command"). For example : without this patch it results in READ DMA command failure as shown below : [ 126.700072] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [ 126.707089] ata2.00: failed command: READ DMA [ 126.711426] ata2.00: cmd c8/00:08:00:55:57/00:00:00:00:00/e1 tag 1 dma 4096 in [ 126.711426] res 40/00:ff:00:00:00/00:00:00:00:00/40 Emask 0x4 (timeout) [ 126.725956] ata2.00: status: { DRDY } Signed-off-by: Suman Tripathi <stripathi@apm.com> Reported-by: Mark Langsdorf <mlangsdo@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-02-03Revert "ACPI / LPSS: introduce a 'proxy' device to power on LPSS for DMA"Rafael J. Wysocki1-28/+7
Revert commit 6c17ee44d524 (ACPI / LPSS: introduce a 'proxy' device to power on LPSS for DMA), as it introduced registration and probe ordering problems between devices on the LPSS that may lead to full hard system hang on boot in some cases.
2015-02-03spi: imx: use pio mode for i.mx6dlRobin Gong1-0/+4
For TKT238285 hardware issue which may cause txfifo store data twice can only be caught on i.mx6dl, we use pio mode instead of DMA mode on i.mx6dl. Fixes: f62caccd12c17e4 (spi: spi-imx: add DMA support) Signed-off-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-02-03ata: libahci: Use of_platform_device_create only if supportedGuenter Roeck1-1/+3
of_platform_device_create does not exist if OF_ADDRESS is not configured, so limit its use accordingly. Without this fix, the sparc64:allmodconfig build fails with ERROR: "of_platform_device_create" [drivers/ata/libahci_platform.ko] undefined! Fixes: c7d7ddee7e24 ("ata: libahci: Allow using multiple regulators") Cc: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-02-03sata_mv: Delete unnecessary checks before the function call "phy_power_off"Markus Elfring1-4/+2
The phy_power_off() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-02-03ata: Delete unnecessary checks before the function call "pci_dev_put"Markus Elfring1-4/+2
The pci_dev_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-02-03xen-netback: stop the guest rx thread after a fatal errorDavid Vrabel2-2/+3
After commit e9d8b2c2968499c1f96563e6522c56958d5a1d0d (xen-netback: disable rogue vif in kthread context), a fatal (protocol) error would leave the guest Rx thread spinning, wasting CPU time. Commit ecf08d2dbb96d5a4b4bcc53a39e8d29cc8fef02e (xen-netback: reintroduce guest Rx stall detection) made this even worse by removing a cond_resched() from this path. Since a fatal error is non-recoverable, just allow the guest Rx thread to exit. This requires taking additional refs to the task so the thread exiting early is handled safely. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reported-by: Julien Grall <julien.grall@linaro.org> Tested-by: Julien Grall <julien.grall@linaro.org> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-03net/mlx4_core: Fix kernel Oops (mem corruption) when working with more than ↵Jack Morgenstein1-1/+2
80 VFs Commit de966c592802 (net/mlx4_core: Support more than 64 VFs) was meant to allow up to 126 VFs. However, due to leaving MLX4_MFUNC_MAX too low, using more than 80 VFs resulted in memory corruptions (and Oopses) when more than 80 VFs were requested. In addition, the number of slaves was left too high. This commit fixes these issues. Fixes: de966c592802 ("net/mlx4_core: Support more than 64 VFs") Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-03isdn: off by one in connect_res()Dan Carpenter1-1/+1
The bug here is that we use "Reject" as the index into the cau_t[] array in the else path. Since the cau_t[] has 9 elements if Reject == 9 then we are reading beyond the end of the array. My understanding of the code is that it's saying that if Reject is 1 or too high then that's invalid and we should hang up. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-03sunvnet: set queue mapping when doing packet copiesDavid L Stevens1-0/+1
This patch fixes a bug where vnet_skb_shape() didn't set the already-selected queue mapping when a packet copy was required. This results in using the wrong queue index for stops/starts, hung tx queues and watchdog timeouts under heavy load. Signed-off-by: David L Stevens <david.stevens@oracle.com> Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-03qlge: Fix qlge_update_hw_vlan_features to handle if interface is downMarcelo Leitner1-10/+16
Currently qlge_update_hw_vlan_features() will always first put the interface down, then update features and then bring it up again. But it is possible to hit this code while the adapter is down and this causes a non-paired call to napi_disable(), which will get stuck. This patch fixes it by skipping these down/up actions if the interface is already down. Fixes: a45adbe8d352 ("qlge: Enhance nested VLAN (Q-in-Q) handling.") Cc: Harish Patil <harish.patil@qlogic.com> Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-03Merge tag 'drm-amdkfd-fixes-2015-02-02' of ↵Dave Airlie3-4/+8
git://people.freedesktop.org/~gabbayo/linux into drm-fixes Three small fixes that came up during last week, nothing scary: - Accidently incremented a counter instead of decrementing it (copy-paste error) - Module parameter of max num of queues must be at least 1 and not 0 - Don't do BUG() as a result from wrong user input * tag 'drm-amdkfd-fixes-2015-02-02' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: Don't create BUG due to incorrect user parameter drm/amdkfd: max num of queues can't be 0 drm/amdkfd: Fix bug in accounting of queues
2015-02-03Merge branch 'drm-fixes-3.19' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie6-21/+31
into drm-fixes One last round of fixes for radeon for 3.19: - fix some fallout from the reservation object integration on the test/benchmark options - fix a crash in the gpu vm code if gfx init fails - fix a pll issue that leads to a blank screen on older IGP parts * 'drm-fixes-3.19' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: fix the crash in test functions drm/radeon: fix the crash in benchmark functions drm/radeon: properly set vm fragment size for TN/RL drm/radeon: don't init gpuvm if accel is disabled (v3) drm/radeon: fix PLLs on RS880 and older v2
2015-02-02spi: fsl-dspi: Remove possible memory leak of 'chip'Bhuvanchandra DV1-6/+7
Move the check for spi->bits_per_word before allocation, to avoid memory leak. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02spi: sh-msiof: Update calculation of frequency dividingNobuhiro Iwamatsu1-20/+16
sh-msiof of frequency dividing does not perform the calculation, driver have to manage setting value in the table. It is not possible to set frequency dividing value close to the actual data in this way. This changes from frequency dividing of table management to setting by calculation. This driver is able to set a value close to the actual data. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02regulator: Build sysfs entries with static attribute groupsTakashi Iwai1-127/+108
Instead of calling device_create_file() manually after the device registration, put all in attribute groups and filter the unwanted ones via is_visible callback. This not only simplifies the code but also avoids the possible race between the device registration and sysfs registration. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02spi: spidev: Convert buf pointers for 32-bit compat SPI_IOC_MESSAGE(n)Ian Abbott1-24/+97
The SPI_IOC_MESSAGE(n) ioctl commands' argument points to an array of n struct spi_ioc_transfer elements. The spidev's compat_ioctl handler just converts this pointer and passes it on to the unlocked_ioctl handler to process it. The tx_buf and rx_buf members of struct spi_ioc_transfer are of type __u64 and hold pointer values. A 32-bit userspace application running in a 64-bit kernel might not have widened the 32-bit pointers correctly for the kernel. The application might have sign-extended the pointer to when the kernel expects it to be zero-extended, or vice versa, leading to an -EFAULT being returned by spidev_message() if the widened pointer is invalid. Handle the SPI_IOC_MESSAGE(n) ioctl commands specially in the compat_ioctl handler, calling new function spidev_compat_ioctl_message() to handle them. This processes them in the same way as the unlocked_ioctl handler except that it uses compat_ptr() to convert the tx_buf and rx_buf members of each struct spi_ioc_transfer element. To save code, factor out part of the unlocked_ioctl handler into a new function spidev_get_ioc_message(). This checks the ioctl command code is a valid SPI_IOC_MESSAGE(n), determines n and copies the array of n struct spi_ioc_transfer elements from userspace into dynamically allocated memory, returning either a pointer to the memory, an ERR_PTR(-err) value, or NULL (for SPI_IOC_MESSAGE(0)). Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02drm/radeon: fix the crash in test functionsIlija Hadzic1-4/+4
radeon_copy_dma and radeon_copy_blit must be called with a valid reservation object. Otherwise a crash will be provoked. We borrow the object from vram BO. bug: https://bugs.freedesktop.org/show_bug.cgi?id=88464 Cc: stable@vger.kernel.org Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-02-02drm/radeon: fix the crash in benchmark functionsIlija Hadzic1-5/+8
radeon_copy_dma and radeon_copy_blit must be called with a valid reservation object. Otherwise a crash will be provoked. We borrow the object from destination BO. bug: https://bugs.freedesktop.org/show_bug.cgi?id=88464 Cc: stable@vger.kernel.org Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-02-02drm/radeon: properly set vm fragment size for TN/RLAlex Deucher1-2/+4
Should be the same as cayman. We don't use VM by default on NI parts so this isn't critical. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2015-02-02drm/radeon: don't init gpuvm if accel is disabled (v3)Alex Deucher2-10/+12
If acceleration is disabled, it does not make sense to init gpuvm since nothing will use it. Moreover, if radeon_vm_init() gets called it uses accel to try and clear the pde tables, etc. which results in a bug. v2: handle vm_fini as well v3: handle bo_open/close as well Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88786 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2015-02-02drm/radeon: fix PLLs on RS880 and older v2Christian König1-0/+3
This is a workaround for RS880 and older chips which seem to have an additional limit on the minimum PLL input frequency. v2: fix signed/unsigned warning bugs: https://bugzilla.kernel.org/show_bug.cgi?id=91861 https://bugzilla.kernel.org/show_bug.cgi?id=83461 Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2015-02-02hwmon: (ads2828) Only keep data in device data structure if neededGuenter Roeck1-18/+14
The variables diff_input, ext_vref, and vref_mv are only used in the probe function and therefore don't need to be kept in the device data structure. Reviewed-and-Tested-by: Robert Rosengren <robert.rosengren@axis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-02-02hwmon: (ads2828) Convert to use regmapGuenter Roeck2-44/+27
Simplify code and reduce code size by using regmap to access i2c registers. Reviewed-and-Tested-by: Robert Rosengren <robert.rosengren@axis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-02-02sd: Fix max transfer length for 4k disksBrian King1-2/+4
The following patch fixes an issue observed with 4k sector disks where the max_hw_sectors attribute was getting set too large in sd_revalidate_disk. Since sdkp->max_xfer_blocks is in units of SCSI logical blocks and queue_max_hw_sectors is in units of 512 byte blocks, on a 4k sector disk, every time we went through sd_revalidate_disk, we were taking the current value of queue_max_hw_sectors and increasing it by a factor of 8. Fix this by only shifting sdkp->max_xfer_blocks. Cc: stable@vger.kernel.org Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02scsi: fix device handler detach oopsMike Christie1-1/+2
This fixes a regression caused by commit 1d5203 ("scsi: handle more device handler setup/teardown in common code"). The bug is that the alua detach() callout will try to access the sddev->scsi_dh_data, but we have already set it to NULL. This patch moves the clearing of that field to after detach() is called. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02spi/xilinx: Fix access invalid memory on xilinx_spi_txRicardo Ribalda Delgado1-1/+16
On 1 and 2 bytes per word, the transfer of the 3 last bytes will access memory outside tx_ptr. Although this has not trigger any error on real hardware, we should better fix this. Fixes: 24ba5e593f391507 (Remove rx_fn and tx_fn pointer) Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02regmap: ac97: Clean up indentationMark Brown1-2/+2
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02drm/amdkfd: Don't create BUG due to incorrect user parameterOded Gabbay1-1/+5
This patch changes a BUG_ON() statement to pr_debug, in case the user tries to update a non-existing queue. Signed-off-by: Oded Gabbay <oded.gabbay@amd.com> Reviewed-by: Ben Goz <ben.goz@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-02-02drm/amdkfd: max num of queues can't be 0Oded Gabbay1-2/+2
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-02-02drm/amdkfd: Fix bug in accounting of queuesOded Gabbay1-1/+1
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-02-02md/bitmap: fix a might_sleep() warning.NeilBrown1-0/+13
commit 8eb23b9f35aae413140d3fda766a98092c21e9b0 sched: Debug nested sleeps causes false-positive warnings in RAID5 code. This annotation removes them and adds a comment explaining why there is no real problem. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2015-02-02md/raid5: fix another livelock caused by non-aligned writes.NeilBrown1-0/+5
If a non-page-aligned write is destined for a device which is missing/faulty, we can deadlock. As the target device is missing, a read-modify-write cycle is not possible. As the write is not for a full-page, a recontruct-write cycle is not possible. This should be handled by logic in fetch_block() which notices there is a non-R5_OVERWRITE write to a missing device, and so loads all blocks. However since commit 67f455486d2ea2, that code requires STRIPE_PREREAD_ACTIVE before it will active, and those circumstances never set STRIPE_PREREAD_ACTIVE. So: in handle_stripe_dirtying, if neither rmw or rcw was possible, set STRIPE_DELAYED, which will cause STRIPE_PREREAD_ACTIVE be set after a suitable delay. Fixes: 67f455486d2ea20b2d94d6adf5b9b783d079e321 Cc: stable@vger.kernel.org (v3.16+) Reported-by: Mikulas Patocka <mpatocka@redhat.com> Tested-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>