Bug 152253 - [digi] [patch] Enhancements to digi(4) to prevent interrupt storms
Summary: [digi] [patch] Enhancements to digi(4) to prevent interrupt storms
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.3-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-15 00:10 UTC by Peter.Jeremy
Modified: 2018-05-20 18:44 UTC (History)
0 users

See Also:


Attachments
file.diff (12.30 KB, patch)
2010-11-15 00:10 UTC, Peter.Jeremy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter.Jeremy 2010-11-15 00:10:08 UTC
I have experienced interrupt storms associated with digi(4) and Accelport Xem cards on various versions of FreeBSD.  The problem appears to be that the card generates an interrupt for no obvious reason and, in the absence of driver support to acknowledge the interrupt, the card generates an interrupt storm.  I found that ensuring that the card did not share an interrupt helped but was not a complete cure on all systems (due to the difficulty of finding interrupt numbers that were not used by anything else).  Whilst Digi do not support FreeBSD, they do support Linux and the latest version of the driver source can be found at http://ftp1.digi.com/support/driver/40002347_c.tgz

I initially tried updating the Xem firmware included in digi(4), using sxfep.bin and sxbios.bin from the above file - to no avail.  (The patch for this is not included below due to size but is just a matter of turning the contents of those two binary files into C arrays in Xem.fepos.h and Xem.bios.h respectively - further details upon request).

I then worked through the Linux source code comparing the behaviour.  The attached patch comprises:
1) Implementation of a sysctl to control digi_debug
2) Liberal application of 'volatile' modifiers to memory references on the card.
3) Various changes to PCI access width and magic numbers to match Linux
4) PCI interrupt acknowledgement write (copied from Linux)
5) Enable interrupt handling (even though the actual I/O remains polled).

Note that these changes have only been tested on Xem because I don't have access to any other cards.

Note that this patch is for 7-STABLE because digi(4) has not been converted for the TTYng changes in 8.x.  The digi(4) souce code has not been touched for many years and is the same in 7.x, 8.x and 9.x.  I intend to adapt digi(4) for the TTYng changes but the resultant patches will be relative to this source code, rather than the existing source code.

Fix: Patch attached with submission follows:
How-To-Repeat: Install Digi Accelport Xem card on a shared interrupt.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:53 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 18:44:37 UTC
# 20160901: Remove digi(4)