Re: Exclusive access to hardware for test purpose

From: Greg KH
Date: Fri Oct 29 2004 - 18:13:38 EST


On Sat, Oct 30, 2004 at 04:08:46AM +0530, Mehulkumar J Patel wrote:
> Greg KH <greg@xxxxxxxxx>
> 30/10/2004 02:13

Ugh, don't use Notes to write internet email...

> > You need to disconnect the device from any current driver that might be
> > bound to it. Then you need to bind to the device to make sure that no
> > one else binds to it.
>
> Can you please elaborate, by disconnect, you mean unload the driver ?

No, the driver core matches up drivers to devices. You need to tell the
driver core to disconnect that match. See the recent patches to lkml
that expose the functions you need for what to do.

> If so I can not do that because one driver serving all cards including
> the one that I am not testing. So I can not unload driver.
> Please elaborate on how to bind to device.

Same as above, tell the driver core to do it. Don't mess with the pci
remove functions, as there are still portions of the kernel that think
the link is there if you do that.

Good luck,

greg k-h
-
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/