Skip to contentSkip to conversation

pci: fix i82801b11 bridge

PATCH In review Gerd Hoffmann 3 participants 4 messages Aug 5, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: fix i82801b11 bridge

---
 hw/pci-bridge/i82801b11.c |    1 +
 1 file changed, 1 insertion(+)
hw/pci-bridge/i82801b11.c +1 -0
index 8a5e426..14cd7fd 100644
@@ -90,6 +90,7 @@ static void i82801b11_bridge_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_INTEL_82801BA_11;
     k->revision = ICH9_D2P_A2_REVISION;
     k->init = i82801b11_bridge_initfn;
+    k->config_write = pci_bridge_write_config;
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
 }
 
Signature · 1 line
1.7.9.7
#1 lore raw

Am 05.08.2013 10:50, schrieb Gerd Hoffmann:

Quoted 10 lines
---
 hw/pci-bridge/i82801b11.c |    1 +
 1 file changed, 1 insertion(+)
hw/pci-bridge/i82801b11.c +0 -0
index 8a5e426..14cd7fd 100644

hw/pci-bridge/i82801b11.c static void i82801b11_bridge_class_init(ObjectClass *klass, void *data) · line 96

Quoted 7 lines
hw/pci-bridge/i82801b11.c +1 -0
@@ -90,6 +90,7 @@ static void i82801b11_bridge_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_INTEL_82801BA_11;
     k->revision = ICH9_D2P_A2_REVISION;
     k->init = i82801b11_bridge_initfn;
+    k->config_write = pci_bridge_write_config;
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
 }
 

We have an abstract TYPE_PCI_BRIDGE now, suggest to set it in its class_init instead if that's a generic bridge function.

Probably should be for-1.6?

Cheers,
Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#2 lore raw
Quoted 6 lines · Andreas Färber

Am 05.08.2013 10:50, schrieb Gerd Hoffmann:

Quoted 5 lines
---
 hw/pci-bridge/i82801b11.c |    1 +
 1 file changed, 1 insertion(+)
Quoted 15 lines

hw/pci-bridge/i82801b11.c static void i82801b11_bridge_class_init(ObjectClass *klass, void *data) · line 96

Quoted 12 lines
hw/pci-bridge/i82801b11.c +1 -0
index 8a5e426..14cd7fd 100644
@@ -90,6 +90,7 @@ static void i82801b11_bridge_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_INTEL_82801BA_11;
     k->revision = ICH9_D2P_A2_REVISION;
     k->init = i82801b11_bridge_initfn;
+    k->config_write = pci_bridge_write_config;
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
 }
 

We have an abstract TYPE_PCI_BRIDGE now, suggest to set it in its class_init instead if that's a generic bridge function.

Well, depends on the bridge device. When they have stuff beside core pci bridge functionality (such as shpc hotplug support like the 'pci-bridge' device) they need their private function. But those can still override config_write in the device init I guess.

/me leaves that to mst to decide. Beside that it should most likely go into a separate cleanup patch as there are other devices which hook pci_bridge_write_config the same way.

Quoted 1 line

Probably should be for-1.6?

Yes.

cheers,
Gerd

#3 lore raw
Quoted 23 lines · Gerd Hoffmann
Quoted 6 lines · Andreas Färber

Am 05.08.2013 10:50, schrieb Gerd Hoffmann:

Quoted 5 lines
---
 hw/pci-bridge/i82801b11.c |    1 +
 1 file changed, 1 insertion(+)
Quoted 15 lines

hw/pci-bridge/i82801b11.c static void i82801b11_bridge_class_init(ObjectClass *klass, void *data) · line 96

Quoted 12 lines
hw/pci-bridge/i82801b11.c +1 -0
index 8a5e426..14cd7fd 100644
@@ -90,6 +90,7 @@ static void i82801b11_bridge_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_INTEL_82801BA_11;
     k->revision = ICH9_D2P_A2_REVISION;
     k->init = i82801b11_bridge_initfn;
+    k->config_write = pci_bridge_write_config;
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
 }
 

We have an abstract TYPE_PCI_BRIDGE now, suggest to set it in its class_init instead if that's a generic bridge function.

Quoted 8 lines

Well, depends on the bridge device. When they have stuff beside core pci bridge functionality (such as shpc hotplug support like the 'pci-bridge' device) they need their private function. But those can still override config_write in the device init I guess.

/me leaves that to mst to decide. Beside that it should most likely go into a separate cleanup patch as there are other devices which hook pci_bridge_write_config the same way.

Yea, it's probably not 1.6 material.

Quoted 7 lines
Quoted 1 line

Probably should be for-1.6?

Yes.

cheers,
Gerd