1. 12 Dec, 2013 10 commits
    • Linus Walleij's avatar
      net: smc91: fix crash regression on the versatile · 5ee54c2a
      Linus Walleij authored
      commit a0c20fb0 upstream.
      
      After commit e9e4ea74
      "net: smc91x: dont't use SMC_outw for fixing up halfword-aligned data"
      The Versatile SMSC LAN91C111 is crashing like this:
      
      ------------[ cut here ]------------
      kernel BUG at /home/linus/linux/drivers/net/ethernet/smsc/smc91x.c:599!
      Internal error: Oops - BUG: 0 [#1] ARM
      Modules linked in:
      CPU: 0 PID: 43 Comm: udhcpc Not tainted 3.13.0-rc1+ #24
      task: c6ccfaa0 ti: c6cd0000 task.ti: c6cd0000
      PC is at smc_hardware_send_pkt+0x198/0x22c
      LR is at smc_hardware_send_pkt+0x24/0x22c
      pc : [<c01be324>]    lr : [<c01be1b0>]    psr: 20000013
      sp : c6cd1d08  ip : 00000001  fp : 00000000
      r10: c02adb08  r9 : 00000000  r8 : c6ced802
      r7 : c786fba0  r6 : 00000146  r5 : c8800000  r4 : c78d6000
      r3 : 0000000f  r2 : 00000146  r1 : 00000000  r0 : 00000031
      Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      Control: 0005317f  Table: 06cf4000  DAC: 00000015
      Process udhcpc (pid: 43, stack limit = 0xc6cd01c0)
      Stack: (0xc6cd1d08 to 0xc6cd2000)
      1d00:                   00000010 c8800000 c78d6000 c786fba0 c78d6000 c01be868
      1d20: c01be7a4 00004000 00000000 c786fba0 c6c12b80 c0208554 000004d0 c780fc60
      1d40: 00000220 c01fb734 00000000 00000000 00000000 c6c9a440 c6c12b80 c78d6000
      1d60: c786fba0 c6c9a440 00000000 c021d1d8 00000000 00000000 c6c12b80 c78d6000
      1d80: c786fba0 00000001 c6c9a440 c02087f8 c6c9a4a0 00080008 00000000 00000000
      1da0: c78d6000 c786fba0 c78d6000 00000138 00000000 00000000 00000000 00000000
      1dc0: 00000000 c027ba74 00000138 00000138 00000001 00000010 c6cedc00 00000000
      1de0: 00000008 c7404400 c6cd1eec c6cd1f14 c067a73c c065c0b8 00000000 c067a740
      1e00: 01ffffff 002040d0 00000000 00000000 00000000 00000000 00000000 ffffffff
      1e20: 43004400 00110022 c6cdef20 c027ae8c c6ccfaa0 be82d65c 00000014 be82d3cc
      1e40: 00000000 00000000 00000000 c01f2870 00000000 00000000 00000000 c6cd1e88
      1e60: c6ccfaa0 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      1e80: 00000000 00000000 00000031 c7802310 c7802300 00000138 c7404400 c0771da0
      1ea0: 00000000 c6cd1eec c7800340 00000138 be82d65c 00000014 be82d3cc c6cd1f08
      1ec0: 00000014 00000000 c7404400 c7404400 00000138 c01f4628 c78d6000 00000000
      1ee0: 00000000 be82d3cc 00000138 c6cd1f08 00000014 c6cd1ee4 00000001 00000000
      1f00: 00000000 00000000 00080011 00000002 06000000 ffffffff 0000ffff 00000002
      1f20: 06000000 ffffffff 0000ffff c00928c8 c065c520 c6cd1f58 00000003 c009299c
      1f40: 00000003 c065c520 c7404400 00000000 c7404400 c01f2218 c78106b0 c7441cb0
      1f60: 00000000 00000006 c06799fc 00000000 00000000 00000006 00000000 c01f3ee0
      1f80: 00000000 00000000 be82d678 be82d65c 00000014 00000001 00000122 c00139c8
      1fa0: c6cd0000 c0013840 be82d65c 00000014 00000006 be82d3cc 00000138 00000000
      1fc0: be82d65c 00000014 00000001 00000122 00000000 00000000 00018cb1 00000000
      1fe0: 00003801 be82d3a8 0003a0c7 b6e9af08 60000010 00000006 00000000 00000000
      [<c01be324>] (smc_hardware_send_pkt+0x198/0x22c) from [<c01be868>] (smc_hard_start_xmit+0xc4/0x1e8)
      [<c01be868>] (smc_hard_start_xmit+0xc4/0x1e8) from [<c0208554>] (dev_hard_start_xmit+0x460/0x4cc)
      [<c0208554>] (dev_hard_start_xmit+0x460/0x4cc) from [<c021d1d8>] (sch_direct_xmit+0x94/0x18c)
      [<c021d1d8>] (sch_direct_xmit+0x94/0x18c) from [<c02087f8>] (dev_queue_xmit+0x238/0x42c)
      [<c02087f8>] (dev_queue_xmit+0x238/0x42c) from [<c027ba74>] (packet_sendmsg+0xbe8/0xd28)
      [<c027ba74>] (packet_sendmsg+0xbe8/0xd28) from [<c01f2870>] (sock_sendmsg+0x84/0xa8)
      [<c01f2870>] (sock_sendmsg+0x84/0xa8) from [<c01f4628>] (SyS_sendto+0xb8/0xdc)
      [<c01f4628>] (SyS_sendto+0xb8/0xdc) from [<c0013840>] (ret_fast_syscall+0x0/0x2c)
      Code: e3130002 1a000001 e3130001 0affffcd (e7f001f2)
      ---[ end trace 81104fe70e8da7fe ]---
      Kernel panic - not syncing: Fatal exception in interrupt
      
      This is because the macro operations in smc91x.h defined
      for Versatile are missing SMC_outsw() as used in this
      commit.
      
      The Versatile needs and uses the same accessors as the other
      platforms in the first if(...) clause, just switch it to using
      that and we have one problem less to worry about.
      
      This includes a hunk of a patch from Will Deacon fixin
      the other 32bit platforms as well: Innokom, Ramses, PXA,
      PCM027.
      
      Checkpatch complains about spacing, but I have opted to
      follow the style of this .h-file.
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Nicolas Pitre <nico@fluxnic.net>
      Cc: Eric Miao <eric.y.miao@gmail.com>
      Cc: Jonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5ee54c2a
    • Stephen M. Cameron's avatar
      SCSI: hpsa: return 0 from driver probe function on success, not 1 · 3d486626
      Stephen M. Cameron authored
      commit 88bf6d62 upstream.
      
      A return value of 1 is interpreted as an error.  See pci_driver.
      in local_pci_probe().  If you're wondering how this ever could
      have worked, it's because it used to be the case that only return
      values less than zero were interpreted as failure.  But even in
      the current kernel if the driver registers its various entry
      points with the kernel, and then returns a value which is
      interpreted as failure, those registrations aren't undone, so
      the driver still mostly works.  However, the driver's remove
      function wouldn't be called on rmmod, and pci power management
      functions wouldn't work.  In the case of Smart Array, since it
      has a battery backed cache (or else no cache) even if the driver
      is not shut down properly as long as there is no outstanding
      i/o, nothing too bad happens, which is why it took so long to
      notice.
      
      Requesting backport to stable because the change to pci-driver.c
      which requires driver probe functions to return 0 occurred between
      2.6.35 and 2.6.36 (the pci power management breakage) and again
      between 3.7 and 3.8 (pci_dev->driver getting set to NULL in
      local_pci_probe() preventing driver remove function from being
      called on rmmod.)
      Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3d486626
    • Stephen M. Cameron's avatar
      SCSI: hpsa: do not discard scsi status on aborted commands · 87722754
      Stephen M. Cameron authored
      commit 2e311fba upstream.
      
      We inadvertantly discarded the scsi status for aborted commands.
      For some commands (e.g. reads from tape drives) these can't be retried,
      and if we discarded the scsi status, the scsi mid layer couldn't notice
      anything was wrong and the error was not reported.
      Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      87722754
    • Dan Williams's avatar
      SCSI: libsas: fix usage of ata_tf_to_fis · 41bb75da
      Dan Williams authored
      commit ae5fbae0 upstream.
      
      Since commit 110dd8f1 "[SCSI] libsas: fix scr_read/write users and
      update the libata documentation" we have been passing pmp=1 and is_cmd=0
      to ata_tf_to_fis().  Praveen reports that eSATA attached drives do not
      discover correctly.  His investigation found that the BIOS was passing
      pmp=0 while Linux was passing pmp=1 and failing to discover the drives.
      Update libsas to follow the libata example of pulling the pmp setting
      from the ata_link and correct is_cmd to be 1 since all tf's submitted
      through ->qc_issue are commands.  Presumably libsas lldds do not care
      about is_cmd as they have sideband mechanisms to perform link
      management.
      
      http://marc.info/?l=linux-scsi&m=138179681726990
      
      [jejb: checkpatch fix]
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Reported-by: default avatarPraveen Murali <pmurali@logicube.com>
      Tested-by: default avatarPraveen Murali <pmurali@logicube.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      41bb75da
    • James Bottomley's avatar
      SCSI: enclosure: fix WARN_ON in dual path device removing · b232973f
      James Bottomley authored
      commit a1470c7b upstream.
      
      Bug report from: wenxiong@linux.vnet.ibm.com
      
      The issue is happened in dual controller configuration. We got the
      sysfs warnings when rmmod the ipr module.
      
      enclosure_unregister() in drivers/msic/enclosure.c, call device_unregister()
      for each componment deivce, device_unregister() ->device_del()->kobject_del()
      ->sysfs_remove_dir(). In sysfs_remove_dir(), set kobj->sd = NULL.
      
      For each componment device,
      enclosure_component_release()->enclosure_remove_links()->sysfs_remove_link()
      in which checking kobj->sd again, it has been set as NULL when doing
      device_unregister. So we saw all these sysfs WARNING.
      
      Tested-by: wenxiong@linux.vnet.ibm.com
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b232973f
    • Bo Shen's avatar
      ASoC: wm8731: fix dsp mode configuration · 8e73078f
      Bo Shen authored
      commit b4af6ef9 upstream.
      
      According to WM8731 "PD, Rev 4.9 October 2012" datasheet, when it
      works in DSP mode A, LRP = 1, while works in DSP mode B, LRP = 0.
      So, fix LRP for DSP mode as the datesheet specification.
      Signed-off-by: default avatarBo Shen <voice.shen@atmel.com>
      Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8e73078f
    • Mark Brown's avatar
      ASoC: wm8990: Mark the register map as dirty when powering down · d01cb3a1
      Mark Brown authored
      commit 2ab2b742 upstream.
      
      Otherwise we'll skip sync on resume.
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d01cb3a1
    • Tom Lendacky's avatar
      crypto: authenc - Find proper IV address in ablkcipher callback · 788f5da2
      Tom Lendacky authored
      commit fc019c71 upstream.
      
      When performing an asynchronous ablkcipher operation the authenc
      completion callback routine is invoked, but it does not locate and use
      the proper IV.
      
      The callback routine, crypto_authenc_encrypt_done, is updated to use
      the same method of calculating the address of the IV as is done in
      crypto_authenc_encrypt function which sets up the callback.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      788f5da2
    • Horia Geanta's avatar
      crypto: ccm - Fix handling of zero plaintext when computing mac · fe879ea2
      Horia Geanta authored
      commit 5638cabf upstream.
      
      There are cases when cryptlen can be zero in crypto_ccm_auth():
      -encryptiom: input scatterlist length is zero (no plaintext)
      -decryption: input scatterlist contains only the mac
      plus the condition of having different source and destination buffers
      (or else scatterlist length = max(plaintext_len, ciphertext_len)).
      
      These are not handled correctly, leading to crashes like:
      
      root@p4080ds:~/crypto# insmod tcrypt.ko mode=45
      ------------[ cut here ]------------
      kernel BUG at crypto/scatterwalk.c:37!
      Oops: Exception in kernel mode, sig: 5 [#1]
      SMP NR_CPUS=8 P4080 DS
      Modules linked in: tcrypt(+) crc32c xts xcbc vmac pcbc ecb gcm ghash_generic gf128mul ccm ctr seqiv
      CPU: 3 PID: 1082 Comm: cryptomgr_test Not tainted 3.11.0 #14
      task: ee12c5b0 ti: eecd0000 task.ti: eecd0000
      NIP: c0204d98 LR: f9225848 CTR: c0204d80
      REGS: eecd1b70 TRAP: 0700   Not tainted  (3.11.0)
      MSR: 00029002 <CE,EE,ME>  CR: 22044022  XER: 20000000
      
      GPR00: f9225c94 eecd1c20 ee12c5b0 eecd1c28 ee879400 ee879400 00000000 ee607464
      GPR08: 00000001 00000001 00000000 006b0000 c0204d80 00000000 00000002 c0698e20
      GPR16: ee987000 ee895000 fffffff4 ee879500 00000100 eecd1d58 00000001 00000000
      GPR24: ee879400 00000020 00000000 00000000 ee5b2800 ee607430 00000004 ee607460
      NIP [c0204d98] scatterwalk_start+0x18/0x30
      LR [f9225848] get_data_to_compute+0x28/0x2f0 [ccm]
      Call Trace:
      [eecd1c20] [f9225974] get_data_to_compute+0x154/0x2f0 [ccm] (unreliable)
      [eecd1c70] [f9225c94] crypto_ccm_auth+0x184/0x1d0 [ccm]
      [eecd1cb0] [f9225d40] crypto_ccm_encrypt+0x60/0x2d0 [ccm]
      [eecd1cf0] [c020d77c] __test_aead+0x3ec/0xe20
      [eecd1e20] [c020f35c] test_aead+0x6c/0xe0
      [eecd1e40] [c020f420] alg_test_aead+0x50/0xd0
      [eecd1e60] [c020e5e4] alg_test+0x114/0x2e0
      [eecd1ee0] [c020bd1c] cryptomgr_test+0x4c/0x60
      [eecd1ef0] [c0047058] kthread+0xa8/0xb0
      [eecd1f40] [c000eb0c] ret_from_kernel_thread+0x5c/0x64
      Instruction dump:
      0f080000 81290024 552807fe 0f080000 5529003a 4bffffb4 90830000 39400000
      39000001 8124000c 2f890000 7d28579e <0f090000> 81240008 91230004 4e800020
      ---[ end trace 6d652dfcd1be37bd ]---
      
      Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
      Signed-off-by: default avatarHoria Geanta <horia.geanta@freescale.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fe879ea2
    • Tom Lendacky's avatar
      crypto: scatterwalk - Set the chain pointer indication bit · 941f77dc
      Tom Lendacky authored
      commit 41da8b5a upstream.
      
      The scatterwalk_crypto_chain function invokes the scatterwalk_sg_chain
      function to chain two scatterlists, but the chain pointer indication
      bit is not set.  When the resulting scatterlist is used, for example,
      by sg_nents to count the number of scatterlist entries, a segfault occurs
      because sg_nents does not follow the chain pointer to the chained scatterlist.
      
      Update scatterwalk_sg_chain to set the chain pointer indication bit as is
      done by the sg_chain function.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      941f77dc
  2. 08 Dec, 2013 30 commits