Home
last modified time | relevance | path

Searched hist:"4 e1ba8a736a4272e15f8e4541858407821d6b59e" (Results 1 – 2 of 2) sorted by relevance

/openbmc/libpldm/src/requester/
H A Dpldm.cdiff 4e1ba8a736a4272e15f8e4541858407821d6b59e Wed Jun 28 20:18:33 CDT 2023 Andrew Jeffery <andrew@aj.id.au> requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error

As it stood the reimplementation of pldm_open() passed back the return
value of the pldm_transport_mctp_demux_*() APIs, which don't align with
the specified behaviour of pldm_open()'s return values.

Rework the return values such that PLDM_REQUESTER_OPEN_FAIL is always
returned on error. This fixes error handling in at least
openpower-occ-control, which only tested for that value and considered
all other values as success.

Further, handle any external close(2) of the returned file descriptor.
This again caters to openpower-occ-control which issues close() in its
response handler.

Fixes: 39f883259956 ("requester: Make pldm_open() return existing fd")
Fixes: c1b66f420912 ("requester: Add new APIs to support multiple transports")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I7144f6ecf0fdfbbc3a2a418a651207c012e0db54
/openbmc/libpldm/
H A DCHANGELOG.mddiff 4e1ba8a736a4272e15f8e4541858407821d6b59e Wed Jun 28 20:18:33 CDT 2023 Andrew Jeffery <andrew@aj.id.au> requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error

As it stood the reimplementation of pldm_open() passed back the return
value of the pldm_transport_mctp_demux_*() APIs, which don't align with
the specified behaviour of pldm_open()'s return values.

Rework the return values such that PLDM_REQUESTER_OPEN_FAIL is always
returned on error. This fixes error handling in at least
openpower-occ-control, which only tested for that value and considered
all other values as success.

Further, handle any external close(2) of the returned file descriptor.
This again caters to openpower-occ-control which issues close() in its
response handler.

Fixes: 39f883259956 ("requester: Make pldm_open() return existing fd")
Fixes: c1b66f420912 ("requester: Add new APIs to support multiple transports")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I7144f6ecf0fdfbbc3a2a418a651207c012e0db54