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
Unknown Object (File)
Fri, Dec 20, 6:12 PM
Unknown Object (File)
Tue, Dec 10, 4:59 PM
Unknown Object (File)
Mon, Dec 9, 6:53 AM
Unknown Object (File)
Nov 25 2024, 10:05 PM
Unknown Object (File)
Oct 3 2024, 4:57 AM
Unknown Object (File)
Oct 2 2024, 10:14 PM
Unknown Object (File)
Sep 30 2024, 7:45 PM
Unknown Object (File)
Sep 27 2024, 12:54 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.