07 Dec, 2015

1 commit

  • Every attempt to issue a read log page command lockup the controller.
    The command is currently sent if the sata device includes the devlsp feature
    to read out the timing data.
    This attempt to read the data, locks up the controller and the device
    is not recognzied correctly (failed to set xfermode) and cannot be accessed.

    This was found on Freescale P1013/P1022 and T4240 CPUs
    using a ATP IG mSATA 4GB with the devslp feature.

    fsl-sata ff718000.sata: Sata FSL Platform/CSB Driver init
    [ 1.254195] scsi0 : sata_fsl
    [ 1.256004] ata1: SATA max UDMA/133 irq 74
    [ 1.370666] fsl-gianfar ethernet.3: enabled errata workarounds, flags: 0x4
    [ 1.470671] fsl-gianfar ethernet.4: enabled errata workarounds, flags: 0x4
    [ 1.775584] ata1: Signature Update detected @ 504 msecs
    [ 1.947594] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
    [ 1.948366] ata1.00: ATA-8: ATP IG mSATA, 20150311, max UDMA/133
    [ 1.948371] ata1.00: 7732368 sectors, multi 0: LBA
    [ 1.948843] ata1.00: failed to get Identify Device Data, Emask 0x1
    [ 1.948857] ata1.00: failed to set xfermode (err_mask=0x40)
    [ 7.467557] ata1: Signature Update detected @ 504 msecs
    [ 7.639560] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
    [ 7.651320] ata1.00: failed to get Identify Device Data, Emask 0x1
    [ 7.651360] ata1.00: failed to set xfermode (err_mask=0x40)
    [ 7.655628] ata1: limiting SATA link speed to 1.5 Gbps
    [ 7.659458] ata1.00: limiting speed to UDMA/133:PIO3
    [ 13.163554] ata1: Signature Update detected @ 504 msecs
    [ 13.335558] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
    [ 13.347298] ata1.00: failed to get Identify Device Data, Emask 0x1
    [ 13.347334] ata1.00: failed to set xfermode (err_mask=0x40)
    [ 13.351601] ata1.00: disabled
    [ 13.353278] ata1: exception Emask 0x50 SAct 0x0 SErr 0x800 action 0x6 frozen t4
    [ 13.359281] ata1: SError: { HostInt }
    [ 13.361644] ata1: hard resetting link

    Signed-off-by: Andreas Werner
    Signed-off-by: Tejun Heo

    Andreas Werner
     

03 Mar, 2015

1 commit

  • The driver was ignoring limits requested by libata.force. The output
    would look like:

    fsl-sata ffe18000.sata: Sata FSL Platform/CSB Driver init
    ata1: FORCE: PHY spd limit set to 1.5Gbps
    ata1: SATA max UDMA/133 irq 74
    ata1: Signature Update detected @ 0 msecs
    ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 310)

    Signed-off-by: Martin Hicks
    Signed-off-by: Tejun Heo

    Martin Hicks
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

03 Dec, 2014

1 commit


20 Oct, 2014

1 commit


17 Jun, 2014

1 commit


22 May, 2014

1 commit


10 May, 2014

1 commit

  • This patch fixes host drivers to use CONFIG_PM_SLEEP instead of CONFIG_PM
    where applicable. Benefits of this change:

    * unused code is not being compiled in for CONFIG_PM=y, CONFIG_PM_SLEEP=n
    and CONFIG_PM_RUNTIME=y configurations

    * easier transition to use struct dev_pm_ops and SIMPLE_DEV_PM_OPS() in
    the future

    * more consistent code (there are host drivers which are using the correct
    CONFIG_PM_SLEEP checks already)

    The patch leaves the core libata code and ->port_[suspend,resume] support
    in sata_[inic162x,nv,sil24].c alone for now.

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Tejun Heo

    Bartlomiej Zolnierkiewicz
     

10 Oct, 2013

1 commit


20 Aug, 2013

