From patchwork Thu Aug 17 21:41:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Pylypiv X-Patchwork-Id: 13357019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FFFBC678DC for ; Thu, 17 Aug 2023 21:42:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355402AbjHQVmS (ORCPT ); Thu, 17 Aug 2023 17:42:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355411AbjHQVmP (ORCPT ); Thu, 17 Aug 2023 17:42:15 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 287BAE4F for ; Thu, 17 Aug 2023 14:42:14 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-58d9e327d3aso3248447b3.3 for ; Thu, 17 Aug 2023 14:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1692308533; x=1692913333; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=v+rrO6HTqqDsTm5C1z5XWkCvc1Q/HYmHft2sQPTtiZ4=; b=WiBayU+xeTZYFTlgpRgzLdXSsMxGVgpocfyj4elHfeB6hFqOUr2M2yiju/DOupM5h+ WNBbIvkzQ80H86t429SSeJpM/DqY0OCydClkUo/wLtJZC/DcpVw08kcm/C5KWjOHak7d 5qRY7aalDaeVzo8n7jui3WvobA+6wjxj0Vt2U8LsuoZAANjhEjs9+BTo9GsyPpBRaToY ml51IabEQpHOrmRynuhFJsM3dlONjtrKqGYk1J9wKu5PdERp0gDu6M1+aU4xuDM5rplz HY54LPFuxnCn2XuwwG1tvQDSk5rfISbt/CDNi+CC0ALgFvpPwREqer7Scm5htccZ6RER Npfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692308533; x=1692913333; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=v+rrO6HTqqDsTm5C1z5XWkCvc1Q/HYmHft2sQPTtiZ4=; b=jdOmIAPfn0o/GQ+/NiXU8/uW8NPTyKNJwZyyl5yYu+24WnB+pGGIqkvXRQf9YE01Ey vEi/gybRGLnX6CPzJIvg16t4GkEoprecZFX/bv1PJaWuzp0gxX1xt5Y54bmKbRWmwSnq b4qylbVRwhiow7cOPC5k6dcOceUKX+NySQyJzOZnmtHyI9PHs73A/LbkMAHxE3lU3Dny 9UGXDfQuwZcy/Y3iWta31vql2J4WUOKw5Ssi/9EenR0mErd2IvDg7TI0KQdA6VQjsx5t u2Ave+qGJqylXy+WxYl6+Rvb7FsvUj24mnjs7Z9IMZ18x3Q99Nj9vP4fCKJlYSOpMiD9 bzRw== X-Gm-Message-State: AOJu0YzLWjJeyQ8Ha+cQmOOx2ypN4xdXlbRM/pt2FFYpww9VxU1GlsS1 YsnJko5xtdRHu6x4oE4wqb5efHbobphPpw== X-Google-Smtp-Source: AGHT+IEy2NaotI6PbdKngfOwI8nOsJ/KPhQIsAczB1BBHCvhT6CWVtc+6NPtV14QrZfvOk8i1C1fhhS7nC55wQ== X-Received: from ipylypiv.svl.corp.google.com ([2620:15c:2c5:13:ab26:9b32:155b:9418]) (user=ipylypiv job=sendgmr) by 2002:a81:ad27:0:b0:586:5d03:67d4 with SMTP id l39-20020a81ad27000000b005865d0367d4mr9499ywh.7.1692308533457; Thu, 17 Aug 2023 14:42:13 -0700 (PDT) Date: Thu, 17 Aug 2023 14:41:35 -0700 Mime-Version: 1.0 X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog Message-ID: <20230817214137.462044-1-ipylypiv@google.com> Subject: [PATCH 1/3] ata: libata: Introduce ata_qc_has_cdl() From: Igor Pylypiv To: "Martin K. Petersen" , "James E.J. Bottomley" , Damien Le Moal Cc: linux-scsi@vger.kernel.org, Niklas Cassel , Jack Wang , Igor Pylypiv Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Introduce the inline helper function ata_qc_has_cdl() to test if a queued command has a Command Duration Limits descriptor set. Signed-off-by: Igor Pylypiv --- include/linux/libata.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/libata.h b/include/linux/libata.h index 820f7a3a2749..bc7870f1f527 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -1062,6 +1062,11 @@ static inline bool ata_port_is_frozen(const struct ata_port *ap) return ap->pflags & ATA_PFLAG_FROZEN; } +static inline bool ata_qc_has_cdl(struct ata_queued_cmd *qc) +{ + return qc->flags & ATA_QCFLAG_HAS_CDL; +} + extern int ata_std_prereset(struct ata_link *link, unsigned long deadline); extern int ata_wait_after_reset(struct ata_link *link, unsigned long deadline, int (*check_ready)(struct ata_link *link)); From patchwork Thu Aug 17 21:41:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Pylypiv X-Patchwork-Id: 13357020 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FF89C64EDA for ; Thu, 17 Aug 2023 21:42:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355404AbjHQVmT (ORCPT ); Thu, 17 Aug 2023 17:42:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355412AbjHQVmR (ORCPT ); Thu, 17 Aug 2023 17:42:17 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F41F7E74 for ; Thu, 17 Aug 2023 14:42:15 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-589a89598ecso3202517b3.1 for ; Thu, 17 Aug 2023 14:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1692308535; x=1692913335; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=3Gr+HE0HI29yGs4yhno3y4U4Sf+3wseqtksrB8L7b/Y=; b=d+9vgMNVZG0Fa6Dy22kMMj1L1194GfthO29Af2y+dZAB1mo6R9C1SEx+BNBGDmEzpA jRXP8HdxJFymOms7H/QKcJttlT8oxYkKsctstLgdGT70MLOt2ogMxEAcFw9BNEOPxD6K Vc9dPMZl37MicCgY+GAvgnDRnetDhYv7Bk7SphagJYqS29aBdaTm2EctuTH6eYJVK2xV InVr1Q9oxfVIwa2/cWVPzXnt3VHwcthOnRLwKlmpRUqhbs9aS5G8cBI4XqHkILfC58AS c0CO17PylYbAbh2EFpXNnW4OjWzj3OfvtDSqZxbflElj/c0Nn8NA5qAA+fboCu1mludh 546g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692308535; x=1692913335; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3Gr+HE0HI29yGs4yhno3y4U4Sf+3wseqtksrB8L7b/Y=; b=I94ocz8G6cK3UWYTBPq58GI24zsNKpZZ+T2lBkezFB/ndPfog0u5IPuFCE4qqy1YCE 2eM/dqw9aJXOM279IMx5lmt7BHkGhxrz097hARimaBhCJyZjpMyX8UOXuG7Gs17GiL2G xhNRA6mwXnv76t3s4r5kKYsABjmbDA0z9lufNrvf59u1IwutAjpwXkabYZsxdlI+zotM yCk+Dp398KbbEqthLQspwK7TLfwLrVx2Z8dC08GO8A3u4W0ulQ2v/HYLDOPld6+4EjEL QZf8wk9GKtJ51Pw2Ac1e19bMOYALxVmeAyJlSB0NrX5SAoSRmh+ayBDpIAwZDgKILo7/ Ff9g== X-Gm-Message-State: AOJu0YwAtPJWbFp1KdXgFP4Gf5ovzK3ANvguS4tuETNgcRr+4uV1sNxO zNaJ4ZS/pkkZ1jPB31IiC9w4fgAGOTNotw== X-Google-Smtp-Source: AGHT+IGAh8dunc/mSq778DbIyvHKi1kR7Au4eY/FhBQ/OytkDBmienFhumo9es5Y0DzfTGPSIqZwK+IrX9djyg== X-Received: from ipylypiv.svl.corp.google.com ([2620:15c:2c5:13:ab26:9b32:155b:9418]) (user=ipylypiv job=sendgmr) by 2002:a81:ad56:0:b0:58c:aaed:7b1f with SMTP id l22-20020a81ad56000000b0058caaed7b1fmr8177ywk.3.1692308535277; Thu, 17 Aug 2023 14:42:15 -0700 (PDT) Date: Thu, 17 Aug 2023 14:41:36 -0700 In-Reply-To: <20230817214137.462044-1-ipylypiv@google.com> Mime-Version: 1.0 References: <20230817214137.462044-1-ipylypiv@google.com> X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog Message-ID: <20230817214137.462044-2-ipylypiv@google.com> Subject: [PATCH 2/3] scsi: libsas: Add return_fis_on_success to sas_ata_task From: Igor Pylypiv To: "Martin K. Petersen" , "James E.J. Bottomley" , Damien Le Moal Cc: linux-scsi@vger.kernel.org, Niklas Cassel , Jack Wang , Igor Pylypiv Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org For Command Duration Limits policy 0xD (command completes without an error) libata needs FIS in order to detect the ATA_SENSE bit and read the Sense Data for Successful NCQ Commands log (0Fh). Set return_fis_on_success for commands that have a CDL descriptor since any CDL descriptor can be configured with policy 0xD. Signed-off-by: Igor Pylypiv --- drivers/scsi/libsas/sas_ata.c | 3 +++ include/scsi/libsas.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 77714a495cbb..da67c4f671b2 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -207,6 +207,9 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) task->ata_task.use_ncq = ata_is_ncq(qc->tf.protocol); task->ata_task.dma_xfer = ata_is_dma(qc->tf.protocol); + /* CDL policy 0xD requires FIS for successful (no error) completions */ + task->ata_task.return_fis_on_success = ata_qc_has_cdl(qc); + if (qc->scsicmd) ASSIGN_SAS_TASK(qc->scsicmd, task); diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 159823e0afbf..9e2c69c13dd3 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -550,6 +550,7 @@ struct sas_ata_task { u8 use_ncq:1; u8 set_affil_pol:1; u8 stp_affil_pol:1; + u8 return_fis_on_success:1; u8 device_control_reg_update:1; From patchwork Thu Aug 17 21:41:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Pylypiv X-Patchwork-Id: 13357021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 141BCC677C4 for ; Thu, 17 Aug 2023 21:43:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355408AbjHQVmu (ORCPT ); Thu, 17 Aug 2023 17:42:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355407AbjHQVmU (ORCPT ); Thu, 17 Aug 2023 17:42:20 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED747E4F for ; Thu, 17 Aug 2023 14:42:18 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-d6ce0c4489bso327378276.2 for ; Thu, 17 Aug 2023 14:42:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1692308538; x=1692913338; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Qtl6EpumWNGPoRz7oaS5PTYvxovlVgZ6i46m27dXaq4=; b=cl7isfNShgcgUXX+bIwc6SL9TYZ+oE3/kJae10YUFS24BqiFrqqw+JQe70bvc3gg4n 6SwcN0j37z71dphycVkQPAa62jUnHMXwKMjmHDDIQcNPEXyy4USrNXpLR2uD33wXc0LO T9IJ0jTOsd1eBN0DNRL8AJ5TzOckT/mU/uA/J1F5evgf3CqLRIwqX4XHtoy59i4oa1o4 3beHdUhm/TuzoRgiwS/QOyEFzepYhCG1NBfFfh2+nk/sZPtPmZ28c+QWdPRkcxGsnTzr 8nGj74ponNusbpL0hjMRXXzptGkP12k/0Lk3xKCUKAjgf+EoUzQM2cLeuEg3h5Qk/DgR 4PUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692308538; x=1692913338; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Qtl6EpumWNGPoRz7oaS5PTYvxovlVgZ6i46m27dXaq4=; b=JiVNjAsqQZAlvHTWXYj+BCofPpNghNt8Hs1lAxvtKxGo76V+udRcCG0rWTNXPTT82k bx1aioS/+VWSe70jCcjZ4G+DUW9CDr44g4gRnOBcr8FrID/zYWkbnlNByfSWrXzsqODz FTYsJK8exwESnRWI8MjZC5tzCHXCqyIcXm6UwFM8brIGU8Md3QVici8eNgA1gU/g/gcO 0fnX0Is0dbBT/AtV+ObLb5XX1lBbH+AR5mkdGV3JWp2jl3YugGEeVu8cIqyEQ5dhi1mc +4LngO31PuOEtC4phAg97p2YOguZJGtLYngqo1s5rKG4QONOUf3S8l2NSOsf5EKEk3E8 lnfA== X-Gm-Message-State: AOJu0YxNsbCdPjhLv0mis3tCZPNxdrZ7wUmoAjihRuZrK/lqBDmQqkyH PAxvjGnyKoKKdwnKGqEYlwnsRY08hKNc7w== X-Google-Smtp-Source: AGHT+IHrRtetB/alA9IynLSO6i/2PCQBhpOYIoUI37adIRvWn3Xs+ORUb6jfqmp0nZ5s0YhUZQQ3Z5VOo5/hxQ== X-Received: from ipylypiv.svl.corp.google.com ([2620:15c:2c5:13:ab26:9b32:155b:9418]) (user=ipylypiv job=sendgmr) by 2002:a25:946:0:b0:d4f:638b:d806 with SMTP id u6-20020a250946000000b00d4f638bd806mr10595ybm.8.1692308538248; Thu, 17 Aug 2023 14:42:18 -0700 (PDT) Date: Thu, 17 Aug 2023 14:41:37 -0700 In-Reply-To: <20230817214137.462044-1-ipylypiv@google.com> Mime-Version: 1.0 References: <20230817214137.462044-1-ipylypiv@google.com> X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog Message-ID: <20230817214137.462044-3-ipylypiv@google.com> Subject: [PATCH 3/3] scsi: pm80xx: Set RETFIS when requested by libsas From: Igor Pylypiv To: "Martin K. Petersen" , "James E.J. Bottomley" , Damien Le Moal Cc: linux-scsi@vger.kernel.org, Niklas Cassel , Jack Wang , Igor Pylypiv Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org By default PM80xx HBAs return FIS only when a drive reports an error. The RETFIS bit forces the controller to populate FIS even when a drive reports no error. Signed-off-by: Igor Pylypiv --- drivers/scsi/pm8001/pm8001_hwi.c | 8 +++++--- drivers/scsi/pm8001/pm8001_hwi.h | 2 +- drivers/scsi/pm8001/pm80xx_hwi.c | 11 ++++++----- drivers/scsi/pm8001/pm80xx_hwi.h | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 73cd25f30ca5..255553dcadb9 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c @@ -4095,7 +4095,7 @@ static int pm8001_chip_sata_req(struct pm8001_hba_info *pm8001_ha, u32 hdr_tag, ncg_tag = 0; u64 phys_addr; u32 ATAP = 0x0; - u32 dir; + u32 dir, retfis; u32 opc = OPC_INB_SATA_HOST_OPSTART; memset(&sata_cmd, 0, sizeof(sata_cmd)); @@ -4124,8 +4124,10 @@ static int pm8001_chip_sata_req(struct pm8001_hba_info *pm8001_ha, sata_cmd.tag = cpu_to_le32(tag); sata_cmd.device_id = cpu_to_le32(pm8001_ha_dev->device_id); sata_cmd.data_len = cpu_to_le32(task->total_xfer_len); - sata_cmd.ncqtag_atap_dir_m = - cpu_to_le32(((ncg_tag & 0xff)<<16)|((ATAP & 0x3f) << 10) | dir); + retfis = task->ata_task.return_fis_on_success; + sata_cmd.retfis_ncqtag_atap_dir_m = + cpu_to_le32((retfis << 24) | ((ncg_tag & 0xff) << 16) | + ((ATAP & 0x3f) << 10) | dir); sata_cmd.sata_fis = task->ata_task.fis; if (likely(!task->ata_task.device_control_reg_update)) sata_cmd.sata_fis.flags |= 0x80;/* C=1: update ATA cmd reg */ diff --git a/drivers/scsi/pm8001/pm8001_hwi.h b/drivers/scsi/pm8001/pm8001_hwi.h index 961d0465b923..fc2127dcb58d 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.h +++ b/drivers/scsi/pm8001/pm8001_hwi.h @@ -515,7 +515,7 @@ struct sata_start_req { __le32 tag; __le32 device_id; __le32 data_len; - __le32 ncqtag_atap_dir_m; + __le32 retfis_ncqtag_atap_dir_m; struct host_to_dev_fis sata_fis; u32 reserved1; u32 reserved2; diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c index 39a12ee94a72..e839fb53f0e3 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.c +++ b/drivers/scsi/pm8001/pm80xx_hwi.c @@ -4457,7 +4457,7 @@ static int pm80xx_chip_sata_req(struct pm8001_hba_info *pm8001_ha, u64 phys_addr, end_addr; u32 end_addr_high, end_addr_low; u32 ATAP = 0x0; - u32 dir; + u32 dir, retfis; u32 opc = OPC_INB_SATA_HOST_OPSTART; memset(&sata_cmd, 0, sizeof(sata_cmd)); @@ -4487,6 +4487,7 @@ static int pm80xx_chip_sata_req(struct pm8001_hba_info *pm8001_ha, sata_cmd.tag = cpu_to_le32(tag); sata_cmd.device_id = cpu_to_le32(pm8001_ha_dev->device_id); sata_cmd.data_len = cpu_to_le32(task->total_xfer_len); + retfis = task->ata_task.return_fis_on_success; sata_cmd.sata_fis = task->ata_task.fis; if (likely(!task->ata_task.device_control_reg_update)) @@ -4502,8 +4503,8 @@ static int pm80xx_chip_sata_req(struct pm8001_hba_info *pm8001_ha, opc = OPC_INB_SATA_DIF_ENC_IO; /* set encryption bit */ - sata_cmd.ncqtag_atap_dir_m_dad = - cpu_to_le32(((ncg_tag & 0xff)<<16)| + sata_cmd.retfis_ncqtag_atap_dir_m_dad = + cpu_to_le32((retfis << 24) | ((ncg_tag & 0xff) << 16) | ((ATAP & 0x3f) << 10) | 0x20 | dir); /* dad (bit 0-1) is 0 */ /* fill in PRD (scatter/gather) table, if any */ @@ -4569,8 +4570,8 @@ static int pm80xx_chip_sata_req(struct pm8001_hba_info *pm8001_ha, "Sending Normal SATA command 0x%x inb %x\n", sata_cmd.sata_fis.command, q_index); /* dad (bit 0-1) is 0 */ - sata_cmd.ncqtag_atap_dir_m_dad = - cpu_to_le32(((ncg_tag & 0xff)<<16) | + sata_cmd.retfis_ncqtag_atap_dir_m_dad = + cpu_to_le32((retfis << 24) | ((ncg_tag & 0xff) << 16) | ((ATAP & 0x3f) << 10) | dir); /* fill in PRD (scatter/gather) table, if any */ diff --git a/drivers/scsi/pm8001/pm80xx_hwi.h b/drivers/scsi/pm8001/pm80xx_hwi.h index acf6e3005b84..eb8fd37b2066 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.h +++ b/drivers/scsi/pm8001/pm80xx_hwi.h @@ -731,7 +731,7 @@ struct sata_start_req { __le32 tag; __le32 device_id; __le32 data_len; - __le32 ncqtag_atap_dir_m_dad; + __le32 retfis_ncqtag_atap_dir_m_dad; struct host_to_dev_fis sata_fis; u32 reserved1; u32 reserved2; /* dword 11. rsvd for normal I/O. */