1. 11 5月, 2011 5 次提交
    • S
      firewire: sbp2: octlet AT payloads can be stack-allocated · 81bf52d8
      Stefan Richter 提交于
      We do not need slab allocations for ORB pointer write transactions
      anymore in order to satisfy streaming DMA mapping constraints, thanks to
      commit da28947e "firewire: ohci: avoid separate DMA mapping for
      small AT payloads".
      
      (Besides, the slab-allocated buffers that firewire-sbp2 used to provide
      for 8-byte write requests were still not fully portable since they
      shared a cacheline with unrelated CPU-accessed data.)
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      81bf52d8
    • S
      firewire: sbp2: omit Scsi_Host lock from queuecommand · b75ca5ea
      Stefan Richter 提交于
      firewire-sbp2 already takes care for internal serialization where
      required (ORB list accesses), and it does not use cmd->serial_number
      internally.  Hence it is safe to not grab the shost lock around
      queuecommand.
      
      While we are at housekeeping, drop a redundant struct member:
      sbp2_command_orb.done is set once in a hot path and dereferenced once in
      a hot path.  We can as well dereference sbp2_command_orb.cmd->scsi_done
      instead.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      b75ca5ea
    • S
      firewire: core: use non-reentrant workqueue with rescuer · 6ea9e7bb
      Stefan Richter 提交于
      firewire-core manages the following types of work items:
      
      fw_card.br_work:
        - resets the bus on a card and possibly sends a PHY packet before that
        - does not sleep for long or not at all
        - is scheduled via fw_schedule_bus_reset() by
            - firewire-ohci's pci_probe method
            - firewire-ohci's set_config_rom method, called by kernelspace
              protocol drivers and userspace drivers which add/remove
      	Configuration ROM descriptors
            - userspace drivers which use the bus reset ioctl
            - itself if the last reset happened less than 2 seconds ago
      
      fw_card.bm_work:
        - performs bus management duties
        - usually does not (but may in corner cases) sleep for long
        - is scheduled via fw_schedule_bm_work() by
            - firewire-ohci's self-ID-complete IRQ handler tasklet
            - firewire-core's fw_device.work instances whenever the root node
              device was (successfully or unsuccessfully) discovered,
      	refreshed, or rediscovered
            - itself in case of resource allocation failures or in order to
              obey the 125ms bus manager arbitration interval
      
      fw_device.work:
        - performs node probe, update, shutdown, revival, removal; including
          kernel driver probe, update, shutdown and bus reset notification to
          userspace drivers
        - usually sleeps moderately long, in corner cases very long
        - is scheduled by
            - firewire-ohci's self-ID-complete IRQ handler tasklet via the
              core's fw_node_event
            - firewire-ohci's pci_remove method via core's fw_destroy_nodes/
              fw_node_event
            - itself during retries, e.g. while a node is powering up
      
      iso_resource.work:
        - accesses registers at the Isochronous Resource Manager node
        - usually does not (but may in corner cases) sleep for long
        - is scheduled via schedule_iso_resource() by
            - the owning userspace driver at addition and removal of the
              resource
            - firewire-core's fw_device.work instances after bus reset
            - itself in case of resource allocation if necessary to obey the
              1000ms reallocation period after bus reset
      
      fw_card.br_work instances should not, and instances of the others must
      not, be executed in parallel by multiple CPUs -- but were not protected
      against that.  Hence allocate a non-reentrant workqueue for them.
      
      fw_device.work may be used in the memory reclaim path in case of SBP-2
      device updates.  Hence we need a workqueue with rescuer and cannot use
      system_nrt_wq.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Reviewed-by: NTejun Heo <tj@kernel.org>
      6ea9e7bb
    • C
      firewire: optimize iso queueing by setting wake only after the last packet · 13882a82
      Clemens Ladisch 提交于
      When queueing iso packets, the run time is dominated by the two
      MMIO accesses that set the DMA context's wake bit.  Because most
      drivers submit packets in batches, we can save much time by
      removing all but the last wakeup.
      
      The internal kernel API is changed to require a call to
      fw_iso_context_queue_flush() after a batch of queued packets.
      The user space API does not change, so one call to
      FW_CDEV_IOC_QUEUE_ISO must specify multiple packets to take
      advantage of this optimization.
      
      In my measurements, this patch reduces the time needed to queue
      fifty skip packets from userspace to one sixth on a 2.5 GHz CPU,
      or to one third at 800 MHz.
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      13882a82
    • S
      firewire: octlet AT payloads can be stack-allocated · f30e6d3e
      Stefan Richter 提交于
      We do not need slab allocations anymore in order to satisfy
      streaming DMA mapping constraints, thanks to commit da28947e
      "firewire: ohci: avoid separate DMA mapping for small AT payloads".
      
      (Besides, the slab-allocated buffers that firewire-core, firewire-sbp2,
      and firedtv used to provide for 8-byte write and lock requests were
      still not fully portable since they crossed cacheline boundaries or
      shared a cacheline with unrelated CPU-accessed data.  snd-firewire-lib
      got this aspect right by using an extra kmalloc/ kfree just for the
      8-byte transaction buffer.)
      
      This change replaces kmalloc'ed lock transaction scratch buffers in
      firewire-core, firedtv, and snd-firewire-lib by local stack allocations.
      Perhaps the most notable result of the change is simpler locking because
      there is no need to serialize usages of preallocated per-device buffers
      anymore.  Also, allocations and deallocations are simpler.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Acked-by: NClemens Ladisch <clemens@ladisch.de>
      f30e6d3e
  2. 10 5月, 2011 3 次提交
  3. 09 5月, 2011 9 次提交
  4. 05 5月, 2011 2 次提交
  5. 04 5月, 2011 7 次提交
  6. 03 5月, 2011 7 次提交
  7. 02 5月, 2011 7 次提交
    • K
      omap:usb: add regulator support for EHCI · 6e3d4bec
      Keshava Munegowda 提交于
      in case of ehci phy mode; regulator of phy
      should be enabled before initializing the
      usbhs core driver.
      Signed-off-by: NKeshava Munegowda <keshava_mgowda@ti.com>
      Tested-by: NSteve Calfee <stevecalfee@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      6e3d4bec
    • A
      mfd: Fix usbhs_enable error handling · d11536e4
      Axel Lin 提交于
      In the case of missing platform_data we do not hold a spin_lock,
      thus we should not call spin_unlock_irqrestore in the error path.
      
      Also simplify the error handling by separating the successful path
      from error path. I think this change improves readability.
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Tested-by: NSteve Calfee <stevecalfee@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      d11536e4
    • J
      usb: musb: gadget: Fix out-of-sync runtime pm calls · cdefce16
      Jarkko Nikula 提交于
      If cable is not connected to peripheral only board when initializing the
      gadget driver, then runtime pm calls are out-of-sync and the musb cannot
      idle with omap2430.c. This was noted on Nokia N900 where musb prevented the
      CPU to be able to enter deeper retention idle state.
      
      This was working in 2.6.38 before runtime pm conversions but there musb
      smart standby/idle modes were configured statically where they are now
      updated runtime depending on use and cable status.
      
      Reason for out-of-sync is that runtime pm is activated in function
      musb_gadget.c: usb_gadget_probe_driver but suspended only in OTG mode if
      cable is not connected when initializing. In peripheral only mode this leads
      to out-of-sync runtime pm since runtime pm remain active and is activated
      another time in omap2430.c: musb_otg_notifications for VBUS Connect event
      and thus cannot suspend for VBUS Disconnect event since the use count remains
      active.
      
      Fix this by moving cable status check and pm_runtime_put call in
      usb_gadget_probe_driver out of is_otg_enabled block.
      Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      cdefce16
    • J
      usb: musb: omap2430: Fix retention idle on musb peripheral only boards · 383cf4e8
      Jarkko Nikula 提交于
      Recent runtime pm and hwmod conversions for 2.6.39 broke the musb peripheral
      mode OMAP retention idle on boards where the board mode in struct
      musb_hdrc_platform_data is set to MUSB_PERIPHERAL.
      
      These conversions changed the way how the OTG_SYSCONFIG register is
      configured and used in runtime. Before 2.6.39 smart standby/idle modes were
      activated statically in OTG_SYSCONFIG. Those modes allow that the musb is
      able to idle when peripheral device is not connected to host.
      
      In 2.6.39 the OTG_SYSCONFIG is updated runtime depending on VBUS status.
      No standby/idle modes are used when device is connected and force
      standby/idle when disconnected.
      
      Unfortunately VBUS disconnect event that handles the disconnect case lets
      the peripheral musb to idle only when board mode is MUSB_OTG. Fix this by
      checking the peripheral mode also.
      Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      383cf4e8
    • J
      i2c-parport: Fix adapter list handling · 56acc7a3
      Jean Delvare 提交于
      Use a standard list with proper locking to handle the list of
      adapters. Thankfully it only matters on systems with more than one
      parallel port, which are very rare.
      
      Thanks to Lukasz Kapiec for reporting the problem to me.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: stable@kernel.org
      56acc7a3
    • J
      i2c-i801: Move device ID definitions to driver · a6e5e2be
      Jean Delvare 提交于
      Move the SMBus device ID definitions of recent devices from pci_ids.h
      to the i2c-i801.c driver file. They don't have to be shared, as they
      are clearly identified and only used in this driver. In the future,
      such IDs will go to i2c-i801 directly. This will make adding support
      for new devices much faster and easier, as it will avoid cross-
      subsystem patch sets and merge conflicts.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Seth Heasley <seth.heasley@intel.com>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      a6e5e2be
    • A
      hwmon: (twl4030-madc-hwmon) Return proper error if hwmon_device_register fails · c30aa39c
      Axel Lin 提交于
      The driver did not return an error if the call to hwmon_device_register failed.
      Fix by returning the error reported from hwmon_device_register.
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      c30aa39c