1. 22 Dec, 2011 5 commits
    • Sebastian Andrzej Siewior's avatar
      usb/uas: use scsi_host_find_tag() to find command from a tag · 22188f4a
      Sebastian Andrzej Siewior authored
      In "usb/uas: use unique tags for all LUNs" we make sure to create unique
      tags across all LUNs. This patch uses scsi_host_find_tag() to obtain the
      correct command which is associated with the tag.
      The following changes are required:
      - don't use sdev->current_cmnd anymore
        Since we can have devices which don't support command queueing we must
        ensure that we can tell the two commands apart. Even if a device
        supports comand queuing we send the INQUIRY command "untagged" for
        LUN1 while we can send a tagged command to LUN0 at the same time.
        devinfo->cmnd is used for stashing the one "untagged" command.
      - tag number is altered. If stream support is used then the tag number
        must match the stream number. Therefore we can't use tag 0 and must
        start at tag 1.
        In case we have untagged commands (at least the first command) we must
        be able to distinguish between command tag 0 (which becomes 1) and
        untagged command (which becomes curently also 1).
        The following tag numbers are used:
        0: never
        1: for untagged commands (devinfo->cmnd)
        2+: tagged commands.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      22188f4a
    • Sebastian Andrzej Siewior's avatar
      usb/uas: use unique tags for all LUNs · dae51546
      Sebastian Andrzej Siewior authored
      I observed that on a device with multiple LUNs UAS was re-using the same
      tag number for requests which were issued at the same time to both LUNs.
      This patch uses scsi_init_shared_tag_map() to use unique tags for all
      LUNs. With this patch I haven't seen the same tag number during the init
      sequence anymore. Tag 1 is used for devices which do not adverise
      command queueing.
      This patch initilizes the queue before adding the scsi host like the
      other two user in tree.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      dae51546
    • Sarah Sharp's avatar
      UAS: Free status URB when we can't find the SCSI tag. · 96c1eb98
      Sarah Sharp authored
      In the UAS status URB completion handler, we need to free the URB, no
      matter what happens.  Fix a bug where we would leak the URB (and its
      buffer) if we couldn't find a SCSI command that is associated with this
      status phase.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      96c1eb98
    • Sarah Sharp's avatar
      UAS: Use unique tags on non-streams devices. · 9eb44541
      Sarah Sharp authored
      UAS can work with either USB 3.0 devices that support bulk streams, or
      USB 2.0 devices that do not support bulk streams.  When we're working
      with a non-streams device, we need to be able to uniquely identify a
      SCSI command with a tag in the IU.  Devices will barf and abort all
      queued commands if they find a duplicate tag.
      
      uas_queuecommand_lck() sets cmdinfo->stream to zero if the device
      doesn't support streams, which is later passed into uas_alloc_cmd_urb()
      as the variable stream.  This means the UAS driver was setting the tag
      in all commands to zero for non-stream devices.  So the UAS driver won't
      currently work with USB 2.0 devices.
      
      Use the SCSI command tag instead of the stream ID for the command IU
      tag.  We have to add one to the SCSI command tag because SCSI tags are
      zero-based, but stream IDs are one-based, and the command tag must match
      the stream ID that we're queueing the data IUs for.  Untagged SCSI
      commands use stream ID 1.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      9eb44541
    • Sarah Sharp's avatar
      UAS: Re-add workqueue items if submission fails. · ea9da1c7
      Sarah Sharp authored
      If the original submission (or allocation) of the URBs for a SCSI
      command fails, the UAS driver sticks the command structure in a
      workqueue and schedules uas_do_work() to run.  That function removes the
      entire queue before walking across it and attempting to resubmit.
      
      Unfortunately, if the second submission fails, we will leak memory
      (because an allocated URB was not submitted) and possibly leave the SCSI
      command partially enqueued on some of the stream rings.  Fix this by
      checking whether the second submission failed and re-queueing the
      command to the UAS workqueue and scheduling it.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      ea9da1c7
  2. 01 Dec, 2011 10 commits
    • Linus Torvalds's avatar
      Linux 3.2-rc4 · 5611cc45
      Linus Torvalds authored
      5611cc45
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 · 0a4ebed7
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (31 commits)
        ocfs2: avoid unaligned access to dqc_bitmap
        ocfs2: Use filemap_write_and_wait() instead of write_inode_now()
        ocfs2: honor O_(D)SYNC flag in fallocate
        ocfs2: Add a missing journal credit in ocfs2_link_credits() -v2
        ocfs2: send correct UUID to cleancache initialization
        ocfs2: Commit transactions in error cases -v2
        ocfs2: make direntry invalid when deleting it
        fs/ocfs2/dlm/dlmlock.c: free kmem_cache_zalloc'd data using kmem_cache_free
        ocfs2: Avoid livelock in ocfs2_readpage()
        ocfs2: serialize unaligned aio
        ocfs2: Implement llseek()
        ocfs2: Fix ocfs2_page_mkwrite()
        ocfs2: Add comment about orphan scanning
        ocfs2: Clean up messages in the fs
        ocfs2/cluster: Cluster up now includes network connections too
        ocfs2/cluster: Add new function o2net_fill_node_map()
        ocfs2/cluster: Fix output in file elapsed_time_in_ms
        ocfs2/dlm: dlmlock_remote() needs to account for remastery
        ocfs2/dlm: Take inflight reference count for remotely mastered resources too
        ocfs2/dlm: Cleanup dlm_wait_for_node_death() and dlm_wait_for_node_recovery()
        ...
      0a4ebed7
    • Akinobu Mita's avatar
      ocfs2: avoid unaligned access to dqc_bitmap · 93925579
      Akinobu Mita authored
      The dqc_bitmap field of struct ocfs2_local_disk_chunk is 32-bit aligned,
      but not 64-bit aligned.  The dqc_bitmap is accessed by ocfs2_set_bit(),
      ocfs2_clear_bit(), ocfs2_test_bit(), or ocfs2_find_next_zero_bit().  These
      are wrapper macros for ext2_*_bit() which need to take an unsigned long
      aligned address (though some architectures are able to handle unaligned
      address correctly)
      
      So some 64bit architectures may not be able to access the dqc_bitmap
      correctly.
      
      This avoids such unaligned access by using another wrapper functions for
      ext2_*_bit().  The code is taken from fs/ext4/mballoc.c which also need to
      handle unaligned bitmap access.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Acked-by: default avatarJoel Becker <jlbec@evilplan.org>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJoel Becker <jlbec@evilplan.org>
      93925579
    • Linus Torvalds's avatar
      Merge branch 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm · 3b120ab7
      Linus Torvalds authored
      * 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
        ARM: 7182/1: ARM cpu topology: fix warning
        ARM: 7181/1: Restrict kprobes probing SWP instructions to ARMv5 and below
        ARM: 7180/1: Change kprobes testcase with unpredictable STRD instruction
        ARM: 7177/1: GIC: avoid skipping non-existent PPIs in irq_start calculation
        ARM: 7176/1: cpu_pm: register GIC PM notifier only once
        ARM: 7175/1: add subname parameter to mfp_set_groupg callers
        ARM: 7174/1: Fix build error in kprobes test code on Thumb2 kernels
        ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations
        ARM: 7171/1: unwind: add unwind directives to bitops assembly macros
        ARM: 7170/2: fix compilation breakage in entry-armv.S
        ARM: 7168/1: use cache type functions for arch_get_unmapped_area
        ARM: perf: check that we have a platform device when reserving PMU
        ARM: 7166/1: Use PMD_SHIFT instead of PGDIR_SHIFT in dma-consistent.c
        ARM: 7165/2: PL330: Fix typo in _prepare_ccr()
        ARM: 7163/2: PL330: Only register usable channels
        ARM: 7162/1: errata: tidy up Kconfig options for PL310 errata workarounds
        ARM: 7161/1: errata: no automatic store buffer drain
        ARM: perf: initialise used_mask for fake PMU during validation
        ARM: PMU: remove pmu_init declaration
        ARM: PMU: re-export release_pmu symbol to modules
      3b120ab7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · b930c264
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix meta data raid-repair merge problem
        Btrfs: skip allocation attempt from empty cluster
        Btrfs: skip block groups without enough space for a cluster
        Btrfs: start search for new cluster at the beginning
        Btrfs: reset cluster's max_size when creating bitmap
        Btrfs: initialize new bitmaps' list
        Btrfs: fix oops when calling statfs on readonly device
        Btrfs: Don't error on resizing FS to same size
        Btrfs: fix deadlock on metadata reservation when evicting a inode
        Fix URL of btrfs-progs git repository in docs
        btrfs scrub: handle -ENOMEM from init_ipath()
      b930c264
    • Jan Schmidt's avatar
      Btrfs: fix meta data raid-repair merge problem · f4a8e656
      Jan Schmidt authored
      Commit 4a54c8c1 introduced raid-repair, killing the individual
      readpage_io_failed_hook entries from inode.c and disk-io.c. Commit
      4bb31e92 introduced new readahead code, adding a readpage_io_failed_hook to
      disk-io.c.
      
      The raid-repair commit had logic to disable raid-repair, if
      readpage_io_failed_hook is set. Thus, the readahead commit effectively
      disabled raid-repair for meta data.
      
      This commit changes the logic to always attempt raid-repair when needed and
      call the readpage_io_failed_hook in case raid-repair fails. This is much
      more straight forward and should have been like that from the beginning.
      Signed-off-by: default avatarJan Schmidt <list.btrfs@jan-o-sch.net>
      Reported-by: default avatarStefan Behrens <sbehrens@giantdisaster.de>
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      f4a8e656
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband · 11d814a2
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
        IB: Fix RCU lockdep splats
        IB/ipoib: Prevent hung task or softlockup processing multicast response
        IB/qib: Fix over-scheduling of QSFP work
        RDMA/cxgb4: Fix retry with MPAv1 logic for MPAv2
        RDMA/cxgb4: Fix iw_cxgb4 count_rcqes() logic
        IB/qib: Don't use schedule_work()
      11d814a2
    • Linus Torvalds's avatar
      Merge branch 'dt-for-linus' of git://sources.calxeda.com/kernel/linux · c290b2f2
      Linus Torvalds authored
      * 'dt-for-linus' of git://sources.calxeda.com/kernel/linux:
        of: Add Silicon Image vendor prefix
        of/irq: of_irq_init: add check for parent equal to child node
      c290b2f2
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · d6e92d36
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: twl: fix twl4030 support for smps regulators
        regulator: fix use after free bug
        regulator: aat2870: Fix the logic of checking if no id is matched in aat2870_get_regulator
      d6e92d36
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · cd5b49bc
      Linus Torvalds authored
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits)
        ARM: ux500: update defconfig
        ARM: u300: update defconfig
        ARM: at91: enable additional boards in existing soc defconfig files
        ARM: at91: refresh soc defconfig files for 3.2
        ARM: at91: rename defconfig files appropriately
        ARM: OMAP2+: Fix Compilation error when omap_l3_noc built as module
        ARM: OMAP2+: Remove empty io.h
        ARM: OMAP2: select ARM_AMBA if OMAP3_EMU is defined
        ARM: OMAP: smartreflex: fix IRQ handling bug
        ARM: OMAP: PM: only register TWL with voltage layer when device is present
        ARM: OMAP: hwmod: Fix the addr space, irq, dma count APIs
        arm: mx28: fix bit operation in clock setting
        ARM: imx: export imx_ioremap
        ARM: imx/mm-imx3: conditionally compile i.MX31 and i.MX35 code
        ARM: mx5: Fix checkpatch warnings in cpu-imx5.c
        MAINTAINERS: Add missing directory
        ARM: imx: drop 'ARCH_MX31' and 'ARCH_MX35'
        ARM: imx6q: move clock register map to machine_desc.map_io
        ARM: pxa168/gplugd: add the correct SSP device
        ARM: Update mach-types to fix mxs build breakage
        ...
      cd5b49bc
  3. 30 Nov, 2011 14 commits
  4. 29 Nov, 2011 11 commits