diff mbox series

[v2,3/3] staging: mt7621-pci: set end limit for 'ioport_resource'

Message ID 20210822161005.22467-4-sergio.paracuellos@gmail.com (mailing list archive)
State Superseded
Headers show
Series MIPS: ralink: properly handle pci IO resources | expand

Commit Message

Sergio Paracuellos Aug. 22, 2021, 4:10 p.m. UTC
We have increase IO_SPACE_LIMIT for ralink platform to get PCI IO resources
properly handled using PCI core APIs. To align those changes with driver
code we have to set 'ioport_resource' end limit to IO_SPACE_LIMIT to avoid
errors.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/mt7621-pci/pci-mt7621.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Greg KH Aug. 27, 2021, 9:01 a.m. UTC | #1
On Sun, Aug 22, 2021 at 06:10:05PM +0200, Sergio Paracuellos wrote:
> We have increase IO_SPACE_LIMIT for ralink platform to get PCI IO resources
> properly handled using PCI core APIs. To align those changes with driver
> code we have to set 'ioport_resource' end limit to IO_SPACE_LIMIT to avoid
> errors.
> 
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos Aug. 29, 2021, 3:14 p.m. UTC | #2
On Fri, Aug 27, 2021 at 11:01 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Sun, Aug 22, 2021 at 06:10:05PM +0200, Sergio Paracuellos wrote:
> > We have increase IO_SPACE_LIMIT for ralink platform to get PCI IO resources
> > properly handled using PCI core APIs. To align those changes with driver
> > code we have to set 'ioport_resource' end limit to IO_SPACE_LIMIT to avoid
> > errors.
> >
> > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Thanks. Since I am planning to move 'mt7621-pci' from staging to
'drivers/pci/controller' and send v3 after the next merge window, I
prefer this patch to go through the staging tree. For the other two I
don't have any preference and it is ok for me to go through mips or
pci trees. So, Bjorn and Thomas is up to you if you are ok with the
changes.

Thanks in advance for your time.

Best regards,
    Sergio Paracuellos
Greg KH Sept. 2, 2021, 9:15 a.m. UTC | #3
On Sun, Aug 29, 2021 at 05:14:27PM +0200, Sergio Paracuellos wrote:
> On Fri, Aug 27, 2021 at 11:01 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Sun, Aug 22, 2021 at 06:10:05PM +0200, Sergio Paracuellos wrote:
> > > We have increase IO_SPACE_LIMIT for ralink platform to get PCI IO resources
> > > properly handled using PCI core APIs. To align those changes with driver
> > > code we have to set 'ioport_resource' end limit to IO_SPACE_LIMIT to avoid
> > > errors.
> > >
> > > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> >
> > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> Thanks. Since I am planning to move 'mt7621-pci' from staging to
> 'drivers/pci/controller' and send v3 after the next merge window, I
> prefer this patch to go through the staging tree. For the other two I
> don't have any preference and it is ok for me to go through mips or
> pci trees. So, Bjorn and Thomas is up to you if you are ok with the
> changes.

Yes, I would need acks for the other patches in the series if this is to
come through the staging tree.

thanks,

greg k-h
Sergio Paracuellos Sept. 2, 2021, 10:15 a.m. UTC | #4
On Thu, Sep 2, 2021 at 11:15 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Sun, Aug 29, 2021 at 05:14:27PM +0200, Sergio Paracuellos wrote:
> > On Fri, Aug 27, 2021 at 11:01 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > >
> > > On Sun, Aug 22, 2021 at 06:10:05PM +0200, Sergio Paracuellos wrote:
> > > > We have increase IO_SPACE_LIMIT for ralink platform to get PCI IO resources
> > > > properly handled using PCI core APIs. To align those changes with driver
> > > > code we have to set 'ioport_resource' end limit to IO_SPACE_LIMIT to avoid
> > > > errors.
> > > >
> > > > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > >
> > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> > Thanks. Since I am planning to move 'mt7621-pci' from staging to
> > 'drivers/pci/controller' and send v3 after the next merge window, I
> > prefer this patch to go through the staging tree. For the other two I
> > don't have any preference and it is ok for me to go through mips or
> > pci trees. So, Bjorn and Thomas is up to you if you are ok with the
> > changes.
>
> Yes, I would need acks for the other patches in the series if this is to
> come through the staging tree.

