30 Oct, 2010

1 commit

  • The creation of the I/O clock domain requires some adjustments. Since the
    CF bus timing logic is clocked by the I/O clock, use its rate for delay
    calculations.

    Signed-off-by: David Daney
    Cc: Jeff Garzik
    Cc: linux-ide@vger.kernel.org
    Patchwork: http://patchwork.linux-mips.org/patch/1660/
    Acked-by: Jeff Garzik
    Signed-off-by: Ralf Baechle

    David Daney
     

25 Oct, 2010

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    Update broken web addresses in arch directory.
    Update broken web addresses in the kernel.
    Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
    Revert "Fix typo: configuation => configuration" partially
    ida: document IDA_BITMAP_LONGS calculation
    ext2: fix a typo on comment in ext2/inode.c
    drivers/scsi: Remove unnecessary casts of private_data
    drivers/s390: Remove unnecessary casts of private_data
    net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
    drivers/infiniband: Remove unnecessary casts of private_data
    drivers/gpu/drm: Remove unnecessary casts of private_data
    kernel/pm_qos_params.c: Remove unnecessary casts of private_data
    fs/ecryptfs: Remove unnecessary casts of private_data
    fs/seq_file.c: Remove unnecessary casts of private_data
    arm: uengine.c: remove C99 comments
    arm: scoop.c: remove C99 comments
    Fix typo configue => configure in comments
    Fix typo: configuation => configuration
    Fix typo interrest[ing|ed] => interest[ing|ed]
    Fix various typos of valid in comments
    ...

    Fix up trivial conflicts in:
    drivers/char/ipmi/ipmi_si_intf.c
    drivers/usb/gadget/rndis.c
    net/irda/irnet/irnet_ppp.c

    Linus Torvalds
     

23 Oct, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
    workqueue: remove in_workqueue_context()
    workqueue: Clarify that schedule_on_each_cpu is synchronous
    memory_hotplug: drop spurious calls to flush_scheduled_work()
    shpchp: update workqueue usage
    pciehp: update workqueue usage
    isdn/eicon: don't call flush_scheduled_work() from diva_os_remove_soft_isr()
    workqueue: add and use WQ_MEM_RECLAIM flag
    workqueue: fix HIGHPRI handling in keep_working()
    workqueue: add queue_work and activate_work trace points
    workqueue: prepare for more tracepoints
    workqueue: implement flush[_delayed]_work_sync()
    workqueue: factor out start_flush_work()
    workqueue: cleanup flush/cancel functions
    workqueue: implement alloc_ordered_workqueue()

    Fix up trivial conflict in fs/gfs2/main.c as per Tejun

    Linus Torvalds
     

22 Oct, 2010

