Re: [PATCH 00/10] IOCHK interface for I/O error handling/detecting

From: Hidetoshi Seto
Date: Fri Jun 10 2005 - 05:30:33 EST


Matthew Wilcox wrote:
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().

At least there was _me_ who actually intended that... :-p
Thank you for being so understanding.

- 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?

Once I prepared a cookie per a device, added it into pci_dev.
But one of our NIC driver folks pointed out that it was hard to handle
because there could be many contexts/threads riding on one device at same
time. So I reconsidered it and now come to "a cookie per a context" style.

*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.

Oops. It's just my typo. Please ignore it.

Thanks,
H.Seto

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/