freebsd-nq/sys/dev
Bjoern A. Zeeb dcceaf9f3c Merge atse(4) interrupt handling and race condition fixes from cheribsd:
commit 8bd88585ed8e3f7def0d780a1bc30d96fe642b9c

    Rework atse_rx_cycles handling: count packets instead of fills, and use the
    limit only when polling, not when in interrupt mode.  Otherwise, we may
    stop reading the FIFO midpacket and clear the event mask even though the
    FIFO still has data to read, which could stall receive when a large packet
    arrives.  Add a comment about races in the Altera FIFO interface: we may
    need to do a little more work to handle races than we are.

commit 20b39086cc612f8874dc9e6ef4c0c2eb777ba92a

    Use 'sizeof(data)' rather than '4' when checking an mbuf bound, as is the
    case for adjusting length/etc.

commit e18953174a265f40e9ba60d76af7d288927f5382

    Break out atse_intr() into two separate routines, one for each of the two
    interrupt sources: receive and transmit.

commit 6deedb43246ab3f9f597918361831fbab7fac4ce

    For the RX interrupt, take interest only in ALMOSTEMPTY and OVERFLOW.
    For the TX interrupt, take interest only in ALMOSTFULL and UNDERFLOW.

    Perform TX atse_start_locked() once rather than twice in TX interrupt
    handling -- and only if !FULL, rather than unconditionally.

commit 12601972ba08d4380201a74f5b967bdaeb23092c

    Experimentation suggests that the Altera Triple-Speed Ethernet documentation
    is incorrect and bits in the event and interrupt-enable registers are not
    irrationally rearranged relative to the status register.

commit 3cff2ffad769289fce3a728152e7be09405385d8

    Substantially rework interrupt handling in the atse(4) driver:

    - Introduce a new macro ATSE_TX_PENDING() which checks whether there is
      any pending data to transmit, either in an in-progress packet or in
      the TX queue.
    - Introduce new ATSE_RX_STATUS_READ() and ATSE_TX_STAUTS_WRITE() macros
      that query the FIFO status registers rather than event registers,
      offering level- rather than edge-triggered FIFO conditions.
    - For RX, interrupt only on full/overflow/underflow; for TX, interrupt
      only on empty/overflow/underflow.
    - Add new ATSE_RX_INTR_READ() and ATSE_RX_INTR_WRITE() macros useful for
      debugging interrupt behaviour.
    - Add a debug.atse_intr_debug_enable sysctl that causes various pieces
      of FIFO state to be printed out on each RX or TX interrupt.  This is
      disabled by default but good to turn on if the interface appears to
      wedge.  Also print debugging information when polling.
    - In the watchdog handler, do receive, not just transmit, processing, to
      ensure that the rx, not just tx, queue is being handled -- and, in
      particular, will be drained such that interrupts can resume.
    - Rework both atse_rx_intr() and atse_tx_intr() to eliminate many race
      conditions, and add comments on why various things are in various
      orders.  Interactions between modifications to the event and interrupt
      masks are quite subtle indeed, and we must actively check for a number
      of races (e.g., event mask cleared; packet arrives; interrupts enabled).
      We also now use the status registers rather than event registers for
      FIFO status checks to avoid other races; we continue to use event
      registers for underflow/overflow.

    With this change, interrupt-driven operation of atse appears (for the
    time being) robust.

commit 3393bbff5c68a4e61699f9b4a62af5d2a5f918f8

    atse: Fix build after 3cff2ffa

