Messages in this thread |  | | From | (David Hinds) | Subject | Re: reserve= not working, drivers fail to do check_region | Date | 10 Jan 1997 04:02:33 GMT |
| |
Kohtala Marko (Marko.Kohtala@ntc.nokia.com) wrote:
: Many drivers do I/O without check_region if user gives the address or : the card is in PCI devices. I do not think they should, since they'll : fail at request_region. Most net drivers based on the skeleton are : like this.
I think these drivers are using check_region the "correct" way. One of the reasons for using "reserve=" is to prevent arbitrary drivers from probing at a particular address, but then later telling a specific driver to use that address. The later request_region() call will "fail", but request_region() doesn't return an indication of success or failure anyway.
Think of it this way: check_region() says "is it ok for any random driver to probe this range of addresses?". And request_region() says "someone cares about this range of addresses, so don't go probing here unless you know what you're doing".
So, a driver should use check_region() if it is probing blindly, to make sure it doesn't step on any other devices. But if a driver is explicitly told that there is a device in a certain place, then it should not use check_region -- it should go ahead and assume that whoever told it to look there knows what they're doing.
There are two sorts of things that should be fixed here: drivers that call check_region() when passed a specific address should be fixed to not do that, and drivers that don't call check_region before automatic probes should be fixed to check first.
-- Dave Hinds dhinds@hyper.stanford.edu
|  |