aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-01-11Merge branch 'for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libataLinus Torvalds9-82/+193
Pull libata updates from Tejun Heo: "Mostly low level driver specific changes. Two changes are somewhat noteworthy. First, Dan's patchset to support per-port msix interrupt handling for ahci, which was tried last cycle but had to be backed out due to a couple issues, is back and seems to be working fine. Second, libata exception handling now uses usleep_range() instead of msleep() for sleeps < 20ms which can make things snappier in some corner cases" * 'for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata: skip debounce delay on link resume ata: ahci_brcmstb: disable DIPM support ata: ahci_brcmstb: enable support for ALPM drivers: libata-core: Use usleep_range() instead of msleep() for short sleeps (<20 ms) sata_sx4: correctly handling failed allocation ata: ahci_brcmstb: add support for MIPS-based platforms ahci: qoriq: Adjust the default register values on ls1021a ahci: qoriq: Update the default Rx watermark value ahci: qoriq: Adjust the default register values on ls1043a ahci: compile out msi/msix infrastructure ata: core: fix irq description on AHCI single irq systems ata: ahci_brcmstb: remove unused definitions ata: ahci_brcmstb: add a quirk for MIPS-based platforms ata: ahci_brcmstb: disable NCQ for MIPS-based platforms ata: sata_rcar: Remove obsolete platform_device_id entries sata_rcar: Add compatible string for r8a7795 ahci: kill 'intr_status' ahci: switch from 'threaded' to 'hardirq' interrupt handling ahci: per-port msix support
2016-01-08libata: skip debounce delay on link resumeDanesh Petigara2-1/+3
The link resume logic uses a 200msec delay while debouncing the SControl register. The rationale behind that delay is to accommodate some PHYs that behave badly if their SStatus/ SControl registers are pounded immediately on resume. The Broadcom STB SATA PHY does not seem to have this issue. This patch introduces a new link flag that allows platforms to skip the debounce delay if it isn't needed. Signed-off-by: Danesh Petigara <dpetigara@broadcom.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2016-01-08ata: ahci_brcmstb: disable DIPM supportDanesh Petigara1-1/+1
The Broadcom STB SATA host controller does not support device initiated power management. Disable support for this feature so the driver never sends SETFEATURES commands to the device to enable/disable DIPM. Signed-off-by: Danesh Petigara <dpetigara@broadcom.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2016-01-08ata: ahci_brcmstb: enable support for ALPMDanesh Petigara1-0/+35
Enable support for ALPM in the host controller's capabilities register. Also adjust the PLL timeout to give it enough time to lock when the port exits slumber mode. tj: minor style updates Signed-off-by: Danesh Petigara <dpetigara@broadcom.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2016-01-08drivers: libata-core: Use usleep_range() instead of msleep() for short sleeps (<20 ms)Anil Veliyankara Madam1-1/+7
Since msleep() may sleep longer than intended time for values less than 20ms, this patch allows the use of usleep_range for waits less that 20ms. usleep_range is a finer precision implementation of msleep and is designed to be a drop-in replacement for udelay where a precise sleep/busy-wait is unnecessary. More details can be found at http://lkml.org/lkml/2007/8/3/250 and in Documentation/timers/timers-howto.txt. This change has been done to improve the performace in PIO6 mode which is used by viking flash. Cc: xe-kernel@external.cisco.com Signed-off-by: Anil Veliyankara Madam <aveliyan@cisco.com> Signed-off-by: Shikha Jain <shikjain@cisco.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-12-31sata_sx4: correctly handling failed allocationInsu Yun1-0/+2
Since kzalloc can be failed in memory pressure, return error when failed. Signed-off-by: Insu Yun <wuninsu@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-12-31ata: ahci_brcmstb: add support for MIPS-based platformsJaedon Shin2-1/+2
The BCM7xxx ARM-based and MIPS-based platforms share a similar hardware block for AHCI SATA3. This new compatible string, "brcm,bcm7425-ahci", may be used for most MIPS-based platforms of 40nm process technology. Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com> Tested-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-12-16ahci: qoriq: Adjust the default register values on ls1021aTang Yuantian1-10/+14
Updated the registers' values to enhance SATA performance and reliability on ls1021a soc. Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-12-16ahci: qoriq: Update the default Rx watermark valueTang Yuantian1-1/+2
The PTC[RXWM] sets the watermark value for Rx FIFO. The default value 0x20 might be insufficient for some hard drives. If the watermark value is too small, a single-cycle overflow may occur and is reported as a CRC or internal error in the PxSERR register. Updated the value to 0x29 according to the validation test. All LS platforms are affected. Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-12-16ahci: qoriq: Adjust the default register values on ls1043aTang Yuantian1-0/+8
Updated the registers' values to enhance SATA performance and reliability. Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-12-07ata/sata_fsl.c: add ATA_FLAG_NO_LOG_PAGE to blacklist the controller for log page readsAndreas Werner1-1/+2
Every attempt to issue a read log page command lockup the controller. The command is currently sent if the sata device includes the devlsp feature to read out the timing data. This attempt to read the data, locks up the controller and the device is not recognzied correctly (failed to set xfermode) and cannot be accessed. This was found on Freescale P1013/P1022 and T4240 CPUs using a ATP IG mSATA 4GB with the devslp feature. fsl-sata ff718000.sata: Sata FSL Platform/CSB Driver init [ 1.254195] scsi0 : sata_fsl [ 1.256004] ata1: SATA max UDMA/133 irq 74 [ 1.370666] fsl-gianfar ethernet.3: enabled errata workarounds, flags: 0x4 [ 1.470671] fsl-gianfar ethernet.4: enabled errata workarounds, flags: 0x4 [ 1.775584] ata1: Signature Update detected @ 504 msecs [ 1.947594] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 1.948366] ata1.00: ATA-8: ATP IG mSATA, 20150311, max UDMA/133 [ 1.948371] ata1.00: 7732368 sectors, multi 0: LBA [ 1.948843] ata1.00: failed to get Identify Device Data, Emask 0x1 [ 1.948857] ata1.00: failed to set xfermode (err_mask=0x40) [ 7.467557] ata1: Signature Update detected @ 504 msecs [ 7.639560] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 7.651320] ata1.00: failed to get Identify Device Data, Emask 0x1 [ 7.651360] ata1.00: failed to set xfermode (err_mask=0x40) [ 7.655628] ata1: limiting SATA link speed to 1.5 Gbps [ 7.659458] ata1.00: limiting speed to UDMA/133:PIO3 [ 13.163554] ata1: Signature Update detected @ 504 msecs [ 13.335558] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 13.347298] ata1.00: failed to get Identify Device Data, Emask 0x1 [ 13.347334] ata1.00: failed to set xfermode (err_mask=0x40) [ 13.351601] ata1.00: disabled [ 13.353278] ata1: exception Emask 0x50 SAct 0x0 SErr 0x800 action 0x6 frozen t4 [ 13.359281] ata1: SError: { HostInt } [ 13.361644] ata1: hard resetting link Signed-off-by: Andreas Werner <andreas.werner@men.de> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-12-07libata-eh.c: Introduce new ata port flag for controller which lockup on read log pageAndreas Werner1-0/+8
Some controller lockup on a ata_read_log_page. Add new ata port flag ATA_FLAG_NO_LOG_PAGE which can used to blacklist a controller. If this flag is set, any attempt to read a log page returns an error without actually issuing the command. Signed-off-by: Andreas Werner <andreas.werner@men.de> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-12-07ahci: compile out msi/msix infrastructureDan Williams2-8/+25
Quoting Arnd: The AHCI driver is used for some on-chip devices that do not use PCI for probing, and it can be built even when CONFIG_PCI is disabled, but that now results in a build failure: ata/libahci.c: In function 'ahci_host_activate_multi_irqs': ata/libahci.c:2475:4: error: invalid use of undefined type 'struct msix_entry' ata/libahci.c:2475:21: error: dereferencing pointer to incomplete type 'struct msix_entry' Add ifdef CONFIG_PCI_MSI infrastructure to compile out the multi-msi and multi-msix code. Reported-by: Arnd Bergmann <arnd@arndb.de> Tested--by: Arnd Bergmann <arnd@arndb.de> [arnd: fix up pci enabled case] Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com> Fixes: d684a90d38e2 ("ahci: per-port msix support") Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-12-07ata: core: fix irq description on AHCI single irq systemsHeiner Kallweit1-1/+8
On my machine with single irq AHCI just the PCI id is printed as description in /proc/interrupts. I found a related discussion from beginning of this year: http://www.gossamer-threads.com/lists/linux/kernel/2117335 Seems like 4f37b504768c ("libata: Use dev_name() for request_irq() to distinguish devices") tried to fix displaying a proper interrupt description for one scenario but broke it for another one. The mentioned discussion ended in the current situation being considered as broken but w/o a patch to fix it. The following patch is based on a proposal in this mail thread. Now the interrupt is properly described as: PCI-MSI 512000-edge ahci[0000:00:1f.2] By combining both values also the scenario that commit 4f37b504768c ("libata: Use dev_name() for request_irq() to distinguish devices") refers to should still be fine. There it should look like this now: ahci[20100000.ide] Using managed memory allocation ensures that the irq description lives at least as long as the interrupt. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
2015-11-30sata_sil: disable trimMikulas Patocka1-0/+3
When I connect an Intel SSD to SATA SIL controller (PCI ID 1095:3114), any TRIM command results in I/O errors being reported in the log. There is other similar error reported with TRIM and the SIL controller: https://bugs.centos.org/view.php?id=5880 Apparently the controller doesn't support TRIM commands. This patch disables TRIM support on the SATA SIL controller. ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 ata7.00: BMDMA2 stat 0x50001 ata7.00: failed command: DATA SET MANAGEMENT ata7.00: cmd 06/01:01:00:00:00/00:00:00:00:00/a0 tag 0 dma 512 out res 51/04:01:00:00:00/00:00:00:00:00/a0 Emask 0x1 (device error) ata7.00: status: { DRDY ERR } ata7.00: error: { ABRT } ata7.00: device reported invalid CHS sector 0 sd 8:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 8:0:0:0: [sdb] tag#0 Sense Key : Illegal Request [current] [descriptor] sd 8:0:0:0: [sdb] tag#0 Add. Sense: Unaligned write command sd 8:0:0:0: [sdb] tag#0 CDB: Write same(16) 93 08 00 00 00 00 00 21 95 88 00 20 00 00 00 00 blk_update_request: I/O error, dev sdb, sector 2200968 Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@kernel.org Signed-off-by: Tejun Heo <tj@kernel.org>
2015-11-30AHCI: Fix softreset failed issue of Port MultiplierXiangliang Yu1-0/+9
Current code doesn't update port value of Port Multiplier(PM) when sending FIS of softreset to device, command will fail if FBS is enabled. There are two ways to fix the issue: the first is to disable FBS before sending softreset command to PM device and the second is to update port value of PM when sending command. For the first way, i can't find any related rule in AHCI Spec. The second way can avoid disabling FBS and has better performance. Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: stable@vger.kernel.org
2015-11-30ata: ahci_brcmstb: remove unused definitionsJaedon Shin1-2/+0
Remove unused definitions, and this is to avoid confusion with MIPS-based platforms. Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com> Tested-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Brian Norris <computersforpeace@gmail.com>
2015-11-30ata: ahci_brcmstb: add a quirk for MIPS-based platformsJaedon Shin1-1/+10
Whereas ARM-based platforms have four phy interface registers and information, the MIPS-based platforms have only three registers, and there are no information and documentation. In the original BSP, It using "strict-ahci" did not control these registers. Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com> Tested-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Brian Norris <computersforpeace@gmail.com>
2015-11-30ata: ahci_brcmstb: disable NCQ for MIPS-based platformsJaedon Shin1-0/+11
The most MIPS-based platforms need to disable NCQ while have the NCQ capability in HOST_CAP, and several ARM-based platforms (eg. BCM7349A0, BCM7445A0, BCM7445B0) need to disable too. Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com> Tested-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Brian Norris <computersforpeace@gmail.com>
2015-11-24ata: sata_rcar: Remove obsolete platform_device_id entriesGeert Uytterhoeven1-12/+3
Since commit c99cd90d98a98aa1 ("ARM: shmobile: r8a7779: Remove legacy SoC code"), R-Car SoCs are only supported in generic DT-only ARM multi-platform builds. The driver doesn't need to match platform devices by name anymore, hence remove the remaining platform_device_id entries and platform device support. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-11-20sata_rcar: Add compatible string for r8a7795Kouei Abe1-0/+4
R-Car H3 SoC has compatible SATA controller with R-Car Gen2 SoCs. Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Simon Horman <horms+renesas@verge.net.au>
2015-11-20sata/mvebu: use #ifdef around suspend/resume codeArnd Bergmann1-0/+5
The newly added suspend/resume implementation for ahci_mvebu causes a link error when CONFIG_PM_SLEEP is disabled: ERROR: "ahci_platform_suspend_host" [drivers/ata/ahci_mvebu.ko] undefined! ERROR: "ahci_platform_resume_host" [drivers/ata/ahci_mvebu.ko] undefined! This adds the same #ifdef here that exists in the ahci_platform driver which defines the above functions. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: d6ecf1581488 ("ata: ahci_mvebu: add suspend/resume support") Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-11-16ahci: kill 'intr_status'Dan Williams1-1/+0
This field in achi_port_priv was only used to support threaded interrupts. Now that we are hardirq only it can be deleted. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-11-16ahci: switch from 'threaded' to 'hardirq' interrupt handlingDan Williams1-26/+8
For high frequency I/O the overhead of threaded interrupts impacts performance. A quick out-of-the-box test (i.e. no affinity tuning) shows ~10% random read performance at ~20% less cpu. The cpu wins appear to be from reduced lock contention. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-11-16ahci: per-port msix supportDan Williams3-27/+61
Some AHCI controllers support per-port MSI-X vectors. At the same time the Linux AHCI driver needs to support one-off architectures that implement a single MSI-X vector for all ports. The heuristic for enabling AHCI ports becomes, in order of preference: 1/ per-port multi-MSI-X 2/ per-port multi-MSI 3/ single MSI 4/ single MSI-X 5/ legacy INTX This all depends on AHCI implementations with potentially broken MSI-X requesting less vectors than the number of ports. If this assumption is violated we will need to start explicitly white-listing AHCI-MSIX implementations. Reported-by: Ricardo Neri <ricardo.neri@intel.com> [ricardo: fix struct msix_entry handling] Reported-by: kernel test robot <ying.huang@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-11-16ahci: Order SATA device IDs for codename LewisburgAlexandra Yates1-10/+10
This change was to preserve the ascending order of device IDs. There was an exception with the first two Lewisburg device IDs to keep all device IDs of the same kind grouped by code name. Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com> signed-off-by: Tejun Heo <tj@kernel.org>
2015-11-16ahci: Add Device ID for Intel Sunrise Point PCHCharles_Rose@Dell.com1-0/+2
This patch adds missing AHCI RAID SATA Device IDs for the Intel Sunrise Point PCH. Signed-off-by: Nanda Kishore Chinna <nanda_kishore_chinna@dell.com> Signed-off-by: Charles Rose <charles_rose@dell.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-11-13Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds1-3/+0
Pull final round of SCSI updates from James Bottomley: "Sorry for the delay in this patch which was mostly caused by getting the merger of the mpt2/mpt3sas driver, which was seen as an essential item of maintenance work to do before the drivers diverge too much. Unfortunately, this caused a compile failure (detected by linux-next), which then had to be fixed up and incubated. In addition to the mpt2/3sas rework, there are updates from pm80xx, lpfc, bnx2fc, hpsa, ipr, aacraid, megaraid_sas, storvsc and ufs plus an assortment of changes including some year 2038 issues, a fix for a remove before detach issue in some drivers and a couple of other minor issues" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (141 commits) mpt3sas: fix inline markers on non inline function declarations sd: Clear PS bit before Mode Select. ibmvscsi: set max_lun to 32 ibmvscsi: display default value for max_id, max_lun and max_channel. mptfusion: don't allow negative bytes in kbuf_alloc_2_sgl() scsi: pmcraid: replace struct timeval with ktime_get_real_seconds() mvumi: 64bit value for seconds_since1970 be2iscsi: Fix bogus WARN_ON length check scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice mpt3sas: Bump mpt3sas driver version to 09.102.00.00 mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs mpt2sas, mpt3sas: Update the driver versions mpt3sas: setpci reset kernel oops fix mpt3sas: Added OEM Gen2 PnP ID branding names mpt3sas: Refcount fw_events and fix unsafe list usage mpt3sas: Refcount sas_device objects and fix unsafe list usage mpt3sas: sysfs attribute to report Backup Rail Monitor Status mpt3sas: Ported WarpDrive product SSS6200 support mpt3sas: fix for driver fails EEH, recovery from injected pci bus error mpt3sas: Manage MSI-X vectors according to HBA device type ...
2015-11-09scsi: use host wide tags by defaultChristoph Hellwig1-3/+0
This patch changes the !blk-mq path to the same defaults as the blk-mq I/O path by always enabling block tagging, and always using host wide tags. We've had blk-mq available for a few releases so bugs with this mode should have been ironed out, and this ensures we get better coverage of over tagging setup over different configs. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Jens Axboe <axboe@kernel.dk> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-11-03Merge branch 'for-4.3-fixes' into for-4.4Tejun Heo1-0/+1
2015-11-03ahci: add new Intel device IDsAlexandra Yates1-0/+10
Adding Intel codename Lewisburg platform device IDs for SATA. Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-10-31ahci: Add Marvell 88se91a2 device idJohannes Thumshirn1-0/+2
Add device id for Marvell 88se91a2 Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-10-31ahci: cleanup ahci_host_activate_multi_irqsDan Williams1-18/+3
With devm there is no need to explicitly free irqs on error. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-10-31ahci: ahci_host_activate: kill IRQF_SHAREDDan Williams1-1/+1
MSI messages are per-device, so there will never be another "shared" device in the interrupt chain. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-10-31ahci: qoriq: Disable NCQ on ls2080a SoCTang Yuantian1-1/+7
NCQ feature can't be used due to the erratum A-008473. This patch disables NCQ as a workaround. Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-10-31ahci: qoriq: Rename LS2085A SoC support code to LS2080ATang Yuantian1-3/+3
Freescale is renaming the LS2085A SoC to LS2080A. This patch addresses the same. Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-10-27libata: enable LBA flag in taskfile for ata_scsi_pass_thru()Vinayak Kale1-0/+3
Enable LBA in taskfile flags for ata_scsi_pass_thru() Signed-off-by: Vinayak Kale <vinayak.kale@seagate.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-10-27libata: add support for NCQ commands for SG interfaceVinayak Kale1-1/+7
This patch is needed to make NCQ commands with FPDMA protocol value (eg READ/WRITE FPDMA) work over SCSI Generic (SG) interface. Signed-off-by: Vinayak Kale <vinayak.kale@seagate.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-10-15ahci: qoriq: Fix a compiling warningArnd Bergmann1-2/+3
kbuild test robot reports the warnings: drivers/ata/ahci_qoriq.c: In function 'ahci_qoriq_hardreset': >> include/asm-generic/io.h:163:2: warning: 'px_is' may be used >> uninitialized in this function [-Wuninitialized] drivers/ata/ahci_qoriq.c:70:14: note: 'px_is' was declared here >> include/asm-generic/io.h:163:2: warning: 'px_cmd' may be used >> uninitialized in this function [-Wuninitialized] drivers/ata/ahci_qoriq.c:70:6: note: 'px_cmd' was declared here This patch fixed it by introducing a local variable. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-10-15pata_it821x: use "const char *" for string literalsLABBE Corentin1-3/+3
Some string literals are pointed to by "char *". This patch fixes that. tj: Updated patch title and description. Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-10-12libata: only call ->done once all per-tag ressources are releasedChristoph Hellwig1-9/+13
When calling ->done before releasing resources we could run into a race where the SCSI midlayer sends another command and races with the resources beeing manipulated. For libata this can't currently happen as synchronization happens at a higher level, but I'd still like to fix it to future proof libata and to avoid copy & paste into SCSI drivers where this pattern has led to reproducible crashes. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-10-04libata: cleanup ata_scsi_qc_completeChristoph Hellwig1-14/+5
Remove an incorrect comment and untangle an if statement in ata_scsi_qc_complete. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-09-30ata: ahci: find eSATA ports and flag them as removableManuel Lauss3-2/+14
If the AHCI ports' HPCP or ESP bits are set, the port should be considered external (e.g. eSATA) and is marked as removable. Userspace tools like udisks then treat it like an usb drive. With this patch applied, when I plug a drive into the esata port, KDE pops up a window asking what to do with the drives(s), just like it does for any random USB stick. Removability is indicated to the upper layers by way of the SCSI RMB bit, as I haven't found another way to signal userspace to treat a sata disk like any usb stick. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-09-25libata: samsung_cf: fix handling platform_get_irq resultAndrzej Hajda1-1/+1
The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-09-17ata: pata_macio: Fix module autoload for OF platform driverLuis de Bethencourt1-0/+1
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. This patch adds the missing MODULE_DEVICE_TABLE() for OF to export that information so modules have the correct aliases built-in and autoloading works correctly. Link: https://lkml.org/lkml/2015/7/30/519 Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-09-10ata: pata_pxa: dmaengine conversionRobert Jarzmik1-112/+59
The PXA architecture was offered a slave dmaengine support. As a consequence the direct DMA registers are progressively replaced by dmaengine support. This makes the pata_pxa change, which brings this driver to almost a generic ATA 40-wires driver relying on dmaengine for transfers. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-09-08ahci: added a new driver for supporting Freescale AHCI sataTang Yuantian3-0/+282
Currently Freescale QorIQ series SATA is supported by ahci_platform driver. Some SoC specific settings have been put in uboot. So whether SATA works or not heavily depends on uboot. This patch will add a new driver to support QorIQ sata which removes the dependency on any other boot loader. Freescale QorIQ series sata, like ls1021a ls2085a ls1043a, is compatible with serial ATA 3.0 and AHCI 1.3 specification. Signed-off-by: Yuantian Tang <Yuantian.Tang@freescale.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-09-08Revert "ahci: added support for Freescale AHCI sata"Tang Yuantian1-1/+0
This reverts commit 5163fb62541e ("ahci: added support for Freescale AHCI sata") The reverted patch added Freescale QorIQ AHCI sata support to ahci_platform driver though, but it left SoC specific settings to uboot. It leads to QorIQ sata heavily depending on uboot. In order to removing the dependency we first revert the old patch and then will add a new driver for QorIQ SATA. Since there are no LS* platforms that have been upstreamed, So the revert would not break anything exists. Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2015-09-03Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds1-2/+1
Pull MIPS updates from Ralf Baechle: "This is the main pull request for 4.3 for MIPS. Here's the summary: Three fixes that didn't make 4.2-stable: - a -Os build might compile the kernel using the MIPS16 instruction set but the R2 optimized inline functions in <uapi/asm/swab.h> are implemented using 32-bit wide instructions which is invalid. - a build error in pgtable-bits.h for a particular kernel configuration. - accessing registers of the CM GCR might have been compiled to use 64 bit accesses but these registers are onl 32 bit wide. And also a few new bits: - move the ATH79 GPIO driver to drivers/gpio - the definition of IRQCHIP_DECLARE has moved to linux/irqchip.h, change ATH79 accordingly. - fix definition of pgprot_writecombine - add an implementation of dma_map_ops.mmap - fix alignment of quiet build output for vmlinuz link - BCM47xx: Use kmemdup rather than duplicating its implementation - Netlogic: Fix 0x0x prefixes of constants. - merge Bjorn Helgaas' series to remove most of the weak keywords from function declarations. - CP0 and CP1 registers are best considered treated as unsigned values to avoid large values from becoming negative values. - improve support for the MIPS GIC timer. - enable common clock framework for Malta and SEAD3. - a number of improvments and fixes to dump_tlb(). - document the MIPS TLB dump functionality in Magic SysRq. - Cavium Octeon CN68XX improvments. - NetLogic improvments. - irq: Use access helper irq_data_get_affinity_mask. - handle MSA unaligned accesses. - a number of R6-related math-emu fixes. - support for I6400. - improvments to MSA support. - add uprobes support. - move from deprecated __initcall to arch_initcall. - remove finish_arch_switch(). - IRQ cleanups by Thomas Gleixner. - migrate to new 'set-state' interface. - random small cleanups" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (148 commits) MIPS: UAPI: Fix unrecognized opcode WSBH/DSBH/DSHD when using MIPS16. MIPS: Fix alignment of quiet build output for vmlinuz link MIPS: math-emu: Remove unused handle_dsemul function declaration MIPS: math-emu: Add support for the MIPS R6 MAX{, A} FPU instruction MIPS: math-emu: Add support for the MIPS R6 MIN{, A} FPU instruction MIPS: math-emu: Add support for the MIPS R6 CLASS FPU instruction MIPS: math-emu: Add support for the MIPS R6 RINT FPU instruction MIPS: math-emu: Add support for the MIPS R6 MSUBF FPU instruction MIPS: math-emu: Add support for the MIPS R6 MADDF FPU instruction MIPS: math-emu: Add support for the MIPS R6 SELNEZ FPU instruction MIPS: math-emu: Add support for the MIPS R6 SELEQZ FPU instruction MIPS: math-emu: Add support for the CMP.condn.fmt R6 instruction MIPS: inst.h: Add new MIPS R6 FPU opcodes MIPS: Octeon: Fix management port MII address on Kontron S1901 MIPS: BCM47xx: Use kmemdup rather than duplicating its implementation STAGING: Octeon: Use common helpers for determining interface and port MIPS: Octeon: Support interfaces 4 and 5 MIPS: Octeon: Set up 1:1 mapping between CN68XX PKO queues and ports MIPS: Octeon: Initialize CN68XX PKO STAGING: Octeon: Support CN68XX style WQE ...
2015-09-03MIPS: Remove all the uses of custom gpio.hAlban Bedel1-2/+1
Currently CONFIG_ARCH_HAVE_CUSTOM_GPIO_H is defined for all MIPS machines, and each machine type provides its own gpio.h. However only a handful really implement the GPIO API, most just forward everythings to gpiolib. The Alchemy machine is notable as it provides a system to allow implementing the GPIO API at the board level. But it is not used by any board currently supported, so it can also be removed. For most machine types we can just remove the custom gpio.h, as well as the custom wrappers if some exists. Some of the code found in the wrappers must be moved to the respective GPIO driver. A few more fixes are need in some drivers as they rely on linux/gpio.h to provides some machine specific definitions, or used asm/gpio.h instead of linux/gpio.h for the gpio API. Signed-off-by: Alban Bedel <albeu@free.fr> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Cc: linux-mips@linux-mips.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Rafał Miłecki <zajec5@gmail.com> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Tejun Heo <tj@kernel.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Florian Fainelli <florian@openwrt.org> Cc: Manuel Lauss <manuel.lauss@gmail.com> Cc: Joe Perches <joe@perches.com> Cc: Daniel Walter <dwalter@google.com> Cc: Sergey Ryazanov <ryazanov.s.a@gmail.com> Cc: Huacai Chen <chenhc@lemote.com> Cc: James Hartley <james.hartley@imgtec.com> Cc: Andrew Bresticker <abrestic@chromium.org> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Wolfram Sang <wsa@the-dreams.de> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Varka Bhadram <varkabhadram@gmail.com> Cc: Masanari Iida <standby24x7@gmail.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Michael Buesch <m@bues.ch> Cc: abdoulaye berthe <berthe.ab@gmail.com> Cc: linux-kernel@vger.kernel.org Cc: linux-ide@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: netdev@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/10828/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>