09 Jan, 2012

1 commit

  • This patch converts the drivers in drivers/ata/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Cc: Viresh Kumar
    Cc: Jeff Garzik
    Cc: Arnaud Patard
    Cc: Alessandro Zummo
    Cc: Sylvain Munaut
    Cc: Anton Vorontsov
    Cc: Marek Vasut
    Cc: Florian Fainelli
    Cc: Mark Miesfeld
    Cc: Ashish Kalra
    Cc: Paul Mundt
    Signed-off-by: Axel Lin
    Signed-off-by: Jeff Garzik

    Axel Lin
     

24 Jul, 2011

2 commits

  • Saves text by removing nearly duplicated text format strings by
    creating ata__printk functions and printf extension %pV.

    ata defconfig size shrinks ~5% (~8KB), allyesconfig ~2.5% (~13KB)

    Format string duplication comes from:

    #define ata_link_printk(link, lv, fmt, args...) do { \
    if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link) \
    printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \
    (link)->pmp , ##args); \
    else \
    printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
    } while(0)

    Coalesce long formats.

    $ size drivers/ata/built-in.*
    text data bss dec hex filename
    544969 73893 116584 735446 b38d6 drivers/ata/built-in.allyesconfig.ata.o
    558429 73893 117864 750186 b726a drivers/ata/built-in.allyesconfig.dev_level.o
    141328 14689 4220 160237 271ed drivers/ata/built-in.defconfig.ata.o
    149567 14689 4220 168476 2921c drivers/ata/built-in.defconfig.dev_level.o

    Signed-off-by: Joe Perches
    Signed-off-by: Jeff Garzik

    Joe Perches
     
  • Saves a bit of text as the call takes fewer args.

    Coalesce a few formats.
    Convert a few bare printks to pr_cont.

    $ size drivers/ata/built-in.o*
    text data bss dec hex filename
    558429 73893 117864 750186 b726a drivers/ata/built-in.o.allyesconfig.new
    559574 73893 117888 751355 b76fb drivers/ata/built-in.o.allyesconfig.old
    149567 14689 4220 168476 2921c drivers/ata/built-in.o.defconfig.new
    149851 14689 4220 168760 29338 drivers/ata/built-in.o.defconfig.old

    Signed-off-by: Joe Perches
    Signed-off-by: Jeff Garzik

    Joe Perches
     

31 Mar, 2011

1 commit


18 Mar, 2011

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (62 commits)
    powerpc/85xx: Fix signedness bug in cache-sram
    powerpc/fsl: 85xx: document cache sram bindings
    powerpc/fsl: define binding for fsl mpic interrupt controllers
    powerpc/fsl_msi: Handle msi-available-ranges better
    drivers/serial/ucc_uart.c: Add of_node_put to avoid memory leak
    powerpc/85xx: Fix SPE float to integer conversion failure
    powerpc/85xx: Update sata controller compatible for p1022ds board
    ATA: Add FSL sata v2 controller support
    powerpc/mpc8xxx_gpio: simplify searching for 'fsl, qoriq-gpio' compatiable
    powerpc/8xx: remove obsolete mgsuvd board
    powerpc/82xx: rename and update mgcoge board support
    powerpc/83xx: rename and update kmeter1
    powerpc/85xx: Workaroudn e500 CPU erratum A005
    powerpc/fsl_pci: Add support for FSL PCIe controllers v2.x
    powerpc/85xx: Fix writing to spin table 'cpu-release-addr' on ppc64e
    powerpc/pseries: Disable MSI using new interface if possible
    powerpc: Enable GENERIC_HARDIRQS_NO_DEPRECATED.
    powerpc: core irq_data conversion.
    powerpc: sysdev/xilinx_intc irq_data conversion.
    powerpc: sysdev/uic irq_data conversion.
    ...

    Fix up conflicts in arch/powerpc/sysdev/fsl_msi.c (due to getting rid of
    of_platform_driver in arch/powerpc)

    Linus Torvalds
     

17 Mar, 2011

