mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-01 22:37:41 -04:00
Compare commits
4 Commits
30fe3f5f64
...
fa6e249633
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa6e249633 | ||
|
|
47ab2c12c8 | ||
|
|
d1978d03e8 | ||
|
|
393e0b4f17 |
@@ -105,7 +105,7 @@
|
||||
#define XAXIDMA_BD_HAS_DRE_MASK 0xF00 /* Whether has DRE mask */
|
||||
#define XAXIDMA_BD_WORDLEN_MASK 0xFF /* Whether has DRE mask */
|
||||
|
||||
#define XAXIDMA_BD_CTRL_LENGTH_MASK 0x007FFFFF /* Requested len */
|
||||
#define XAXIDMA_BD_CTRL_LENGTH_MASK GENMASK(25, 0) /* Requested len */
|
||||
#define XAXIDMA_BD_CTRL_TXSOF_MASK 0x08000000 /* First tx packet */
|
||||
#define XAXIDMA_BD_CTRL_TXEOF_MASK 0x04000000 /* Last tx packet */
|
||||
#define XAXIDMA_BD_CTRL_ALL_MASK 0x0C000000 /* All control bits */
|
||||
@@ -130,7 +130,7 @@
|
||||
#define XAXIDMA_BD_CTRL_TXEOF_MASK 0x04000000 /* Last tx packet */
|
||||
#define XAXIDMA_BD_CTRL_ALL_MASK 0x0C000000 /* All control bits */
|
||||
|
||||
#define XAXIDMA_BD_STS_ACTUAL_LEN_MASK 0x007FFFFF /* Actual len */
|
||||
#define XAXIDMA_BD_STS_ACTUAL_LEN_MASK GENMASK(25, 0) /* Actual len */
|
||||
#define XAXIDMA_BD_STS_COMPLETE_MASK 0x80000000 /* Completed */
|
||||
#define XAXIDMA_BD_STS_DEC_ERR_MASK 0x40000000 /* Decode error */
|
||||
#define XAXIDMA_BD_STS_SLV_ERR_MASK 0x20000000 /* Slave error */
|
||||
|
||||
@@ -770,8 +770,8 @@ static int axienet_device_reset(struct net_device *ndev)
|
||||
* @first_bd: Index of first descriptor to clean up
|
||||
* @nr_bds: Max number of descriptors to clean up
|
||||
* @force: Whether to clean descriptors even if not complete
|
||||
* @sizep: Pointer to a u32 filled with the total sum of all bytes
|
||||
* in all cleaned-up descriptors. Ignored if NULL.
|
||||
* @sizep: Pointer to a u32 accumulating the total byte count of
|
||||
* completed packets (using skb->len). Ignored if NULL.
|
||||
* @budget: NAPI budget (use 0 when not called from NAPI poll)
|
||||
*
|
||||
* Would either be called after a successful transmit operation, or after
|
||||
@@ -805,6 +805,8 @@ static int axienet_free_tx_chain(struct axienet_local *lp, u32 first_bd,
|
||||
DMA_TO_DEVICE);
|
||||
|
||||
if (cur_p->skb && (status & XAXIDMA_BD_STS_COMPLETE_MASK)) {
|
||||
if (sizep)
|
||||
*sizep += cur_p->skb->len;
|
||||
napi_consume_skb(cur_p->skb, budget);
|
||||
packets++;
|
||||
}
|
||||
@@ -818,9 +820,6 @@ static int axienet_free_tx_chain(struct axienet_local *lp, u32 first_bd,
|
||||
wmb();
|
||||
cur_p->cntrl = 0;
|
||||
cur_p->status = 0;
|
||||
|
||||
if (sizep)
|
||||
*sizep += status & XAXIDMA_BD_STS_ACTUAL_LEN_MASK;
|
||||
}
|
||||
|
||||
if (!force) {
|
||||
|
||||
@@ -196,7 +196,7 @@ static const struct nla_policy
|
||||
br_mrp_start_test_policy[IFLA_BRIDGE_MRP_START_TEST_MAX + 1] = {
|
||||
[IFLA_BRIDGE_MRP_START_TEST_UNSPEC] = { .type = NLA_REJECT },
|
||||
[IFLA_BRIDGE_MRP_START_TEST_RING_ID] = { .type = NLA_U32 },
|
||||
[IFLA_BRIDGE_MRP_START_TEST_INTERVAL] = { .type = NLA_U32 },
|
||||
[IFLA_BRIDGE_MRP_START_TEST_INTERVAL] = NLA_POLICY_MIN(NLA_U32, 1),
|
||||
[IFLA_BRIDGE_MRP_START_TEST_MAX_MISS] = { .type = NLA_U32 },
|
||||
[IFLA_BRIDGE_MRP_START_TEST_PERIOD] = { .type = NLA_U32 },
|
||||
[IFLA_BRIDGE_MRP_START_TEST_MONITOR] = { .type = NLA_U32 },
|
||||
@@ -316,7 +316,7 @@ static const struct nla_policy
|
||||
br_mrp_start_in_test_policy[IFLA_BRIDGE_MRP_START_IN_TEST_MAX + 1] = {
|
||||
[IFLA_BRIDGE_MRP_START_IN_TEST_UNSPEC] = { .type = NLA_REJECT },
|
||||
[IFLA_BRIDGE_MRP_START_IN_TEST_IN_ID] = { .type = NLA_U32 },
|
||||
[IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL] = { .type = NLA_U32 },
|
||||
[IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL] = NLA_POLICY_MIN(NLA_U32, 1),
|
||||
[IFLA_BRIDGE_MRP_START_IN_TEST_MAX_MISS] = { .type = NLA_U32 },
|
||||
[IFLA_BRIDGE_MRP_START_IN_TEST_PERIOD] = { .type = NLA_U32 },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user