linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] smsc-ircc2: Add PnP support.
       [not found] <20041117232047.GA28061@bougret.hpl.hp.com>
@ 2004-11-18  3:52 ` Ville Syrjälä
  0 siblings, 0 replies; 37+ messages in thread
From: Ville Syrjälä @ 2004-11-18  3:52 UTC (permalink / raw)
  To: jt; +Cc: irda-users, linux-kernel, ambx1

On Wed, Nov 17, 2004 at 03:20:47PM -0800, Jean Tourrilhes wrote:
> Ville wrote :
> > Add PnP support to smsc-ircc2 driver.
> > Briefly tested with irdadump on a Dell Inpsiron 7000.
> 
> 	Thanks for the patch. I slightly moved you code around, you'll
> find my version of your patch on my web page.
> 
> 	Now, a few comments...
> 
> 	1) I don't have any SmSC chipset around, so I can't do any
> testing. I would appreciate other people to test your patch. Also,
> make sure I did not introduce mistakes in my version of the patch.

Your version works fine (irdadump works).

> 	2) I tried to apply the same code to NSC. It did not manage to
> read the ressource properly, and therefore the PnP code disabled the
> hardware, and I was no longer able to get it running (short of a
> reboot of the computer). The nsc-ircc has only one i/o region (dumb
> nsc).

I have a machine with nsc-ircc here so I think I'll try that too.

> 	The issue there is that if a smsc chipset has a valid PnP ID
> but somehow the pnp_probe fails to set it up, then the regular probe
> won't be able to configure it. This makes me nervous.
> 
> 	3) If the ressources are markes as disabled, you just quit
> with an error. Compouded with (2), this makes me doubly
> nervous. Wouldn't it be possible to forcefully enable those ressources ?
> 	The idea there is that more and more IrDA devices are comming
> disabled in BIOS with no BIOS entry to enable them. Enabling those
> ressources would fix that and possible make smc-init redundant (I wish).

pnp_activate_dev() should probably be used to enable the device but it was
only used by ISAPNP drivers so I didn't use it in this patch.

I must admit that I really don't know much about the PNP subsystem. I 
used the parport_pc driver as a guide. I've CC'd Adam Belay and 
linux-kernel in the hopes that someone can help with this stuff.

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
@ 2004-11-18 18:42 matthieu castet
  2004-11-18 18:55 ` Jean Tourrilhes
  2004-11-19 15:27 ` Meelis Roos
  0 siblings, 2 replies; 37+ messages in thread
From: matthieu castet @ 2004-11-18 18:42 UTC (permalink / raw)
  To: linux-kernel, syrjala, jt; +Cc: Adam Belay

Hi,

I had also done a pnp patch for the smsc-ircc2 and irport 3 months ago.
Unfortunaly I don't remember where I put the patches, certainly on the 
laptop that it is in my parent home.

 > On Wed, Nov 17, 2004 at 03:20:47PM -0800, Jean Tourrilhes wrote:
 > > Ville wrote :
 > > > Add PnP support to smsc-ircc2 driver.
 > > > Briefly tested with irdadump on a Dell Inpsiron 7000.
 > >
 > > OnThanks for the patch. I slightly moved you code around, you'll
 > > find my version of your patch on my web page.
 > >
 > > OnNow, a few comments...
 > >
 > > On1) I don't have any SmSC chipset around, so I can't do any
 > > testing. I would appreciate other people to test your patch. Also,
 > > make sure I did not introduce mistakes in my version of the patch.
 >
 > Your version works fine (irdadump works).
 >
 > > On2) I tried to apply the same code to NSC. It did not manage to
 > > read the ressource properly, and therefore the PnP code disabled the
 > > hardware, and I was no longer able to get it running (short of a
 > > reboot of the computer). The nsc-ircc has only one i/o region (dumb
 > > nsc).
 >
try to do an "echo auto > /sys/bus/pnp/device_number/resources"

It will reenable the device.

 > I have a machine with nsc-ircc here so I think I'll try that too.
 >
 > > OnThe issue there is that if a smsc chipset has a valid PnP ID
 > > but somehow the pnp_probe fails to set it up, then the regular probe
 > > won't be able to configure it. This makes me nervous.
 > >
Yes that's the problem this pnp, if the probe failed it disable the 
device resource.
When I do my patch I encounter the problem : I called pnp driver after 
smsc_ircc_look_for_chips, so all the resources where already reserved, 
and the pnp probe failed and it disable the resource, and the device 
found with the traditional smsc_ircc_look_for_chips doesn't work.

So in my patch if I register pnp devices, I don't run 
smsc_ircc_look_for_chips like it is done for (ircc_fir>0)&&(ircc_sir>0) 
case.



 > > On3) If the ressources are markes as disabled, you just quit
 > > with an error. Compouded with (2), this makes me doubly
 > > nervous. Wouldn't it be possible to forcefully enable those 
ressources ?
pnp should call automatiquely pnp_activate_dev() before probing the 
driver, so the resource should be activated. Have you got an example 
where the resource wheren't activated ?

 > > OnThe idea there is that more and more IrDA devices are comming
 > > disabled in BIOS with no BIOS entry to enable them. Enabling those
 > > ressources would fix that and possible make smc-init redundant (I 
wish).
 >
 > pnp_activate_dev() should probably be used to enable the device but 
it was
 > only used by ISAPNP drivers so I didn't use it in this patch.
 >
 > I must admit that I really don't know much about the PNP subsystem. I
 > used the parport_pc driver as a guide. I've CC'd Adam Belay and
 > linux-kernel in the hopes that someone can help with this stuff.

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-18 18:42 [PATCH] smsc-ircc2: Add PnP support matthieu castet
@ 2004-11-18 18:55 ` Jean Tourrilhes
  2004-11-18 19:49   ` matthieu castet
  2004-11-19 15:27 ` Meelis Roos
  1 sibling, 1 reply; 37+ messages in thread
From: Jean Tourrilhes @ 2004-11-18 18:55 UTC (permalink / raw)
  To: matthieu castet; +Cc: linux-kernel, syrjala, Adam Belay

On Thu, Nov 18, 2004 at 07:42:07PM +0100, matthieu castet wrote:
> Hi,
> 
> I had also done a pnp patch for the smsc-ircc2 and irport 3 months ago.
> Unfortunaly I don't remember where I put the patches, certainly on the 
> laptop that it is in my parent home.

	I've never seen you patches on the irda mailing list...

> try to do an "echo auto > /sys/bus/pnp/device_number/resources"
> 
> It will reenable the device.

	Thanks for the tip.

> > I have a machine with nsc-ircc here so I think I'll try that too.
> >
> > > OnThe issue there is that if a smsc chipset has a valid PnP ID
> > > but somehow the pnp_probe fails to set it up, then the regular probe
> > > won't be able to configure it. This makes me nervous.
> > >
> Yes that's the problem this pnp, if the probe failed it disable the 
> device resource.
> When I do my patch I encounter the problem : I called pnp driver after 
> smsc_ircc_look_for_chips, so all the resources where already reserved, 
> and the pnp probe failed and it disable the resource, and the device 
> found with the traditional smsc_ircc_look_for_chips doesn't work.
> 
> So in my patch if I register pnp devices, I don't run 
> smsc_ircc_look_for_chips like it is done for (ircc_fir>0)&&(ircc_sir>0) 
> case.

	smsc_ircc_look_for_chips won't re-register the devices
configured via PnP, as smsc_ircc_present won't be able to request the
region. So, I don't see the problem. And you could imagine having
multiple SMSC in the box, some PnP, some not.
	Note that we could put the region check earlier, but I like
the fact that the driver is still able to probe completely the chip
even if the serial driver has grabbed the regions. Maybe we could
split the difference and request the FIR region early on (so to fail
on SMC devices already registered) and request the other ressources
late (so as to completely probe even when serial is loaded).

> > > On3) If the ressources are markes as disabled, you just quit
> > > with an error. Compouded with (2), this makes me doubly
> > > nervous. Wouldn't it be possible to forcefully enable those 
> ressources ?
> pnp should call automatiquely pnp_activate_dev() before probing the 
> driver, so the resource should be activated. Have you got an example 
> where the resource wheren't activated ?

	No, it was more that I don't understand what PnP does for
