Skip to content
  • Michael Reed's avatar
    [SCSI] mptsas: do not use ioc->handle to locate hba portinfo structure · 7748369f
    Michael Reed authored
    
    
    While performing hardware raid reset testing via the raid's client, I
    noticed that sometimes, following the reset, that there would be more
    raid targets in the lsscsi output than there actually were raid
    targets.  I tracked this down to the following issue.
    
    Fusion cannot always find the mptsas_portinfo structure for the hba
    because it uses the handle stored in ioc->handle to locate it.  The
    problem is that the firmware can change the handle associated with the
    hba when h/w raid is reset (via the raid client).  When this happens,
    the driver will allocate another mptsas_portinfo structure and link it
    into the chain of said structures.  This ultimately causes confusion
    within the driver resulting in targets not being removed when they
    should be.
    
    Eric Moore pointed out that the hba's portinfo structure is always the
    first structure on the sas_topology list.  This patch modifies
    mptsas.c to access the hba's portinfo structure by taking the first
    structure on said list.
    
    Signed-off-by: default avatarMichael Reed <mdr@sgi.com>
    Acked-by: default avatar"Moore, Eric" <Eric.Moore@lsi.com>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
    7748369f