<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/ata/libahci.c, branch linux-4.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-09-19T20:41:32Z</updated>
<entry>
<title>ata: libahci: Correct setting of DEVSLP register</title>
<updated>2018-09-19T20:41:32Z</updated>
<author>
<name>Srinivas Pandruvada</name>
</author>
<published>2018-07-02T19:01:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c8b7991f40d9aa48e405b1f7ebfc918d7fb2bb1'/>
<id>urn:sha1:0c8b7991f40d9aa48e405b1f7ebfc918d7fb2bb1</id>
<content type='text'>
[ Upstream commit 2dbb3ec29a6c069035857a2fc4c24e80e5dfe3cc ]

We have seen that on some platforms, SATA device never show any DEVSLP
residency. This prevent power gating of SATA IP, which prevent system
to transition to low power mode in systems with SLP_S0 aka modern
standby systems. The PHY logic is off only in DEVSLP not in slumber.
Reference:
https://www.intel.com/content/dam/www/public/us/en/documents/datasheets
/332995-skylake-i-o-platform-datasheet-volume-1.pdf
Section 28.7.6.1

Here driver is trying to do read-modify-write the devslp register. But
not resetting the bits for which this driver will modify values (DITO,
MDAT and DETO). So simply reset those bits before updating to new values.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ata: libahci: Allow reconfigure of DEVSLP register</title>
<updated>2018-09-19T20:41:32Z</updated>
<author>
<name>Srinivas Pandruvada</name>
</author>
<published>2018-07-02T19:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d12d3336fe95a12d042b446f1eda86a575ec4f3a'/>
<id>urn:sha1:d12d3336fe95a12d042b446f1eda86a575ec4f3a</id>
<content type='text'>
[ Upstream commit 11c291461b6ea8d1195a96d6bba6673a94aacebc ]

There are two modes in which DEVSLP can be entered. The OS initiated or
hardware autonomous.

In hardware autonomous mode, BIOS configures the AHCI controller and the
device to enable DEVSLP. But they may not be ideal for all cases. So in
this case, OS should be able to reconfigure DEVSLP register.

Currently if the DEVSLP is already enabled, we can't set again as it will
simply return. There are some systems where the firmware is setting high
DITO by default, in this case we can't modify here to correct settings.
With the default in several seconds, we are not able to transition to
DEVSLP.

This change will allow reconfiguration of devslp register if DITO is
different.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>libahci: Fix possible Spectre-v1 pmp indexing in ahci_led_store()</title>
<updated>2018-06-18T18:04:28Z</updated>
<author>
<name>John Garry</name>
</author>
<published>2018-06-08T10:26:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fae2a63737e5973f1426bc139935a0f42e232844'/>
<id>urn:sha1:fae2a63737e5973f1426bc139935a0f42e232844</id>
<content type='text'>
Currently smatch warns of possible Spectre-V1 issue in ahci_led_store():
drivers/ata/libahci.c:1150 ahci_led_store() warn: potential spectre issue 'pp-&gt;em_priv' (local cap)

Userspace controls @pmp from following callchain:
em_message-&gt;store()
-&gt;ata_scsi_em_message_store()
--&gt;ap-&gt;ops-&gt;em_store()
---&gt;ahci_led_store()

After the mask+shift @pmp is effectively an 8b value, which is used to
index into an array of length 8, so sanitize the array index.

Signed-off-by: John Garry &lt;john.garry@huawei.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata</title>
<updated>2018-06-06T00:01:41Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2018-06-06T00:01:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0bbddb8cbe7a8765e9c6ef598a33b50461934f88'/>
<id>urn:sha1:0bbddb8cbe7a8765e9c6ef598a33b50461934f88</id>
<content type='text'>
Pull libata updates from Tejun Heo:

 - libata has always been limiting the maximum queue depth to 31, with
   one entry set aside mostly for historical reasons. This didn't use to
   make much difference but Jens found out that modern hard drives can
   actually perform measurably better with the extra one queue depth.
   Jens updated libata core so that it can make use of full 32 queue
   depth

 - Damien updated command retry logic in error handling so that it
   doesn't unnecessarily retry when upper layer (SCSI) is gonna handle
   them

 - A couple misc changes

