linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem: how to sequence reset of PCI hardware
@ 2005-02-21  7:24 Jon Smirl
  2005-02-21  8:37 ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Smirl @ 2005-02-21  7:24 UTC (permalink / raw)
  To: lkml, fbdev, Greg KH

Secondary video cards need to be reset before they will work. How can
we get the kernel to do this? I can not come up with a good solution
for triggering this from a device driver.

One sequence I tried:
modprobe driver
driver registers sysfs class and triggers hotplug
probe code fail because HW is not reset
user space hotplug reset app runs
when reset is finished poke a sysfs attribute
in attribute handler reprobe the card

The sequence needs to be tolerant of the user space hotplug app failing
It also has to handle a rmmod of the driver while the user space app is running

An alternative is to put a emu86 execution module into the kernel.
That will allow the reset to occur synchronously. The linuxbios people
have one that is about 40-50K in size.

Another solution would be to have the PCI subsystem track devices that
have not been reset yet. modprobe of a driver would trigger a hotplug
reset event and fail the modprobe. The user space reset app would tell
the PCI subsystem when the hardware was successfully reset. After that
the modprobe would be allow to procede like normal.

I haven't been able to come up with a reliable way to call a user
space reset program from a driver's probe function except with an
in-kernel emu86. Is there another way? I'd also like to try an find a
solution that doesn't need to modify the 73 existing framebuffer
drivers.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem: how to sequence reset of PCI hardware
  2005-02-21  7:24 Problem: how to sequence reset of PCI hardware Jon Smirl
@ 2005-02-21  8:37 ` Jeff Garzik
  2005-02-21 16:52   ` Jon Smirl
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2005-02-21  8:37 UTC (permalink / raw)
  To: Jon Smirl; +Cc: lkml, fbdev, Greg KH

Jon Smirl wrote:
> I haven't been able to come up with a reliable way to call a user
> space reset program from a driver's probe function except with an
> in-kernel emu86. Is there another way? I'd also like to try an find a
> solution that doesn't need to modify the 73 existing framebuffer
> drivers.


You either need to execute the video BIOS to initialize the hardware 
registers, or initialize the hardware registers themselves.

	Jeff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem: how to sequence reset of PCI hardware
  2005-02-21  8:37 ` Jeff Garzik
@ 2005-02-21 16:52   ` Jon Smirl
  2005-02-21 17:02     ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Smirl @ 2005-02-21 16:52 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: lkml, fbdev, Greg KH

On Mon, 21 Feb 2005 03:37:45 -0500, Jeff Garzik <jgarzik@pobox.com> wrote:
> You either need to execute the video BIOS to initialize the hardware
> registers, or initialize the hardware registers themselves.

That is what the user mode reset program does.

The problem is, how do I get it to run before calling the device's
probe function? Most of the framebuffer drivers assume that the
hardware has already been reset in their probe code.


> 
>         Jeff
> 
> 


-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem: how to sequence reset of PCI hardware
  2005-02-21 16:52   ` Jon Smirl
@ 2005-02-21 17:02     ` Jeff Garzik
  2005-02-21 17:27       ` Jon Smirl
  2005-02-21 17:33       ` Jon Smirl
  0 siblings, 2 replies; 6+ messages in thread
From: Jeff Garzik @ 2005-02-21 17:02 UTC (permalink / raw)
  To: Jon Smirl; +Cc: lkml, fbdev, Greg KH

Jon Smirl wrote:
> On Mon, 21 Feb 2005 03:37:45 -0500, Jeff Garzik <jgarzik@pobox.com> wrote:
> 
>>You either need to execute the video BIOS to initialize the hardware
>>registers, or initialize the hardware registers themselves.
> 
> 
> That is what the user mode reset program does.
> 
> The problem is, how do I get it to run before calling the device's
> probe function? Most of the framebuffer drivers assume that the
> hardware has already been reset in their probe code.

<shrug>  You do precisely what you just said:  run it before the 
device's probe function.

That typically means either initramfs addition or using 'install 
<module> command...' in /etc/modprobe.conf.

	Jeff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem: how to sequence reset of PCI hardware
  2005-02-21 17:02     ` Jeff Garzik
@ 2005-02-21 17:27       ` Jon Smirl
  2005-02-21 17:33       ` Jon Smirl
  1 sibling, 0 replies; 6+ messages in thread
From: Jon Smirl @ 2005-02-21 17:27 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: lkml, fbdev, Greg KH

On Mon, 21 Feb 2005 12:02:34 -0500, Jeff Garzik <jgarzik@pobox.com> wrote:
> Jon Smirl wrote:
> > On Mon, 21 Feb 2005 03:37:45 -0500, Jeff Garzik <jgarzik@pobox.com> wrote:
> >
> >>You either need to execute the video BIOS to initialize the hardware
> >>registers, or initialize the hardware registers themselves.
> >
> >
> > That is what the user mode reset program does.
> >
> > The problem is, how do I get it to run before calling the device's
> > probe function? Most of the framebuffer drivers assume that the
> > hardware has already been reset in their probe code.
> 
> <shrug>  You do precisely what you just said:  run it before the
> device's probe function.
> 
> That typically means either initramfs addition or using 'install
> <module> command...' in /etc/modprobe.conf.

How does install module work if one driver is servicing several adapters?
What if one adapater is in the card at boot and another shows up via hotplug?

> 
>         Jeff
> 
> 


-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem: how to sequence reset of PCI hardware
  2005-02-21 17:02     ` Jeff Garzik
  2005-02-21 17:27       ` Jon Smirl
@ 2005-02-21 17:33       ` Jon Smirl
  1 sibling, 0 replies; 6+ messages in thread
From: Jon Smirl @ 2005-02-21 17:33 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: lkml, fbdev, Greg KH

On Mon, 21 Feb 2005 12:02:34 -0500, Jeff Garzik <jgarzik@pobox.com> wrote:
> <shrug>  You do precisely what you just said:  run it before the
> device's probe function.
> 
> That typically means either initramfs addition or using 'install
> <module> command...' in /etc/modprobe.conf.

How does this work with a built-in framebuffer driver? Isn't it's
probe function going to get called before I can run something on
initramfs?


> 
>         Jeff
> 
> 


-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-02-21 17:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-21  7:24 Problem: how to sequence reset of PCI hardware Jon Smirl
2005-02-21  8:37 ` Jeff Garzik
2005-02-21 16:52   ` Jon Smirl
2005-02-21 17:02     ` Jeff Garzik
2005-02-21 17:27       ` Jon Smirl
2005-02-21 17:33       ` Jon Smirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).