us. I don't have a SMS chipset to test on. Also, I would like to know
if it remove the need of smcinit.

	Thanks, have fun...

	Jean

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-18 18:55 ` Jean Tourrilhes
@ 2004-11-18 19:49   ` matthieu castet
  2004-11-18 20:41     ` Ville Syrjälä
  0 siblings, 1 reply; 37+ messages in thread
From: matthieu castet @ 2004-11-18 19:49 UTC (permalink / raw)
  To: jt; +Cc: linux-kernel, syrjala, Adam Belay

Jean Tourrilhes wrote:
> On Thu, Nov 18, 2004 at 07:42:07PM +0100, matthieu castet wrote:
> 
>>Hi,
>>
>>I had also done a pnp patch for the smsc-ircc2 and irport 3 months ago.
>>Unfortunaly I don't remember where I put the patches, certainly on the 
>>laptop that it is in my parent home.
> 
> 
> 	I've never seen you patches on the irda mailing list...
> 
> 
When I wanted to send them, I didn't find them, and after that I forgot 
them...

if you are still interested for the irport, I could try to ask someone 
to send it to me.
>>>I have a machine with nsc-ircc here so I think I'll try that too.
>>>
>>>
>>>>OnThe issue there is that if a smsc chipset has a valid PnP ID
>>>>but somehow the pnp_probe fails to set it up, then the regular probe
>>>>won't be able to configure it. This makes me nervous.
>>>>
>>
>>Yes that's the problem this pnp, if the probe failed it disable the 
>>device resource.
>>When I do my patch I encounter the problem : I called pnp driver after 
>>smsc_ircc_look_for_chips, so all the resources where already reserved, 
>>and the pnp probe failed and it disable the resource, and the device 
>>found with the traditional smsc_ircc_look_for_chips doesn't work.
>>
>>So in my patch if I register pnp devices, I don't run 
>>smsc_ircc_look_for_chips like it is done for (ircc_fir>0)&&(ircc_sir>0) 
>>case.
> 
> 
> 	smsc_ircc_look_for_chips won't re-register the devices
> configured via PnP, as smsc_ircc_present won't be able to request the
> region. So, I don't see the problem. And you could imagine having
> multiple SMSC in the box, some PnP, some not.
Yes, it was just because it produce some warning message.
> 	Note that we could put the region check earlier, but I like
> the fact that the driver is still able to probe completely the chip
> even if the serial driver has grabbed the regions. Maybe we could
> split the difference and request the FIR region early on (so to fail
> on SMC devices already registered) and request the other ressources
> late (so as to completely probe even when serial is loaded).
> 
> 
>>>>On3) If the ressources are markes as disabled, you just quit
>>>>with an error. Compouded with (2), this makes me doubly
>>>>nervous. Wouldn't it be possible to forcefully enable those 
>>
>>ressources ?
>>pnp should call automatiquely pnp_activate_dev() before probing the 
>>driver, so the resource should be activated. Have you got an example 
>>where the resource wheren't activated ?
> 
> 
> 	No, it was more that I don't understand what PnP does for
> us. I don't have a SMS chipset to test on. Also, I would like to know
> if it remove the need of smcinit.
> 
PnP is easy to understand ;)
When you probe a device, it will activate a device with the best 
configuration available.
When removing a device it will disable the resource of the device.
A driver could play a little with the resources configuration : try 
another configuration, but it is not really need.

Also PnP can provide several id for a device : for example for my smsc 
device, I have SMCf010 and PNP0510 or PNP0511. So in this case we should 
load the smsc driver first, otherwise for example a pnp version of 
irport could register the device and it is not available for smsc (PnP 
will see that there is a driver attached, and not give it to the smsc 
probe).


> 	Thanks, have fun...
> 
> 	Jean
> 
> 

Matthieu

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-18 19:49   ` matthieu castet
@ 2004-11-18 20:41     ` Ville Syrjälä
  2004-11-18 23:02       ` Adam Belay
  0 siblings, 1 reply; 37+ messages in thread
From: Ville Syrjälä @ 2004-11-18 20:41 UTC (permalink / raw)
  To: matthieu castet; +Cc: jt, linux-kernel, Adam Belay

On Thu, Nov 18, 2004 at 08:49:50PM +0100, matthieu castet wrote:
> Jean Tourrilhes wrote:
> >On Thu, Nov 18, 2004 at 07:42:07PM +0100, matthieu castet wrote:
> >>>>On3) If the ressources are markes as disabled, you just quit
> >>>>with an error. Compouded with (2), this makes me doubly
> >>>>nervous. Wouldn't it be possible to forcefully enable those 
> >>
> >>ressources ?
> >>pnp should call automatiquely pnp_activate_dev() before probing the 
> >>driver, so the resource should be activated. Have you got an example 
> >>where the resource wheren't activated ?
> >
> >
> >	No, it was more that I don't understand what PnP does for
> >us. I don't have a SMS chipset to test on. Also, I would like to know
> >if it remove the need of smcinit.
> >
> PnP is easy to understand ;)
> When you probe a device, it will activate a device with the best 
> configuration available.

So can we just remove the IORESOURCE_DISABLED tests?

And what about the pnp_*_valid() tests?

parport_pc (which I used as a guide) does both tests but 8250_pnp doesn't 
do either.

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-18 20:41     ` Ville Syrjälä
@ 2004-11-18 23:02       ` Adam Belay
  0 siblings, 0 replies; 37+ messages in thread
From: Adam Belay @ 2004-11-18 23:02 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: matthieu castet, jt, linux-kernel

On Thu, Nov 18, 2004 at 10:41:45PM +0200, Ville Syrjälä wrote:
> On Thu, Nov 18, 2004 at 08:49:50PM +0100, matthieu castet wrote:
> > Jean Tourrilhes wrote:
> > >On Thu, Nov 18, 2004 at 07:42:07PM +0100, matthieu castet wrote:
> > >>>>On3) If the ressources are markes as disabled, you just quit
> > >>>>with an error. Compouded with (2), this makes me doubly
> > >>>>nervous. Wouldn't it be possible to forcefully enable those 
> > >>
> > >>ressources ?
> > >>pnp should call automatiquely pnp_activate_dev() before probing the 
> > >>driver, so the resource should be activated. Have you got an example 
> > >>where the resource wheren't activated ?
> > >
> > >
> > >	No, it was more that I don't understand what PnP does for
> > >us. I don't have a SMS chipset to test on. Also, I would like to know
> > >if it remove the need of smcinit.
> > >
> > PnP is easy to understand ;)
> > When you probe a device, it will activate a device with the best 
> > configuration available.
> 
> So can we just remove the IORESOURCE_DISABLED tests?
> 
> And what about the pnp_*_valid() tests?
> 
> parport_pc (which I used as a guide) does both tests but 8250_pnp doesn't 
> do either.

Parport_pc uses them because resources could potentially be disabled, but the
parport could still be functional.  Therefore, it must check.  It is probably
ok to not check on most hardware.  Nonetheless, it's best to play it safe, and
always verify the resource configuration.

Thanks,
Adam

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-18 18:42 [PATCH] smsc-ircc2: Add PnP support matthieu castet
  2004-11-18 18:55 ` Jean Tourrilhes
@ 2004-11-19 15:27 ` Meelis Roos
  2004-11-19 15:53   ` matthieu castet
  1 sibling, 1 reply; 37+ messages in thread
From: Meelis Roos @ 2004-11-19 15:27 UTC (permalink / raw)
  To: linux-kernel, matthieu castet, Jean Tourrilhes, Adam Belay

mc> try to do an "echo auto > /sys/bus/pnp/device_number/resources"
mc> 
mc> It will reenable the device.

I tried this on my Toshiba Satellite 1800-314 and the device gets IO
resources but is still disabled. echo activate > ... will enable it but
the smc-ircc2 driver still finds that the device is disabled (in
2.6.10-rc2+yesterdays BK):

nartsiss:~# cat /sys/bus/pnp/devices/00\:0a/options
Dependent: 01 - Priority acceptable
   port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 02 - Priority acceptable
   port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 03 - Priority acceptable
   port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 04 - Priority acceptable
   port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding
nartsiss:~# cat /sys/bus/pnp/devices/00\:0a/resources
state = disabled
nartsiss:~# echo auto > /sys/bus/pnp/devices/00\:0a/resources
nartsiss:~# cat /sys/bus/pnp/devices/00\:0a/resources
state = disabled
io 0x2e8-0x2ef
nartsiss:~# echo activate > /sys/bus/pnp/devices/00\:0a/resources
nartsiss:~# cat /sys/bus/pnp/devices/00\:0a/resources
state = active
io 0x2e8-0x2ef
nartsiss:~# modprobe smsc-ircc2
FATAL: Error inserting smsc_ircc2
(/lib/modules/2.6.10-rc2/kernel/drivers/net/irda/smsc-ircc2.ko): No such device
nartsiss:~# dmesg|tail -5
pnp: Device 00:0a activated.
NET: Registered protocol family 23
found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
smsc_superio_flat(): IrDA not enabled
smsc_superio_flat(): fir: 0x00, sir: 0x2e8, dma: 15, irq: 0, mode: 0x02


Looks like there is also a enable/disable bit in the actual LPC device,
or maybe it needs also a fir address and/or irq?

-- 
Meelis Roos

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-19 15:27 ` Meelis Roos
@ 2004-11-19 15:53   ` matthieu castet
  2004-11-19 15:57     ` matthieu castet
  0 siblings, 1 reply; 37+ messages in thread
From: matthieu castet @ 2004-11-19 15:53 UTC (permalink / raw)
  To: Meelis Roos; +Cc: linux-kernel, Jean Tourrilhes, Adam Belay

