Lines Matching +full:route +full:- +full:ptp
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2018-2019, Vladimir Oltean <olteanv@gmail.com>
6 /* In the dynamic configuration interface, the switch exposes a register-like
13 * This file creates a per-switch-family abstraction called
15 * - sja1105_dynamic_config_write
16 * - sja1105_dynamic_config_read
25 * +-----------------------------------------+------------------+
27 * +-----------------------------------------+------------------+
29 * <----------------------- packed_size ------------------------>
33 * function is reused (bar exceptional cases - see
41 * The COMMAND BUFFER is always SJA1105_SIZE_DYN_CMD bytes (one 32-bit word) in
49 * - .entry_packing: A function that deals with packing an ENTRY structure
54 * - .cmd_packing: A function that deals with packing/unpacking the COMMAND
64 * or vice-versa (sja1105pqrs_l2_lookup_cmd_packing).
65 * - .access: A bitmap of:
79 * Only the TCAM-based FDB table on SJA1105 P/Q/R/S supports
84 * - .max_entry_count: The number of entries, counting from zero, that can be
89 * - .packed_size: The length in bytes of the compound ENTRY + COMMAND BUFFER.
94 * - .addr: The base SPI address at which the buffer must be written to the
97 * that of the COMMAND, since the other 32-bit words will follow along
204 sja1105_packing(buf, &cmd->valid, 31, 31, size, op); in sja1105et_vl_lookup_cmd_packing()
205 sja1105_packing(buf, &cmd->errors, 30, 30, size, op); in sja1105et_vl_lookup_cmd_packing()
206 sja1105_packing(buf, &cmd->rdwrset, 29, 29, size, op); in sja1105et_vl_lookup_cmd_packing()
207 sja1105_packing(buf, &cmd->index, 9, 0, size, op); in sja1105et_vl_lookup_cmd_packing()
218 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105pqrs_vl_lookup_cmd_packing()
219 sja1105_packing(p, &cmd->errors, 30, 30, size, op); in sja1105pqrs_vl_lookup_cmd_packing()
220 sja1105_packing(p, &cmd->rdwrset, 29, 29, size, op); in sja1105pqrs_vl_lookup_cmd_packing()
221 sja1105_packing(p, &cmd->index, 9, 0, size, op); in sja1105pqrs_vl_lookup_cmd_packing()
231 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1110_vl_lookup_cmd_packing()
232 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1110_vl_lookup_cmd_packing()
233 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1110_vl_lookup_cmd_packing()
234 sja1105_packing(p, &cmd->index, 11, 0, size, op); in sja1110_vl_lookup_cmd_packing()
243 sja1105_packing(buf, &entry->egrmirr, 21, 17, size, op); in sja1105et_vl_lookup_entry_packing()
244 sja1105_packing(buf, &entry->ingrmirr, 16, 16, size, op); in sja1105et_vl_lookup_entry_packing()
255 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1110_vl_policing_cmd_packing()
256 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1110_vl_policing_cmd_packing()
257 sja1105_packing(p, &cmd->index, 11, 0, size, op); in sja1110_vl_policing_cmd_packing()
268 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105pqrs_common_l2_lookup_cmd_packing()
269 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1105pqrs_common_l2_lookup_cmd_packing()
270 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1105pqrs_common_l2_lookup_cmd_packing()
271 sja1105_packing(p, &cmd->valident, 27, 27, size, op); in sja1105pqrs_common_l2_lookup_cmd_packing()
274 * using it to delete a management route was unsupported. UM10944 in sja1105pqrs_common_l2_lookup_cmd_packing()
291 * at the same time achieve compatibility with the management route in sja1105pqrs_common_l2_lookup_cmd_packing()
294 if (cmd->rdwrset == SPI_READ) { in sja1105pqrs_common_l2_lookup_cmd_packing()
295 if (cmd->search) in sja1105pqrs_common_l2_lookup_cmd_packing()
301 if (cmd->valident) in sja1105pqrs_common_l2_lookup_cmd_packing()
317 /* Hack - The hardware takes the 'index' field within in sja1105pqrs_l2_lookup_cmd_packing()
322 * such that our API doesn't need to ask for a full-blown entry in sja1105pqrs_l2_lookup_cmd_packing()
325 sja1105_packing(buf, &cmd->index, 15, 6, entry_size, op); in sja1105pqrs_l2_lookup_cmd_packing()
336 sja1105_packing(buf, &cmd->index, 10, 1, entry_size, op); in sja1110_l2_lookup_cmd_packing()
371 * only if it's dynamically learned" <- well how am I supposed to know?) and
376 * entry-related data as writeback through the command buffer.
381 * a peek outside of the caller-supplied @buf (the entry buffer), to reach the
392 sja1105_packing(cmd, &entry->lockeds, 28, 28, size, op); in sja1105pqrs_dyn_l2_lookup_entry_packing()
404 sja1105_packing(cmd, &entry->lockeds, 28, 28, size, op); in sja1110_dyn_l2_lookup_entry_packing()
416 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105et_l2_lookup_cmd_packing()
417 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1105et_l2_lookup_cmd_packing()
418 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1105et_l2_lookup_cmd_packing()
419 sja1105_packing(p, &cmd->valident, 27, 27, size, op); in sja1105et_l2_lookup_cmd_packing()
420 /* Hack - see comments above. */ in sja1105et_l2_lookup_cmd_packing()
421 sja1105_packing(buf, &cmd->index, 29, 20, in sja1105et_l2_lookup_cmd_packing()
432 sja1105_packing(cmd, &entry->lockeds, 28, 28, size, op); in sja1105et_dyn_l2_lookup_entry_packing()
455 /* UM10944: To specify if a PTP egress timestamp shall be captured on in sja1105et_mgmt_route_entry_packing()
461 sja1105_packing(buf, &entry->tsreg, 85, 85, size, op); in sja1105et_mgmt_route_entry_packing()
462 sja1105_packing(buf, &entry->takets, 84, 84, size, op); in sja1105et_mgmt_route_entry_packing()
463 sja1105_packing(buf, &entry->macaddr, 83, 36, size, op); in sja1105et_mgmt_route_entry_packing()
464 sja1105_packing(buf, &entry->destports, 35, 31, size, op); in sja1105et_mgmt_route_entry_packing()
465 sja1105_packing(buf, &entry->enfport, 30, 30, size, op); in sja1105et_mgmt_route_entry_packing()
491 sja1105_packing(buf, &entry->tsreg, 71, 71, size, op); in sja1105pqrs_mgmt_route_entry_packing()
492 sja1105_packing(buf, &entry->takets, 70, 70, size, op); in sja1105pqrs_mgmt_route_entry_packing()
493 sja1105_packing(buf, &entry->macaddr, 69, 22, size, op); in sja1105pqrs_mgmt_route_entry_packing()
494 sja1105_packing(buf, &entry->destports, 21, 17, size, op); in sja1105pqrs_mgmt_route_entry_packing()
495 sja1105_packing(buf, &entry->enfport, 16, 16, size, op); in sja1105pqrs_mgmt_route_entry_packing()
499 /* In E/T, entry is at addresses 0x27-0x28. There is a 4 byte gap at 0x29,
510 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105_vlan_lookup_cmd_packing()
511 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1105_vlan_lookup_cmd_packing()
512 sja1105_packing(p, &cmd->valident, 27, 27, size, op); in sja1105_vlan_lookup_cmd_packing()
513 /* Hack - see comments above, applied for 'vlanid' field of in sja1105_vlan_lookup_cmd_packing()
516 sja1105_packing(buf, &cmd->index, 38, 27, in sja1105_vlan_lookup_cmd_packing()
529 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1110_vlan_lookup_cmd_packing()
530 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1110_vlan_lookup_cmd_packing()
531 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1110_vlan_lookup_cmd_packing()
533 * cmd->index. in sja1110_vlan_lookup_cmd_packing()
535 sja1105_packing(buf, &cmd->index, 38, 27, in sja1110_vlan_lookup_cmd_packing()
540 * This is a hack to transform the non-zero quality of the TYPE_ENTRY in sja1110_vlan_lookup_cmd_packing()
543 if (op == PACK && !cmd->valident) { in sja1110_vlan_lookup_cmd_packing()
549 cmd->valident = !!type_entry; in sja1110_vlan_lookup_cmd_packing()
560 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105_l2_forwarding_cmd_packing()
561 sja1105_packing(p, &cmd->errors, 30, 30, size, op); in sja1105_l2_forwarding_cmd_packing()
562 sja1105_packing(p, &cmd->rdwrset, 29, 29, size, op); in sja1105_l2_forwarding_cmd_packing()
563 sja1105_packing(p, &cmd->index, 4, 0, size, op); in sja1105_l2_forwarding_cmd_packing()
573 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1110_l2_forwarding_cmd_packing()
574 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1110_l2_forwarding_cmd_packing()
575 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1110_l2_forwarding_cmd_packing()
576 sja1105_packing(p, &cmd->index, 4, 0, size, op); in sja1110_l2_forwarding_cmd_packing()
587 sja1105_packing(reg1, &cmd->valid, 31, 31, size, op); in sja1105et_mac_config_cmd_packing()
588 sja1105_packing(reg1, &cmd->index, 26, 24, size, op); in sja1105et_mac_config_cmd_packing()
600 sja1105_packing(reg1, &entry->speed, 30, 29, size, op); in sja1105et_mac_config_entry_packing()
601 sja1105_packing(reg1, &entry->drpdtag, 23, 23, size, op); in sja1105et_mac_config_entry_packing()
602 sja1105_packing(reg1, &entry->drpuntag, 22, 22, size, op); in sja1105et_mac_config_entry_packing()
603 sja1105_packing(reg1, &entry->retag, 21, 21, size, op); in sja1105et_mac_config_entry_packing()
604 sja1105_packing(reg1, &entry->dyn_learn, 20, 20, size, op); in sja1105et_mac_config_entry_packing()
605 sja1105_packing(reg1, &entry->egress, 19, 19, size, op); in sja1105et_mac_config_entry_packing()
606 sja1105_packing(reg1, &entry->ingress, 18, 18, size, op); in sja1105et_mac_config_entry_packing()
607 sja1105_packing(reg1, &entry->ing_mirr, 17, 17, size, op); in sja1105et_mac_config_entry_packing()
608 sja1105_packing(reg1, &entry->egr_mirr, 16, 16, size, op); in sja1105et_mac_config_entry_packing()
609 sja1105_packing(reg1, &entry->vlanprio, 14, 12, size, op); in sja1105et_mac_config_entry_packing()
610 sja1105_packing(reg1, &entry->vlanid, 11, 0, size, op); in sja1105et_mac_config_entry_packing()
611 sja1105_packing(reg2, &entry->tp_delin, 31, 16, size, op); in sja1105et_mac_config_entry_packing()
612 sja1105_packing(reg2, &entry->tp_delout, 15, 0, size, op); in sja1105et_mac_config_entry_packing()
627 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105pqrs_mac_config_cmd_packing()
628 sja1105_packing(p, &cmd->errors, 30, 30, size, op); in sja1105pqrs_mac_config_cmd_packing()
629 sja1105_packing(p, &cmd->rdwrset, 29, 29, size, op); in sja1105pqrs_mac_config_cmd_packing()
630 sja1105_packing(p, &cmd->index, 2, 0, size, op); in sja1105pqrs_mac_config_cmd_packing()
640 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1110_mac_config_cmd_packing()
641 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1110_mac_config_cmd_packing()
642 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1110_mac_config_cmd_packing()
643 sja1105_packing(p, &cmd->index, 3, 0, size, op); in sja1110_mac_config_cmd_packing()
650 sja1105_packing(buf, &cmd->valid, 31, 31, in sja1105et_l2_lookup_params_cmd_packing()
660 sja1105_packing(buf, &entry->poly, 7, 0, in sja1105et_l2_lookup_params_entry_packing()
674 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105pqrs_l2_lookup_params_cmd_packing()
675 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1105pqrs_l2_lookup_params_cmd_packing()
685 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1110_l2_lookup_params_cmd_packing()
686 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1110_l2_lookup_params_cmd_packing()
687 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1110_l2_lookup_params_cmd_packing()
696 sja1105_packing(buf, &cmd->valid, 31, 31, size, op); in sja1105et_general_params_cmd_packing()
697 sja1105_packing(buf, &cmd->errors, 30, 30, size, op); in sja1105et_general_params_cmd_packing()
707 sja1105_packing(buf, &entry->mirr_port, 2, 0, size, op); in sja1105et_general_params_entry_packing()
719 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105pqrs_general_params_cmd_packing()
720 sja1105_packing(p, &cmd->errors, 30, 30, size, op); in sja1105pqrs_general_params_cmd_packing()
721 sja1105_packing(p, &cmd->rdwrset, 28, 28, size, op); in sja1105pqrs_general_params_cmd_packing()
731 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1110_general_params_cmd_packing()
732 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1110_general_params_cmd_packing()
733 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1110_general_params_cmd_packing()
743 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105pqrs_avb_params_cmd_packing()
744 sja1105_packing(p, &cmd->errors, 30, 30, size, op); in sja1105pqrs_avb_params_cmd_packing()
745 sja1105_packing(p, &cmd->rdwrset, 29, 29, size, op); in sja1105pqrs_avb_params_cmd_packing()
755 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105_retagging_cmd_packing()
756 sja1105_packing(p, &cmd->errors, 30, 30, size, op); in sja1105_retagging_cmd_packing()
757 sja1105_packing(p, &cmd->valident, 29, 29, size, op); in sja1105_retagging_cmd_packing()
758 sja1105_packing(p, &cmd->rdwrset, 28, 28, size, op); in sja1105_retagging_cmd_packing()
759 sja1105_packing(p, &cmd->index, 5, 0, size, op); in sja1105_retagging_cmd_packing()
769 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1110_retagging_cmd_packing()
770 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1110_retagging_cmd_packing()
771 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1110_retagging_cmd_packing()
772 sja1105_packing(p, &cmd->valident, 28, 28, size, op); in sja1110_retagging_cmd_packing()
773 sja1105_packing(p, &cmd->index, 4, 0, size, op); in sja1110_retagging_cmd_packing()
782 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105et_cbs_cmd_packing()
783 sja1105_packing(p, &cmd->index, 19, 16, size, op); in sja1105et_cbs_cmd_packing()
794 sja1105_packing(cmd, &entry->port, 5, 3, SJA1105_SIZE_DYN_CMD, op); in sja1105et_cbs_entry_packing()
795 sja1105_packing(cmd, &entry->prio, 2, 0, SJA1105_SIZE_DYN_CMD, op); in sja1105et_cbs_entry_packing()
796 sja1105_packing(p + 3, &entry->credit_lo, 31, 0, size, op); in sja1105et_cbs_entry_packing()
797 sja1105_packing(p + 2, &entry->credit_hi, 31, 0, size, op); in sja1105et_cbs_entry_packing()
798 sja1105_packing(p + 1, &entry->send_slope, 31, 0, size, op); in sja1105et_cbs_entry_packing()
799 sja1105_packing(p + 0, &entry->idle_slope, 31, 0, size, op); in sja1105et_cbs_entry_packing()
809 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1105pqrs_cbs_cmd_packing()
810 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1105pqrs_cbs_cmd_packing()
811 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1105pqrs_cbs_cmd_packing()
812 sja1105_packing(p, &cmd->index, 3, 0, size, op); in sja1105pqrs_cbs_cmd_packing()
821 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1110_cbs_cmd_packing()
822 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1110_cbs_cmd_packing()
823 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1110_cbs_cmd_packing()
824 sja1105_packing(p, &cmd->index, 7, 0, size, op); in sja1110_cbs_cmd_packing()
833 sja1105_packing(buf, &entry->port, 159, 157, size, op); in sja1105pqrs_cbs_entry_packing()
834 sja1105_packing(buf, &entry->prio, 156, 154, size, op); in sja1105pqrs_cbs_entry_packing()
835 sja1105_packing(buf, &entry->credit_lo, 153, 122, size, op); in sja1105pqrs_cbs_entry_packing()
836 sja1105_packing(buf, &entry->credit_hi, 121, 90, size, op); in sja1105pqrs_cbs_entry_packing()
837 sja1105_packing(buf, &entry->send_slope, 89, 58, size, op); in sja1105pqrs_cbs_entry_packing()
838 sja1105_packing(buf, &entry->idle_slope, 57, 26, size, op); in sja1105pqrs_cbs_entry_packing()
850 sja1105_packing(buf, &entry->credit_lo, 151, 120, size, op); in sja1110_cbs_entry_packing()
851 sja1105_packing(buf, &entry->credit_hi, 119, 88, size, op); in sja1110_cbs_entry_packing()
852 sja1105_packing(buf, &entry->send_slope, 87, 56, size, op); in sja1110_cbs_entry_packing()
853 sja1105_packing(buf, &entry->idle_slope, 55, 24, size, op); in sja1110_cbs_entry_packing()
869 sja1105_packing(p, &cmd->valid, 31, 31, size, op); in sja1110_l2_policing_cmd_packing()
870 sja1105_packing(p, &cmd->rdwrset, 30, 30, size, op); in sja1110_l2_policing_cmd_packing()
871 sja1105_packing(p, &cmd->errors, 29, 29, size, op); in sja1110_l2_policing_cmd_packing()
872 sja1105_packing(p, &cmd->index, 6, 0, size, op); in sja1110_l2_policing_cmd_packing()
1187 rc = sja1105_xfer_buf(priv, SPI_READ, ops->addr, packed_buf, in sja1105_dynamic_config_poll_valid()
1188 ops->packed_size); in sja1105_dynamic_config_poll_valid()
1195 ops->cmd_packing(packed_buf, &cmd, UNPACK); in sja1105_dynamic_config_poll_valid()
1199 return -EAGAIN; in sja1105_dynamic_config_poll_valid()
1201 if (check_valident && !cmd.valident && !(ops->access & OP_VALID_ANYWAY)) in sja1105_dynamic_config_poll_valid()
1202 return -ENOENT; in sja1105_dynamic_config_poll_valid()
1205 return -EINVAL; in sja1105_dynamic_config_poll_valid()
1207 /* Don't dereference possibly NULL pointer - maybe caller in sja1105_dynamic_config_poll_valid()
1211 ops->entry_packing(packed_buf, entry, UNPACK); in sja1105_dynamic_config_poll_valid()
1229 rc, rc != -EAGAIN, in sja1105_dynamic_config_wait_complete()
1245 * @entry Type-casted to an unpacked structure that holds a table entry
1248 * argument is used as input/output: it should be pre-populated
1252 * will be returned (or left unmodified - thus negative - if not
1266 return -ERANGE; in sja1105_dynamic_config_read()
1268 ops = &priv->info->dyn_ops[blk_idx]; in sja1105_dynamic_config_read()
1270 if (index >= 0 && index >= ops->max_entry_count) in sja1105_dynamic_config_read()
1271 return -ERANGE; in sja1105_dynamic_config_read()
1272 if (index < 0 && !(ops->access & OP_SEARCH)) in sja1105_dynamic_config_read()
1273 return -EOPNOTSUPP; in sja1105_dynamic_config_read()
1274 if (!(ops->access & OP_READ)) in sja1105_dynamic_config_read()
1275 return -EOPNOTSUPP; in sja1105_dynamic_config_read()
1276 if (ops->packed_size > SJA1105_MAX_DYN_CMD_SIZE) in sja1105_dynamic_config_read()
1277 return -ERANGE; in sja1105_dynamic_config_read()
1278 if (!ops->cmd_packing) in sja1105_dynamic_config_read()
1279 return -EOPNOTSUPP; in sja1105_dynamic_config_read()
1280 if (!ops->entry_packing) in sja1105_dynamic_config_read()
1281 return -EOPNOTSUPP; in sja1105_dynamic_config_read()
1294 ops->cmd_packing(packed_buf, &cmd, PACK); in sja1105_dynamic_config_read()
1297 ops->entry_packing(packed_buf, entry, PACK); in sja1105_dynamic_config_read()
1300 mutex_lock(&priv->dynamic_config_lock); in sja1105_dynamic_config_read()
1301 rc = sja1105_xfer_buf(priv, SPI_WRITE, ops->addr, packed_buf, in sja1105_dynamic_config_read()
1302 ops->packed_size); in sja1105_dynamic_config_read()
1308 mutex_unlock(&priv->dynamic_config_lock); in sja1105_dynamic_config_read()
1324 return -ERANGE; in sja1105_dynamic_config_write()
1326 ops = &priv->info->dyn_ops[blk_idx]; in sja1105_dynamic_config_write()
1328 if (index >= ops->max_entry_count) in sja1105_dynamic_config_write()
1329 return -ERANGE; in sja1105_dynamic_config_write()
1331 return -ERANGE; in sja1105_dynamic_config_write()
1332 if (!(ops->access & OP_WRITE)) in sja1105_dynamic_config_write()
1333 return -EOPNOTSUPP; in sja1105_dynamic_config_write()
1334 if (!keep && !(ops->access & OP_DEL)) in sja1105_dynamic_config_write()
1335 return -EOPNOTSUPP; in sja1105_dynamic_config_write()
1336 if (ops->packed_size > SJA1105_MAX_DYN_CMD_SIZE) in sja1105_dynamic_config_write()
1337 return -ERANGE; in sja1105_dynamic_config_write()
1344 if (!ops->cmd_packing) in sja1105_dynamic_config_write()
1345 return -EOPNOTSUPP; in sja1105_dynamic_config_write()
1346 ops->cmd_packing(packed_buf, &cmd, PACK); in sja1105_dynamic_config_write()
1348 if (!ops->entry_packing) in sja1105_dynamic_config_write()
1349 return -EOPNOTSUPP; in sja1105_dynamic_config_write()
1356 ops->entry_packing(packed_buf, entry, PACK); in sja1105_dynamic_config_write()
1359 mutex_lock(&priv->dynamic_config_lock); in sja1105_dynamic_config_write()
1360 rc = sja1105_xfer_buf(priv, SPI_WRITE, ops->addr, packed_buf, in sja1105_dynamic_config_write()
1361 ops->packed_size); in sja1105_dynamic_config_write()
1367 mutex_unlock(&priv->dynamic_config_lock); in sja1105_dynamic_config_write()
1388 /* CRC8 algorithm with non-reversed input, non-reversed output,
1397 priv->static_config.tables[BLK_IDX_L2_LOOKUP_PARAMS].entries; in sja1105et_fdb_hash()
1398 u64 input, poly_koopman = l2_lookup_params->poly; in sja1105et_fdb_hash()
1407 for (i = 56; i >= 0; i -= 8) { in sja1105et_fdb_hash()