• Anatolij Gustschin's avatar
    [SCSI] mptsas: Fix issue with chain pools allocation on katmai · f1053a7c
    Anatolij Gustschin authored
    Since commit 9d2e9d66
    mptsas driver fails to allocate memory for the MPT chain buffers
    for second LSI adapter on PPC440SPe Katmai platform:
    ...
    ioc1: LSISAS1068E B3: Capabilities={Initiator}
    mptbase: ioc1: ERROR - Unable to allocate Reply, Request, Chain Buffers!
    mptbase: ioc1: ERROR - didn't initialize properly! (-3)
    mptsas: probe of 0002:31:00.0 failed with error -3
    
    This commit increased MPT_FC_CAN_QUEUE value but initChainBuffers()
    doesn't differentiate between SAS and FC causing increased allocation
    for SAS case, too. Later pci_alloc_consistent() fails to allocate
    increased chain buffer pool size for SAS case.
    
    Provide a fix by looking at the bus type and using appropriate
    MPT_SAS_CAN_QUEUE value while calculation of the number of chain
    buffers.
    Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
    Acked-by: default avatarKashyap Desai <kashyap.desai@lsi.com>
    Cc: Stable Tree <stable@kernel.org>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
    f1053a7c
mptbase.c 231 KB