Meelis Roos wrote:
> mc> try to do an "echo auto > /sys/bus/pnp/device_number/resources"
> mc> 
> mc> It will reenable the device.
> 
> I tried this on my Toshiba Satellite 1800-314 and the device gets IO
> resources but is still disabled. echo activate > ... will enable it but
> the smc-ircc2 driver still finds that the device is disabled (in
> 2.6.10-rc2+yesterdays BK):
> 
> nartsiss:~# cat /sys/bus/pnp/devices/00\:0a/options
> Dependent: 01 - Priority acceptable
>    port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
> Dependent: 02 - Priority acceptable
>    port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
> Dependent: 03 - Priority acceptable
>    port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
> Dependent: 04 - Priority acceptable
>    port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding
that's very strange : you must have 2 io entries, 1 dma entry and an irq 
entry.
Could you try pnpacpi from mm series ?
Any warning from pnpbios at startup ?
A laptop of the friend have wrong pnpbios entries...

Also make sure you don't force in your bios the device to be a sir device.


> nartsiss:~# cat /sys/bus/pnp/devices/00\:0a/resources
> state = disabled
> nartsiss:~# echo auto > /sys/bus/pnp/devices/00\:0a/resources
> nartsiss:~# cat /sys/bus/pnp/devices/00\:0a/resources
> state = disabled
> io 0x2e8-0x2ef
activate is not important : here pnp had found the io resources
> nartsiss:~# echo activate > /sys/bus/pnp/devices/00\:0a/resources
> nartsiss:~# cat /sys/bus/pnp/devices/00\:0a/resources
> state = active
> io 0x2e8-0x2ef
^^^^^^^^^^^^^^^^
> nartsiss:~# modprobe smsc-ircc2
> FATAL: Error inserting smsc_ircc2
> (/lib/modules/2.6.10-rc2/kernel/drivers/net/irda/smsc-ircc2.ko): No such device
> nartsiss:~# dmesg|tail -5
> pnp: Device 00:0a activated.
> NET: Registered protocol family 23
> found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> smsc_superio_flat(): IrDA not enabled
> smsc_superio_flat(): fir: 0x00, sir: 0x2e8, dma: 15, irq: 0, mode: 0x02
> 
> 
> Looks like there is also a enable/disable bit in the actual LPC device,
> or maybe it needs also a fir address and/or irq?
> 


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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-19 15:53   ` matthieu castet
@ 2004-11-19 15:57     ` matthieu castet
  2004-11-19 16:15       ` Meelis Roos
  2004-11-19 16:22       ` Meelis Roos
  0 siblings, 2 replies; 37+ messages in thread
From: matthieu castet @ 2004-11-19 15:57 UTC (permalink / raw)
  To: matthieu castet; +Cc: Meelis Roos, linux-kernel, Jean Tourrilhes, Adam Belay

matthieu castet wrote:
> Meelis Roos wrote:
> 
>> mc> try to do an "echo auto > /sys/bus/pnp/device_number/resources"
>> mc> mc> It will reenable the device.
>>
>> I tried this on my Toshiba Satellite 1800-314 and the device gets IO
>> resources but is still disabled. echo activate > ... will enable it but
>> the smc-ircc2 driver still finds that the device is disabled (in
>> 2.6.10-rc2+yesterdays BK):
>>
>> nartsiss:~# cat /sys/bus/pnp/devices/00\:0a/options
>> Dependent: 01 - Priority acceptable
>>    port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
>> Dependent: 02 - Priority acceptable
>>    port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
>> Dependent: 03 - Priority acceptable
>>    port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
>> Dependent: 04 - Priority acceptable
>>    port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding
> 
> that's very strange : you must have 2 io entries, 1 dma entry and an irq 
> entry.
> Could you try pnpacpi from mm series ?
no need : it is in rc2.
So do you use pnpacpi ?
If so, could you send your dsdt and try with pnpbios?

Matthieu

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-19 15:57     ` matthieu castet
@ 2004-11-19 16:15       ` Meelis Roos
  2004-11-19 16:22       ` Meelis Roos
  1 sibling, 0 replies; 37+ messages in thread
From: Meelis Roos @ 2004-11-19 16:15 UTC (permalink / raw)
  To: matthieu castet; +Cc: linux-kernel, Jean Tourrilhes, Adam Belay

>> that's very strange : you must have 2 io entries, 1 dma entry and an irq 
>> entry.
>> Could you try pnpacpi from mm series ?
> no need : it is in rc2.
> So do you use pnpacpi ?
> If so, could you send your dsdt and try with pnpbios?

# CONFIG_ISAPNP is not set
CONFIG_PNPBIOS=y
CONFIG_PNPBIOS_PROC_FS=y
CONFIG_PNPACPI=y

dmesg tells
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 13 devices
PnPBIOS: Disabled by ACPI

Will try disabling pnpacpi today.

How do I extract DSDT?

-- 
Meelis Roos (mroos@ut.ee)      http://www.cs.ut.ee/~mroos/

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-19 15:57     ` matthieu castet
  2004-11-19 16:15       ` Meelis Roos
@ 2004-11-19 16:22       ` Meelis Roos
  2004-11-19 17:28         ` matthieu castet
  1 sibling, 1 reply; 37+ messages in thread
From: Meelis Roos @ 2004-11-19 16:22 UTC (permalink / raw)
  To: matthieu castet; +Cc: linux-kernel, Jean Tourrilhes, Adam Belay

> So do you use pnpacpi ?
> If so, could you send your dsdt and try with pnpbios?

DSDT is here: http://www.cs.ut.ee/~mroos/toshsat1800_dsdt.img

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-19 16:22       ` Meelis Roos
@ 2004-11-19 17:28         ` matthieu castet
  2004-11-19 17:34           ` Meelis Roos
  0 siblings, 1 reply; 37+ messages in thread
From: matthieu castet @ 2004-11-19 17:28 UTC (permalink / raw)
  To: Meelis Roos; +Cc: linux-kernel, Jean Tourrilhes, Adam Belay, Li, Shaohua

Meelis Roos wrote:
>> So do you use pnpacpi ?
>> If so, could you send your dsdt and try with pnpbios?
> 
> 
> DSDT is here: http://www.cs.ut.ee/~mroos/toshsat1800_dsdt.img
> 

hum, your bios seem to build dynamically the resources (need an acpi 
expert for confirmation)

Could you send me the result of : "for i in /sys/bus/pnp/devices/*; do 
cat $i/id $i/options; done" in order to see if other devices have 
missing resources ?

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-19 17:28         ` matthieu castet
@ 2004-11-19 17:34           ` Meelis Roos
  2004-11-19 18:29             ` matthieu castet
  0 siblings, 1 reply; 37+ messages in thread
From: Meelis Roos @ 2004-11-19 17:34 UTC (permalink / raw)
  To: matthieu castet
  Cc: Linux Kernel list, Jean Tourrilhes, Adam Belay, Li, Shaohua

> Could you send me the result of : "for i in /sys/bus/pnp/devices/*; do cat 
> $i/id $i/options; done" in order to see if other devices have missing 
> resources ?

PNP0c01
PNP0200
PNP0800
PNP0c04
PNP0303
PNP0f13
PNP0b00
PNP0c02
PNP0700
port 0x3f0-0x3f0, align 0x0, size 0x6, 16-bit address decoding
port 0x3f7-0x3f7, align 0x0, size 0x1, 16-bit address decoding
irq 6 High-Edge
dma 2 8-bit compatible
PNP0501
Dependent: 01 - Priority acceptable
    port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 02 - Priority acceptable
    port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 03 - Priority acceptable
    port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 04 - Priority acceptable
    port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding
SMCf010
Dependent: 01 - Priority acceptable
    port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 02 - Priority acceptable
    port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 03 - Priority acceptable
    port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 04 - Priority acceptable
    port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding
PNP0401
Dependent: 01 - Priority acceptable
    port 0x378-0x378, align 0x0, size 0x3, 16-bit address decoding
    port 0x778-0x778, align 0x0, size 0x3, 16-bit address decoding
    irq 7 High-Edge
Dependent: 02 - Priority acceptable
    port 0x278-0x278, align 0x0, size 0x3, 16-bit address decoding
    port 0x678-0x678, align 0x0, size 0x3, 16-bit address decoding
    irq 5 High-Edge
Dependent: 03 - Priority acceptable
    port 0x3bc-0x3bc, align 0x0, size 0x3, 16-bit address decoding
    port 0x7bc-0x7bc, align 0x0, size 0x3, 16-bit address decoding
    irq 7 High-Edge
TOS6200

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-19 17:34           ` Meelis Roos
@ 2004-11-19 18:29             ` matthieu castet
  2004-11-19 23:09               ` Meelis Roos
  0 siblings, 1 reply; 37+ messages in thread
From: matthieu castet @ 2004-11-19 18:29 UTC (permalink / raw)
  To: Meelis Roos
  Cc: Linux Kernel list, Jean Tourrilhes, Adam Belay, Li, Shaohua,
	acpi-devel

