astlpc.c (b214c6430f7a4b8a99b1977d21d2e3e3a79e3071) astlpc.c (3b36d17cf18bd9ad13f043256371222e2845e4d9)
1/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
2
3#include <assert.h>
4#include <endian.h>
5#include <stdbool.h>
6#include <stdlib.h>
7#include <string.h>
8#include <unistd.h>

--- 284 unchanged lines hidden (view full) ---

293 /* reserved value for dummy data writes; do nothing */
294 break;
295 default:
296 mctp_prwarn("unknown message 0x%x", data);
297 }
298 return 0;
299}
300
1/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
2
3#include <assert.h>
4#include <endian.h>
5#include <stdbool.h>
6#include <stdlib.h>
7#include <string.h>
8#include <unistd.h>

--- 284 unchanged lines hidden (view full) ---

293 /* reserved value for dummy data writes; do nothing */
294 break;
295 default:
296 mctp_prwarn("unknown message 0x%x", data);
297 }
298 return 0;
299}
300
301void mctp_astlpc_register_bus(struct mctp_binding_astlpc *astlpc,
302 struct mctp *mctp, mctp_eid_t eid)
303{
304 mctp_register_bus(mctp, &astlpc->binding, eid);
305}
306
307static int mctp_astlpc_init_bmc(struct mctp_binding_astlpc *astlpc)
308{
309 struct mctp_lpcmap_hdr *hdr;
310 uint8_t status;
311 int rc;
312
313 if (lpc_direct(astlpc))
314 hdr = astlpc->lpc_hdr;

--- 35 unchanged lines hidden (view full) ---

350 astlpc->binding.tx = mctp_binding_astlpc_tx;
351 astlpc->binding.pkt_size = MCTP_BMTU;
352 astlpc->binding.pkt_pad = 0;
353 astlpc->lpc_map = NULL;
354
355 return astlpc;
356}
357
301static int mctp_astlpc_init_bmc(struct mctp_binding_astlpc *astlpc)
302{
303 struct mctp_lpcmap_hdr *hdr;
304 uint8_t status;
305 int rc;
306
307 if (lpc_direct(astlpc))
308 hdr = astlpc->lpc_hdr;

--- 35 unchanged lines hidden (view full) ---

344 astlpc->binding.tx = mctp_binding_astlpc_tx;
345 astlpc->binding.pkt_size = MCTP_BMTU;
346 astlpc->binding.pkt_pad = 0;
347 astlpc->lpc_map = NULL;
348
349 return astlpc;
350}
351
352struct mctp_binding *mctp_binding_astlpc_core(struct mctp_binding_astlpc *b)
353{
354 return &b->binding;
355}
356
358struct mctp_binding_astlpc *mctp_astlpc_init_ops(
359 struct mctp_binding_astlpc_ops *ops,
360 void *ops_data, void *lpc_map)
361{
362 struct mctp_binding_astlpc *astlpc;
363 int rc;
364
365 astlpc = __mctp_astlpc_init();

--- 149 unchanged lines hidden ---
357struct mctp_binding_astlpc *mctp_astlpc_init_ops(
358 struct mctp_binding_astlpc_ops *ops,
359 void *ops_data, void *lpc_map)
360{
361 struct mctp_binding_astlpc *astlpc;
362 int rc;
363
364 astlpc = __mctp_astlpc_init();

--- 149 unchanged lines hidden ---