<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/ata/libata-sata.c, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-12-02T04:13:45Z</updated>
<entry>
<title>ata: replace snprintf in show functions with sysfs_emit</title>
<updated>2021-12-02T04:13:45Z</updated>
<author>
<name>Yang Guang</name>
</author>
<published>2021-11-30T00:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06d5d558f5a30582546dcbe9327601af867ce1c9'/>
<id>urn:sha1:06d5d558f5a30582546dcbe9327601af867ce1c9</id>
<content type='text'>
coccinelle report：
./drivers/ata/libata-sata.c:830:8-16:
WARNING: use scnprintf or sprintf

Use sysfs_emit instead of scnprintf or sprintf makes more sense.

Reported-by: Zeal Robot &lt;zealci@zte.com.cn&gt;
Signed-off-by: Yang Guang &lt;yang.guang5@zte.com.cn&gt;
Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
</content>
</entry>
<entry>
<title>ata: libata-sata: Declare ata_ncq_sdev_attrs static</title>
<updated>2021-11-18T05:34:25Z</updated>
<author>
<name>Damien Le Moal</name>
</author>
<published>2021-11-18T05:31:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cac7e8b5f5fa94e28d581fbb9e76cb1c0c7fd56a'/>
<id>urn:sha1:cac7e8b5f5fa94e28d581fbb9e76cb1c0c7fd56a</id>
<content type='text'>
Since ata_ncq_sdev_attrs is a local struct, declare it static. This
avoids a sparse warning at compile time.

Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
</content>
</entry>
<entry>
<title>scsi: ata: Switch to attribute groups</title>
<updated>2021-10-17T01:45:52Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2021-10-12T23:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3f69c7f629ff53c75f335754ea41426b8e095de'/>
<id>urn:sha1:c3f69c7f629ff53c75f335754ea41426b8e095de</id>
<content type='text'>
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.

Link: https://lore.kernel.org/r/20211012233558.4066756-3-bvanassche@acm.org
Acked-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: ata: Call scsi_done() directly</title>
<updated>2021-10-17T01:28:43Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2021-10-07T20:27:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58bf201dfc032eadbb31eaf817b467bed17f753d'/>
<id>urn:sha1:58bf201dfc032eadbb31eaf817b467bed17f753d</id>
<content type='text'>
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.

Link: https://lore.kernel.org/r/20211007202923.2174984-4-bvanassche@acm.org
Acked-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>libata: Introduce ncq_prio_supported sysfs sttribute</title>
<updated>2021-08-18T13:19:39Z</updated>
<author>
<name>Damien Le Moal</name>
</author>
<published>2021-08-16T01:44:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f91b8f54874300a8e3c6c89f39ce5a74a449f2c'/>
<id>urn:sha1:5f91b8f54874300a8e3c6c89f39ce5a74a449f2c</id>
<content type='text'>
Currently, the only way a user can determine if a SATA device supports
NCQ priority is to try to enable the use of this feature using the
ncq_prio_enable sysfs device attribute. If enabling the feature fails,
it is because the device does not support NCQ priority. Otherwise, the
feature is enabled and success indicates that the device supports NCQ
priority.

Improve this odd interface by introducing the read-only
ncq_prio_supported sysfs device attribute to indicate if a SATA device
supports NCQ priority. The value of this attribute reflects the status
of device flag ATA_DFLAG_NCQ_PRIO, which is set only for devices
supporting NCQ priority.

Add this new sysfs attribute to the device attributes group of libahci
and libata-sata.

Signed-off-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Link: https://lore.kernel.org/r/20210816014456.2191776-10-damien.lemoal@wdc.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>libata: cleanup NCQ priority handling</title>
<updated>2021-08-18T13:19:39Z</updated>
<author>
<name>Damien Le Moal</name>
</author>
<published>2021-08-16T01:44:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2360fa1812cd77e1de13d3cca789fbd23462b651'/>
<id>urn:sha1:2360fa1812cd77e1de13d3cca789fbd23462b651</id>
<content type='text'>
The ata device flag ATA_DFLAG_NCQ_PRIO indicates if a device supports
the NCQ Priority feature while the ATA_DFLAG_NCQ_PRIO_ENABLE device
flag indicates if the feature is enabled. Enabling NCQ priority use is
controlled by the user through the device sysfs attribute
ncq_prio_enable. As a result, the ATA_DFLAG_NCQ_PRIO flag should not be
cleared when ATA_DFLAG_NCQ_PRIO_ENABLE is not set as the device still
supports the feature even after the user disables it. This leads to the
following cleanups:
- In ata_build_rw_tf(), set a command high priority bit based on the
  ATA_DFLAG_NCQ_PRIO_ENABLE flag, not on the ATA_DFLAG_NCQ flag. That
  is, set a command high priority only if the user enabled NCQ priority
  use.