25 commits

  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (26 commits)
    include/linux/libata.h: fix typo
    pata_bf54x: fix return type of bfin_set_devctl
    Drivers: ata: Makefile: replace the use of -objs with -y
    libahci: fix result_tf handling after an ATA PIO data-in command
    pata_sl82c105: implement sff_irq_check() method
    pata_sil680: implement sff_irq_check() method
    pata_pdc202xx_old: implement sff_irq_check() method
    pata_cmd640: implement sff_irq_check() method
    ata_piix: Add device ID for ICH4-L
    pata_sil680: make sil680_sff_exec_command() 'static'
    ata: Intel IDE-R support
    libata: reorder ata_queued_cmd to remove alignment padding on 64 bit builds
    libata: Signal that our SATL supports WRITE SAME(16) with UNMAP
    ata_piix: remove SIDPR locking
    libata: implement cross-port EH exclusion
    libata: add @ap to ata_wait_register() and introduce ata_msleep()
    ata_piix: implement LPM support
    libata: implement LPM support for port multipliers
    libata: reimplement link power management
    libata: implement sata_link_scr_lpm() and make ata_dev_set_feature() global
    ...

    Linus Torvalds
     
  • The new devctl func added for us to the driver has the wrong return
    type. Which is to say there shouldn't be any. This fixes compile
    time warnings as there shouldn't be any runtime difference.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Jeff Garzik

    Mike Frysinger
     
  • Changed -objs to -y in Makefile.

    Signed-off-by: Tracey Dent
    Signed-off-by: Jeff Garzik

    Tracey Dent
     
  • ATA devices don't send D2H Reg FIS after an successful ATA PIO data-in
    command. The host is supposed to take the TF and E_Status of the
    preceding PIO Setup FIS. Update ahci_qc_fill_rtf() such that it takes
    TF + E_Status from PIO Setup FIS after a successful ATA PIO data-in
    command.

    Without this patch, result_tf for such a command is filled with the
    content of the previous D2H Reg FIS which belongs to a previous
    command, which can make the command incorrectly seen as failed.

    * Patch updated to grab the whole TF + E_Status from PIO Setup FIS
    instead of just E_Status as suggested by Robert Hancock.

    Signed-off-by: Tejun Heo
    Reported-by: Mark Lord
    Cc: Robert Hancock
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • ICH4-L is a variant of ICH4 lacking USB2 functionality and with some
    different device IDs.

    It is documented in Intel specification update 290745-025, currently
    at , and is
    included in the device ID table for piix.

    Signed-off-by: Ben Hutchings
    Signed-off-by: Jeff Garzik

    Ben Hutchings
     
  • ... since, of course, it's not used outside this driver.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • Intel IDE-R devices are part of the Intel AMT management setup. They don't
    have any special configuration registers or settings so the ata_generic
    driver will support them fully.

    Rather than add a huge table of IDs for each chipset and keep sending in
    new ones this patch autodetects them.

    Signed-off-by: Alan Cox
    Acked-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Until now identifying that a device supports WRITE SAME(16) with the
    UNMAP bit set has been black magic. Implement support for the SBC-3
    Thin Provisioning VPD page and set the TPWS bit.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: Jeff Garzik

    Martin K. Petersen
     
  • Now that libata provides proper cross-port EH exclusion. The SIDPR
    locking added by commit 213373cf (ata_piix: fix locking around SIDPR
    access) is no longer necessary. Remove it.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • In libata, the non-EH code paths should always take and release
    ap->lock explicitly when accessing hardware or shared data structures.
    However, once EH is active, it's assumed that the port is owned by EH
    and EH methods don't explicitly take ap->lock unless race from irq
    handler or other code paths are expected. However, libata EH didn't
    guarantee exclusion among EHs for ports of the same host. IOW,
    multiple EHs may execute in parallel on multiple ports of the same
    controller.

    In many cases, especially in SATA, the ports are completely
    independent of each other and this doesn't cause problems; however,
    there are cases where different ports share the same resource, which
    lead to obscure timing related bugs such as the one fixed by commit
    213373cf (ata_piix: fix locking around SIDPR access).

    This patch implements exclusion among EHs of the same host. When EH
    begins, it acquires per-host EH ownership by calling ata_eh_acquire().
    When EH finishes, the ownership is released by calling
    ata_eh_release(). EH ownership is also released whenever the EH
    thread goes to sleep from ata_msleep() or explicitly and reacquired
    after waking up.

    This ensures that while EH is actively accessing the hardware, it has
    exclusive access to it while allowing EHs to interleave and progress
    in parallel as they hit waiting stages, which dominate the time spent
    in EH. This achieves cross-port EH exclusion without pervasive and
    fragile changes while still allowing parallel EH for the most part.

    This was first reported by yuanding02@gmail.com more than three years
    ago in the following bugzilla. :-)

    https://bugzilla.kernel.org/show_bug.cgi?id=8223

    Signed-off-by: Tejun Heo
    Cc: Alan Cox
    Reported-by: yuanding02@gmail.com
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Add optional @ap argument to ata_wait_register() and replace msleep()
    calls with ata_msleep() which take optional @ap in addition to the
    duration. These will be used to implement EH exclusion.

    This patch doesn't cause any behavior difference.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Now that DIPM can be used independently from HIPM, ata_piix can
    support LPM too.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Port multipliers can do DIPM on fan-out links fine. Implement support
    for it. Tested w/ SIMG 57xx and marvell PMPs. Both the host and
    fan-out links enter power save modes nicely.

    SIMG 37xx and 47xx report link offline on SStatus causing EH to detach
    the devices. Blacklisted.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • The current LPM implementation has the following issues.

    * Operation order isn't well thought-out. e.g. HIPM should be
    configured after IPM in SControl is properly configured. Not the
    other way around.

    * Suspend/resume paths call ata_lpm_enable/disable() which must only
    be called from EH context directly. Also, ata_lpm_enable/disable()
    were called whether LPM was in use or not.

    * Implementation is per-port when it should be per-link. As a result,
    it can't be used for controllers with slave links or PMP.

    * LPM state isn't managed consistently. After a link reset for
    whatever reason including suspend/resume the actual LPM state would
    be reset leaving ap->lpm_policy inconsistent.

    * Generic/driver-specific logic boundary isn't clear. Currently,
    libahci has to mangle stuff which libata EH proper should be
    handling. This makes the implementation unnecessarily complex and
    fragile.

    * Tied to ALPM. Doesn't consider DIPM only cases and doesn't check
    whether the device allows HIPM.

    * Error handling isn't implemented.

    Given the extent of mismatch with the rest of libata, I don't think
    trying to fix it piecewise makes much sense. This patch reimplements
    LPM support.

    * The new implementation is per-link. The target policy is still
    port-wide (ap->target_lpm_policy) but all the mechanisms and states
    are per-link and integrate well with the rest of link abstraction
    and can work with slave and PMP links.

    * Core EH has proper control of LPM state. LPM state is reconfigured
    when and only when reconfiguration is necessary. It makes sure that
    LPM state is reset when probing for new device on the link.
    Controller agnostic logic is now implemented in libata EH proper and
    driver implementation only has to deal with controller specifics.

    * Proper error handling. LPM config failure is attributed to the
    device on the link and LPM is disabled for the link if it fails
    repeatedly.

    * ops->enable/disable_pm() are replaced with single ops->set_lpm()
    which takes @policy and @hints. This simplifies driver specific
    implementation.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Link power management is about to be reimplemented. Prepare for it.

    * Implement sata_link_scr_lpm().

    * Drop static from ata_dev_set_feature() and make it available to
    other libata files.

    * Trivial whitespace adjustments.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Link power management related symbols are in confusing state w/ mixed
    usages of lpm, ipm and pm. This patch cleans up lpm related symbols
    and sysfs show/store functions as follows.

    * lpm states - NOT_AVAILABLE, MIN_POWER, MAX_PERFORMANCE and
    MEDIUM_POWER are renamed to ATA_LPM_UNKNOWN and
    ATA_LPM_{MIN|MAX|MED}_POWER.

    * Pre/postfixes are unified to lpm.

    * sysfs show/store functions for link_power_management_policy were
    curiously named get/put and unnecessarily complex. Renamed to
    show/store and simplified.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • This build error showed up in linux-next tag next-20100820 for ia64:

    WARNING: vmlinux.o(.init.text+0x4a952): Section mismatch in reference from the function ata_init() to the function .exit.text:ata_sff_exit()
    The function __init ata_init() references
    a function __exit ata_sff_exit().
    This is often seen when error handling in the init function
    uses functionality in the exit path.
    The fix is often to remove the __exit annotation of
    ata_sff_exit() so it may be used outside an exit section.

    Sure enough, dropping the __exit fixes the problem.

    Signed-off-by: Tony Luck
    Signed-off-by: Jeff Garzik

    Luck, Tony
     
  • Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • This change enables my x86 machine to recognize and talk to a
    "Native 4K" SATA device.

    When I started working on this, I didn't know Matthew Wilcox had
    posted a similar patch 2 years ago:
    http://git.kernel.org/?p=linux/kernel/git/willy/ata.git;a=shortlog;h=refs/heads/ata-large-sectors

    Gwendal Grignou pointed me at the the above code and small portions of
    this patch include Matthew's work. That's why Mathew is first on the
    "Signed-off-by:". I've NOT included his use of a bitmap to determine
    512 vs Native for ATA command block size - just used a simple table.
    And bugs are almost certainly mine.

    Lastly, the patch has been tested with a native 4K 'Engineering
    Sample' drive provided by Hitachi GST.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Grant Grundler
    Reviewed-by: Gwendal Grignou
    Signed-off-by: Jeff Garzik

    Grant Grundler
     
  • Currently, sata_fsl, mv and nv call ata_qc_complete() multiple times
    from their interrupt handlers to indicate completion of NCQ commands.
    This limits the visibility the libata core layer has into how commands
    are being executed and completed, which is necessary to support IRQ
    expecting in generic way. libata already has an interface to complete
    multiple commands at once - ata_qc_complete_multiple() which ahci and
    sata_sil24 already use.

    This patch updates the three drivers to use ata_qc_complete_multiple()
    too and updates comments on ata_qc_complete[_multiple]() regarding
    their usages with NCQ completions. This change not only provides
    better visibility into command execution to the core layer but also
    simplifies low level drivers.

    * sata_fsl: It already builds done_mask. Conversion is straight
    forward.

    * sata_mv: mv_process_crpb_response() no longer checks for illegal
    completions, it just returns whether the tag is completed or not.
    mv_process_crpb_entries() builds done_mask from it and passes it to
    ata_qc_complete_multiple() which will check for illegal completions.

    * sata_nv adma: Similar to sata_mv. nv_adma_check_cpb() now just
    returns the tag status and nv_adma_interrupt() builds done_mask from
    it and passes it to ata_qc_complete_multiple().

    * sata_nv swncq: It already builds done_mask. Drop unnecessary
    illegal transition checks and call ata_qc_complete_multiple().

    In the long run, it might be a good idea to make ata_qc_complete()
    whine if called when multiple NCQ commands are in flight.

    Signed-off-by: Tejun Heo
    Cc: Ashish Kalra
    Cc: Saeed Bishara
    Cc: Mark Lord
    Cc: Robert Hancock
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • This is a scheleton for libata transport class.
    All information is read only, exporting information from libata:
    - ata_port class: one per ATA port
    - ata_link class: one per ATA port or 15 for SATA Port Multiplier
    - ata_device class: up to 2 for PATA link, usually one for SATA.

    Signed-off-by: Gwendal Grignou
    Reviewed-by: Grant Grundler
    Signed-off-by: Jeff Garzik

    Gwendal Grignou
     

