* Exclusive access to hardware for test purpose
@ 2004-10-28 22:35 Mehul Patel
0 siblings, 0 replies; 3+ messages in thread
From: Mehul Patel @ 2004-10-28 22:35 UTC (permalink / raw)
To: linux-kernel; +Cc: greg
Hi,
Is anyone aware of kernel call which allows a test
tool developer to have exclusive access to PCI adapter
hardware. By exclusive access I mean both
driver as well as kernel should not touch hardware.
I have been using driver's remove call to simulate the
situation as if adapter has been hot plugged out. And
once my testing is done I call driver's probe
call to put adapter back. But this seems to create a
problem when somehow kernel calls driver's remove
call.
Also If I dont call probe for the removed adapter, on
next reboot machine hangs !
Any information/suggestions please .....
Thanks in advance.
best regards,
Mehul.
Send instant messages to your online friends http://uk.messenger.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Exclusive access to hardware for test purpose
[not found] <OF2D431ED5.0E0040F4-ON65256F3B.0074805E-65256F3B.007703B3@in.ibm.com>
@ 2004-10-29 20:43 ` Greg KH
[not found] ` <OF8948B2BB.F576944E-ON65256F3C.00784B09-65256F3C.007CC331@in.ibm.com>
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2004-10-29 20:43 UTC (permalink / raw)
To: Mehulkumar J Patel; +Cc: linux-kernel
On Fri, Oct 29, 2004 at 03:05:59AM +0530, Mehulkumar J Patel wrote:
> Hi,
>
> Is anyone aware of kernel call which allows a test tool developer to have
> exclusive access to PCI adapter hardware. By exclusive access I mean both
> driver as well as kernel should not touch hardware.
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.
> I have been using driver's remove call to simulate the situation as if
> adapter has been hot plugged out. And once my testing is done I call
> driver's probe
> call to put adapter back. But this seems to create a problem when somehow
> kernel calls driver's remove call.
What kind of problem happens? Any code you can point us at?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Exclusive access to hardware for test purpose
[not found] ` <OF8948B2BB.F576944E-ON65256F3C.00784B09-65256F3C.007CC331@in.ibm.com>
@ 2004-10-29 22:58 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2004-10-29 22:58 UTC (permalink / raw)
To: Mehulkumar J Patel; +Cc: linux-kernel
On Sat, Oct 30, 2004 at 04:08:46AM +0530, Mehulkumar J Patel wrote:
> Greg KH <greg@kroah.com>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-29 23:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <OF2D431ED5.0E0040F4-ON65256F3B.0074805E-65256F3B.007703B3@in.ibm.com>
2004-10-29 20:43 ` Exclusive access to hardware for test purpose Greg KH
[not found] ` <OF8948B2BB.F576944E-ON65256F3C.00784B09-65256F3C.007CC331@in.ibm.com>
2004-10-29 22:58 ` Greg KH
2004-10-28 22:35 Mehul Patel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox