* [PATCH 0/2] MCB Update for v4.17 @ 2018-02-27 13:30 Johannes Thumshirn 2018-02-27 13:30 ` [PATCH 1/2] PCI: add vendor id for Altera Johannes Thumshirn 2018-02-27 13:30 ` [PATCH 2/2] mcb: add Altera PCI ID to mcb-pci Johannes Thumshirn 0 siblings, 2 replies; 9+ messages in thread From: Johannes Thumshirn @ 2018-02-27 13:30 UTC (permalink / raw) To: Greg KH; +Cc: Linux Kernel Mailinglist, Michael Moese, Johannes Thumshirn Hi Greg, here's a small mcb update for the 4.17 window. The first patch makes the PCI Vendor ID of Altera generally available in pci_ids.h and removes it from the two private implementations before I would have to add a 3rd one. The 2nd patch adds the Altera's PCI vendor ID to the mcb pci driver which enables at least one carrier board. This was reported and tested by Ben Turner. Johannes Thumshirn (2): PCI: add vendor id for Altera mcb: add Altera PCI ID to mcb-pci drivers/char/xillybus/xillybus_pcie.c | 2 +- drivers/fpga/altera-cvp.c | 3 +-- drivers/mcb/mcb-pci.c | 2 ++ include/linux/pci_ids.h | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) -- 2.13.6 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] PCI: add vendor id for Altera 2018-02-27 13:30 [PATCH 0/2] MCB Update for v4.17 Johannes Thumshirn @ 2018-02-27 13:30 ` Johannes Thumshirn 2018-02-27 15:32 ` Andy Shevchenko 2018-02-27 13:30 ` [PATCH 2/2] mcb: add Altera PCI ID to mcb-pci Johannes Thumshirn 1 sibling, 1 reply; 9+ messages in thread From: Johannes Thumshirn @ 2018-02-27 13:30 UTC (permalink / raw) To: Greg KH Cc: Linux Kernel Mailinglist, Michael Moese, Johannes Thumshirn, Bjorn Helgaas, Eli Billauer, Anatolij Gustschin Add the Altera PCI Vendor id to pci_ids.h and remove the private definitions from xillybus_pcie.c and altera-cvp.c. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Eli Billauer <eli.billauer@gmail.com> Cc: Anatolij Gustschin <agust@denx.de> --- drivers/char/xillybus/xillybus_pcie.c | 2 +- drivers/fpga/altera-cvp.c | 3 +-- include/linux/pci_ids.h | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/char/xillybus/xillybus_pcie.c b/drivers/char/xillybus/xillybus_pcie.c index dff2d1538164..b888f7c44a09 100644 --- a/drivers/char/xillybus/xillybus_pcie.c +++ b/drivers/char/xillybus/xillybus_pcie.c @@ -13,6 +13,7 @@ #include <linux/module.h> #include <linux/pci.h> #include <linux/pci-aspm.h> +#include <linux/pci_ids.h> #include <linux/slab.h> #include "xillybus.h" @@ -24,7 +25,6 @@ MODULE_LICENSE("GPL v2"); #define PCI_DEVICE_ID_XILLYBUS 0xebeb -#define PCI_VENDOR_ID_ALTERA 0x1172 #define PCI_VENDOR_ID_ACTEL 0x11aa #define PCI_VENDOR_ID_LATTICE 0x1204 diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c index 00e73d28077c..53ee426d425f 100644 --- a/drivers/fpga/altera-cvp.c +++ b/drivers/fpga/altera-cvp.c @@ -23,6 +23,7 @@ #include <linux/fpga/fpga-mgr.h> #include <linux/module.h> #include <linux/pci.h> +#include <linux/pci_ids.h> #include <linux/sizes.h> #define CVP_BAR 0 /* BAR used for data transfer in memory mode */ @@ -384,8 +385,6 @@ static int altera_cvp_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id); static void altera_cvp_remove(struct pci_dev *pdev); -#define PCI_VENDOR_ID_ALTERA 0x1172 - static struct pci_device_id altera_cvp_id_tbl[] = { { PCI_VDEVICE(ALTERA, PCI_ANY_ID) }, { } diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index a6b30667a331..6a96a70fb462 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1561,6 +1561,8 @@ #define PCI_DEVICE_ID_SERVERWORKS_CSB6LPC 0x0227 #define PCI_DEVICE_ID_SERVERWORKS_HT1100LD 0x0408 +#define PCI_VENDOR_ID_ALTERA 0x1172 + #define PCI_VENDOR_ID_SBE 0x1176 #define PCI_DEVICE_ID_SBE_WANXL100 0x0301 #define PCI_DEVICE_ID_SBE_WANXL200 0x0302 -- 2.13.6 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] PCI: add vendor id for Altera 2018-02-27 13:30 ` [PATCH 1/2] PCI: add vendor id for Altera Johannes Thumshirn @ 2018-02-27 15:32 ` Andy Shevchenko 2018-02-27 15:42 ` Johannes Thumshirn 0 siblings, 1 reply; 9+ messages in thread From: Andy Shevchenko @ 2018-02-27 15:32 UTC (permalink / raw) To: Johannes Thumshirn Cc: Greg KH, Linux Kernel Mailinglist, Michael Moese, Bjorn Helgaas, Eli Billauer, Anatolij Gustschin On Tue, Feb 27, 2018 at 3:30 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote: > Add the Altera PCI Vendor id to pci_ids.h and remove the private > definitions from xillybus_pcie.c and altera-cvp.c. > #include <linux/pci.h> > +#include <linux/pci_ids.h> > #include <linux/pci.h> > +#include <linux/pci_ids.h> Isn't pci.h includes pci_ids.h ? -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] PCI: add vendor id for Altera 2018-02-27 15:32 ` Andy Shevchenko @ 2018-02-27 15:42 ` Johannes Thumshirn 2018-02-27 17:39 ` Bjorn Helgaas 2018-02-27 19:52 ` Eli Billauer 0 siblings, 2 replies; 9+ messages in thread From: Johannes Thumshirn @ 2018-02-27 15:42 UTC (permalink / raw) To: Andy Shevchenko Cc: Greg KH, Linux Kernel Mailinglist, Michael Moese, Bjorn Helgaas, Eli Billauer, Anatolij Gustschin On Tue, 2018-02-27 at 17:32 +0200, Andy Shevchenko wrote: > On Tue, Feb 27, 2018 at 3:30 PM, Johannes Thumshirn <jthumshirn@suse.de> > wrote: > > > > Add the Altera PCI Vendor id to pci_ids.h and remove the private > > definitions from xillybus_pcie.c and altera-cvp.c. > > > > > #include <linux/pci.h> > > +#include <linux/pci_ids.h> > > > > > #include <linux/pci.h> > > +#include <linux/pci_ids.h> > > Isn't pci.h includes pci_ids.h ? It indeed is, but it won't do any harm and it's not quite clear what the general policy (regarding pci_ids.h) is, some drivers include it (even in the drivers/pci/) some don't. Bjorn, any guidance from your side? Byte, Johannes -- Johannes Thumshirn Storage jthumshi rn@suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] PCI: add vendor id for Altera 2018-02-27 15:42 ` Johannes Thumshirn @ 2018-02-27 17:39 ` Bjorn Helgaas 2018-02-27 19:52 ` Eli Billauer 1 sibling, 0 replies; 9+ messages in thread From: Bjorn Helgaas @ 2018-02-27 17:39 UTC (permalink / raw) To: Johannes Thumshirn Cc: Andy Shevchenko, Greg KH, Linux Kernel Mailinglist, Michael Moese, Bjorn Helgaas, Eli Billauer, Anatolij Gustschin On Tue, Feb 27, 2018 at 04:42:07PM +0100, Johannes Thumshirn wrote: > On Tue, 2018-02-27 at 17:32 +0200, Andy Shevchenko wrote: > > On Tue, Feb 27, 2018 at 3:30 PM, Johannes Thumshirn <jthumshirn@suse.de> > > wrote: > > > > > > Add the Altera PCI Vendor id to pci_ids.h and remove the private > > > definitions from xillybus_pcie.c and altera-cvp.c. > > > > > > > > #include <linux/pci.h> > > > +#include <linux/pci_ids.h> > > > > > > > > #include <linux/pci.h> > > > +#include <linux/pci_ids.h> > > > > Isn't pci.h includes pci_ids.h ? > > It indeed is, but it won't do any harm and it's not quite clear what the > general policy (regarding pci_ids.h) is, some drivers include it (even in > the drivers/pci/) some don't. > > Bjorn, any guidance from your side? I don't think it's necessary to add the include. Please cc: linux-pci@vger.kernel.org in addition, since that feeds the patchwork I work from. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] PCI: add vendor id for Altera 2018-02-27 15:42 ` Johannes Thumshirn 2018-02-27 17:39 ` Bjorn Helgaas @ 2018-02-27 19:52 ` Eli Billauer 1 sibling, 0 replies; 9+ messages in thread From: Eli Billauer @ 2018-02-27 19:52 UTC (permalink / raw) To: Johannes Thumshirn Cc: Andy Shevchenko, Greg KH, Linux Kernel Mailinglist, Michael Moese, Bjorn Helgaas, Anatolij Gustschin Hello Johannes, Thanks for the patch. I can confirm that xillybus_pcie.c compiles well with and without including pci_ids.h. As a matter of fact, it already used PCI_VENDOR_ID_XILINX, which is defined in pci_ids.h, without including it directly. Hence moving PCI_VENDOR_ID_ALTERA didn't change much in terms of the dependency on pci_ids.h. This is a matter of convention -- I'm fine either way. Regards, Eli On 27/02/18 17:42, Johannes Thumshirn wrote: > On Tue, 2018-02-27 at 17:32 +0200, Andy Shevchenko wrote: > >> On Tue, Feb 27, 2018 at 3:30 PM, Johannes Thumshirn<jthumshirn@suse.de> >> wrote: >> >>> Add the Altera PCI Vendor id to pci_ids.h and remove the private >>> definitions from xillybus_pcie.c and altera-cvp.c. >>> >> >>> #include<linux/pci.h> >>> +#include<linux/pci_ids.h> >>> >> >>> #include<linux/pci.h> >>> +#include<linux/pci_ids.h> >>> >> Isn't pci.h includes pci_ids.h ? >> > It indeed is, but it won't do any harm and it's not quite clear what the > general policy (regarding pci_ids.h) is, some drivers include it (even in > the drivers/pci/) some don't. > > Bjorn, any guidance from your side? > > Byte, > Johannes > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] mcb: add Altera PCI ID to mcb-pci 2018-02-27 13:30 [PATCH 0/2] MCB Update for v4.17 Johannes Thumshirn 2018-02-27 13:30 ` [PATCH 1/2] PCI: add vendor id for Altera Johannes Thumshirn @ 2018-02-27 13:30 ` Johannes Thumshirn 2018-02-27 13:37 ` Michael Moese 1 sibling, 1 reply; 9+ messages in thread From: Johannes Thumshirn @ 2018-02-27 13:30 UTC (permalink / raw) To: Greg KH Cc: Linux Kernel Mailinglist, Michael Moese, Johannes Thumshirn, Andreas Geißler Some older PCI attached MEN FPGAs use an Altera PCI Vendor ID instead of the MEN one. Add it to the PCI ID table so the driver automatically attaches to it. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reported-by: Ben Turner <ben.turner@21net.com> Tested-by: Ben Turner <ben.turner@21net.com> Cc: Andreas Geißler <andreas.geissler@men.de> Cc: Michael Moese <mmoese@suse.de> --- drivers/mcb/mcb-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mcb/mcb-pci.c b/drivers/mcb/mcb-pci.c index af4d2f26f1c6..286b32ca526f 100644 --- a/drivers/mcb/mcb-pci.c +++ b/drivers/mcb/mcb-pci.c @@ -11,6 +11,7 @@ #include <linux/module.h> #include <linux/pci.h> +#include <linux/pci_ids.h> #include <linux/mcb.h> #include "mcb-internal.h" @@ -117,6 +118,7 @@ static void mcb_pci_remove(struct pci_dev *pdev) static const struct pci_device_id mcb_pci_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_MEN, PCI_DEVICE_ID_MEN_CHAMELEON) }, + { PCI_DEVICE(PCI_VENDOR_ID_ALTERA, PCI_DEVICE_ID_MEN_CHAMELEON) }, { 0 }, }; MODULE_DEVICE_TABLE(pci, mcb_pci_tbl); -- 2.13.6 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] mcb: add Altera PCI ID to mcb-pci 2018-02-27 13:30 ` [PATCH 2/2] mcb: add Altera PCI ID to mcb-pci Johannes Thumshirn @ 2018-02-27 13:37 ` Michael Moese 2018-02-27 15:33 ` Andy Shevchenko 0 siblings, 1 reply; 9+ messages in thread From: Michael Moese @ 2018-02-27 13:37 UTC (permalink / raw) To: Johannes Thumshirn Cc: Linux Kernel Mailinglist, Michael Moese, Andreas Geißler, Greg KH Looks good. Reviewed-by: Michael Moese <mmoese@suse.de> On Tue, Feb 27, 2018 at 02:30:18PM +0100, Johannes Thumshirn wrote: > Some older PCI attached MEN FPGAs use an Altera PCI Vendor ID instead > of the MEN one. Add it to the PCI ID table so the driver automatically > attaches to it. > > Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> > Reported-by: Ben Turner <ben.turner@21net.com> > Tested-by: Ben Turner <ben.turner@21net.com> > Cc: Andreas Geißler <andreas.geissler@men.de> > Cc: Michael Moese <mmoese@suse.de> > --- > drivers/mcb/mcb-pci.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mcb/mcb-pci.c b/drivers/mcb/mcb-pci.c > index af4d2f26f1c6..286b32ca526f 100644 > --- a/drivers/mcb/mcb-pci.c > +++ b/drivers/mcb/mcb-pci.c > @@ -11,6 +11,7 @@ > > #include <linux/module.h> > #include <linux/pci.h> > +#include <linux/pci_ids.h> > #include <linux/mcb.h> > > #include "mcb-internal.h" > @@ -117,6 +118,7 @@ static void mcb_pci_remove(struct pci_dev *pdev) > > static const struct pci_device_id mcb_pci_tbl[] = { > { PCI_DEVICE(PCI_VENDOR_ID_MEN, PCI_DEVICE_ID_MEN_CHAMELEON) }, > + { PCI_DEVICE(PCI_VENDOR_ID_ALTERA, PCI_DEVICE_ID_MEN_CHAMELEON) }, > { 0 }, > }; > MODULE_DEVICE_TABLE(pci, mcb_pci_tbl); > -- > 2.13.6 > -- SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] mcb: add Altera PCI ID to mcb-pci 2018-02-27 13:37 ` Michael Moese @ 2018-02-27 15:33 ` Andy Shevchenko 0 siblings, 0 replies; 9+ messages in thread From: Andy Shevchenko @ 2018-02-27 15:33 UTC (permalink / raw) To: Michael Moese Cc: Johannes Thumshirn, Linux Kernel Mailinglist, Andreas Geißler, Greg KH On Tue, Feb 27, 2018 at 3:37 PM, Michael Moese <mmoese@suse.de> wrote: > Looks good. Do we need redundant header inclusions? > Reviewed-by: Michael Moese <mmoese@suse.de> > On Tue, Feb 27, 2018 at 02:30:18PM +0100, Johannes Thumshirn wrote: >> Some older PCI attached MEN FPGAs use an Altera PCI Vendor ID instead >> of the MEN one. Add it to the PCI ID table so the driver automatically >> attaches to it. >> #include <linux/pci.h> >> +#include <linux/pci_ids.h> Same question. -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-02-27 19:52 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-02-27 13:30 [PATCH 0/2] MCB Update for v4.17 Johannes Thumshirn 2018-02-27 13:30 ` [PATCH 1/2] PCI: add vendor id for Altera Johannes Thumshirn 2018-02-27 15:32 ` Andy Shevchenko 2018-02-27 15:42 ` Johannes Thumshirn 2018-02-27 17:39 ` Bjorn Helgaas 2018-02-27 19:52 ` Eli Billauer 2018-02-27 13:30 ` [PATCH 2/2] mcb: add Altera PCI ID to mcb-pci Johannes Thumshirn 2018-02-27 13:37 ` Michael Moese 2018-02-27 15:33 ` Andy Shevchenko
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).