2006-01-23 23:29:28

by Markus Lidel

[permalink] [raw]
Subject: [PATCH 1/2] I2O: don't disable PCI device if it is enabled before probing

Changes:
--------
- If PCI device is enabled before probing, it will not be disabled at
exit.

Signed-off-by: Markus Lidel <[email protected]>


Attachments:
i2o-pci-fix-disable-device.patch (1.62 kB)

2006-01-30 18:16:45

by Alan

[permalink] [raw]
Subject: Re: [PATCH 1/2] I2O: don't disable PCI device if it is enabled before probing

On Maw, 2006-01-24 at 00:29 +0100, Markus Lidel wrote:
> Changes:
> --------
> - If PCI device is enabled before probing, it will not be disabled at
> exit.

Looks ok for this case but be warned that pdev->is_enabled is not a safe
check for many devices as the may be BIOS critical, or video for example
but not in the Linux list of things _it_ enabled.

2006-01-30 19:32:28

by Markus Lidel

[permalink] [raw]
Subject: Re: [PATCH 1/2] I2O: don't disable PCI device if it is enabled before probing

Hello,

Alan Cox wrote:
> On Maw, 2006-01-24 at 00:29 +0100, Markus Lidel wrote:
>> Changes:
>> --------
>> - If PCI device is enabled before probing, it will not be disabled at
>> exit.
> Looks ok for this case but be warned that pdev->is_enabled is not a safe
> check for many devices as the may be BIOS critical, or video for example
> but not in the Linux list of things _it_ enabled.

I've searched for a function enabled() or so, but didn't find anything.
Could you tell me the right way to do it normally?

Thanks for the hint!

Best regards,


Markus Lidel
------------------------------------------
Markus Lidel (Senior IT Consultant)

Shadow Connect GmbH
Carl-Reisch-Weg 12
D-86381 Krumbach
Germany

Phone: +49 82 82/99 51-0
Fax: +49 82 82/99 51-11

E-Mail: [email protected]
URL: http://www.shadowconnect.com

2006-01-30 23:00:26

by Alan

[permalink] [raw]
Subject: PCI layer: Need for enable/disable counting (was disable PCI device if it is enabled before probing)

On Llu, 2006-01-30 at 20:33 +0100, Markus Lidel wrote:
> I've searched for a function enabled() or so, but didn't find anything.
> Could you tell me the right way to do it normally?

Right now there isn't one. I've hit this problem with the new libata
layer stuff having successfully disabled my root pci bridge on unload at
least once.

Would be easy to add one but I suspect it should be rcounted so that
enable/disable just stack naturally ?

What do people want from such an interface and should it also start boot
enabled devices at a count of 1 or just the bridges/video class
devices ?

Alan

2006-01-31 09:31:36

by Markus Lidel

[permalink] [raw]
Subject: Re: PCI layer: Need for enable/disable counting (was disable PCI device if it is enabled before probing)

Hello,

Alan Cox wrote:
> On Llu, 2006-01-30 at 20:33 +0100, Markus Lidel wrote:
>> I've searched for a function enabled() or so, but didn't find anything.
>> Could you tell me the right way to do it normally?
> Right now there isn't one. I've hit this problem with the new libata

OK, at least i haven't overseen something :-D

> layer stuff having successfully disabled my root pci bridge on unload at
> least once.

Hmmm, think this is something everyone could use...

> Would be easy to add one but I suspect it should be rcounted so that
> enable/disable just stack naturally ?

Sounds great to me... So the verification if the device is enabled before
could be completely removed from my and probably others code...

> What do people want from such an interface and should it also start boot
> enabled devices at a count of 1 or just the bridges/video class
> devices ?

Hmmm, i don't know what happens if a boot enabled device is disabled, but
from my point of view i would start at 1 :-D

Probably also the probing function could also enable the device, so the
subsystems don't have to do it on there own? But because i don't know PCI
stuff very well i don't know if this makes sense at all...

Thank you very much!


Best regards,


Markus Lidel
------------------------------------------
Markus Lidel (Senior IT Consultant)

Shadow Connect GmbH
Carl-Reisch-Weg 12
D-86381 Krumbach
Germany

Phone: +49 82 82/99 51-0
Fax: +49 82 82/99 51-11

E-Mail: [email protected]
URL: http://www.shadowconnect.com