linux-stable/drivers/net/ipa
Alex Elder 6304295c61 net: ipa: fix init header command validation
[ Upstream commit b4afd4b90a ]

We use ipa_cmd_header_valid() to ensure certain values we will
program into hardware are within range, well in advance of when we
actually program them.  This way we avoid having to check for errors
when we actually program the hardware.

Unfortunately the dev_err() call for a bad offset value does not
supply the arguments to match the format specifiers properly.
Fix this.

There was also supposed to be a check to ensure the size to be
programmed fits in the field that holds it.  Add this missing check.

Rearrange the way we ensure the header table fits in overall IPA
memory range.

Finally, update ipa_cmd_table_valid() so the format of messages
printed for errors matches what's done in ipa_cmd_header_valid().

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-10 13:36:08 +02:00
..
gsi.c net: ipa: set error code in gsi_channel_setup() 2021-02-17 11:02:26 +01:00
gsi.h net: ipa: do not enable GSI interrupt for wakeup 2020-09-18 17:47:07 -07:00
gsi_private.h net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
gsi_reg.h net: ipa: remove two unused register definitions 2021-04-07 15:00:08 +02:00
gsi_trans.c net: ipa: pass the correct size when freeing DMA memory 2020-12-04 14:38:44 -08:00
gsi_trans.h net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipa.h net: ipa: repurpose CLOCK_HELD flag 2020-09-18 17:47:07 -07:00
ipa_clock.c net: ipa: manage endpoints separate from clock 2020-09-18 17:47:07 -07:00
ipa_clock.h net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipa_cmd.c net: ipa: fix init header command validation 2021-04-10 13:36:08 +02:00
ipa_cmd.h net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipa_data-sc7180.c net: ipa: fix modem LAN RX endpoint id 2020-06-11 18:39:08 -07:00
ipa_data-sdm845.c net: ipa: no checksum offload for SDM845 LAN RX 2020-06-30 13:10:57 -07:00
ipa_data.h
ipa_endpoint.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-10-15 12:43:21 -07:00
ipa_endpoint.h drivers: ipa: remove discription of nonexistent element 2020-05-27 14:58:28 -07:00
ipa_gsi.c net: ipa: include declarations in "ipa_gsi.c" 2020-07-07 12:43:18 -07:00
ipa_gsi.h net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipa_interrupt.c net: ipa: enable wakeup on IPA interrupt 2020-09-18 17:47:07 -07:00
ipa_interrupt.h net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipa_main.c net: ipa: rename a phandle variable 2020-09-28 18:34:56 -07:00
ipa_mem.c net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipa_mem.h
ipa_modem.c net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links 2021-01-23 16:03:59 +01:00
ipa_modem.h
ipa_qmi.c net: ipa: terminate message handler arrays 2021-03-30 14:31:58 +02:00
ipa_qmi.h
ipa_qmi_msg.c net: ipa: fix QMI structure definition bugs 2020-07-07 12:43:18 -07:00
ipa_qmi_msg.h
ipa_reg.c
ipa_reg.h net: ipa: fix two comments 2020-09-28 18:34:56 -07:00
ipa_smp2p.c drivers: ipa: fix typos for ipa_smp2p structure doc 2020-05-14 13:06:55 -07:00
ipa_smp2p.h net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipa_table.c net: ipa: fix u32_replace_bits by u32p_xxx version 2020-09-11 17:28:48 -07:00
ipa_table.h net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipa_uc.c net: ipa: fix two comments 2020-09-28 18:34:56 -07:00
ipa_uc.h
ipa_version.h
Kconfig
Makefile