From e21428954dd958af48f88b8678d0564c32bd8541 Mon Sep 17 00:00:00 2001 From: Patrick Wildt Date: Wed, 16 May 2018 08:20:01 +0000 Subject: Implement a BCDC control packet mechanism based on the command request ids. So far we were only able to have one command in flight at a time and race conditions could easily lead to unexpected behaviour, especia- lly combined with a slow bus and timeouts. With this rework we send or enqueue a control packet command and wait for replies to happen. Thus we can have multiple control packets in flight and a reply with the correct id will wake us up. --- sys/dev/pci/if_bwfm_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci/if_bwfm_pci.c') diff --git a/sys/dev/pci/if_bwfm_pci.c b/sys/dev/pci/if_bwfm_pci.c index c8a1ddced1e..1481ce8f59e 100644 --- a/sys/dev/pci/if_bwfm_pci.c +++ b/sys/dev/pci/if_bwfm_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwfm_pci.c,v 1.18 2018/02/08 05:00:38 patrick Exp $ */ +/* $OpenBSD: if_bwfm_pci.c,v 1.19 2018/05/16 08:20:00 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2017 Patrick Wildt @@ -285,13 +285,13 @@ struct bwfm_bus_ops bwfm_pci_bus_ops = { .bs_txcheck = bwfm_pci_txcheck, .bs_txdata = bwfm_pci_txdata, .bs_txctl = NULL, - .bs_rxctl = NULL, }; struct bwfm_proto_ops bwfm_pci_msgbuf_ops = { .proto_query_dcmd = bwfm_pci_msgbuf_query_dcmd, .proto_set_dcmd = bwfm_pci_msgbuf_set_dcmd, .proto_rx = NULL, + .proto_rxctl = NULL, }; struct cfattach bwfm_pci_ca = { -- cgit v1.2.3