Skip to contentSkip to conversation

PCI: mvebu - The bridge secondary status register should be 0

PATCH New Jason Gunthorpe 3 participants 3 messages Oct 15, 2013 – Oct 31, 2013 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: mvebu - The bridge secondary status register should be 0

There are no writable bits in the secondary status register, only write 1 to clear bits. The driver never sets any of the write 1 to clear bits so the status register should always be 0, just remove the set from the write path.

Someday the write 1 to clear bits should be copied/cleared directly from registers in the HW.

---
 drivers/pci/host/pci-mvebu.c | 1 -
 1 file changed, 1 deletion(-)
drivers/pci/host/pci-mvebu.c +0 -1
index 09fc586..3e5cdbd 100644
@@ -495,7 +495,6 @@ static int mvebu_sw_pci_bridge_write(struct mvebu_pcie_port *port,
 		 */
 		bridge->iobase = (value & 0xff) | PCI_IO_RANGE_TYPE_32;
 		bridge->iolimit = ((value >> 8) & 0xff) | PCI_IO_RANGE_TYPE_32;
-		bridge->secondary_status = value >> 16;
 		mvebu_pcie_handle_iobase_change(port);
 		break;
 
Signature · 1 line
1.8.1.2
Applied
#1 lore raw

PATCH 1/1 PCI: mvebu - The bridge secondary status register should be 0

Quoted 5 lines · Jason Gunthorpe

There are no writable bits in the secondary status register, only write 1 to clear bits. The driver never sets any of the write 1 to clear bits so the status register should always be 0, just remove the set from the write path.

Quoted 7 lines

Someday the write 1 to clear bits should be copied/cleared directly from registers in the HW.

---
 drivers/pci/host/pci-mvebu.c | 1 -
 1 file changed, 1 deletion(-)

Applied to mvebu/drivers

thx,

Jason.

#2 lore raw

PATCH 1/1 PCI: mvebu - The bridge secondary status register should be 0

In reply to Jason Gunthorpe

Dear Jason Gunthorpe,

Quoted 9 lines · Jason Gunthorpe

There are no writable bits in the secondary status register, only write 1 to clear bits. The driver never sets any of the write 1 to clear bits so the status register should always be 0, just remove the set from the write path.

Someday the write 1 to clear bits should be copied/cleared directly from registers in the HW.

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com