Re: [linux-pm] Bug in PCI core



On Fri, 2006-10-13 at 17:29 +0200, Arjan van de Ven wrote:
On Fri, 2006-10-13 at 16:26 +0100, Alan Cox wrote:
Ar Gwe, 2006-10-13 am 10:29 -0400, ysgrifennodd Alan Stern:
I'd like to propose that we have the pci config sysfs interface return
-EIO when it's blocked (e.g. active BIST or D3cold). This accurately
reflects the state of the device to userspace, reduces complexity, and
could potentially save some memory per PCI device instance.

Could you resubmit your old patches and include a corresponding fix for
this access problem?

And then you can fix the applications it breaks, like the X server which
does actually want to know where all the devices are located in PCI
space.


.. but which could equally well mmap the resource from sysfs ;)


also the thing this patch does is ONLY when the device is effectively
off the bus return -EIO.
One can argue that -EAGAIN is nicer since it's only a temporary
condition though....



Yeah, perhaps -EAGAIN would be more appropriate, especially in the power
state transition and BIST cases. An interesting possibility might be to
have the file actually block, although I'm not sure if the O_NONBLOCK
flag or polling for that matter can be supported through the
sysfs/driver-core API.

-Adam


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [linux-pm] Bug in PCI core
    ... reflects the state of the device to userspace, reduces complexity, and ... could potentially save some memory per PCI device instance. ... And then you can fix the applications it breaks, ...
    (Linux-Kernel)
  • Re: [linux-pm] Bug in PCI core
    ... reflects the state of the device to userspace, reduces complexity, and ... could potentially save some memory per PCI device instance. ... And then you can fix the applications it breaks, ...
    (Linux-Kernel)
  • [ANNOUNCE] Linux-2.4.32-hf32.5
    ... Fix memory corruption caused by snmp_trap_decode which may free ... to 2.4.32 kernels use neither of these timers. ... on 2.4 update the inode ctime on rename. ...
    (Linux-Kernel)
  • Re: [RFC][mmotm] Documentation update
    ... Memory Resource ControllerImplementation Memo. ... will fix. ... charge against oldpage or newpage will be committed. ... Page Migration ...
    (Linux-Kernel)
  • Re: XP Setup hangs with dual PIII-550 on Asus P2B-DS v1.04
    ... I have one IDE 80Gb drive attached to Primary IDE and one CD-ROM on the secondary IDE. ... It might be a memory issue, but in the one CPU config the installation always works without a hitch, which leads me to believe the memory issue if it exists is not the main problem. ... Do you happen to know if moving the R79 to R80 is the correct fix for ACPI and what it actually does? ... about 2-3 minutes with only a reset helping.. ...
    (alt.comp.periphs.mainboard.asus)

Loading