1 commit

  • * 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits)
    tty: serial: altera_jtaguart: Add device tree support
    tty: serial: altera_uart: Add devicetree support
    dt: eliminate of_platform_driver shim code
    dt: Eliminate of_platform_{,un}register_driver
    dt/serial: Eliminate users of of_platform_{,un}register_driver
    dt/usb: Eliminate users of of_platform_{,un}register_driver
    dt/video: Eliminate users of of_platform_{,un}register_driver
    dt/net: Eliminate users of of_platform_{,un}register_driver
    dt/sound: Eliminate users of of_platform_{,un}register_driver
    dt/spi: Eliminate users of of_platform_{,un}register_driver
    dt: uartlite: merge platform and of_platform driver bindings
    dt: xilinx_hwicap: merge platform and of_platform driver bindings
    ipmi: convert OF driver to platform driver
    leds/leds-gpio: merge platform_driver with of_platform_driver
    dt/sparc: Eliminate users of of_platform_{,un}register_driver
    dt/powerpc: Eliminate users of of_platform_{,un}register_driver
    dt/powerpc: move of_bus_type infrastructure to ibmebus
    drivercore/dt: add a match table pointer to struct device
    dt: Typo fix.
    altera_ps2: Add devicetree support
    ...

    Linus Torvalds
     

15 Mar, 2011

1 commit

  • In FSL sata v2 block, the snoop bit of PRDT Word3 description
    information is at bit28 instead of bit22.

    This patch adds FSL sata v2 probe and resolve this difference.

    Signed-off-by: Lei Xu
    Signed-off-by: Roy Zang
    Acked-by: Jeff Garzik
    Signed-off-by: Kumar Gala

    Xulei
     

14 Mar, 2011

2 commits

  • RX_WATER_MARK sets the number of locations in Rx FIFO that can be used before
    the transport layer instructs the link layer to transmit HOLDS. Note that it
    can take some time for the HOLDs to get to the other end, and that in the
    interim there must be enough room in the FIFO to absorb all data that could
    arrive.

    Update the new recommended value to 16.

    Signed-off-by: Prabhakar Kushwaha
    Signed-off-by: Jeff Garzik

    Prabhakar Kushwaha
     
  • When a single device error is detected, the device under the error
    is indicated by the error bit set in the DER. There is a one to one
    mapping between register bit and devices on Port multiplier(PMP)
    i.e. bit 0 represents PMP device 0 and bit 1 represents PMP device
    1 etc.

    Current implementation treats Device error register value as device
    number not set of bits representing multiple device on PMP. It is
    changed to consider bit level.

    No need to check for each set bit as all command is going to be
    aborted.

    Signed-off-by: Ashish Kalra
    Signed-off-by: Prabhakar Kushwaha
    Signed-off-by: Jeff Garzik

    Prabhakar Kushwaha
     

02 Mar, 2011

2 commits

  • All checks of ATA_FLAG_NO_LEGACY have been removed by the commits
    c791c30670ea61f19eec390124128bf278e854fe ([libata] minor PCI IDE probe
    fixes and cleanups) and f0d36efdc624beb3d9e29b9ab9e9537bf0f25d5b (libata:
    update libata core layer to use devres), so I think it's time to finally
    get rid of this flag...

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

    Sergei Shtylyov
     
  • Commit 0d5ff566779f894ca9937231a181eb31e4adff0e (libata: convert to iomap)
    removed all checks of ATA_FLAG_MMIO but neglected to remove the flag itself.
    Do it now, at last...

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

    Sergei Shtylyov
     

01 Mar, 2011

1 commit


22 Oct, 2010

2 commits

  • 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
     
  • 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
     

13 Aug, 2010

1 commit


06 Aug, 2010

1 commit

  • of_device is just an alias for platform_device, so remove it entirely. Also
    replace to_of_device() with to_platform_device() and update comment blocks.

    This patch was initially generated from the following semantic patch, and then
    edited by hand to pick up the bits that coccinelle didn't catch.

    @@
    @@
    -struct of_device
    +struct platform_device

    Signed-off-by: Grant Likely
    Reviewed-by: David S. Miller

    Grant Likely
     

02 Aug, 2010

1 commit

  • Make the following changes to prepare for NCQ command completion
    update. Changes made by this patch don't cause any functional
    difference.

    * sata_fsl_host_intr(): rename the local variable qc_active to
    done_mask as that's what it is.

    * mv_process_crpb_response(): restructure if clause for easier update.

    * nv_adma_interrupt(): drop unnecessary error variable.

    * nv_swncq_sdbfis(): drop unnecessary nr_done and return 0 on success.
    Typo fix.

    * nv_swncq_dmafis(): drop unused return value and return void.

    * nv_swncq_host_interrupt(): drop unnecessary return value handling.

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

    Tejun Heo
     