Meelis Roos wrote:
>> Could you send me the result of : "for i in /sys/bus/pnp/devices/*; do 
>> cat $i/id $i/options; done" in order to see if other devices have 
>> missing resources ?
> 
> 
> PNP0c01
> PNP0200
> PNP0800
> PNP0c04
> PNP0303
> PNP0f13
> PNP0b00
> PNP0c02
> PNP0700
> port 0x3f0-0x3f0, align 0x0, size 0x6, 16-bit address decoding
> port 0x3f7-0x3f7, align 0x0, size 0x1, 16-bit address decoding
> irq 6 High-Edge
> dma 2 8-bit compatible
floppy : seem ok
> PNP0501
> Dependent: 01 - Priority acceptable
>    port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
> Dependent: 02 - Priority acceptable
>    port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
> Dependent: 03 - Priority acceptable
>    port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
> Dependent: 04 - Priority acceptable
>    port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding
serial miss irq
> SMCf010
> Dependent: 01 - Priority acceptable
>    port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
> Dependent: 02 - Priority acceptable
>    port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
> Dependent: 03 - Priority acceptable
>    port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
> Dependent: 04 - Priority acceptable
>    port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding
irda : miss io,irq,dma
> PNP0401
> Dependent: 01 - Priority acceptable
>    port 0x378-0x378, align 0x0, size 0x3, 16-bit address decoding
>    port 0x778-0x778, align 0x0, size 0x3, 16-bit address decoding
>    irq 7 High-Edge
> Dependent: 02 - Priority acceptable
>    port 0x278-0x278, align 0x0, size 0x3, 16-bit address decoding
>    port 0x678-0x678, align 0x0, size 0x3, 16-bit address decoding
>    irq 5 High-Edge
> Dependent: 03 - Priority acceptable
>    port 0x3bc-0x3bc, align 0x0, size 0x3, 16-bit address decoding
>    port 0x7bc-0x7bc, align 0x0, size 0x3, 16-bit address decoding
>    irq 7 High-Edge
parallel port: miss dma
> TOS6200
> 

Could it be an acpi parsing problem ?
Is there a easy way to use ACPI_DUMP_RESOURCE_LIST in order to find all 
the resource find by acpi in order to see if it is an acpi problem or a 
pnpacpi problem ?

Matthieu


PS : I CC the message to acpi people : look 
http://marc.theaimsgroup.com/?t=110075024500002&r=1&w=2 for the begining.

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-19 18:29             ` matthieu castet
@ 2004-11-19 23:09               ` Meelis Roos
  2004-11-20  9:50                 ` matthieu castet
  2004-11-20 11:43                 ` [ACPI] " Ville Syrjälä
  0 siblings, 2 replies; 37+ messages in thread
From: Meelis Roos @ 2004-11-19 23:09 UTC (permalink / raw)
  To: matthieu castet
  Cc: Linux Kernel list, Jean Tourrilhes, Adam Belay, Li, Shaohua,
	acpi-devel


I tried it with pnpbios (acpi=off) and it started to work after auto and 
activate (but not with auto alone):

nartsiss:/# modprobe smsc-ircc2
found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
smsc_superio_flat(): IrDA not enabled
smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02
FATAL: Error inserting smsc_ircc2 (/lib/modules/2.6.10-rc2/kernel/drivers/net/irda/smsc-ircc2.ko): No such device
nartsiss:/# echo activate > resources
pnp: Device 00:0f activated.
nartsiss:/# modprobe smsc-ircc2
found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
smsc_superio_flat(): fir: 0x2e8, sir: 0x100, dma: 03, irq: 5, mode: 0x0e
SMsC IrDA Controller found
  IrCC version 2.0, firport 0x2e8, sirport 0x100 dma=3, irq=5
No transceiver found. Defaulting to Fast pin select
IrDA: Registered device irda0

>>> Could you send me the result of : "for i in /sys/bus/pnp/devices/*; do cat 
>>> $i/id $i/options; done" in order to see if other devices have missing 
>>> resources ?

The output with pnpbios is below for comparision.

>> PNP0c01
>> PNP0200
>> PNP0800
>> PNP0c04
>> PNP0303
>> PNP0f13
>> PNP0b00
>> PNP0c02
>> PNP0700
>> port 0x3f0-0x3f0, align 0x0, size 0x6, 16-bit address decoding
>> port 0x3f7-0x3f7, align 0x0, size 0x1, 16-bit address decoding
>> irq 6 High-Edge
>> dma 2 8-bit compatible
> floppy : seem ok
>> PNP0501
>> Dependent: 01 - Priority acceptable
>>    port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
>> Dependent: 02 - Priority acceptable
>>    port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
>> Dependent: 03 - Priority acceptable
>>    port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
>> Dependent: 04 - Priority acceptable
>>    port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding
> serial miss irq
>> SMCf010
>> Dependent: 01 - Priority acceptable
>>    port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
>> Dependent: 02 - Priority acceptable
>>    port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
>> Dependent: 03 - Priority acceptable
>>    port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
>> Dependent: 04 - Priority acceptable
>>    port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding
> irda : miss io,irq,dma
>> PNP0401
>> Dependent: 01 - Priority acceptable
>>    port 0x378-0x378, align 0x0, size 0x3, 16-bit address decoding
>>    port 0x778-0x778, align 0x0, size 0x3, 16-bit address decoding
>>    irq 7 High-Edge
>> Dependent: 02 - Priority acceptable
>>    port 0x278-0x278, align 0x0, size 0x3, 16-bit address decoding
>>    port 0x678-0x678, align 0x0, size 0x3, 16-bit address decoding
>>    irq 5 High-Edge
>> Dependent: 03 - Priority acceptable
>>    port 0x3bc-0x3bc, align 0x0, size 0x3, 16-bit address decoding
>>    port 0x7bc-0x7bc, align 0x0, size 0x3, 16-bit address decoding
>>    irq 7 High-Edge
> parallel port: miss dma
>> TOS6200
>>

PNP0c01
PNP0200
PNP0000
PNP0100
PNP0800
PNP0c04
PNP0303
PNP0f13
irq 12 High-Edge
PNP0b00
PNP0c02
PNP0700
port 0x3f0-0x3f0, align 0x0, size 0x6, 16-bit address decoding
port 0x3f7-0x3f7, align 0x0, size 0x1, 16-bit address decoding
irq 6 High-Edge
dma 2 8-bit byte-count compatible
PNP0501
irq 3,4,5,7,10,11 High-Edge
Dependent: 01 - Priority acceptable
    port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 02 - Priority acceptable
    port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 03 - Priority acceptable
    port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 04 - Priority acceptable
    port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding
SMCf010
PNP0510
port 0x100-0x130, align 0xf, size 0x8, 16-bit address decoding
irq 3,4,5,7,10,11 High-Edge
dma 1,2,3 16-bit byte-count compatible
Dependent: 01 - Priority acceptable
    port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 02 - Priority acceptable
    port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 03 - Priority acceptable
    port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 04 - Priority acceptable
    port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding
PNP0401
dma 1,2,3 8-bit byte-count compatible
Dependent: 01 - Priority acceptable
    port 0x378-0x378, align 0x0, size 0x3, 16-bit address decoding
    port 0x778-0x778, align 0x0, size 0x3, 16-bit address decoding
    irq 7 High-Edge
Dependent: 02 - Priority acceptable
    port 0x278-0x278, align 0x0, size 0x3, 16-bit address decoding
    port 0x678-0x678, align 0x0, size 0x3, 16-bit address decoding
    irq 5 High-Edge
Dependent: 03 - Priority acceptable
    port 0x3bc-0x3bc, align 0x0, size 0x3, 16-bit address decoding
    port 0x7bc-0x7bc, align 0x0, size 0x3, 16-bit address decoding
    irq 7 High-Edge
PNP0a03
PNP0e03
PNP0e00
Dependent: 01 - Priority acceptable
    port 0x3e0-0x3e0, align 0x0, size 0x2, 16-bit address decoding
    irq <none> High-Edge
Dependent: 02 - Priority acceptable
    port 0x3e0-0x3e0, align 0x0, size 0x2, 16-bit address decoding
    irq 3,4,5,7,10,11 High-Edge

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-19 23:09               ` Meelis Roos
@ 2004-11-20  9:50                 ` matthieu castet
  2004-11-21 17:50                   ` Meelis Roos
  2004-11-20 11:43                 ` [ACPI] " Ville Syrjälä
  1 sibling, 1 reply; 37+ messages in thread
From: matthieu castet @ 2004-11-20  9:50 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list, Jean Tourrilhes, Adam Belay, Li, Shaohua

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

Meelis Roos wrote:
> 
> I tried it with pnpbios (acpi=off) and it started to work after auto and 
> activate (but not with auto alone):
> 
> nartsiss:/# modprobe smsc-ircc2
> found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> smsc_superio_flat(): IrDA not enabled
> smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02
> FATAL: Error inserting smsc_ircc2 
> (/lib/modules/2.6.10-rc2/kernel/drivers/net/irda/smsc-ircc2.ko): No such 
> device
> nartsiss:/# echo activate > resources
> pnp: Device 00:0f activated.
> nartsiss:/# modprobe smsc-ircc2
> found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> smsc_superio_flat(): fir: 0x2e8, sir: 0x100, dma: 03, irq: 5, mode: 0x0e
> SMsC IrDA Controller found
>  IrCC version 2.0, firport 0x2e8, sirport 0x100 dma=3, irq=5
> No transceiver found. Defaulting to Fast pin select
> IrDA: Registered device irda0
> 
>>>> Could you send me the result of : "for i in /sys/bus/pnp/devices/*; 
>>>> do cat $i/id $i/options; done" in order to see if other devices have 
>>>> missing resources ?
> 
> 
> The output with pnpbios is below for comparision.
> 
[..]

