All of lore.kernel.org
 help / color / mirror / Atom feed
* PICe hotplug problems
@ 2012-07-10 17:29 Joakim Tjernlund
  2012-07-10 18:22 ` Yinghai Lu
  0 siblings, 1 reply; 17+ messages in thread
From: Joakim Tjernlund @ 2012-07-10 17:29 UTC (permalink / raw)
  To: linux-pci


I got an PCIe device that is woken up by user space, clocks needs to configured in various ways before the
device enables its PCIe interface.

The device is connected to a built in root bridge on a P2010(mpc85xx) CPU.
To enable HP in Linux we need to apply some minor hacks.

First, The contoller has MSI but there is no pci_find_capability(dev, PCI_CAP_ID_MSI) so
portdrv_core.c:init_service_irqs() fails this test(dev->pin is false too):
 	if (!pci_enable_msi(dev) || dev->pin)

Is the code correct? Should our root bridge have PCI_CAP_ID_MSI?

Second problem, the root bride does not have PCI_EXP_FLAGS_SLOT so
portdrv_core.c:get_port_device_capability() fails this test:
  if ((cap_mask & PCIE_PORT_SERVICE_HP) && (reg16 & PCI_EXP_FLAGS_SLOT)) {
		pci_read_config_dword(dev, pos + PCI_EXP_SLTCAP, &reg32);
		if (reg32 & PCI_EXP_SLTCAP_HPC) {
			services |= PCIE_PORT_SERVICE_HP;

which cause PCIE_PORT_SERVICE_HP to be unset in services.

Is PCI_EXP_FLAGS_SLOT really required for hot plug?

Perhaps there another way?

 Jocke


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-07-19  9:17 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10 17:29 PICe hotplug problems Joakim Tjernlund
2012-07-10 18:22 ` Yinghai Lu
2012-07-10 21:42   ` Joakim Tjernlund
2012-07-10 22:09     ` Yinghai Lu
2012-07-10 22:20       ` Bjorn Helgaas
2012-07-10 22:22         ` Yinghai Lu
2012-07-10 22:46           ` Bjorn Helgaas
2012-07-10 22:49             ` Bjorn Helgaas
2012-07-11  1:07       ` Joakim Tjernlund
2012-07-11  1:33         ` Yinghai Lu
2012-07-11  4:08           ` Joakim Tjernlund
2012-07-11  6:09             ` Yinghai Lu
     [not found]           ` <OF259177D8.B20ED592-ONC1257A38.00167C85-C1257A38.0016C890@LocalDomain>
2012-07-11  5:08             ` Joakim Tjernlund
2012-07-11 14:13               ` Jiang Liu
2012-07-18 13:07           ` Joakim Tjernlund
     [not found]           ` <OF85CC1E00.6E804B96-ONC1257A3F.00477FD2-C1257A3F.0048111D@LocalDomain>
2012-07-18 23:34             ` Joakim Tjernlund
     [not found]             ` <OF57E68083.D4D2A234-ONC1257A3F.008141AA-C1257A3F.00817A68@LocalDomain>
2012-07-19  9:17               ` Joakim Tjernlund

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.