Skip to contentSkip to conversation

pci problem with rb532

DISCUSSION Waldemar Brodkorb 2 participants 3 messages May 10, 2014 – May 14, 2014 MIPS

lore
Share & tools
lore
#0 lore raw

Hi MIPS-Hackers,

I recently had a need for a small DHCP/NFS server and resurvived my old Mikrotik RB532 board. Sadly the PCI registration is broken and the VIA Rhine network ports didn't work.
See this thread for some details:
https://www.mail-archive.com/[email protected]/msg23073.html

I did know that it was working fine in the past, so I started to git bisect between 2.6.39 and 3.15-rc5.
Following commit is the problem:
commit 222831787704c9ad9215f6b56f975b233968607c

Author: Gabor Juhos <[email protected]>
Date:   Sat Feb 2 13:18:54 2013 +0000

MIPS: avoid possible resource conflict in register_pci_controller

The IO and memory resources of a PCI controller might already have a parent resource set when they are passed to 'register_pci_controller'.

If the parent resource is set, the request_resource call will fail due to resource conflict and the current code will not be able to register the PCI controller.

Use the parent resource if it is available in the request_resource call to avoid the isssue.

Patchwork: http://patchwork.linux-mips.org/patch/4910/

After reverting the change, the VIA Rhine driver works fine again.

So how we can unbreak the rb532 support?

Thanks in advance
Waldemar Brodkorb

P.s.: I am putting Florian and Felix in Cc, because we had a short discussion about the problem via IRC.

#1 lore raw

Hi Waldemar,

Quoted 27 lines

I recently had a need for a small DHCP/NFS server and resurvived my old Mikrotik RB532 board. Sadly the PCI registration is broken and the VIA Rhine network ports didn't work.
See this thread for some details:
https://www.mail-archive.com/[email protected]/msg23073.html

I did know that it was working fine in the past, so I started to git bisect between 2.6.39 and 3.15-rc5.
Following commit is the problem:
commit 222831787704c9ad9215f6b56f975b233968607c

Author: Gabor Juhos <[email protected]>
Date:   Sat Feb 2 13:18:54 2013 +0000

MIPS: avoid possible resource conflict in register_pci_controller

The IO and memory resources of a PCI controller might already have a parent resource set when they are passed to 'register_pci_controller'.

If the parent resource is set, the request_resource call will fail due to resource conflict and the current code will not be able to register the PCI controller.

Use the parent resource if it is available in the request_resource call to avoid the isssue.

Quoted 7 lines

Patchwork: http://patchwork.linux-mips.org/patch/4910/

After reverting the change, the VIA Rhine driver works fine again.

So how we can unbreak the rb532 support?

Please try the attached patch without reverting the aforementioned change.

Thanks,
Gabor

#2 lore raw

Hi Gabor,
Gabor Juhos wrote,

Quoted 10 lines

Hi Waldemar,

Quoted 3 lines

I recently had a need for a small DHCP/NFS server and resurvived my old Mikrotik RB532 board. Sadly the PCI registration is broken and the VIA Rhine network ports didn't work.

Please try the attached patch without reverting the aforementioned change.

Thanks,
Gabor

Patch works great! Tested with 3.14.4. Thanks.

I have another issue regarding serial console, sth between 3.14.4 and 3.15-rc5. Still bisecting...

best regards
Waldemar