18 Oct, 2010

1 commit

  • The patch below updates broken web addresses in the kernel

    Signed-off-by: Justin P. Mattock
    Cc: Maciej W. Rozycki
    Cc: Geert Uytterhoeven
    Cc: Finn Thain
    Cc: Randy Dunlap
    Cc: Matt Turner
    Cc: Dimitry Torokhov
    Cc: Mike Frysinger
    Acked-by: Ben Pfaff
    Acked-by: Hans J. Koch
    Reviewed-by: Finn Thain
    Signed-off-by: Jiri Kosina

    Justin P. Mattock
     

11 Oct, 2010

1 commit

  • Add WQ_MEM_RECLAIM flag which currently maps to WQ_RESCUER, mark
    WQ_RESCUER as internal and replace all external WQ_RESCUER usages to
    WQ_MEM_RECLAIM.

    This makes the API users express the intent of the workqueue instead
    of indicating the internal mechanism used to guarantee forward
    progress. This is also to make it cleaner to add more semantics to
    WQ_MEM_RECLAIM. For example, if deemed necessary, memory reclaim
    workqueues can be made highpri.

    This patch doesn't introduce any functional change.

    Signed-off-by: Tejun Heo
    Cc: Jeff Garzik
    Cc: Dave Chinner
    Cc: Steven Whitehouse

    Tejun Heo
     

