On Thu, Apr 13, 2017 at 11:06:16PM -0600, Logan Gunthorpe wrote:
> Or maybe I'll just send a patch for that
> separately seeing it doesn't depend on anything and is pretty simple. I
> can do that next week.
Yes, please just send that patch linux-nvme, we should be able to get
it into 4.12.
On 13/04/17 10:59 PM, Christoph Hellwig wrote:
> On Thu, Apr 13, 2017 at 04:05:15PM -0600, Logan Gunthorpe wrote:
>> This is a straight forward conversion in two places. Should kmap fail,
>> the code will return an INVALD_DATA error in the completion.
>
> It really should be using nvmet_copy_fro
On Thu, Apr 13, 2017 at 04:05:15PM -0600, Logan Gunthorpe wrote:
> This is a straight forward conversion in two places. Should kmap fail,
> the code will return an INVALD_DATA error in the completion.
It really should be using nvmet_copy_from_sgl to make things safer,
as we don't want to rely on a
On 14 April 2017 at 09:28, Sean Wang wrote:
>
> Hi PrasannaKumar,
>
> Add my comments inline
>
>>
>> Use readl_poll_timeout_atomic's return value or -EIO instead of
>> !!ready. This will simplify mtk_rng_read.
>>
>
> !!ready provided is in order to let blocking/non-blocking case could
> share same
On 14 April 2017 at 00:04, Abed Kamaluddin wrote:
> crypto: algif_compression - User-space interface for compression
>
> This patch adds af_alg plugin for compression algorithms of type scomp/acomp
> registered to the kernel crypto layer.
>
> The user needs to set operation (compression/decompress
Hi PrasannaKumar,
Add my comments inline
On Thu, 2017-04-13 at 14:09 +0530, PrasannaKumar Muralidharan wrote:
> Hi Sean,
>
> Mostly looks good, have few minor comments.
>
> On 13 April 2017 at 12:35, wrote:
> > +static bool mtk_rng_wait_ready(struct hwrng *rng, bool wait)
> > +{
> > +
Hi Corentin,
I all agree and appreciate your careful reviewing.
They will be added into the next one.
Sean
On Thu, 2017-04-13 at 13:06 +0200, Corentin Labbe wrote:
> Hello
>
> I have some minor comment below:
>
> On Thu, Apr 13, 2017 at 03:05:08PM +0800, sean.w...@mediatek.com wrote:
On 04/13/17 16:14, Matthias Kaehlcke wrote:
> El Mon, Apr 03, 2017 at 04:01:58PM -0700 Matthias Kaehlcke ha dit:
>
>> El Fri, Mar 17, 2017 at 04:50:19PM -0700 h...@zytor.com ha dit:
>>
>>> On March 16, 2017 5:15:16 PM PDT, Michael Davidson wrote:
Suppress clang warnings about potential unali
El Mon, Apr 03, 2017 at 04:01:58PM -0700 Matthias Kaehlcke ha dit:
> El Fri, Mar 17, 2017 at 04:50:19PM -0700 h...@zytor.com ha dit:
>
> > On March 16, 2017 5:15:16 PM PDT, Michael Davidson wrote:
> > >Suppress clang warnings about potential unaliged accesses
> > >to members in packed structs. T
These two drivers appear to duplicate the functionality of
sg_copy_buffer. So we clean them up to use the common code.
This helps us remove a couple of instances that would otherwise be
slightly tricky sg_map usages.
Signed-off-by: Logan Gunthorpe
---
drivers/scsi/csiostor/csio_scsi.c | 54 +++-
Conversion of a couple kmap_atomic instances to the sg_map helper
function.
However, it looks like there was a bug in the original code: the source
scatter lists offset (t->offset) was passed to ablkcipher_get which
added it to the destination address. This doesn't make a lot of
sense, but t->offs
Very straightforward conversion to the new function in two crypto
drivers.
Signed-off-by: Logan Gunthorpe
---
crypto/shash.c| 9 ++---
drivers/crypto/caam/caamalg.c | 8 +++-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/crypto/shash.c b/crypto/shash.c
in
Straightforward conversion to the new function.
Signed-off-by: Logan Gunthorpe
---
drivers/staging/unisys/visorhba/visorhba_main.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c
b/drivers/staging/unisys/visorhba/v
Very straightforward conversion of three scsi drivers.
Signed-off-by: Logan Gunthorpe
---
drivers/scsi/ipr.c | 27 ++-
drivers/scsi/isci/request.c | 42 +-
drivers/scsi/pmcraid.c | 19 ---
3 files chang
We use the sg_map helper but it's slightly more complicated
as we only check for the error when the mapping actually gets used.
Such that if the mapping failed but wasn't needed then no
error occurs.
Signed-off-by: Logan Gunthorpe
---
drivers/mmc/host/mmc_spi.c | 26 +++---
1
Convert the kmap and kmap_atomic uses to the sg_map function. We now
store the flags for the kmap instead of a boolean to indicate
atomicitiy. We also propogate a possible kmap error down and create
a new ISCSI_TCP_INTERNAL_ERR error type for this.
Signed-off-by: Logan Gunthorpe
---
drivers/scsi
Fairly straightforward conversions in all spots. In a couple of cases
any error gets propogated up should sg_map fail. In other
cases a warning is issued if the kmap fails seeing there's no
clear error path. This should not be an issue until someone tries to
use unmappable memory in the sgl with th
Straightforward conversion, but we have to WARN if unmappable
memory finds its way into the sgl.
Signed-off-by: Logan Gunthorpe
---
drivers/memstick/host/jmb38x_ms.c | 23 ++-
drivers/memstick/host/tifm_ms.c | 22 +-
2 files changed, 35 insertions(+), 10
Straightforward conversion to the new helper, except due to
the lack of error path, we have to warn if unmapable memory
is ever present in the sgl.
Signed-off-by: Logan Gunthorpe
---
drivers/block/xen-blkfront.c | 33 +++--
1 file changed, 27 insertions(+), 6 deletion
Straightforward conversion to sg_map helper. A couple paths will
WARN if the memory does not end up being mappable.
Signed-off-by: Logan Gunthorpe
---
drivers/mmc/host/tmio_mmc.h | 12 ++--
drivers/mmc/host/tmio_mmc_dma.c | 5 +
drivers/mmc/host/tmio_mmc_pio.c | 24 +
This is a single straightforward conversion from kmap to sg_map.
Signed-off-by: Logan Gunthorpe
---
drivers/gpu/drm/i915/i915_gem.c | 27 ---
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
This is a straight forward conversion in two places. Should kmap fail,
the code will return an INVALD_DATA error in the completion.
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/fabrics-cmd.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/n
Hi Everyone,
As part of my effort to enable P2P DMA transactions with PCI cards,
we've identified the need to be able to safely put IO memory into
scatterlists (and eventually other spots). This probably involves a
conversion from struct page to pfn_t but that migration is a ways off
and those dec
Straightforward conversion except there's no error path, so we WARN if
the sg_map fails.
Signed-off-by: Logan Gunthorpe
---
net/rds/ib_recv.c | 17 ++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index e10624a..7f8fa99 100644
This conversion is a bit complicated. We modiy the read_fifo,
write_fifo and copy_page functions to take a scatterlist instead of a
page. Thus we can use sg_map instead of kmap_atomic. There's a bit of
accounting that needed to be done for the offset for this to work.
(Seeing sg_map takes care of t
Straightforward conversion, except due to the lack of error path we
have to WARN if the memory in the SGL is not mappable.
Signed-off-by: Logan Gunthorpe
---
drivers/mmc/host/sdhci.c | 35 ++-
1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/drivers/
This is a straightforward conversion to the new function.
Signed-off-by: Logan Gunthorpe
---
drivers/mmc/host/sdricoh_cs.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c
index 5ff26ab..7eeed23 10064
Very straightforward conversion to the new function in all four spots.
Signed-off-by: Logan Gunthorpe
---
drivers/md/dm-crypt.c | 38 +-
1 file changed, 25 insertions(+), 13 deletions(-)
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 389a363
Very straightforward conversion of three scsi drivers.
Signed-off-by: Logan Gunthorpe
---
drivers/scsi/gdth.c| 9 +++--
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 14 +-
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 13 +
drivers/scsi/mvsas/mv_sas.c
Very straightforward conversion of three scsi drivers
Signed-off-by: Logan Gunthorpe
---
drivers/scsi/arcmsr/arcmsr_hba.c | 16
drivers/scsi/ips.c | 8
drivers/scsi/megaraid.c | 9 +++--
3 files changed, 23 insertions(+), 10 deletions(-)
di
The get_page in this area looks *highly* suspect due to there being no
corresponding put_page. However, I've left that as is to avoid breaking
things.
I've also removed the KMAP_ATOMIC_ARGS check as it appears to be dead
code that dates back to when it was first committed...
Signed-off-by: Logan
This patch introduces functions which kmap the pages inside an sgl. Two
variants are provided: one if an offset is required and one if the
offset is zero. These functions replace a common pattern of
kmap(sg_page(sg)) that is used in about 50 places within the kernel.
The motivation for this work i
crypto: algif_compression - User-space interface for compression
This patch adds af_alg plugin for compression algorithms of type scomp/acomp
registered to the kernel crypto layer.
The user needs to set operation (compression/decompression) as a control
message to sendmsg, identical to selecting
Hi Herbert,
This patch adds compression support to the AF_ALG interface exported by the
kernel crypto API. By extending AF_ALG, all compression algorithms of types
scomp and acomp, which the kernel crypto API allows access to, are now also
accessible from userspace.
The new compression interfac
Up to now, 'crypto_alloc_shash()' may return a valid pointer, an error
pointer or NULL (in case of invalid parameter)
Update it to always return an error pointer in case of error. It now
returns ERR_PTR(-EINVAL) instead of NULL in case of invalid parameter.
This simplifies error handling.
Also fi
From: Gary R Hook
Ensure that we disable interrupts first when shutting down
the driver.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
i
Each CCP queue can product interrupts for 4 conditions:
operation complete, queue empty, error, and queue stopped.
This driver only works with completion and error events.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c |9 +
drivers/crypto/ccp/ccp-dev.h|5 ++--
Correct the driver to attend to only relevant interrupt
bits, and ensure that interrupts are managed properly
at module unload.
Changes from V1:
- Changed the #define to "SUPPORTED_INTERRUPTS"
---
Gary R Hook (2):
crypto: ccp - Use only the relevant interrupt bits
crypto: ccp - Disab
Le 13/04/2017 à 18:13, Dan Carpenter a écrit :
On Thu, Apr 13, 2017 at 08:37:50PM +0530, Harsh Jain wrote:
On Thu, Apr 13, 2017 at 8:20 PM, Christophe JAILLET
wrote:
Le 13/04/2017 à 16:04, Dan Carpenter a écrit :
On Thu, Apr 13, 2017 at 02:14:30PM +0200, Christophe JAILLET wrote:
If 'chcr_al
On Thu, Apr 13, 2017 at 08:37:50PM +0530, Harsh Jain wrote:
> On Thu, Apr 13, 2017 at 8:20 PM, Christophe JAILLET
> wrote:
> > Le 13/04/2017 à 16:04, Dan Carpenter a écrit :
> >>
> >> On Thu, Apr 13, 2017 at 02:14:30PM +0200, Christophe JAILLET wrote:
> >>>
> >>> If 'chcr_alloc_shash()' a few line
On Thu, Apr 13, 2017 at 8:20 PM, Christophe JAILLET
wrote:
> Le 13/04/2017 à 16:04, Dan Carpenter a écrit :
>>
>> On Thu, Apr 13, 2017 at 02:14:30PM +0200, Christophe JAILLET wrote:
>>>
>>> If 'chcr_alloc_shash()' a few lines above fails, 'base_hash' can be an
>>> error pointer when we 'goto out'.
Hi all,
this exports the PCI layer pcie_flr helper, and removes various opencoded
copies of it.
Currently we opencode the FLR sequence in lots of place, export a core
helper instead. We split out the probing for FLR support as all the
non-core callers already know their hardware.
Signed-off-by: Christoph Hellwig
---
drivers/pci/pci.c | 34 +-
include/linu
Signed-off-by: Christoph Hellwig
---
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 15 +--
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
index 7b83be4ce1fe..
The 82599 quirk contained an outdated copy of the FLR code.
Signed-off-by: Christoph Hellwig
---
drivers/pci/quirks.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 673683660b5c..b1775354cc69 100644
--- a/dr
Signed-off-by: Christoph Hellwig
---
drivers/infiniband/hw/hfi1/chip.c | 4 ++--
drivers/infiniband/hw/hfi1/hfi.h | 1 -
drivers/infiniband/hw/hfi1/pcie.c | 30 --
3 files changed, 2 insertions(+), 33 deletions(-)
diff --git a/drivers/infiniband/hw/hfi1/chip.c
b/d
Signed-off-by: Christoph Hellwig
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 16 ++--
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index a7a430a7be2c..543ddde5f8e2
Instead of copy & pasting and old version of the code.
Signed-off-by: Christoph Hellwig
---
drivers/pci/quirks.c | 15 +--
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index b1775354cc69..b54c0d986f2a 100644
--- a/drivers/p
Signed-off-by: Christoph Hellwig
---
drivers/crypto/qat/qat_common/adf_aer.c | 15 +--
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/crypto/qat/qat_common/adf_aer.c
b/drivers/crypto/qat/qat_common/adf_aer.c
index 2839fccdd84b..d3e25c37dc33 100644
--- a/drivers
From: Thomas Gleixner
Date: Thu, 13 Apr 2017 10:20:23 +0200 (CEST)
> spu_queue_register() needs to invoke setup functions on a particular
> CPU. This is achieved by temporarily setting the affinity of the
> calling user space thread to the requested CPU and reset it to the original
> affinity aft
Le 13/04/2017 à 16:04, Dan Carpenter a écrit :
On Thu, Apr 13, 2017 at 02:14:30PM +0200, Christophe JAILLET wrote:
If 'chcr_alloc_shash()' a few lines above fails, 'base_hash' can be an
error pointer when we 'goto out'.
So checking for NULL here is not enough because it is likely that
'chcr_free
On Thu, Apr 13, 2017 at 02:14:19PM +0200, Christophe JAILLET wrote:
> 'chcr_alloc_shash()' can return NULL. Here it is not possible because this
> code is reached only if 'get_alg_config()' a few lines above has succeeded.
> So we are garanteed that the value of 'max_authsize' is a correct
> parame
On Thu, Apr 13, 2017 at 02:14:30PM +0200, Christophe JAILLET wrote:
> If 'chcr_alloc_shash()' a few lines above fails, 'base_hash' can be an
> error pointer when we 'goto out'.
> So checking for NULL here is not enough because it is likely that
> 'chcr_free_shash' will crash if we pass an error poi
On Thu, 30 Mar 2017 13:30:17 -0300
Paulo Flabiano Smorigo wrote:
> On 2017-03-29 20:08, Tyrel Datwyler wrote:
> > On 03/29/2017 08:13 AM, Michal Suchánek wrote:
> >> On Wed, 29 Mar 2017 16:51:35 +0200
> >> Greg Kroah-Hartman wrote:
> >>
> >>> On Wed, Mar 29, 2017 at 02:56:39PM +0200, Michal
If 'chcr_alloc_shash()' a few lines above fails, 'base_hash' can be an
error pointer when we 'goto out'.
So checking for NULL here is not enough because it is likely that
'chcr_free_shash' will crash if we pass an error pointer.
Signed-off-by: Christophe JAILLET
---
Another solution, amybe safer,
This serie is divided into 2 patches. They are more or less related to the
same issue, but the first patch is not a bug in itself, just a clean-up
(IMHO).
If I'm correct, the 2nd one, is a real (unlikely) issue.
Christophe JAILLET (2):
crypto: chcr - Improve error checking
crypto: chcr - Fix e
'chcr_alloc_shash()' can return NULL. Here it is not possible because this
code is reached only if 'get_alg_config()' a few lines above has succeeded.
So we are garanteed that the value of 'max_authsize' is a correct
parameter.
Anyway, this is harmless to add a check for NULL.
Signed-off-by: Chris
Hello
I have some minor comment below:
On Thu, Apr 13, 2017 at 03:05:08PM +0800, sean.w...@mediatek.com wrote:
> From: Sean Wang
>
> This patch adds support for hardware random generator on MT7623 SoC
> and should also work on other similar Mediatek SoCs. Currently,
> the driver is already test
Allow users of padata to determine the queue length themselves, via this
added helper function, so that we can later remove the hard-coded 1000-
job limit. We thus add a helper function, and then move the limiting
functionality to pcrypt-proper, since it was the only current consumer
relying on the
Hi Milan,
On 10 April 2017 at 19:30, Milan Broz wrote:
Thank you for the reply.
> Well, it is good that there is no performance degradation but it
> would be nice to have some user of it that proves it is really
> working for your hw.
I have been able to get access to a hardware with IV genera
Hi Sean,
Mostly looks good, have few minor comments.
On 13 April 2017 at 12:35, wrote:
> +static bool mtk_rng_wait_ready(struct hwrng *rng, bool wait)
> +{
> + struct mtk_rng *priv = to_mtk_rng(rng);
> + int ready;
> +
> + ready = readl(priv->base + RNG_CTRL) & RNG_READY;
> +
spu_queue_register() needs to invoke setup functions on a particular
CPU. This is achieved by temporarily setting the affinity of the
calling user space thread to the requested CPU and reset it to the original
affinity afterwards.
That's racy vs. CPU hotplug and concurrent affinity settings for th
From: Sean Wang
Document the devicetree bindings for Mediatek random number
generator which could be found on MT7623 SoC or other similar
Mediatek SoCs.
Signed-off-by: Sean Wang
---
Documentation/devicetree/bindings/rng/mtk-rng.txt | 18 ++
1 file changed, 18 insertions(+)
cre
From: Sean Wang
This patch adds support for hardware random generator on MT7623 SoC
and should also work on other similar Mediatek SoCs. Currently,
the driver is already tested successfully with rng-tools.
Signed-off-by: Sean Wang
---
drivers/char/hw_random/Kconfig | 16 +++-
drivers/char/h
From: Sean Wang
This patchset introduces support for Mediatek hardware random generator (RNG)
Currently, the driver is already tested successfully with rng-tools on MT7623
SoC. And it should also be workable on other similar Mediatek SoCs.
SoC that also works on other similar SoCs.
Sean Wang (2
65 matches
Mail list logo