22 May, 2010

1 commit

  • .name, .match_table and .owner are duplicated in both of_platform_driver
    and device_driver. This patch is a removes the extra copies from struct
    of_platform_driver and converts all users to the device_driver members.

    This patch is a pretty mechanical change. The usage model doesn't change
    and if any drivers have been missed, or if anything has been fixed up
    incorrectly, then it will fail with a compile time error, and the fixup
    will be trivial. This patch looks big and scary because it touches so
    many files, but it should be pretty safe.

    Signed-off-by: Grant Likely
    Acked-by: Sean MacLennan

    Grant Likely
     

19 May, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

10 Dec, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
    tree-wide: fix misspelling of "definition" in comments
    reiserfs: fix misspelling of "journaled"
    doc: Fix a typo in slub.txt.
    inotify: remove superfluous return code check
    hdlc: spelling fix in find_pvc() comment
    doc: fix regulator docs cut-and-pasteism
    mtd: Fix comment in Kconfig
    doc: Fix IRQ chip docs
    tree-wide: fix assorted typos all over the place
    drivers/ata/libata-sff.c: comment spelling fixes
    fix typos/grammos in Documentation/edac.txt
    sysctl: add missing comments
    fs/debugfs/inode.c: fix comment typos
    sgivwfb: Make use of ARRAY_SIZE.
    sky2: fix sky2_link_down copy/paste comment error
    tree-wide: fix typos "couter" -> "counter"
    tree-wide: fix typos "offest" -> "offset"
    fix kerneldoc for set_irq_msi()
    spidev: fix double "of of" in comment
    comment typo fix: sybsystem -> subsystem
    ...

    Linus Torvalds
     

08 Dec, 2009

1 commit


04 Dec, 2009

1 commit

  • That is "success", "unknown", "through", "performance", "[re|un]mapping"
    , "access", "default", "reasonable", "[con]currently", "temperature"
    , "channel", "[un]used", "application", "example","hierarchy", "therefore"
    , "[over|under]flow", "contiguous", "threshold", "enough" and others.

    Signed-off-by: André Goddard Rosa
    Signed-off-by: Jiri Kosina

    André Goddard Rosa
     

03 Dec, 2009

1 commit


20 Nov, 2009

1 commit

  • Split sata_fsl_softreset() into hard and soft resets to make
    error-handling more efficient & device and PMP detection more
    reliable.

    Also includes fix for PMP support, driver tested with Sil3726,
    Sil4726 & Exar PMP controllers.

    [AV: Also fixes resuming from deep sleep on MPC8315 CPUs]

    Signed-off-by: Jiang Yutang
    Signed-off-by: Anton Vorontsov
    Signed-off-by: Jeff Garzik

    Jiang Yutang
     

09 Sep, 2009

1 commit


23 Jun, 2009

1 commit


16 May, 2009

2 commits

  • The bit 11 of command description is reserved bit in Freescale
    SATA controller and needs to be set to '1'. This is needed to
    make sure the last write from the controller to the buffer
    descriptor is seen before an interrupt is raised.

    Signed-off-by: Dave Liu
    Signed-off-by: Kumar Gala
    Signed-off-by: Jeff Garzik

    Dave Liu
     
  • We we build with dma_addr_t as a 64-bit quantity we get:

    drivers/ata/sata_fsl.c: In function 'sata_fsl_fill_sg':
    drivers/ata/sata_fsl.c:340: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'dma_addr_t'

    Signed-off-by: Kumar Gala
    Signed-off-by: Jeff Garzik

    Kumar Gala
     

25 Mar, 2009

1 commit


16 Jan, 2009

1 commit


29 Sep, 2008

1 commit

  • Logically, SCR access ops should take @link; however, there was no
    compelling reason to convert all SCR access ops when adding @link
    abstraction as there's one-to-one mapping between a port and a non-PMP
    link. However, that assumption won't hold anymore with the scheduled
    addition of slave link.

    Make SCR access ops per-link.

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

    Tejun Heo
     

31 May, 2008

