All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jinpu Wang <jinpu.wang@ionos.com>
To: Changyuan Lyu <changyuanl@google.com>
Cc: Jack Wang <jinpu.wang@ionos.com>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, Igor Pylypiv <ipylypiv@google.com>
Subject: Re: [PATCH] scsi: pm80xx: Set stopped phy's linkrate to Disabled
Date: Sat, 9 Jul 2022 08:20:50 +0200	[thread overview]
Message-ID: <CAMGffEkqXWTrJN-hHj4UE+Fcdm-hDBO2Q++bPcd2wQhJjNiQiQ@mail.gmail.com> (raw)
In-Reply-To: <20220708205026.969161-1-changyuanl@google.com>

On Fri, Jul 8, 2022 at 10:50 PM Changyuan Lyu <changyuanl@google.com> wrote:
>
> Negotiated link rate needs to be updated to Disabled when phy is
> stopped.
>
> Reviewed-by: Igor Pylypiv <ipylypiv@google.com>
> Signed-off-by: Changyuan Lyu <changyuanl@google.com>
Acked-by: Jack Wang <jinpu.wang@ionso.com>
> ---
>  drivers/scsi/pm8001/pm80xx_hwi.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
> index 01c5e8ff4cc5..303cd05fec50 100644
> --- a/drivers/scsi/pm8001/pm80xx_hwi.c
> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c
> @@ -3723,8 +3723,12 @@ static int mpi_phy_stop_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)
>         pm8001_dbg(pm8001_ha, MSG, "phy:0x%x status:0x%x\n",
>                    phyid, status);
>         if (status == PHY_STOP_SUCCESS ||
> -               status == PHY_STOP_ERR_DEVICE_ATTACHED)
> +               status == PHY_STOP_ERR_DEVICE_ATTACHED) {
>                 phy->phy_state = PHY_LINK_DISABLE;
> +               phy->sas_phy.phy->negotiated_linkrate = SAS_PHY_DISABLED;
> +               phy->sas_phy.linkrate = SAS_PHY_DISABLED;
> +       }
> +
>         return 0;
>  }
>
> --
> 2.37.0.rc0.161.g10f37bed90-goog
>

  reply	other threads:[~2022-07-09  6:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 20:50 [PATCH] scsi: pm80xx: Set stopped phy's linkrate to Disabled Changyuan Lyu
2022-07-09  6:20 ` Jinpu Wang [this message]
2022-07-14  4:22 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMGffEkqXWTrJN-hHj4UE+Fcdm-hDBO2Q++bPcd2wQhJjNiQiQ@mail.gmail.com \
    --to=jinpu.wang@ionos.com \
    --cc=changyuanl@google.com \
    --cc=ipylypiv@google.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.