• Roland Dreier's avatar
    [PATCH] InfiniBand/mthca: clean up ioremap()/request_region() usage · eb8cdaeb
    Roland Dreier authored
    From: "Michael S. Tsirkin" <mst@mellanox.co.il>
    
    Here are misc fixes for mthca mapping:
    
    1. Thinkably, MSI tables or another region could fall between HCR
       and ECR tables.
       Thus its arguably wrong to map both tables in one region.
       So, do it separately.
       I think its also more readable to have ecr_base and access ecr there,
       not access ecr with hcr pointer.
    
    2. mthca_request_regions error handling was borken
       (wrong order of cleanups). For example on all errors
       pci_release_region was called which is wrong if the region
       was not yet mapped. And other such cleanups.
    
    3. Fixed some error messages too.
    Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    eb8cdaeb
mthca_dev.h 12.2 KB