Re: Some PCI-related programming things

2001-03-21 Thread Julian Elischer
Look at the sample device driver in /usr/share/examples/drivers make_device_driver.sh The one in -current is 'up to date' (retreive it from the CVS web pages) the one in -stable is hopelessly out of date. I'd MFC but I don't know what needs to be changed to make it work in 4.x and I don't have

Re: Some PCI-related programming things

2001-03-21 Thread Alexey Dokuchaev
On Wed, 21 Mar 2001, Mike Smith wrote: > > > Ioctls allow user processes to make function calls within a device > > > driver; they are a mechanism for exporting functionality from a device > > > driver out into userspace. > > > > I know that, of course. > > This wasn't clear from your example

Re: Some PCI-related programming things

2001-03-21 Thread Mike Smith
> > Ioctls allow user processes to make function calls within a device > > driver; they are a mechanism for exporting functionality from a device > > driver out into userspace. > > I know that, of course. This wasn't clear from your example. > > You don't call them from other device drivers,

Re: Some PCI-related programming things

2001-03-21 Thread Alexey Dokuchaev
On Wed, 21 Mar 2001, Mike Smith wrote: > > > > Did I say I'm doing it from userspace?! If I did (too lazy to dig into > > > > sent-mail), I beg your pardon :) > > > > > > Your FreeBSD sample involved making an ioctl call, so it must have been > > > from userspace. > > > > Is anything wrong wi

Re: Some PCI-related programming things

2001-03-21 Thread Mike Smith
> > > Did I say I'm doing it from userspace?! If I did (too lazy to dig into > > > sent-mail), I beg your pardon :) > > > > Your FreeBSD sample involved making an ioctl call, so it must have been > > from userspace. > > Is anything wrong with using ioctl calls from device driver? Perhaps a mo

Re: Some PCI-related programming things

2001-03-21 Thread Mike Smith
> > > > Mm, so what's it doing in userspace? 8) > > > > > > Did I say I'm doing it from userspace?! If I did (too lazy to dig into > > > sent-mail), I beg your pardon :) > > > > Your FreeBSD sample involved making an ioctl call, so it must have been > > from userspace. > > Is anything wrong w

Re: Some PCI-related programming things

2001-03-21 Thread Alexey Dokuchaev
On Wed, 21 Mar 2001, Mike Smith wrote: > > > > This code is used, actually, in char device driver. > > > > > > Mm, so what's it doing in userspace? 8) > > > > Did I say I'm doing it from userspace?! If I did (too lazy to dig into > > sent-mail), I beg your pardon :) > > Your FreeBSD sample in

Re: Some PCI-related programming things

2001-03-21 Thread Mike Smith
> > Because dinking with PCI configuration space is usually the wrong thing > > to do from userland. > > So what about pciconf(8)? It's a special case. > > > This code is used, actually, in char device driver. > > > > Mm, so what's it doing in userspace? 8) > > Did I say I'm doing it from us

Re: Some PCI-related programming things

2001-03-21 Thread Alexey Dokuchaev
On Wed, 21 Mar 2001, Mike Smith wrote: > > > > Hey, that's not fair :-) I'd like to know how to do things the rigth way. > > > > > > You'll need to tell us what it is that you're actually doing, then, since > > > it's hard to guess from a tiny snippet like that. 8) > > > > Well, but if you di

Re: Some PCI-related programming things

2001-03-21 Thread Mike Smith
> > > Hey, that's not fair :-) I'd like to know how to do things the rigth way. > > > > You'll need to tell us what it is that you're actually doing, then, since > > it's hard to guess from a tiny snippet like that. 8) > > Well, but if you didn't know, how could you tell that I'm doing somethi

Re: Some PCI-related programming things

2001-03-21 Thread Alexey Dokuchaev
On Tue, 20 Mar 2001, Mike Smith wrote: > > > > Under linux, PCI stuff is generally done thru set of pci* functions, while > > > > under FreeBSD there are ioctls provided by pci driver. I've been doing > > > > some code migration from linux to FreeBSD, and got thru most of it, except > > > > for

Re: Some PCI-related programming things

2001-03-20 Thread Mike Smith
> > > Under linux, PCI stuff is generally done thru set of pci* functions, while > > > under FreeBSD there are ioctls provided by pci driver. I've been doing > > > some code migration from linux to FreeBSD, and got thru most of it, except > > > for things like this one: > > > > You are probably

Re: Some PCI-related programming things

2001-03-19 Thread Alexey Dokuchaev
On Sun, 18 Mar 2001, Mike Smith wrote: > > Hello there, > > > > Under linux, PCI stuff is generally done thru set of pci* functions, while > > under FreeBSD there are ioctls provided by pci driver. I've been doing > > some code migration from linux to FreeBSD, and got thru most of it, except >

Re: Some PCI-related programming things

2001-03-18 Thread Mike Smith
> Hello there, > > Under linux, PCI stuff is generally done thru set of pci* functions, while > under FreeBSD there are ioctls provided by pci driver. I've been doing > some code migration from linux to FreeBSD, and got thru most of it, except > for things like this one: You are probably doing

Some PCI-related programming things

2001-03-18 Thread Alexey Dokuchaev
Hello there, Under linux, PCI stuff is generally done thru set of pci* functions, while under FreeBSD there are ioctls provided by pci driver. I've been doing some code migration from linux to FreeBSD, and got thru most of it, except for things like this one: . . . pcibios_read_config_