1. 19 Nov, 2012 3 commits
  2. 16 Nov, 2012 3 commits
    • Terry Lv's avatar
      ENGR00233800: CAAM: running sha_speed in cryptodev crashed · 0346ca03
      Terry Lv authored
      The reason is that when switching from SHA1 to SHA256, cryptodev will
      create a new session.
      But in this new session, the __ctx in allocated req is not fully initialized.
      Thus dma_buf in __ctx will be a random value.
      If the value is 0 or some address in DMA memory, that will be ok,
      otherwise, it will crashed in dma_unmap_single().
      The calling sequence is:
      When calling dma_unmap_single(), the parameter buf_dma is invalid in
      crash case.
      The error msg is:
      kernel BUG at arch/arm/mm/dma-mapping.c:478!
      requested hash CRYPTO_SHA2_256, Unable to handle kernel NULL pointer
      dereference at virtual address 00000000
      got sha256 with driver sha256-caapgd = e4ea0000
              Encrypting in chunks of 256 b[00000000] *pgd=74edb831ytes: ,
      	*pte=00000000, *ppte=00000000
      	Internal error: Oops: 817 [#1] PREEMPT SMP
      	Modules linked in: cryptodev
      	CPU: 0    Not tainted  (3.0.35-02200-ge392070a-dirty #68)
           PC is at __bug+0x1c/0x28
           LR is at __bug+0x18/0x28
           pc : [<80044260>]    lr : [<8004425c>]    psr: 60000013
           sp : e4ec7c40  ip : ea9a2000  fp : 00000010
           r10: 883f8038  r9 : 883f8038  r8 : e4803060
           r7 : 00000000  r6 : 00000001  r5 : 00000000  r4 : 6f66c10a
           r3 : 00000000  r2 : 80aafd5c  r1 : 60000093  r0 : 00000033
           Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
           Control: 10c53c7d  Table: 74ea004a  DAC: 00000015
           Process sha_speed (pid: 2747, stack limit = 0xe4ec62f0)
           Stack: (0xe4ec7c40 to 0xe4ec8000)
           7c40: 74803184 8004a424 e4803000 e4730c08 e4262840 803c50dc
           e4786f20 883f8000
           7c60: 00000020 00000000 00000028 883f8018 e43ffcc0 e4803000
           00000000 803c3d04
           7c80: 00000004 80041104 e4ec6000 00000000 7efc4b64 803c3d10
           e4774a3c 802079f8
           7ca0: e43ffd1c e43ffcc0 00000000 7f0031a0 e4ec7e0c e43ffcc0
           e4ec7e0c 7f00240c
           7cc0: 00000100 e4786f20 e481bd40 e4ec7cd8 e4ec7cdc 7f0016b4
           e4803200 00000000
           7ce0: e4094480 00000000 7efc4b2c 00000004 80041104 7f001b64
           8c81200c 00000000
           7d00: 3fe1c2a2 2aba7e2c 00000000 00000000 00000000 00000000
           00000000 2abc8870
           7d20: 2abc8870 2abc8870 7efc4e10 00000000 2aba3000 00000000
           2abc7f48 00000000
           7d40: 00000000 00000000 00000000 00000000 00000000 00000000
           2abc7f88 2abc7f80
           7d60: 2abc7f50 2abc7f60 2abc7f68 00000000 00000000 00000000
           2abc7f70 2abc7f78
           7d80: 00000000 32616873 2a003635 00000000 00000000 2abc7fa0
           2abc7fa8 2abc7fb0
           7da0: 2abc7f90 00000000 00000000 2abc7f98 00000000 00000000
           00000000 00000000
           7dc0: 00000000 32616873 632d3635 006d6161 00000000 00000000
           00000000 00000000
           7de0: 2abc7fc0 2abc7fb8 00000000 2abc7fd0 00000000 00000000
           00000000 00000000
           7e00: 00000000 00000000 00000001 3fe1c2a2 00000000 00000100
           00012008 00000000
           7e20: 7efc4ab8 00000000 00000000 8006a120 e4044740 8c80ef40
           00000001 00000000
           7e40: 00000002 e4044740 e4ec7e7c 8006f5f4 e4ec6000 8007ffd4
           e4348880 60000093
           7e60: 00000000 80ae6de8 e4253200 8004e0fc 00000261 8028c0f4
           e4877000 80ae6de8
           7e80: e4786f20 e481bd40 00000261 8028c0f4 000059ac 00000000
           36390b02 00000000
           7ea0: e4cd7b6c e43488d0 8c80e4c4 00000038 e43488d0 802342dc
           0000003f e43488d0
           7ec0: 8c80e4b8 8c80e4b8 00000038 80090714 0000003f 8aafab02
           00000000 80091134
           7ee0: 8aafab02 0000003f e4ec6000 80a99cc0 e4eed510 7efc4b2c
           e4ef96e0 00000004
           7f00: 80041104 800febd0 60a9b3cd e4786f20 e4348880 00000000
           e4ec7f88 e43488d0
           7f20: e4ec6000 00000000 00000000 80091408 00000000 00000001
           00000001 e4ec7f78
           7f40: 000059b1 00000000 fffffff7 80aedc50 80a8a0c0 00000000
           00000000 e4ec7f90
           7f60: 7efc4b20 e4ef96e0 7efc4b2c c01c6368 00000004 80041104
           e4ec6000 00000000
           7f80: 7efc4b64 800ff0d4 00000000 00000000 00000109 00000000
           00000000 00008628
           7fa0: 00000036 80040f80 00000000 00000000 00000004 c01c6368
           7efc4b2c 7efc4b2c
           7fc0: 00000000 00000000 00008628 00000036 00000000 00000000
           2abc8000 7efc4b64
           7fe0: 00000000 7efc4a90 00008b5c 2ac857bc 80000010 00000004
           e28bd000 e8bd0800
           [<80044260>] (__bug+0x1c/0x28) from [<8004a424>]
           [<8004a424>] (___dma_single_dev_to_cpu+0x84/0x94) from [<803c50dc>]
           [<803c50dc>] (ahash_final_ctx+0x1a0/0x41c) from [<803c3d10>]
           [<803c3d10>] (ahash_final+0xc/0x10) from [<802079f8>]
           [<802079f8>] (crypto_ahash_op+0x28/0xc0) from [<7f0031a0>]
           (cryptodev_hash_final+0x30/0xc0 [cryptodev])
           [<7f0031a0>] (cryptodev_hash_final+0x30/0xc0 [cryptodev]) from
           [<7f00240c>] (crypto_run+0x10c/0x398 [cryptodev])
           [<7f00240c>] (crypto_run+0x10c/0x398 [cryptodev]) from [<7f001b64>]
           (cryptodev_ioctl+0x360/0x768 [cryptodev])
           [<7f001b64>] (cryptodev_ioctl+0x360/0x768 [cryptodev]) from
           [<800febd0>] (do_vfs_ioctl+0x80/0x54c)
           [<800febd0>] (do_vfs_ioctl+0x80/0x54c) from [<800ff0d4>]
           [<800ff0d4>] (sys_ioctl+0x38/0x5c) from [<80040f80>]
           Code: e59f0010 e1a01003 eb12fddb e3a03000 (e5833000)
           ---[ end trace 0057f6be00952f77 ]---
      Signed-off-by: default avatarTerry Lv <r65388@freescale.com>
    • Chen Liangjun's avatar
      ENGR00233780 ASRC: limit output buffer size to avoid kernel dump · d85c0551
      Chen Liangjun authored
      For ASRC memory to memory transfer, user would send driver input buffer
      and driver would copy converted output buffer into user's buffer.
      However, ASRC can't promise the ratio of output buffer size/input buffer
      size being equal to output sample rate/input sample rate.e.g, for
      convert from 8k to 48k and 1000 bytes input buffer size, ASRC may pop
      out 5999 bytes or 6001 bytes. If driver copy all 6001 bytes into user's
      buffer, kernel dump may happens cause of accessing unexisted buffer.
      In this patch, if ASRC output buffer size is larger than user's buffer
      size, discard exact part.
      Signed-off-by: default avatarChen Liangjun <b36089@freescale.com>
    • Chen Liangjun's avatar
      ENGR00233886 ASRC: init variable to fix build warning · 2cf8cf02
      Chen Liangjun authored
      Compiling warning on mainline imx_3.0.35 (potential bug):
      drivers/mxc/asrc/mxc_asrc.c: In function 'asrc_output_task_worker':
      drivers/mxc/asrc/mxc_asrc.c:961:68: warning: 't_size' may be used
      uninitialized in this function [-Wuninitialized]
      drivers/mxc/asrc/mxc_asrc.c:943:23: note: 't_size' was declared here
      In this patch, init t_size.
      Signed-off-by: default avatarChen Liangjun <b36089@freescale.com>
  3. 15 Nov, 2012 3 commits
  4. 14 Nov, 2012 3 commits
  5. 13 Nov, 2012 3 commits
  6. 09 Nov, 2012 1 commit
  7. 08 Nov, 2012 4 commits
  8. 07 Nov, 2012 1 commit
    • make shi's avatar
      ENGR00232583 Mx6 USB host: Set HCD_FLAG_HW_ACCESSIBLE flag after clock gate · fa610478
      make shi authored
      There is a USB hang issue when do system suspend/resume test with a USB
      device plug in. The issue is caused by USB host driver accessing register
      when clock is off. Currently set HCD_FLAG_HW_ACCESSIBLE bit before open
      clock in ehci_fsl_bus_resume, it cause accessing register without clock.
      So we should change the code call order to avoid driver access register
      without clock.
      - Set HCD_FLAG_HW_ACCESSIBLE software flag after HW clock turn on
      - remove some unnecessary code in ehci_fsl_pre_irq
      Signed-off-by: default avatarmake shi <b15407@freescale.com>
  9. 06 Nov, 2012 11 commits
  10. 05 Nov, 2012 1 commit
    • Israel Perez's avatar
      ENGR00225875-2 i.MX6Q/Solo Sabreauto Bluetooth H4 fix uart rx timeouts. · e21b0b06
      Israel Perez authored
      Bluetooth H4 protocol is very susceptible to data reception timeouts.
      DMA transfer only happen when ICD or AGTIM interrutps are trigger.
      ICD only happen when a N idle frames are present on rx line
      and rx FIFO is empty.
      Meanwhile Aging timer is trigger when data in FIFO was been sitting for a
      period of 8 frames.
      This patch enable both in order to dispatch data as fast is possible only
      when the select uart have enable DMA flag.
      Signed-off-by: default avatarIsrael Perez <B37753@freescale.com>
  11. 02 Nov, 2012 1 commit
    • Robby Cai's avatar
      ENGR00232000: Fix "dmaengine: failed to get dma1chan0: (-22)" when boot · 985b79c5
      Robby Cai authored
      The log from [MX6DL/S_SD]:
      mxc_sdc_fb mxc_sdc_fb.1: register mxc display driver ldb
      dmaengine: failed to get dma1chan0: (-22)
      dmaengine: failed to get dma1chan1: (-22)
      dmaengine: failed to get dma1chan2: (-22)
      dmaengine: failed to get dma1chan3: (-22)
      dmaengine: failed to get dma1chan4: (-22)
      dmaengine: failed to get dma1chan5: (-22)
      dmaengine: failed to get dma1chan6: (-22)
      dmaengine: failed to get dma1chan7: (-22)
      dmaengine: failed to get dma1chan8: (-22)
      dmaengine: failed to get dma1chan9: (-22)
      dmaengine: failed to get dma1chan10: (-22)
      dmaengine: failed to get dma1chan11: (-22)
      dmaengine: failed to get dma1chan12: (-22)
      dmaengine: failed to get dma1chan13: (-22)
      dmaengine: failed to get dma1chan14: (-22)
      dmaengine: failed to get dma1chan15: (-22)
      It happens when there are many DMA-engine drivers in the system and
      dmaengine_get() is called. dmaengine_get() will call dma_chan_get(), which will
      call device_alloc_chan_resources() literally on channels of available dma
      drivers unless reach -ENODEV. device_alloc_chan_resources() is implemented
      in the individual dma drivers, which could return -EINVAL rather than -ENODEV,
      then the above messages print out (doesn't hurt, however).
      Indeed, the dmaengine_get() and dmaengine_put() is not needed and thus removed.
      Signed-off-by: default avatarRobby Cai <R63905@freescale.com>
  12. 01 Nov, 2012 5 commits
  13. 29 Oct, 2012 1 commit