Today's patch is 3rd one - iochk_clear/read() interface.
- This also adds pair-interface, but not to sandwich only readX().
Depends on platform, starting with ioreadX(), inX(), writeX()
if possible... and so on could be target of error checking.
It makes sense to sandwich other kinds of device accesses. I don't
think the previous clear/read_pci_errors() interface was intended *only*
to sandwich readX().
- Additionally adds special token - abstract "iocookie" structure
to control/identifies/manage I/Os, by passing it to OS.
Actual type of "iocookie" could be arch-specific. Device drivers
could use the iocookie structure without knowing its detail.
I'm not sure we need this. Surely it can be deduced from the pci_dev or
struct device?
*buf++ = ioread32(dev, ofs);
You do know that ioread32() doesn't take a pci_dev, right? I hope you
weren't counting on that for the rest of your implementation.