* linux-next: manual merge of the driver-core tree with the pci tree
@ 2012-02-28 3:29 Stephen Rothwell
2012-02-28 4:39 ` Yinghai Lu
2012-02-28 16:12 ` Greg KH
0 siblings, 2 replies; 7+ messages in thread
From: Stephen Rothwell @ 2012-02-28 3:29 UTC (permalink / raw)
To: Greg KH; +Cc: linux-next, linux-kernel, Yinghai Lu, Jesse Barnes
[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]
Hi Greg,
Today's linux-next merge of the driver-core tree got a conflict in
include/linux/pci.h between commit 6754b9e9c335 ("PCI: Rename
pci_remove_behind_bridge to pci_stop_and_remove_behind_bridge") from the
pci tree and commit aad4f4000cec ("PCI: Add helper macro for
pci_register_driver boilerplate") from the driver-core tree.
Just context changes. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc include/linux/pci.h
index 5584aac,d4afd70..0000000
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@@ -947,7 -946,20 +947,20 @@@ int __must_check __pci_register_driver(
__pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
void pci_unregister_driver(struct pci_driver *dev);
+
+ /**
+ * module_pci_driver() - Helper macro for registering a PCI driver
+ * @__pci_driver: pci_driver struct
+ *
+ * Helper macro for PCI drivers which do not do anything special in module
+ * init/exit. This eliminates a lot of boilerplate. Each module may only
+ * use this macro once, and calling it replaces module_init() and module_exit()
+ */
+ #define module_pci_driver(__pci_driver) \
+ module_driver(__pci_driver, pci_register_driver, \
+ pci_unregister_driver)
+
-void pci_remove_behind_bridge(struct pci_dev *dev);
+void pci_stop_and_remove_behind_bridge(struct pci_dev *dev);
struct pci_driver *pci_dev_driver(const struct pci_dev *dev);
int pci_add_dynid(struct pci_driver *drv,
unsigned int vendor, unsigned int device,
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: manual merge of the driver-core tree with the pci tree
2012-02-28 3:29 linux-next: manual merge of the driver-core tree with the pci tree Stephen Rothwell
@ 2012-02-28 4:39 ` Yinghai Lu
2012-02-28 16:12 ` Greg KH
1 sibling, 0 replies; 7+ messages in thread
From: Yinghai Lu @ 2012-02-28 4:39 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Greg KH, linux-next, linux-kernel, Jesse Barnes
On Mon, Feb 27, 2012 at 7:29 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Greg,
>
> Today's linux-next merge of the driver-core tree got a conflict in
> include/linux/pci.h between commit 6754b9e9c335 ("PCI: Rename
> pci_remove_behind_bridge to pci_stop_and_remove_behind_bridge") from the
> pci tree and commit aad4f4000cec ("PCI: Add helper macro for
> pci_register_driver boilerplate") from the driver-core tree.
>
> Just context changes. I fixed it up (see below) and can carry the fix as
> necessary.
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
>
> diff --cc include/linux/pci.h
> index 5584aac,d4afd70..0000000
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@@ -947,7 -946,20 +947,20 @@@ int __must_check __pci_register_driver(
> __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
>
> void pci_unregister_driver(struct pci_driver *dev);
> +
> + /**
> + * module_pci_driver() - Helper macro for registering a PCI driver
> + * @__pci_driver: pci_driver struct
> + *
> + * Helper macro for PCI drivers which do not do anything special in module
> + * init/exit. This eliminates a lot of boilerplate. Each module may only
> + * use this macro once, and calling it replaces module_init() and module_exit()
> + */
> + #define module_pci_driver(__pci_driver) \
> + module_driver(__pci_driver, pci_register_driver, \
> + pci_unregister_driver)
> +
> -void pci_remove_behind_bridge(struct pci_dev *dev);
> +void pci_stop_and_remove_behind_bridge(struct pci_dev *dev);
> struct pci_driver *pci_dev_driver(const struct pci_dev *dev);
> int pci_add_dynid(struct pci_driver *drv,
> unsigned int vendor, unsigned int device,
yes. we rename pci_remove_* to pci_stop_and_remove_*.
BTW, include/linux/pci.h looks like a mess. We should tidy it up
Thanks
Yinghai
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: manual merge of the driver-core tree with the pci tree
2012-02-28 3:29 linux-next: manual merge of the driver-core tree with the pci tree Stephen Rothwell
2012-02-28 4:39 ` Yinghai Lu
@ 2012-02-28 16:12 ` Greg KH
1 sibling, 0 replies; 7+ messages in thread
From: Greg KH @ 2012-02-28 16:12 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Yinghai Lu, Jesse Barnes
On Tue, Feb 28, 2012 at 02:29:09PM +1100, Stephen Rothwell wrote:
> Hi Greg,
>
> Today's linux-next merge of the driver-core tree got a conflict in
> include/linux/pci.h between commit 6754b9e9c335 ("PCI: Rename
> pci_remove_behind_bridge to pci_stop_and_remove_behind_bridge") from the
> pci tree and commit aad4f4000cec ("PCI: Add helper macro for
> pci_register_driver boilerplate") from the driver-core tree.
>
> Just context changes. I fixed it up (see below) and can carry the fix as
> necessary.
Looks good to me, thanks for the fixup.
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: manual merge of the driver-core tree with the pci tree
2012-11-29 4:03 Stephen Rothwell
@ 2012-11-29 5:20 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2012-11-29 5:20 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-next, linux-kernel, Bill Pemberton, Bjorn Helgaas, Yinghai Lu
On Thu, Nov 29, 2012 at 03:03:40PM +1100, Stephen Rothwell wrote:
> Hi Greg,
>
> Today's linux-next merge of the driver-core tree got a conflict in
> drivers/pci/pci.h between commit 4e15c46bdc4d ("PCI: Add pci_device_type
> to pdev's device struct") from the pci tree and commit b40b97ae736c
> ("PCI: Remove CONFIG_HOTPLUG ifdefs") from the driver-core tree.
>
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
Looks good, thanks.
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: manual merge of the driver-core tree with the pci tree
2012-11-29 4:06 Stephen Rothwell
@ 2012-11-29 5:20 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2012-11-29 5:20 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-next, linux-kernel, Bill Pemberton, Ian Abbott, Bjorn Helgaas
On Thu, Nov 29, 2012 at 03:06:41PM +1100, Stephen Rothwell wrote:
> Hi Greg,
>
> Today's linux-next merge of the driver-core tree got a conflict in
> drivers/pci/quirks.c between commit 21c5fd97380b ("PCI: Add workaround
> for PLX PCI 9050 BAR alignment erratum") from the pci tree and commit
> 15856ad50bf5 ("PCI: Remove __dev* markings") from the driver-core tree.
>
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
Looks good, thanks.
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* linux-next: manual merge of the driver-core tree with the pci tree
@ 2012-11-29 4:06 Stephen Rothwell
2012-11-29 5:20 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2012-11-29 4:06 UTC (permalink / raw)
To: Greg KH
Cc: linux-next, linux-kernel, Bill Pemberton, Ian Abbott, Bjorn Helgaas
[-- Attachment #1: Type: text/plain, Size: 2565 bytes --]
Hi Greg,
Today's linux-next merge of the driver-core tree got a conflict in
drivers/pci/quirks.c between commit 21c5fd97380b ("PCI: Add workaround
for PLX PCI 9050 BAR alignment erratum") from the pci tree and commit
15856ad50bf5 ("PCI: Remove __dev* markings") from the driver-core tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/pci/quirks.c
index 0c59f7a,22ad3ee..0000000
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@@ -1790,46 -1790,7 +1790,46 @@@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_
PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE,
quirk_tc86c001_ide);
+/*
+ * PLX PCI 9050 PCI Target bridge controller has an errata that prevents the
+ * local configuration registers accessible via BAR0 (memory) or BAR1 (i/o)
+ * being read correctly if bit 7 of the base address is set.
+ * The BAR0 or BAR1 region may be disabled (size 0) or enabled (size 128).
+ * Re-allocate the regions to a 256-byte boundary if necessary.
+ */
- static void __devinit quirk_plx_pci9050(struct pci_dev *dev)
++static void quirk_plx_pci9050(struct pci_dev *dev)
+{
+ unsigned int bar;
+
+ /* Fixed in revision 2 (PCI 9052). */
+ if (dev->revision >= 2)
+ return;
+ for (bar = 0; bar <= 1; bar++)
+ if (pci_resource_len(dev, bar) == 0x80 &&
+ (pci_resource_start(dev, bar) & 0x80)) {
+ struct resource *r = &dev->resource[bar];
+ dev_info(&dev->dev,
+ "Re-allocating PLX PCI 9050 BAR %u to length 256 to avoid bit 7 bug\n",
+ bar);
+ r->start = 0;
+ r->end = 0xff;
+ }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
+ quirk_plx_pci9050);
+/*
+ * The following Meilhaus (vendor ID 0x1402) device IDs (amongst others)
+ * may be using the PLX PCI 9050: 0x0630, 0x0940, 0x0950, 0x0960, 0x100b,
+ * 0x1400, 0x140a, 0x140b, 0x14e0, 0x14ea, 0x14eb, 0x1604, 0x1608, 0x160c,
+ * 0x168f, 0x2000, 0x2600, 0x3000, 0x810a, 0x810b.
+ *
+ * Currently, device IDs 0x2000 and 0x2600 are used by the Comedi "me_daq"
+ * driver.
+ */
+DECLARE_PCI_FIXUP_HEADER(0x1402, 0x2000, quirk_plx_pci9050);
+DECLARE_PCI_FIXUP_HEADER(0x1402, 0x2600, quirk_plx_pci9050);
+
- static void __devinit quirk_netmos(struct pci_dev *dev)
+ static void quirk_netmos(struct pci_dev *dev)
{
unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4;
unsigned int num_serial = dev->subsystem_device & 0xf;
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* linux-next: manual merge of the driver-core tree with the pci tree
@ 2012-11-29 4:03 Stephen Rothwell
2012-11-29 5:20 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2012-11-29 4:03 UTC (permalink / raw)
To: Greg KH
Cc: linux-next, linux-kernel, Bill Pemberton, Bjorn Helgaas, Yinghai Lu
[-- Attachment #1: Type: text/plain, Size: 927 bytes --]
Hi Greg,
Today's linux-next merge of the driver-core tree got a conflict in
drivers/pci/pci.h between commit 4e15c46bdc4d ("PCI: Add pci_device_type
to pdev's device struct") from the pci tree and commit b40b97ae736c
("PCI: Remove CONFIG_HOTPLUG ifdefs") from the driver-core tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/pci/pci.h
index 11a713b,e253881..0000000
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@@ -159,12 -158,7 +158,8 @@@ static inline int pci_no_d1d2(struct pc
}
extern struct device_attribute pci_dev_attrs[];
extern struct device_attribute pcibus_dev_attrs[];
+extern struct device_type pci_dev_type;
- #ifdef CONFIG_HOTPLUG
extern struct bus_attribute pci_bus_attrs[];
- #else
- #define pci_bus_attrs NULL
- #endif
/**
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-11-29 5:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-28 3:29 linux-next: manual merge of the driver-core tree with the pci tree Stephen Rothwell
2012-02-28 4:39 ` Yinghai Lu
2012-02-28 16:12 ` Greg KH
2012-11-29 4:03 Stephen Rothwell
2012-11-29 5:20 ` Greg KH
2012-11-29 4:06 Stephen Rothwell
2012-11-29 5:20 ` Greg KH
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).