[PATCH v5 3/5] gadget: Support for the usb charger framework

2015-11-06 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. Introduce a callback 'get_charger_type' which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-17 Thread Baolin Wang
On 17 November 2015 at 21:34, Andy Shevchenko <andy.shevche...@gmail.com> wrote: > On Mon, Nov 16, 2015 at 9:05 AM, Baolin Wang <baolin.w...@linaro.org> wrote: >> It dose not work when we want to use the usb-to-serial port based >> on one usb gadget as a console. Thus

[PATCH v4 0/5] Introduce usb charger framework to deal with the usb gadget power negotation

2015-09-24 Thread Baolin Wang
and split the patch to avoid breaking build. - Other modifications. Baolin Wang (5): gadget: Introduce the notifier functions gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget: Integrate with the usb gadget supporting for usb charger power

[PATCH v4 2/5] gadget: Introduce the usb charger framework

2015-09-24 Thread Baolin Wang
charger to get notified by status changes from the usb charger. It will report to power user to set the current limitation when detecting the usb charger is added or removed from extcon device state or usb gadget state. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/

[PATCH v4 5/5] power: wm831x_power: Support USB charger current limit management

2015-09-24 Thread Baolin Wang
-by: Mark Brown <broo...@kernel.org> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Lee Jones <lee.jo...@linaro.org> Acked-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> Acked-by: Peter Chen <peter.c...@freescale.com> Acked-by: Seba

[PATCH v4 4/5] gadget: Integrate with the usb gadget supporting for usb charger

2015-09-24 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger should get the type by the 'get_charger_type' callback which is implemented by the usb gadget operations, and get the usb charger pointer from struct 'usb_gadget'. Signed-off-by: Baolin Wang <baolin.w...@linaro.

[PATCH v4 1/5] gadget: Introduce the notifier functions

2015-09-24 Thread Baolin Wang
-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/udc/udc-core.c | 32 include/linux/usb/gadget.h| 18 ++ 2 files changed, 50 insertions(+) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c

[PATCH v4 3/5] gadget: Support for the usb charger framework

2015-09-24 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. Introduce a callback 'get_charger_type' which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang

[PATCH v7 1/4] gadget: Introduce the usb charger framework

2015-12-08 Thread Baolin Wang
or usb gadget state. This patch doesn't yet integrate with the gadget code, so some functions which rely on the 'gadget' are not completed, that will be implemented in the following patches. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/Kconfig |7 + drive

[PATCH v7 3/4] gadget: Integrate with the usb gadget supporting for usb charger

2015-12-08 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger should get the type by the 'get_charger_type' callback which is implemented by the usb gadget operations, and get the usb charger pointer from struct 'usb_gadget'. Signed-off-by: Baolin Wang <baolin.w...@linaro.

[PATCH v7 2/4] gadget: Support for the usb charger framework

2015-12-08 Thread Baolin Wang
will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/udc/udc-core.c | 11 +++ include/linux/usb/gadget.h| 11 +++ 2 files changed, 22 insertions(+) diff

[PATCH v7 4/4] power: wm831x_power: Support USB charger current limit management

2015-12-08 Thread Baolin Wang
-by: Mark Brown <broo...@kernel.org> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Lee Jones <lee.jo...@linaro.org> Acked-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> Acked-by: Peter Chen <peter.c...@freescale.com> Acked-by: Seba

