diff mbox

[2/2] ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_PACKET PIO mode command.

Message ID 1418748575-27301-3-git-send-email-stripathi@apm.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Suman Tripathi Dec. 16, 2014, 4:49 p.m. UTC
This patch addresses the issue with ATA_CMD_PACKET pio mode
command for enumeration and device detection with ATAPI devices.It is the
same issue as in patch

www.spinics.net/lists/linux-ide/msg49092.html

Signed-off-by: Suman Tripathi <stripathi@apm.com>
---
 drivers/ata/ahci_xgene.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

--
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Sergei Shtylyov Dec. 16, 2014, 5:33 p.m. UTC | #1
Hello.

On 12/16/2014 07:49 PM, Suman Tripathi wrote:

> This patch addresses the issue with ATA_CMD_PACKET pio mode
> command for enumeration and device detection with ATAPI devices.It is the
> same issue as in patch

> www.spinics.net/lists/linux-ide/msg49092.html

> Signed-off-by: Suman Tripathi <stripathi@apm.com>
> ---
>   drivers/ata/ahci_xgene.c | 12 +++++++-----
>   1 file changed, 7 insertions(+), 5 deletions(-)

> diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
> index 0ffd3c9..9730907 100644
> --- a/drivers/ata/ahci_xgene.c
> +++ b/drivers/ata/ahci_xgene.c
> @@ -125,10 +125,11 @@ static int xgene_ahci_restart_engine(struct ata_port *ap)
>    * xgene_ahci_qc_issue - Issue commands to the device
>    * @qc: Command to issue
>    *
> - * Due to Hardware errata for IDENTIFY DEVICE command, the controller cannot
> - * clear the BSY bit after receiving the PIO setup FIS. This results in the dma
> - * state machine goes into the CMFatalErrorUpdate state and locks up. By
> - * restarting the dma engine, it removes the controller out of lock up state.
> + * Due to Hardware errata for IDENTIFY DEVICE command and COMMAND PACKET

    Just PACKET.

> + * command of ATAPI protocol set, the controller cannot clear the BSY bit
> + * after receiving the PIO setup FIS. This results in the dma state machine

    DMA.

> + * goes into the CMFatalErrorUpdate state and locks up. By restarting the

    s/goes/going/.

> + * dma engine, it removes the controller out of lock up state.

    DMA again.

