- 23 10月, 2017 2 次提交
-
-
由 Gustavo A. R. Silva 提交于
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. In cases where a "drop through" comment was already in place, I replaced it with a proper "fall through" comment, which is what GCC is expecting to find. Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Colin Ian King 提交于
The pointer ehi is being assigned to a value that is never read and is redundant. Clean up the code and move the ehi declaration and initialization to the code block where it is used. Cleans up clang warning: Value stored to 'ehi' is never read Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 11 10月, 2017 1 次提交
-
-
由 Radha Mohan Chintakuntla 提交于
This patch adds support for Cavium's fifth generation SATA controller. It is an on-chip controller and complies with AHCI 1.3.1. As the controller uses 64-bit addresses it cannot use the standard AHCI BAR5 and so uses BAR4. Signed-off-by: NRadha Mohan Chintakuntla <rchintakuntla@cavium.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 04 10月, 2017 1 次提交
-
-
由 Geert Uytterhoeven 提交于
Use the of_device_get_match_data() helper instead of open coding. Note that the sata_rcar driver is used with DT only, so there's always a valid match. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 03 10月, 2017 1 次提交
-
-
由 Bhumika Goyal 提交于
Make this const as it is only stored in the const field of a device structure. Make the declaration in header const too. Structure found using Coccinelle and changes done by hand. Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 20 9月, 2017 1 次提交
-
-
由 Colin Ian King 提交于
Don't populate const arrayis on the stack, instead make them static. Makes the object code smaller by over 260 bytes: Before: text data bss dec hex filename 64864 5948 4128 74940 124bc drivers/ata/libata-scsi.o After: text data bss dec hex filename 64183 6364 4128 74675 123b3 drivers/ata/libata-scsi.o Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 19 9月, 2017 2 次提交
-
-
由 Colin Ian King 提交于
pio is initialized and the data is never read, instead it is almost immediately being updated to a new value. Fix this by removing the initialization. Detected by scan-build: "warning: Value stored to 'pio' during its initialization is never read" Fixes: 669a5db4 ("[libata] Add a bunch of PATA drivers") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hans de Goede 提交于
As described by Matthew Garret quite a while back: https://mjg59.dreamwidth.org/34868.html Intel CPUs starting with the Haswell generation need SATA links to power down for the "package" part of the CPU to reach low power-states like PC7 / P8 which bring a significant power-saving with them. The default max_performance lpm policy does not allow for these high PC states, both the medium_power and min_power policies do allow this. The min_power policy saves significantly more power, but there are some reports of some disks / SSDs not liking min_power leading to system crashes and in some cases even data corruption has been reported. Matthew has found a document documenting the default settings of Intel's IRST Windows driver with which most laptops ship: https://www-ssl.intel.com/content/dam/doc/reference-guide/sata-devices-implementation-recommendations.pdf Matthew wrote a patch changing med_power to match those defaults, but that never got anywhere as some people where reporting issues with the patch-set that patch was a part of. This commit is another attempt to make the default IRST driver settings available under Linux, but instead of changing medium_power and potentially introducing regressions, this commit adds a new med_power_with_dipm setting which is identical to the existing medium_power accept that it enables dipm on top, which makes it match the Windows IRST driver settings, which should hopefully be safe to use on most devices. The med_power_with_dipm setting is close to min_power, except that: a) It does not use host-initiated slumber mode (ASP not set), but it does allow device-initiated slumber b) It does not enable DevSlp mode On my T440s test laptop I get the following power savings when idle: medium_power 0.9W med_power_with_dipm 1.2W min_power 1.2W Suggested-by: NMatthew Garrett <mjg59@srcf.ucam.org> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 08 9月, 2017 1 次提交
-
-
由 Arnd Bergmann 提交于
gcc-7 warns about the result of a constant multiplication used as a boolean: drivers/ata/libata-core.c: In function 'ata_timing_quantize': drivers/ata/libata-core.c:3164:30: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context] This slightly rearranges the macro to simplify the code and avoid the warning at the same time. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 06 9月, 2017 2 次提交
-
-
由 Colin Ian King 提交于
Don't populate the arrays cdb on the stack, instead make them static. Makes the object code smaller by 230 bytes: Before: text data bss dec hex filename 3797 240 0 4037 fc5 drivers/ata/libata-zpodd.o After: text data bss dec hex filename 3407 400 0 3807 edf drivers/ata/libata-zpodd.o Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Christoph Hellwig 提交于
Intel AHCI controllers that also hide NVMe devices in their bar can't use MSI interrupts, so disable them. Reported-by: NJohn Loy <john.robert.loy@gmail.com> Tested-by: NJohn Loy <john.robert.loy@gmail.com> Signed-off-by: NChristoph Hellwig <hch@lst.de> Fixes: d684a90d ("ahci: per-port msix support") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 29 8月, 2017 5 次提交
-
-
由 Tejun Heo 提交于
This reverts commit 35f0b6a7. We now conditionalize issuing of READ LOG PAGE on the TRUSTED COMPUTING SUPPORTED bit in the identity data and this shouldn't be necessary. Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Christoph Hellwig 提交于
ATA-8 and later mirrors the TRUSTED COMPUTING SUPPORTED bit in word 48 of the IDENTIFY DEVICE data. Check this before issuing a READ LOG PAGE command to avoid issues with buggy devices. The only downside is that we can't support Security Send / Receive for a device with an older revision due to the conflicting use of this field in earlier specifications. tj: The reason we need this is because some devices which don't support READ LOG PAGE lock up after getting issued that command. Signed-off-by: NChristoph Hellwig <hch@lst.de> Tested-by: NDavid Ahern <dsahern@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Ryder Lee 提交于
This adds support the AHCI-compliant Serial ATA controller present on MediaTek SoCs. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Acked-by: NTejun Heo <tj@kernel.org> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Sergei Shtylyov 提交于
The Octeon CF driver basically open-codes of_property_read_{bool|u32}() using of_{find|get}_property() calls in its probe() method. Using the modern DT APIs saves 2 LoCs and 16 bytes of object code (MIPS gcc 3.4.3). Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Christoph Hellwig 提交于
Ido reported that reading the log page on his systems fails, so quirk it as it won't support ZBC or security protocols. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reported-by: NIdo Schimmel <idosch@mellanox.com> Tested-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 17 8月, 2017 1 次提交
-
-
由 Paul E. McKenney 提交于
There is no agreed-upon definition of spin_unlock_wait()'s semantics, and it appears that all callers could do just as well with a lock/unlock pair. This commit therefore eliminates the spin_unlock_wait() call and associated else-clause and hoists the then-clause's lock and unlock out of the "if" statement. This should be safe from a performance perspective because according to Tejun there should be few if any drivers that don't set their own error handler. Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: NTejun Heo <tj@kernel.org> Cc: <linux-ide@vger.kernel.org> Cc: Will Deacon <will.deacon@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Andrea Parri <parri.andrea@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org>
-
- 16 8月, 2017 1 次提交
-
-
由 Christophe JAILLET 提交于
'rc' is known to be 0 at this point. If 'platform_get_resource()' or 'devm_ioremap()' fail, return -ENOMEM instead of 0 which means success. tj: Changed error code from -ENOMEM to -ENODEV for get_resource failure as suggested by Sergei. Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-
- 12 8月, 2017 3 次提交
-
-
由 Andrey Korolyov 提交于
Several legacy devices such as Geode-based Cisco ASA appliances and DB800 development board do possess CS5536 IDE controller with different PCI id than existing one. Using pata_generic is not always feasible as at least DB800 requires MSR quirk from pata_cs5536 to be used with vendor firmware. Signed-off-by: NAndrey Korolyov <andrey@xdel.ru> CC: stable@vger.kernel.org Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Linus Walleij 提交于
The IDE pins are managed by the pin controller, if we want to use these, we need to ask the pin controller to explicitly enable them as by default, these pins are used for other business and most users just rely on the SATA bridge. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Linus Walleij 提交于
I added a proper pin control driver for the Gemini SoC, so retire this custom code and rely on the pin controller to set up the pads. The "IOMUX" which is routing signals between the ATA and SATA bridge inside of the chip is not about pin control and remains in place. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 05 8月, 2017 1 次提交
-
-
由 Nate Watterson 提交于
The newly introduced ahci_platform_shutdown() method is called during system shutdown to disable host controller DMA and interrupts in order to avoid potentially corrupting or otherwise interfering with a new kernel being started with kexec. Signed-off-by: NNate Watterson <nwatters@codeaurora.org> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 02 8月, 2017 2 次提交
-
-
由 Philipp Zabel 提交于
Commit a53e35db ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: linux-ide@vger.kernel.org Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Julia Lawall 提交于
Drop static on a local variable, when the variable is initialized before any possible use. Thus, the static has no benefit. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 31 7月, 2017 1 次提交
-
-
由 Jonathan Corbet 提交于
The kerneldoc comments for a couple of functions in drivers/ata/libata-eh.c had fallen behind the current implementation, resulting in these doc build warnings: ./drivers/ata/libata-eh.c:1449: warning: No description found for parameter 'link' ./drivers/ata/libata-eh.c:1449: warning: Excess function parameter 'ap' description in 'ata_eh_done' ./drivers/ata/libata-eh.c:1590: warning: No description found for parameter 'qc' ./drivers/ata/libata-eh.c:1590: warning: Excess function parameter 'dev' description in 'ata_eh_request_sense' Update the comments and make the warnings go away. Signed-off-by: NJonathan Corbet <corbet@lwn.net> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 19 7月, 2017 2 次提交
-
-
由 Dan Carpenter 提交于
My static checker complains that "devno" can be negative, meaning that we read before the start of the loop. I've looked at the code, and I think the warning is right. This come from /proc so it's root only or it would be quite a quite a serious bug. The call tree looks like this: proc_scsi_write() <- gets id and channel from simple_strtoul() -> scsi_add_single_device() <- calls shost->transportt->user_scan() -> ata_scsi_user_scan() -> ata_find_dev() Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NTejun Heo <tj@kernel.org> Cc: stable@vger.kernel.org # all versions at this point
-
由 Rob Herring 提交于
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: NRob Herring <robh@kernel.org> Cc: Tejun Heo <tj@kernel.org> Cc: linux-ide@vger.kernel.org Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 15 7月, 2017 2 次提交
-
-
由 Simon Horman 提交于
Add fallback compatibility string for R-Car Gen 2 and 3. In the case of Renesas R-Car hardware we know that there are generations of SoCs, e.g. Gen 1 and 2. But beyond that its not clear what the relationship between IP blocks might be. For example, I believe that r8a7790 is older than r8a7791 but that doesn't imply that the latter is a descendant of the former or vice versa. We can, however, by examining the documentation and behaviour of the hardware at run-time observe that the current driver implementation appears to be compatible with the IP blocks on SoCs within a given generation. For the above reasons and convenience when enabling new SoCs a per-generation fallback compatibility string scheme being adopted for drivers for Renesas SoCs. Signed-off-by: NSimon Horman <horms+renesas@verge.net.au> Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Kefeng Wang 提交于
Remove unused variable ‘rc’. Signed-off-by: NKefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 11 7月, 2017 2 次提交
-
-
由 Damien Le Moal 提交于
The warning message "READ LOG DMA EXT failed, trying unqueued" in ata_read_log_page() as well as the macro name ATA_HORKAGE_NO_NCQ_LOG are confusing: the command READ LOG DMA EXT is not an queued NCQ command unless it is encapsulated in a RECEIVE FPDMA QUEUED command. From ACS-4 READ LOG DMA EXT description: "The device processes the READ LOG DMA EXT command in the NCQ feature set environment (see 4.13.6) if the READ LOG DMA EXT command is encapsulated in a RECEIVE FPDMA QUEUED command (see 7.30) with the inputs encapsulated as shown in 7.23.6." To avoid confusion, fix the warning messsage to mention switching to PIO and not "unqueued" and rename the macro ATA_HORKAGE_NO_NCQ_LOG to ATA_HORKAGE_NO_DMA_LOG. Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com> Reviewed-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Arnd Bergmann 提交于
We cannot build the new ftide010 code without also building the faraday sata bridge driver: drivers/ata/pata_ftide010.o: In function `pata_ftide010_probe': pata_ftide010.c:(.text+0x2b8): undefined reference to `gemini_sata_bridge_get' pata_ftide010.c:(.text+0x32c): undefined reference to `gemini_sata_get_muxmode' pata_ftide010.c:(.text+0x358): undefined reference to `gemini_sata_bridge_enabled' drivers/ata/pata_ftide010.o: In function `pata_ftide010_gemini_port_stop': pata_ftide010.c:(.text+0x520): undefined reference to `gemini_sata_stop_bridge' drivers/ata/pata_ftide010.o: In function `pata_ftide010_gemini_port_start': pata_ftide010.c:(.text+0x5bc): undefined reference to `gemini_sata_start_bridge' This adjusts the Kconfig dependencies accordingly. Fixes: be4e456e ("ata: Add driver for Faraday Technology FTIDE010") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 29 6月, 2017 2 次提交
-
-
由 Christoph Hellwig 提交于
Just wire up the generic TCG OPAL infrastructure to the SCSI disk driver and the Security In/Out commands. Note that I don't know of any actual SCSI disks that do support TCG OPAL, but this is required to support ATA disks through libata. Signed-off-by: NChristoph Hellwig <hch@lst.de> Acked-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Tejun Heo 提交于
b1ffbf85 ("libata: Support for an ATA PASS-THROUGH(32) command.") introduced an unused goto label. Remove it. Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 28 6月, 2017 1 次提交
-
-
由 Rafael J. Wysocki 提交于
Currently, there are two separate ways of handling device wakeup settings in the ACPI core, depending on whether this is runtime wakeup or system wakeup (from sleep states). However, after the previous commit eliminating the run_wake ACPI device wakeup flag, there is no difference between the two any more at the ACPI level, so they can be combined. For this reason, introduce acpi_pm_set_device_wakeup() to replace both acpi_pm_device_run_wake() and acpi_pm_device_sleep_wake() and make it check the ACPI device object's wakeup.valid flag to determine whether or not the device can be set up to generate wakeup signals. Also notice that zpodd_enable/disable_run_wake() only call device_set_run_wake() because acpi_pm_device_run_wake() called device_run_wake(), which is not done by acpi_pm_set_device_wakeup(), so drop the now redundant device_set_run_wake() calls from there. Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 27 6月, 2017 3 次提交
-
-
由 Minwoo Im 提交于
SAT-4(SCSI/ATA Translation) supports for an ata pass-thru(32). This patch will allow to translate an ata pass-thru(32) SCSI cmd to an ATA cmd. Signed-off-by: NMinwoo Im <dn3108@gmail.com> Reviewed-by: NBart Van Assche <bart.vanassche@wdc.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Shawn Lin 提交于
Adding ASMedia 1061R and 1062R platform device IDs for SATA. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Ondrej Zary 提交于
VT6420 seems to have the same hotplug capability as VT6421. However, enabling hotplug needs to expose SCR registers which can cause problems. It works for me but might break elsewhere. So add a module parameter vt6420_hotplug to enable this feature. Signed-off-by: NOndrej Zary <linux@rainbow-software.org> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 23 6月, 2017 3 次提交
-
-
由 Doug Berger 提交于
This commit makes use of the AHCI_HFLAG_YES_ALPM flag to prevent the driver from writing to the read-only Host Capability register. It also sets the AHCI_HFLAG_NO_WRITE_TO_RO flag to prevent the AHCI library from writing to read-only registers. Signed-off-by: NDoug Berger <opendmb@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Doug Berger 提交于
While most hardware will simply ignore a write to a read-only register, some hardware will signal an abort if this occurs. This commit introduces the flag AHCI_HFLAG_NO_WRITE_TO_RO to prevent the AHCI library from attempting to write to the HOST_CAP, HOST_CAP2, and HOST_PORTS_IMPL registers which may be read-only. Signed-off-by: NDoug Berger <opendmb@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Doug Berger 提交于
Some hardware is capable of supporting Aggresive Link Power Management even though it is not indicated by the Host Capability register. This commit adds the AHCI_HFLAG_YES_ALPM flag to the AHCI library to allow indication of this quirk when the Host Capability register is Read Only and therefore cannot be changed. Signed-off-by: NDoug Berger <opendmb@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-