<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/ata.h, branch v3.16.46</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.46</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.46'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-03-24T10:00:50Z</updated>
<entry>
<title>libata: fix HDIO_GET_32BIT ioctl</title>
<updated>2016-03-24T10:00:50Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-02-11T13:16:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0270776443d0448eafd1a76031a1052f7b27b56b'/>
<id>urn:sha1:0270776443d0448eafd1a76031a1052f7b27b56b</id>
<content type='text'>
commit 287e6611ab1eac76c2c5ebf6e345e04c80ca9c61 upstream.

As reported by Soohoon Lee, the HDIO_GET_32BIT ioctl does not
work correctly in compat mode with libata.

I have investigated the issue further and found multiple problems
that all appeared with the same commit that originally introduced
HDIO_GET_32BIT handling in libata back in linux-2.6.8 and presumably
also linux-2.4, as the code uses "copy_to_user(arg, &amp;val, 1)" to copy
a 'long' variable containing either 0 or 1 to user space.

The problems with this are:

* On big-endian machines, this will always write a zero because it
  stores the wrong byte into user space.

* In compat mode, the upper three bytes of the variable are updated
  by the compat_hdio_ioctl() function, but they now contain
  uninitialized stack data.

* The hdparm tool calling this ioctl uses a 'static long' variable
  to store the result. This means at least the upper bytes are
  initialized to zero, but calling another ioctl like HDIO_GET_MULTCOUNT
  would fill them with data that remains stale when the low byte
  is overwritten. Fortunately libata doesn't implement any of the
  affected ioctl commands, so this would only happen when we query
  both an IDE and an ATA device in the same command such as
  "hdparm -N -c /dev/hda /dev/sda"

* The libata code for unknown reasons started using ATA_IOC_GET_IO32
  and ATA_IOC_SET_IO32 as aliases for HDIO_GET_32BIT and HDIO_SET_32BIT,
  while the ioctl commands that were added later use the normal
  HDIO_* names. This is harmless but rather confusing.

This addresses all four issues by changing the code to use put_user()
on an 'unsigned long' variable in HDIO_GET_32BIT, like the IDE subsystem
does, and by clarifying the names of the ioctl commands.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reported-by: Soohoon Lee &lt;Soohoon.Lee@f5.com&gt;
Tested-by: Soohoon Lee &lt;Soohoon.Lee@f5.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</content>
</entry>
<entry>
<title>libata: Add some missing command descriptions</title>
<updated>2013-10-27T12:40:39Z</updated>
<author>
<name>Robert Hancock</name>
<email>hancockrwd@gmail.com</email>
</author>
<published>2013-10-22T01:26:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3915c3b5b10cd127198c1f9e2aefff7808500d92'/>
<id>urn:sha1:3915c3b5b10cd127198c1f9e2aefff7808500d92</id>
<content type='text'>
Add some missing command enumerations from the ATA-8 ACS-3 spec into
include/linux/ata.h, and add the corresponding human-readable command
descriptions in libata-eh.c.

Signed-off-by: Robert Hancock &lt;hancockrwd@gmail.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>libata: Add support for SEND/RECEIVE FPDMA QUEUED</title>
<updated>2013-08-25T13:39:12Z</updated>
<author>
<name>Marc Carino</name>
<email>marc.ceeeee@gmail.com</email>
</author>
<published>2013-08-25T06:22:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ed36911c747c18525691c0aa0fbe6b918c8eac19'/>
<id>urn:sha1:ed36911c747c18525691c0aa0fbe6b918c8eac19</id>
<content type='text'>
Add support for the following ATA opcodes, which are present
in SATA 3.1 and T13 ATA ACS-3:

        SEND FPDMA QUEUED
        RECEIVE FPDMA QUEUED

Signed-off-by: Marc Carino &lt;marc.ceeeee@gmail.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>libata: move 'struct ata_taskfile' and friends from ata.h to libata.h</title>
<updated>2013-07-16T11:46:56Z</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sshtylyov@ru.mvista.com</email>
</author>
<published>2013-06-30T20:01:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dc34e7e1a701134c2639dc7af78dc91055616477'/>
<id>urn:sha1:dc34e7e1a701134c2639dc7af78dc91055616477</id>
<content type='text'>
Move 'struct ata_taskfile', ata_prot_flags() and their friends from
&lt;linux/ata.h&gt; to &lt;linux/libata.h&gt;. They were misplaced from the beginning,  as
&lt;linux/ata.h&gt; should cover ATA/ATAPI and related standards only -- to which the
aforementioned structure and function have only remote relation.

I would have moved 'enum ata_tf_protocols' closely related to 'struct
ata_taskfile' but it unfortunately gets used by 'drivers/ide/ide-ioctls.c'...