1 commit

  • The following commit (4c9bf4e799ce06a7378f1196587084802a414c03):
    libata: replace tf_read with qc_fill_rtf for non-SFF drivers

    Broke the sata_fsl.c driver in 2.6.26-rc. I know the following patch fixes
    the issue, it clearly also adds port multipler support. The current
    2.6.26-rc driver is broken.

    On boot with debug enabled we get something like (w/o this patch):

    spurious interrupt!!, CC = 0x1
    interrupt status 0x1
    xx_scr_read, reg_in = 1
    spurious interrupt!!, CC = 0x1
    interrupt status 0x1
    xx_scr_read, reg_in = 1
    spurious interrupt!!, CC = 0x1
    interrupt status 0x1
    xx_scr_read, reg_in = 1

    .. continues for ever.

    This change fixes this as a side effect of adding port multiplier support.

    Signed-off-by: Ashish Kalra
    Signed-off-by: Jeff Garzik

    Ashish Kalra
     

29 Apr, 2008

1 commit


18 Apr, 2008

6 commits

  • Currently, SATA softresets should do link onlineness check before
    actually performing SRST protocol but it doesn't really belong to
    softreset.

    This patch moves onlineness check in softreset to ata_eh_reset() and
    ata_eh_followup_srst_needed() to clean up code and help future sata_mv
    changes which need clear separation between SCR and TF accesses.

    sata_fsl is peculiar in that its softreset really isn't softreset but
    combination of hardreset and softreset. This patch adds dummy private
    ->prereset to keep the current behavior but the driver really should
    implement separate hard and soft resets and return -EAGAIN from
    hardreset if it should be follwed by softreset.

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

    Tejun Heo
     
  • ap->ioaddr is to carry addresses for TF and BMDMA registers of a SFF
    controller, don't abuse it in non-SFF controllers.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • Now that all SFF stuff is separated out of core layer, core layer
    doesn't call ops->[alt_]check_status(). In fact, no one calls them
    for non-SFF drivers anymore. Kill them.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • Now that all SFF stuff is separated out of core layer, core layer
    doesn't call ops->tf_read directly. It gets called only via
    ops->qc_fill_rtf() for non-SFF drivers. This patch directly
    implements private ops->qc_fill_rtf() for non-SFF controllers and kill
    ops->tf_read().

    This is much cleaner for non-SFF controllers as some of them have to
    cache SFF register values in private data structure and report the
    cached values via ops->tf_read(). Also, ops->tf_read() gets nasty for
    controllers which don't have clear notion of TF registers when
    operation is not in progress.

    As this change makes default ops->qc_fill_rtf unnecessary, move
    ata_sff_qc_fill_rtf() form ata_base_port_ops to ata_sff_port_ops where
    it belongs.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • Add sff_ prefix to SFF specific port ops.

    This rename is in preparation of separating SFF support out of libata
    core layer. This patch strictly renames ops and doesn't introduce any
    behavior difference.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • Currently reset methods are not specified directly in the
    ata_port_operations table. If a LLD wants to use custom reset
    methods, it should construct and use a error_handler which uses those
    reset methods. It's done this way for two reasons.

    First, the ops table already contained too many methods and adding
    four more of them would noticeably increase the amount of necessary
    boilerplate code all over low level drivers.

    Second, as ->error_handler uses those reset methods, it can get
    confusing. ie. By overriding ->error_handler, those reset ops can be
    made useless making layering a bit hazy.

    Now that ops table uses inheritance, the first problem doesn't exist
    anymore. The second isn't completely solved but is relieved by
    providing default values - most drivers can just override what it has
    implemented and don't have to concern itself about higher level
    callbacks. In fact, there currently is no driver which actually
    modifies error handling behavior. Drivers which override
    ->error_handler just wraps the standard error handler only to prepare
    the controller for EH. I don't think making ops layering strict has
    any noticeable benefit.

    This patch makes ->prereset, ->softreset, ->hardreset, ->postreset and
    their PMP counterparts propoer ops. Default ops are provided in the
    base ops tables and drivers are converted to override individual reset
    methods instead of creating custom error_handler.

    * ata_std_error_handler() doesn't use sata_std_hardreset() if SCRs
    aren't accessible. sata_promise doesn't need to use separate
    error_handlers for PATA and SATA anymore.

    * softreset is broken for sata_inic162x and sata_sx4. As libata now
    always prefers hardreset, this doesn't really matter but the ops are
    forced to NULL using ATA_OP_NULL for documentation purpose.

    * pata_hpt374 needs to use different prereset for the first and second
    PCI functions. This used to be done by branching from
    hpt374_error_handler(). The proper way to do this is to use
    separate ops and port_info tables for each function. Converted.

    Signed-off-by: Tejun Heo

    Tejun Heo