<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/ata, branch v6.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-03-19T14:31:43Z</updated>
<entry>
<title>Merge tag 'ata-6.14-final' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux</title>
<updated>2025-03-19T14:31:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-03-19T14:31:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=281e239698357d60e1e2acd9eef1308c2ae2d73f'/>
<id>urn:sha1:281e239698357d60e1e2acd9eef1308c2ae2d73f</id>
<content type='text'>
Pull ata fix from Niklas Cassel:

 - Fix a regression on ATI AHCI controllers, where certain Samsung
   drives fails to be detected on a warm boot when LPM is enabled.

   LPM on ATI AHCI works fine with other drives. Likewise, the
   Samsung drives works fine with LPM with other AHI controllers.

   Thus, just like the weirdo ATA_QUIRK_NO_NCQ_ON_ATI quirk, add a
   new ATA_QUIRK_NO_LPM_ON_ATI quirk to disable LPM only on ATI
   AHCI controllers.

* tag 'ata-6.14-final' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: libata-core: Add ATA_QUIRK_NO_LPM_ON_ATI for certain Samsung SSDs
</content>
</entry>
<entry>
<title>ata: libata-core: Add ATA_QUIRK_NO_LPM_ON_ATI for certain Samsung SSDs</title>
<updated>2025-03-18T09:11:28Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2025-03-17T17:03:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f2aac4c73c9945cce156fd58a9a2f31f2c8a90c7'/>
<id>urn:sha1:f2aac4c73c9945cce156fd58a9a2f31f2c8a90c7</id>
<content type='text'>
Before commit 7627a0edef54 ("ata: ahci: Drop low power policy board type")
the ATI AHCI controllers specified board type 'board_ahci' rather than
board type 'board_ahci'. This means that LPM was historically not enabled
for the ATI AHCI controllers.