Signed-off-by: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>libata: Use integer return value for atapi_command_packet_set</title>
<updated>2013-04-03T23:33:40Z</updated>
<author>
<name>Shan Hai</name>
<email>shan.hai@windriver.com</email>
</author>
<published>2013-03-18T02:30:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d8668fcb0b257d9fdcfbe5c172a99b8d85e1cd82'/>
<id>urn:sha1:d8668fcb0b257d9fdcfbe5c172a99b8d85e1cd82</id>
<content type='text'>
The function returns type of ATAPI drives so it should return integer value.
The commit 4dce8ba94c7 (libata: Use 'bool' return value for ata_id_XXX) since
v2.6.39 changed the type of return value from int to bool, the change would
cause all of the ATAPI class drives to be treated as TYPE_TAPE and the
max_sectors of the drives to be set to 65535 because of the commit
f8d8e5799b7(libata: increase 128 KB / cmd limit for ATAPI tape drives), for the
function would return true for all ATAPI class drives and the TYPE_TAPE is
defined as 0x01.

Cc: stable@vger.kernel.org
Signed-off-by: Shan Hai &lt;shan.hai@windriver.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>[libata] replace sata_settings with devslp_timing</title>
<updated>2013-01-14T18:29:15Z</updated>
<author>
<name>Shane Huang</name>
<email>shane.huang@amd.com</email>
</author>
<published>2012-12-17T15:18:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=803739d25c2343da6d2f95eebdcbc08bf67097d4'/>
<id>urn:sha1:803739d25c2343da6d2f95eebdcbc08bf67097d4</id>
<content type='text'>
NCQ capability was used to check availability of SATA Settings page
from Identify Device Data Log, which contains DevSlp timing variables.
It does not work on some HDDs and leads to error messages.

IDENTIFY word 78 bit 5(Hardware Feature Control) can't work either
because it is only the sufficient condition of Identify Device data
log, not the necessary condition.

This patch replaced ata_device-&gt;sata_settings with -&gt;devslp_timing
to only save DevSlp timing variables(8 bytes), instead of the whole
SATA Settings page(512 bytes).

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=51881

Reported-by: Borislav Petkov &lt;bp@alien8.de&gt;
Signed-off-by: Shane Huang &lt;shane.huang@amd.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>ahci: implement aggressive SATA device sleep support</title>
<updated>2012-09-13T05:08:53Z</updated>
<author>
<name>Shane Huang</name>
<email>shane.huang@amd.com</email>
</author>
<published>2012-09-07T14:40:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=65fe1f0f66a57380229a4ced844188103135f37b'/>
<id>urn:sha1:65fe1f0f66a57380229a4ced844188103135f37b</id>
<content type='text'>
Device Sleep is a feature as described in AHCI 1.3.1 Technical Proposal.
This feature enables an HBA and SATA storage device to enter the DevSleep
interface state, enabling lower power SATA-based systems.

Aggressive Device Sleep enables the HBA to assert the DEVSLP signal as
soon as there are no commands outstanding to the device and the port
specific Device Sleep idle timer has expired. This enables autonomous
entry into the DevSleep interface state without waiting for software
in power sensitive systems.

This patch enables Aggressive Device Sleep only if both host controller
and device support it.

Tested on AMD reference board together with Device Sleep supported device
sample.

Signed-off-by: Shane Huang &lt;shane.huang@amd.com&gt;
Reviewed-by: Aaron Lu &lt;aaron.lwe@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>ata: define enum constants for IDENTIFY DEVICE</title>
<updated>2012-09-13T05:07:27Z</updated>
<author>
<name>Shane Huang</name>
<email>shane.huang@amd.com</email>
</author>
<published>2012-09-07T14:38:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=583661a89ed2e484bd295e7b4606099340478c38'/>
<id>urn:sha1:583661a89ed2e484bd295e7b4606099340478c38</id>
<content type='text'>
Define enumeration constants for IDENTIFY DEVICE words.

Signed-off-by: Shane Huang &lt;shane.huang@amd.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>libata: detect Device Attention support</title>
<updated>2012-06-29T15:38:17Z</updated>
<author>
<name>Lin Ming</name>
<email>ming.m.lin@intel.com</email>
</author>
<published>2012-06-25T08:13:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b1354cbb5bfce28f2e1ed28d77b362dfdfca638d'/>
<id>urn:sha1:b1354cbb5bfce28f2e1ed28d77b362dfdfca638d</id>
<content type='text'>
Add a new flag ATA_DFLAG_DA to indicate that device supports "Device
Attention".

Acked-by: Aaron Lu &lt;aaron.lu@amd.com&gt;
Signed-off-by: Lin Ming &lt;ming.m.lin@intel.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
<entry>
<title>libata: Use 'bool' return value for ata_id_XXX</title>
<updated>2011-03-15T06:42:32Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2011-03-14T07:54:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4dce8ba94c751dd25f1d9b2d35c04312b046e5d6'/>
<id>urn:sha1:4dce8ba94c751dd25f1d9b2d35c04312b046e5d6</id>
<content type='text'>
Most ata_id_XXX inlines are simple tests, so we should set
the return value to 'bool' here.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@pobox.com&gt;
</content>
</entry>
</feed>
