diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2017-10-02 13:38:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-02 21:24:41 +0300 |
commit | 9fb1e654dcf781e71a0ea7c5bdfea3ba85d1d06d (patch) | |
tree | 3ea6a9dfd32a077b15c2a9accd974e8116dc25a4 /drivers/thunderbolt/nhi_regs.h | |
parent | 8c6bba10fb9262d7b3a11e86a40621d5b37810a6 (diff) | |
download | linux-9fb1e654dcf781e71a0ea7c5bdfea3ba85d1d06d.tar.xz |
thunderbolt: Add support for frame mode
When high-speed DMA paths are used to transfer arbitrary data over a
Thunderbolt link, DMA rings should be in frame mode instead of raw mode.
The latter is used by the control channel (ring 0). In frame mode each
data frame can hold up to 4kB payload.
This patch modifies the DMA ring code to allow configuring a ring to be
in frame mode by passing a new flag (RING_FLAG_FRAME) to the ring when
it is allocated. In addition there might be need to enable end-to-end
(E2E) workaround for the ring to prevent losing Rx frames in certain
situations. We add another flag (RING_FLAG_E2E) that can be used for
this purpose.
This code is based on the work done by Amir Levy and Michael Jamet.
Signed-off-by: Michael Jamet <michael.jamet@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/thunderbolt/nhi_regs.h')
-rw-r--r-- | drivers/thunderbolt/nhi_regs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/thunderbolt/nhi_regs.h b/drivers/thunderbolt/nhi_regs.h index 46eff69b19ad..491a4c0c18fc 100644 --- a/drivers/thunderbolt/nhi_regs.h +++ b/drivers/thunderbolt/nhi_regs.h @@ -77,6 +77,8 @@ struct ring_desc { * ..: unknown */ #define REG_RX_OPTIONS_BASE 0x29800 +#define REG_RX_OPTIONS_E2E_HOP_MASK GENMASK(22, 12) +#define REG_RX_OPTIONS_E2E_HOP_SHIFT 12 /* * three bitfields: tx, rx, rx overflow |