Subject: [net-next PATCH 0/1] net/ncsi: Fix netlink major/minor version numbers

From: Peter Delevoryas <[email-masked]>
Date: Thu, 2 Feb 2023 09:53:26 -0800

Background:

This fixes some nonsensical behavior with the NCSI version numbers that has
existed since the NCSI driver was introduced. Details in the commit message.

Functionally, this is only visible through the netlink interface, so I've
titled this commit as "fixing netlink".

But actually, the real reason I care about this is to provide a proper mechanism
for using the network card's NCSI version in the driver state machine.

With the major and minor versions parsed correctly here, the state machine can
decide to send NCSI 1.1 or 1.2 commands when the card supports it.

I submitted this patch previously[1] with two other changes, but that series
was ignored (wrong time to submit, invalid subject prefix, and the last patch
is controversial until hardware propagates).

I decided to just resubmit this first patch, since I think it's valuable on its
own. I'll follow up with the other ones later.

[1] https://lore.kernel.org/lkml/[email-masked]/

Implementation notes:

I found that "include/linux/bcd.h" doesn't actually do what we would want, so I
added a local static function. Perhaps I actually should have added that to
"include/linux/bcd.h" so other people can use it in the future? Let me know
what you guys think.

Thanks,
Peter

Peter Delevoryas (1):
  net/ncsi: Fix netlink major/minor version numbers

 net/ncsi/internal.h     |  7 +++++--
 net/ncsi/ncsi-netlink.c |  4 ++--
 net/ncsi/ncsi-pkt.h     |  7 +++++--
 net/ncsi/ncsi-rsp.c     | 26 ++++++++++++++++++++++++--
 4 files changed, 36 insertions(+), 8 deletions(-)

-- 
2.30.2