• A
    PCI: quirks: fix the festering mess that claims to handle IDE quirks · 368c73d4
    Alan Cox 提交于
    The number of permutations of crap we do is amazing and almost all of it
    has the wrong effect in 2.6.
    
    At the heart of this is the PCI SFF magic which says that compatibility
    mode PCI IDE controllers use ISA IRQ routing and hard coded addresses
    not the BAR values. The old quirks variously clears them, sets them,
    adjusts them and then IDE ignores the result.
    
    In order to drive all this garbage out and to do it portably we need to
    handle the SFF rules directly and properly. Because we know the device
    BAR 0-3 are not used in compatibility mode we load them with the values
    that are implied (and indeed which many controllers actually
    thoughtfully put there in this mode anyway).
    
    This removes special cases in the IDE layer and libata which now knows
    that bar 0/1/2/3 always contain the correct address. It means our
    resource allocation map is accurate from boot, not "mostly accurate"
    after ide is loaded, and it shoots lots of code. There is also lots more
    code and magic constant knowledge to shoot once this is in and settled.
    
    Been in my test tree for a while both with drivers/ide and with libata.
    Wants some -mm shakedown in case I've missed something dumb or there are
    corner cases lurking.
    Signed-off-by: NAlan Cox <alan@redhat.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
    368c73d4
fixup.c 14.5 KB