- In ata_dev_config_ncq_prio(), ATA_DFLAG_NCQ_PRIO should not be cleared
  if ATA_DFLAG_NCQ_PRIO_ENABLE is not set. If the device does not
  support NCQ priority, both ATA_DFLAG_NCQ_PRIO and
  ATA_DFLAG_NCQ_PRIO_ENABLE must be cleared.

With the above ata_dev_config_ncq_prio() change, ATA_DFLAG_NCQ_PRIO flag
is set on device scan and revalidation. There is no need to trigger a
device revalidation in ata_ncq_prio_enable_store() when the user enables
the use of NCQ priority. Remove the revalidation code from that funciton
to simplify it. Also change the return value from -EIO to -EINVAL when a
user tries to enable NCQ priority for a device that does not support
this feature.  While at it, also simplify ata_ncq_prio_enable_show().

Overall, there is no functional change introduced by this patch.

Signed-off-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Link: https://lore.kernel.org/r/20210816014456.2191776-7-damien.lemoal@wdc.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>ata: libata-sata: Fix function names in header comments</title>
<updated>2021-03-12T14:28:30Z</updated>
<author>
<name>Lee Jones</name>
</author>
<published>2021-02-01T14:39:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=842a5e584ee5bf9ecdb0c9a31c3dae18b9396ed4'/>
<id>urn:sha1:842a5e584ee5bf9ecdb0c9a31c3dae18b9396ed4</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/ata/libata-sata.c:1085: warning: expecting prototype for port_alloc(). Prototype was for ata_sas_port_alloc() instead
 drivers/ata/libata-sata.c:1140: warning: expecting prototype for ata_port_stop(). Prototype was for ata_sas_port_stop() instead

Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Tejun Heo &lt;htejun@gmail.com&gt;
Cc: linux-ide@vger.kernel.org
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>ata: move ata_eh_analyze_ncq_error() &amp; co. to libata-sata.c</title>
<updated>2020-03-26T16:28:20Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
</author>
<published>2020-03-26T15:58:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0ccd2511b6f70394b30f8290da8bfc723d6bc07'/>
<id>urn:sha1:a0ccd2511b6f70394b30f8290da8bfc723d6bc07</id>
<content type='text'>
* move ata_eh_analyze_ncq_error() and ata_eh_read_log_10h() to
  libata-sata.c

* add static inline for ata_eh_analyze_ncq_error() for
  CONFIG_SATA_HOST=n case (link-&gt;sactive is non-zero only if
  NCQ commands are actually queued so empty function body is
  sufficient)

Code size savings on m68k arch using (modified) atari_defconfig:

   text    data     bss     dec     hex filename
before:
  16164      18       0   16182    3f36 drivers/ata/libata-eh.o
after:
  15446      18       0   15464    3c68 drivers/ata/libata-eh.o

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>ata: start separating SATA specific code from libata-eh.c</title>
<updated>2020-03-26T16:28:20Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
</author>
<published>2020-03-26T15:58:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a695de27fca5cefce0d1d93bab681e35605fee55'/>
<id>urn:sha1:a695de27fca5cefce0d1d93bab681e35605fee55</id>
<content type='text'>
Start separating SATA specific code from libata-eh.c:

* move sata_async_notification() to libata-sata.c:

Code size savings on m68k arch using (modified) atari_defconfig:

   text    data     bss     dec     hex filename
before:
  16243      18       0   16261    3f85 drivers/ata/libata-eh.o
after:
  16164      18       0   16182    3f36 drivers/ata/libata-eh.o

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>ata: move ata_sas_*() to libata-sata.c</title>
<updated>2020-03-26T16:28:20Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
</author>
<published>2020-03-26T15:58:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=15964ff72832ee489ae9e31c4e1a924e80e05dcb'/>
<id>urn:sha1:15964ff72832ee489ae9e31c4e1a924e80e05dcb</id>
<content type='text'>
* un-inline:
  - ata_scsi_dump_cdb()
  - __ata_scsi_queuecmd()

* un-static:
  - ata_scsi_sdev_config()
  - ata_scsi_dev_config()
  - ata_scsi_dump_cdb()
  - __ata_scsi_queuecmd()

* move ata_sas_*() to libata-sata.c:

* add static inlines for CONFIG_SATA_HOST=n case for
  ata_sas_{allocate,free}_tag()

Code size savings on m68k arch using (modified) atari_defconfig:

   text    data     bss     dec     hex filename
before:
  19137      23     576   19736    4d18 drivers/ata/libata-scsi.o
after:
  18330      23     576   18929    49f1 drivers/ata/libata-scsi.o

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