1 commit

  • Before this patch, I was seeing the following lockdep splat on my
    MPC8315 (PPC32) target:

    [ 9.086051] =================================
    [ 9.090393] [ INFO: inconsistent lock state ]
    [ 9.094744] 3.9.7-ajf-gc39503d #1 Not tainted
    [ 9.099087] ---------------------------------
    [ 9.103432] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
    [ 9.109431] scsi_eh_1/39 [HC1[1]:SC0[0]:HE0:SE1] takes:
    [ 9.114642] (&(&host->lock)->rlock){?.+...}, at: [] sata_fsl_interrupt+0x50/0x250
    [ 9.123137] {HARDIRQ-ON-W} state was registered at:
    [ 9.128004] [] lock_acquire+0x90/0xf4
    [ 9.132737] [] _raw_spin_lock+0x34/0x4c
    [ 9.137645] [] fsl_sata_set_irq_coalescing+0x68/0x100
    [ 9.143750] [] sata_fsl_init_controller+0xa8/0xc0
    [ 9.149505] [] sata_fsl_probe+0x17c/0x2e8
    [ 9.154568] [] driver_probe_device+0x90/0x248
    [ 9.159987] [] __driver_attach+0xc4/0xc8
    [ 9.164964] [] bus_for_each_dev+0x5c/0xa8
    [ 9.170028] [] bus_add_driver+0x100/0x26c
    [ 9.175091] [] driver_register+0x88/0x198
    [ 9.180155] [] do_one_initcall+0x58/0x1b4
    [ 9.185226] [] kernel_init_freeable+0x118/0x1c0
    [ 9.190823] [] kernel_init+0x18/0x108
    [ 9.195542] [] ret_from_kernel_thread+0x64/0x6c
    [ 9.201142] irq event stamp: 160
    [ 9.204366] hardirqs last enabled at (159): [] _raw_spin_unlock_irq+0x30/0x50
    [ 9.212469] hardirqs last disabled at (160): [] reenable_mmu+0x30/0x88
    [ 9.219867] softirqs last enabled at (144): [] __do_softirq+0x168/0x218
    [ 9.227435] softirqs last disabled at (137): [] irq_exit+0xa8/0xb4
    [ 9.234481]
    [ 9.234481] other info that might help us debug this:
    [ 9.240995] Possible unsafe locking scenario:
    [ 9.240995]
    [ 9.246898] CPU0
    [ 9.249337] ----
    [ 9.251776] lock(&(&host->lock)->rlock);
    [ 9.255878]
    [ 9.258492] lock(&(&host->lock)->rlock);
    [ 9.262765]
    [ 9.262765] *** DEADLOCK ***
    [ 9.262765]
    [ 9.268684] no locks held by scsi_eh_1/39.
    [ 9.272767]
    [ 9.272767] stack backtrace:
    [ 9.277117] Call Trace:
    [ 9.279589] [cfff9da0] [c0008504] show_stack+0x48/0x150 (unreliable)
    [ 9.285972] [cfff9de0] [c0447d5c] print_usage_bug.part.35+0x268/0x27c
    [ 9.292425] [cfff9e10] [c006ace4] mark_lock+0x2ac/0x658
    [ 9.297660] [cfff9e40] [c006b7e4] __lock_acquire+0x754/0x1840
    [ 9.303414] [cfff9ee0] [c006cdb8] lock_acquire+0x90/0xf4
    [ 9.308745] [cfff9f20] [c043ef04] _raw_spin_lock+0x34/0x4c
    [ 9.314250] [cfff9f30] [c02f4168] sata_fsl_interrupt+0x50/0x250
    [ 9.320187] [cfff9f70] [c0079ff0] handle_irq_event_percpu+0x90/0x254
    [ 9.326547] [cfff9fc0] [c007a1fc] handle_irq_event+0x48/0x78
    [ 9.332220] [cfff9fe0] [c007c95c] handle_level_irq+0x9c/0x104
    [ 9.337981] [cfff9ff0] [c000d978] call_handle_irq+0x18/0x28
    [ 9.343568] [cc7139f0] [c000608c] do_IRQ+0xf0/0x1a8
    [ 9.348464] [cc713a20] [c000fc8c] ret_from_except+0x0/0x14
    [ 9.353983] --- Exception: 501 at _raw_spin_unlock_irq+0x40/0x50
    [ 9.353983] LR = _raw_spin_unlock_irq+0x30/0x50
    [ 9.364839] [cc713af0] [c043db10] wait_for_common+0xac/0x188
    [ 9.370513] [cc713b30] [c02ddee4] ata_exec_internal_sg+0x2b0/0x4f0
    [ 9.376699] [cc713be0] [c02de18c] ata_exec_internal+0x68/0xa8
    [ 9.382454] [cc713c20] [c02de4b8] ata_dev_read_id+0x158/0x594
    [ 9.388205] [cc713ca0] [c02ec244] ata_eh_recover+0xd88/0x13d0
    [ 9.393962] [cc713d20] [c02f2520] sata_pmp_error_handler+0xc0/0x8ac
    [ 9.400234] [cc713dd0] [c02ecdc8] ata_scsi_port_error_handler+0x464/0x5e8
    [ 9.407023] [cc713e10] [c02ecfd0] ata_scsi_error+0x84/0xb8
    [ 9.412528] [cc713e40] [c02c4974] scsi_error_handler+0xd8/0x47c
    [ 9.418457] [cc713eb0] [c004737c] kthread+0xa8/0xac
    [ 9.423355] [cc713f40] [c000f6b8] ret_from_kernel_thread+0x64/0x6c

    This fix was suggested by Bhushan Bharat , and
    was discussed in email at:

    http://linuxppc.10917.n7.nabble.com/MPC8315-reboot-failure-lockdep-splat-possibly-related-tp75162.html

    Same patch successfully tested with 3.9.7. linux-next compiled but
    not tested on hardware.

    This patch is based off linux-next tag next-20130819
    (which is commit 66a01bae29d11916c09f9f5a937cafe7d402e4a5 )

    Signed-off-by: Anthony Foiani
    Signed-off-by: Tejun Heo
    Cc: stable@vger.kernel.org

    Anthony Foiani
     

