Re: Resources and ACPI

2007-04-11 Thread Alan Garfield
On Wed, 2007-04-11 at 11:40 -0500, Craig Boston wrote: > Looking back at the thread I see that you're porting a Linux driver, > that explains a lot of the confusion. It's been a while since I've > worked with the Linux kernel in depth, but I seem to remember that a lot > of drivers (especially ma

Re: ATAPI CD Insertion

2007-04-11 Thread Dag-Erling Smørgrav
"Ali Mashtizadeh" <[EMAIL PROTECTED]> writes: > Is there a way to detect a cdrom insert/eject (in the kernel or usermode)? > Or is there a way to check a media change? No, you have to poll. DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] ___ freebsd-hac

ATAPI CD Insertion

2007-04-11 Thread Ali Mashtizadeh
Hi Everyone, Is there a way to detect a cdrom insert/eject (in the kernel or usermode)? Or is there a way to check a media change? I know atadev->flags gets set with ATA_D_MEDIA_CHANGED under certain conditions but I want that to happen when I eject / insert the media? (maybe it already happens a

Re: Erroneous delivery of list e-mail

2007-04-11 Thread Dag-Erling Smørgrav
<[EMAIL PROTECTED]> writes: > Dag-Erling Smørgrav <[EMAIL PROTECTED]> writes: > > Because you aren't - somebody is forwarding list traffic to you, > > possibly maliciously. > How can I stop it? I don't know, we need to figure out who's forwarding this to you. > I really hate to keep imposing on t

Re: Resources and ACPI

2007-04-11 Thread Craig Boston
On Thu, Apr 12, 2007 at 02:22:31AM +1000, Alan Garfield wrote: > > jnet0: port 0xa8,0xae-0xaf irq 19 on acpi0 > jnet0: alloc io port: 00a8 size: 1 > jnet0: alloc io port: 00ae size: 2 > jnet0: Ethernet address: 00:09:3d:00:00:03 > Looks like it's on the right track, glad I could help!

Re: Resources and ACPI

2007-04-11 Thread Marcel Moolenaar
On Apr 11, 2007, at 4:49 AM, Alan Garfield wrote: are these resources automagically allocated for me? Or do I have to allocate them myself? You have to allocate the resource. Ok cool, but how do I get the resource list from acpi to allocated them then? Other than having an array of ioports

Re: Resources and ACPI

2007-04-11 Thread Alan Garfield
On Wed, 2007-04-11 at 10:37 -0500, Craig Boston wrote: > Ok, well just for the record it's been a while since I've worked with > busdma so my knowledge is more of a high level overview. Hopefully if > I get anything wrong someone will step in and correct me. :) You da man! jnet0: port 0xa8

Re: Resources and ACPI

2007-04-11 Thread Craig Boston
Ok, well just for the record it's been a while since I've worked with busdma so my knowledge is more of a high level overview. Hopefully if I get anything wrong someone will step in and correct me. :) On Thu, Apr 12, 2007 at 12:37:07AM +1000, Alan Garfield wrote: > I've got a very machine specifi

Re: Resources and ACPI

2007-04-11 Thread Alan Garfield
On Wed, 2007-04-11 at 09:02 -0500, Craig Boston wrote: > This means that your driver will work regardless if the resources are > specified by ACPI, or if in the future if some mad scientist attaches > the hardware to the PCI bus on a SPARC64 instead (with only minimal > driver changes). Ok now I'

Re: Resources and ACPI

2007-04-11 Thread Craig Boston
On Wed, Apr 11, 2007 at 09:49:17PM +1000, Alan Garfield wrote: > I've done an acpidump and indeed the are _CRS and _PRS ResourceTemplates > that describe the io and irq requirements perfectly. How do I access > this data? ACPI seems to have very little documentation and nothing else > seems to g

Re: Resources and ACPI

2007-04-11 Thread Craig Boston
On Wed, Apr 11, 2007 at 09:02:14AM -0500, Craig Boston wrote: > If it seems like magic, that's because it is. :) For PnP busses like > PCI, ISAPnP, and ISA-ACPI/LPC-ACPI, the OS takes care of figuring out > what resources to use and allocates them. I almost forgot, the busdma functions work for n

Re: Resources and ACPI

2007-04-11 Thread Alan Garfield
[EMAIL PROTECTED] wrote: and when the device is kldload'ed you get :- jnet0: port 0xa8,0xae-0xaf irq 19 on acpi0 are these resources automagically allocated for me? Or do I have to allocate them myself? You have to allocate the resource. Ok cool, but how do I get the resource li

Re: Resources and ACPI

2007-04-11 Thread takawata
In message <[EMAIL PROTECTED]>, Alan Garfield $B$5$s$$$o$/(B: >[EMAIL PROTECTED] wrote: >>> If the resources are allocated how do I access/see them? >> >> sc->sc_rid1 = 0; >> sc->sc_res1 = bus_alloc_resource_any(self, SYS_RES_IOPORT, &sc->sc_rid, >RF_ACTIVE); >> sc->sc_rid2 = 0; Oo

Re: Resources and ACPI

2007-04-11 Thread Alan Garfield
[EMAIL PROTECTED] wrote: If the resources are allocated how do I access/see them? sc->sc_rid1 = 0; sc->sc_res1 = bus_alloc_resource_any(self, SYS_RES_IOPORT, &sc->sc_rid, RF_ACTIVE); sc->sc_rid2 = 0; sc->sc_res2 = bus_alloc_resource_any(self, SYS_RES_IOPORT, &sc->sc_rid, RF_AC

Re: Resources and ACPI

2007-04-11 Thread takawata
In message <[EMAIL PROTECTED]>, wrote: >Hi all, > >When you have say :- > > >static int >jnet_probe(device_t >dev) > >{ >static char *jnet_ids[] = { "NWS8001", >NULL };

Resources and ACPI

2007-04-11 Thread Alan Garfield
Hi all, When you have say :- static int jnet_probe(device_t dev) { static char *jnet_ids[] = { "NWS8001", NULL };