Page MenuHomeFreeBSD

Install a handler for firmware work request error messages.
ClosedPublic

Authored by jhb on Jun 23 2016, 10:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 11:00 PM
Unknown Object (File)
Thu, Apr 25, 10:56 PM
Unknown Object (File)
Mar 19 2024, 11:42 PM
Unknown Object (File)
Mar 19 2024, 7:50 PM
Unknown Object (File)
Feb 22 2024, 10:31 PM
Unknown Object (File)
Dec 20 2023, 9:29 PM
Unknown Object (File)
Dec 20 2023, 1:16 AM
Unknown Object (File)
Dec 4 2023, 6:18 AM
Subscribers

Details

Summary

Install a handler for firmware work request error messages.

If a driver sends an malformed or disallowed work request, the firmware
responds with a work request error. Previously the driver treated this is
as an unexpected message and panicked. Now it decodes the error message
to aid in debugging.

Test Plan
  • Broke the VF driver to send TX_PKT to trigger an error message.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Install a handler for firmware work request error messages..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: np.

If this is going to be in t4_sge.c (vs. t4_hw.c) then it can follow FreeBSD style like the rest of the file. So no -ve errnos, return (foo) instead of return foo, etc.

Is it ok to try to carry on after a WRERR? I think we should panic the system at least for fatal errors, if not for all errors.

What about printf(9) vs. log(9) given that the CPL handlers are running in an ithread?

In D6950#145783, @np wrote:

If this is going to be in t4_sge.c (vs. t4_hw.c) then it can follow FreeBSD style like the rest of the file. So no -ve errnos, return (foo) instead of return foo, etc.

One of my questions actually was if this should go in t4_hw.c (that is, do you think the Linux driver would take this upstream as well?)

Is it ok to try to carry on after a WRERR? I think we should panic the system at least for fatal errors, if not for all errors.

In the case of the errors I saw with the VF driver the EQ just died (which did break trying to kldunload as quiescing hung forever), but the system was otherwise fine. Those were non-fatal though. We could panic for fatal ones I guess and maybe mark the EQ as "dead" for non-fatal errors.

What about printf(9) vs. log(9) given that the CPL handlers are running in an ithread?

printf is certainly fine in an ithread. Would you prefer log(9)?

jhb edited edge metadata.
  • Rebase.
  • Use log() instead of printf().
This revision was automatically updated to reflect the committed changes.