- 09 6月, 2022 1 次提交
-
-
由 Sergey Shtylyov 提交于
The {dma|pio}_mode sysfs files are incorrectly documented as having a list of the supported DMA/PIO transfer modes, while the corresponding fields of the *struct* ata_device hold the transfer mode IDs, not masks. To match these docs, the {dma|pio}_mode (and even xfer_mode!) sysfs files are handled by the ata_bitfield_name_match() macro which leads to reading such kind of nonsense from them: $ cat /sys/class/ata_device/dev3.0/pio_mode XFER_UDMA_7, XFER_UDMA_6, XFER_UDMA_5, XFER_UDMA_4, XFER_MW_DMA_4, XFER_PIO_6, XFER_PIO_5, XFER_PIO_4, XFER_PIO_3, XFER_PIO_2, XFER_PIO_1, XFER_PIO_0 Using the correct ata_bitfield_name_search() macro fixes that: $ cat /sys/class/ata_device/dev3.0/pio_mode XFER_PIO_4 While fixing the file documentation, somewhat reword the {dma|pio}_mode file doc and add a note about being mostly useful for PATA devices to the xfer_mode file doc... Fixes: d9027470 ("[libata] Add ATA transport class") Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Cc: stable@vger.kernel.org Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 08 6月, 2022 2 次提交
-
-
由 Tyler Erickson 提交于
Fixing the page length in the SCSI translation for the concurrent positioning ranges VPD page. It was writing starting in offset 3 rather than offset 2 where the MSB is supposed to start for the VPD page length. 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> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 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 2 次提交
-
-
由 Miaoqian Lin 提交于
of_find_device_by_node() takes reference, we should use put_device() to release it when not need anymore. Add missing put_device() to avoid refcount leak. Fixes: 43f01da0 ("MIPS/OCTEON/ata: Convert pata_octeon_cf.c to use device tree.") Signed-off-by: NMiaoqian Lin <linmq006@gmail.com> Reviewed-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 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>
-
- 16 5月, 2022 1 次提交
-
-
由 Wan Jiabing 提交于
ERROR check is already in clk_disable() and clk_unprepare() by using IS_ERR_OR_NULL. Remove unneeded ERROR check for ftide->pclk here. Signed-off-by: NWan Jiabing <wanjiabing@vivo.com> Reviewed-by: NSergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 09 5月, 2022 5 次提交
-
-
由 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>
-
由 Minghao Chi 提交于
Simplify the return expression. Reported-by: NZeal Robot <zealci@zte.com.cn> Signed-off-by: NMinghao Chi <chi.minghao@zte.com.cn> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 22 4月, 2022 4 次提交
-
-
由 Zheyu Ma 提交于
Before detecting the cable type on the dma bar, the driver should check whether the 'bmdma_addr' is zero, which means the adapter does not support DMA, otherwise we will get the following error: [ 5.146634] Bad IO access at port 0x1 (return inb(port)) [ 5.147206] WARNING: CPU: 2 PID: 303 at lib/iomap.c:44 ioread8+0x4a/0x60 [ 5.150856] RIP: 0010:ioread8+0x4a/0x60 [ 5.160238] Call Trace: [ 5.160470] <TASK> [ 5.160674] marvell_cable_detect+0x6e/0xc0 [pata_marvell] [ 5.161728] ata_eh_recover+0x3520/0x6cc0 [ 5.168075] ata_do_eh+0x49/0x3c0 Signed-off-by: NZheyu Ma <zheyuma97@gmail.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Lv Ruyi 提交于
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately.Make the code simpler without functional changes. Reported-by: NZeal Robot <zealci@zte.com.cn> Signed-off-by: NLv Ruyi <lv.ruyi@zte.com.cn> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 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>
-
由 Dan Williams 提交于
Intel server platforms that support 'RAID', i.e. have platform firmware support for software-RAID metadata + features that the kernel also understands, maintain the same device-ids for RAID from generation to generation. This is in contrast to client platforms that have tended to roll new device-ids every platform generation. However, even though server platform keep the ids there are still unique device-ids per controller instance. To date there have only been 2 controllers on these platforms, but platforms code named Emmitsburg add a third controller. Add the device-id for this third controller and collect it with the other generic server RAID ids. As mentioned here [1], the pain of continuing add new and different device-ids for RAID mode to this file [2] has been heard. Ideally this device-id would not matter and the class code would remain PCI_CLASS_STORAGE_SATA_AHCI regardless of the RAID mode, but other operating systems depend on the class code *not* being AHCI when the device is in RAID mode. That said, going forward there is little reason for new server RAID ids to be added as they can simply reuse one of the existing ids even for a new controller. Server software RAID features continue to be supported on Linux. Client software RAID features continue to be not supported and the recommendation there remains to set the device to AHCI mode in platform firmware. Link: https://lore.kernel.org/all/8e61fb0104422e8d70701e2ddc7b1ca53f009797.camel@intel.com [1] Link: https://lore.kernel.org/all/20201119165022.GA3582@infradead.org/ [2] Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NDan Williams <dan.j.williams@intel.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 20 4月, 2022 1 次提交
-
-
由 Arnd Bergmann 提交于
The palmld header is almost unused in drivers, the only remaining thing now is the PATA device address, which should really be passed as a resource. Cc: linux-ide@vger.kernel.org Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Acked-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: NArnd Bergmann <arnd@arndb.de>
-
- 13 4月, 2022 2 次提交
-
-
由 Sergey Shtylyov 提交于
The local variables 'T' and 'UT' are needlessly declared as *unsigned* *long* -- the corresponding parameters of ata_timing_compute() are both declared as *int*. While fixing up those declarations, also make the 'via_clock' and 'T' variables *const* as they are never re-assigned after initialization -- the object code should remain the same as gcc previously used copy propagation anyway... 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>
-
由 Sergey Shtylyov 提交于
sil680_sel{dev|reg}() return a PCI config space address but needlessly use the *unsigned long* type for that, whereas the PCI config space accessors take *int* for the address parameter. Switch these functions to returning *int*, updating the local variables at their call sites. Get rid of the 'base' local variables in these functions, while at it... 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>
-
- 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 2 次提交
-
-
由 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>
-
由 Christophe Leroy 提交于
powerpc's asm/prom.h brings some headers that it doesn't need itself. In order to clean it up, first add missing headers in users of asm/prom.h Signed-off-by: NChristophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 06 4月, 2022 1 次提交
-
-
由 Mario Limonciello 提交于
CONFIG_SATA_LPM_MOBILE_POLICY was renamed to CONFIG_SATA_LPM_POLICY in commit 4dd4d3de ("ata: ahci: Rename CONFIG_SATA_LPM_MOBILE_POLICY configuration item"). This can potentially cause problems as users would invisibly lose configuration policy defaults when they built the new kernel. To avoid such problems, switch back to the old name (even if it's wrong). Suggested-by: NChristoph Hellwig <hch@infradead.org> Suggested-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: NMario Limonciello <mario.limonciello@amd.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 04 4月, 2022 3 次提交
-
-
由 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>
-
由 Christian Lamparter 提交于
the driver uses libata's "tag" values from in various arrays. Since the mentioned patch bumped the ATA_TAG_INTERNAL to 32, the value of the SATA_DWC_QCMD_MAX needs to account for that. Otherwise ATA_TAG_INTERNAL usage cause similar crashes like this as reported by Tice Rex on the OpenWrt Forum and reproduced (with symbols) here: | BUG: Kernel NULL pointer dereference at 0x00000000 | Faulting instruction address: 0xc03ed4b8 | Oops: Kernel access of bad area, sig: 11 [#1] | BE PAGE_SIZE=4K PowerPC 44x Platform | CPU: 0 PID: 362 Comm: scsi_eh_1 Not tainted 5.4.163 #0 | NIP: c03ed4b8 LR: c03d27e8 CTR: c03ed36c | REGS: cfa59950 TRAP: 0300 Not tainted (5.4.163) | MSR: 00021000 <CE,ME> CR: 42000222 XER: 00000000 | DEAR: 00000000 ESR: 00000000 | GPR00: c03d27e8 cfa59a08 cfa55fe0 00000000 0fa46bc0 [...] | [..] | NIP [c03ed4b8] sata_dwc_qc_issue+0x14c/0x254 | LR [c03d27e8] ata_qc_issue+0x1c8/0x2dc | Call Trace: | [cfa59a08] [c003f4e0] __cancel_work_timer+0x124/0x194 (unreliable) | [cfa59a78] [c03d27e8] ata_qc_issue+0x1c8/0x2dc | [cfa59a98] [c03d2b3c] ata_exec_internal_sg+0x240/0x524 | [cfa59b08] [c03d2e98] ata_exec_internal+0x78/0xe0 | [cfa59b58] [c03d30fc] ata_read_log_page.part.38+0x1dc/0x204 | [cfa59bc8] [c03d324c] ata_identify_page_supported+0x68/0x130 | [...] This is because sata_dwc_dma_xfer_complete() NULLs the dma_pending's next neighbour "chan" (a *dma_chan struct) in this '32' case right here (line ~735): > hsdevp->dma_pending[tag] = SATA_DWC_DMA_PENDING_NONE; Then the next time, a dma gets issued; dma_dwc_xfer_setup() passes the NULL'd hsdevp->chan to the dmaengine_slave_config() which then causes the crash. With this patch, SATA_DWC_QCMD_MAX is now set to ATA_MAX_QUEUE + 1. This avoids the OOB. But please note, there was a worthwhile discussion on what ATA_TAG_INTERNAL and ATA_MAX_QUEUE is. And why there should not be a "fake" 33 command-long queue size. Ideally, the dw driver should account for the ATA_TAG_INTERNAL. In Damien Le Moal's words: "... having looked at the driver, it is a bigger change than just faking a 33rd "tag" that is in fact not a command tag at all." Fixes: 28361c40 ("libata: add extra internal command") Cc: stable@kernel.org # 4.18+ 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>
-
由 Damien Le Moal 提交于
When returning false, ata_sff_altstatus() does not return any status value, resulting in a compilation warning in ata_sff_lost_interrupt() ("uninitialized symbol 'status'"). Fix this by initializing the local variable "status" to 0. Fixes: 03c0e84f ("ata: libata-sff: refactor ata_sff_altstatus()") Cc: stable@vger.kernel.org Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 10 3月, 2022 1 次提交
-
-
由 Minghao Chi 提交于
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypasses the hierarchical setup and messes up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). Reported-by: NZeal Robot <zealci@zte.com.cn> Signed-off-by: NMinghao Chi <chi.minghao@zte.com.cn> Reviewed-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 07 3月, 2022 1 次提交
-
-
由 Geert Uytterhoeven 提交于
It does not make sense to have a comma after a sentinel, as any new elements must be added before the sentinel. Add comments to clarify the purpose of the empty elements. Rewrap entries to a single line to have a consistent style. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NSergey Shtylyov <s.shtylyov@omp.ru> Acked-by: Florian Fainelli <f.fainelli@gmail.com> [ahci_brcm] Reviewed-by: NKieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 02 3月, 2022 1 次提交
-
-
由 Christoph Hellwig 提交于
Now that each scsi_request is backed by a scsi_cmnd, there is no need to indirect the CDB storage. Change all submitters of SCSI passthrough requests to store the CDB information directly in the scsi_cmnd, and while doing so allocate the full 32 bytes that cover all Linux supported SCSI hosts instead of requiring dynamic allocation for > 16 byte CDBs. On 64-bit systems this does not change the size of the scsi_cmnd at all, while on 32-bit systems it slightly increases it for now, but that increase will be made up by the removal of the remaining scsi_request fields. Link: https://lore.kernel.org/r/20220224175552.988286-4-hch@lst.deReviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 01 3月, 2022 3 次提交
-
-
由 Mario Limonciello 提交于
`CONFIG_SATA_LPM_MOBILE_POLICY` reflects a configuration to apply only to mobile chipsets. As some desktop boards may want to use this policy by default as well, rename the configuration item to `SATA_LPM_POLICY`. Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPaul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: NMario Limonciello <mario.limonciello@amd.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Mario Limonciello 提交于
`AHCI_HFLAG_IS_MOBILE` designates that a chipset should be using the default link power management policy from a kernel configuration item. As desktop chipsets may also be interested in this default policy configuration, rename the flag to `AHCI_HFLAG_USE_LPM_POLICY` to more accurately reflect that a chipset doesn't have to be mobile to adopt it. Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPaul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: NMario Limonciello <mario.limonciello@amd.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Mario Limonciello 提交于
This board definition was originally created for mobile devices to designate default link power managmeent policy to influence runtime power consumption. As this is interesting for more than just mobile designs, rename the board to `board_ahci_low_power` to make it clear it is about default policy. Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPaul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: NMario Limonciello <mario.limonciello@amd.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 25 2月, 2022 1 次提交
-
-
由 Pali Rohár 提交于
This reverts commit 45aefe3d. Armada 3720 PHY driver (phy-mvebu-a3700-comphy.c) does not return -EOPNOTSUPP from phy_power_on() callback anymore. So remove AHCI_HFLAG_IGN_NOTSUPP_POWER_ON flag from Armada 3720 plat data. AHCI_HFLAG_IGN_NOTSUPP_POWER_ON is not used by any other ahci driver, so remove this flag completely. Signed-off-by: NPali Rohár <pali@kernel.org> Signed-off-by: NMarek Behún <kabel@kernel.org> Acked-by: NMiquel Raynal <miquel.raynal@bootlin.com> Acked-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Link: https://lore.kernel.org/r/20220203214444.1508-4-kabel@kernel.orgSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 23 2月, 2022 1 次提交
-
-
由 Sergey Shtylyov 提交于
The HPT371 chip physically has only one channel, the secondary one, however the primary channel registers do exist! Thus we have to manually disable the non-existing channel if the BIOS hasn't done this already. Similarly to the pata_hpt3x2n driver, always disable the primary channel. Fixes: 669a5db4 ("[libata] Add a bunch of PATA drivers.") Cc: stable@vger.kernel.org Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 22 2月, 2022 1 次提交
-
-
由 Sergey Shtylyov 提交于
The f_CNT register (at the PCI config. address 0x78) is 16-bit, not 8-bit! The bug was there from the very start... :-( Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Fixes: 669a5db4 ("[libata] Add a bunch of PATA drivers.") Cc: stable@vger.kernel.org Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
- 20 2月, 2022 6 次提交
-
-
由 Sergey Shtylyov 提交于
After commit e0afcf140e6e ("ata: pata_hpt37x: disable fast interrupts in prereset() method") HPT370's and HPT372+'s PIO/DMA mode setting functions have become identical -- merge them. Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Sergey Shtylyov 提交于
In ata_sff_dev_classify(), replace a string of the *if* statements checking the device's class with the *switch* statement that fits better here... While at it, fix the multi-line comment style in the vicinity... Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 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>
-
由 Damien Le Moal 提交于
When compile testing the sata gemini driver, CONFIG_OF is required to avoid the warning: drivers/ata/sata_gemini.c:421:34: error: ‘gemini_sata_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Sergey Shtylyov 提交于
Replace strings of the *if* statements checking the SCSI command code with the *switch* statements that fit better here... Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-
由 Sergey Shtylyov 提交于
The driver's calls to ata_sff_altstatus() are mostly surrounded by some clumsy checks. Refactor ata_sff_altstatus() to include the repetitive checks and return a 'bool' result indicating if the alternate status register exists or not. While at it, further update the 'kernel-doc' comment -- the alternate status register has never been a part of the taskfile, despite what Jeff and co. think! :-) In ata_sff_lost_interrupt(), wrap the ata_sff_altstatus() call in a WARN_ON_ONCE() check to issue a warning if the device control register does not exist. And while at it, fix the strange argument indentation in the ata_port_warn() call following the call to ata_sff_altstatus(). Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
-