Ok, I have catch the problem : the pnpacpi parser supposed that are no 
resource after EndDependentFn.

Could you try this patch with pnpacpi?


Signed-Off-By: Matthieu Castet <castet.matthieu@free.fr>


[-- Attachment #2: pnpacpi_parser.patch --]
[-- Type: text/x-patch, Size: 1157 bytes --]

--- linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c.old	2004-11-12 22:55:10.000000000 +0100
+++ linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c	2004-11-20 10:44:36.000000000 +0100
@@ -443,6 +443,7 @@
 
 struct acpipnp_parse_option_s {
 	struct pnp_option *option;
+	struct pnp_option *independent_option;
 	struct pnp_dev *dev;
 };
 
@@ -506,7 +507,15 @@
 			parse_data->option = option;	
 			break;
 		case ACPI_RSTYPE_END_DPF:
-			return AE_CTRL_TERMINATE;
+			//return AE_CTRL_TERMINATE;
+			//only one EndDependentFn is allowed
+			if (!parse_data->independent_option) {
+				pnp_warn("PnPACPI: more than one EndDependentFn");
+				return AE_ERROR;
+			}
+			parse_data->option = parse_data->independent_option;
+			parse_data->independent_option = NULL;
+			break;
 		default:
 			pnp_warn("PnPACPI:Option type: %d not handle", res->id);
 			return AE_ERROR;
@@ -524,6 +533,7 @@
 	parse_data.option = pnp_register_independent_option(dev);
 	if (!parse_data.option)
 		return AE_ERROR;
+	parse_data.independent_option = parse_data.option;
 	parse_data.dev = dev;
 	status = acpi_walk_resources(handle, METHOD_NAME__PRS, 
 		pnpacpi_option_resource, &parse_data);

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

* Re: [ACPI] Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-19 23:09               ` Meelis Roos
  2004-11-20  9:50                 ` matthieu castet
@ 2004-11-20 11:43                 ` Ville Syrjälä
  2004-11-20 11:57                   ` matthieu castet
  1 sibling, 1 reply; 37+ messages in thread
From: Ville Syrjälä @ 2004-11-20 11:43 UTC (permalink / raw)
  To: Meelis Roos
  Cc: matthieu castet, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Li, Shaohua, acpi-devel

On Sat, Nov 20, 2004 at 01:09:36AM +0200, Meelis Roos wrote:
> 
> I tried it with pnpbios (acpi=off) and it started to work after auto and 
> activate (but not with auto alone):
> 
> nartsiss:/# modprobe smsc-ircc2
> found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> smsc_superio_flat(): IrDA not enabled
> smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02
> FATAL: Error inserting smsc_ircc2 
> (/lib/modules/2.6.10-rc2/kernel/drivers/net/irda/smsc-ircc2.ko): No such 
> device
> nartsiss:/# echo activate > resources
> pnp: Device 00:0f activated.
> nartsiss:/# modprobe smsc-ircc2
> found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> smsc_superio_flat(): fir: 0x2e8, sir: 0x100, dma: 03, irq: 5, mode: 0x0e
> SMsC IrDA Controller found
>  IrCC version 2.0, firport 0x2e8, sirport 0x100 dma=3, irq=5
> No transceiver found. Defaulting to Fast pin select
> IrDA: Registered device irda0

It is using the legacy probe instead of the pnp probe. Did you actually 
apply the pnp patch?

I'm not entirely sure what has been discussed since somebody removed 
me from the CC list...

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/

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

* Re: [ACPI] Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-20 11:43                 ` [ACPI] " Ville Syrjälä
@ 2004-11-20 11:57                   ` matthieu castet
  0 siblings, 0 replies; 37+ messages in thread
From: matthieu castet @ 2004-11-20 11:57 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Meelis Roos, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Li, Shaohua

Ville Syrjälä wrote:
> On Sat, Nov 20, 2004 at 01:09:36AM +0200, Meelis Roos wrote:
> 
>>I tried it with pnpbios (acpi=off) and it started to work after auto and 
>>activate (but not with auto alone):
>>
>>nartsiss:/# modprobe smsc-ircc2
>>found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
>>smsc_superio_flat(): IrDA not enabled
>>smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02
>>FATAL: Error inserting smsc_ircc2 
>>(/lib/modules/2.6.10-rc2/kernel/drivers/net/irda/smsc-ircc2.ko): No such 
>>device
>>nartsiss:/# echo activate > resources
>>pnp: Device 00:0f activated.
>>nartsiss:/# modprobe smsc-ircc2
>>found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
>>smsc_superio_flat(): fir: 0x2e8, sir: 0x100, dma: 03, irq: 5, mode: 0x0e
>>SMsC IrDA Controller found
>> IrCC version 2.0, firport 0x2e8, sirport 0x100 dma=3, irq=5
>>No transceiver found. Defaulting to Fast pin select
>>IrDA: Registered device irda0
> 
> 
> It is using the legacy probe instead of the pnp probe. Did you actually 
> apply the pnp patch?
> 
No he doesn't use the pnp patch : only latest snapshot for the stable 
Linux kernel.

But there is still the problem with pnpacpi that is needed to fixed.

> I'm not entirely sure what has been discussed since somebody removed 
> me from the CC list...
> 


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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-20  9:50                 ` matthieu castet
@ 2004-11-21 17:50                   ` Meelis Roos
  2004-11-21 18:16                     ` matthieu castet
  0 siblings, 1 reply; 37+ messages in thread
From: Meelis Roos @ 2004-11-21 17:50 UTC (permalink / raw)
  To: matthieu castet
  Cc: Linux Kernel list, Jean Tourrilhes, Adam Belay, Li, Shaohua

> Ok, I have catch the problem : the pnpacpi parser supposed that are no 
> resource after EndDependentFn.
>
> Could you try this patch with pnpacpi?

Yes, it gives full options (and resources after "auto"). But smsc-ircc2 
still does not load even after "activate" with pnpacpi. It loads with 
pnpbios after auto and activate.

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-21 17:50                   ` Meelis Roos
@ 2004-11-21 18:16                     ` matthieu castet
  2004-11-21 18:51                       ` Meelis Roos
  0 siblings, 1 reply; 37+ messages in thread
From: matthieu castet @ 2004-11-21 18:16 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list, Jean Tourrilhes, Adam Belay, Li, Shaohua

Meelis Roos wrote:
>> Ok, I have catch the problem : the pnpacpi parser supposed that are no 
>> resource after EndDependentFn.
>>
>> Could you try this patch with pnpacpi?
> 
> 
> Yes, it gives full options (and resources after "auto"). But smsc-ircc2 
> still does not load even after "activate" with pnpacpi. It loads with 
> pnpbios after auto and activate.
> 
thanks

Could I have the log from smsc-ircc2 when it failed with pnpacpi ?

regards

Matthieu

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-21 18:16                     ` matthieu castet
@ 2004-11-21 18:51                       ` Meelis Roos
  2004-11-21 19:21                         ` matthieu castet
  2004-11-21 20:20                         ` matthieu castet
  0 siblings, 2 replies; 37+ messages in thread
From: Meelis Roos @ 2004-11-21 18:51 UTC (permalink / raw)
  To: matthieu castet
  Cc: Linux Kernel list, Jean Tourrilhes, Adam Belay, Li, Shaohua

> Could I have the log from smsc-ircc2 when it failed with pnpacpi ?

found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
smsc_superio_flat(): IrDA not enabled
smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-21 18:51                       ` Meelis Roos
@ 2004-11-21 19:21                         ` matthieu castet
  2004-11-21 20:20                         ` matthieu castet
  1 sibling, 0 replies; 37+ messages in thread
From: matthieu castet @ 2004-11-21 19:21 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list, Jean Tourrilhes, Adam Belay, Li, Shaohua

Meelis Roos wrote:
>> Could I have the log from smsc-ircc2 when it failed with pnpacpi ?
> 
> 
> found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> smsc_superio_flat(): IrDA not enabled
> smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02
> 

Thanks, it seem that pnpacpi_set_resources have a problem.
I hope Shaohua Li (who write it) could ckeck it.


regards

Matthieu


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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-21 18:51                       ` Meelis Roos
  2004-11-21 19:21                         ` matthieu castet
@ 2004-11-21 20:20                         ` matthieu castet
  2004-11-22  1:29                           ` Li Shaohua
  2004-11-22  8:38                           ` Meelis Roos
  1 sibling, 2 replies; 37+ messages in thread
From: matthieu castet @ 2004-11-21 20:20 UTC (permalink / raw)
  To: Meelis Roos
  Cc: Linux Kernel list, Jean Tourrilhes, Adam Belay, Li, Shaohua,
	Ville Syrjälä

Meelis Roos wrote:
>> Could I have the log from smsc-ircc2 when it failed with pnpacpi ?
> 
> 
> found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> smsc_superio_flat(): IrDA not enabled
> smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02
> 
just for curiosity, when you have time, could try pnpacpi and jean PNP 
smsc patch?

It sould find the correct resources because there are provided by PnP 
layer, but if the resources are not well allocated by PnPacpi, the 
device shouldn't work.


thanks

Matthieu

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-21 20:20                         ` matthieu castet
@ 2004-11-22  1:29                           ` Li Shaohua
  2004-11-22  8:37                             ` Meelis Roos
                                               ` (2 more replies)
  2004-11-22  8:38                           ` Meelis Roos
  1 sibling, 3 replies; 37+ messages in thread
From: Li Shaohua @ 2004-11-22  1:29 UTC (permalink / raw)
  To: matthieu castet
  Cc: Meelis Roos, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

On Mon, 2004-11-22 at 04:20, matthieu castet wrote:
> Meelis Roos wrote:
> >> Could I have the log from smsc-ircc2 when it failed with pnpacpi ?
> > 
> > 
> > found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> > smsc_superio_flat(): IrDA not enabled
> > smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02
> > 
> just for curiosity, when you have time, could try pnpacpi and jean PNP 
> smsc patch?
> 
> It sould find the correct resources because there are provided by PnP 
> layer, but if the resources are not well allocated by PnPacpi, the 
> device shouldn't work.
Could you please attach the output of 'cat 00:0a/resources' (0a is the
device, right?). ACPI spec said set resource should be according to the
output of current resource. That is we should build a template according
to current resource (_CRS). If _CRS doesn't return a correct resource
templete, set resource will fail.

Adam, I think a boot option (such as pnpacpi=off) is required. Users
possibly want to use pnpbios or BIOS is buggy.

Thanks,
Shaohua


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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-22  1:29                           ` Li Shaohua
@ 2004-11-22  8:37                             ` Meelis Roos
  2004-11-26 16:02                               ` matthieu castet
  2004-11-22  8:39                             ` Meelis Roos
  2004-11-22  8:42                             ` Meelis Roos
  2 siblings, 1 reply; 37+ messages in thread
From: Meelis Roos @ 2004-11-22  8:37 UTC (permalink / raw)
  To: Li Shaohua
  Cc: matthieu castet, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

> Could you please attach the output of 'cat 00:0a/resources' (0a is the
> device, right?). ACPI spec said set resource should be according to the
> output of current resource. That is we should build a template according
> to current resource (_CRS). If _CRS doesn't return a correct resource
> templete, set resource will fail.

resources after auto and activate and options are now exactly the same 
after the pnpacpi patch:

resources:

state = active
io 0x100-0x107
io 0x2e8-0x2ef
irq 5
dma 3

options:

port 0x100-0x130, align 0xf, size 0x8, 16-bit address decoding
irq 3,4,5,7,10,11 High-Edge
dma 1,2,3 16-bit compatible
Dependent: 01 - Priority acceptable
    port 0x3f8-0x3f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 02 - Priority acceptable
    port 0x2e8-0x2e8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 03 - Priority acceptable
    port 0x2f8-0x2f8, align 0x0, size 0x8, 16-bit address decoding
Dependent: 04 - Priority acceptable
    port 0x3e8-0x3e8, align 0x0, size 0x8, 16-bit address decoding


With pnpbios, module loading gives this:

found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
smsc_superio_flat(): fir: 0x2e8, sir: 0x100, dma: 03, irq: 5, mode: 0x0e
SMsC IrDA Controller found
  IrCC version 2.0, firport 0x2e8, sirport 0x100 dma=3, irq=5
No transceiver found. Defaulting to Fast pin select
divert: not allocating divert_blk for non-ethernet device irda0
IrDA: Registered device irda0

With pnpacpi, module loading gives this:

found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
smsc_superio_flat(): IrDA not enabled
smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02

Haven't tried Villes patch yet, will do today evening.

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-21 20:20                         ` matthieu castet
  2004-11-22  1:29                           ` Li Shaohua
@ 2004-11-22  8:38                           ` Meelis Roos
  1 sibling, 0 replies; 37+ messages in thread
From: Meelis Roos @ 2004-11-22  8:38 UTC (permalink / raw)
  To: matthieu castet
  Cc: Linux Kernel list, Jean Tourrilhes, Adam Belay, Li, Shaohua,
	Ville Syrjälä

> just for curiosity, when you have time, could try pnpacpi and jean PNP smsc 
> patch?

Couldn't find it at the first glance from my list archive - where can I 
get it?

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-22  1:29                           ` Li Shaohua
  2004-11-22  8:37                             ` Meelis Roos
@ 2004-11-22  8:39                             ` Meelis Roos
  2004-11-22  8:42                             ` Meelis Roos
  2 siblings, 0 replies; 37+ messages in thread
From: Meelis Roos @ 2004-11-22  8:39 UTC (permalink / raw)
  To: Li Shaohua
  Cc: matthieu castet, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

> Adam, I think a boot option (such as pnpacpi=off) is required. Users
> possibly want to use pnpbios or BIOS is buggy.

Yes, agreed. Right now just using ACPI turns pnpbios off, it probably 
should be using pnpacpi that turns pnpbios off. And turning pnpacpi off 
should be made possible.

-- 
Meelis Roos (mroos@ut.ee)      http://www.cs.ut.ee/~mroos/

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-22  1:29                           ` Li Shaohua
  2004-11-22  8:37                             ` Meelis Roos
  2004-11-22  8:39                             ` Meelis Roos
@ 2004-11-22  8:42                             ` Meelis Roos
  2 siblings, 0 replies; 37+ messages in thread
From: Meelis Roos @ 2004-11-22  8:42 UTC (permalink / raw)
  To: Li Shaohua
  Cc: matthieu castet, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

> Adam, I think a boot option (such as pnpacpi=off) is required. Users
> possibly want to use pnpbios or BIOS is buggy.

Additionally, I see more pnp devices with pnpbios (16) than with pnpbios 
(13). Is this normal?

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-22  8:37                             ` Meelis Roos
@ 2004-11-26 16:02                               ` matthieu castet
  2004-11-26 18:19                                 ` Meelis Roos
  0 siblings, 1 reply; 37+ messages in thread
From: matthieu castet @ 2004-11-26 16:02 UTC (permalink / raw)
  To: Meelis Roos
  Cc: Li Shaohua, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

Meelis Roos wrote:
>> Could you please attach the output of 'cat 00:0a/resources' (0a is the
>> device, right?). ACPI spec said set resource should be according to the
>> output of current resource. That is we should build a template according
>> to current resource (_CRS). If _CRS doesn't return a correct resource
>> templete, set resource will fail.
> 
> 
Hi,

could you try this patch with the previous one. (You must enable ACPI 
DEBUG in kernel config)

When you activate the device, it sould print usefull information.
Could attach the output, please.

Matthieu

[-- Attachment #2: rs.patch --]
[-- Type: text/x-patch, Size: 1149 bytes --]

--- linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c.old	2004-11-12 22:55:10.000000000 +0100
+++ linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c	2004-11-26 16:33:42.000000000 +0100
@@ -29,6 +29,18 @@
 #define valid_IRQ(i) (((i) != 0) && ((i) != 2))
 #endif
 
+static void debug_pnp(struct acpi_resource *res, int line) {
+	int tmp = acpi_dbg_level;
+	int tmp1 = acpi_dbg_layer;
+
+	acpi_dbg_level = 0x00010000;
+	acpi_dbg_layer = 0x00000100;
+	printk("******%d*******\n",line);
+	ACPI_DUMP_RESOURCE_LIST(res);
+	acpi_dbg_level = tmp;
+	acpi_dbg_layer = tmp1;
+}
+	
 /*
  * Allocated Resources
  */
@@ -152,6 +164,8 @@
 {
 	struct pnp_resource_table * res_table = (struct pnp_resource_table *)data;
 
+	debug_pnp(res,__LINE__);
+
 	switch (res->id) {
 	case ACPI_RSTYPE_IRQ:
 		if ((res->data.irq.number_of_interrupts > 0) &&
@@ -454,6 +469,8 @@
 	struct pnp_dev *dev = parse_data->dev;
 	struct pnp_option *option = parse_data->option;
 
+	debug_pnp(res,__LINE__);
+
 	switch (res->id) {
 		case ACPI_RSTYPE_IRQ:
 			pnpacpi_parse_irq_option(option, &res->data.irq);
@@ -816,5 +843,7 @@
 		resource ++;
 		i ++;
 	}
+	debug_pnp(res,__LINE__);
+
 	return 0;
 }

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-26 16:02                               ` matthieu castet
@ 2004-11-26 18:19                                 ` Meelis Roos
  2004-11-27  0:50                                   ` matthieu castet
  0 siblings, 1 reply; 37+ messages in thread
From: Meelis Roos @ 2004-11-26 18:19 UTC (permalink / raw)
  To: matthieu castet
  Cc: Li Shaohua, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

> could you try this patch with the previous one. (You must enable ACPI DEBUG 
> in kernel config)

After fixing one res -> resource, it compiled.

The output is uninteresting - it only prints one debug message during 
echoing activate to resources:

******845*******
pnp: Device 00:0a activated.
NET: Registered protocol family 23
found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
smsc_superio_flat(): IrDA not enabled
smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-26 18:19                                 ` Meelis Roos
@ 2004-11-27  0:50                                   ` matthieu castet
  2004-11-27 12:15                                     ` Meelis Roos
  0 siblings, 1 reply; 37+ messages in thread
From: matthieu castet @ 2004-11-27  0:50 UTC (permalink / raw)
  To: Meelis Roos
  Cc: Li Shaohua, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

Meelis Roos wrote:
>> could you try this patch with the previous one. (You must enable ACPI 
>> DEBUG in kernel config)
> 
> 
> After fixing one res -> resource, it compiled.
Oups that's the wrong fix : there was a line missing in my previous patch

> 
> The output is uninteresting - it only prints one debug message during 
> echoing activate to resources:
> 
That's because resource point at the end of the resources list, so there 
is nothing to read. With this patch, you should see something.

> ******845*******
> pnp: Device 00:0a activated.
> NET: Registered protocol family 23
> found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> smsc_superio_flat(): IrDA not enabled
> smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02
> 

thanks for testing


Matthieu

[-- Attachment #2: rs.patch --]
[-- Type: text/x-patch, Size: 1470 bytes --]

--- drivers/pnp/pnpacpi/rsparser.c.int	2004-11-27 01:46:10.000000000 +0100
+++ drivers/pnp/pnpacpi/rsparser.c	2004-11-26 16:33:42.000000000 +0100
@@ -29,6 +29,18 @@
 #define valid_IRQ(i) (((i) != 0) && ((i) != 2))
 #endif
 
+static void debug_pnp(struct acpi_resource *res, int line) {
+	int tmp = acpi_dbg_level;
+	int tmp1 = acpi_dbg_layer;
+
+	acpi_dbg_level = 0x00010000;
+	acpi_dbg_layer = 0x00000100;
+	printk("******%d*******\n",line);
+	ACPI_DUMP_RESOURCE_LIST(res);
+	acpi_dbg_level = tmp;
+	acpi_dbg_layer = tmp1;
+}
+	
 /*
  * Allocated Resources
  */
@@ -152,6 +164,8 @@
 {
 	struct pnp_resource_table * res_table = (struct pnp_resource_table *)data;
 
+	debug_pnp(res,__LINE__);
+
 	switch (res->id) {
 	case ACPI_RSTYPE_IRQ:
 		if ((res->data.irq.number_of_interrupts > 0) &&
@@ -455,6 +469,8 @@
 	struct pnp_dev *dev = parse_data->dev;
 	struct pnp_option *option = parse_data->option;
 
+	debug_pnp(res,__LINE__);
+
 	switch (res->id) {
 		case ACPI_RSTYPE_IRQ:
 			pnpacpi_parse_irq_option(option, &res->data.irq);
@@ -765,6 +781,7 @@
 	/* pnpacpi_build_resource_template allocates extra mem */
 	int res_cnt = (buffer->length - 1)/sizeof(struct acpi_resource) - 1;
 	struct acpi_resource *resource = (struct acpi_resource*)buffer->pointer;
+	struct acpi_resource *res = resource;
 	int port = 0, irq = 0, dma = 0, mem = 0;
 
 	pnp_dbg("res cnt %d", res_cnt);
@@ -826,5 +843,7 @@
 		resource ++;
 		i ++;
 	}
+	debug_pnp(res,__LINE__);
+
 	return 0;
 }

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-27  0:50                                   ` matthieu castet
@ 2004-11-27 12:15                                     ` Meelis Roos
  2004-11-27 14:02                                       ` matthieu castet
  0 siblings, 1 reply; 37+ messages in thread
From: Meelis Roos @ 2004-11-27 12:15 UTC (permalink / raw)
  To: matthieu castet
  Cc: Li Shaohua, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

> That's because resource point at the end of the resources list, so there is 
> nothing to read. With this patch, you should see something.

On bootup there are loads on lines 167 and 472.

On auto there are none.

On activate there are
******846*******
pnp: Device 00:0a activated.

On modprobe smsc-ircc2 there are no more debug lines, just
found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
smsc_superio_flat(): IrDA not enabled
smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02

And I checked that I am using the new patch.

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-27 12:15                                     ` Meelis Roos
@ 2004-11-27 14:02                                       ` matthieu castet
  2004-11-27 18:24                                         ` Meelis Roos
  0 siblings, 1 reply; 37+ messages in thread
From: matthieu castet @ 2004-11-27 14:02 UTC (permalink / raw)
  To: Meelis Roos
  Cc: Li Shaohua, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]

Hi,
Meelis Roos wrote:
>> That's because resource point at the end of the resources list, so 
>> there is nothing to read. With this patch, you should see something.
> 
> 
> On bootup there are loads on lines 167 and 472.
> 
> On auto there are none.
> 
> On activate there are
> ******846*******
> pnp: Device 00:0a activated.
> 
> On modprobe smsc-ircc2 there are no more debug lines, just
> found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> smsc_superio_flat(): IrDA not enabled
> smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02
> 
> And I checked that I am using the new patch.
> 
thanks.
it seems there is no resource in your __CRS. Like Shaohua said the acpi 
spec say that it must return valid template even if the device is 
disable [1].

Just for confirmation, could you try this patch. It should enable 
pnp_dbg message and print your _CRS when you activate the device.
If there is nothing between ******574******* and ******857*******, you 
bios is likely broken.


thanks

Matthieu CASTET



[1]
If a device is disabled, then _CRS returns a valid resource template for 
the device, but the actual
resource assignments in the return byte stream are ignored. If the 
device is disabled when _CRS is called, it
must remain disabled.


[-- Attachment #2: rs2.patch --]
[-- Type: text/x-patch, Size: 2693 bytes --]

--- linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c.int	2004-11-27 01:46:10.000000000 +0100
+++ linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c	2004-11-27 14:11:32.000000000 +0100
@@ -29,6 +29,22 @@
 #define valid_IRQ(i) (((i) != 0) && ((i) != 2))
 #endif
 
+static int first = 1;
+static void debug_pnp(struct acpi_resource *res, int line) {
+	int tmp = acpi_dbg_level;
+	int tmp1 = acpi_dbg_layer;
+	if (!first)
+		return;
+	first = 0;
+
+	acpi_dbg_level = 0x00010000;
+	acpi_dbg_layer = 0x00000100;
+	printk("******%d*******\n",line);
+	ACPI_DUMP_RESOURCE_LIST(res);
+	acpi_dbg_level = tmp;
+	acpi_dbg_layer = tmp1;
+}
+	
 /*
  * Allocated Resources
  */
@@ -152,6 +168,8 @@
 {
 	struct pnp_resource_table * res_table = (struct pnp_resource_table *)data;
 
+	debug_pnp(res,__LINE__);
+
 	switch (res->id) {
 	case ACPI_RSTYPE_IRQ:
 		if ((res->data.irq.number_of_interrupts > 0) &&
@@ -233,6 +251,7 @@
 	/* Blank the resource table values */
 	pnp_init_resource_table(res);
 
+	first = 1;
 	return acpi_walk_resources(handle, METHOD_NAME__CRS, pnpacpi_allocated_resource, res);
 }
 
@@ -455,6 +474,8 @@
 	struct pnp_dev *dev = parse_data->dev;
 	struct pnp_option *option = parse_data->option;
 
+	//debug_pnp(res,__LINE__);
+
 	switch (res->id) {
 		case ACPI_RSTYPE_IRQ:
 			pnpacpi_parse_irq_option(option, &res->data.irq);
@@ -535,6 +556,7 @@
 		return AE_ERROR;
 	parse_data.independent_option = parse_data.option;
 	parse_data.dev = dev;
+	first=1;
 	status = acpi_walk_resources(handle, METHOD_NAME__PRS, 
 		pnpacpi_option_resource, &parse_data);
 
@@ -548,6 +570,9 @@
 	void *data)
 {
 	int *res_cnt = (int *)data;
+
+	debug_pnp(res,__LINE__);
+
 	switch (res->id) {
 	case ACPI_RSTYPE_IRQ:
 	case ACPI_RSTYPE_EXT_IRQ:
@@ -603,6 +628,7 @@
 	int res_cnt = 0;
 	acpi_status status;
 
+	first = 1;
 	status = acpi_walk_resources(handle, METHOD_NAME__CRS, 
 		pnpacpi_count_resources, &res_cnt);
 	if (ACPI_FAILURE(status)) {
@@ -765,6 +791,7 @@
 	/* pnpacpi_build_resource_template allocates extra mem */
 	int res_cnt = (buffer->length - 1)/sizeof(struct acpi_resource) - 1;
 	struct acpi_resource *resource = (struct acpi_resource*)buffer->pointer;
+	struct acpi_resource *res = resource;
 	int port = 0, irq = 0, dma = 0, mem = 0;
 
 	pnp_dbg("res cnt %d", res_cnt);
@@ -826,5 +853,8 @@
 		resource ++;
 		i ++;
 	}
+	first=1;
+	debug_pnp(res,__LINE__);
+
 	return 0;
 }
--- linux-2.6.9/drivers/pnp/pnpacpi/pnpacpi.h.old	2004-11-27 14:54:22.000000000 +0100
+++ linux-2.6.9/drivers/pnp/pnpacpi/pnpacpi.h	2004-11-27 14:14:00.000000000 +0100
@@ -1,6 +1,8 @@
 #ifndef ACPI_PNP_H
 #define ACPI_PNP_H
 
+#define DEBUG
+
 #include <acpi/acpi_bus.h>
 #include <linux/acpi.h>
 #include <linux/pnp.h>

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-27 14:02                                       ` matthieu castet
@ 2004-11-27 18:24                                         ` Meelis Roos
  2004-11-27 18:58                                           ` matthieu castet
  0 siblings, 1 reply; 37+ messages in thread
From: Meelis Roos @ 2004-11-27 18:24 UTC (permalink / raw)
  To: matthieu castet
  Cc: Li Shaohua, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

> Just for confirmation, could you try this patch. It should enable pnp_dbg 
> message and print your _CRS when you activate the device.
> If there is nothing between ******574******* and ******857*******, you bios 
> is likely broken.

activate:
******574*******
pnp: Res cnt 4
pnp: res cnt 4
pnp: Encode io
pnp: Encode irq
pnp: Encode io
pnp: Encode dma
******857*******
pnp: Device 00:0a activated.

So it appears that there is something between 574 and 857.


modprobe is the same:
NET: Registered protocol family 23
found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
smsc_superio_flat(): IrDA not enabled
smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-27 18:24                                         ` Meelis Roos
@ 2004-11-27 18:58                                           ` matthieu castet
  2004-11-27 19:25                                             ` matthieu castet
  2004-11-27 19:39                                             ` Meelis Roos
  0 siblings, 2 replies; 37+ messages in thread
From: matthieu castet @ 2004-11-27 18:58 UTC (permalink / raw)
  To: Meelis Roos
  Cc: Li Shaohua, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

Meelis Roos wrote:
>> Just for confirmation, could you try this patch. It should enable 
>> pnp_dbg message and print your _CRS when you activate the device.
>> If there is nothing between ******574******* and ******857*******, you 
>> bios is likely broken.
> 
> 
> activate:
> ******574*******
> pnp: Res cnt 4
> pnp: res cnt 4
> pnp: Encode io
> pnp: Encode irq
> pnp: Encode io
> pnp: Encode dma
> ******857*******
> pnp: Device 00:0a activated.
> 
> So it appears that there is something between 574 and 857.
> 
Are you sure you have enable ACPI DEBUG ?
You should have CONFIG_ACPI_DEBUG=y in your .config


> 
> modprobe is the same:
> NET: Registered protocol family 23
> found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> smsc_superio_flat(): IrDA not enabled
> smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02
> 


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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-27 18:58                                           ` matthieu castet
@ 2004-11-27 19:25                                             ` matthieu castet
  2004-11-27 19:39                                             ` Meelis Roos
  1 sibling, 0 replies; 37+ messages in thread
From: matthieu castet @ 2004-11-27 19:25 UTC (permalink / raw)
  To: Meelis Roos
  Cc: Li Shaohua, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

matthieu castet wrote:
> Meelis Roos wrote:
> 
>>> Just for confirmation, could you try this patch. It should enable 
>>> pnp_dbg message and print your _CRS when you activate the device.
>>> If there is nothing between ******574******* and ******857*******, 
>>> you bios is likely broken.
>>
>>
>>
>> activate:
>> ******574*******
>> pnp: Res cnt 4
>> pnp: res cnt 4
>> pnp: Encode io
>> pnp: Encode irq
>> pnp: Encode io
>> pnp: Encode dma
>> ******857*******
>> pnp: Device 00:0a activated.
>>
>> So it appears that there is something between 574 and 857.
>>
> Are you sure you have enable ACPI DEBUG ?
> You should have CONFIG_ACPI_DEBUG=y in your .config
> 
> 
With this patch, it should be work better (no need to remove the 
previous patch)


Matthieu


PS : I should find a better way to make patch....

[-- Attachment #2: rsmk.patch --]
[-- Type: text/x-patch, Size: 366 bytes --]

--- linux-2.6.9/drivers/pnp/pnpacpi/Makefile.old	2004-11-27 20:21:51.000000000 +0100
+++ linux-2.6.9/drivers/pnp/pnpacpi/Makefile	2004-11-26 14:59:51.000000000 +0100
@@ -1,5 +1,10 @@
 #
 # Makefile for the kernel PNPACPI driver.
 #
+ifdef CONFIG_ACPI_DEBUG
+  ACPI_CFLAGS	+= -DACPI_DEBUG_OUTPUT
+endif
+
+EXTRA_CFLAGS	+= $(ACPI_CFLAGS)
 
 obj-y := core.o rsparser.o

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

* Re: [PATCH] smsc-ircc2: Add PnP support.
  2004-11-27 18:58                                           ` matthieu castet
  2004-11-27 19:25                                             ` matthieu castet
@ 2004-11-27 19:39                                             ` Meelis Roos
  1 sibling, 0 replies; 37+ messages in thread
From: Meelis Roos @ 2004-11-27 19:39 UTC (permalink / raw)
  To: matthieu castet
  Cc: Li Shaohua, Linux Kernel list, Jean Tourrilhes, Adam Belay,
	Ville Syrjälä

> Are you sure you have enable ACPI DEBUG ?

Oops, I did not. Now with ACPi DEBUG enabled and the Makefile patch 
applied:

activate:
******574*******
Resource structure 0.
Io Resource
   16 bit decode
   Range minimum base: 00000000
   Range maximum base: 00000000
   Alignment: 00000001
   Range Length: 00000000
Resource structure 1.
IRQ Resource
   Edge Triggered
   Active High
   Exclusive
   0 Interrupts ( )
Resource structure 2.
Io Resource
   16 bit decode
   Range minimum base: 00000000
   Range maximum base: 00000000
   Alignment: 00000001
   Range Length: 00000000
Resource structure 3.
DMA Resource
   Compatibility mode
   Not a Bus Master
   16 bit only transfer
   Number of Channels: 0 ( )
Resource structure 4.
end_tag Resource
pnp: Res cnt 4
pnp: res cnt 4
pnp: Encode io
pnp: Encode irq
pnp: Encode io
pnp: Encode dma
******857*******
Resource structure 0.
Io Resource
   16 bit decode
   Range minimum base: 00000100
   Range maximum base: 00000107
   Alignment: 00000000
   Range Length: 00000008
Resource structure 1.
IRQ Resource
   Edge Triggered
   Active High
   Exclusive
   1 Interrupts ( 5 )
Resource structure 2.
Io Resource
   16 bit decode
   Range minimum base: 000002E8
   Range maximum base: 000002EF
   Alignment: 00000000
   Range Length: 00000008
Resource structure 3.
DMA Resource
   Compatibility mode
   Not a Bus Master
   16 bit only transfer
   Number of Channels: 1 ( 3 )
Resource structure 4.
end_tag Resource
pnp: Device 00:0a activated.


modprobe is still the same.

-- 
Meelis Roos (mroos@linux.ee)

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

end of thread, other threads:[~2004-11-27 20:01 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-18 18:42 [PATCH] smsc-ircc2: Add PnP support matthieu castet
2004-11-18 18:55 ` Jean Tourrilhes
2004-11-18 19:49   ` matthieu castet
2004-11-18 20:41     ` Ville Syrjälä
2004-11-18 23:02       ` Adam Belay
2004-11-19 15:27 ` Meelis Roos
2004-11-19 15:53   ` matthieu castet
2004-11-19 15:57     ` matthieu castet
2004-11-19 16:15       ` Meelis Roos
2004-11-19 16:22       ` Meelis Roos
2004-11-19 17:28         ` matthieu castet
2004-11-19 17:34           ` Meelis Roos
2004-11-19 18:29             ` matthieu castet
2004-11-19 23:09               ` Meelis Roos
2004-11-20  9:50                 ` matthieu castet
2004-11-21 17:50                   ` Meelis Roos
2004-11-21 18:16                     ` matthieu castet
2004-11-21 18:51                       ` Meelis Roos
2004-11-21 19:21                         ` matthieu castet
2004-11-21 20:20                         ` matthieu castet
2004-11-22  1:29                           ` Li Shaohua
2004-11-22  8:37                             ` Meelis Roos
2004-11-26 16:02                               ` matthieu castet
2004-11-26 18:19                                 ` Meelis Roos
2004-11-27  0:50                                   ` matthieu castet
2004-11-27 12:15                                     ` Meelis Roos
2004-11-27 14:02                                       ` matthieu castet
2004-11-27 18:24                                         ` Meelis Roos
2004-11-27 18:58                                           ` matthieu castet
2004-11-27 19:25                                             ` matthieu castet
2004-11-27 19:39                                             ` Meelis Roos
2004-11-22  8:39                             ` Meelis Roos
2004-11-22  8:42                             ` Meelis Roos
2004-11-22  8:38                           ` Meelis Roos
2004-11-20 11:43                 ` [ACPI] " Ville Syrjälä
2004-11-20 11:57                   ` matthieu castet
     [not found] <20041117232047.GA28061@bougret.hpl.hp.com>
2004-11-18  3:52 ` Ville Syrjälä

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