Thread (12 messages) 12 messages, 2 authors, 2004-08-17

Re: PATCH: switch ide-proc to use the ide_key functionality

From: Alan Cox <hidden>
Date: 2004-08-17 00:42:36
Also in: lkml

On Tue, Aug 17, 2004 at 02:31:25AM +0200, Bartlomiej Zolnierkiewicz wrote:
quoted
quoted
It is also still racy for some drivers because ide_register_hw() ->
init_hwif_data() sets hwif->key to zero - you must set hwif->hold to 1.
ide_register_hw holds ide_setting_sem. I think that should be ok ?
ide_setting_sem doesn't help situation when hwif is unregistered and some 
other driver is loaded later and takes this hwif using ide_register_hw().
Right - ide_cfg_sem is covering this. ide_cfg_sem is taken after 
ide_setting_sem so how about making init_hwif_data restore that field.

ide_drive_from_key can then take ide_cfg_sem during its checking

The other alternative is to never use key = 0 in the real world but I
see no reason for not just taking ide_cfg_sem during the key to drive
operation. ide_cfg_sem is the read lock for configuration change so this
is logically the right behaviour too ?




Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help