linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCI config space
@ 2004-01-02 21:55 Jon Smirl
  2004-01-03  0:50 ` Greg KH
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jon Smirl @ 2004-01-02 21:55 UTC (permalink / raw)
  To: linux-hotplug

Is there a standard API for read/write of PCI config space using sysfs?

==Jon Smirl
jonsmirl@yahoo.com

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: PCI config space
  2004-01-02 21:55 PCI config space Jon Smirl
@ 2004-01-03  0:50 ` Greg KH
  2004-01-03  1:03 ` Jon Smirl
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2004-01-03  0:50 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Jan 02, 2004 at 01:55:57PM -0800, Jon Smirl wrote:
> Is there a standard API for read/write of PCI config space using sysfs?

Open the "config" file and read and write the offset that you want to
read/write.

Does that not work for you?

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: PCI config space
  2004-01-02 21:55 PCI config space Jon Smirl
  2004-01-03  0:50 ` Greg KH
@ 2004-01-03  1:03 ` Jon Smirl
  2004-01-03  1:22 ` Greg KH
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Jon Smirl @ 2004-01-03  1:03 UTC (permalink / raw)
  To: linux-hotplug

That's real simple. I was trying to find a more complicated, harder solution. I
need the PCI space for the VM86 emulation of the VBIOS calls.

Is libsysfs going to be part of klibc? I can link it in statically for now.

And I should use something like execl (seems to be in klibc) to call udev to
query for it's directory and my path?

--- Greg KH <greg@kroah.com> wrote:
> On Fri, Jan 02, 2004 at 01:55:57PM -0800, Jon Smirl wrote:
> > Is there a standard API for read/write of PCI config space using sysfs?
> 
> Open the "config" file and read and write the offset that you want to
> read/write.
> 
> Does that not work for you?
> 
> greg k-h


==Jon Smirl
jonsmirl@yahoo.com

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: PCI config space
  2004-01-02 21:55 PCI config space Jon Smirl
  2004-01-03  0:50 ` Greg KH
  2004-01-03  1:03 ` Jon Smirl
@ 2004-01-03  1:22 ` Greg KH
  2004-01-03  1:57 ` Jon Smirl
  2004-01-03  2:21 ` Greg KH
  4 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2004-01-03  1:22 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Jan 02, 2004 at 05:03:20PM -0800, Jon Smirl wrote:
> That's real simple. I was trying to find a more complicated, harder solution. I
> need the PCI space for the VM86 emulation of the VBIOS calls.
> 
> Is libsysfs going to be part of klibc? I can link it in statically for now.

They are two different, separate things, and will stay that way.

> And I should use something like execl (seems to be in klibc) to call udev to
> query for it's directory and my path?

"my path"?  What does that mean?

thanks,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: PCI config space
  2004-01-02 21:55 PCI config space Jon Smirl
                   ` (2 preceding siblings ...)
  2004-01-03  1:22 ` Greg KH
@ 2004-01-03  1:57 ` Jon Smirl
  2004-01-03  2:21 ` Greg KH
  4 siblings, 0 replies; 6+ messages in thread
From: Jon Smirl @ 2004-01-03  1:57 UTC (permalink / raw)
  To: linux-hotplug

--- Greg KH <greg@kroah.com> wrote:
> On Fri, Jan 02, 2004 at 05:03:20PM -0800, Jon Smirl wrote:
> > And I should use something like execl (seems to be in klibc) to call udev to
> > query for it's directory and my path?
> 
> "my path"?  What does that mean?

My DEVPATH, /class/dri/card0 so that I can do:
 udev -q /class/dri/card0
and get the path to my device:
 dri/card0
and combine it with:
 udev -r
which returns
/udev/

So that I can build the path to my device:
/udev/dri/card0

==Jon Smirl
jonsmirl@yahoo.com

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: PCI config space
  2004-01-02 21:55 PCI config space Jon Smirl
                   ` (3 preceding siblings ...)
  2004-01-03  1:57 ` Jon Smirl
@ 2004-01-03  2:21 ` Greg KH
  4 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2004-01-03  2:21 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Jan 02, 2004 at 05:57:02PM -0800, Jon Smirl wrote:
> --- Greg KH <greg@kroah.com> wrote:
> > On Fri, Jan 02, 2004 at 05:03:20PM -0800, Jon Smirl wrote:
> > > And I should use something like execl (seems to be in klibc) to call udev to
> > > query for it's directory and my path?
> > 
> > "my path"?  What does that mean?
> 
> My DEVPATH, /class/dri/card0 so that I can do:
>  udev -q /class/dri/card0
> and get the path to my device:
>  dri/card0

That is your device node that udev created, right?

> and combine it with:
>  udev -r
> which returns
> /udev/
> 
> So that I can build the path to my device:
> /udev/dri/card0

Yes, then you can do whatever operations on that device node you want
to.

But if you want to touch the PCI config stuff for your device, just go
off of the DEVPATH.  There should be a "device" symlink in your
/class/dri/card0/ directory that points to the pci device directory,
right?

Anyway, it sounds like you are on the right path...

thanks,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

end of thread, other threads:[~2004-01-03  2:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-02 21:55 PCI config space Jon Smirl
2004-01-03  0:50 ` Greg KH
2004-01-03  1:03 ` Jon Smirl
2004-01-03  1:22 ` Greg KH
2004-01-03  1:57 ` Jon Smirl
2004-01-03  2:21 ` Greg KH

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