summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Schmitt <B43082@freescale.com>2014-10-22 18:29:59 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:35:27 (GMT)
commit49d038003ed9b132a02c9cfcd565d85b27dfe324 (patch)
treecb788aff159f71ba26b18a87a4c2a556d10b272d
parentcb9d1ef0be2456590c5fb8e26699129caf4909be (diff)
parent3844262a023733d888bb388c6e81271058a26ea9 (diff)
downloadlinux-fsl-qoriq-49d038003ed9b132a02c9cfcd565d85b27dfe324.tar.xz
Merge commit '60cce3da4a8393d1e15bf1a9dbe3956a8aaabbaf'
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/fman_chosen_node_device_tree.txt85
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi138
-rw-r--r--arch/powerpc/boot/dts/fsl/t1040si-post.dtsi2
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c25
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth.h8
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c10
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_generic.c21
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_macless.c10
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c10
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c13
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_ethtool.c32
-rw-r--r--drivers/net/ethernet/freescale/dpa/mac-api.c44
-rw-r--r--drivers/net/ethernet/freescale/dpa/mac.c20
-rw-r--r--drivers/net/ethernet/freescale/dpa/mac.h12
-rw-r--r--drivers/net/ethernet/freescale/dpa/offline_port.c22
-rw-r--r--drivers/net/ethernet/freescale/dpa/offline_port.h2
-rw-r--r--drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c5
-rwxr-xr-xdrivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fman_port.c6
-rw-r--r--drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fsl_fman.h2
-rwxr-xr-xdrivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm.c2
-rw-r--r--drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_sysfs_fm.h2
21 files changed, 331 insertions, 140 deletions
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman_chosen_node_device_tree.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman_chosen_node_device_tree.txt
index 7d160fb..86f6dac 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/fman_chosen_node_device_tree.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/fman_chosen_node_device_tree.txt
@@ -7,6 +7,7 @@ CONTENTS
- FMan Extended Args Node
- FMan-Port Extended Args Node
- Example
+ - General note on FMan internal resources
NOTE: The bindings described in this document are preliminary and subject to change.
@@ -40,12 +41,26 @@ PROPERTIES
Definition: Sets the AID mode.
The optional values are "port" and "tnum".
+ - total-fifo-size
+ Usage: optional
+ Value type: <u32>
+ Definition: Specifies the total space allocated for data FIFOs.
+ This attribute could be used when tuning the fman block.
+ It might be needed when expecting heavy traffic load and
+ then an increased value is required.
+ The extra-space will be taken from the PCD space portion
+ which means less space for classification patterns.
+ More information can be found in the note below -
+ "FMan Internal Resources".
+
+
Example
fman1-extd-args {
cell-index = <1>;
compatible = "fsl,fman-extended-args";
dma-aid-mode = "port";
+ total-fifo-size = <0x27000>;
};
=================================================================================
@@ -103,7 +118,7 @@ PROPERTIES
Usage: optional
Value type: <prop-encoded-array>
Definition: Specifies the fifo size required (first value)
- as well as the extra size required (second value).
+ as well as the required excessive buffer size (second value).
In the fman-port case "fifo-size" represent the size of memory (in bytes)
that the Fman controller allocates to handle the appropriate port
RX or TX activities.
@@ -175,7 +190,7 @@ fman1_rx4-extd-args {
errors-to-discard = <0x00020000>;
};
-=================================================================================
+===============================================================================
Example
chosen {
@@ -209,3 +224,69 @@ chosen {
};
};
};
+
+===============================================================================
+FMan Internal Resources
+
+The FMan internal resources are: FIFO buffers, number of open DMA lines,
+number of tasks (TNUMs), excessive buffer size, shared extra TNUMs and
+shared extra DMAs.
+
+FIFO allocation size ("total-fifo-size"):
+The P2/P3/P4/P5 devices have 160KB total size of MURAM.
+The MURAM resource has two consumers: the FIFOs and the microcode.
+In the FMan driver we reserve by default 32KB for the coarse-classification
+microcode and the rest of the 128KB are reserved for the ports FIFOs data.
+
+There are 4 types of ports ("fifo-size"): 10G, 1G, host command and
+Offline Parsing (O/H). Each one requires reservation of FIFOs space
+on the RX and on the TX sides. In addition there is a general space reservation
+called Excessive Buffer Size (Excessive Buffer Size: When Rx port FIFO size
+exceeds its max value BMI may allocate additional internal buffers to avoid
+frames discard) Default initialization values for committed FIFO sizes are:
+
+10G Tx Ports: 16KB for all ports
+10G Rx Ports: 16KB for regular ports
+ (if largest buffer pool is larger than 14K, fifo size should be
+ ((largest buffer pool size rounded up to 256) +1792)).
+1G Tx Ports: 4KB for regular frames (assuming 'dequeue pipeline depth' <= 2)
+ 11008B for regular ports using jumbo frames.
+1G Rx Ports: 4KB for regular ports (unless largest buffer pool is larger than
+ 2304B, in which case FIFO should be:
+ ((largest buffer pool size rounded up to 256) +1792)).
+O/H Ports: 1536B (assuming 'dequeue pipeline depth' <= 2)
+
+Default initialization value for Rx ports excessive FIFO size is:
+16KB of excessive buffer size.
+
+Tasks allocation ("num-tnums"):
+Committed number of tnums is defined per port and specifies the maximum number
+of concurrent tasks that the port can create. The total number of committed
+tnums for all ports should not exceed the total number of tnums defined for
+the whole FMan block. There's a max number of 128 tnums per FM. By default,
+the total number is configured to be 96. When a port reached its max number
+of committed tasks, the BMI, if configured accordingly, may allocate
+extra tnums to the port in order to ease its stress.
+The committed number of tnums (and excessive tnums) are initialized by default:
+with the following values:
+10G Rx/Tx Ports: 16 (8)
+1G Rx/Tx Ports: 3 (2)
+Offline parsing ports: 3 (2)
+Host command ports: 1 (0)
+
+Number of open DMAs allocation ("num-dmas")
+The number of open DMAs is defined per port and specifies the number of maximum
+outstanding DMA requests allowed. The total number of committed open DMAs
+for all ports should not exceed the total number of open DMAs defined for
+the whole FM. There's a max number of 32 open DMA's per FM. By default,
+the total number is configured to be 24. When a port reached its max DMA
+transactions, the BMI may allocate extra DMA to the port (if configured to
+do so) in order to ease its stress.
+
+The committed number of DMAs (and excessive dmas) is initialized by default
+with the following values:
+10G Rx Port: 4 (8)
+10G Tx Port: 10 (8)
+1G Rx/Tx Ports: 1 (1)
+Offline parsing ports: 1 (1)
+Host command ports: 1 (0)
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi
new file mode 100644
index 0000000..2f4aa48
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi
@@ -0,0 +1,138 @@
+/*
+ * QorIQ FMan v3 device tree stub [ controller @ offset 0x400000 ]
+ *
+ * Copyright 2012 Freescale Semiconductor Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Freescale Semiconductor nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") as published by the Free Software
+ * Foundation, either version 2 of that License or (at your option) any
+ * later version.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+fman0: fman@400000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ cell-index = <0>;
+ compatible = "fsl,fman", "simple-bus";
+ ranges = <0 0x400000 0x100000>;
+ reg = <0x400000 0x100000>;
+ clock-frequency = <0>;
+ interrupts = <
+ 96 2 0 0
+ 16 2 1 1>;
+
+ cc {
+ compatible = "fsl,fman-cc";
+ };
+
+ muram@0 {
+ compatible = "fsl,fman-muram";
+ reg = <0x0 0x30000>;
+ };
+
+ bmi@80000 {
+ compatible = "fsl,fman-bmi";
+ reg = <0x80000 0x400>;
+ };
+
+ qmi@80400 {
+ compatible = "fsl,fman-qmi";
+ reg = <0x80400 0x400>;
+ };
+
+ fman0_oh1: port@82000 {
+ cell-index = <0>;
+ compatible = "fsl,fman-port-oh";
+ reg = <0x82000 0x1000>;
+ };
+
+ fman0_oh2: port@83000 {
+ cell-index = <1>;
+ compatible = "fsl,fman-port-oh";
+ reg = <0x83000 0x1000>;
+ };
+
+ fman0_oh3: port@84000 {
+ cell-index = <2>;
+ compatible = "fsl,fman-port-oh";
+ reg = <0x84000 0x1000>;
+ };
+
+ fman0_oh4: port@85000 {
+ cell-index = <3>;
+ compatible = "fsl,fman-port-oh";
+ reg = <0x85000 0x1000>;
+ };
+
+ policer@c0000 {
+ compatible = "fsl,fman-policer";
+ reg = <0xc0000 0x1000>;
+ };
+
+ keygen@c1000 {
+ compatible = "fsl,fman-keygen";
+ reg = <0xc1000 0x1000>;
+ };
+
+ dma@c2000 {
+ compatible = "fsl,fman-dma";
+ reg = <0xc2000 0x1000>;
+ };
+
+ fpm@c3000 {
+ compatible = "fsl,fman-fpm";
+ reg = <0xc3000 0x1000>;
+ };
+
+ parser@c7000 {
+ compatible = "fsl,fman-parser";
+ reg = <0xc7000 0x1000>;
+ };
+
+ vsps@dc000 {
+ compatible = "fsl,fman-vsps";
+ reg = <0xdc000 0x1000>;
+ };
+
+ mdio@fc000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,fman-memac-mdio";
+ reg = <0xfc000 0x1000>;
+ };
+
+ mdio@fd000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,fman-memac-mdio";
+ reg = <0xfd000 0x1000>;
+ };
+
+ ptp_timer0: rtc@fe000 {
+ compatible = "fsl,fman-rtc";
+ reg = <0xfe000 0x1000>;
+ };
+};
diff --git a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
index 75d7462..4baa2e4 100644
--- a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
@@ -584,7 +584,7 @@ sata@221000 {
/include/ "qoriq-pme-0.dtsi"
/include/ "qoriq-qman1.dtsi"
/include/ "qoriq-bman1.dtsi"
-/include/ "qoriq-fman3-0.dtsi"
+/include/ "qoriq-fman3l-0.dtsi"
/include/ "qoriq-fman3-0-1g-0.dtsi"
/include/ "qoriq-fman3-0-1g-1.dtsi"
/include/ "qoriq-fman3-0-1g-2.dtsi"
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c b/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c
index a5665ac..1f22bd7 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c
@@ -135,16 +135,21 @@ static int dpa_debugfs_show(struct seq_file *file, void *offset)
seq_printf(file, "Device has been congested for %d ms.\n",
jiffies_to_msecs(priv->cgr_data.congested_jiffies));
- qman_query_cgr(&priv->cgr_data.cgr, &query_cgr);
- seq_printf(file, "CGR id %d avg count: %llu\n",
- priv->cgr_data.cgr.cgrid, qm_mcr_querycgr_a_get64(&query_cgr));
- seq_printf(file, "Device entered congestion %u times. ",
- priv->cgr_data.cgr_congested_count);
- seq_printf(file, "Current congestion state is: %s.\n",
- query_cgr.cgr.cs ? "congested" : "not congested");
- /* Reset congestion stats (like QMan CGR API does) */
- priv->cgr_data.congested_jiffies = 0;
- priv->cgr_data.cgr_congested_count = 0;
+ if (qman_query_cgr(&priv->cgr_data.cgr, &query_cgr) != 0) {
+ seq_printf(file, "CGR id %d - failed to query values\n",
+ priv->cgr_data.cgr.cgrid);
+ } else {
+ seq_printf(file, "CGR id %d avg count: %llu\n",
+ priv->cgr_data.cgr.cgrid,
+ qm_mcr_querycgr_a_get64(&query_cgr));
+ seq_printf(file, "Device entered congestion %u times. ",
+ priv->cgr_data.cgr_congested_count);
+ seq_printf(file, "Current congestion state is: %s.\n",
+ query_cgr.cgr.cs ? "congested" : "not congested");
+ /* Reset congestion stats (like QMan CGR API does) */
+ priv->cgr_data.congested_jiffies = 0;
+ priv->cgr_data.cgr_congested_count = 0;
+ }
/* Rx Errors demultiplexing */
seq_puts(file, "\nDPA RX Errors:\nCPU dma err phys err");
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.h b/drivers/net/ethernet/freescale/dpa/dpaa_eth.h
index 9187e84..e26cb72 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.h
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.h
@@ -48,10 +48,6 @@ extern int dpa_num_cpus;
#define dpa_get_rx_extra_headroom() dpa_rx_extra_headroom
#define dpa_get_max_frm() dpa_max_frm
-/* Currently we have the same max_frm on all interfaces, so these macros
- * don't get a net_device argument. This will change in the future.
- */
-#define dpa_get_min_mtu() 64
#define dpa_get_max_mtu() \
(dpa_get_max_frm() - (VLAN_ETH_HLEN + ETH_FCS_LEN))
@@ -495,11 +491,11 @@ static inline uint16_t dpa_get_headroom(struct dpa_buffer_layout_s *bl)
*
* Also make sure the headroom is a multiple of data_align bytes
*/
- headroom = bl->priv_data_size +
+ headroom = (uint16_t)(bl->priv_data_size +
(bl->parse_results ? DPA_PARSE_RESULTS_SIZE : 0) +
(bl->hash_results || bl->time_stamp ?
DPA_TIME_STAMP_SIZE + DPA_HASH_RESULTS_SIZE : 0) +
- bl->manip_extra_space;
+ bl->manip_extra_space);
return bl->data_align ? ALIGN(headroom, bl->data_align) : headroom;
}
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c
index 57b488a..0a2cdfc 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c
@@ -260,12 +260,11 @@ dpa_get_stats64(struct net_device *net_dev,
int dpa_change_mtu(struct net_device *net_dev, int new_mtu)
{
const int max_mtu = dpa_get_max_mtu();
- const int min_mtu = dpa_get_min_mtu();
/* Make sure we don't exceed the Ethernet controller's MAXFRM */
- if (new_mtu < min_mtu || new_mtu > max_mtu) {
+ if (new_mtu < 68 || new_mtu > max_mtu) {
netdev_err(net_dev, "Invalid L3 mtu %d (must be between %d and %d).\n",
- new_mtu, min_mtu, max_mtu);
+ new_mtu, 68, max_mtu);
return -EINVAL;
}
net_dev->mtu = new_mtu;
@@ -759,6 +758,7 @@ void dpa_bp_drain(struct dpa_bp *bp)
* drain them one by one
*/
num = 1;
+ ret = 1;
continue;
} else {
/* Pool is fully drained */
@@ -1220,7 +1220,7 @@ int dpa_fq_init(struct dpa_fq *dpa_fq, bool td_enable)
dpa_fq->fq_type == FQ_TYPE_TX_CONF_MQ) {
initfq.we_mask |= QM_INITFQ_WE_CGID;
initfq.fqd.fq_ctrl |= QM_FQCTRL_CGE;
- initfq.fqd.cgid = priv->cgr_data.cgr.cgrid;
+ initfq.fqd.cgid = (uint8_t)priv->cgr_data.cgr.cgrid;
/* Set a fixed overhead accounting, in an attempt to
* reduce the impact of fixed-size skb shells and the
* driver's needed headroom on system memory. This is
@@ -1268,7 +1268,7 @@ int dpa_fq_init(struct dpa_fq *dpa_fq, bool td_enable)
dpa_fq->fq_type == FQ_TYPE_RX_PCD)) {
initfq.we_mask |= QM_INITFQ_WE_CGID;
initfq.fqd.fq_ctrl |= QM_FQCTRL_CGE;
- initfq.fqd.cgid = priv->ingress_cgr.cgrid;
+ initfq.fqd.cgid = (uint8_t)priv->ingress_cgr.cgrid;
/* Set a fixed overhead accounting, just like for the
* egress CGR.
*/
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_generic.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_generic.c
index 8f2ad0f..21d177a 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_generic.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_generic.c
@@ -433,7 +433,8 @@ dpa_generic_rx_dqrr(struct qman_portal *portal,
/* The skb is currently pointed at head + headroom. The packet
* starts at skb->head + pad + fd offset.
*/
- data_start = pad + dpa_fd_offset(fd) - skb_headroom(skb);
+ data_start = (unsigned int)(pad + dpa_fd_offset(fd) -
+ skb_headroom(skb));
skb_put(skb, dpa_fd_length(fd) + data_start);
skb_pull(skb, data_start);
skb->protocol = eth_type_trans(skb, netdev);
@@ -576,8 +577,8 @@ int dpa_generic_tx_csum(struct dpa_generic_priv_s *priv,
}
/* At index 0 is IPOffset_1 as defined in the Parse Results */
- parse_result->ip_off[0] = skb_network_offset(skb);
- parse_result->l4_off = skb_transport_offset(skb);
+ parse_result->ip_off[0] = (uint8_t)skb_network_offset(skb);
+ parse_result->l4_off = (uint8_t)skb_transport_offset(skb);
/* Enable L3 (and L4, if TCP or UDP) HW checksum. */
fd->cmd |= FM_FD_CMD_RPD | FM_FD_CMD_DTC;
@@ -652,7 +653,7 @@ static int __hot dpa_generic_tx(struct sk_buff *skb, struct net_device *netdev)
fd.format = qm_fd_contig;
fd.length20 = skb->len;
fd.offset = priv->tx_headroom;
- fd.addr_hi = upper_32_bits(addr);
+ fd.addr_hi = (uint8_t)upper_32_bits(addr);
fd.addr_lo = lower_32_bits(addr);
/* fd.cmd |= FM_FD_CMD_FCO; */
fd.bpid = bp->bpid;
@@ -959,7 +960,7 @@ static int dpa_generic_rx_bp_probe(struct platform_device *_of_dev,
goto _return_of_node_put;
}
- bp[i].bpid = *bpid;
+ bp[i].bpid = (uint8_t)*bpid;
bpool_cfg = of_get_property(dev_node, "fsl,bpool-ethernet-cfg",
&lenp);
@@ -1275,16 +1276,16 @@ static int dpa_generic_fq_create(struct net_device *netdev,
struct dpa_fq *fqs = NULL, *tmp = NULL;
struct task_struct *kth;
int err = 0;
+ int channel;
INIT_LIST_HEAD(&priv->dpa_fq_list);
list_replace_init(dpa_fq_list, &priv->dpa_fq_list);
- priv->channel = dpa_get_channel();
- if (priv->channel < 0) {
- err = priv->channel;
- return err;
- }
+ channel = dpa_get_channel();
+ if (channel < 0)
+ return channel;
+ priv->channel = (uint16_t)channel;
/* Start a thread that will walk the cpus with affine portals
* and add this pool channel to each's dequeue mask.
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_macless.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_macless.c
index f27ce5c..0258c90 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_macless.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_macless.c
@@ -310,7 +310,7 @@ struct proxy_device *dpa_macless_proxy_probe(struct platform_device *_of_dev)
static int dpaa_eth_macless_probe(struct platform_device *_of_dev)
{
- int err = 0, i;
+ int err = 0, i, channel;
struct device *dev;
struct device_node *dpa_node;
struct dpa_bp *dpa_bp;
@@ -393,13 +393,15 @@ static int dpaa_eth_macless_probe(struct platform_device *_of_dev)
if (err < 0)
goto bp_create_failed;
- priv->channel = dpa_get_channel();
+ channel = dpa_get_channel();
- if (priv->channel < 0) {
- err = priv->channel;
+ if (channel < 0) {
+ err = channel;
goto get_channel_failed;
}
+ priv->channel = (uint16_t)channel;
+
/* Start a thread that will walk the cpus with affine portals
* and add this pool channel to each's dequeue mask.
*/
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c
index 95eb17c..fd1f2a8 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c
@@ -261,14 +261,14 @@ struct sk_buff *_dpa_cleanup_tx_fd(const struct dpa_priv_s *priv,
#endif /* CONFIG_FSL_DPAA_TS */
/* sgt[0] is from lowmem, was dma_map_single()-ed */
- dma_unmap_single(dpa_bp->dev, sgt[0].addr,
+ dma_unmap_single(dpa_bp->dev, (dma_addr_t)sgt[0].addr,
sgt[0].length, dma_dir);
/* remaining pages were mapped with dma_map_page() */
for (i = 1; i < nr_frags; i++) {
DPA_BUG_ON(sgt[i].extension);
- dma_unmap_page(dpa_bp->dev, sgt[i].addr,
+ dma_unmap_page(dpa_bp->dev, (dma_addr_t)sgt[i].addr,
sgt[i].length, dma_dir);
}
@@ -774,7 +774,7 @@ static int __hot skb_to_sg_fd(struct dpa_priv_s *priv,
goto sg0_map_failed;
}
- sgt[0].addr_hi = upper_32_bits(addr);
+ sgt[0].addr_hi = (uint8_t)upper_32_bits(addr);
sgt[0].addr_lo = lower_32_bits(addr);
/* populate the rest of SGT entries */
@@ -796,7 +796,7 @@ static int __hot skb_to_sg_fd(struct dpa_priv_s *priv,
}
/* keep the offset in the address */
- sgt[i].addr_hi = upper_32_bits(addr);
+ sgt[i].addr_hi = (uint8_t)upper_32_bits(addr);
sgt[i].addr_lo = lower_32_bits(addr);
}
sgt[i - 1].final = 1;
@@ -821,7 +821,7 @@ static int __hot skb_to_sg_fd(struct dpa_priv_s *priv,
fd->bpid = 0xff;
fd->cmd |= FM_FD_CMD_FCO;
- fd->addr_hi = upper_32_bits(addr);
+ fd->addr_hi = (uint8_t)upper_32_bits(addr);
fd->addr_lo = lower_32_bits(addr);
return 0;
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c
index 17dc86f..797dac9 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c
@@ -488,7 +488,7 @@ int __hot dpa_shared_tx(struct sk_buff *skb, struct net_device *net_dev)
fd.bpid = dpa_bp->bpid;
fd.length20 = skb_headlen(skb);
- fd.addr_hi = bmb.hi;
+ fd.addr_hi = (uint8_t)bmb.hi;
fd.addr_lo = bmb.lo;
fd.offset = priv->tx_headroom;
@@ -580,6 +580,7 @@ buf_acquire_failed:
/* We're done with the skb */
dev_kfree_skb(skb);
+ /* err remains unused, NETDEV_TX_OK must be returned here */
return NETDEV_TX_OK;
}
@@ -670,7 +671,7 @@ static const struct dev_pm_ops shared_pm_ops = {
static int
dpaa_eth_shared_probe(struct platform_device *_of_dev)
{
- int err = 0, i;
+ int err = 0, i, channel;
struct device *dev;
struct device_node *dpa_node;
struct dpa_bp *dpa_bp;
@@ -755,13 +756,15 @@ dpaa_eth_shared_probe(struct platform_device *_of_dev)
priv->mac_dev = mac_dev;
- priv->channel = dpa_get_channel();
+ channel = dpa_get_channel();
- if (priv->channel < 0) {
- err = priv->channel;
+ if (channel < 0) {
+ err = channel;
goto get_channel_failed;
}
+ priv->channel = (uint16_t)channel;
+
/* Start a thread that will walk the cpus with affine portals
* and add this pool channel to each's dequeue mask.
*/
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_ethtool.c b/drivers/net/ethernet/freescale/dpa/dpaa_ethtool.c
index d36930e..60a1b22 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_ethtool.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_ethtool.c
@@ -189,8 +189,8 @@ static void __cold dpa_get_pauseparam(struct net_device *net_dev,
}
epause->autoneg = mac_dev->autoneg_pause;
- epause->rx_pause = mac_dev->rx_pause;
- epause->tx_pause = mac_dev->tx_pause;
+ epause->rx_pause = mac_dev->rx_pause_active;
+ epause->tx_pause = mac_dev->tx_pause_active;
}
static int __cold dpa_set_pauseparam(struct net_device *net_dev,
@@ -201,6 +201,7 @@ static int __cold dpa_set_pauseparam(struct net_device *net_dev,
struct phy_device *phy_dev;
int _errno;
u32 newadv, oldadv;
+ bool rx_pause, tx_pause;
priv = netdev_priv(net_dev);
mac_dev = priv->mac_dev;
@@ -225,7 +226,9 @@ static int __cold dpa_set_pauseparam(struct net_device *net_dev,
* adjust_link is triggered by a forced renegotiation of sym/asym PAUSE
* settings.
*/
- mac_dev->autoneg_pause = epause->autoneg;
+ mac_dev->autoneg_pause = !!epause->autoneg;
+ mac_dev->rx_pause_req = !!epause->rx_pause;
+ mac_dev->tx_pause_req = !!epause->tx_pause;
/* Determine the sym/asym advertised PAUSE capabilities from the desired
* rx/tx pause settings.
@@ -254,25 +257,12 @@ static int __cold dpa_set_pauseparam(struct net_device *net_dev,
}
}
- if (epause->autoneg)
- return 0;
-
- /* If PAUSE frame autonegotiation is disabled,
- * ethtool rx/tx settings are enforced.
- */
- _errno = set_mac_rx_pause(mac_dev, !!epause->rx_pause);
- if (unlikely(_errno < 0)) {
- netdev_err(net_dev, "set_mac_rx_pause() = %d\n", _errno);
- return _errno;
- }
-
- _errno = set_mac_tx_pause(mac_dev, !!epause->tx_pause);
- if (unlikely(_errno < 0)) {
- netdev_err(net_dev, "set_mac_tx_pause() = %d\n", _errno);
- return _errno;
- }
+ get_pause_cfg(mac_dev, &rx_pause, &tx_pause);
+ _errno = set_mac_active_pause(mac_dev, rx_pause, tx_pause);
+ if (unlikely(_errno < 0))
+ netdev_err(net_dev, "set_mac_active_pause() = %d\n", _errno);
- return 0;
+ return _errno;
}
#ifdef CONFIG_PM
diff --git a/drivers/net/ethernet/freescale/dpa/mac-api.c b/drivers/net/ethernet/freescale/dpa/mac-api.c
index a8b4704..f5d6c73 100644
--- a/drivers/net/ethernet/freescale/dpa/mac-api.c
+++ b/drivers/net/ethernet/freescale/dpa/mac-api.c
@@ -330,33 +330,24 @@ static int __cold set_multi(struct net_device *net_dev,
}
/* Avoid redundant calls to FMD, if the MAC driver already contains the desired
- * settings. Otherwise, the new MAC settings should be reflected in FMan.
+ * active PAUSE settings. Otherwise, the new active settings should be reflected
+ * in FMan.
*/
-int set_mac_rx_pause(struct mac_device *mac_dev, bool en)
+int set_mac_active_pause(struct mac_device *mac_dev, bool rx, bool tx)
{
- struct fm_mac_dev *fm_mac_dev;
+ struct fm_mac_dev *fm_mac_dev = mac_dev->get_mac_handle(mac_dev);
int _errno = 0;
- if (unlikely(en != mac_dev->rx_pause)) {
- fm_mac_dev = mac_dev->get_mac_handle(mac_dev);
- _errno = fm_mac_set_rx_pause_frames(fm_mac_dev, en);
+ if (unlikely(rx != mac_dev->rx_pause_active)) {
+ _errno = fm_mac_set_rx_pause_frames(fm_mac_dev, rx);
if (likely(_errno == 0))
- mac_dev->rx_pause = en;
+ mac_dev->rx_pause_active = rx;
}
- return _errno;
-}
-
-int set_mac_tx_pause(struct mac_device *mac_dev, bool en)
-{
- int _errno = 0;
- struct fm_mac_dev *fm_mac_dev;
-
- if (unlikely(en != mac_dev->tx_pause)) {
- fm_mac_dev = mac_dev->get_mac_handle(mac_dev);
- _errno = fm_mac_set_tx_pause_frames(fm_mac_dev, en);
+ if (unlikely(tx != mac_dev->tx_pause_active)) {
+ _errno = fm_mac_set_tx_pause_frames(fm_mac_dev, tx);
if (likely(_errno == 0))
- mac_dev->tx_pause = en;
+ mac_dev->tx_pause_active = tx;
}
return _errno;
@@ -365,8 +356,7 @@ int set_mac_tx_pause(struct mac_device *mac_dev, bool en)
/* Determine the MAC RX/TX PAUSE frames settings based on PHY
* autonegotiation or values set by eththool.
*/
-static void get_pause_cfg(struct mac_device *mac_dev,
- bool *rx_pause, bool *tx_pause)
+void get_pause_cfg(struct mac_device *mac_dev, bool *rx_pause, bool *tx_pause)
{
struct phy_device *phy_dev = mac_dev->phy_dev;
u16 lcl_adv, rmt_adv;
@@ -381,8 +371,8 @@ static void get_pause_cfg(struct mac_device *mac_dev,
* are those set by ethtool.
*/
if (!mac_dev->autoneg_pause) {
- *rx_pause = !!mac_dev->rx_pause;
- *tx_pause = !!mac_dev->tx_pause;
+ *rx_pause = mac_dev->rx_pause_req;
+ *tx_pause = mac_dev->tx_pause_req;
return;
}
@@ -428,13 +418,9 @@ static void adjust_link(struct net_device *net_dev)
phy_dev->duplex);
get_pause_cfg(mac_dev, &rx_pause, &tx_pause);
-
- _errno = set_mac_rx_pause(mac_dev, rx_pause);
- if (unlikely(_errno < 0))
- netdev_err(net_dev, "set_rx_pause() = %d\n", _errno);
- _errno = set_mac_tx_pause(mac_dev, tx_pause);
+ _errno = set_mac_active_pause(mac_dev, rx_pause, tx_pause);
if (unlikely(_errno < 0))
- netdev_err(net_dev, "set_tx_pause() = %d\n", _errno);
+ netdev_err(net_dev, "set_mac_active_pause() = %d\n", _errno);
}
/* Initializes driver's PHY state, and attaches to the PHY.
diff --git a/drivers/net/ethernet/freescale/dpa/mac.c b/drivers/net/ethernet/freescale/dpa/mac.c
index 20994d4..69b4b6c 100644
--- a/drivers/net/ethernet/freescale/dpa/mac.c
+++ b/drivers/net/ethernet/freescale/dpa/mac.c
@@ -258,7 +258,7 @@ static int __cold mac_probe(struct platform_device *_of_dev)
goto _return_dev_set_drvdata;
}
BUG_ON(lenp != sizeof(uint32_t));
- mac_dev->cell_index = *uint32_prop;
+ mac_dev->cell_index = (uint8_t)*uint32_prop;
/* Get the MAC address */
mac_addr = of_get_mac_address(mac_node);
@@ -364,19 +364,11 @@ static int __cold mac_probe(struct platform_device *_of_dev)
/* by intializing the values to false, force FMD to enable PAUSE frames
* on RX and TX
*/
- mac_dev->rx_pause = mac_dev->tx_pause = false;
- /* does not ignore PAUSE frames */
- _errno = set_mac_rx_pause(mac_dev, true);
- if (unlikely(_errno < 0)) {
- dev_err(dev, "set_mac_rx_pause() = %d\n", _errno);
- return _errno;
- }
- /* transmits PAUSE frames when congested */
- _errno = set_mac_tx_pause(mac_dev, true);
- if (unlikely(_errno < 0)) {
- dev_err(dev, "set_mac_tx_pause() = %d\n", _errno);
- return _errno;
- }
+ mac_dev->rx_pause_req = mac_dev->tx_pause_req = true;
+ mac_dev->rx_pause_active = mac_dev->tx_pause_active = false;
+ _errno = set_mac_active_pause(mac_dev, true, true);
+ if (unlikely(_errno < 0))
+ dev_err(dev, "set_mac_active_pause() = %d\n", _errno);
dev_info(dev,
"FMan MAC address: %02hx:%02hx:%02hx:%02hx:%02hx:%02hx\n",
diff --git a/drivers/net/ethernet/freescale/dpa/mac.h b/drivers/net/ethernet/freescale/dpa/mac.h
index 785877f..f9e2db2 100644
--- a/drivers/net/ethernet/freescale/dpa/mac.h
+++ b/drivers/net/ethernet/freescale/dpa/mac.h
@@ -67,9 +67,11 @@ struct mac_device {
/* List of multicast addresses */
struct list_head mc_addr_list;
- u32 autoneg_pause;
- u32 rx_pause;
- u32 tx_pause;
+ bool autoneg_pause;
+ bool rx_pause_req;
+ bool tx_pause_req;
+ bool rx_pause_active;
+ bool tx_pause_active;
struct fm_mac_dev *(*get_mac_handle)(struct mac_device *mac_dev);
int (*init_phy)(struct net_device *net_dev, struct mac_device *mac_dev);
@@ -121,7 +123,7 @@ extern const char *mac_driver_description;
extern const size_t mac_sizeof_priv[];
extern void (*const mac_setup[])(struct mac_device *mac_dev);
-int set_mac_rx_pause(struct mac_device *mac_dev, bool en);
-int set_mac_tx_pause(struct mac_device *mac_dev, bool en);
+int set_mac_active_pause(struct mac_device *mac_dev, bool rx, bool tx);
+void get_pause_cfg(struct mac_device *mac_dev, bool *rx_pause, bool *tx_pause);
#endif /* __MAC_H */
diff --git a/drivers/net/ethernet/freescale/dpa/offline_port.c b/drivers/net/ethernet/freescale/dpa/offline_port.c
index 81d8dac..042f44a 100644
--- a/drivers/net/ethernet/freescale/dpa/offline_port.c
+++ b/drivers/net/ethernet/freescale/dpa/offline_port.c
@@ -143,7 +143,7 @@ static uint32_t oh_fq_create(struct qman_fq *fq,
return 0;
}
-void dump_fq(struct device *dev, int fqid, int channel)
+static void dump_fq(struct device *dev, int fqid, uint16_t channel)
{
if (channel) {
/* display fqs with a valid (!= 0) destination channel */
@@ -151,15 +151,15 @@ void dump_fq(struct device *dev, int fqid, int channel)
}
}
-void dump_fq_duple(struct device *dev, struct qman_fq *fqs, int fqs_count,
- int channel_id)
+static void dump_fq_duple(struct device *dev, struct qman_fq *fqs,
+ int fqs_count, uint16_t channel_id)
{
int i;
for (i = 0; i < fqs_count; i++)
dump_fq(dev, (fqs + i)->fqid, channel_id);
}
-void dump_oh_config(struct device *dev, struct dpa_oh_config_s *conf)
+static void dump_oh_config(struct device *dev, struct dpa_oh_config_s *conf)
{
struct list_head *fq_list;
struct fq_duple *fqd;
@@ -423,7 +423,7 @@ oh_port_probe(struct platform_device *_of_dev)
for (j = 0; j < crt_fq_count; j++)
(fqd->fqs + j)->fqid = crt_fqid_base + j;
fqd->fqs_count = crt_fq_count;
- fqd->channel_id = *channel_id;
+ fqd->channel_id = (uint16_t)*channel_id;
list_add(&fqd->fq_list, &oh_config->fqs_ingress_list);
}
@@ -491,7 +491,7 @@ oh_port_probe(struct platform_device *_of_dev)
fqd->fqs_count = crt_fq_count;
/* channel ID is specified in another attribute */
fqd->channel_id = 0;
- list_add(&fqd->fq_list, &oh_config->fqs_egress_list);
+ list_add_tail(&fqd->fq_list, &oh_config->fqs_egress_list);
/* allocate the queue */
@@ -515,7 +515,7 @@ oh_port_probe(struct platform_device *_of_dev)
if (channel_idx + 1 > channel_ids_count)
break;
fqd = list_entry(fq_list, struct fq_duple, fq_list);
- fqd->channel_id = channel_ids[channel_idx++];
+ fqd->channel_id = (uint16_t)channel_ids[channel_idx++];
}
/* create egress queues */
@@ -649,7 +649,7 @@ oh_port_probe(struct platform_device *_of_dev)
/* Create TX queues */
for (i = 0; i < crt_fq_count; i++) {
ret = oh_fq_create(oh_config->egress_fqs + i,
- crt_fqid_base + i, *channel_id, 3);
+ crt_fqid_base + i, (uint16_t)*channel_id, 3);
if (ret != 0) {
dev_err(dpa_oh_dev,
"Unable to create TX frame queue %d for OH node %s referenced from node %s!\n",
@@ -698,7 +698,7 @@ config_port:
dev_dbg(dpa_oh_dev, "OH port number of pools = %u\n",
crt_ext_pools_count);
- oh_port_tx_params.num_pools = crt_ext_pools_count;
+ oh_port_tx_params.num_pools = (uint8_t)crt_ext_pools_count;
for (i = 0; i < crt_ext_pools_count; i++) {
bpool_node = of_find_node_by_phandle(bpool_handle[i]);
@@ -715,7 +715,7 @@ config_port:
goto return_kfree;
}
- oh_port_tx_params.pool_param[i].id = *bpid;
+ oh_port_tx_params.pool_param[i].id = (uint8_t)*bpid;
dev_dbg(dpa_oh_dev, "OH port bpool id = %u\n", *bpid);
bpool_cfg = of_get_property(bpool_node,
@@ -728,7 +728,7 @@ config_port:
of_read_number(bpool_cfg, n_size);
ext_pool_size = of_read_number(bpool_cfg + n_size, n_size);
- oh_port_tx_params.pool_param[i].size = ext_pool_size;
+ oh_port_tx_params.pool_param[i].size = (uint16_t)ext_pool_size;
dev_dbg(dpa_oh_dev, "OH port bpool size = %u\n",
ext_pool_size);
of_node_put(bpool_node);
diff --git a/drivers/net/ethernet/freescale/dpa/offline_port.h b/drivers/net/ethernet/freescale/dpa/offline_port.h
index 54b0fe4..432ee88 100644
--- a/drivers/net/ethernet/freescale/dpa/offline_port.h
+++ b/drivers/net/ethernet/freescale/dpa/offline_port.h
@@ -39,7 +39,7 @@ struct qman_fq;
struct fq_duple {
struct qman_fq *fqs;
int fqs_count;
- int channel_id;
+ uint16_t channel_id;
struct list_head fq_list;
};
diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c
index 1f3ae53..d2008bf 100644
--- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c
+++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c
@@ -3152,8 +3152,9 @@ t_Error FM_PORT_Disable(t_Handle h_FmPort)
err = fman_port_disable(&p_FmPort->port);
if (err == -EBUSY)
{
- fman_port_enable(&p_FmPort->port);
- RETURN_ERROR(MINOR, E_BUSY, ("%s: can't disable! BMI or QMI is Busy", p_FmPort->name));
+ DBG(WARNING, ("%s: BMI or QMI is Busy. Port forced down",
+ p_FmPort->name));
+ err = E_OK;
}
else if (err != 0)
{
diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fman_port.c b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fman_port.c
index ec261c4..54e796c 100755
--- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fman_port.c
+++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fman_port.c
@@ -856,8 +856,6 @@ int fman_port_disable(const struct fman_port *port)
if (count == 0)
{
/* Timeout */
- iowrite32be(ioread32be(&port->qmi_regs->fmqm_pnc) |
- QMI_PORT_CFG_EN, &port->qmi_regs->fmqm_pnc);
failure = TRUE;
}
}
@@ -876,10 +874,6 @@ int fman_port_disable(const struct fman_port *port)
if (count == 0)
{
/* Timeout */
- iowrite32be(ioread32be(&port->qmi_regs->fmqm_pnc) |
- QMI_PORT_CFG_EN, &port->qmi_regs->fmqm_pnc);
- iowrite32be(ioread32be(bmi_cfg_reg) | BMI_PORT_CFG_EN,
- bmi_cfg_reg);
failure = TRUE;
}
diff --git a/drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fsl_fman.h b/drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fsl_fman.h
index aa3ec30..987fe40 100644
--- a/drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fsl_fman.h
+++ b/drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fsl_fman.h
@@ -231,7 +231,7 @@ void fm_port_get_buff_layout_ext_params(struct fm_port *port, struct fm_port_par
@Cautions Allowed only after the port is binded.
*//***************************************************************************/
-int fm_get_tx_port_channel(struct fm_port *port);
+uint16_t fm_get_tx_port_channel(struct fm_port *port);
/**************************************************************************//**
@Function fm_set_tx_port_params
diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm.c b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm.c
index b9a2097..427de85 100755
--- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm.c
+++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm.c
@@ -1331,7 +1331,7 @@ void fm_port_get_buff_layout_ext_params(struct fm_port *port, struct fm_port_par
}
EXPORT_SYMBOL(fm_port_get_buff_layout_ext_params);
-int fm_get_tx_port_channel(struct fm_port *port)
+uint16_t fm_get_tx_port_channel(struct fm_port *port)
{
t_LnxWrpFmPortDev *p_LnxWrpFmPortDev = (t_LnxWrpFmPortDev*)port;
diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_sysfs_fm.h b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_sysfs_fm.h
index e6bf83e..137653e 100644
--- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_sysfs_fm.h
+++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_sysfs_fm.h
@@ -126,7 +126,7 @@ int fm_profile_dump_regs(void *h_pcd, int ppnum, char *buf, int nn);
int k, m = n; \
phys_addr_t pa = virt_to_phys(&((st)->phrase)); \
k = snprintf(&buf[m], PAGE_SIZE - m, \
- "0x%010llX: 0x%08x%8s\t%s\n", pa, \
+ "0x%010llX: 0x%08x%8s\t%s\n", (unsigned long long) pa, \
ioread32be((uint32_t *)&((st)->phrase)), "", #phrase); \
if (k < 0 || m > PAGE_SIZE - 90) \
FM_DMP_PGSZ_ERR \