Age | Commit message (Collapse) | Author |
|
caam/qi needs a fix similar to what was done for caam/jr in
commit "crypto: caam/qi - properly set IV after {en,de}crypt",
to allow for ablkcipher/skcipher chunking/streaming.
Cc: <stable@vger.kernel.org>
Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms")
Suggested-by: David Gstir <david@sigma-star.at>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit a68a193805224d90bedd94e9e8ac287600f07b78)
|
|
Certain cipher modes like CTS expect the IV (req->info) of
ablkcipher_request (or equivalently req->iv of skcipher_request) to
contain the last ciphertext block when the {en,de}crypt operation is done.
This is currently not the case for the CAAM driver which in turn breaks
e.g. cts(cbc(aes)) when the CAAM driver is enabled.
This patch fixes the CAAM driver to properly set the IV after the
{en,de}crypt operation of ablkcipher finishes.
This issue was revealed by the changes in the SW CTS mode in commit
0605c41cc53ca ("crypto: cts - Convert to skcipher")
Cc: <stable@vger.kernel.org> # 4.8+
Signed-off-by: David Gstir <david@sigma-star.at>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 854b06f768794cd664886ec3ba3a5b1c58d42167)
|
|
s/desi/des for echainiv(authenc(hmac(sha256),cbc(des))) alg.
Cc: <stable@vger.kernel.org>
Fixes: b189817cf7894 ("crypto: caam/qi - add ablkcipher and authenc algorithms")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 84ea95436b83884fa55780618ffaf4bbe3312166)
|
|
This is the 2nd part of fixing the usage of GFP_KERNEL for memory
allocations, taking care off all the places that haven't caused a real
problem / failure.
Again, the issue being fixed is that GFP_KERNEL should be used only when
MAY_SLEEP flag is set, i.e. MAY_BACKLOG flag usage is orthogonal.
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 019d62db54017f4639fd7d4f6592f5a116a16695)
|
|
Changes in the SW cts (ciphertext stealing) code in
commit 0605c41cc53ca ("crypto: cts - Convert to skcipher")
revealed a problem in the CAAM driver:
when cts(cbc(aes)) is executed and cts runs in SW,
cbc(aes) is offloaded in CAAM; cts encrypts the last block
in atomic context and CAAM incorrectly decides to use GFP_KERNEL
for memory allocation.
Fix this by allowing GFP_KERNEL (sleeping) only when MAY_SLEEP flag is
set, i.e. remove MAY_BACKLOG flag.
We split the fix in two parts - first is sent to -stable, while the
second is not (since there is no known failure case).
Link: http://lkml.kernel.org/g/20170602122446.2427-1-david@sigma-star.at
Cc: <stable@vger.kernel.org> # 4.8+
Reported-by: David Gstir <david@sigma-star.at>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 42cfcafb91dabb0f9d9e08396c39824535948c67)
|
|
of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by <linux/of.h> work with const
of_device_ids. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
2376 808 128 3312 cf0 drivers/crypto/caam/jr.o
File size after constify caam_jr_match:
text data bss dec hex filename
2976 192 128 3296 ce0 drivers/crypto/caam/jr.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 52a33d99882291808681af8582358ddca5b0d0bc)
|
|
Fix to return error code -ENOMEM from the kmem_cache_create() error
handling case instead of 0(err is 0 here), as done elsewhere in this
function.
Fixes: 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 7e207d8550644c1076ceb070f40abf52701253ec)
|
|
dma_map_sg() might coalesce S/G entries, so use the number of S/G
entries returned by it instead of what sg_nents_for_len() initially
returns.
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 838e0a89e33a6e15492b8e4d700fc64c21ca3587)
|
|
When creating a new skb for the errata workaround, maintain the socket
and timestamp configurations for timestamp hardware offloading.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
According to PSCI standard v0.2, for CPU_SUSPEND call, which is
used by cpu idle framework, bit[16] of state parameter must be 0.
So update bit[16] of property 'arm,psci-suspend-param', which is
used as state parameter, to 0.
Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
|
|
1588 stack requires multicast communication. It's proper
to enable CONFIG_IP_MULTICAST in default.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
|
Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
|
|
drm_atomic_helper_suspend()/drm_atomic_helper_resume() are used in
suspend/resume functions. Interrupt can not be disabled when calling
drm_atomic_helper_resume(). Or else vblank interrupt will not generate
and the error about vblank wait timed out will occur.
This patch will enable interrupt before calling
drm_atomic_helper_resume().
The patch is verified on LS1021ATWR board.
Signed-off-by: Alison Wang <alison.wang@nxp.com>
|
|
As there is not corresponding clk_prepare_enable() for
fsl_dev->pix_clk in previous contexts, clk_disable_unprepare() for
fsl_dcu->pix_clk in suspend function will fail.
This patch will add clk_prepare_enable() for fsl_dev->pix_clk in
previous contexts and resume function to fix the issue.
This patch is verified on LS1021ATWR board.
Signed-off-by: Alison Wang <alison.wang@nxp.com>
|
|
Allow the I2C device on the same bus can’t claim irq.
Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
|
|
TKT253890, Controller needs driver to fill txfifo till 16 byte to
trigger data transfer even though extern data will not transferred.
Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
|
|
Add "snps,quirk-frame-length-adjustment" property to
USB3 node for erratum A009116. This property provides
value of GFLADJ_30MHZ for post silicon frame length
adjustment.
Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@freescale.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
|
|
Add adjust_frame_length_quirk for writing to fladj register
which adjusts (micro)frame length to value provided by
"snps,quirk-frame-length-adjustment" property thus avoiding
USB 2.0 devices to time-out over a longer run
Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
call trace:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x68/0x78
sysfs: cannot create duplicate filename '/bus/platform/devices/fsl-ehci.0'
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc6-next-20170411-00342-g415fab02 #30
Hardware name: Freescale LS1021A
(unwind_backtrace) from [<c040b91c>] (show_stack+0x10/0x14)
[<c040b91c>] (show_stack) from [<c070aa84>] (dump_stack+0x98/0xac)
[<c070aa84>] (dump_stack) from [<c04440bc>] (__warn+0xec/0x104)
[<c04440bc>] (__warn) from [<c044410c>] (warn_slowpath_fmt+0x38/0x48)
[<c044410c>] (warn_slowpath_fmt) from [<c05c0d10>] (sysfs_warn_dup+0x68/0x78)
[<c05c0d10>] (sysfs_warn_dup) from [<c05c0fc0>] (sysfs_do_create_link_sd+0xb4/0xc4)
[<c05c0fc0>] (sysfs_do_create_link_sd) from [<c096aa1c>] (bus_add_device+0xf4/0x18c)
[<c096aa1c>] (bus_add_device) from [<c0968eb4>] (device_add+0x38c/0x574)
[<c0968eb4>] (device_add) from [<c096d09c>] (platform_device_add+0xb8/0x220)
[<c096d09c>] (platform_device_add) from [<c0c503c4>] (fsl_usb2_mph_dr_of_probe+0x420/0x61c)
[<c0c503c4>] (fsl_usb2_mph_dr_of_probe) from [<c096d384>] (platform_drv_probe+0x4c/0xb0)
[<c096d384>] (platform_drv_probe) from [<c096b7c0>] (driver_probe_device+0x238/0x2d8)
[<c096b7c0>] (driver_probe_device) from [<c0969bfc>] (bus_for_each_drv+0x60/0x94)
[<c0969bfc>] (bus_for_each_drv) from [<c096b4a8>] (__device_attach+0xb0/0x114)
[<c096b4a8>] (__device_attach) from [<c096ab38>] (bus_probe_device+0x84/0x8c)
[<c096ab38>] (bus_probe_device) from [<c0968f14>] (device_add+0x3ec/0x574)
[<c0968f14>] (device_add) from [<c096d09c>] (platform_device_add+0xb8/0x220)
[<c096d09c>] (platform_device_add) from [<c0c503c4>] (fsl_usb2_mph_dr_of_probe+0x420/0x61c)
[<c0c503c4>] (fsl_usb2_mph_dr_of_probe) from [<c096d384>] (platform_drv_probe+0x4c/0xb0)
[<c096d384>] (platform_drv_probe) from [<c096b7c0>] (driver_probe_device+0x238/0x2d8)
[<c096b7c0>] (driver_probe_device) from [<c096b90c>] (__driver_attach+0xac/0xb0)
[<c096b90c>] (__driver_attach) from [<c0969b54>] (bus_for_each_dev+0x68/0x9c)
[<c0969b54>] (bus_for_each_dev) from [<c096ade8>] (bus_add_driver+0x1a4/0x21c)
[<c096ade8>] (bus_add_driver) from [<c096c3e4>] (driver_register+0x78/0xf8)
[<c096c3e4>] (driver_register) from [<c0401e30>] (do_one_initcall+0x40/0x168)
[<c0401e30>] (do_one_initcall) from [<c1600df8>] (kernel_init_freeable+0x164/0x200)
[<c1600df8>] (kernel_init_freeable) from [<c0eace38>] (kernel_init+0x8/0x110)
[<c0eace38>] (kernel_init) from [<c0407ca8>] (ret_from_fork+0x14/0x2c)
---[ end trace 7198de059d5332e9 ]---
fsl-usb2-mph-dr fsl-ehci.0: Can't register usb device
fsl-usb2-mph-dr: probe of fsl-ehci.0 failed with error -17
platform fsl-ehci.1: failed to claim resource 0: [mem 0x08600000-0x08600fff]
OF: ERROR: Bad of_node_put() on /soc/usb@8600000
CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 4.11.0-rc6-next-20170411-00342-g415fab02 #30
Hardware name: Freescale LS1021A
[<c041084c>] (unwind_backtrace) from [<c040b91c>] (show_stack+0x10/0x14)
[<c040b91c>] (show_stack) from [<c070aa84>] (dump_stack+0x98/0xac)
[<c070aa84>] (dump_stack) from [<c070c074>] (kobject_put+0x74/0xd0)
[<c070c074>] (kobject_put) from [<c096ceac>] (platform_device_release+0x10/0x3c)
[<c096ceac>] (platform_device_release) from [<c0966b88>] (device_release+0x2c/0x90)
[<c0966b88>] (device_release) from [<c070c074>] (kobject_put+0x74/0xd0)
[<c070c074>] (kobject_put) from [<c0c50340>] (fsl_usb2_mph_dr_of_probe+0x39c/0x61c)
[<c0c50340>] (fsl_usb2_mph_dr_of_probe) from [<c096d384>] (platform_drv_probe+0x4c/0xb0)
[<c096d384>] (platform_drv_probe) from [<c096b7c0>] (driver_probe_device+0x238/0x2d8)
[<c096b7c0>] (driver_probe_device) from [<c096b90c>] (__driver_attach+0xac/0xb0)
[<c096b90c>] (__driver_attach) from [<c0969b54>] (bus_for_each_dev+0x68/0x9c)
[<c0969b54>] (bus_for_each_dev) from [<c096ade8>] (bus_add_driver+0x1a4/0x21c)
[<c096ade8>] (bus_add_driver) from [<c096c3e4>] (driver_register+0x78/0xf8)
[<c096c3e4>] (driver_register) from [<c0401e30>] (do_one_initcall+0x40/0x168)
[<c0401e30>] (do_one_initcall) from [<c1600df8>] (kernel_init_freeable+0x164/0x200)
[<c1600df8>] (kernel_init_freeable) from [<c0eace38>] (kernel_init+0x8/0x110)
[<c0eace38>] (kernel_init) from [<c0407ca8>] (ret_from_fork+0x14/0x2c)
fsl-usb2-mph-dr fsl-ehci.0: Can't register usb device
fsl-usb2-mph-dr: probe of fsl-ehci.0 failed with error -16
usbcore: registered new interface driver usb-storage
Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
|
|
caam/qi has been backported to kernel v4.4, however the same is not
true for the Queue & Buffer Manager driver, i.e. the SDK version of it
is used instead of a backport of its upstream version.
Update caam/qi to work with QBMan from NXP SDK.
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
|
|
[core-linux part]
Update txq0's trans_start in order to prevent the netdev watchdog from
triggering too quickly. Since we set the LLTX flag, the stack won't update
the jiffies for other tx queues. Prevent the watchdog from checking the
other tx queues by adding the NETIF_HW_ACCEL_MQ flag.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
[dpaa part]
Update txq0's trans_start in order to prevent the netdev watchdog from
triggering too quickly. Since we set the LLTX flag, the stack won't update
the jiffies for other tx queues. Prevent the watchdog from checking the
other tx queues by adding the NETIF_HW_ACCEL_MQ flag.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
If the skb's headroom isn't aligned to 16 bytes, reallocate the entire
skb and resize its headroom to priv->tx_headroom. Update the pointers
to the network and transport headers accordingly.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
Allocate a new page and copy the skb's contents to it in order to
guarantee that 4k boundary crossings do not occur.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
The wrong register is checked for the Tx flow control bit,
it should have been maccfg1 not maccfg2.
This went unnoticed for so long probably because the impact is
hardly visible, not to mention the tangled code from adjust_link().
First, link flow control (i.e. handling of Rx/Tx link level pause frames)
is disabled by default (needs to be enabled via 'ethtool -A').
Secondly, maccfg2 always returns 0 for tx_flow_oldval (except for a few
old boards), which results in Tx flow control remaining always on
once activated.
Fixes: 45b679c9a3ccd9e34f28e6ec677b812a860eb8eb ("gianfar: Implement PAUSE frame generation support")
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5d621672bc1a1e5090c1ac5432a18c79e0e13e03)
|
|
The AQR106 and AQR107 can use the existing driver.
Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
For each subsequent device assigned to the m4u_group after its initial
allocation, we need to take an additional reference. Otherwise, the
caller of iommu_group_get_for_dev() will inadvertently remove the
reference taken by iommu_group_add_device(), and the group will be
freed prematurely if any device is removed.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
|
|
For each subsequent device assigned to the m4u_group after its initial
allocation, we need to take an additional reference. Otherwise, the
caller of iommu_group_get_for_dev() will inadvertently remove the
reference taken by iommu_group_add_device(), and the group will be
freed prematurely if any device is removed.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
|
|
If acpihid_device_group() finds an existing group for the relevant
devid, it should be taking an additional reference on that group.
Otherwise, the caller of iommu_group_get_for_dev() will inadvertently
remove the reference taken by iommu_group_add_device(), and the group
will be freed prematurely if any device is removed.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
|
|
When arm_smmu_device_group() finds an existing group due to Stream ID
aliasing, it should be taking an additional reference on that group.
Otherwise, the caller of iommu_group_get_for_dev() will inadvertently
remove the reference taken by iommu_group_add_device(), and the group
will be freed prematurely if any device is removed.
Reported-by: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
|
|
iommu_group_get_for_dev() expects that the IOMMU driver's device_group
callback return a group with a reference held for the given device.
Whilst allocating a new group is fine, and pci_device_group() correctly
handles reusing an existing group, there is no general means for IOMMU
drivers doing their own group lookup to take additional references on an
existing group pointer without having to also store device pointers or
resort to elaborate trickery.
Add an IOMMU-driver-specific function to fill the hole.
Acked-by: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
|
|
This patch adds iommu-map property for PCIe, which enables
SMMU for these devices on LS1088.
Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com>
|
|
This patch adds iommu-map property for PCIe, which enables
SMMU for these devices on LS208xA devices.
Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com>
|
|
Since everybody copied my own mistake from the DT binding example,
let's address all the offenders in one swift go.
Most of them got the CPU interface size wrong (4kB, while it should
be 8kB), except for both keystone platforms which got the control
interface wrong (4kB instead of 8kB).
In a few cases where I knew for sure what implementation was used,
I've added the "arm,gic-400" compatible string. I'm 99% sure that
this is what everyone is using, but short of having the TRM for
all the other SoCs, I've left them alone.
Acked-by: Shawn Guo <shawnguo@kernel.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
|
|
32bit system
Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
|
|
The tcf_destroy_chain call prototype has been moved.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
The tc_classify and tc_classify_compat calls have been merged. Adapt to
the new API.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
Signed-off-by: Camelia Groza camelia.groza@nxp.com
|
|
Signed-off-by: Camelia Groza camelia.groza@nxp.com
|
|
This patch is to move global variable 'clock' for DPAA PTP
clock pointer into ptp_priv_s struct.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
|
Layerscape DPAA platforms have updated dts to use ptp-timer
instead of rtc for Fman RTC node name. This patch is to
update it in driver.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
|
Layerscape DPAA platforms have updated dts to use ptp-timer phandle
instead of ptimer-handle for Fman RTC node. This patch is to
update it in driver.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
|
Signed-off-by: Camelia Groza camelia.groza@nxp.com
|
|
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
|