git: 924dc9443f6b - stable/15 - if_bnxt: Fix the Unknown command 0x80000000 ioctl command error

From: Sumit Saxena <ssaxena_at_FreeBSD.org>
Date: Wed, 30 Sep 2026 10:41:38 UTC
The branch stable/15 has been updated by ssaxena:

URL: https://cgit.FreeBSD.org/src/commit/?id=924dc9443f6be4939131a7b12dce95e081c411ed

commit 924dc9443f6be4939131a7b12dce95e081c411ed
Author:     Sreekanth Reddy <sreekanth.reddy@broadcom.com>
AuthorDate: 2026-06-15 09:48:34 +0000
Commit:     Sumit Saxena <ssaxena@FreeBSD.org>
CommitDate: 2026-09-30 10:39:31 +0000

    if_bnxt: Fix the Unknown command 0x80000000 ioctl command error
    
    With the latest niccli version, user will observe below
    Unknown command command error when try to list the devices.
    
    if_bnxt: Unknown command 0x80000000
    
    Here, niccli is issuing command opcode as 0x80000000 but
    driver is expecting 0x20000000 command opcode.
    
    So, replaced _IOW(0,0,0) with the _IOC(IOC_IN,0,0,0).
    
    Fixes: d53d7b4 ("bnxt: Fix up ioctl opcodes to support IOC_VOID along with IOC_IN")
    
    MFC after:      2 weeks
    Reviewed by:    gallatin, ssaxena
    Differential Revision: https://reviews.freebsd.org/D56685
    
    (cherry picked from commit 3987058a3a943c461c27dbebf10dad555b1bb2fa)
---
 sys/dev/bnxt/bnxt_en/bnxt_mgmt.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h
index 272fb0e298cb..169434633b9a 100644
--- a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h
+++ b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h
@@ -40,11 +40,11 @@
 #define	DRIVER_NAME				"if_bnxt"
 
 
-#define	IOW_BNXT_MGMT_OPCODE_GET_DEV_INFO	_IOW(0, 0, 0)
-#define	IOW_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM	_IOW(0, 1, 0)
-#define	IOW_BNXT_MGMT_OPCODE_DCB_OPS		_IOW(0, 2, 0)
-#define	IOW_BNXT_MGMT_OPCODE_DRV_DUMP		_IOW(0, 3, 0)
-#define	IOW_BNXT_MGMT_OPCODE_CRASH_DUMP		_IOW(0, 4, 0)
+#define	IOW_BNXT_MGMT_OPCODE_GET_DEV_INFO	_IOC(IOC_IN, 0, 0, 0)
+#define	IOW_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM	_IOC(IOC_IN, 0, 1, 0)
+#define	IOW_BNXT_MGMT_OPCODE_DCB_OPS		_IOC(IOC_IN, 0, 2, 0)
+#define	IOW_BNXT_MGMT_OPCODE_DRV_DUMP		_IOC(IOC_IN, 0, 3, 0)
+#define	IOW_BNXT_MGMT_OPCODE_CRASH_DUMP		_IOC(IOC_IN, 0, 4, 0)
 
 #define	IO_BNXT_MGMT_OPCODE_GET_DEV_INFO	_IO(0, 0)
 #define	IO_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM	_IO(0, 1)