1. 30 3月, 2013 1 次提交
    • A
      rbd: don't zero-fill non-image object requests · 6e2a4505
      Alex Elder 提交于
      A result of ENOENT from a read request for an object that's part of
      an rbd image indicates that there is a hole in that portion of the
      image.  Similarly, a short read for such an object indicates that
      the remainder of the read should be interpreted a full read with
      zeros filling out the end of the request.
      
      This behavior is not correct for objects that are not backing rbd
      image data.  Currently rbd_img_obj_request_callback() assumes it
      should be done for all objects.
      
      Change rbd_img_obj_request_callback() so it only does this zeroing
      for image objects.  Encapsulate that special handling in its own
      function.  Add an assertion that the image object request is a bio
      request, since we assume that (and we currently don't support any
      other types).
      
      This resolves a problem identified here:
          http://tracker.ceph.com/issues/4559
      
      The regression was introduced by bf0d5f50.
      Reported-by: NDan van der Ster <dan@vanderster.com>
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-off-by: NSage Weil <sage@inktank.com>
      6e2a4505
  2. 29 3月, 2013 2 次提交
    • N
      target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case · f85eda8d
      Nicholas Bellinger 提交于
      This patch fixes a regression introduced in v3.8-rc1 code where a failed
      target_check_reservation() check in target_setup_cmd_from_cdb() was causing
      an incorrect SAM_STAT_GOOD status to be returned during a WRITE operation
      performed by an unregistered / unreserved iscsi initiator port.
      
      This regression is only effecting iscsi-target due to a special case check
      for TCM_RESERVATION_CONFLICT within iscsi_target_erl1.c:iscsit_execute_cmd(),
      and was still correctly disallowing WRITE commands from backend submission
      for unregistered / unreserved initiator ports, while returning the incorrect
      SAM_STAT_GOOD status due to the missing SAM_STAT_RESERVATION_CONFLICT
      assignment.
      
      This regression was first introduced with:
      
      commit de103c93
      Author: Christoph Hellwig <hch@lst.de>
      Date:   Tue Nov 6 12:24:09 2012 -0800
      
          target: pass sense_reason as a return value
      
      Go ahead and re-add the missing SAM_STAT_RESERVATION_CONFLICT assignment
      during a target_check_reservation() failure, so that iscsi-target code
      sends the correct SCSI status.
      
      All other fabrics using target_submit_cmd_*() with a RESERVATION_CONFLICT
      call to transport_generic_request_failure() are not effected by this bug.
      Reported-by: NJeff Leung <jleung@curriegrad2004.ca>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f85eda8d
    • N
      tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit · 5dade710
      Nicholas Bellinger 提交于
      This patch adds a VHOST_SCSI_FEATURES mask minus VIRTIO_RING_F_EVENT_IDX
      so that vhost-scsi-pci userspace will strip this feature bit once
      GET_FEATURES reports it as being unsupported on the host.
      
      This is to avoid a bug where ->handle_kicks() are missed when EVENT_IDX
      is enabled by default in userspace code.
      
      (mst: Rename to VHOST_SCSI_FEATURES + add comment)
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NAsias He <asias@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5dade710
  3. 28 3月, 2013 4 次提交
  4. 27 3月, 2013 12 次提交
  5. 26 3月, 2013 18 次提交
    • W
      x86, io_apic: remove duplicated include from irq_remapping.c · 4fdc7824
      Wei Yongjun 提交于
      Remove duplicated include.
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      4fdc7824
    • J
      igb: fix PHC stopping on max freq · 75517d92
      Jiri Benc 提交于
      For 82576 MAC type, max_adj is reported as 1000000000 ppb. However, if
      this value is passed to igb_ptp_adjfreq_82576, incvalue overflows out of
      INCVALUE_82576_MASK, resulting in setting of zero TIMINCA.incvalue, stopping
      the PHC (instead of going at twice the nominal speed).
      
      Fix the advertised max_adj value to the largest value hardware can handle.
      As there is no min_adj value available (-max_adj is used instead), this will
      also prevent stopping the clock intentionally. It's probably not a big deal,
      other igb MAC types don't support stopping the clock, either.
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Acked-by: NMatthew Vick <matthew.vick@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      75517d92
    • S
      igb: make sensor info static · 05ec29e8
      Stephen Hemminger 提交于
      Trivial sparse warning.
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      05ec29e8
    • A
      igb: SR-IOV init reordering · d5e51a10
      Alex Williamson 提交于
      igb is ineffective at setting a lower total VFs because:
      
      int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs)
      {
              ...
              /* Shouldn't change if VFs already enabled */
              if (dev->sriov->ctrl & PCI_SRIOV_CTRL_VFE)
                      return -EBUSY;
      
      Swap init ordering.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Acked-by: NGreg Rose <gregory.v.rose@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      d5e51a10
    • A
      igb: Fix null pointer dereference · d0f63acc
      Alex Williamson 提交于
      The max_vfs= option has always been self limiting to the number of VFs
      supported by the device.  fa44f2f1 added SR-IOV configuration via
      sysfs, but in the process broke this self correction factor.  The
      failing path is:
      
      igb_probe
        igb_sw_init
          if (max_vfs > 7) {
              adapter->vfs_allocated_count = 7;
          ...
          igb_probe_vfs
          igb_enable_sriov(, max_vfs)
            if (num_vfs > 7) {
              err = -EPERM;
              ...
      
      This leaves vfs_allocated_count = 7 and vf_data = NULL, so we bomb out
      when igb_probe finally calls igb_reset.  It seems like a really bad
      idea, and somewhat pointless, to set vfs_allocated_count separate from
      vf_data, but limiting max_vfs is enough to avoid the null pointer.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Acked-by: NGreg Rose <gregory.v.rose@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      d0f63acc
    • L
      igb: fix i350 anti spoofing config · 22c12752
      Lior Levy 提交于
      Fix a problem in i350 where anti spoofing configuration was written into a
      wrong register.
      Signed-off-by: NLior Levy <lior.levy@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      22c12752
    • X
      ixgbevf: don't release the soft entries · a1f6c6b1
      xunleer 提交于
      When the ixgbevf driver is opened the request to allocate MSIX irq
      vectors may fail.  In that case the driver will call ixgbevf_down()
      which will call ixgbevf_irq_disable() to clear the HW interrupt
      registers and calls synchronize_irq() using the msix_entries pointer in
      the adapter structure.  However, when the function to request the MSIX
      irq vectors failed it had already freed the msix_entries which causes
      an OOPs from using the NULL pointer in synchronize_irq().
      
      The calls to pci_disable_msix() and to free the msix_entries memory
      should not occur if device open fails.  Instead they should be called
      during device driver removal to balance with the call to
      pci_enable_msix() and the call to allocate msix_entries memory
      during the device probe and driver load.
      Signed-off-by: NLi Xun <xunleer.li@huawei.com>
      Signed-off-by: NGreg Rose <gregory.v.rose@intel.com>
      Tested-by: NSibai Li <sibai.li@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      a1f6c6b1
    • P
      block: removes dynamic allocation on stack · d8d595df
      Philip J Kelleher 提交于
      This patch removes dynamic allocation on the stack error.
      Signed-off-by: NPhilip J Kelleher <pjk1939@linux.vnet.ibm.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      d8d595df
    • J
      Xilinx: ARM: UART: clear pending irqs before enabling irqs · 855f6fd9
      John Linn 提交于
      The Boot ROM has an issue which will cause the driver to
      lock up as pending irqs are not being cleared. With them
      cleared it prevents that issue.
      
      This patch is needed for the current (3.9-rc3) mainline kernel. I guess
      it went unnoticed, because it was only tested with u-boot up until now.
      And u-boot maybe handles this.
      
      [s.trumtrar@pengutronix.de: cherry-picked from linux-xlnx.git]
      Signed-off-by: NSteffen Trumtrar <s.trumtrar@pengutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      855f6fd9
    • J
      TTY: 8250, deprecated 8250_core.* options · 9326b047
      Jiri Slaby 提交于
      They were introduced by mistake in 3.7. Let's deprecate them now. For
      the reasons, see the text in Kconfig below.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9326b047
    • J
      TTY: 8250, revert module name change · 9196d8ac
      Jiri Slaby 提交于
      In 3.7 the 8250 module name was changed unintentionally from 8250 to
      8250_core by commit 835d844d
      (8250_pnp: do pnp probe before legacy probe). We then had to
      re-introduce the old module options to ensure the old good
      8250.nr_uart & co. still work. This can be done only by a very dirty
      hack and we did it in f2b8dfd9
      (serial: 8250: Keep 8250.<xxxx> module options functional after driver
      rename).
      
      That is so damn ugly so that I decided to revert to the old module
      name and deprecate the new 8250_core options present in 3.7 and 3.8
      only. The deprecation will happen in the following patch.
      
      Note that this patch changes the hack above to support "8250_core.*",
      because we now have "8250.*" natively.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9196d8ac
    • S
      USB: EHCI: fix bug in iTD/siTD DMA pool allocation · 85ecd032
      Soeren Moch 提交于
      [Description written by Alan Stern]
      
      Soeren tracked down a very difficult bug in ehci-hcd's DMA pool
      management of iTD and siTD structures.  Some background: ehci-hcd
      gives each isochronous endpoint its own set of active and free itd's
      (or sitd's for full-speed devices).  When a new itd is needed, it is
      taken from the head of the free list, if possible.  However, itd's
      must not be used twice in a single frame because the hardware
      continues to access the data structure for the entire duration of a
      frame.  Therefore if the itd at the head of the free list has its
      "frame" member equal to the current value of ehci->now_frame, it
      cannot be reused and instead a new itd is allocated from the DMA pool.
      The entries on the free list are not released back to the pool until
      the endpoint is no longer in use.
      
      The bug arises from the fact that sometimes an itd can be moved back
      onto the free list before itd->frame has been set properly.  In
      Soeren's case, this happened because ehci-hcd can allocate one more
      itd than it actually needs for an URB; the extra itd may or may not be
      required depending on how the transfer aligns with a frame boundary.
      For example, an URB with 8 isochronous packets will cause two itd's to
      be allocated.  If the URB is scheduled to start in microframe 3 of
      frame N then it will require both itds: one for microframes 3 - 7 of
      frame N and one for microframes 0 - 2 of frame N+1.  But if the URB
      had been scheduled to start in microframe 0 then it would require only
      the first itd, which could cover microframes 0 - 7 of frame N.  The
      second itd would be returned to the end of the free list.
      
      The itd allocation routine initializes the entire structure to 0, so
      the extra itd ends up on the free list with itd->frame set to 0
      instead of a meaningful value.  After a while the itd reaches the head
      of the list, and occasionally this happens when ehci->now_frame is
      equal to 0.  Then, even though it would be okay to reuse this itd, the
      driver thinks it must get another itd from the DMA pool.
      
      For as long as the isochronous endpoint remains in use, this flaw in
      the mechanism causes more and more itd's to be taken slowly from the
      DMA pool.  Since none are released back, the pool eventually becomes
      exhausted.
      
      This reuslts in memory allocation failures, which typically show up
      during a long-running audio stream.  Video might suffer the same
      effect.
      
      The fix is very simple.  To prevent allocations from the pool when
      they aren't needed, make sure that itd's sent back to the free list
      prematurely have itd->frame set to an invalid value which can never be
      equal to ehci->now_frame.
      
      This should be applied to -stable kernels going back to 3.6.
      Signed-off-by: NSoeren Moch <smoch@web.de>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      85ecd032
    • I
      staging: comedi: s626: fix continuous acquisition · e4317ce8
      Ian Abbott 提交于
      For the s626 driver, there is a bug in the handling of asynchronous
      commands on the AI subdevice when the stop source is `TRIG_NONE`.  The
      command should run continuously until cancelled, but the interrupt
      handler stops the command running after the first scan.
      
      The command set-up function `s626_ai_cmd()` contains this code:
      
      	switch (cmd->stop_src) {
      	case TRIG_COUNT:
      		/*  data arrives as one packet */
      		devpriv->ai_sample_count = cmd->stop_arg;
      		devpriv->ai_continous = 0;
      		break;
      	case TRIG_NONE:
      		/*  continous acquisition */
      		devpriv->ai_continous = 1;
      		devpriv->ai_sample_count = 0;
      		break;
      	}
      
      The interrupt handler `s626_irq_handler()` contains this code:
      
      		if (!(devpriv->ai_continous))
      			devpriv->ai_sample_count--;
      		if (devpriv->ai_sample_count <= 0) {
      			devpriv->ai_cmd_running = 0;
      			/* ... */
      		}
      
      So `devpriv->ai_sample_count` is only decremented for the `TRIG_COUNT`
      case, but `devpriv->ai_cmd_running` is set to 0 (and the command
      stopped) regardless.
      
      Fix this in `s626_ai_cmd()` by setting `devpriv->ai_sample_count = 1`
      for the `TRIG_NONE` case.  The interrupt handler will not decrement it
      so it will remain greater than 0 and the check for stopping the
      acquisition will fail.
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4317ce8
    • S
      xhci: Don't warn on empty ring for suspended devices. · a83d6755
      Sarah Sharp 提交于
      When a device attached to the roothub is suspended, the endpoint rings
      are stopped.  The host may generate a completion event with the
      completion code set to 'Stopped' or 'Stopped Invalid' when the ring is
      halted.  The current xHCI code prints a warning in that case, which can
      be really annoying if the USB device is coming into and out of suspend.
      
      Remove the unnecessary warning.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: NStephen Hemminger <stephen@networkplumber.org>
      a83d6755
    • V
      usb: xhci: Fix TRB transfer length macro used for Event TRB. · 1c11a172
      Vivek Gautam 提交于
      Use proper macro while extracting TRB transfer length from
      Transfer event TRBs. Adding a macro EVENT_TRB_LEN (bits 0:23)
      for the same, and use it instead of TRB_LEN (bits 0:16) in
      case of event TRBs.
      
      This patch should be backported to kernels as old as 2.6.31, that
      contain the commit b10de142 "USB: xhci:
      Bulk transfer support".  This patch will have issues applying to older
      kernels.
      Signed-off-by: NVivek gautam <gautam.vivek@samsung.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      1c11a172
    • L
      usb/acpi: binding xhci root hub usb port with ACPI · bafcaf6d
      Lan Tianyu 提交于
      This patch is to bind xhci root hub usb port with its acpi node.
      The port num in the acpi table matches with the sequence in the xhci
      extended capabilities table. So call usb_hcd_find_raw_port_number() to
      transfer hub port num into raw port number which associates with
      the sequence in the xhci extended capabilities table before binding.
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      bafcaf6d
    • L
      usb: add find_raw_port_number callback to struct hc_driver() · 3f5eb141
      Lan Tianyu 提交于
      xhci driver divides the root hub into two logical hubs which work
      respectively for usb 2.0 and usb 3.0 devices. They are independent
      devices in the usb core. But in the ACPI table, it's one device node
      and all usb2.0 and usb3.0 ports are under it. Binding usb port with
      its acpi node needs the raw port number which is reflected in the xhci
      extended capabilities table. This patch is to add find_raw_port_number
      callback to struct hc_driver(), fill it with xhci_find_raw_port_number()
      which will return raw port number and add a wrap usb_hcd_find_raw_port_number().
      
      Otherwise, refactor xhci_find_real_port_number(). Using
      xhci_find_raw_port_number() to get real index in the HW port status
      registers instead of scanning through the xHCI roothub port array.
      This can help to speed up.
      
      All addresses in xhci->usb2_ports and xhci->usb3_ports array are
      kown good ports and don't include following bad ports in the extended
      capabilities talbe.
           (1) root port that doesn't have an entry
           (2) root port with unknown speed
           (3) root port that is listed twice and with different speeds.
      
      So xhci_find_raw_port_number() will only return port num of good ones
      and never touch bad ports above.
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      3f5eb141
    • P
      usb: xhci: fix build warning · 09ce0c0c
      Peter Chen 提交于
      /home/b29397/work/code/git/linus/linux-2.6/drivers/usb/host/xhci-ring.c: In function ‘handle_port_status’:
      /home/b29397/work/code/git/linus/linux-2.6/drivers/usb/host/xhci-ring.c:1580: warning: ‘hcd’ may be used uninitialized in this function
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      09ce0c0c
  6. 25 3月, 2013 3 次提交