Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/dev/pci

Module Name:    src
Committed By:   jmcneill
Date:           Fri Apr 24 12:58:42 UTC 2020

Modified Files:
        src/sys/dev/pci: if_mcx.c

Log Message:
mcx: sync with OpenBSD sys/dev/pci/if_mcx.c r1.44

Fix typo which could lead into a double free

Commands that create objects return a 24 bit object ID, so mask off the
high 8 bits of the value we extract, in case the firmware leaves junk there.
Hrvoje Popovski has seen this with newer firmware on a ConnectX 5 card,
which now works properly.

Increase the completion queue size to prevent overflow.  Under reasonably
unlikely circumstances - lots of single-fragment packets being sent, a
significant number of packets being received, while the interrupt handler
was unable to process the completion queue - the completion queue could
overflow, which would result in the interface locking up.

Check if we've reached the end of the current mailbox before writing past
the end of it, rather than after.  Now we can actually allocate queues
big enough to need multiple mailboxes.

Don't call mcx_intr() from mcx_cmdq_poll(); this was a leftover from early
development that I forgot about, but turns out to be a potential race with
the actual interrupt handler.

fix previous: use the correct offset for sq/rq creation, and don't
reset the mbox counter to 0 after calculating it.

Add a helper function for writing physical addresses for queues into
command queue mailboxes, and use this for all queue setup commands.
Previously we just assumed the addresses would fit in the first mailbox,
which is currently true but may not be for much longer.


The event queue consumer counter also needs to be unsigned like the others.

try to make if_baudrate look plausible.
this updates the eth proto capability map so it records the baudrate
against the different link types and their media, and then reads
it when the link state changes.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/if_mcx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index