HomeFreeBSD

mpr(4): Handle mprsas_alloc_tm() errors on device removal.

Description

mpr(4): Handle mprsas_alloc_tm() errors on device removal.

SAS9305-16e with firmware 16.00.01.00 report HighPriorityCredit of
only 8, while for comparison some other combinations I have report
100 or even 128. In case of large JBOD detach requirement to send
target reset command to each target same time overflows the limit,
and without adequate handling makes devices stuck in half-detached
state, preventing later re-attach.

To handle that in case of allocation error mark the target with new
MPRSAS_TARGET_TOREMOVE flag, and retry the removal attempt next time
something else free high priority command. With this patch I can
successfully detach/attach 102 disk JBOD from/to the SAS9305-16e.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

(cherry picked from commit e3c5965c259f7029afe01612b248c3acf9f5b3e0)

Details

Provenance
mavAuthored on Aug 20 2021, 1:46 PM
Parents
rGa2784b47e481: mpr/mps: Minor state machine fix
Branches
Unknown
Tags
Unknown