By looking at commit 7a8526a5cd51 ("libata: Add ATA_HORKAGE_NO_NCQ_ON_ATI
for Samsung 860 and 870 SSD."), it is clear that, for some unknown reason,
that Samsung SSDs do not play nice with ATI AHCI controllers. (When using
other AHCI controllers, NCQ can be enabled on these Samsung SSDs without
issues.)

In a similar way, from user reports, it is clear the ATI AHCI controllers
can enable LPM on e.g. Maxtor HDDs perfectly fine, but when enabling LPM
on certain Samsung SSDs, things break. (E.g. the SSDs will not get detected
by the ATI AHCI controller even after a COMRESET.)

Yet, when using LPM on these Samsung SSDs with other AHCI controllers, e.g.
Intel AHCI controllers, these Samsung drives appear to work perfectly fine.

Considering that the combination of ATI + Samsung, for some unknown reason,
does not seem to work well, disable LPM when detecting an ATI AHCI
controller with a problematic Samsung SSD.

Apply this new ATA_QUIRK_NO_LPM_ON_ATI quirk for all Samsung SSDs that have
already been reported to not play nice with ATI (ATA_QUIRK_NO_NCQ_ON_ATI).

Fixes: 7627a0edef54 ("ata: ahci: Drop low power policy board type")
Suggested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reported-by: Eric &lt;eric.4.debian@grabatoulnz.fr&gt;
Closes: https://lore.kernel.org/linux-ide/Z8SBZMBjvVXA7OAK@eldamar.lan/
Tested-by: Eric &lt;eric.4.debian@grabatoulnz.fr&gt;
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Link: https://lore.kernel.org/r/20250317170348.1748671-2-cassel@kernel.org
Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'ata-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux</title>
<updated>2025-03-01T16:59:29Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-03-01T16:59:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df87d843c6eb4dad31b7bf63614549dd3521fe71'/>
<id>urn:sha1:df87d843c6eb4dad31b7bf63614549dd3521fe71</id>
<content type='text'>
Pull ata fixes from Niklas Cassel:

 - Fix a regression where the enablement of the PHYs would be skipped
   for device trees without any port child nodes (me)

 - Revert ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives, as it stops
   systems from entering lower package states. LPM works on newer
   firmware versions. We will need a more refined quirk that only
   targets the older firmware versions (me)

* tag 'ata-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  Revert "ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives"
  ata: ahci: Make ahci_ignore_port() handle empty mask_port_map
</content>
</entry>
<entry>
<title>Revert "ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives"</title>
<updated>2025-03-01T09:18:25Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2025-02-28T12:26:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a2f925a2f62254119cdaa360cfc9c0424bccd531'/>
<id>urn:sha1:a2f925a2f62254119cdaa360cfc9c0424bccd531</id>
<content type='text'>
This reverts commit cc77e2ce187d26cc66af3577bf896d7410eb25ab.

It was reported that adding ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives
breaks entering lower package states for certain systems.

It turns out that Samsung SSD 870 QVO actually has working LPM when using
a recent SSD firmware version.

The author of commit cc77e2ce187d ("ata: libata-core: Add ATA_QUIRK_NOLPM
for Samsung SSD 870 QVO drives") reported himself that only older SSD
firmware versions have broken LPM:
https://lore.kernel.org/stable/93c10d38-718c-459d-84a5-4d87680b4da7@debian.org/

Unfortunately, he did not specify which older firmware version he was using
which had broken LPM.

Let's revert this quirk, which has FW version field specified as NULL
(which means that it applies for all Samsung SSD 870 QVO firmware versions)
for now. Once the author reports which older firmware version(s) that are
broken, we can create a more fine grained quirk, which populates the FW
version field accordingly.

Fixes: cc77e2ce187d ("ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives")
Reported-by: Dieter Mummenschanz &lt;dmummenschanz@web.de&gt;
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219747
Link: https://lore.kernel.org/r/20250228122603.91814-2-cassel@kernel.org
Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
</content>
</entry>
<entry>
<title>ata: ahci: Make ahci_ignore_port() handle empty mask_port_map</title>
<updated>2025-02-26T10:24:30Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2025-02-25T14:16:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=130ff5c8b78e6fd05270a04985c50bce6a3de6c1'/>
<id>urn:sha1:130ff5c8b78e6fd05270a04985c50bce6a3de6c1</id>
<content type='text'>
Commit 8c87215dd3a2 ("ata: libahci_platform: support non-consecutive port
numbers") added a skip to ahci_platform_enable_phys() for ports that are
not in mask_port_map.

The code in ahci_platform_get_resources(), will currently set mask_port_map
for each child "port" node it finds in the device tree.

However, device trees that do not have any child "port" nodes will not have
mask_port_map set, and for non-device tree platforms mask_port_map will
only exist as a quirk for specific PCI device + vendor IDs, or as a kernel
module parameter, but will not be set by default.

Therefore, the common thing is that mask_port_map is only set if you do not
want to use all ports (as defined by Offset 0Ch: PI – Ports Implemented
register), but instead only want to use the ports in mask_port_map. If
mask_port_map is not set, all ports are available.

Thus, ahci_ignore_port() must be able to handle an empty mask_port_map.

Fixes: 8c87215dd3a2 ("ata: libahci_platform: support non-consecutive port numbers")
Fixes: 2c202e6c4f4d ("ata: libahci_platform: Do not set mask_port_map when not needed")
Fixes: c9b5be909e65 ("ahci: Introduce ahci_ignore_port() helper")
Reported-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Closes: https://lore.kernel.org/linux-ide/10b31dd0-d0bb-4f76-9305-2195c3e17670@samsung.com/
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Co-developed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Signed-off-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Link: https://lore.kernel.org/r/20250225141612.942170-2-cassel@kernel.org
Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'ata-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux</title>
<updated>2025-02-21T02:05:24Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-02-21T02:05:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=74ee48a2b4afa152b2d7f741677f6ada3c11be51'/>
<id>urn:sha1:74ee48a2b4afa152b2d7f741677f6ada3c11be51</id>
<content type='text'>
Pull ata fix from Niklas Cassel:

 - Fix an unintentional masking of AHCI ports when the device tree does
   not define port child nodes (Damien)

* tag 'ata-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: libahci_platform: Do not set mask_port_map when not needed
</content>
</entry>
<entry>
<title>ata: libahci_platform: Do not set mask_port_map when not needed</title>
<updated>2025-02-10T10:54:38Z</updated>
<author>
<name>Damien Le Moal</name>
<email>dlemoal@kernel.org</email>
</author>
<published>2025-02-07T23:29:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2c202e6c4f4dd19d2e8c1dfac9df05170aa3934f'/>
<id>urn:sha1:2c202e6c4f4dd19d2e8c1dfac9df05170aa3934f</id>
<content type='text'>
Commit 8c87215dd3a2 ("ata: libahci_platform: support non-consecutive
port numbers") modified ahci_platform_get_resources() to allow
identifying the ports of a controller that are defined as child nodes of
the controller node in order to support non-consecutive port numbers (as
defined by the platform device tree).

However, this commit also erroneously sets bit 0 of
hpriv-&gt;mask_port_map when the platform devices tree does not define port
child nodes, to match the fact that the temporary default number of
ports used in that case is 1 (which is also consistent with the fact
that only index 0 of hpriv-&gt;phys[] is initialized with the call to
ahci_platform_get_phy(). But doing so causes ahci_platform_init_host()
to initialize and probe only the first port, even if this function
determines that the controller has in fact multiple ports using the
capability register of the controller (through a call to
ahci_nr_ports()). This can be seen with the ahci_mvebu driver (Armada
385 SoC) with the second port declared as "dummy":

ahci-mvebu f10a8000.sata: masking port_map 0x3 -&gt; 0x1
ahci-mvebu f10a8000.sata: AHCI vers 0001.0000, 32 command slots, 6 Gbps, platform mode
ahci-mvebu f10a8000.sata: 1/2 ports implemented (port mask 0x1)
ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
scsi host0: ahci-mvebu
scsi host1: ahci-mvebu
ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 40 lpm-pol 0
ata2: DUMMY

Fix this issue by removing setting bit 0 of hpriv-&gt;mask_port_map when
the platform device tree does not define port child nodes.

Reported-by: Klaus Kudielka &lt;klaus.kudielka@gmail.com&gt;
Fixes: 8c87215dd3a2 ("ata: libahci_platform: support non-consecutive port numbers")
Tested-by: Klaus Kudielka &lt;klaus.kudielka@gmail.com&gt;
Signed-off-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Acked-by: Josua Mayer &lt;josua@solid-run.com&gt;
Link: https://lore.kernel.org/r/20250207232915.1439174-1-dlemoal@kernel.org
Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'ata-6.14-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux</title>
<updated>2025-01-31T19:07:56Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-01-31T19:07:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=95d7e8226106e3445b0d877015f4192c47d23637'/>
<id>urn:sha1:95d7e8226106e3445b0d877015f4192c47d23637</id>
<content type='text'>
Pull more ata updates from Niklas Cassel:

 - Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives (Daniel)

 - Ensure that PIO transfers using libata-sff cannot write outside the
   allocated buffer (me)

* tag 'ata-6.14-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: libata-sff: Ensure that we cannot write outside the allocated buffer
  ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives
</content>
</entry>
<entry>
<title>ata: libata-sff: Ensure that we cannot write outside the allocated buffer</title>
<updated>2025-01-28T10:44:47Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2025-01-27T15:43:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6e74e53b34b6dec5a50e1404e2680852ec6768d2'/>
<id>urn:sha1:6e74e53b34b6dec5a50e1404e2680852ec6768d2</id>
<content type='text'>
reveliofuzzing reported that a SCSI_IOCTL_SEND_COMMAND ioctl with out_len
set to 0xd42, SCSI command set to ATA_16 PASS-THROUGH, ATA command set to
ATA_NOP, and protocol set to ATA_PROT_PIO, can cause ata_pio_sector() to
write outside the allocated buffer, overwriting random memory.

While a ATA device is supposed to abort a ATA_NOP command, there does seem
to be a bug either in libata-sff or QEMU, where either this status is not
set, or the status is cleared before read by ata_sff_hsm_move().
Anyway, that is most likely a separate bug.

Looking at __atapi_pio_bytes(), it already has a safety check to ensure
that __atapi_pio_bytes() cannot write outside the allocated buffer.

Add a similar check to ata_pio_sector(), such that also ata_pio_sector()
cannot write outside the allocated buffer.

Cc: stable@vger.kernel.org
Reported-by: reveliofuzzing &lt;reveliofuzzing@gmail.com&gt;
Closes: https://lore.kernel.org/linux-ide/CA+-ZZ_jTgxh3bS7m+KX07_EWckSnW3N2adX3KV63y4g7M4CZ2A@mail.gmail.com/
Link: https://lore.kernel.org/r/20250127154303.15567-2-cassel@kernel.org
Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
</content>
</entry>
<entry>
<title>ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives</title>
<updated>2025-01-27T14:16:11Z</updated>
<author>
<name>Daniel Baumann</name>
<email>daniel@debian.org</email>
</author>
<published>2025-01-18T05:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cc77e2ce187d26cc66af3577bf896d7410eb25ab'/>
<id>urn:sha1:cc77e2ce187d26cc66af3577bf896d7410eb25ab</id>
<content type='text'>
Disabling link power management on Samsung SSD 870 QVO drives
to make them work again after the switch of the default LPM
policy to low.

Testing so far has shown that regular Samsung SSD 870
(the non QVO variants) do not need it and work fine with
the default LPM policy.

Cc: stable@vger.kernel.org
Fixes: 7627a0edef54 ("ata: ahci: Drop low power policy board type")
Signed-off-by: Daniel Baumann &lt;daniel@debian.org&gt;
Link: https://lore.kernel.org/linux-ide/ac64a484-022c-42a0-95bc-1520333b1536@debian.org/
Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
</content>
</entry>
</feed>