[PATCH v7 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2015-12-08 Thread Baolin Wang
. - Integrate with the vbus staff in the gadget API. - Spilt up the functionality for userspace with one file per USB charger type. Baolin Wang (4): gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget: Integrate with the usb gadget supporting

Re: [dm-devel] [PATCH 0/2] Introduce the request handling for dm-crypt

2015-12-02 Thread Baolin Wang
On 3 December 2015 at 03:56, Alasdair G Kergon <a...@redhat.com> wrote: > On Wed, Dec 02, 2015 at 08:46:54PM +0800, Baolin Wang wrote: >> These are the benchmarks for request based dm-crypt. Please check it. > > Now please put request-based dm-crypt completely to one

Re: [dm-devel] [PATCH 0/2] Introduce the request handling for dm-crypt

2015-12-03 Thread Baolin Wang
On 3 December 2015 at 23:49, Mikulas Patocka <mpato...@redhat.com> wrote: > > > On Thu, 3 Dec 2015, Baolin Wang wrote: > >> On 3 December 2015 at 10:56, Baolin Wang <baolin.w...@linaro.org> wrote: >> > On 3 December 2015 at 03:56, Alasdair G Kergon <a.

Re: [dm-devel] [PATCH 0/2] Introduce the request handling for dm-crypt

2015-12-03 Thread Baolin Wang
On 3 December 2015 at 23:47, Mikulas Patocka <mpato...@redhat.com> wrote: > > > On Thu, 3 Dec 2015, Baolin Wang wrote: > >> On 3 December 2015 at 03:56, Alasdair G Kergon <a...@redhat.com> wrote: >> > On Wed, Dec 02, 2015 at 08:46:54PM +0800, Baolin Wan

Re: [dm-devel] [PATCH 0/2] Introduce the request handling for dm-crypt

2015-12-03 Thread Baolin Wang
On 3 December 2015 at 19:07, Zdenek Kabelac <zkabe...@redhat.com> wrote: > Dne 3.12.2015 v 11:36 Baolin Wang napsal(a): > >> On 3 December 2015 at 10:56, Baolin Wang <baolin.w...@linaro.org> wrote: >>> >>> On 3 December 2015 at 03:56, Alasdair G Kergon

Re: [dm-devel] [PATCH 0/2] Introduce the request handling for dm-crypt

2015-12-03 Thread Baolin Wang
On 3 December 2015 at 10:56, Baolin Wang <baolin.w...@linaro.org> wrote: > On 3 December 2015 at 03:56, Alasdair G Kergon <a...@redhat.com> wrote: >> On Wed, Dec 02, 2015 at 08:46:54PM +0800, Baolin Wang wrote: >>> These are the benchmarks for request based dm-cry

Re: [PATCH v6 1/4] gadget: Introduce the usb charger framework

2015-12-06 Thread Baolin Wang
On 6 December 2015 at 00:27, Sebastian Reichel <s...@kernel.org> wrote: > Hi, > > On Mon, Nov 16, 2015 at 02:33:31PM +0800, Baolin Wang wrote: >> +static ssize_t cur_limit_show(struct device *dev, >> + struct device_attribute *attr, >>

Re: [PATCH 0/2] Introduce the request handling for dm-crypt

2015-12-02 Thread Baolin Wang
Hi All, These are the benchmarks for request based dm-crypt. Please check it. 一、Environment 1. Hardware configuration Board: Beaglebone black Processor: Am335x 1GHz ARM Cortex-A8 RAM:512M SD card:8G Kernel version:4.4-rc1 2. Encryption method (1) Use cbc(aes) cipher to encrypt the block device

Re: [PATCH v2 0/2] Introduce the bulk IV mode for improving the crypto engine efficiency

2015-12-16 Thread Baolin Wang
Hi Milan, On 16 December 2015 at 16:08, Milan Broz <gmazyl...@gmail.com> wrote: > On 12/16/2015 04:18 AM, Baolin Wang wrote: >> From the dm-crypt performance report, we found it shows low efficiency >> with crypto engine for some mode (like ecb or xts mode). Because in dm

[PATCH v3 0/2] Introduce the bulk IV mode for improving the crypto engine efficiency

2015-12-16 Thread Baolin Wang
tor. Change since v2: - Introduce blk_bio_map_sg() function to map one bio. - Do some modifications for checking sg entry. Baolin Wang (2): block: Introduce blk_bio_map_sg() to map one bio md: dm-crypt: Introduce the bulk IV mode for bulk crypto block/blk-merge.c | 45 +++ drivers/md

[PATCH v3 2/2] md: dm-crypt: Introduce the bulk IV mode for bulk crypto

2015-12-16 Thread Baolin Wang
(beaglebone black board) using 64KB I/Os on an eMMC storage device I saw about 60% improvement in throughput for encrypted writes, and about 100% improvement for encrypted reads. But this is not fit for other modes which need different IV for each sector. Signed-off-by: Baolin Wang <baoli

[PATCH v3 1/2] block: Introduce blk_bio_map_sg() to map one bio

2015-12-16 Thread Baolin Wang
In dm-crypt, it need to map one bio to scatterlist for improving the encryption efficiency. Thus this patch introduces the blk_bio_map_sg() function to map one bio with scatterlists. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- block/blk-merge.c

Re: [PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-14 Thread Baolin Wang
>> + /* >> + * Here we need to check if it can be encrypted or decrypted with >> + * bulk block, which means these encryption modes don't need IV or >> + * just need one initial IV. For bulk mode, we can expand the >> + * scatterlist entries to map the bio, then send all

Re: [PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-15 Thread Baolin Wang
On 15 December 2015 at 16:20, Milan Broz <gmazyl...@gmail.com> wrote: > On 12/15/2015 03:56 AM, Baolin Wang wrote: >>>> + /* >>>> + * Here we need to check if it can be encrypted or decrypted with >>>> + * bulk block, whi

[PATCH v2 2/2] md: dm-crypt: Introduce the bulk IV mode for bulk crypto

2015-12-15 Thread Baolin Wang
(beaglebone black board) using 64KB I/Os on an eMMC storage device I saw about 60% improvement in throughput for encrypted writes, and about 100% improvement for encrypted reads. But this is not fit for other modes which need different IV for each sector. Signed-off-by: Baolin Wang <baoli

[PATCH v2 0/2] Introduce the bulk IV mode for improving the crypto engine efficiency

2015-12-15 Thread Baolin Wang
tor. Change since v1: - Introduce one different IV mode. - Change the conditions for bulk mode. Baolin Wang (2): block: Export the __blk_bios_map_sg() to map one bio md: dm-crypt: Introduce the bulk IV mode for bulk crypto block/blk-merge.c |7 +- drivers/md/dm-crypt.c |

[PATCH v2 1/2] block: Export the __blk_bios_map_sg() to map one bio

2015-12-15 Thread Baolin Wang
In dm-crypt, it need to map one bio to scatterlist for improving the encryption efficiency. Thus this patch exports the __blk_bios_map_sg() function to map one bio with scatterlists. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- block/blk-merge.c |7 --- include

[PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-14 Thread Baolin Wang
. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/md/dm-crypt.c | 315 - 1 file changed, 309 insertions(+), 6 deletions(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 917d47e..9f6f131 100644 --- a/drivers/md/dm-c

[PATCH 1/2] block: Export the __blk_bios_map_sg() to map one bio

2015-12-14 Thread Baolin Wang
In dm-crypt, it need to map one bio to scatterlist for improving the encryption efficiency. Thus this patch exports the __blk_bios_map_sg() function to map one bio with scatterlists. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- block/blk-merge.c |7 --- include

[PATCH 0/2] Optimize the dm-crypt for XTS mode

2015-12-14 Thread Baolin Wang
the scatterlists to the crypto engine which can improve the performance. Baolin Wang (2): block: Export the __blk_bios_map_sg() to map one bio md: dm-crypt: Optimize the dm-crypt for XTS mode block/blk-merge.c |7 +- drivers/md/dm-crypt.c | 315

Re: [PATCH v2 0/2] Introduce the bulk IV mode for improving the crypto engine efficiency

2015-12-16 Thread Baolin Wang
On 16 December 2015 at 16:08, Milan Broz <gmazyl...@gmail.com> wrote: > On 12/16/2015 04:18 AM, Baolin Wang wrote: >> From the dm-crypt performance report, we found it shows low efficiency >> with crypto engine for some mode (like ecb or xts mode). Because in dm >> cry

[PATCH v7 2/4] gadget: Support for the usb charger framework

2016-01-03 Thread Baolin Wang
will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/udc/udc-core.c | 11 +++ include/linux/usb/gadget.h| 11 +++ 2 files changed, 22 insertions(+) diff

[PATCH v7 1/4] gadget: Introduce the usb charger framework

2016-01-03 Thread Baolin Wang
or usb gadget state. This patch doesn't yet integrate with the gadget code, so some functions which rely on the 'gadget' are not completed, that will be implemented in the following patches. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/Kconfig |7 + drive

[PATCH v7 3/4] gadget: Integrate with the usb gadget supporting for usb charger

2016-01-03 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger should get the type by the 'get_charger_type' callback which is implemented by the usb gadget operations, and get the usb charger pointer from struct 'usb_gadget'. Signed-off-by: Baolin Wang <baolin.w...@linaro.

[PATCH v7 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-01-03 Thread Baolin Wang
. - Integrate with the vbus staff in the gadget API. - Spilt up the functionality for userspace with one file per USB charger type. - Rebase on "4.4-rc7". Baolin Wang (4): gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget:

[PATCH v7 4/4] power: wm831x_power: Support USB charger current limit management

2016-01-03 Thread Baolin Wang
-by: Mark Brown <broo...@kernel.org> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Lee Jones <lee.jo...@linaro.org> Acked-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> Acked-by: Peter Chen <peter.c...@freescale.com> Acked-by: Seba

Re: [PATCH v2 0/2] Introduce the bulk IV mode for improving the crypto engine efficiency

2016-01-03 Thread Baolin Wang
Hi Milan, On 3 January 2016 at 06:46, Milan Broz wrote: > > Sorry for delay, I tried to compile it. > It doesn't crash now, but it also does not work. > > You usage of IV in XTS mode is not correct - it cannot just work this way, > you have to initialize IV after each block.

Re: [PATCH v2 0/2] Introduce the bulk IV mode for improving the crypto engine efficiency

2016-01-05 Thread Baolin Wang
On 5 January 2016 at 04:13, Mark Brown wrote: > On Sat, Jan 02, 2016 at 11:46:08PM +0100, Milan Broz wrote: > >> Anyway, I think that you should optimize driver, not add strange hw-dependent >> crypto modes to dmcrypt. This is not the first crypto accelerator that is >> just

Re: [PATCH v7 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-01-07 Thread Baolin Wang
On 7 January 2016 at 19:25, Alex Shi wrote: > Hi, Baolin, > > There is similar gadget/charger driver on QC msm tree, > git://codeaurora.org/quic/la/kernel/msm-3.10 msm-3.10 > You may check that as a reference. > OK. Thanks. -- Baolin.wang Best Regards -- To unsubscribe

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-18 Thread Baolin Wang
On 18 November 2015 at 17:32, Andy Shevchenko <andy.shevche...@gmail.com> wrote: > On Wed, Nov 18, 2015 at 4:15 AM, Baolin Wang <baolin.w...@linaro.org> wrote: >> On 17 November 2015 at 21:34, Andy Shevchenko <andy.shevche...@gmail.com> >> wrote: >>> On

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-18 Thread Baolin Wang
On 18 November 2015 at 20:05, David Laight <david.lai...@aculab.com> wrote: > From: Baolin Wang >> Sent: 18 November 2015 10:45 >> On 18 November 2015 at 17:32, Andy Shevchenko <andy.shevche...@gmail.com> >> wrote: >> > On Wed, Nov 18, 2015 at 4:

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-18 Thread Baolin Wang
On 18 November 2015 at 23:32, Peter Hurley <pe...@hurleysoftware.com> wrote: > Hi Baolin, > > On 11/16/2015 02:05 AM, Baolin Wang wrote: >> It dose not work when we want to use the usb-to-serial port based >> on one usb gadget as a console. Thus this patch adds th

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-18 Thread Baolin Wang
> >> +{ >> + struct gscons_info *info = gserial_cons.data; >> + int port_num = gserial_cons.index; >> + struct usb_request *req; >> + struct gs_port *port; >> + struct usb_ep *ep; >> + >> + if (port_num >= MAX_U_SERIAL_PORTS || port_num < 0) { >> + pr_err("%s:

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-19 Thread Baolin Wang
On 19 November 2015 at 17:36, Peter Hurley <pe...@hurleysoftware.com> wrote: > On 11/19/2015 01:48 AM, Baolin Wang wrote: >>> >>>> +{ >>>> + struct gscons_info *info = gserial_cons.data; >>>> + int port_num = gserial_cons.index; >>

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-19 Thread Baolin Wang
On 19 November 2015 at 18:28, Peter Hurley <pe...@hurleysoftware.com> wrote: > On 11/18/2015 09:35 PM, Baolin Wang wrote: >> On 18 November 2015 at 23:32, Peter Hurley <pe...@hurleysoftware.com> wrote: >>> Hi Baolin, >>> >>> On 11/16/2015 02:05 AM,

[PATCH v2] usb: gadget: Add the console support for usb-to-serial port

2015-11-20 Thread Baolin Wang
-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/Kconfig |6 + drivers/usb/gadget/function/u_serial.c | 258 2 files changed, 264 insertions(+) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 3

Re: [PATCH v2] usb: dwc3: host: Set the dma_ops for xhci device

2016-06-06 Thread Baolin Wang
On 6 June 2016 at 22:59, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> On ARM64 platform, it will set 'dummy_dma_ops' for device dma_ops if >> it did not call 'arch_setup_dma_ops' at device creation time, tha

[PATCH] arm64: Implement arch_setup_pdev_archdata hook

2016-06-07 Thread Baolin Wang
dma_ops for these devices. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- arch/arm64/mm/dma-mapping.c | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index c566ec8..04e057b 100644 --- a/arch/arm64/

Re: [PATCH] arm64: Implement arch_setup_pdev_archdata hook

2016-06-07 Thread Baolin Wang
On 7 June 2016 at 17:15, Robin Murphy <robin.mur...@arm.com> wrote: > On 07/06/16 09:29, Baolin Wang wrote: >> >> Now on ARM64 platform, it will set 'dummy_dma_ops' for device dma_ops if >> it did not call 'arch_setup_dma_ops' at device creation time by issuing >>

Re: [PATCH v2] usb: dwc3: host: Set the dma_ops for xhci device

2016-06-08 Thread Baolin Wang
Hi, On 6 June 2016 at 22:59, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> On ARM64 platform, it will set 'dummy_dma_ops' for device dma_ops if >> it did not call 'arch_setup_dma_ops' at device creation t

Re: [RFC v4 2/4] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-07 Thread Baolin Wang
Hi Herbert, On 7 June 2016 at 22:16, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Tue, Jun 07, 2016 at 08:17:05PM +0800, Baolin Wang wrote: >> Now some cipher hardware engines prefer to handle bulk block rather than one >> sector (512 bytes) created by dm-crypt, cause

[RFC v4 0/4] Introduce the bulk mode method when sending request to crypto layer

2016-06-07 Thread Baolin Wang
the blk_bio_map_sg() function to avoid duplicated code. - Move the sg table allocation to crypt_ctr_cipher() function to avoid memory allocation in the IO path. - Remove the crypt_sg_entry() function. - Other optimization. Baolin Wang (4): block: Introduce blk_bio_map_sg() to map one bio crypto

[RFC v4 1/4] block: Introduce blk_bio_map_sg() to map one bio

2016-06-07 Thread Baolin Wang
In dm-crypt, it need to map one bio to scatterlist for improving the hardware engine encryption efficiency. Thus this patch introduces the blk_bio_map_sg() function to map one bio with scatterlists. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- block/blk-merge.c

[RFC v4 2/4] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-07 Thread Baolin Wang
always 512 bytes and thus increase the hardware engine processing speed. So introduce 'CRYPTO_ALG_BULK' flag to indicate this cipher can support bulk mode. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- include/crypto/skcipher.h |7 +++ include/linux/crypto.h|6 +++

[RFC v4 4/4] crypto: Add the CRYPTO_ALG_BULK flag for ecb(aes) cipher

2016-06-07 Thread Baolin Wang
Since the ecb(aes) cipher does not need to handle the IV things for encryption or decryption, that means it can support for bulk block when handling data. Thus this patch adds the CRYPTO_ALG_BULK flag for ecb(aes) cipher to improve the hardware aes engine's efficiency. Signed-off-by: Baolin Wang

[RFC v4 3/4] md: dm-crypt: Introduce the bulk mode method when sending request

2016-06-07 Thread Baolin Wang
(beaglebone black board with ecb(aes) cipher and dd testing) using 64KB I/Os on an eMMC storage device I saw about 127% improvement in throughput for encrypted writes, and about 206% improvement for encrypted reads. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/md/dm-crypt.c

Re: [RFC v2 2/3] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-03 Thread Baolin Wang
On 3 June 2016 at 14:51, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Fri, Jun 03, 2016 at 02:48:34PM +0800, Baolin Wang wrote: >> >> If we move the IV generation into the crypto API, we also can not >> handle every algorithm with the bulk interface. Cause we al

Re: [RFC v2 2/3] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-03 Thread Baolin Wang
Hi Herbet, On 2 June 2016 at 16:26, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Fri, May 27, 2016 at 07:11:23PM +0800, Baolin Wang wrote: >> Now some cipher hardware engines prefer to handle bulk block rather than one >> sector (512 bytes) created by dm-crypt, cause

Re: [RFC v2 2/3] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-03 Thread Baolin Wang
On 3 June 2016 at 15:54, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Fri, Jun 03, 2016 at 03:10:31PM +0800, Baolin Wang wrote: >> On 3 June 2016 at 14:51, Herbert Xu <herb...@gondor.apana.org.au> wrote: >> > On Fri, Jun 03, 2016 at 02:48:34PM +0800, Baolin

[PATCH] usb: dwc3: host: Set the dma_ops for xhci device

2016-06-03 Thread Baolin Wang
It will be failed when xhci device set the dma mask, if the xhci device dma_ops is dummy. Thus set the xhci device dma_ops from the parent device. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/host.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drive

Re: [RFC v2 2/3] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-03 Thread Baolin Wang
On 3 June 2016 at 16:21, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Fri, Jun 03, 2016 at 04:15:28PM +0800, Baolin Wang wrote: >> >> Suppose the cbc(aes) algorithm, which can not be handled through bulk >> interface, it need to map the data sector by sector. &

Re: [RFC v2 2/3] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-03 Thread Baolin Wang
On 3 June 2016 at 18:09, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Fri, Jun 03, 2016 at 05:23:59PM +0800, Baolin Wang wrote: >> >> Assuming one 64K size bio coming, we can map the whole bio with one sg >> table in crypt_convert_bulk_block() function. But if w

[RFC 0/3] Introduce the bulk mode method when sending request to crypto layer

2016-05-25 Thread Baolin Wang
This patchset will check if the cipher can support bulk mode, then dm-crypt will handle different ways to send requests to crypto layer according to cipher mode. Looking forward to any comments and suggestions. Thanks. Baolin Wang (3): block: Introduce blk_bio_map_sg() to map one bio crypto

[RFC 2/3] crypto: Introduce CRYPTO_ALG_BULK flag

2016-05-25 Thread Baolin Wang
always 512 bytes and thus increase the hardware engine processing speed. So introduce 'CRYPTO_ALG_BULK' flag to indicate this cipher can support bulk mode. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- include/crypto/skcipher.h |7 +++ include/linux/crypto.h|6 +++

[RFC 3/3] md: dm-crypt: Introduce the bulk mode method when sending request

2016-05-25 Thread Baolin Wang
(beaglebone black board) using 64KB I/Os on an eMMC storage device I saw about 60% improvement in throughput for encrypted writes, and about 100% improvement for encrypted reads. But this is not fit for other modes which need different IV for each sector. Signed-off-by: Baolin Wang <baoli

[RFC 1/3] block: Introduce blk_bio_map_sg() to map one bio

2016-05-25 Thread Baolin Wang
In dm-crypt, it need to map one bio to scatterlist for improving the hardware engine encryption efficiency. Thus this patch introduces the blk_bio_map_sg() function to map one bio with scatterlists. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- block/blk-merge.c

[RESEND PATCH v11 4/4] power: wm831x_power: Support USB charger current limit management

2016-06-13 Thread Baolin Wang
-by: Mark Brown <broo...@kernel.org> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Lee Jones <lee.jo...@linaro.org> Acked-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> Acked-by: Peter Chen <peter.c...@freescale.com> Acked-by: Seba

[RESEND PATCH v11 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-06-13 Thread Baolin Wang
usb_charger_get_state() function to check charger state. - Remove the mutex lock in usb_charger_set_cur_limit_by_type() function in case will be issued in atomic context. Baolin Wang (4): gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget: Integrate

[RESEND PATCH v11 3/4] gadget: Integrate with the usb gadget supporting for usb charger

2016-06-13 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger can implement the usb_charger_plug_by_gadget() function and usb_charger_exit() function by getting 'struct usb_charger' from 'struct gadget'. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadg

[RESEND PATCH v11 2/4] gadget: Support for the usb charger framework

2016-06-13 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. It will report to the usb charger when the gadget state is changed, then the usb charger can do the power things. Signed-off-by: Baolin Wang <baoli

Re: [PATCH] arm64: Implement arch_setup_pdev_archdata hook

2016-06-13 Thread Baolin Wang
On 7 June 2016 at 16:43, Arnd Bergmann <a...@arndb.de> wrote: > On Tuesday, June 7, 2016 4:29:21 PM CEST Baolin Wang wrote: >> Now on ARM64 platform, it will set 'dummy_dma_ops' for device dma_ops if >> it did not call 'arch_setup_dma_ops' at device cre

[RESEND PATCH v11 1/4] gadget: Introduce the usb charger framework

2016-06-13 Thread Baolin Wang
or usb gadget state. This patch doesn't yet integrate with the gadget code, so some functions which rely on the 'gadget' are not completed, that will be implemented in the following patches. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/Kconfig |7 + drive

[RESEND RFC v2] mmc: Change the max discard sectors and erase response if mmc host supports busy signalling

2016-06-13 Thread Baolin Wang
ove the 'MMC_CAP_WAIT_WHILE_BUSY' flag checking when deciding the max discard sectors. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/mmc/core/core.c | 47 +++ 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/co

[RESEND PATCH v11 1/4] gadget: Introduce the usb charger framework

2016-06-13 Thread Baolin Wang
or usb gadget state. This patch doesn't yet integrate with the gadget code, so some functions which rely on the 'gadget' are not completed, that will be implemented in the following patches. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/Kconfig |7 + drive

[RESEND PATCH v11 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-06-13 Thread Baolin Wang
From: Baolin Wang <baolin.w...@spreadtrum.com> Currently the Linux kernel does not provide any standard integration of this feature that integrates the USB subsystem with the system power regulation provided by PMICs meaning that either vendors must add this in their kernels or USB gadget d

Re: [PATCH] arm64: Implement arch_setup_pdev_archdata hook

2016-06-14 Thread Baolin Wang
On 14 June 2016 at 22:43, Catalin Marinas <catalin.mari...@arm.com> wrote: > On Tue, Jun 07, 2016 at 05:22:25PM +0800, Baolin Wang wrote: >> On 7 June 2016 at 17:15, Robin Murphy <robin.mur...@arm.com> wrote: >> > Please elaborate on the situation that you

Re: [RFC v4 2/4] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-15 Thread Baolin Wang
On 15 June 2016 at 15:39, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Wed, Jun 15, 2016 at 03:38:02PM +0800, Baolin Wang wrote: >> >> But that means we should divide the bulk request into 512-byte size >> requests and break up the mapped sg table for each

Re: [RFC v4 2/4] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-15 Thread Baolin Wang
On 15 June 2016 at 14:49, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Wed, Jun 15, 2016 at 02:27:04PM +0800, Baolin Wang wrote: >> >> After some investigation, I still think we should divide the bulk >> request from dm-crypt into small request (each one is 512

Re: [RFC v4 2/4] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-15 Thread Baolin Wang
Hi Herbert, On 8 June 2016 at 10:00, Baolin Wang <baolin.w...@linaro.org> wrote: > Hi Herbert, > > On 7 June 2016 at 22:16, Herbert Xu <herb...@gondor.apana.org.au> wrote: >> On Tue, Jun 07, 2016 at 08:17:05PM +0800, Baolin Wang wrote: >>> Now some cipher ha

Re: [RFC v2 1/3] block: Introduce blk_bio_map_sg() to map one bio

2016-06-05 Thread Baolin Wang
On 3 June 2016 at 22:38, Jens Axboe <ax...@kernel.dk> wrote: > On 05/27/2016 05:11 AM, Baolin Wang wrote: >> >> +/* >> + * Map a bio to scatterlist, return number of sg entries setup. Caller >> must >> + * make sure sg can hold bio segments entries

Re: [RFC v2 1/3] block: Introduce blk_bio_map_sg() to map one bio

2016-06-05 Thread Baolin Wang
On 3 June 2016 at 22:35, Jens Axboe <ax...@kernel.dk> wrote: > On 05/27/2016 05:11 AM, Baolin Wang wrote: >> >> In dm-crypt, it need to map one bio to scatterlist for improving the >> hardware engine encryption efficiency. Thus this patch introduces the >> blk_bio

[PATCH v2] usb: dwc3: host: Set the dma_ops for xhci device

2016-06-05 Thread Baolin Wang
is 'dummy_dma_ops'. Changes since v1: - Add CONFIG_ARM64 macro. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/host.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index c679f63..edb666d 100644 --- a/drivers/us

[RFC v2 0/3] Introduce the bulk mode method when sending request to crypto layer

2016-05-27 Thread Baolin Wang
the crypt_sg_entry() function. - Other optimization. Baolin Wang (3): block: Introduce blk_bio_map_sg() to map one bio crypto: Introduce CRYPTO_ALG_BULK flag md: dm-crypt: Introduce the bulk mode method when sending request block/blk-merge.c | 36 +-- drivers/md/dm-crypt.c | 145

[RFC v2 3/3] md: dm-crypt: Introduce the bulk mode method when sending request

2016-05-27 Thread Baolin Wang
(beaglebone black board) using 64KB I/Os on an eMMC storage device I saw about 60% improvement in throughput for encrypted writes, and about 100% improvement for encrypted reads. But this is not fit for other modes which need different IV for each sector. Signed-off-by: Baolin Wang <baoli

[RFC v2 1/3] block: Introduce blk_bio_map_sg() to map one bio

2016-05-27 Thread Baolin Wang
bio map or request map. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- block/blk-merge.c | 36 +++- include/linux/blkdev.h |2 ++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 2

[RFC v2 2/3] crypto: Introduce CRYPTO_ALG_BULK flag

2016-05-27 Thread Baolin Wang
always 512 bytes and thus increase the hardware engine processing speed. So introduce 'CRYPTO_ALG_BULK' flag to indicate this cipher can support bulk mode. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- include/crypto/skcipher.h |7 +++ include/linux/crypto.h|6 +++

Re: [RFC 2/3] crypto: Introduce CRYPTO_ALG_BULK flag

2016-05-27 Thread Baolin Wang
On 27 May 2016 at 15:53, Milan Broz <gmazyl...@gmail.com> wrote: > On 05/27/2016 09:04 AM, Baolin Wang wrote: >> Hi Milan, >> >> On 27 May 2016 at 14:31, Milan Broz <gmazyl...@gmail.com> wrote: >>> On 05/25/2016 08:12 AM, Baolin Wang wrote: >>>

[PATCH] dwc3: gadget: Introduce dwc3_endpoint_xfer_xxx() to check endpoint type

2016-05-25 Thread Baolin Wang
+0x50/0xb0 Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/gadget.c | 95 ++--- 1 file changed, 72 insertions(+), 23 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 8e4a1b1..5d095f2

Re: [PATCH v2 2/2] crypto: omap: convert to the new cryptoengine API

2016-05-31 Thread Baolin Wang
t *req) > + struct crypto_async_request *areq) > { > + struct ablkcipher_request *req = ablkcipher_request_cast(areq); > struct omap_des_ctx *ctx = crypto_ablkcipher_ctx( > crypto_ablkcipher_reqtfm(req)); > struct omap_des_dev *dd = omap_des_find_dev(ctx); > -- > 2.7.3 > Reviewed-by: Baolin Wang <baolin.w...@linaro.org> -- Baolin.wang Best Regards

[RFC v3 1/4] block: Introduce blk_bio_map_sg() to map one bio

2016-05-31 Thread Baolin Wang
bio map or request map. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- block/blk-merge.c | 36 +++- include/linux/blkdev.h |2 ++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 2

[RFC v3 4/4] crypto: Add the CRYPTO_ALG_BULK flag for ecb(aes) cipher

2016-05-31 Thread Baolin Wang
Since the ecb(aes) cipher does not need to handle the IV things for encryption or decryption, that means it can support for bulk block when handling data. Thus this patch adds the CRYPTO_ALG_BULK flag for ecb(aes) cipher to improve the hardware aes engine's efficiency. Signed-off-by: Baolin Wang

[RFC v3 3/4] md: dm-crypt: Introduce the bulk mode method when sending request

2016-05-31 Thread Baolin Wang
(beaglebone black board and dd testing) using 64KB I/Os on an eMMC storage device I saw about 127% improvement in throughput for encrypted writes, and about 206% improvement for encrypted reads. But this is not fit for other modes which need different IV for each sector. Signed-off-by: Baolin Wang

[RFC v3 2/4] crypto: Introduce CRYPTO_ALG_BULK flag

2016-05-31 Thread Baolin Wang
always 512 bytes and thus increase the hardware engine processing speed. So introduce 'CRYPTO_ALG_BULK' flag to indicate this cipher can support bulk mode. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- include/crypto/skcipher.h |7 +++ include/linux/crypto.h|6 +++

Re: [PATCH v2 1/2] crypto: engine: permit to enqueue ashash_request

2016-05-31 Thread Baolin Wang
crypto_async_request *req); > void crypto_finalize_request(struct crypto_engine *engine, > -struct ablkcipher_request *req, int err); > +struct crypto_async_request *req, int err); > int crypto_engine_start(struct crypto_engine *engine); > int crypto_engine_stop(struct crypto_engine *engine); > struct crypto_engine *crypto_engine_alloc_init(struct device *dev, bool rt); > -- > 2.7.3 > Reviewed-by: Baolin Wang <baolin.w...@linaro.org> -- Baolin.wang Best Regards

[RFC v3 0/4] Introduce the bulk mode method when sending request to crypto layer

2016-05-31 Thread Baolin Wang
table allocation to crypt_ctr_cipher() function to avoid memory allocation in the IO path. - Remove the crypt_sg_entry() function. - Other optimization. Baolin Wang (4): block: Introduce blk_bio_map_sg() to map one bio crypto: Introduce CRYPTO_ALG_BULK flag md: dm-crypt: Introduce the bulk

Re: [PATCH] dwc3: gadget: Introduce dwc3_endpoint_xfer_xxx() to check endpoint type

2016-05-26 Thread Baolin Wang
Hi, On 26 May 2016 at 15:48, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> Hi Felipe, >> >> On 26 May 2016 at 14:22, Felipe Balbi <ba...@kernel.org> wrote: >>> >>> Hi, >&

Re: [PATCH] dwc3: gadget: Introduce dwc3_endpoint_xfer_xxx() to check endpoint type

2016-05-26 Thread Baolin Wang
Hi Felipe, On 26 May 2016 at 14:22, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> When handling the endpoint interrupt handler, it maybe disable the endpoint >> from another core user to set the USB en

Re: [RFC 3/3] md: dm-crypt: Introduce the bulk mode method when sending request

2016-05-27 Thread Baolin Wang
r preallocated memory and/or > per-bio-data to avoid memory allocations in the IO path. Make sense. > > On Wed, May 25 2016 at 2:12am -0400, > Baolin Wang <baolin.w...@linaro.org> wrote: > >> In now dm-crypt code, it is ineffective to map one segment (always one >

<    1   2   3   4   5   6   7   8   9   10   >