Skip to contentSkip to conversation

pci: Device scanning range fix.

PATCH Superseded Yoshinori Sato 4 participants 8 messages Apr 18, 2016 – Apr 26, 2016 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: Device scanning range fix.

Don't lookup pci device 1f.7

---
 drivers/pci/pci-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci-uclass.c +1 -1
index c7fbf7b..32590ce 100644
@@ -682,7 +682,7 @@ int pci_bind_bus_devices(struct udevice *bus)
 	found_multi = false;
 	end = PCI_BDF(bus->seq, PCI_MAX_PCI_DEVICES - 1,
 		      PCI_MAX_PCI_FUNCTIONS - 1);
-	for (bdf = PCI_BDF(bus->seq, 0, 0); bdf < end;
+	for (bdf = PCI_BDF(bus->seq, 0, 0); bdf <= end;
 	     bdf += PCI_BDF(0, 0, 1)) {
 		struct pci_child_platdata *pplat;
 		struct udevice *dev;
Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/1 pci: Device scanning range fix.

Hi Yoshinori,

Quoted 12 lines · Yoshinori Sato

Don't lookup pci device 1f.7

---
 drivers/pci/pci-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci-uclass.c +0 -0
index c7fbf7b..32590ce 100644

drivers/pci/pci-uclass.c int pci_bind_bus_devices(struct udevice *bus) · line 688

Quoted 8 lines
drivers/pci/pci-uclass.c +1 -1
@@ -682,7 +682,7 @@ int pci_bind_bus_devices(struct udevice *bus)
        found_multi = false;
        end = PCI_BDF(bus->seq, PCI_MAX_PCI_DEVICES - 1,
                      PCI_MAX_PCI_FUNCTIONS - 1);
-       for (bdf = PCI_BDF(bus->seq, 0, 0); bdf < end;
+       for (bdf = PCI_BDF(bus->seq, 0, 0); bdf <= end;
             bdf += PCI_BDF(0, 0, 1)) {
                struct pci_child_platdata *pplat;
                struct udevice *dev;

The patch looks good thank you. But your commit message seem the opposite of what this patch does. Can you update it in v2, or explain it better?

Regards,
Simon

#2 lore raw

PATCH v2 1/1 pci: Device scanning range fix.

In reply to Yoshinori Sato

The terminal condition in the area where a PCI device is scanned is wrong, and 1f.7 isn't scanned.

Changes v2:
- update commit message.

---
 drivers/pci/pci-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci-uclass.c +1 -1
index c7fbf7b..32590ce 100644
@@ -682,7 +682,7 @@ int pci_bind_bus_devices(struct udevice *bus)
 	found_multi = false;
 	end = PCI_BDF(bus->seq, PCI_MAX_PCI_DEVICES - 1,
 		      PCI_MAX_PCI_FUNCTIONS - 1);
-	for (bdf = PCI_BDF(bus->seq, 0, 0); bdf < end;
+	for (bdf = PCI_BDF(bus->seq, 0, 0); bdf <= end;
 	     bdf += PCI_BDF(0, 0, 1)) {
 		struct pci_child_platdata *pplat;
 		struct udevice *dev;
Signature · 1 line
2.7.0
#3 lore raw

PATCH v2 1/1 pci: Device scanning range fix.

Hi Yoshinori,

Quoted 5 lines · Yoshinori Sato

The terminal condition in the area where a PCI device is scanned is wrong, and 1f.7 isn't scanned.

Changes v2:
- update commit message.

Please hide this "changes v2" from the commit message.

Also nits: please remove the ending period in the commit title ..

Quoted 11 lines
---
 drivers/pci/pci-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci-uclass.c +0 -0
index c7fbf7b..32590ce 100644

drivers/pci/pci-uclass.c int pci_bind_bus_devices(struct udevice *bus)

Quoted 9 lines
drivers/pci/pci-uclass.c +1 -2
@@ -682,7 +682,7 @@ int pci_bind_bus_devices(struct udevice *bus)
        found_multi = false;
        end = PCI_BDF(bus->seq, PCI_MAX_PCI_DEVICES - 1,
                      PCI_MAX_PCI_FUNCTIONS - 1);
-       for (bdf = PCI_BDF(bus->seq, 0, 0); bdf < end;
+       for (bdf = PCI_BDF(bus->seq, 0, 0); bdf <= end;
             bdf += PCI_BDF(0, 0, 1)) {
                struct pci_child_platdata *pplat;
                struct udevice *dev;
--

Regards,
Bin

#4 lore raw

PATCH v2 1/1 pci: Device scanning range fix.

Quoted 8 lines · Bin Meng

Hi Yoshinori,

Quoted 3 lines · Yoshinori Sato

The terminal condition in the area where a PCI device is scanned is wrong, and 1f.7 isn't scanned.

Quoted 6 lines
Quoted 2 lines

Changes v2:
- update commit message.

Please hide this "changes v2" from the commit message.

Also nits: please remove the ending period in the commit title ..

OK.
Thanks comment.

Quoted 23 lines
Quoted 11 lines
---
 drivers/pci/pci-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci-uclass.c +0 -0
index c7fbf7b..32590ce 100644

drivers/pci/pci-uclass.c int pci_bind_bus_devices(struct udevice *bus)

Quoted 9 lines
drivers/pci/pci-uclass.c +1 -2
@@ -682,7 +682,7 @@ int pci_bind_bus_devices(struct udevice *bus)
        found_multi = false;
        end = PCI_BDF(bus->seq, PCI_MAX_PCI_DEVICES - 1,
                      PCI_MAX_PCI_FUNCTIONS - 1);
-       for (bdf = PCI_BDF(bus->seq, 0, 0); bdf < end;
+       for (bdf = PCI_BDF(bus->seq, 0, 0); bdf <= end;
             bdf += PCI_BDF(0, 0, 1)) {
                struct pci_child_platdata *pplat;
                struct udevice *dev;
--

Regards,
Bin

Signature · 2 lines
Yoshinori Sato
<[email protected]>
#5 lore raw

PATCH v3 1/1 pci: Device scanning range fix

In reply to Yoshinori Sato

The terminal condition in the area where a PCI device is scanned is wrong, and 1f.7 isn't scanned.

---
 drivers/pci/pci-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci-uclass.c +1 -1
index c7fbf7b..32590ce 100644
@@ -682,7 +682,7 @@ int pci_bind_bus_devices(struct udevice *bus)
 	found_multi = false;
 	end = PCI_BDF(bus->seq, PCI_MAX_PCI_DEVICES - 1,
 		      PCI_MAX_PCI_FUNCTIONS - 1);
-	for (bdf = PCI_BDF(bus->seq, 0, 0); bdf < end;
+	for (bdf = PCI_BDF(bus->seq, 0, 0); bdf <= end;
 	     bdf += PCI_BDF(0, 0, 1)) {
 		struct pci_child_platdata *pplat;
 		struct udevice *dev;
Signature · 1 line
2.7.0
#7 lore raw

PATCH v3 1/1 pci: Device scanning range fix

In reply to Yoshinori Sato
Quoted 5 lines · Yoshinori Sato

The terminal condition in the area where a PCI device is scanned is wrong, and 1f.7 isn't scanned.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160425/8ea09141/attachment.sig>