- 08 6月, 2022 1 次提交
-
-
由 Tyler Erickson 提交于
The concurrent positioning ranges log is not a fixed size and may depend on how many ranges are supported by the device. This patch uses the size reported in the GPL directory to determine the number of pages supported by the device before attempting to read this log page. This resolves this error from the dmesg output: ata6.00: Read log 0x47 page 0x00 failed, Emask 0x1 Cc: stable@vger.kernel.org Fixes: fe22e1c2 ("libata: support concurrent positioning ranges log") Signed-off-by: NTyler Erickson <tyler.erickson@seagate.com> Reviewed-by: NMuhammad Ahmad <muhammad.ahmad@seagate.com> Tested-by: NMichael English <michael.english@seagate.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 06 6月, 2022 1 次提交
-
-
由 Sergey Shtylyov 提交于
In an unlikely (and probably wrong?) case that the 'ppi' parameter of ata_host_alloc_pinfo() points to an array starting with a NULL pointer, there's going to be a kernel oops as the 'pi' local variable won't get reassigned from the initial value of NULL. Initialize 'pi' instead to '&ata_dummy_port_info' to fix the possible kernel oops for good... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 09 5月, 2022 4 次提交
-
-
由 Damien Le Moal 提交于
To facilitate debugging of drive issues in the field without kernel changes (e.g. temporary test patches), add an entry for most horkage flags in the force_tbl array to allow controlling these horkage settings with the libata.force kernel boot parameter. Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NSergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by: NHannes Reinecke <hare@suse.de>
-
由 Damien Le Moal 提交于
Similarly to the horkage flags, introduce the force_lflag_onoff() macro to define struct ata_force_param entries of the force_tbl array that allow turning on or off a link flag using the libata.force boot parameter. To be consistent with naming, the macro force_lflag() is renamed to force_lflag_on(). Using force_lflag_onoff(), define a new force_tbl entry for the ATA_LFLAG_NO_DEBOUNCE_DELAY link flag, thus allowing testing if an adapter requires a link debounce delay or not. Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NSergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by: NHannes Reinecke <hare@suse.de>
-
由 Damien Le Moal 提交于
Introduce the macro definitions force_cbl(), force_spd_limit(), force_xfer(), force_lflag(), force_horkage_on() and force_horkage_onoff() to define with a more compact syntax the struct ata_force_param entries in the force_tbl array defined in the function ata_parse_force_one(). To reduce the indentation of the array declaration, force_tbl definition is also moved out of the ata_parse_force_one() function. The entries are also reordered to group them by type of the quirck that is applied. Finally, fix a comment in ata_parse_force_param() incorrectly referencing force_tbl instead of ata_force_tbl. Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NSergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by: NHannes Reinecke <hare@suse.de>
-
由 Damien Le Moal 提交于
Remove the unneeded comma after the last field of the array entries. Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NSergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by: NHannes Reinecke <hare@suse.de>
-
- 22 4月, 2022 1 次提交
-
-
由 Diego Viola 提交于
and "isn't" with "is not". The former fixes the typo while the latter just uses the same formal language. Signed-off-by: NDiego Viola <diego.viola@gmail.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 12 4月, 2022 1 次提交
-
-
由 Sergey Shtylyov 提交于
The data transfer mode that corresponds to the 'xfer_mode' parameter for ata_xfer_mode2shift() is a 8-bit *unsigned* value. Using *unsigned long* to declare the parameter leads to a problematic implicit *int* to *unsigned long* cast and was most probably a result of a copy/paste mistake -- use the 'u8' type instead, as in ata_xfer_mode2mask()... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 11 4月, 2022 1 次提交
-
-
由 John Garry 提交于
Improve ATA queued command allocation as follows: - For attaining a qc tag for a SAS host we need to allocate a bit in ata_port.sas_tag_allocated bitmap. However we already have a unique tag per device in range [0, ATA_MAX_QUEUE -1] in the scsi cmnd budget token, so just use that instead. - It is a bit pointless to have ata_qc_new_init() in libata-core.c since it pokes scsi internals, so inline it in ata_scsi_qc_new() (in libata-scsi.c). Also update Doc accordingly. - Use standard SCSI helpers set_host_byte() and set_status_byte() in ata_scsi_qc_new(). Christoph Hellwig originally contributed the change to inline ata_qc_new_init(). Signed-off-by: NJohn Garry <john.garry@huawei.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 04 4月, 2022 1 次提交
-
-
由 Christian Lamparter 提交于
Samsung' 840 EVO with the latest firmware (EXT0DB6Q) locks up with the a message: "READ LOG DMA EXT failed, trying PIO" during boot. Initially this was discovered because it caused a crash with the sata_dwc_460ex controller on a WD MyBook Live DUO. The reporter "Tice Rex" which has the unique opportunity that he has two Samsung 840 EVO SSD! One with the older firmware "EXT0BB0Q" which booted fine and didn't expose "READ LOG DMA EXT". But the newer/latest firmware "EXT0DB6Q" caused the headaches. BugLink: https://github.com/openwrt/openwrt/issues/9505Signed-off-by: NChristian Lamparter <chunkeey@gmail.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 20 2月, 2022 1 次提交
-
-
由 Sergey Shtylyov 提交于
Add the explicit error and status register fields to 'struct ata_taskfile' using the anonymous *union*s ('struct ide_taskfile' had that for ages!) and update the libata taskfile code accordingly. There should be no object code changes resulting from that... Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 19 2月, 2022 1 次提交
-
-
由 Sergey Shtylyov 提交于
ata_host_suspend() always returns 0, so the result checks in many drivers look pointless. Let's make this function return *void* instead of *int*. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 08 2月, 2022 1 次提交
-
-
由 Zoltán Böszörményi 提交于
This device is a CF card, or possibly an SSD in CF form factor. It supports NCQ and high speed DMA. While it also advertises TRIM support, I/O errors are reported when the discard mount option fstrim is used. TRIM also fails when disabling NCQ and not just as an NCQ command. TRIM must be disabled for this device. Signed-off-by: NZoltán Böszörményi <zboszor@gmail.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 07 2月, 2022 1 次提交
-
-
由 Damien Le Moal 提交于
The concurrent positioning ranges log page 47h is a general purpose log page and not a subpage of the indentify device log. Using ata_identify_page_supported() to test for concurrent positioning ranges support is thus wrong. ata_log_supported() must be used. Furthermore, unlike other advanced ATA features (e.g. NCQ priority), accesses to the concurrent positioning ranges log page are not gated by a feature bit from the device IDENTIFY data. Since many older drives react badly to the READ LOG EXT and/or READ LOG DMA EXT commands isued to read device log pages, avoid problems with older drives by limiting the concurrent positioning ranges support detection to drives implementing at least the ACS-4 ATA standard (major version 11). This additional condition effectively turns ata_dev_config_cpr() into a nop for older drives, avoiding problems in the field. Fixes: fe22e1c2 ("libata: support concurrent positioning ranges log") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215519 Cc: stable@vger.kernel.org Reviewed-by: NHannes Reinecke <hare@suse.de> Tested-by: NAbderraouf Adjal <adjal.arf@gmail.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 04 2月, 2022 1 次提交
-
-
由 Anton Lundin 提交于
06f6c4c6 ("ata: libata: add missing ata_identify_page_supported() calls") introduced additional calls to ata_identify_page_supported(), thus also adding indirectly accesses to the device log directory log page through ata_log_supported(). Reading this log page causes SATADOM-ML 3ME devices to lock up. Introduce the horkage flag ATA_HORKAGE_NO_LOG_DIR to prevent accesses to the log directory in ata_log_supported() and add a blacklist entry with this flag for "SATADOM-ML 3ME" devices. Fixes: 636f6e2a ("libata: add horkage for missing Identify Device log") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: NAnton Lundin <glance@acc.umu.se> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 03 2月, 2022 1 次提交
-
-
由 Sergey Shtylyov 提交于
ata_std_prereset() always returns 0, hence the check in ata_sff_prereset() is pointless and thus it also can return only 0 (however, we cannot change the prototypes of ata_{sff|std}_prereset() as they implement the driver's prereset() method). Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 14 1月, 2022 1 次提交
-
-
由 Damien Le Moal 提交于
Drivers that need to tweak a device IDENTIFY data implement the read_id() port operation. The IDENTIFY data buffer is passed as an argument to the read_id() operation for drivers to use. However, when this operation is called, the IDENTIFY data is not yet converted to CPU endian and contains le16 words. Change the interface of the read_id operation to pass a __le16 * pointer to the IDENTIFY data buffer to clarify the buffer endianness. Fix the pata_netcell, pata_it821x, ahci_xgene, ahci_ceva and ahci_brcm drivers implementation of this operation and modify the code to corretly deal with identify data words manipulation to avoid sparse warnings such as: drivers/ata/ahci_xgene.c:262:33: warning: invalid assignment: &= drivers/ata/ahci_xgene.c:262:33: left side has type unsigned short drivers/ata/ahci_xgene.c:262:33: right side has type restricted __le16 Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NHannes Reinecke <hare@suse.de>
-
- 05 1月, 2022 11 次提交
-
-
由 Hannes Reinecke 提交于
Callers are already protected by ata_dev_print_info(), so no need to have an additional configuration parameter here. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
Convert the sole caller to ata_dev_dbg() and remove the definition. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
All callsites have been converted to dynamic debugging. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
The WARN level was always enabled, so drop ata_msg_warn(). Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
Unused. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
The one caller have been converted to dynamic debugging. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
Unused. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
Most of the information is already covered by tracepoints (if not downright pointless), so remove the VPRINTK() calls. And while we're at it, remove ata_scsi_dump_cdb(), too, as this information can be retrieved from scsi tracing. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
Replace all DPRINTK calls with ata_dev_dbg(). Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
Use standard pr_{debug,info,notice,warn,err} macros instead of the hand-crafted printk helpers. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
Add tracepoints for bus-master DMA and taskfile related functions. That allows us to drop the relevant DPRINTK() calls. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 04 1月, 2022 6 次提交
-
-
由 Hannes Reinecke 提交于
Convert the existing ata_qc_issue() tracepoint into a template, and add tracepoints for ata_qc_prep() and ata_qc_issue() based on that template. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
To follow the flow of control we should be using tracepoints, as they will tie in with the actual I/O flow and deliver a better overview about what it happening. This patch adds tracepoints for hard reset, soft reset, and postreset and adds them in the libata-eh control flow. With that we can drop the reset DPRINTK calls in the various drivers. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
With moving ata_dev_dbg() over to dynamic debugging ATA_HORKAGE_DUMP_ID will now print out the raw IDENTIFY data without a header unless explicitly enable via dyndebug. So move the logging level up to INFO and have the header printed always. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
Use ata_dev_dbg() to print out the information in ata_dump_id() and remove the ata_msg_probe() conditional. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
Add an ata_port_classify() helper to print out the results from the device classification and remove the debugging statements from ata_dev_classify(). Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Hannes Reinecke 提交于
Debugging messages in pci init functions or sg setup are pretty much pointless, as the workflow pretty much decides what happened. So drop them. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 09 12月, 2021 1 次提交
-
-
由 Hannes Reinecke 提交于
The ASMedia 1092 has a configuration mode which will present a dummy device; sadly the implementation falsely claims to provide a device with 100M which doesn't actually exist. So disable this device to avoid errors during boot. Cc: stable@vger.kernel.org Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 18 11月, 2021 1 次提交
-
-
由 Damien Le Moal 提交于
ata_dev_config_ncq_prio() and ata_dev_config_devslp() both access pages of the IDENTIFY DEVICE data log. Before calling ata_read_log_page(), make sure to check for the existence of the IDENTIFY DEVICE data log and of the log page accessed using ata_identify_page_supported(). This avoids useless error messages from ata_read_log_page() and failures with some LLDD scsi drivers using libsas. Reported-by: NNikolay <knv418@gmail.com> Cc: stable@kernel.org # 5.15 Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Tested-by: NMatthew Perkowski <mgperkow@gmail.com>
-
- 17 11月, 2021 1 次提交
-
-
由 Damien Le Moal 提交于
If ata_read_log_page() fails to read a log page, the ata_dev_err() error message only print the page number, omitting the log number. In case of error, facilitate debugging by also printing the log number. Cc: stable@kernel.org # 5.15 Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Tested-by: NMatthew Perkowski <mgperkow@gmail.com>
-
- 12 11月, 2021 1 次提交
-
-
由 Damien Le Moal 提交于
ACS-3 introduced the ATA Identify Device Data log as mandatory. A warning message currently signals to the user if a device does not report supporting this log page in the log directory page, regardless of the ATA version of the device. Furthermore, this warning will appear for all attempts at accessing this missing log page during device revalidation. Since it is useless to constantly access the log directory and warn about this lack of support once we have discovered that the device does not support this log page, introduce the horkage flag ATA_HORKAGE_NO_ID_DEV_LOG to mark a device as lacking support for the Identify Device Data log page. Set this flag when ata_log_supported() returns false in ata_identify_page_supported(). The warning is printed only if the device ATA level is 10 or above (ACS-3 or above), and only once on device scan. With this flag set, the log directory page is not accessed again to test for Identify Device Data log page support. Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 27 10月, 2021 1 次提交
-
-
由 Damien Le Moal 提交于
Add support to discover if an ATA device supports the Concurrent Positioning Ranges data log (address 0x47), indicating that the device is capable of seeking to multiple different locations in parallel using multiple actuators serving different LBA ranges. Also add support to translate the concurrent positioning ranges log into its equivalent Concurrent Positioning Ranges VPD page B9h in libata-scsi.c. The format of the Concurrent Positioning Ranges Log is defined in ACS-5 r9. Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com> Reviewed-by: NKeith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20211027022223.183838-4-damien.lemoal@wdc.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
-
- 12 10月, 2021 1 次提交
-
-
由 Reimar Döffinger 提交于
Checking if DMA is enabled should be done via the ata_dma_enabled helper function, since the init state 0xff indicates disabled. This meant that ATA_CMD_READ_LOG_DMA_EXT was used and probed for before DMA was enabled, which caused hangs for some combinations of controllers and devices. It might also have caused it to be incorrectly disabled as broken, but there have been no reports of that. Cc: stable@vger.kernel.org BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=195895Signed-off-by: NReimar Döffinger <Reimar.Doeffinger@gmx.de> Tested-by: NPaul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com>
-