29 Sep, 2010

7 commits

  • Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • When CONF_AUTO_SET_IO or CONF_AUTO_SET_IOMEM are set, the corresponding
    fields in struct pcmcia_device *p_dev->resource[0,1,2] are set
    accordinly. Drivers wishing to override certain settings may do so in
    the callback function, but they no longer need to parse the CIS entries
    stored in cistpl_cftable_entry_t themselves.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: linux-bluetooth@vger.kernel.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Introduce an autoconfiguration feature to set certain values in
    pcmcia_loop_config(), instead of copying the same code over and over
    in each PCMCIA driver. At first, introduce the following options:

    CONF_AUTO_CHECK_VCC check or matching Vcc entry
    CONF_AUTO_SET_VPP set Vpp
    CONF_AUTO_AUDIO enable the speaker line

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • pcmcia_enable_device() now replaces pcmcia_request_configuration().
    Instead of config_req_t, all necessary flags are either passed as
    a parameter to pcmcia_enable_device(), or (in rare circumstances)
    set in struct pcmcia_device -> flags.

    With the last remaining user of include/pcmcia/cs.h gone, remove
    all references.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • IntType was only set to INT_MEMORY (driver pcmciamtd) or INT_MEMORY_AND_IO
    (all other drivers). As this flags seems to relate to ioport access, make
    it conditional to the driver having requested IO port access. There are two
    drivers which do not request IO ports, but did set INT_MEMORY_AND_IO:
    ray_cs and b43. For those, we consistently only set INT_MEMORY in future.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Some drivers prefer to explicitly set Vpp. Instead of passing the
    voltage inside config_req_t, store it in struct pcmcia_device.

    CC: linux-ide@vger.kernel.org
    CC: netdev@vger.kernel.org
    CC: linux-mtd@lists.infradead.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-serial@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • libata depends on scsi_host_template for module reference counting and
    sht's should be owned by each low level driver. During libahci split,
    the sht was left with libahci.ko leaving the actual low level drivers
    not reference counted. This made ahci and ahci_platform always
    unloadable even while they're being actively used.

    Fix it by defining AHCI_SHT() macro in ahci.h and defining a sht for
    each low level ahci driver.

    stable: only applicable to 2.6.35.

    Signed-off-by: Tejun Heo
    Reported-by: Pedro Francisco
    Tested-by: Michael Tokarev
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

10 Sep, 2010

3 commits