All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "libata: Fix ATA request sense" has been added to the 4.4-stable tree
@ 2017-02-04 10:22 gregkh
  2017-02-07  0:58 ` Damien Le Moal
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2017-02-04 10:22 UTC (permalink / raw)
  To: damien.lemoal, gregkh, tj; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    libata: Fix ATA request sense

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     libata-fix-ata-request-sense.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 2dae99558e86894e9e5dbf097477baaa5eb70134 Mon Sep 17 00:00:00 2001
From: Damien Le Moal <damien.lemoal@wdc.com>
Date: Mon, 19 Dec 2016 10:17:40 +0900
Subject: libata: Fix ATA request sense

From: Damien Le Moal <damien.lemoal@wdc.com>

commit 2dae99558e86894e9e5dbf097477baaa5eb70134 upstream.

For an ATA device supporting the sense data reporting feature set, a
failed command will trigger the execution of ata_eh_request_sense if
the result task file of the failed command has the ATA_SENSE bit set
(sense data available bit). ata_eh_request_sense executes the REQUEST
SENSE DATA EXT command to retrieve the sense data of the failed
command. On success of REQUEST SENSE DATA EXT, the ATA_SENSE bit will
NOT be set (the command succeeded) but ata_eh_request_sense
nevertheless tests the availability of sense data by testing that bit
presence in the result tf of the REQUEST SENSE DATA EXT command.  This
leads us to falsely assume that request sense data failed and to the
warning message:

atax.xx: request sense failed stat 50 emask 0

Upon success of REQUEST SENSE DATA EXT, set the ATA_SENSE bit in the
result task file command so that sense data can be returned by
ata_eh_request_sense.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/libata-core.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1692,6 +1692,8 @@ unsigned ata_exec_internal_sg(struct ata
 
 		if (qc->err_mask & ~AC_ERR_OTHER)
 			qc->err_mask &= ~AC_ERR_OTHER;
+	} else if (qc->tf.command == ATA_CMD_REQ_SENSE_DATA) {
+		qc->result_tf.command |= ATA_SENSE;
 	}
 
 	/* finish up */


Patches currently in stable-queue which might be from damien.lemoal@wdc.com are

queue-4.4/libata-fix-ata-request-sense.patch

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patch "libata: Fix ATA request sense" has been added to the 4.4-stable tree
  2017-02-04 10:22 Patch "libata: Fix ATA request sense" has been added to the 4.4-stable tree gregkh
@ 2017-02-07  0:58 ` Damien Le Moal
  2017-02-07 10:53   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Damien Le Moal @ 2017-02-07  0:58 UTC (permalink / raw)
  To: gregkh, tj; +Cc: stable, stable-commits

Greg,

On 2/4/17 19:22, gregkh@linuxfoundation.org wrote:
> 
> This is a note to let you know that I've just added the patch titled
> 
>     libata: Fix ATA request sense
> 
> to the 4.4-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

This patch fixes a problem with ATA_REQUEST_SENSE_DATA_EXT command
processing, which was first introduced by Hannes in kernel 4.7. I
checked the 4.4 stable tree and do not see a backport of this command
support to that kernel. So I think that this fix is not needed for
kernel 4.4 and the patch can be dropped.

Tejun,

Can you please confirm ?

Best regards.

-- 
Damien Le Moal, Ph.D.
Sr. Manager, System Software Research Group,
Western Digital Corporation
Damien.LeMoal@wdc.com
(+81) 0466-98-3593 (ext. 513593)
1 kirihara-cho, Fujisawa,
Kanagawa, 252-0888 Japan
www.wdc.com, www.hgst.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patch "libata: Fix ATA request sense" has been added to the 4.4-stable tree
  2017-02-07  0:58 ` Damien Le Moal
@ 2017-02-07 10:53   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2017-02-07 10:53 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: tj, stable, stable-commits

On Tue, Feb 07, 2017 at 09:58:41AM +0900, Damien Le Moal wrote:
> Greg,
> 
> On 2/4/17 19:22, gregkh@linuxfoundation.org wrote:
> > 
> > This is a note to let you know that I've just added the patch titled
> > 
> >     libata: Fix ATA request sense
> > 
> > to the 4.4-stable tree which can be found at:
> >     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> This patch fixes a problem with ATA_REQUEST_SENSE_DATA_EXT command
> processing, which was first introduced by Hannes in kernel 4.7. I
> checked the 4.4 stable tree and do not see a backport of this command
> support to that kernel. So I think that this fix is not needed for
> kernel 4.4 and the patch can be dropped.

Thanks for letting me know, I've now dropped this from the 4.4 stable
queue.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-07 10:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-04 10:22 Patch "libata: Fix ATA request sense" has been added to the 4.4-stable tree gregkh
2017-02-07  0:58 ` Damien Le Moal
2017-02-07 10:53   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.