• Andrew Morton's avatar
    [PATCH] OSS CS4232 locking fixes · 2b8a659c
    Andrew Morton authored
    Patch from: Peter Waechtler <pwaechtler@mac.com>
    
    Addresses BUGME bug #331.  "OSS CS4232 nasty spinlock printks on boot"
    
    The locking in some OSS modules is really lousy.
    Because save_flags/cli/restore_flags could be used recursivly - the
    programmers pushed the locking too far the lower level.
    
    Because on ISA cards the register sets are usually multiplexed
    you had to write to an address latch and then access the data port
    in an "atomic" manner.
    
    I suggest removing the locking from ad_read/ad_write +
    ad_{enter|leave}_MCE and clamping the locks wherever the functions
    are called. I hope the attached patch does that correctly.
    
    Yes, I don't like all the timeout loops while holding the locks:
    high chances that a cpu is spinning in interrupt context :(
    2b8a659c
ad1848.c 76.2 KB