>    */
>   static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc)
>   {
[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov Dec. 17, 2014, 5:32 p.m. UTC | #2
Hello.

On 12/17/2014 08:21 AM, Suman Tripathi wrote:

>     This patch addresses the issue with ATA_CMD_PACKET pio mode
>     command for enumeration and device detection with ATAPI devices.It is the
>     same issue as in patch

    Ugh, HTML... Please stick to plain text when posting to the 
'vger.kernel.org' mailing lists (HTML mails are supposed to be ignored).

>     www.spinics.net/lists/linux-__ide/msg49092.html
>     <http://www.spinics.net/lists/linux-ide/msg49092.html>
>
>
>     Signed-off-by: Suman Tripathi <stripathi@apm.com <mailto:stripathi@apm.com>>
>     ---
>        drivers/ata/ahci_xgene.c | 12 +++++++-----
>        1 file changed, 7 insertions(+), 5 deletions(-)
>
>
>     diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
>     index 0ffd3c9..9730907 100644
>     --- a/drivers/ata/ahci_xgene.c
>     +++ b/drivers/ata/ahci_xgene.c
>     @@ -125,10 +125,11 @@ static int xgene_ahci_restart_engine(__struct
>     ata_port *ap)
>         * xgene_ahci_qc_issue - Issue commands to the device
>         * @qc: Command to issue
>         *
>     - * Due to Hardware errata for IDENTIFY DEVICE command, the controller cannot
>     - * clear the BSY bit after receiving the PIO setup FIS. This results in
>     the dma
>     - * state machine goes into the CMFatalErrorUpdate state and locks up. By
>     - * restarting the dma engine, it removes the controller out of lock up state.
>     + * Due to Hardware errata for IDENTIFY DEVICE command and COMMAND PACKET
>
>
>     Just PACKET.
>
>     + * command of ATAPI protocol set, the controller cannot clear the BSY bit
>     + * after receiving the PIO setup FIS. This results in the dma state machine
>
>
>     DMA.
>
>     + * goes into the CMFatalErrorUpdate state and locks up. By restarting the

>     s/goes/going/.

> [suman] : Didn't understand this. Do you mean to change to going ?

    It's a 'sed' command to replace "goes" by "going" IIRC. Yes. Also, 
s/locks/locking/.

> It is already goes there.

> [...]

> Thanks,
> with regards,
> suman

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov Dec. 29, 2014, 10:09 a.m. UTC | #3
Hello.

On 12/29/2014 8:35 AM, Suman Tripathi wrote:

>          This patch addresses the issue with ATA_CMD_PACKET pio mode
>          command for enumeration and device detection with ATAPI devices.It is the
>          same issue as in patch


>     Ugh, HTML... Please stick to plain text when posting to the
> 'vger.kernel.org <http://vger.kernel.org/>' mailing lists (HTML mails are
> supposed to be ignored).

>     www.spinics.net/lists/linux-____ide/msg49092.html
>     <http://www.spinics.net/lists/linux-__ide/msg49092.html>
>          <http://www.spinics.net/lists/__linux-ide/msg49092.html
>     <http://www.spinics.net/lists/linux-ide/msg49092.html>>

> This is something strange. I posted it in plain text only. Because when I do
> show original of the patch in gmail, it shows me the plaintext.
> Please help me out to figure the issue. I saw many other patches referred in
> the same way. I am sending the patch through git-send-email  that sends in
> plain text format only,

    The patch was OK, but your replies do use HTML (as well as plain text).

>          Signed-off-by: Suman Tripathi <stripathi@apm.com
>     <mailto:stripathi@apm.com> <mailto:stripathi@apm.com
>     <mailto:stripathi@apm.com>>>

> --
> Thanks,
> with regards,
> Suman Tripathi

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tejun Heo Jan. 5, 2015, 1:59 p.m. UTC | #4
On Tue, Dec 16, 2014 at 10:19:35PM +0530, Suman Tripathi wrote:
> This patch addresses the issue with ATA_CMD_PACKET pio mode
> command for enumeration and device detection with ATAPI devices.It is the
> same issue as in patch
> 
> www.spinics.net/lists/linux-ide/msg49092.html
> 
> Signed-off-by: Suman Tripathi <stripathi@apm.com>

Applied 1-2 to libata/for-3.18-fixes w/ Sergei's suggested edits.

Thanks.
Suman Tripathi Jan. 6, 2015, 8:21 a.m. UTC | #5
Hi

On Tue, Dec 16, 2014 at 10:19:35PM +0530, Suman Tripathi wrote:
> This patch addresses the issue with ATA_CMD_PACKET pio mode
> command for enumeration and device detection with ATAPI devices.It is the
> same issue as in patch
>
> www.spinics.net/lists/linux-ide/msg49092.html
>
> Signed-off-by: Suman Tripathi <stripathi@apm.com>

Applied 1-2 to libata/for-3.18-fixes w/ Sergei's suggested edits.

The patch is applied to libata/for-3.19-fixes not libata/for-3.18-fixes ??

On Mon, Jan 5, 2015 at 7:29 PM, Tejun Heo <tj@kernel.org> wrote:
> On Tue, Dec 16, 2014 at 10:19:35PM +0530, Suman Tripathi wrote:
>> This patch addresses the issue with ATA_CMD_PACKET pio mode
>> command for enumeration and device detection with ATAPI devices.It is the
>> same issue as in patch
>>
>> www.spinics.net/lists/linux-ide/msg49092.html
>>
>> Signed-off-by: Suman Tripathi <stripathi@apm.com>
>
> Applied 1-2 to libata/for-3.18-fixes w/ Sergei's suggested edits.
>
> Thanks.
>
> --
> tejun
Tejun Heo Jan. 6, 2015, 12:46 p.m. UTC | #6
On Tue, Jan 06, 2015 at 01:51:15PM +0530, Suman Tripathi wrote:
> Hi
> 
> On Tue, Dec 16, 2014 at 10:19:35PM +0530, Suman Tripathi wrote:
> > This patch addresses the issue with ATA_CMD_PACKET pio mode
> > command for enumeration and device detection with ATAPI devices.It is the
> > same issue as in patch
> >
> > www.spinics.net/lists/linux-ide/msg49092.html
> >
> > Signed-off-by: Suman Tripathi <stripathi@apm.com>
> 
> Applied 1-2 to libata/for-3.18-fixes w/ Sergei's suggested edits.
> 
> The patch is applied to libata/for-3.19-fixes not libata/for-3.18-fixes ??

Yeap, brainfart.  libata/for-3.19-fixes is the right one.

Thanks.
diff mbox

Patch

diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index 0ffd3c9..9730907 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -125,10 +125,11 @@  static int xgene_ahci_restart_engine(struct ata_port *ap)
  * xgene_ahci_qc_issue - Issue commands to the device
  * @qc: Command to issue
  *
- * Due to Hardware errata for IDENTIFY DEVICE command, the controller cannot
- * clear the BSY bit after receiving the PIO setup FIS. This results in the dma
- * state machine goes into the CMFatalErrorUpdate state and locks up. By
- * restarting the dma engine, it removes the controller out of lock up state.
+ * Due to Hardware errata for IDENTIFY DEVICE command and COMMAND PACKET
+ * command of ATAPI protocol set, the controller cannot clear the BSY bit
+ * after receiving the PIO setup FIS. This results in the dma state machine
+ * goes into the CMFatalErrorUpdate state and locks up. By restarting the
+ * dma engine, it removes the controller out of lock up state.
  */
 static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc)
 {
@@ -137,7 +138,8 @@  static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc)
 	struct xgene_ahci_context *ctx = hpriv->plat_data;
 	int rc = 0;

-	if (unlikely(ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA))
+	if (unlikely((ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA) ||
+	    (ctx->last_cmd[ap->port_no] == ATA_CMD_PACKET)))
 		xgene_ahci_restart_engine(ap);

 	rc = ahci_qc_issue(qc);