Page MenuHomeFreeBSD

Port some changes from mpr to the mps driver.
ClosedPublic

Authored by slm on Jun 16 2016, 7:11 PM.
Tags
None
Referenced Files
F81665842: D6872.diff
Fri, Apr 19, 4:36 PM
Unknown Object (File)
Tue, Apr 9, 1:58 PM
Unknown Object (File)
Jan 28 2024, 3:54 PM
Unknown Object (File)
Jan 18 2024, 12:53 AM
Unknown Object (File)
Jan 9 2024, 8:27 AM
Unknown Object (File)
Dec 20 2023, 1:07 AM
Unknown Object (File)
Nov 27 2023, 6:10 AM
Unknown Object (File)
Nov 16 2023, 11:41 PM
Subscribers

Details

Summary
  • No log bit in IOCStatus and endian-safe changes.

Use MPI2_IOCSTATUS_MASK when checking IOCStatus to mask off the log bit, and
make a few more things endian-safe.

  • Fix possible use of invalid pointer.

It was possible to use an invalid pointer to get the target ID value. To fix
this, initialize a local Target ID variable to an invalid value and change that
variable to a valid value only if the pointer to the Target ID is not NULL.

  • No need to set the MPSSAS_SHUTDOWN flag because it's never used.
  • done_ccb pointer can be used if it is NULL.

To prevent this, move check for done_ccb == NULL to before done_ccb is used in
mpssas_stop_unit_done().

  • Disks can go missing until a reboot is done in some cases.

This is due to the DevHandle not being released, which causes the Firmware to
not allow that disk to be re-added.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

slm retitled this revision from to Port some changes from mpr to the mps driver..
slm updated this object.
slm edited the test plan for this revision. (Show Details)
slm added reviewers: scottl, ken, asomers, ambrisko.
slm set the repository for this revision to rS FreeBSD src repository - subversion.

One question (see inline comments), otherwise this looks good.

sys/dev/mps/mps_sas.c
382 ↗(On Diff #17642)

Looks like the mpssas_free_tm() and return were removed here. Is that intentional?

sys/dev/mps/mps_sas.c
382 ↗(On Diff #17642)

Yes, because sometimes it's possible to have an IOCStatus come back and that doesn't mean that we should stop processing the removal. This is for a volume, so it's not as bad, but when we stop processing the removal for a disk, the disk will disappear until a Diag Reset or a Reboot. For a volume, we'll just continue on for a few more lines with this change, but that still includes freeing the reply.

ken edited edge metadata.

Okay, thanks, looks good!

This revision is now accepted and ready to land.Jun 16 2016, 7:37 PM
This revision was automatically updated to reflect the committed changes.