linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jingoo Han" <jingoohan1@gmail.com>
To: "'Z.q. Hou'" <zhiqiang.hou@nxp.com>,
	"'Joao Pinto'" <Joao.Pinto@synopsys.com>,
	<linux-pci@vger.kernel.org>, <bhelgaas@google.com>
Subject: Re: [PATCH 1/3] PCI: designware: add accessors for write permission of DBI read-only registers
Date: Mon, 17 Jul 2017 15:41:21 -0400	[thread overview]
Message-ID: <000d01d2ff34$ab71cd30$02556790$@gmail.com> (raw)
In-Reply-To: <AM5PR0402MB2771C3717050F4D2D69EB74384AE0@AM5PR0402MB2771.eurprd04.prod.outlook.com>

On Tuesday, July 11, 2017 12:11 AM, Z.q. Hou wrote:
>=20
> Hi Bjorn,
>=20
> Due to all Freescale Layerscpe PCIe controllers have to fix the Class =
code,
> and this fixup existed in both Layerscape pcie driver and DWC common =
code,
> so I want to reuse the fixup in DWC common code.
> Can you give me any suggestion?

Please don't add your comment on top of the email.


>=20
> > -----Original Message-----
> > From: Joao Pinto [mailto:Joao.Pinto@synopsys.com]
> > Sent: 2017=E5=B9=B47=E6=9C=887=E6=97=A5 16:53
> > To: Z.q. Hou <zhiqiang.hou@nxp.com>; Joao Pinto
> > <Joao.Pinto@synopsys.com>; linux-pci@vger.kernel.org;
> > bhelgaas@google.com
> > Cc: jingoohan1@gmail.com
> > Subject: Re: [PATCH 1/3] PCI: designware: add accessors for write
> permission
> > of DBI read-only registers
> >
> >
> > Hi Zhiqiang,
> >
> > =C3=80s 4:48 AM de 7/7/2017, Z.q. Hou escreveu:
> > > Hi Joao,
> > >
> > >
> > >
> > > Thanks a lot for your comments!
> > >
> > >
> > >
> > >> -----Original Message-----
> > >
> > >> From: Joao Pinto [mailto:Joao.Pinto@synopsys.com]
> > >
> > >> Sent: 2017=E5=B9=B47=E6=9C=886=E6=97=A5 17:44
> > >
> > >> To: Z.q. Hou <zhiqiang.hou@nxp.com>; linux-pci@vger.kernel.org;
> > >
> > >> Joao.Pinto@synopsys.com
> > >
> > >> Cc: bhelgaas@google.com; jingoohan1@gmail.com
> > >
> > >> Subject: Re: [PATCH 1/3] PCI: designware: add accessors for write
> > >> permission
> > >
> > >> of DBI read-only registers
> > >
> > >>
> > >
> > >>
> > >
> > >> Hi Zhiqiang,
> > >
> > >>
> > >
> > >> =C3=80s 7:33 AM de 7/6/2017, Zhiqiang Hou escreveu:
> > >
> > >>> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> > >
> > >>>
> > >
> > >>> The read-only DBI registers can be written over the DBI when set =
the
> > >
> > >>> "Write to RO Registers Using DBI" (DBI_RO_WR_EN) field of the
> > >
> > >>> MISC_CONTROL_1_OFF register.
> > >
> > >>
> > >
> > >> I would suggest you to add a cover-letter next time to explain =
the
> > >> global
> > >
> > >> picture of the patch-set.
> > >
> > >
> > >
> > > Thanks, I will.
> > >
> > >
> > >
> > >>
> > >
> > >> I understand your need for this patch, but I don't agree on the
> approach.
> > >
> > >
> > >
> > > In the DWC common code, there is a function write a DBI read-only
> register
> > 'Device class code', and the first 2 patches is to fix it.
> > >
> > > The 3rd patch is to refactor the Layerscape PCIe driver's =
host_init
> function
> > and reuse the new added accessors.
> > >
> > >
> > >
> > >> Sometimes the people in charge of the hardware design /
> > >> configuration, forget
> > >
> > >> to specify the device class and that can be problematic for some
> > >> drivers, and
> > >
> > >> so the typical workaround is to set it in the driver using a =
quirk
> for example.
> > >
> > >>
> > >
> > >> You can see some examples here:
> > >
> > >> =
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__git.kernel.org_p
> > >> =
ub_scm_linux_kernel_git_torvalds_linux.git_tree_drivers_&d=3DDwIGaQ&c=3DD=

> > >>
> > PL6_X_6JkXFx7AXWqB0tg&r=3Ds2fO0hii0OGNOv9qQy_HRXy-xAJUD1NNoEcc3io
> > _kx0&m
> > >>
> > =3D0DrBCvOc_J7LaMXBei1qCXxxfbLxWaVErKZ6Rkm6bUc&s=3DsOEmExQFqrCEmpA
> > x9LjSeK
> > >> RvkW1D-W82ckX5WGCgFWw&e=3D
> > >
> > >> pci/quirks.c
> > >
> > >
> > >
> > > I don't know the PCI quirks, do you mean remove the pci Device =
Class
> fix
> > code from the DWC common code and add it to quirks?
> > >
> >
> > In my opinion adding fixes to a common code is not a good approach. =
I
> would
> > suggest the fix to go into the quirks file.

Your answer should be added to here.
Then, it will help other people follow this email thread.

Best regards,
Jingoo Han

> >
> > @Bjorn: The quirks file is the best place for this type of fixes =
right?
>=20
> Thanks,
> Zhiqiang
>=20

  reply	other threads:[~2017-07-17 19:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06  6:33 [PATCH 1/3] PCI: designware: add accessors for write permission of DBI read-only registers Zhiqiang Hou
2017-07-06  6:33 ` [PATCH 2/3] PCI: designware: enable write permission before updating class code Zhiqiang Hou
2017-07-06  6:33 ` [PATCH 3/3] PCI: layerscape: refactor the host_init function Zhiqiang Hou
2017-08-02 21:11   ` Bjorn Helgaas
2017-08-03  3:17     ` Z.q. Hou
2017-07-06  9:44 ` [PATCH 1/3] PCI: designware: add accessors for write permission of DBI read-only registers Joao Pinto
2017-07-07  3:48   ` Z.q. Hou
2017-07-07  8:53     ` Joao Pinto
2017-07-11  4:11       ` Z.q. Hou
2017-07-17 19:41         ` Jingoo Han [this message]
2017-07-18  3:00           ` Z.q. Hou
2017-08-02 21:25   ` Bjorn Helgaas
2017-08-03  3:25     ` Z.q. Hou

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='000d01d2ff34$ab71cd30$02556790$@gmail.com' \
    --to=jingoohan1@gmail.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=zhiqiang.hou@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).