summaryrefslogtreecommitdiffstats
path: root/drivers/mcb/mcb-internal.h
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@men.de>2014-12-16 10:09:20 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-09 15:46:37 -0800
commit7b7c54914f73966976893747ee8e2ca58166a627 (patch)
tree867344f8e283b38127c957f0ee4b3247f7e54687 /drivers/mcb/mcb-internal.h
parent7e4a90cb2efecb3799bde9280efbf7f4af8f891b (diff)
downloadop-kernel-dev-7b7c54914f73966976893747ee8e2ca58166a627.zip
op-kernel-dev-7b7c54914f73966976893747ee8e2ca58166a627.tar.gz
mcb: mcb-pci: Only remap the 1st 0x200 bytes of BAR 0
Currently it is not possible to have a kernel with built-in MCB attached devices. This results out of the fact that mcb-pci requests PCI BAR 0, then parses the chameleon table and calls the driver's probe function before releasing BAR 0 again. When building the kernel with modules this is not a problem (and therefore it wasn't detected by my tests yet). A solution is to only remap the 1st 0x200 bytes of a Chameleon PCI device. 0x200 bytes is the maximum size of a Chameleon v2 Table. Also this patch stops disabling the PCI device on successful registration of MCB devices. Signed-off-by: Johannes Thumshirn <johannes.thumshirn@men.de> Suggested-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mcb/mcb-internal.h')
-rw-r--r--drivers/mcb/mcb-internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mcb/mcb-internal.h b/drivers/mcb/mcb-internal.h
index f956ef2..fb7493d 100644
--- a/drivers/mcb/mcb-internal.h
+++ b/drivers/mcb/mcb-internal.h
@@ -7,6 +7,7 @@
#define PCI_DEVICE_ID_MEN_CHAMELEON 0x4d45
#define CHAMELEON_FILENAME_LEN 12
#define CHAMELEONV2_MAGIC 0xabce
+#define CHAM_HEADER_SIZE 0x200
enum chameleon_descriptor_type {
CHAMELEON_DTYPE_GENERAL = 0x0,
OpenPOWER on IntegriCloud