1. 19 9月, 2012 3 次提交
  2. 18 9月, 2012 3 次提交
  3. 17 9月, 2012 1 次提交
  4. 16 9月, 2012 1 次提交
    • M
      mfd: core: Push irqdomain mapping out into devices · 0848c94f
      Mark Brown 提交于
      Currently the MFD core supports remapping MFD cell interrupts using an
      irqdomain but only if the MFD is being instantiated using device tree
      and only if the device tree bindings use the pattern of registering IPs
      in the device tree with compatible properties.  This will be actively
      harmful for drivers which support non-DT platforms and use this pattern
      for their DT bindings as it will mean that the core will silently change
      remapping behaviour and it is also limiting for drivers which don't do
      DT with this particular pattern.  There is also a potential fragility if
      there are interrupts not associated with MFD cells and all the cells are
      omitted from the device tree for some reason.
      
      Instead change the code to take an IRQ domain as an optional argument,
      allowing drivers to take the decision about the parent domain for their
      interrupts.  The one current user of this feature is ab8500-core, it has
      the domain lookup pushed out into the driver.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      0848c94f
  5. 14 9月, 2012 3 次提交
  6. 12 9月, 2012 1 次提交
    • R
      i2c: pnx: Fix read transactions of >= 2 bytes · c076ada4
      Roland Stigge 提交于
      On transactions with n>=2 bytes, the controller actually wrongly clocks in n+1
      bytes. This is caused by the (wrong) assumption that RFE in the Status Register
      is 1 iff there is no byte already ordered (via a dummy TX byte). This lead to
      the implementation of synchronized byte ordering, e.g.:
      
      Dummy-TX - RX - Dummy-TX - RX - ...
      
      But since RFE actually stays high after some Dummy-TX, it rather looks like:
      
      Dummy-TX - Dummy-TX - RX - Dummy-TX - RX - (RX)
      
      The last RX byte is clocked in by the bus controller, but ignored by the kernel
      when filling the userspace buffer.
      
      This patch fixes the issue by asking for RX via Dummy-TX asynchronously.
      Introducing a separate counter for TX bytes.
      Signed-off-by: NRoland Stigge <stigge@antcom.de>
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      c076ada4
  7. 11 9月, 2012 6 次提交
    • L
      usb/acpi: Use ACPI methods to power off ports. · f7ac7787
      Lan Tianyu 提交于
      Upcoming Intel systems will have an ACPI method to control whether a USB
      port can be completely powered off.  The implication of powering off a
      USB port is that the device and host sees a physical disconnect, and
      subsequent port connections and remote wakeups will be lost.
      
      Add a new function, usb_acpi_power_manageable(), that can be used to
      find whether the usb port has ACPI power resources that can be used to
      power on and off the port on these machines. Also add a new function
      called usb_acpi_set_power_state() that controls the port power via these
      ACPI methods.
      
      When the USB core calls into the xHCI hub driver to power off a port,
      check whether the port can be completely powered off via this new ACPI
      mechanism.  If so, call into these new ACPI methods.  Also use the ACPI
      methods when the USB core asks to power on a port.
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f7ac7787
    • L
      usb/acpi: Store info on device removability. · 05f91689
      Lan Tianyu 提交于
      In the upcoming USB port power off patches, we need to know whether a
      USB port can ever see a disconnect event.  Often USB ports are internal
      to a system, and users can't disconnect USB devices from that port.
      Sometimes those ports will remain empty, because the OEM chose not to
      connect an internal USB device to that port.
      
      According to ACPI Spec 9.13, PLD indicates whether USB port is
      user visible and _UPC indicates whether a USB device can be connected to
      the USB port (we'll call this "connectible").  Here's a matrix of the
      possible combinations:
      
      Visible Connectible
      		Name		Example
      -------------------------------------------------------------------------
      
      Yes	No	Unknown		(Invalid state.)
      
      Yes	Yes	Hot-plug	USB ports on the outside of a laptop.
      				A user could freely connect and disconnect
      				USB devices.
      
      No	Yes	Hard-wired	A USB modem hard-wired to a port on the
      				inside of a laptop.
      
      No	No	Not used	The port is internal to the system and
      				will remain empty.
      
      Represent each of these four states with an enum usb_port_connect_type.
      The four states are USB_PORT_CONNECT_TYPE_UNKNOWN,
      USB_PORT_CONNECT_TYPE_HOT_PLUG, USB_PORT_CONNECT_TYPE_HARD_WIRED, and
      USB_PORT_NOT_USED.  When we get the USB port's acpi_handle, store the
      state in connect_type in struct usb_port.
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      05f91689
    • L
      usb: move children to struct usb_port · ff823c79
      Lan Tianyu 提交于
      The usb_device structure contains an array of usb_device "children".
      This array is only valid if the usb_device is a hub, so it makes no
      sense to store it there.  Instead, store the usb_device child
      in its parent usb_port structure.
      
      Since usb_port is an internal USB core structure, add a new function to
      get the USB device child, usb_hub_find_child().  Add a new macro,
      usb_hub_get_each_child(), to iterate over all the children attached to a
      particular USB hub.
      
      Remove the printing the USB children array pointer from the usb-ip
      driver, since it's really not necessary.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ff823c79
    • L
      usb: redefine DeviceRemovable and wHubDelay as _le16 · 9c208904
      Lan Tianyu 提交于
      DeviceRemovalbe and wHubDelay for usb3.0 hub are little-endian
      and so define them as _le16.
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9c208904
    • S
      usb/core: use bin2bcd() for bcdDevice in RH · b53d657d
      Sebastian Andrzej Siewior 提交于
      The kernel's version number is used as decimal in the bcdDevice field of
      the RH descriptor. For kernel version v3.12 we would see 3.0c in lsusb.
      I am not sure how important it is to stick with bcd values since this is
      this way since we started git history and nobody complained (however back
      then we reported only 2.6).
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b53d657d
    • H
      usbfs: Add a new disconnect-and-claim ioctl (v2) · 0837e7e5
      Hans de Goede 提交于
      Apps which deal with devices which also have a kernel driver, need to do
      the following:
      1) Check which driver is attached, so as to not detach the wrong driver
         (ie detaching usbfs while another instance of the app is using the device)
      2) Detach the kernel driver
      3) Claim the interface
      
      Where moving from one step to the next for both 1-2 and 2-3 consists of
      a (small) race window. So currently such apps are racy and people just live
      with it.
      
      This patch adds a new ioctl which makes it possible for apps to do this
      in a race free manner. For flexibility apps can choose to:
      1) Specify the driver to disconnect
      2) Specify to disconnect any driver except for the one named by the app
      3) Disconnect any driver
      
      Note that if there is no driver attached, the ioctl will just act like the
      regular claim-interface ioctl, this is by design, as returning an error for
      this condition would open a new bag of race-conditions.
      
      Changes in v2:
      -Fix indentation of if blocks where the condition spans multiple lines
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0837e7e5
  8. 10 9月, 2012 15 次提交
  9. 08 9月, 2012 2 次提交
  10. 07 9月, 2012 3 次提交
    • T
      SUNRPC: Fix a UDP transport regression · f39c1bfb
      Trond Myklebust 提交于
      Commit 43cedbf0 (SUNRPC: Ensure that
      we grab the XPRT_LOCK before calling xprt_alloc_slot) is causing
      hangs in the case of NFS over UDP mounts.
      
      Since neither the UDP or the RDMA transport mechanism use dynamic slot
      allocation, we can skip grabbing the socket lock for those transports.
      Add a new rpc_xprt_op to allow switching between the TCP and UDP/RDMA
      case.
      
      Note that the NFSv4.1 back channel assigns the slot directly
      through rpc_run_bc_task, so we can ignore that case.
      Reported-by: NDick Streefland <dick.streefland@altium.nl>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: stable@vger.kernel.org [>= 3.1]
      f39c1bfb
    • K
      usb: phy: add a new driver for omap usb2 phy · 657b306a
      Kishon Vijay Abraham I 提交于
      All phy related programming like enabling/disabling the clocks, powering
      on/off the phy is taken care of by this driver. It is also used for OTG
      related functionality like srp.
      
      This also includes device tree support for usb2 phy driver and
      the documentation with device tree binding information is updated.
      
      Currently writing to control module register is taken care in this
      driver which will be removed once the control module driver is in place.
      
      Cc: Felipe Balbi <balbi@ti.com>
      Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      657b306a
    • B
      kobject: fix oops with "input0: bad kobj_uevent_env content in show_uevent()" · 60e233a5
      Bjørn Mork 提交于
      Fengguang Wu <fengguang.wu@intel.com> writes:
      
      > After the __devinit* removal series, I can still get kernel panic in
      > show_uevent(). So there are more sources of bug..
      >
      > Debug patch:
      >
      > @@ -343,8 +343,11 @@ static ssize_t show_uevent(struct device
      >                 goto out;
      >
      >         /* copy keys to file */
      > -       for (i = 0; i < env->envp_idx; i++)
      > +       dev_err(dev, "uevent %d env[%d]: %s/.../%s\n", env->buflen, env->envp_idx, top_kobj->name, dev->kobj.name);
      > +       for (i = 0; i < env->envp_idx; i++) {
      > +               printk(KERN_ERR "uevent %d env[%d]: %s\n", (int)count, i, env->envp[i]);
      >                 count += sprintf(&buf[count], "%s\n", env->envp[i]);
      > +       }
      >
      > Oops message, the env[] is again not properly initilized:
      >
      > [   44.068623] input input0: uevent 61 env[805306368]: input0/.../input0
      > [   44.069552] uevent 0 env[0]: (null)
      
      This is a completely different CONFIG_HOTPLUG problem, only
      demonstrating another reason why CONFIG_HOTPLUG should go away.  I had a
      hard time trying to disable it anyway ;-)
      
      The problem this time is lots of code assuming that a call to
      add_uevent_var() will guarantee that env->buflen > 0.  This is not true
      if CONFIG_HOTPLUG is unset.  So things like this end up overwriting
      env->envp_idx because the array index is -1:
      
      	if (add_uevent_var(env, "MODALIAS="))
      		return -ENOMEM;
              len = input_print_modalias(&env->buf[env->buflen - 1],
      				   sizeof(env->buf) - env->buflen,
      				   dev, 0);
      
      Don't know what the best action is, given that there seem to be a *lot*
      of this around the kernel.  This patch "fixes" the problem for me, but I
      don't know if it can be considered an appropriate fix.
      
      [ It is the correct fix for now, for 3.7 forcing CONFIG_HOTPLUG to
      always be on is the longterm fix, but it's too late for 3.6 and older
      kernels to resolve this that way - gregkh ]
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Tested-by: NFengguang Wu <fengguang.wu@intel.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      60e233a5
  11. 06 9月, 2012 2 次提交
    • T
      NFSv4: Fix buffer overflow checking in __nfs4_get_acl_uncached · 1f1ea6c2
      Trond Myklebust 提交于
      Pass the checks made by decode_getacl back to __nfs4_get_acl_uncached
      so that it knows if the acl has been truncated.
      
      The current overflow checking is broken, resulting in Oopses on
      user-triggered nfs4_getfacl calls, and is opaque to the point
      where several attempts at fixing it have failed.
      This patch tries to clean up the code in addition to fixing the
      Oopses by ensuring that the overflow checks are performed in
      a single place (decode_getacl). If the overflow check failed,
      we will still be able to report the acl length, but at least
      we will no longer attempt to cache the acl or copy the
      truncated contents to user space.
      Reported-by: NSachin Prabhu <sprabhu@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Tested-by: NSachin Prabhu <sprabhu@redhat.com>
      1f1ea6c2
    • V
      usb: phy: fix build break · a4c3ddec
      Venu Byravarasu 提交于
      During phy interface separation from otg.h, as the enum "usb_otg_state"
      was having multiple otg states info and removal of member 'state'
      of this enum type from usb_phy struct did not generate any compilation
      issues, I removed member state from struct usb_phy.
      
      As this is causing build break in musb code, adding member 'state'
      to usb_phy structure.
      Signed-off-by: NVenu Byravarasu <vbyravarasu@nvidia.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      a4c3ddec