public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: chunfeng.yun@mediatek.com (Chunfeng Yun)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RESEND 1/2] phy: phy-mtk-tphy: fix NULL point of chip bank
Date: Fri, 22 Sep 2017 09:14:13 +0800	[thread overview]
Message-ID: <1506042853.17567.23.camel@mhfsdcap03> (raw)
In-Reply-To: <02a5e183-444a-bc75-2a4e-1337c9e7872e@ti.com>

On Thu, 2017-09-21 at 16:23 +0530, Kishon Vijay Abraham I wrote:
> 
> On Thursday 21 September 2017 04:01 PM, Chunfeng Yun wrote:
> > Chip bank of version-1 is initialized as NULL, but it's used
> > by pcie_phy_instance_power_on/off(), so assign it a right
> > address.
> 
> merged. How was this not noticed before?

The PCIe function was tested on mt2712 with tphy-v2, and didn't notice
this issue until tested it on mt7622 with tphy-v1.

Ashamed of myself for making such a rookie mistake.
> 
> Thanks
> Kishon
> > 
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> >  drivers/phy/mediatek/phy-mtk-tphy.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
> > index e3baad7..721a2a1 100644
> > --- a/drivers/phy/mediatek/phy-mtk-tphy.c
> > +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
> > @@ -27,6 +27,7 @@
> >  /* banks shared by multiple phys */
> >  #define SSUSB_SIFSLV_V1_SPLLC		0x000	/* shared by u3 phys */
> >  #define SSUSB_SIFSLV_V1_U2FREQ		0x100	/* shared by u2 phys */
> > +#define SSUSB_SIFSLV_V1_CHIP		0x300	/* shared by u3 phys */
> >  /* u2 phy bank */
> >  #define SSUSB_SIFSLV_V1_U2PHY_COM	0x000
> >  /* u3/pcie/sata phy banks */
> > @@ -762,7 +763,7 @@ static void phy_v1_banks_init(struct mtk_tphy *tphy,
> >  	case PHY_TYPE_USB3:
> >  	case PHY_TYPE_PCIE:
> >  		u3_banks->spllc = tphy->sif_base + SSUSB_SIFSLV_V1_SPLLC;
> > -		u3_banks->chip = NULL;
> > +		u3_banks->chip = tphy->sif_base + SSUSB_SIFSLV_V1_CHIP;
> >  		u3_banks->phyd = instance->port_base + SSUSB_SIFSLV_V1_U3PHYD;
> >  		u3_banks->phya = instance->port_base + SSUSB_SIFSLV_V1_U3PHYA;
> >  		break;
> > 

      reply	other threads:[~2017-09-22  1:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 10:31 [PATCH RESEND 1/2] phy: phy-mtk-tphy: fix NULL point of chip bank Chunfeng Yun
2017-09-21 10:31 ` [PATCH RESEND 2/2] phy: phy-mtk-tphy: add set_mode callback Chunfeng Yun
2017-09-21 10:53 ` [PATCH RESEND 1/2] phy: phy-mtk-tphy: fix NULL point of chip bank Kishon Vijay Abraham I
2017-09-22  1:14   ` Chunfeng Yun [this message]

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=1506042853.17567.23.camel@mhfsdcap03 \
    --to=chunfeng.yun@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox