Re: [OOPS] 2.6.0-test11 sysfs

From: Russell King
Date: Wed Dec 10 2003 - 06:16:12 EST


On Wed, Dec 10, 2003 at 04:36:33PM +0530, Maneesh Soni wrote:
> How is the following patch? It moves the complete() call in the "pccardd"
> thread after class_device_register(), so that in init_i82365() when
> pcmcia_register_socket() is done we are sure that class device is
> registered before creating the attribute files.

You'll either deadlock if you have a Cardbus card in the slot at
initialisation, or break standard PCMCIA cards due to a race.

The PCMCIA card race is the exact reason why class_device_register
was moved out of pcmcia_register_socket() in the first place; we
tried adding locks, but that just caused deadlock.

Basically, the only way this can be properly solved is to find some
solution to sysfs's restriction that you can't add devices for a
particular bus type from the same bus type driver's probe method.

IOW, you can't add PCI devices from a PCI device drivers probe method,
and you can't remove PCI devices from a PCI device drivers remove
method.

Pat decided that it was too risky/too late to try to fix this for 2.6,
so our only option now is to disable the problematical bits of code.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
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/