public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] pci: Add error values definitions from the kernel
Date: Fri, 8 Jan 2016 01:35:19 +0100	[thread overview]
Message-ID: <201601080135.20074.marex@denx.de> (raw)
In-Reply-To: <CAEUhbmXFic+TJ65PsTmR5X0mQJErex70f8w2GHSwxhwSsOY4NQ@mail.gmail.com>

On Friday, January 08, 2016 at 01:31:17 AM, Bin Meng wrote:
> On Fri, Jan 8, 2016 at 8:15 AM, Fabio Estevam <festevam@gmail.com> wrote:
> > On Thu, Jan 7, 2016 at 10:02 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> >> What new feature would benefit from this? These two PCIe drivers are
> >> non-DM drivers and DM PCI is not utilizing those error codes, instead
> >> DM PCI is using U-Boot standard error codes.
> > 
> > but what prevents DM PCI to use the kernel error codes in the future?
> > 
> > Returning PCIBIOS_DEVICE_NOT_FOUND when the config is invalid is a
> > common pattern in the kernel.
> > 
> > Take a look at these drivers:
> > 
> > drivers/pci/access.c
> > drivers/pci/host/pci-mvebu.c
> > drivers/pci/host/pci-xgene.c
> > drivers/pci/host/pcie-altera.c
> > drivers/pci/host/pcie-designware.c
> > drivers/pci/host/pcie-rcar.c
> > drivers/pci/xen-pcifront.c
> > 
> > I don't see why we can't do the same in U-boot.
> 
> I am sorry but this does not convince me. Kernel is using these codes,
> but I don't see any PCI library codes in kernel that actually parses
> these error codes.
> 
> > Feel free to submit a patch with your proposal and the maintainer can
> > then decide which one is more adequate for U-boot.
> 
> My points are:
> 1). These two drivers are non-DM drivers. We should start converting
> them to DM drivers first instead of adding new stuff which is only
> used by legacy drivers. I have pcie_layerscape on my TODO list.

This point is invalid, I see this patch series is just fixing bugs and
converting drivers to DM is _far_ beyond the scope of this series.

> 2). We should stick to the correct behavior. The PCIe controller is
> buggy that it cannot return 0xFFFFFFFF by hardware, like other
> controllers do. IMHO it's completely a horrible controller, that
> comments in ls_pcie_addr_valid() says: "Controller does not support
> multi-function in RC mode".

Can you elaborate on why do you think it is a horrible controller ?
Most of the controllers I saw used on ARM were this way.

> 3). If we want to align with kernel, I want to see a plan of at least
> adopting these error codes in DM PCI. This is something which is not
> clear for now.

No, this is again far beyond the scope of this series. I want PCI on iMX
and LS to work in the current release, period. So from my side, I want
these patches to go in.

> Simon, what's your opinion on this?
> 
> Regards,
> Bin

Best regards,
Marek Vasut

  reply	other threads:[~2016-01-08  0:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 20:53 [U-Boot] [PATCH 1/3] pci: Add error values definitions from the kernel Fabio Estevam
2016-01-06 20:53 ` [U-Boot] [PATCH 2/3] pcie_imx: Adjust the return value when imx_pcie_addr_valid() fails Fabio Estevam
2016-01-06 20:57   ` Marek Vasut
2016-01-06 20:53 ` [U-Boot] [PATCH 3/3] pcie_layerscape: Adjust the return value when ls_pcie_addr_valid() fails Fabio Estevam
2016-01-06 20:58   ` Marek Vasut
2016-01-06 20:57 ` [U-Boot] [PATCH 1/3] pci: Add error values definitions from the kernel Marek Vasut
2016-01-06 22:55 ` Tom Rini
2016-01-06 22:58   ` Fabio Estevam
2016-01-06 23:10     ` Tom Rini
2016-01-07  2:11 ` Bin Meng
2016-01-07 12:15   ` Fabio Estevam
2016-01-07 12:58     ` Bin Meng
2016-01-07 13:31       ` Fabio Estevam
2016-01-07 16:28         ` Tom Rini
2016-01-07 16:49           ` Fabio Estevam
2016-01-08  0:02             ` Bin Meng
2016-01-08  0:15               ` Fabio Estevam
2016-01-08  0:31                 ` Bin Meng
2016-01-08  0:35                   ` Marek Vasut [this message]
2016-01-08  1:10                     ` Bin Meng
2016-01-08  0:46         ` Bin Meng
2016-01-08  0:48           ` Bin Meng
2016-01-08  2:09           ` Fabio Estevam
2016-01-08  2:18             ` Bin Meng
2016-01-08  2:20               ` Fabio Estevam

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=201601080135.20074.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /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