git: 13e9b4e5e21d - main - apple_bce: ignore duplicate TRANSFER_REQUEST in STATUS state

From: Abdelkader Boudih <seuros_at_FreeBSD.org>
Date: Sun, 06 Sep 2026 19:48:32 UTC
The branch main has been updated by seuros:

URL: https://cgit.FreeBSD.org/src/commit/?id=13e9b4e5e21d2969f22bc5adff734503f03c053c

commit 13e9b4e5e21d2969f22bc5adff734503f03c053c
Author:     Abdelkader Boudih <seuros@FreeBSD.org>
AuthorDate: 2026-09-06 19:15:51 +0000
Commit:     Abdelkader Boudih <seuros@FreeBSD.org>
CommitDate: 2026-09-06 19:47:44 +0000

    apple_bce: ignore duplicate TRANSFER_REQUEST in STATUS state
    
    Since the host initiates IN data transfers, the
    firmware's own TRANSFER_REQUEST for the same phase arrives after
    we've already moved to STATUS state. Ignoring  instead of failing
    the transfer with USB_ERR_IOERROR.
    
    Reviewed by:    adrian
    Differential Revision:  https://reviews.freebsd.org/D58873
---
 sys/dev/apple_bce/apple_bce_vhci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/dev/apple_bce/apple_bce_vhci.c b/sys/dev/apple_bce/apple_bce_vhci.c
index f8ab178bd291..7056f8e2fb97 100644
--- a/sys/dev/apple_bce/apple_bce_vhci.c
+++ b/sys/dev/apple_bce/apple_bce_vhci.c
@@ -2888,6 +2888,11 @@ bce_vhci_handle_transfer_request(struct bce_vhci_softc *vhci,
 		break;
 	}
 
+	case BCE_VHCI_CTRL_STATUS:
+		if (bus_locked == 0)
+			USB_BUS_UNLOCK(&vhci->sc_bus);
+		break;
+
 	default:
 		device_printf(vhci->sc_dev,
 		    "unexpected TRANSFER_REQUEST in state %d\n",