24 May, 2013

1 commit

  • Use the wrapper functions for getting and setting the driver data using
    platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
    so we can directly pass a struct platform_device.

    Also, unnecessary dev_set_drvdata() is removed, because the driver core
    clears the driver data to NULL after device_release or on probe failure.

    Signed-off-by: Jingoo Han
    Signed-off-by: Tejun Heo

    Jingoo Han
     

01 May, 2013

2 commits

  • Pull libata update from Jeff Garzik:

    - More ACPI fixes, cleanups

    - Minor cleanups for sata_highbank, pata_at32, pata_octeon_cf,
    sata_rcar

    - pata_legacy: small bug found in opti chipset code (untested fix, due
    to ancient h/w)

    - sata_fsl: RX water mark config knob, some h/w needs it

    - pata_imx: cleanups, DeviceTree support

    - SCSIATA translator: properly export translator version, not device
    firmware version

    * tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    sata_highbank: Rename proc_name to the module name
    ACPI/libata: Restore libata.noacpi support
    [libata] acpi: make ata_ap_acpi_handle not block
    [libata] SCSI: really use SATL version in VPD
    pata_imx: add devicetree support
    pata_imx: use void __iomem * for regs
    pata_imx: cleanup error path
    pata_imx: Use devm_clk_get
    sata_rcar: Convert to devm_ioremap_resource()
    fsl/sata: create a sysfs entry for rx water mark
    libata-acpi: remove redundent code for power resource handling
    sata_highbank: make ahci_highbank_pm_ops static
    pata_octeon_cf: Use resource_size function
    pata_legacy: bogus clock in opti82c46x_set_piomode()
    pata_at32: use module_platform_driver_probe()

    Linus Torvalds
     
  • Pull trivial tree updates from Jiri Kosina:
    "Usual stuff, mostly comment fixes, typo fixes, printk fixes and small
    code cleanups"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits)
    mm: Convert print_symbol to %pSR
    gfs2: Convert print_symbol to %pSR
    m32r: Convert print_symbol to %pSR
    iostats.txt: add easy-to-find description for field 6
    x86 cmpxchg.h: fix wrong comment
    treewide: Fix typo in printk and comments
    doc: devicetree: Fix various typos
    docbook: fix 8250 naming in device-drivers
    pata_pdc2027x: Fix compiler warning
    treewide: Fix typo in printks
    mei: Fix comments in drivers/misc/mei
    treewide: Fix typos in kernel messages
    pm44xx: Fix comment for "CONFIG_CPU_IDLE"
    doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP"
    mmzone: correct "pags" to "pages" in comment.
    kernel-parameters: remove outdated 'noresidual' parameter
    Remove spurious _H suffixes from ifdef comments
    sound: Remove stray pluses from Kconfig file
    radio-shark: Fix printk "CONFIG_LED_CLASS"
    doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE
    ...

    Linus Torvalds
     

