[Midnightbsd-cvs] [MidnightBSD/src] 938920: Advertise the MPI Message Version that's contained...

Lucas Holt noreply at github.com
Fri Nov 24 01:17:44 EST 2023


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/src
  Commit: 938920aed8c4431daddeea3d0fb3adf908d84b58
      https://github.com/MidnightBSD/src/commit/938920aed8c4431daddeea3d0fb3adf908d84b58
  Author: Scott Long <scottl at FreeBSD.org>
  Date:   2023-11-24 (Fri, 24 Nov 2023)

  Changed paths:
    M sys/dev/mpr/mpr.c
    M sys/dev/mpr/mpr_user.c
    M sys/dev/mpr/mprvar.h
    M sys/dev/mps/mps.c
    M sys/dev/mps/mps_user.c
    M sys/dev/mps/mpsvar.h
    M usr.sbin/mpsutil/mps_cmd.c

  Log Message:
  -----------
  Advertise the MPI Message Version that's contained in the IOCFacts message
in the sysctl block for the driver.  mpsutil/mprutil needs this so it can
know how big of a buffer to allocate when requesting the IOCFacts from the
controller.  This eliminates the kernel console messages about wrong
allocation sizes.

Reported by:	imp

(cherry picked from commit 69e85eb8ae4919e0806bc2957cbc4a33f9138b54)

mprutil: "fix user reply buffer (64)..." warnings

Depending on the card's firmware version, it may return different length
responses for MPI2_FUNCTION_IOC_FACTS.  But the first part of the
response contains the length of the rest, so query it first to get the
length and then use that to size the buffer for the full response.

Also, correctly zero-initialize MPI2_IOC_FACTS_REQUEST.  It only worked
by luck before.

PR:		264848
Reported by:	Julien Cigar <julien at perdition.city>
Sponsored by:	Axcient
Reviewed by:	scottl, imp
Differential Revision: https://reviews.freebsd.org/D38739

(cherry picked from commit 7d154c4dc64e61af7ca536c4e9927fa07c675a83)




More information about the Midnightbsd-cvs mailing list