Yes, I know it. Let's wait for Thomas and Bjorn preference for those
remaining two.

Best regards,
    Sergio Paracuellos
>
> thanks,
>
> greg k-h
Thomas Bogendoerfer Sept. 2, 2021, 11:08 a.m. UTC | #5
On Thu, Sep 02, 2021 at 12:15:12PM +0200, Sergio Paracuellos wrote:
> On Thu, Sep 2, 2021 at 11:15 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Sun, Aug 29, 2021 at 05:14:27PM +0200, Sergio Paracuellos wrote:
> > > On Fri, Aug 27, 2021 at 11:01 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > >
> > > > On Sun, Aug 22, 2021 at 06:10:05PM +0200, Sergio Paracuellos wrote:
> > > > > We have increase IO_SPACE_LIMIT for ralink platform to get PCI IO resources
> > > > > properly handled using PCI core APIs. To align those changes with driver
> > > > > code we have to set 'ioport_resource' end limit to IO_SPACE_LIMIT to avoid
> > > > > errors.
> > > > >
> > > > > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > >
> > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > >
> > > Thanks. Since I am planning to move 'mt7621-pci' from staging to
> > > 'drivers/pci/controller' and send v3 after the next merge window, I
> > > prefer this patch to go through the staging tree. For the other two I
> > > don't have any preference and it is ok for me to go through mips or
> > > pci trees. So, Bjorn and Thomas is up to you if you are ok with the
> > > changes.
> >
> > Yes, I would need acks for the other patches in the series if this is to
> > come through the staging tree.
> 
> Yes, I know it. Let's wait for Thomas and Bjorn preference for those
> remaining two.

I've sent my acked-by for the MIPS patch. 

Thomas.
Sergio Paracuellos Sept. 2, 2021, 11:19 a.m. UTC | #6
On Thu, Sep 2, 2021 at 1:08 PM Thomas Bogendoerfer
<tsbogend@alpha.franken.de> wrote:
>
> On Thu, Sep 02, 2021 at 12:15:12PM +0200, Sergio Paracuellos wrote:
> > On Thu, Sep 2, 2021 at 11:15 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > >
> > > On Sun, Aug 29, 2021 at 05:14:27PM +0200, Sergio Paracuellos wrote:
> > > > On Fri, Aug 27, 2021 at 11:01 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > > >
> > > > > On Sun, Aug 22, 2021 at 06:10:05PM +0200, Sergio Paracuellos wrote:
> > > > > > We have increase IO_SPACE_LIMIT for ralink platform to get PCI IO resources
> > > > > > properly handled using PCI core APIs. To align those changes with driver
> > > > > > code we have to set 'ioport_resource' end limit to IO_SPACE_LIMIT to avoid
> > > > > > errors.
> > > > > >
> > > > > > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > > >
> > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > >
> > > > Thanks. Since I am planning to move 'mt7621-pci' from staging to
> > > > 'drivers/pci/controller' and send v3 after the next merge window, I
> > > > prefer this patch to go through the staging tree. For the other two I
> > > > don't have any preference and it is ok for me to go through mips or
> > > > pci trees. So, Bjorn and Thomas is up to you if you are ok with the
> > > > changes.
> > >
> > > Yes, I would need acks for the other patches in the series if this is to
> > > come through the staging tree.
> >
> > Yes, I know it. Let's wait for Thomas and Bjorn preference for those
> > remaining two.
>
> I've sent my acked-by for the MIPS patch.

Thanks!

