- 22 5月, 2015 2 次提交
-
-
由 Martin K. Petersen 提交于
Commit 5d3abf8f ("libata: Fall back to unqueued READ LOG EXT if the DMA variant fails") allowed us to fall back to the unqueued READ LOG variant if the queued version failed. However, if the device did not support the page at all we would end up looping due to a merge snafu. Ensure we only take the fallback path once. Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Reported-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com> Tested-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Arnd Bergmann 提交于
gcc-5.x warns about a preexisting problem in the hpt36x pata driver: drivers/ata/pata_hpt366.c: In function 'hpt36x_init_one': drivers/ata/pata_hpt366.c:376:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-array-qualifiers] Other ata drivers have the same problem, as ata_pci_bmdma_init_one takes a non-const pointer, and they solve it by using a cast to turn that pointer into a normal non-const pointer. I also tried to change the ata core code to make host->private_data a const pointer, but that quickly got out of hand, as some other drivers expect it to be writable, so I ended up using the same hack as the others here. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 19 5月, 2015 1 次提交
-
-
由 Dan Carpenter 提交于
Smatch complains about this potential NULL dereference of "acpi_id". Fixes: c9802a4b ('ata: ahci_xgene: Add AHCI Support for 2nd HW version of APM X-Gene SoC AHCI SATA Host controller.') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 11 5月, 2015 1 次提交
-
-
由 Suman Tripathi 提交于
This patch enables full AHCI feature support for APM X-Gene SoC SATA host controller. The following errata's are removed: 1. 2a0bdff6 ("ahci-xgene: fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode command") 2. 09c32aaa ("ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command") 3. 1540035d ("ahci_xgene: Implement the xgene_ahci_poll_reg_val to support PMP") 4. a3a84bc7 ("ahci_xgene: Implement the workaround to support PMP enumeration and discovery") 5. 1102407b ("ahci_xgene: Fix the DMA state machine lockup for the ATA_CMD_PACKET PIO mode command") 6. 72f79f9e ("ahci_xgene: Removing NCQ support from the APM X-Gene SoC AHCI SATA Host Controller driver") In addition, enable PMP support for APM X-Gene SoC and enable FBS support for second generation APM X-Gene SoC. Signed-off-by: NSuman Tripathi <stripathi@apm.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 10 5月, 2015 2 次提交
-
-
由 Suman Tripathi 提交于
This patch adds the support to handle HOST_IRQ_STAT as edge trigger latch. Signed-off-by: NSuman Tripathi <stripathi@apm.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Suman Tripathi 提交于
This patch refactors the ahci_single_irq_intr function and also rename it to ahci_single_level_irq_intr as it handles a level triggered latch. Signed-off-by: NSuman tripathi <stripathi@apm.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 05 5月, 2015 3 次提交
-
-
由 Martin K. Petersen 提交于
Some devices advertise support for the READ/WRITE LOG DMA EXT commands but fail when we try to issue them. This can lead to queued TRIM being unintentionally disabled since the relevant feature flag is located in a general purpose log page. Fall back to unqueued READ LOG EXT if the DMA variant fails while reading a log page. Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Martin K. Petersen 提交于
Create a sysfs "trim" attribute for each ata_device that displays whether DSM TRIM is "unsupported", "unqueued", "forced_unqueued" (blacklisted) or "queued". Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Martin K. Petersen 提交于
We have started seeing SSD firmware updates introduce support for queued TRIM. Sadly, in most cases this support is completely untested and can lead to either errors or data corruption. Add two libata force flags that can be used to either enable or disable queued TRIM support. Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 03 5月, 2015 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 21 4月, 2015 1 次提交
-
-
由 Peter Griffin 提交于
Brian noticed while working on another SATA driver that uses libahci_platform, an error in this driver; it tries to the the driver data for its device, while libata also thinks it can set the driver data. See: ahci_platform_init_host() -> ata_host_alloc_pinfo() -> ata_host_alloc() -> dev_set_drvdata() So instead of sticking the IP-specific platform data into drvdata, let's use the plat_data variable that is reserved for this use. Addtionally plat_data isn't set until ahci_platform_init_host() has been called further down in probe(). So re-work the st_ahci_probe_resets and st_ahci_deassert_resets functions to take ahci_host_priv *hpriv as a parameter. Signed-off-by: NPeter Griffin <peter.griffin@linaro.org> Suggested-by: NBrian Norris <computersforpeace@gmail.com> Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com> Cc: Maxime Coquelin <maxime.coquelin@st.com> Cc: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 15 4月, 2015 1 次提交
-
-
由 Daniel Axtens 提交于
The SCC PATA interface is only used by celleb. celleb has been dropped [1], so drop the drivers. [1] http://patchwork.ozlabs.org/patch/451730/ CC: "David S. Miller" <davem@davemloft.net> CC: linux-ide@vger.kernel.org CC: Valentin Rothberg <valentinrothberg@gmail.com> CC: mpe@ellerman.id.au CC: linuxppc-dev@lists.ozlab.org Acked-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: NDaniel Axtens <dja@axtens.net> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 08 4月, 2015 1 次提交
-
-
由 Quentin Lambert 提交于
Replace occurences of the pci api by appropriate call to the dma api. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @deprecated@ idexpression id; position p; @@ ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @bad1@ idexpression id; position deprecated.p; @@ ...when != &id->dev when != pci_get_drvdata ( id ) when != pci_enable_device ( id ) ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @depends on !bad1@ idexpression id; expression direction; position deprecated.p; @@ ( - pci_dma_supported@p ( id, + dma_supported ( &id->dev, ... + , GFP_ATOMIC ) | - pci_alloc_consistent@p ( id, + dma_alloc_coherent ( &id->dev, ... + , GFP_ATOMIC ) ) Signed-off-by: NQuentin Lambert <lambert.quentin@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 02 4月, 2015 1 次提交
-
-
由 Peter Griffin 提交于
Currently the ahci_st driver will hang the system on probe, as the st_configure_oob function does some register writes before the IP is clocked. This patch moves the function call to after ahci_platform_enable_resources (which enables the IP clock), and resolves the hang. Addtionally st_ahci_configure_oob should be called in the st_ahci_resume function, so we also rectify that ensuring it is also called after the IP clock has been enabled. Signed-off-by: NPeter Griffin <peter.griffin@linaro.org> Acked-by: NLee Jones <lee.jones@linaro.org> Acked-by: NMaxime Coquelin <maxime.coquelin@st.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 31 3月, 2015 1 次提交
-
-
由 Dan Carpenter 提交于
We shuffled some code around in 8b344485 ('sata_dwc_460ex: move to generic DMA driver') an accidentally deleted a tab character here. It causes a Smatch warning "if statement not indented". Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 28 3月, 2015 2 次提交
-
-
由 Martin K. Petersen 提交于
Blacklist queued TRIM on this drive for now. Reported-by: NStefan Keller <linux-list@zahlenfresser.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> CC: stable@vger.kernel.org Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Martin K. Petersen 提交于
Micron has released an updated firmware (MU02) for M510/M550/MX100 drives to fix the issues with queued TRIM. Queued TRIM remains broken on M500 but is working fine on later drives such as M600 and MX200. Tweak our blacklist to reflect the above. Link: https://bugzilla.kernel.org/show_bug.cgi?id=71371Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Cc: stable@vger.kernel.org Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 27 3月, 2015 9 次提交
-
-
由 Hannes Reinecke 提交于
Add some tracepoints for ata_qc_issue, ata_qc_complete, and ata_eh_link_autopsy. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
If NCQ autosense or the sense data reporting feature is enabled the LBA of the offending command should be stored in the sense data 'information' field. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
ACS-4 defines a sense data reporting feature set. This patch implements support for it. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Some newer devices support NCQ autosense (cf ACS-4), so we should be using it to retrieve the sense code and speed up recovery. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Use the bit definitions for better readability. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
ATA-8 defines bit 1 as 'ATA_SENSE', not 'ATA_IDX'. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
If READ_LOG_DMA_EXT is supported we should try to use it for reading the log pages. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 25 3月, 2015 4 次提交
-
-
由 Tejun Heo 提交于
sata_sil24 for some reason pukes when tags are allocated round-robin which helps tag ordered controllers. To work around the issue, 72dd299d ("libata: allow sata_sil24 to opt-out of tag ordered submission") introduced ATA_FLAG_LOWTAG which tells libata tag allocation to do lowest-first. However, with the recent switch to blk-mq tag allocation, the liata tag allocation code path is no longer used and the workaround is now implemented in the block layer and selected by setting scsi_host_template->tag_alloc_policy to BLK_TAG_ALLOC_FIFO. See 9269e234 ("libata: make sata_sil24 use fifo tag allocator"). This leaves ATA_FLAG_LOWTAG withoout any actual user. Remove it. Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Shaohua Li <shli@fb.com> Cc: Dan Williams <dan.j.williams@intel.com>
-
由 Andy Shevchenko 提交于
This patch re-uses hsdev->dev which is allocated on heap. Therefore, the private structure, which is global variable, is reduced by one field. In one case ap->dev is used and there it seems to be right decision. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Andy Shevchenko 提交于
The SATA implementation based on two actually different devices, i.e. SATA and DMA controllers. For Synopsys DesignWare DMA we have already a generic implementation of the driver. Thus, the patch converts the code to use DMAEngine framework and dw_dmac driver. In future it will be better to split the devices inside DTS as well like it's done on other platforms. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Andy Shevchenko 提交于
It it better to have full message on one line. It simplifies to search for line in the code by message when debugging. Note that the lines which will be removed by sequential patch are not fixed here. There is no functional change. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 20 3月, 2015 3 次提交
-
-
由 Feng Kan 提交于
This adds ACPI support for the APM X-Gene SATA ports. When the system boots using ACPI table, the SATA ports are able to configure using the values supplied by the ACPI table rather than the DTS. Signed-off-by: NFeng Kan <fkan@apm.com> Reviewed-by: NHanjun Guo <hanjun.guo@linaro.org> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Thomas Petazzoni 提交于
Commit 9013d64e ("ata: sata_mv: fix disk hotplug for Armada 370/XP SoCs") added some manipulation of the LP_PHY_CTL register, but using magic values. This commit changes the code to use proper definitions for the LP_PHY_CTL register, which allows to document what the different bits are doing. Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: NSimon Guinot <simon.guinot@sequanux.org> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Shaohua Li 提交于
SAS controller has its own tag allocation, which doesn't directly match to ATA tag, so SAS and SATA have different code path for ata tags. Originally we use port->scsi_host (98bd4be1) to destinguish SAS controller, but libsas set ->scsi_host too, so we can't use it for the destinguish, we add a new flag for this purpose. Without this patch, the following oops can happen because scsi-mq uses a host-wide tag map shared among all devices with some integer tag values >= ATA_MAX_QUEUE. These unexpectedly high tag values cause __ata_qc_from_tag() to return NULL, which is then dereferenced in ata_qc_new_init(). BUG: unable to handle kernel NULL pointer dereference at 0000000000000058 IP: [<ffffffff804fd46e>] ata_qc_new_init+0x3e/0x120 PGD 32adf0067 PUD 32adf1067 PMD 0 Oops: 0002 [#1] SMP DEBUG_PAGEALLOC Modules linked in: iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi igb i2c_algo_bit ptp pps_core pm80xx libsas scsi_transport_sas sg coretemp eeprom w83795 i2c_i801 CPU: 4 PID: 1450 Comm: cydiskbench Not tainted 4.0.0-rc3 #1 Hardware name: Supermicro X8DTH-i/6/iF/6F/X8DTH, BIOS 2.1b 05/04/12 task: ffff8800ba86d500 ti: ffff88032a064000 task.ti: ffff88032a064000 RIP: 0010:[<ffffffff804fd46e>] [<ffffffff804fd46e>] ata_qc_new_init+0x3e/0x120 RSP: 0018:ffff88032a067858 EFLAGS: 00010046 RAX: 0000000000000000 RBX: ffff8800ba0d2230 RCX: 000000000000002a RDX: ffffffff80505ae0 RSI: 0000000000000020 RDI: ffff8800ba0d2230 RBP: ffff88032a067868 R08: 0000000000000201 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800ba0d0000 R13: ffff8800ba0d2230 R14: ffffffff80505ae0 R15: ffff8800ba0d0000 FS: 0000000041223950(0063) GS:ffff88033e480000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 0000000000000058 CR3: 000000032a0a3000 CR4: 00000000000006e0 Stack: ffff880329eee758 ffff880329eee758 ffff88032a0678a8 ffffffff80502dad ffff8800ba167978 ffff880329eee758 ffff88032bf9c520 ffff8800ba167978 ffff88032bf9c520 ffff88032bf9a290 ffff88032a0678b8 ffffffff80506909 Call Trace: [<ffffffff80502dad>] ata_scsi_translate+0x3d/0x1b0 [<ffffffff80506909>] ata_sas_queuecmd+0x149/0x2a0 [<ffffffffa0046650>] sas_queuecommand+0xa0/0x1f0 [libsas] [<ffffffff804ea544>] scsi_dispatch_cmd+0xd4/0x1a0 [<ffffffff804eb50f>] scsi_queue_rq+0x66f/0x7f0 [<ffffffff803e5098>] __blk_mq_run_hw_queue+0x208/0x3f0 [<ffffffff803e54b8>] blk_mq_run_hw_queue+0x88/0xc0 [<ffffffff803e5c74>] blk_mq_insert_request+0xc4/0x130 [<ffffffff803e0b63>] blk_execute_rq_nowait+0x73/0x160 [<ffffffffa0023fca>] sg_common_write+0x3da/0x720 [sg] [<ffffffffa0025100>] sg_new_write+0x250/0x360 [sg] [<ffffffffa0025feb>] sg_write+0x13b/0x450 [sg] [<ffffffff8032ec91>] vfs_write+0xd1/0x1b0 [<ffffffff8032ee54>] SyS_write+0x54/0xc0 [<ffffffff80689932>] system_call_fastpath+0x12/0x17 tj: updated description. Fixes: 12cb5ce1 ("libata: use blk taging") Reported-and-tested-by: NTony Battersby <tonyb@cybernetics.com> Signed-off-by: NShaohua Li <shli@fb.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 03 3月, 2015 1 次提交
-
-
由 Martin Hicks 提交于
The driver was ignoring limits requested by libata.force. The output would look like: fsl-sata ffe18000.sata: Sata FSL Platform/CSB Driver init ata1: FORCE: PHY spd limit set to 1.5Gbps ata1: SATA max UDMA/133 irq 74 ata1: Signature Update detected @ 0 msecs ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 310) Signed-off-by: NMartin Hicks <mort@bork.org> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 11 2月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
Commit 84683a7e ("sata_dwc_460ex: enable COMPILE_TEST for the driver") enabled this driver for non-ppc460-ex platforms, but it was then disabled for ARM and ARM64 by commit 2de5a9c0 ("sata_dwc_460ex: disable compilation on ARM and ARM64") because it's too noisy and broken. This disabled is entirely, because it's too noisy on x86-64 too, and there's no point in disabling architectures one by one. At a minimum, the code isn't 64-bit clean, and even on 32-bit it is questionable whether it makes sense. Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 04 2月, 2015 1 次提交
-
-
由 Suman Tripathi 提交于
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 2a0bdff6 ("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: NSuman Tripathi <stripathi@apm.com> Reported-by: NMark Langsdorf <mlangsdo@redhat.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 03 2月, 2015 3 次提交
-
-
由 Guenter Roeck 提交于
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: c7d7ddee ("ata: libahci: Allow using multiple regulators") Cc: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Markus Elfring 提交于
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: NMarkus Elfring <elfring@users.sourceforge.net> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Markus Elfring 提交于
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: NMarkus Elfring <elfring@users.sourceforge.net> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 29 1月, 2015 1 次提交
-
-
由 Akinobu Mita 提交于
The owner module reference of the pata_of_platform's scsi_host is initialized to pata_platform's one, because pata_of_platform driver use a scsi_host_template defined in pata_platform. So this drivers can be unloaded even if the scsi device is being accessed. This fixes it by propagating the scsi_host_template to pata_of_platform driver. The scsi_host_template is passed through a new argument of __pata_platform_probe(). Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: linux-ide@vger.kernel.org Cc: linux-scsi@vger.kernel.org
-