Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jan 2021 23:04:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 235016] ASIX AX99100 based uart controllers broken on 12.0
Message-ID:  <bug-235016-227-EQQkMHJSBW@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-235016-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-235016-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235016

--- Comment #2 from david@dcrosstech.com ---
Created attachment 221648
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D221648&action=
=3Dedit
Patch to fix uart_bus_pci.c

This is my working patch.  After consulting with the pci_alloc_msi and free=
bsd
MSI page as well as looking at other drivers I think this is probably the
'best' patch at this point.

Given: https://people.freebsd.org/~grehan/msi_api.txt  (yes, it looks a bit
dated), that makes it explicitly clear that if you get back fewer MSI resou=
rces
than the device expects the driver is responsible for ensuring the device
doesn't generate MSI greater than has been allocated.. There is no such cod=
e in
the UART space.  Additionally there are numerous other drivers that expect a
single MSI count and if they get it establish MSI for that, and if not fall
back to legacy IRQ.

I couldn't get anything resembling "real" documentation out of ASIX for wha=
t is
going on, but given a few facts: That MSI interrupts must be allocated in
powers of 2, that NO MSI interrupts are visible on this device when it is
enabled (that I have ben able to find), and there are 5 UART interrupt
registers (tx, rx, sigchange, overrun, break) I am *guessing* they map 5 MSI
interrupts to each of those individual serial interrupt registers.  I brief=
ly
contemplated attempting to wire these directly to the uart_intr_* calls, or=
 all
of them to uart_intr itself, but there were too many questions about the ri=
ght
way to pass this along, to abstract it, and the concurrency (multiple
interrupts firing at once on different cores).. given that, i think this is=
 the
best patch.

Thanks!

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235016-227-EQQkMHJSBW>