From: Hannes Reinecke <hare@suse.de>
To: Chuck Tuffli <Chuck_Tuffli@pmc-sierra.com>
Cc: Jack Wang <jack_wang@usish.com>,
James Bottomley <jejb@kernel.org>,
linux-scsi@vger.kernel.org, lindar_liu <lindar_liu@usish.com>,
roy <roy_wang@usish.com>
Subject: Re: [PATCH v2] libsas: fix bug for vacant phy
Date: Wed, 29 Sep 2010 09:21:37 +0200 [thread overview]
Message-ID: <4CA2E901.9040908@suse.de> (raw)
In-Reply-To: <BE430C874DBA6841A75E65151DCC6E1C077DA147@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca>
Chuck Tuffli wrote:
> This fixes the issue I was seeing. Thanks!
>
> -----Original Message-----
> From: Jack Wang [mailto:jack_wang@usish.com]
> Sent: Sunday, September 19, 2010 10:52 PM
> To: 'Jack Wang'; Chuck Tuffli; 'James Bottomley'; linux-scsi@vger.kernel.org
> Cc: 'lindar_liu'; 'roy'
> Subject: [PATCH v2] libsas: fix bug for vacant phy
>
>
> Hi, James
>
> Please drop the previous patch and apply this new one.
> Attached patch fix following bugs reported by Chuck.
>
> Chuck
> Could you test if this solve your problem ?
>
> Jack -
> Signed-off-by: Jack Wang <jack_wang@usish.com>
>
> Signed-off-by: Lindar <lindar_liu@usish.com>
> ---
> sas_expander.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/sas_expander.c b/sas_expander.c
> index d1d86a6..f63dbea 100644
> --- a/sas_expander.c
> +++ b/sas_expander.c
> @@ -175,10 +175,10 @@ static void sas_set_ex_phy(struct domain_device *dev,
> int phy_id,
> switch (resp->result) {
> case SMP_RESP_PHY_VACANT:
> phy->phy_state = PHY_VACANT;
> - return;
> + break;
> default:
> phy->phy_state = PHY_NOT_PRESENT;
> - return;
> + break;
> case SMP_RESP_FUNC_ACC:
> phy->phy_state = PHY_EMPTY; /* do not know yet */
> break;
> @@ -209,7 +209,8 @@ static void sas_set_ex_phy(struct domain_device *dev,
> int phy_id,
> phy->phy->negotiated_linkrate = phy->linkrate;
>
> if (!rediscover)
> - sas_phy_add(phy->phy);
> + if (sas_phy_add(phy->phy))
> + sas_phy_free(phy->phy);
>
> SAS_DPRINTK("ex %016llx phy%02d:%c attached: %016llx\n",
> SAS_ADDR(dev->sas_addr), phy->phy_id,
Hmm. Shouldn't you avoid the message here if you entered the error
path? I guess the SAS phy isn't actually attached then.
So maybe the above statement should read:
if (!rediscover)
if (sas_phy_add(phy->phy)) {
sas_phy_free(phy->phy);
return;
}
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-09-29 7:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BE430C874DBA6841A75E65151DCC6E1C0699F1BA@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca>
[not found] ` <D8666BDF2F024F71B478BDCA08C7833D@usish.com.cn>
[not found] ` <BE430C874DBA6841A75E65151DCC6E1C0731F42F@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca>
2010-09-17 9:00 ` [PATCH ] libsas: fix lost sas phy free for vacant phy Jack Wang
2010-09-20 5:51 ` [PATCH v2] libsas: fix bug " Jack Wang
2010-09-20 18:32 ` Chuck Tuffli
2010-09-29 7:21 ` Hannes Reinecke [this message]
2010-09-28 8:01 ` Jack Wang
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=4CA2E901.9040908@suse.de \
--to=hare@suse.de \
--cc=Chuck_Tuffli@pmc-sierra.com \
--cc=jack_wang@usish.com \
--cc=jejb@kernel.org \
--cc=lindar_liu@usish.com \
--cc=linux-scsi@vger.kernel.org \
--cc=roy_wang@usish.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.