All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bcma: do not initialize deactivated PCIe cores
@ 2012-09-30 22:12 Hauke Mehrtens
  2012-10-07  7:48 ` Rafał Miłecki
  0 siblings, 1 reply; 3+ messages in thread
From: Hauke Mehrtens @ 2012-09-30 22:12 UTC (permalink / raw
  To: linville; +Cc: linux-wireless, zajec5, Hauke Mehrtens

Before it was tried to initialize the deactivated PCIe core in client
mode, but this causes the SoC to hang. Just do not initialize it at all
and ignore the core it is not working and nothing is connected to it
when the specific bit is set in the boardflags.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/bcma/driver_pci_host.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c
index 63172c9..e564495 100644
--- a/drivers/bcma/driver_pci_host.c
+++ b/drivers/bcma/driver_pci_host.c
@@ -35,11 +35,6 @@ bool __devinit bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc)
 	    chipid_top != 0x5300)
 		return false;
 
-	if (bus->sprom.boardflags_lo & BCMA_CORE_PCI_BFL_NOPCI) {
-		bcma_info(bus, "This PCI core is disabled and not working\n");
-		return false;
-	}
-
 	bcma_core_enable(pc->core, 0);
 
 	return !mips_busprobe32(tmp, pc->core->io_addr);
@@ -396,6 +391,11 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
 
 	bcma_info(bus, "PCIEcore in host mode found\n");
 
+	if (bus->sprom.boardflags_lo & BCMA_CORE_PCI_BFL_NOPCI) {
+		bcma_info(bus, "This PCIE core is disabled and not working\n");
+		return;
+	}
+
 	pc_host = kzalloc(sizeof(*pc_host), GFP_KERNEL);
 	if (!pc_host)  {
 		bcma_err(bus, "can not allocate memory");
-- 
1.7.9.5


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

* Re: [PATCH] bcma: do not initialize deactivated PCIe cores
  2012-09-30 22:12 [PATCH] bcma: do not initialize deactivated PCIe cores Hauke Mehrtens
@ 2012-10-07  7:48 ` Rafał Miłecki
  2012-10-07 22:01   ` Hauke Mehrtens
  0 siblings, 1 reply; 3+ messages in thread
From: Rafał Miłecki @ 2012-10-07  7:48 UTC (permalink / raw
  To: Hauke Mehrtens; +Cc: linville, linux-wireless

2012/10/1 Hauke Mehrtens <hauke@hauke-m.de>:
> @@ -396,6 +391,11 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
>
>         bcma_info(bus, "PCIEcore in host mode found\n");
>
> +       if (bus->sprom.boardflags_lo & BCMA_CORE_PCI_BFL_NOPCI) {
> +               bcma_info(bus, "This PCIE core is disabled and not working\n");
> +               return;
> +       }
> +

I wonder if this bit is also valid for client mode PCIe core. Maybe
this check should be put directly in bcma_core_pci_init?

-- 
Rafał

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

* Re: [PATCH] bcma: do not initialize deactivated PCIe cores
  2012-10-07  7:48 ` Rafał Miłecki
@ 2012-10-07 22:01   ` Hauke Mehrtens
  0 siblings, 0 replies; 3+ messages in thread
From: Hauke Mehrtens @ 2012-10-07 22:01 UTC (permalink / raw
  To: Rafał Miłecki; +Cc: linville, linux-wireless

On 10/07/2012 09:48 AM, Rafał Miłecki wrote:
> 2012/10/1 Hauke Mehrtens <hauke@hauke-m.de>:
>> @@ -396,6 +391,11 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
>>
>>         bcma_info(bus, "PCIEcore in host mode found\n");
>>
>> +       if (bus->sprom.boardflags_lo & BCMA_CORE_PCI_BFL_NOPCI) {
>> +               bcma_info(bus, "This PCIE core is disabled and not working\n");
>> +               return;
>> +       }
>> +
> 
> I wonder if this bit is also valid for client mode PCIe core. Maybe
> this check should be put directly in bcma_core_pci_init?

I put it into the host mode code, because I do not want to interfere
with some wrongly programed client mode pcie devices. I have just seen a
SoC with a PCIe device in hostmode where this option was set. I would
have no problem with moving this into bcma_core_pci_init if someone with
some cards could test it before.

Hauke

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

end of thread, other threads:[~2012-10-07 22:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-30 22:12 [PATCH] bcma: do not initialize deactivated PCIe cores Hauke Mehrtens
2012-10-07  7:48 ` Rafał Miłecki
2012-10-07 22:01   ` Hauke Mehrtens

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.