>
> Thomas.
>
> --
> Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
> good idea.                                                [ RFC1925, 2.3 ]
Greg KH Sept. 21, 2021, 3:28 p.m. UTC | #7
On Thu, Sep 02, 2021 at 01:19:53PM +0200, Sergio Paracuellos wrote:
> On Thu, Sep 2, 2021 at 1:08 PM Thomas Bogendoerfer
> <tsbogend@alpha.franken.de> wrote:
> >
> > On Thu, Sep 02, 2021 at 12:15:12PM +0200, Sergio Paracuellos wrote:
> > > On Thu, Sep 2, 2021 at 11:15 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > >
> > > > On Sun, Aug 29, 2021 at 05:14:27PM +0200, Sergio Paracuellos wrote:
> > > > > On Fri, Aug 27, 2021 at 11:01 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > > > >
> > > > > > On Sun, Aug 22, 2021 at 06:10:05PM +0200, Sergio Paracuellos wrote:
> > > > > > > We have increase IO_SPACE_LIMIT for ralink platform to get PCI IO resources
> > > > > > > properly handled using PCI core APIs. To align those changes with driver
> > > > > > > code we have to set 'ioport_resource' end limit to IO_SPACE_LIMIT to avoid
> > > > > > > errors.
> > > > > > >
> > > > > > > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > > > >
> > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > >
> > > > > Thanks. Since I am planning to move 'mt7621-pci' from staging to
> > > > > 'drivers/pci/controller' and send v3 after the next merge window, I
> > > > > prefer this patch to go through the staging tree. For the other two I
> > > > > don't have any preference and it is ok for me to go through mips or
> > > > > pci trees. So, Bjorn and Thomas is up to you if you are ok with the
> > > > > changes.
> > > >
> > > > Yes, I would need acks for the other patches in the series if this is to
> > > > come through the staging tree.
> > >
> > > Yes, I know it. Let's wait for Thomas and Bjorn preference for those
> > > remaining two.
> >
> > I've sent my acked-by for the MIPS patch.
> 
> Thanks!

Ok, I took patches 1 and 3 in my tree now.  Please submit patch 2 to the
PCI developers and maintainer, as that is up to them to take, not me.

thanks,

greg k-h
Sergio Paracuellos Sept. 21, 2021, 5:02 p.m. UTC | #8
On Tue, Sep 21, 2021 at 5:28 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Thu, Sep 02, 2021 at 01:19:53PM +0200, Sergio Paracuellos wrote:
> > On Thu, Sep 2, 2021 at 1:08 PM Thomas Bogendoerfer
> > <tsbogend@alpha.franken.de> wrote:
> > >
> > > On Thu, Sep 02, 2021 at 12:15:12PM +0200, Sergio Paracuellos wrote:
> > > > On Thu, Sep 2, 2021 at 11:15 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > > >
> > > > > On Sun, Aug 29, 2021 at 05:14:27PM +0200, Sergio Paracuellos wrote:
> > > > > > On Fri, Aug 27, 2021 at 11:01 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > > > > >
> > > > > > > On Sun, Aug 22, 2021 at 06:10:05PM +0200, Sergio Paracuellos wrote:
> > > > > > > > We have increase IO_SPACE_LIMIT for ralink platform to get PCI IO resources
> > > > > > > > properly handled using PCI core APIs. To align those changes with driver
> > > > > > > > code we have to set 'ioport_resource' end limit to IO_SPACE_LIMIT to avoid
> > > > > > > > errors.
> > > > > > > >
> > > > > > > > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > > > > >
> > > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > >
> > > > > > Thanks. Since I am planning to move 'mt7621-pci' from staging to
> > > > > > 'drivers/pci/controller' and send v3 after the next merge window, I
> > > > > > prefer this patch to go through the staging tree. For the other two I
> > > > > > don't have any preference and it is ok for me to go through mips or
> > > > > > pci trees. So, Bjorn and Thomas is up to you if you are ok with the
> > > > > > changes.
> > > > >
> > > > > Yes, I would need acks for the other patches in the series if this is to
> > > > > come through the staging tree.
> > > >
> > > > Yes, I know it. Let's wait for Thomas and Bjorn preference for those
> > > > remaining two.
> > >
> > > I've sent my acked-by for the MIPS patch.
> >
> > Thanks!
>
> Ok, I took patches 1 and 3 in my tree now.  Please submit patch 2 to the
> PCI developers and maintainer, as that is up to them to take, not me.

