mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Niklas Cassel <niklas.cassel@axis.com>
To: <bhelgaas@google.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
	Joao Pinto <Joao.Pinto@synopsys.com>, <jingoohan1@gmail.com>,
	<linux-arm-kernel@axis.com>, <linux-pci@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI: dwc: fix crash seen due to missing ops
Date: Wed, 29 Mar 2017 13:21:05 +0200	[thread overview]
Message-ID: <a0b82abc-b2ac-ea76-3f24-c580187c0a0e@axis.com> (raw)
In-Reply-To: <0aec14f1-619a-e6a2-2e1c-1230e373a551@ti.com>

Hello Bjorn


I think that it might be a good idea to include this for v4.11.
PCIe for artpec-6 SoC works fine on v4.10, if we manage to
include this before v4.11 gets released, PCIe for artpec-6 SoC
will work fine on v4.11 too.


Regards,
Niklas

On 03/27/2017 07:43 AM, Kishon Vijay Abraham I wrote:
(snip)
>>
>> Hello Joao
>>
>> Since commit 442ec4c04d12, we now have two different ops,
>> dw_pcie_ops (ops for dw_pcie) and dw_pcie_host_ops (ops for a pcie_port),
>> note that they are different. The dw_pcie_ops is missing for pcie-artpec6
>> and pcie-designware-plat (since we are using the generic link-up function).
>>
>> Before commit 442ec4c04d12, dw_pcie_writel_dbi had dw_pcie_host_ops as
>> parameter, after the commit it has dw_pcie_ops as parameter.
>> It should crash on pcie-designware-plat as well, since there are other
>> functions, like dw_pcie_link_up, that assumes that pci->ops != null.
>>
>> Another alternative to adding the dummy ops would be to add null checks
>> for all uses off pci->ops in pcie-designware.c.
>> I don't like the idea to sprinkle null checks everywhere pci->ops is used.
> 
> I'm okay either ways.
> 
> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
> 
>>
>> One could add a null check in dw_pcie_host_init, but without a dummy ops
>> we would still fail this check, so our drivers would still be non-functional
>> in Linus's tree.
>>

  reply	other threads:[~2017-03-29 11:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 14:43 Niklas Cassel
2017-03-22 15:47 ` Joao Pinto
2017-03-23  7:40   ` Niklas Cassel
2017-03-27  5:43     ` Kishon Vijay Abraham I
2017-03-29 11:21       ` Niklas Cassel [this message]
     [not found]   ` <e6cf73c0-f930-c29a-8caa-843320ec5f8a@axis.com>
2017-03-27 16:26     ` Joao Pinto
2017-04-03 23:15 ` Bjorn Helgaas
2017-04-04  7:54   ` Niklas Cassel
2017-04-04 13:54     ` Bjorn Helgaas

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=a0b82abc-b2ac-ea76-3f24-c580187c0a0e@axis.com \
    --to=niklas.cassel@axis.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=bhelgaas@google.com \
    --cc=jingoohan1@gmail.com \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.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

all inboxes | Powered by JetHome®