Obtained from:	cheribsd
Submitted by:	rwatson, emaste
Sponsored by:	DARPA/AFRL
MFC after:	3 days
2014-09-16 15:45:53 +00:00
..
aac Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
aacraid
acpi_support
acpica Create a separate structure for per-CPU state saved across suspend and 2014-09-06 15:23:28 +00:00
adb
adlink
advansys
ae Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
age Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
agp
aha
ahb
ahci Initialize variables before resource_int_value(). 2014-09-12 08:37:21 +00:00
aic
aic7xxx shared_scb_data set, but never used, remove it. 2014-08-08 11:47:04 +00:00
alc Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
ale Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
altera Merge atse(4) interrupt handling and race condition fixes from cheribsd: 2014-09-16 15:45:53 +00:00
amdsbwd
amdtemp
amr Set but not used variables eliminated. 2014-08-08 11:47:09 +00:00
an last is set and not used, most likely a cut and paste error from other 2014-08-08 11:47:14 +00:00
arcmsr
asmc Add support to asmc(4) for Macmini 3,1. 2014-07-05 21:34:37 +00:00
asr
ata err set but not used. Eliminate it. 2014-08-08 11:47:18 +00:00
ath Shut down RX before TX - in theory, this should make the chip less likely 2014-08-23 18:55:51 +00:00
atkbdc Remove ia64. 2014-07-07 00:27:09 +00:00
auxio
bce Use CSUM_BITS instead of incorrect copy. 2014-09-03 08:28:16 +00:00
bfe Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
bge It is actually possible to have if_t a typedef to non-void type, 2014-08-31 12:48:13 +00:00
bktr Replace cvsweb link wihg svnweb URL in bktr(4) release notes. 2014-08-30 18:01:45 +00:00
bm
buslogic
bvm
bwi Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED. 2014-01-08 08:06:56 +00:00
bwn Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
bxe It is actually possible to have if_t a typedef to non-void type, 2014-08-31 12:48:13 +00:00
cadence Fixes and enhancements for the if_cgem driver... 2014-09-03 17:51:03 +00:00
cardbus Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
cas Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
ce Replace local copy-and-paste implementations of printmbuf() in several 2014-09-10 09:57:32 +00:00
cesa
cfe
cfi
ciss Add detection for ciss(4) controllers that are set to non-raid JBOD mode. 2014-06-29 18:53:15 +00:00
cm
cmx
coretemp
cp Replace local copy-and-paste implementations of printmbuf() in several 2014-09-10 09:57:32 +00:00
cpuctl
cpufreq
cs Delete pp_isadma. It isn't use, and the code that used it has been 2014-08-14 16:01:38 +00:00
ct
ctau Replace local copy-and-paste implementations of printmbuf() in several 2014-09-10 09:57:32 +00:00
cx Replace local copy-and-paste implementations of printmbuf() in several 2014-09-10 09:57:32 +00:00
cxgb - Update the OFED Linux Emulation layer as a preparation for a 2014-08-27 13:21:53 +00:00
cxgbe cxgbe(4): add support for the SIOCGI2C ioctl. 2014-09-12 21:56:57 +00:00
cy
dc Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
dcons
de
digi
dpms
dpt
drm Remove always false comparison. 2014-09-03 09:58:59 +00:00
drm2 drm/radeon: Fix a memory leak when radeonkms is unloaded 2014-08-28 12:40:31 +00:00
e1000 Set DROP_EN on each RX queue if transmit flow-control is disabled. 2014-09-15 19:53:49 +00:00
ed
eisa
en
ep Add missing locking. 2014-08-21 00:57:32 +00:00
esp target is unsigned, so don't compare it < 0 for range test. 2014-08-07 21:56:32 +00:00
et
etherswitch Add another revision of the AR8327. 2014-07-26 21:33:17 +00:00
ex
exca
fatm
fb vt(4): Fix mouse cursor handling in vt_fb/creator_vt/ofwfb 2014-08-27 15:10:28 +00:00
fdc
fdt Create an interface and support routines for drivers that handle IO pin 2014-09-13 19:03:32 +00:00
fe
ffec Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
filemon
firewire Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
flash
fxp It is actually possible to have if_t a typedef to non-void type, 2014-08-31 12:48:13 +00:00
gem Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
glxiic Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
glxsb
gpio Rename OF_xref_phandle() to OF_node_from_xref() and add a new function 2014-09-01 18:51:01 +00:00
gxemul Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
hatm Fix style bug: rename the refcount field of m_ext to ext_cnt, to match 2014-07-11 14:34:29 +00:00
hifn
hme Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
hpt27xx Remove compat shims for FreeBSD versions older than 8.0. 2014-08-05 23:32:53 +00:00
hptiop Various fixes to hptiop(4): 2014-08-05 23:35:19 +00:00
hptmv Various fixes to hptmv(4): 2014-08-05 23:58:49 +00:00
hptnr Update hptnr(4) driver to version 1.0.1 supplied by the vendor. 2014-08-23 01:52:43 +00:00
hptrr Various fixes to hptrr(4): 2014-08-05 23:47:26 +00:00
hwpmc Fix PowerPC backtraces. Since kernel and user have completely separate address 2014-09-14 22:03:41 +00:00
hyperv Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, 2014-09-13 02:15:31 +00:00
ic
ichsmb
ichwd
ida
ie
ieee488
if_ndis When anouncing link state changes on an 802.11 interface with a vap, 2014-08-29 22:01:47 +00:00
iicbus Revert r268543. 2014-07-12 06:23:42 +00:00
iir
io
ipmi
ips
ipw
isci In rare cases, a SATA drive can stop responding to commands and trigger a 2014-06-30 01:01:54 +00:00
iscsi Make sure we handle less than zero timeouts in iSCSI initiator and target 2014-09-10 14:04:10 +00:00
iscsi_initiator Fix style bug: rename the refcount field of m_ext to ext_cnt, to match 2014-07-11 14:34:29 +00:00
ismt
isp Pass correct command that should be aborted to ISPCTL_ABORT_CMD. 2014-07-08 13:01:36 +00:00
ispfw
iwi
iwn Implement htprotmode handling. 2014-09-08 07:16:00 +00:00
ixgb Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
ixgbe The error bits are not valid with EOP=0; so intermediary fragments should 2014-09-15 20:54:12 +00:00
ixl Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
jme Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
joy
kbd
kbdmux
ksyms
le Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
led
lge All mbuf external free functions never fail, so let them be void. 2014-07-11 13:58:48 +00:00
lmc
malo Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
mbox
mc146818
mca
mcd
md For md(4), posix shm(3) and tmpfs(5), free swap space used by paged in 2014-07-28 14:27:05 +00:00
mem
mfi Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
mge Optim and Fix for mge driver: 2014-07-07 08:22:39 +00:00
mii Do not blindly announce 1000baseT half-duplex capability in 2014-09-04 01:04:37 +00:00
mk48txx
mlx
mly
mmc Export an mmc or sd card's serial number from the mmc layer as an ivar. 2014-07-31 16:54:54 +00:00
mn
mpr
mps Bring in LSI's phase19 changes 2014-07-30 18:21:06 +00:00
mpt
mrsas Fix for WITNESS warning while doing xpt_rescan. 2014-09-02 18:32:41 +00:00
mse
msk Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
mvs Initialize variables before resource_int_value(). 2014-09-12 12:04:51 +00:00
mwl All mbuf external free functions never fail, so let them be void. 2014-07-11 13:58:48 +00:00
mxge
my
nand Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
ncv
netfpga10g/nf10bmac Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
netmap Provide pointer from struct ifnet to struct netmap_adapter, 2014-08-31 11:33:19 +00:00
nfe It is actually possible to have if_t a typedef to non-void type, 2014-08-31 12:48:13 +00:00
nge Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
nmdm Fix issue with nmdm and leading zeros in device name. 2014-09-10 05:44:15 +00:00
nsp
ntb
null
nvd
nvme
nvram
nvram2env
nxge
oce Revert r271504. A new patch to solve this issue will be made. 2014-09-13 20:52:01 +00:00
ofw When registering an association between a device and an xref phandle, create 2014-09-06 18:43:17 +00:00
patm
pbio
pccard Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
pccbb For reasons which are not clear, r254263 broke some PCMCIA and CardBus 2014-08-03 21:56:53 +00:00
pcf
pci pci: add a new pci_child_added newbus method. 2014-08-22 15:05:51 +00:00
pcn
pdq
powermac_nvram
ppbus
ppc
proto
pst
pty
puc Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
qlxgb Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
qlxgbe Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
qlxge Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
quicc
ral
random Use Intel's official name (Secure Key) per Intel® Digital Random Number 2014-06-27 21:33:15 +00:00
rc
re Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
rndtest
rp
rt Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
safe Don't destroy bus_dma maps created by bus_dmamem_alloc(). In some cases, 2014-06-10 20:25:45 +00:00
sbni
scc
scd
sdhci - Nuke unused sdhci_softc. 2014-08-31 17:56:54 +00:00
sec
sf Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
sfxge
sge Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
si Fix build of si(4) and enable it in LINT on amd64 and i386. 2014-08-20 16:07:17 +00:00
siba
siis Initialize variables before resource_int_value(). 2014-09-12 12:04:51 +00:00
sio Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
sis Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
sk Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
smbus
smc Move if_smc_fdt.c to live in sys/dev/smc. It's not specific to the ARM 2014-09-10 10:59:17 +00:00
sn
snc
snp
sound Update mixer description for FastTrackPro. 2014-09-07 07:23:33 +00:00
speaker
spibus
ste Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
stg
stge Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
streams - Remove socket file operations declaration from sys/file.h. 2014-08-26 14:44:08 +00:00
sym Remove ia64. 2014-07-07 00:27:09 +00:00
syscons Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
tdfx
terasic Correct typo in comment 2014-07-29 14:41:28 +00:00
ti
tl
tpm
trm
tsec Rename OF_xref_phandle() to OF_node_from_xref() and add a new function 2014-09-01 18:51:01 +00:00
twa
twe
tws Free the static DMA buffer holding the command ring during detach as well 2014-07-01 18:24:54 +00:00
tx
txp Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
uart Do not fail the low-level device probe simply because the kernel 2014-07-26 17:49:40 +00:00
ubsec
usb Workaround for receiving Voice Calls using the E1750 dongle from 2014-09-12 22:40:12 +00:00
utopia
vge Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
viawd
virtio Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
vkbd
vmware/vmxnet3 Revert r271504. A new patch to solve this issue will be made. 2014-09-13 20:52:01 +00:00
vr Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
vt vt(4): Enclose vt_mouse_paste() prototype inside #ifndef SC_NO_CUTPASTE/#endif 2014-09-13 09:33:37 +00:00
vte
vx
vxge Use define from if_var.h to access a field inside struct if_data, 2014-08-30 19:55:54 +00:00
watchdog
wb All mbuf external free functions never fail, so let them be void. 2014-07-11 13:58:48 +00:00
wbwd
wds
wi Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED. 2014-01-08 08:06:56 +00:00
wl
wpi Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
wtap
xe
xen Revert r271504. A new patch to solve this issue will be made. 2014-09-13 20:52:01 +00:00
xl