Ok, thanks. I will resend the remaining patch if that is needed. Only
one concern here, only with those two patches applied the driver is
totally broken since it needs the remaining PATCH to make all the pci
subsystem work. Is this ok?

Best regards,
    Sergio Paracuellos
>
> thanks,
>
> greg k-h
Greg KH Sept. 21, 2021, 5:08 p.m. UTC | #9
On Tue, Sep 21, 2021 at 07:02:55PM +0200, Sergio Paracuellos wrote:
> On Tue, Sep 21, 2021 at 5:28 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Thu, Sep 02, 2021 at 01:19:53PM +0200, Sergio Paracuellos wrote:
> > > On Thu, Sep 2, 2021 at 1:08 PM Thomas Bogendoerfer
> > > <tsbogend@alpha.franken.de> wrote:
> > > >
> > > > On Thu, Sep 02, 2021 at 12:15:12PM +0200, Sergio Paracuellos wrote:
> > > > > On Thu, Sep 2, 2021 at 11:15 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > > > >
> > > > > > On Sun, Aug 29, 2021 at 05:14:27PM +0200, Sergio Paracuellos wrote:
> > > > > > > On Fri, Aug 27, 2021 at 11:01 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > > > > > >
> > > > > > > > On Sun, Aug 22, 2021 at 06:10:05PM +0200, Sergio Paracuellos wrote:
> > > > > > > > > We have increase IO_SPACE_LIMIT for ralink platform to get PCI IO resources
> > > > > > > > > properly handled using PCI core APIs. To align those changes with driver
> > > > > > > > > code we have to set 'ioport_resource' end limit to IO_SPACE_LIMIT to avoid
> > > > > > > > > errors.
> > > > > > > > >
> > > > > > > > > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > > > > > >
> > > > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > > >
> > > > > > > Thanks. Since I am planning to move 'mt7621-pci' from staging to
> > > > > > > 'drivers/pci/controller' and send v3 after the next merge window, I
> > > > > > > prefer this patch to go through the staging tree. For the other two I
> > > > > > > don't have any preference and it is ok for me to go through mips or
> > > > > > > pci trees. So, Bjorn and Thomas is up to you if you are ok with the
> > > > > > > changes.
> > > > > >
> > > > > > Yes, I would need acks for the other patches in the series if this is to
> > > > > > come through the staging tree.
> > > > >
> > > > > Yes, I know it. Let's wait for Thomas and Bjorn preference for those
> > > > > remaining two.
> > > >
> > > > I've sent my acked-by for the MIPS patch.
> > >
> > > Thanks!
> >
> > Ok, I took patches 1 and 3 in my tree now.  Please submit patch 2 to the
> > PCI developers and maintainer, as that is up to them to take, not me.
> 
> Ok, thanks. I will resend the remaining patch if that is needed. Only
> one concern here, only with those two patches applied the driver is
> totally broken since it needs the remaining PATCH to make all the pci
> subsystem work. Is this ok?

Get the change acked by the PCI developers and I will be glad to also
take it through my tree :)
diff mbox series

Patch

diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index 691030e1a5ed..6301397c3987 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -522,6 +522,8 @@  static int mt7621_pci_probe(struct platform_device *pdev)
 	if (!dev->of_node)
 		return -ENODEV;
 
+	ioport_resource.end = IO_SPACE_LIMIT;
+
 	bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie));
 	if (!bridge)
 		return -ENOMEM;