Nico Huber has posted comments on this change. ( https://review.coreboot.org/20784 )
Change subject: rpci: Use pci_dev struct pointer to avoid API breaks ......................................................................
Patch Set 2:
(2 comments)
Please revise the comment in the header file. Looks good, otherwise.
https://review.coreboot.org/#/c/20784/1/pcidev.c File pcidev.c:
https://review.coreboot.org/#/c/20784/1/pcidev.c@297 PS1, Line 297: }
Added in the header file. The code was already checking for validity of 'pa
Yes, the code was and is still checking the `pacc` pointer in the shutdown handler, which is nuts IMHO. It has nothing to say about the sanity of the program as the pointer is not used anymore.
`pacc` is only interesting for the pci_get_dev() call.
https://review.coreboot.org/#/c/20784/2/programmer.h File programmer.h:
https://review.coreboot.org/#/c/20784/2/programmer.h@200 PS2, Line 200: */ That's not accurate... how about:
To clone the pci_dev instances internally, the `pacc` global variable has to reference a pci_access method that is compatible with the given pci_dev handle. The referenced pci_access (not the variable) has to stay valid until the shutdown handlers are finished.