04 Apr, 2013

1 commit

  • Support config RX WATER MARK via sysfs when running at run-time;
    A wrokaround for fix the exception happened to some WD HDD, found on
    WD3000HLFS-01G6U1, WD3000HLFS-01G6U0, some SSD disks. The read performance
    is also regression (about 30%) when use default value.

    According to the latest documents, 0x10 is the default value of RX WATER MARK,
    but exception/performance issue happened to some disks mentioned above.

    The exception log as below when testing read performance with IOZone:
    ata1.00: exception Emask 0x0 SAct 0x7 SErr 0x800000 action 0x6 frozen
    ata1: SError: { LinkSeq }
    ata1.00: failed command: READ FPDMA QUEUED
    ata1.00: cmd 60/00:00:ff:2c:14/01:00:02:00:00/40 tag 0 ncq 131072 in
    res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
    ata1.00: status: { DRDY }
    ata1.00: failed command: READ FPDMA QUEUED
    ata1.00: cmd 60/00:08:ff:2d:14/01:00:02:00:00/40 tag 1 ncq 131072 in
    res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
    ata1.00: status: { DRDY }
    ata1.00: failed command: WRITE FPDMA QUEUED
    ata1.00: cmd 61/10:10:af:08:6e/00:00:12:00:00/40 tag 2 ncq 8192 out
    res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
    ata1.00: status: { DRDY }
    ata1: hard resetting link
    ata1: Hardreset failed, not off-lined 0
    ata1: Signature Update detected @ 504 msecs
    ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
    ata1.00: configured for UDMA/133
    ata1.00: device reported invalid CHS sector 0
    ata1.00: device reported invalid CHS sector 0
    ata1.00: device reported invalid CHS sector 0
    ata1: EH complete

    The exception/performance can be resolved when RX WATER MARK value is 0x16.

    Signed-off-by: Qiang Liu
    Signed-off-by: Jeff Garzik

    Qiang Liu
     

20 Mar, 2013

1 commit


05 Mar, 2013

1 commit


13 Sep, 2012

1 commit

  • The freescale V2 SATA controller checks if the received data length matches
    the programmed length 'ttl', if not, it assumes that this is an error.
    In ATAPI, the 'ttl' is based on max allocation length and not the actual
    data transfer length, controller will raise 'DLM' (Data length Mismatch)
    error bit in Hstatus register. Along with 'DLM', DE (Device error) and
    FE (fatal Error) bits are also set in Hstatus register, 'E' (Internal Error)
    bit is set in Serror register and CE (Command Error) and DE (Device error)
    registers have the corresponding bit set. In this condition, we need to
    clear errors in following way: in the service routine, based on 'DLM' flag,
    HCONTROL[27] operation clears Hstatus, CE and DE registers, clear Serror
    register.

    Signed-off-by: Shaohui Xie
    Signed-off-by: Anju Bhartiya
    Signed-off-by: Jeff Garzik

    Shaohui Xie
     

14 Mar, 2012

1 commit

  • Adds support for interrupt coalescing feature to reduce interrupt events.
    Provides a mechanism of adjusting coalescing count and timeout tick by sysfs
    at runtime, so that tradeoff of latency and CPU load can be made depending
    on different applications.

    Signed-off-by: Qiang Liu
    Signed-off-by: Jeff Garzik

    Qiang Liu
     

18 Jan, 2012

1 commit


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