* 'for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  sata_fsl: use the right type for tag bitshift
  ahci: enable full queue depth of 32
  libata: don't clamp queue depth to ATA_MAX_QUEUE - 1
  libata: add extra internal command
  sata_nv: set host can_queue count appropriately
  libata: remove assumption that ATA_MAX_QUEUE - 1 is the max
  libata: use ata_tag_internal() consistently
  libata: bump -&gt;qc_active to a 64-bit type
  libata: convert core and drivers to -&gt;hw_tag usage
  libata: introduce notion of separate hardware tags
  libata: Fix command retry decision
  libata: Honor RQF_QUIET flag
  libata: Make ata_dev_set_mode() less verbose
  libata: Fix ata_err_string()
  libata: Fix comment typo in ata_eh_analyze_tf()
  sata_nv: don't use block layer bounce buffer
  ata: hpt37x: Convert to use match_string() helper
</content>
</entry>
<entry>
<title>libata: convert core and drivers to -&gt;hw_tag usage</title>
<updated>2018-05-11T20:10:43Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2018-05-11T18:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e5b6260cc9ba84ec127f948173ff7d87581f029'/>
<id>urn:sha1:4e5b6260cc9ba84ec127f948173ff7d87581f029</id>
<content type='text'>
Anything that goes to the hardware should use -&gt;hw_tag, anything
related to internal lookup should be using -&gt;tag.

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>libahci: Allow drivers to override stop_engine</title>
<updated>2018-04-26T18:25:04Z</updated>
<author>
<name>Evan Wang</name>
</author>
<published>2018-04-13T04:32:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fa89f53bd7288d6aa7a982841119e7123faf5a53'/>
<id>urn:sha1:fa89f53bd7288d6aa7a982841119e7123faf5a53</id>
<content type='text'>
Marvell armada37xx, armada7k and armada8k share the same
AHCI sata controller IP, and currently there is an issue
(Errata Ref#226)that the SATA can not be detected via SATA
Port-MultiPlayer(PMP). After debugging, the reason is
found that the value of Port-x FIS-based Switching Control
(PxFBS@0x40) became wrong.
According to design, the bits[11:8, 0] of register PxFBS
are cleared when Port Command and Status (0x18) bit[0]
changes its value from 1 to 0, i.e. falling edge of Port
Command and Status bit[0] sends PULSE that resets PxFBS
bits[11:8; 0].
So it needs save the port PxFBS register before PxCMD
ST write and restore the port PxFBS register afterwards
in ahci_stop_engine().

This commit allows drivers to override ahci_stop_engine
behavior for use by the Marvell AHCI driver(and potentially
other drivers in the future).

Signed-off-by: Evan Wang &lt;xswang@marvell.com&gt;
Cc: Ofer Heifetz &lt;oferh@marvell.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>ahci: Add check for device presence (PCIe hot unplug) in ahci_stop_engine()</title>
<updated>2018-02-12T17:17:23Z</updated>
<author>
<name>Stefan Roese</name>
</author>
<published>2018-01-30T10:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b61e5121d5c4d0ea79fe90ced8df2fe5cb67dc2'/>
<id>urn:sha1:3b61e5121d5c4d0ea79fe90ced8df2fe5cb67dc2</id>
<content type='text'>
Exit directly with ENODEV, if the AHCI controller is not available
anymore. Otherwise a delay of 500ms for each port is added to the remove
function while trying to issue a command on the non-existent controller.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>ahci: Convert timers to use timer_setup()</title>
<updated>2017-10-19T21:15:16Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2017-10-16T21:56:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1843594c56bd79598a7ca4e6f7b6173e7d71b941'/>
<id>urn:sha1:1843594c56bd79598a7ca4e6f7b6173e7d71b941</id>
<content type='text'>
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly. Adds a pointer back to link
structure.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: linux-ide@vger.kernel.org
Link: https://lkml.kernel.org/r/20171016215658.GA101965@beast

</content>
</entry>
<entry>
<title>libata: Add the AHCI_HFLAG_NO_WRITE_TO_RO flag</title>
<updated>2017-06-22T20:12:59Z</updated>
<author>
<name>Doug Berger</name>
</author>
<published>2017-06-21T23:20:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7fab72f85d862572ed3281860dc550b7e737ac52'/>
<id>urn:sha1:7fab72f85d862572ed3281860dc550b7e737ac52</id>
<content type='text'>
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: Doug Berger &lt;opendmb@gmail.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>libata: Add the AHCI_HFLAG_YES_ALPM flag</title>
<updated>2017-06-22T20:12:59Z</updated>
<author>
<name>Doug Berger</name>
</author>
<published>2017-06-21T23:20:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ef0da1bf767d9e557c6375c7066717eead54cb15'/>
<id>urn:sha1:ef0da1bf767d9e557c6375c7066717eead54cb15</id>
<content type='text'>
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: Doug Berger &lt;opendmb@gmail.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
</feed>
