hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/net/ethernet/freescale/fman/fman_port.c
....@@ -435,7 +435,6 @@
435435
436436 struct fman_port_rx_pools_params {
437437 u8 num_of_pools;
438
- u16 second_largest_buf_size;
439438 u16 largest_buf_size;
440439 };
441440
....@@ -946,8 +945,6 @@
946945 port->rx_pools_params.num_of_pools = ext_buf_pools->num_of_pools_used;
947946 port->rx_pools_params.largest_buf_size =
948947 sizes_array[ordered_array[ext_buf_pools->num_of_pools_used - 1]];
949
- port->rx_pools_params.second_largest_buf_size =
950
- sizes_array[ordered_array[ext_buf_pools->num_of_pools_used - 2]];
951948
952949 /* FMBM_RMPD reg. - pool depletion */
953950 if (buf_pool_depletion->pools_grp_mode_enable) {
....@@ -1347,10 +1344,10 @@
13471344 switch (port->port_type) {
13481345 case FMAN_PORT_TYPE_RX:
13491346 set_rx_dflt_cfg(port, params);
1350
- /* fall through */
1347
+ fallthrough;
13511348 case FMAN_PORT_TYPE_TX:
13521349 set_tx_dflt_cfg(port, params, &port->dts_params);
1353
- /* fall through */
1350
+ fallthrough;
13541351 default:
13551352 set_dflt_cfg(port, params);
13561353 }
....@@ -1413,9 +1410,11 @@
14131410 }
14141411 EXPORT_SYMBOL(fman_port_config);
14151412
1416
-/**
1413
+/*
14171414 * fman_port_use_kg_hash
1418
- * port: A pointer to a FM Port module.
1415
+ * @port: A pointer to a FM Port module.
1416
+ * @enable: enable or disable
1417
+ *
14191418 * Sets the HW KeyGen or the BMI as HW Parser next engine, enabling
14201419 * or bypassing the KeyGen hashing of Rx traffic
14211420 */
....@@ -1433,7 +1432,8 @@
14331432
14341433 /**
14351434 * fman_port_init
1436
- * port: A pointer to a FM Port module.
1435
+ * @port: A pointer to a FM Port module.
1436
+ *
14371437 * Initializes the FM PORT module by defining the software structure and
14381438 * configuring the hardware registers.
14391439 *
....@@ -1527,8 +1527,8 @@
15271527
15281528 /**
15291529 * fman_port_cfg_buf_prefix_content
1530
- * @port A pointer to a FM Port module.
1531
- * @buffer_prefix_content A structure of parameters describing
1530
+ * @port: A pointer to a FM Port module.
1531
+ * @buffer_prefix_content: A structure of parameters describing
15321532 * the structure of the buffer.
15331533 * Out parameter:
15341534 * Start margin - offset of data from
....@@ -1573,7 +1573,7 @@
15731573
15741574 /**
15751575 * fman_port_disable
1576
- * port: A pointer to a FM Port module.
1576
+ * @port: A pointer to a FM Port module.
15771577 *
15781578 * Gracefully disable an FM port. The port will not start new tasks after all
15791579 * tasks associated with the port are terminated.
....@@ -1654,7 +1654,7 @@
16541654
16551655 /**
16561656 * fman_port_enable
1657
- * port: A pointer to a FM Port module.
1657
+ * @port: A pointer to a FM Port module.
16581658 *
16591659 * A runtime routine provided to allow disable/enable of port.
16601660 *
....@@ -1700,7 +1700,7 @@
17001700
17011701 /**
17021702 * fman_port_bind
1703
- * dev: FMan Port OF device pointer
1703
+ * @dev: FMan Port OF device pointer
17041704 *
17051705 * Bind to a specific FMan Port.
17061706 *
....@@ -1716,7 +1716,7 @@
17161716
17171717 /**
17181718 * fman_port_get_qman_channel_id
1719
- * port: Pointer to the FMan port devuce
1719
+ * @port: Pointer to the FMan port devuce
17201720 *
17211721 * Get the QMan channel ID for the specific port
17221722 *
....@@ -1728,6 +1728,20 @@
17281728 }
17291729 EXPORT_SYMBOL(fman_port_get_qman_channel_id);
17301730
1731
+/**
1732
+ * fman_port_get_device
1733
+ * @port: Pointer to the FMan port device
1734
+ *
1735
+ * Get the 'struct device' associated to the specified FMan port device
1736
+ *
1737
+ * Return: pointer to associated 'struct device'
1738
+ */
1739
+struct device *fman_port_get_device(struct fman_port *port)
1740
+{
1741
+ return port->dev;
1742
+}
1743
+EXPORT_SYMBOL(fman_port_get_device);
1744
+
17311745 int fman_port_get_hash_result_offset(struct fman_port *port, u32 *offset)
17321746 {
17331747 if (port->buffer_offsets.hash_result_offset == ILLEGAL_BASE)