• Martin Dalecki's avatar
    [PATCH] 2.5.5 IDE cleanup 12 · c0bf9449
    Martin Dalecki authored
    1. Add some notes to Documentation/driver-model.txt about how and
         and where to mount the driverfs.
    
    2. Reorganize and prepare the PCI scanning code for proper device
    dependant splitup. Basically tedious cleanup of macro games.
    
    3. Use struct pci_dev name field as the name of PCI host dapaters
    instead of invention ambigious IDE special names. This makes
    the kernel bootup messages look a bit shifted, since those names are bit
    longer, but makes up for consistance and should allow one later
    to rearage things to fit into the generic PCI device initialization
    mechanisms provided by the kernel.
    
    4. Set 3. Allowed us to make the host chip specific
    pci_init_xxx class functions have the proper signature of
    module initializers. This will make it possible to make true
    modules out of them later.
    
    5. Make some functions in cmd64x.c static which where not used
    elsewhere.
    
    6. rename ide_special_settings to trust_pci_irq - this is reflecting
    it's functionality better. And make it match the pci device vendor
    as well as the device ID. It was a BUG to match only the device id!.
    
    7. Make the chanell setup more tollerant for BIOS-es which don't
    report IO and MEM bases properly. The code found previously there
    tryed but was inconsistant.
    
    8. Start to use proper terminology in ide-pci.c: host chip, channel,
    drive instead of hwif, port, drive...
    
    9. Enlarge the name field from ide_hwif_t to 64 bytes. It was only 6
    previously and there where custom names there which where exceeding
    this!!! But since we use the proper pci devce name there now instead,
    we had to extend the size of this field anyway.
    
    10. Add some explanatory comments and fix misguiding comments here and
    there.
    
    11. Kill the proc_ide_write_config and proc_ide_read_config brain
    damage! Those where backdoors to the pci configuration registers on PCI
    devices and IO registers on directly connected ISA ATA controllers.
    They didn't discrement between them!
    
    Access to both of them *simply* doesn't belong into an operating system,
    which is supposed to abstract out the access to hardware! Did I mention
    that access to both can be done from user land without an IDE special
    interface! Any program which was using them (I hardly beleve there is
    one) just deserves to loose. The programmer responsible for it
    deserves to be fired immediately.
    
    12. Move ide_map_xx and ide_unmap_xx tinny bio level wrappers away
    from the "global" ide.h to where those are actually used and kill
    trivial wrappers for otherwise generic bio_ routines. Just fighting
    code obfuscation. The "rq->bio is used or is not there" brain
    damage in ide-taskfile.c has to be fixed later. Possibly by killing
    ide-taskfile.c alltogether, becouse this should be a driver for
    users and not a driver for ATA disk disaster recovery companys...
    
    13. Kill hwif->pci_devid and hwif->pci_venid. Just use the already
    present hwif->pci_dev field instead.
    
    14. Kill unused big switch ide_reinit_drive function. This silly
    functon was switching upon every possible device driver cathegory
    and calling the correspondng reinit function directly. This
    idiocy was fortunately not used.
    
    That's all... Most will be clear if one starts looking at the changes
    in ide.h of course...
    
    In contrast to the previous patches this one is actually fixing two
    serious bugs.
    
    
    The next direct step will be to kill the sigle place global PCI device
    type recognition list from ide-pci.c by pushing the entries to where
    they belong -> the host chips setup modules.
    c0bf9449
driver-model.txt 19.5 KB