aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-04-07cpufreq: powernv: cpufreq driver for powernv platformVaidyanathan Srinivasan4-0/+355
Backend driver to dynamically set voltage and frequency on IBM POWER non-virtualized platforms. Power management SPRs are used to set the required PState. This driver works in conjunction with cpufreq governors like 'ondemand' to provide a demand based frequency and voltage setting on IBM POWER non-virtualized platforms. PState table is obtained from OPAL v3 firmware through device tree. powernv_cpufreq back-end driver would parse the relevant device-tree nodes and initialise the cpufreq subsystem on powernv platform. The code was originally written by [email protected]. Over time it was modified to accomodate bug-fixes as well as updates to the the cpu-freq core. Relevant portions of the change logs corresponding to those modifications are noted below: * The policy->cpus needs to be populated in a hotplug-invariant manner instead of using cpu_sibling_mask() which varies with cpu-hotplug. This is because the cpufreq core code copies this content into policy->related_cpus mask which should not vary on cpu-hotplug. [Authored by [email protected]] * Create a helper routine that can return the cpu-frequency for the corresponding pstate_id. Also, cache the values of the pstate_max, pstate_min and pstate_nominal and nr_pstates in a static structure so that they can be reused in the future to perform any validations. [Authored by [email protected]] * Create a driver attribute named cpuinfo_nominal_freq which creates a sysfs read-only file named cpuinfo_nominal_freq. Export the frequency corresponding to the nominal_pstate through this interface. Nominal frequency is the highest non-turbo frequency for the platform. This is generally used for setting governor policies from user space for optimal energy efficiency. [Authored by [email protected]] * Implement a powernv_cpufreq_get(unsigned int cpu) method which will return the current operating frequency. Export this via the sysfs interface cpuinfo_cur_freq by setting powernv_cpufreq_driver.get to powernv_cpufreq_get(). [Authored by [email protected]] [Change log updated by [email protected]] Reviewed-by: Preeti U Murthy <[email protected]> Signed-off-by: Vaidyanathan Srinivasan <[email protected]> Signed-off-by: Srivatsa S. Bhat <[email protected]> Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Gautham R. Shenoy <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-04-07cpufreq: at32ap: don't declare local variable as staticViresh Kumar1-1/+1
Earlier commit: commit 652ed95d5fa6074b3c4ea245deb0691f1acb6656 Author: Viresh Kumar <[email protected]> Date: Thu Jan 9 20:38:43 2014 +0530 cpufreq: introduce cpufreq_generic_get() routine did some changes to driver and by mistake made cpuclk as a 'static' local variable, which wasn't actually required. Fix it. Fixes: 652ed95d5fa6 (cpufreq: introduce cpufreq_generic_get() routine) Reported-by: Alexandre Oliva <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Acked-by: Hans-Christian Egtvedt <[email protected]> Cc: 3.14+ <[email protected]> # 3.14+ Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-04-07cpufreq: loongson2_cpufreq: don't declare local variable as staticViresh Kumar1-1/+1
Earlier commit: commit 652ed95d5fa6074b3c4ea245deb0691f1acb6656 Author: Viresh Kumar <[email protected]> Date: Thu Jan 9 20:38:43 2014 +0530 cpufreq: introduce cpufreq_generic_get() routine did some changes to driver and by mistake made cpuclk as a 'static' local variable, which wasn't actually required. Fix it. Fixes: 652ed95d5fa6 (cpufreq: introduce cpufreq_generic_get() routine) Reported-by: Alexandre Oliva <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Cc: 3.14+ <[email protected]> # 3.14+ Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-04-07cpufreq: unicore32: fix typo issue for 'clk'Chen Gang1-1/+1
Need use 'clk' instead of 'mclk', which is the original removed local variable. The related original commit: "652ed95 cpufreq: introduce cpufreq_generic_get() routine" The related error with allmodconfig for unicore32: CC drivers/cpufreq/unicore2-cpufreq.o drivers/cpufreq/unicore2-cpufreq.c: In function ‘ucv2_target’: drivers/cpufreq/unicore2-cpufreq.c:48: error: ‘struct cpufreq_policy’ has no member named ‘mclk’ make[2]: *** [drivers/cpufreq/unicore2-cpufreq.o] Error 1 make[1]: *** [drivers/cpufreq] Error 2 make: *** [drivers] Error 2 Fixes: 652ed95d5fa6 (cpufreq: introduce cpufreq_generic_get() routine) Signed-off-by: Chen Gang <[email protected]> Acked-by: Viresh Kumar <[email protected]> Cc: 3.14+ <[email protected]> # 3.14+ Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-04-07microblaze: Use asm-generic/io.hMichal Simek5-294/+19
Using generic io.h will narrow down code duplication in architecture io.h. - define PCI_IOBASE - remove non existing pci_io_base extern Signed-off-by: Michal Simek <[email protected]>
2014-04-07cpufreq: exynos: Disable on multiplatform buildSachin Kamat1-3/+3
The current exynos cpufreq drivers are not multiplatform compliant and give build errors as they refer to header files from machine directory. Work to migrate them to generic cpufreq framework is under way. Till such time disable the build on multiplatform so that other multiplatform ready features get tested. Signed-off-by: Sachin Kamat <[email protected]> Cc: Arnd Bergmann <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-04-07PM / wakeup: Correct presence vs. emptiness of wakeup_* attributesGeert Uytterhoeven1-16/+30
According to the documentation, the various wakeup_* attributes in sysfs are not present if the device is not enabled to wake up the system. This is not correct: the attributes are not present if the device is not capable to wake up the system. They are empty if the device is not enabled to wake up the system. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-04-07PM / domains: Add pd_ignore_unused to keep power domains enabledTushar Behera2-0/+20
Keep all power-domains already enabled by bootloader on, even if no driver has claimed them. This is useful for debug and development, but should not be needed on a platform with proper driver support. Signed-off-by: Tushar Behera <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-04-07ACPI / dock: Drop dock_device_ids[] tableRafael J. Wysocki1-6/+0
There are no references to the dock_device_ids[] table anywhere in the code and it is not even useful for module autoloading, because the dock driver can only be built in, so drop it. Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-04-07ACPI / video: Favor native backlight interface for ThinkPad HelixStephen Chandler Paul1-0/+8
Like many other Windows 8 laptops the ThinkPad Helix's backlight has a broken ACPI interface and can only be properly adjusted by using the video card's native backlight control. This adds the ThinkPad Helix to the list of laptops affected with this issue so that video.use_native_backlight is enabled by default. Signed-off-by: Stephen Chandler Paul <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-04-07ACPI / thermal: Fix wrong variable usage in debug statementZhihui Zhang1-1/+1
A debug statement in acpi_thermal_trips_update() uses a wrong trip point (tz->trips.critical instead of tz->trips.hot) to get the temperature value from. Fix that. Signed-off-by: Zhihui Zhang <[email protected]> [rjw: Subject and changelog] Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-04-07ASoC: da732x: Print correct major idAxel Lin1-1/+2
DA732X_ID_MAJOR_MASK is 0xF0, so the major id is (reg & DA732X_ID_MAJOR_MASK) >> 4. Signed-off-by: Axel Lin <[email protected]> Acked-by: Adam Thomson <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-04-07microblaze: Remove platform folderMichal Simek6-8/+2
There is no reason to use platform folder structure now. Everything is OF driven. Signed-off-by: Michal Simek <[email protected]>
2014-04-07microblaze: Remove generic platformMichal Simek4-80/+40
All microblaze platforms are using the same configuration that's why there is no reason to use generic platform. Signed-off-by: Michal Simek <[email protected]>
2014-04-07microblaze: Sort Kconfig optionsMichal Simek1-26/+26
Kconfig options should be sorted. Signed-off-by: Michal Simek <[email protected]>
2014-04-07microblaze: Move DTS file to common location at boot/dts folderMichal Simek2-367/+366
Preparation step for arch/microblaze/platform/ cleanup. Signed-off-by: Michal Simek <[email protected]>
2014-04-07microblaze: Fix compilation failure because of release_threadMichal Simek1-1/+1
Warning log: In file included from arch/microblaze/include/asm/thread_info.h:21:0, from include/linux/thread_info.h:54, from include/asm-generic/preempt.h:4, from arch/microblaze/include/generated/asm/preempt.h:1, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/sysfs.h:20, from include/linux/kobject.h:21, from include/linux/device.h:17, from include/linux/node.h:17, from include/linux/cpu.h:16, from arch/microblaze/kernel/process.c:11: arch/microblaze/include/asm/processor.h:125:20: warning: no previous prototype for 'release_thread' [-Wmissing-prototypes] Signed-off-by: Michal Simek <[email protected]>
2014-04-07microblaze: Fix sparse warning because of missing cpu.h headerMichal Simek1-0/+1
Warning: arch/microblaze/kernel/process.c:164:6: warning: symbol 'arch_cpu_idle' was not declared. Should it be static? Signed-off-by: Michal Simek <[email protected]>
2014-04-07ARM: 8014/1: mm: fix reporting of read-only PMD bitsKees Cook1-15/+32
On non-LPAE ARMv6+, read-only PMD bits are defined with the combination "PMD_SECT_APX | PMD_SECT_AP_WRITE". Adjusted the bit masks to correctly report this. Signed-off-by: Kees Cook <[email protected]> Tested-by: Laura Abbott <[email protected]> Signed-off-by: Russell King <[email protected]>
2014-04-07ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddrLiu Hua1-1/+1
When we configure CONFIG_ARM_LPAE=y, pfn << PAGE_SHIFT will overflow if pfn >= 0x100000 in copy_oldmem_page. So use __pfn_to_phys for converting. Signed-off-by: Liu Hua <[email protected]> Signed-off-by: Russell King <[email protected]>
2014-04-07ARM: 8010/1: avoid tracers in soft_restartSebastian Capella1-1/+1
Use of tracers in local_irq_disable is causes abort loops when called with irqs disabled using a temporary stack. Replace local_irq_disable with raw_local_irq_disable instead to avoid tracers. Signed-off-by: Sebastian Capella <[email protected]> Signed-off-by: Russell King <[email protected]>
2014-04-07ALSA: hda/realtek - Improve HP depop when system change power state on ↵Kailang Yang1-0/+4
Chromebook It is better to change Mic2-Vref to manual mode. Manual control Mic2-Vref will solve pop noise issue. It will improve pop noise for power on, power off, S3 and resume. Signed-off-by: Kailang Yang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2014-04-07microblaze: Make timer driver endian awareMichal Simek1-15/+47
Detect endianess directly on the hardware and use ioread/iowrite functions. Signed-off-by: Michal Simek <[email protected]>
2014-04-07microblaze: Make intc driver endian awareMichal Simek1-10/+41
Detect endianess directly on the hardware and use ioread/iowrite functions. Signed-off-by: Michal Simek <[email protected]>
2014-04-07spi: efm32: Update binding document to make "efm32,location" property optionalAxel Lin1-1/+7
If "efm32,location" property is not provided, keeping what is already configured in the hardware, so its either the reset default 0 or whatever the bootloader did. Signed-off-by: Axel Lin <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-04-07ASoC: cs42l52: Fix mask for REVIDAxel Lin2-2/+2
BIT[0:2] of register 01h is REVID, so the mask for REVID should be 0x7. Also updates the code to use CS42L52_CHIP_REV_MASK. Signed-off-by: Axel Lin <[email protected]> Acked-by: Brian Austin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-04-07target: Enable READ_STRIP emulation in target_complete_ok_workNicholas Bellinger1-0/+31
This patch enables the use of READ_STRIP software emulation in target_complete_ok_work() code for I/O READs. This is useful when the fabric does not support READ_STRIP hardware offload, but would still like to interact with backend device that have T10 PI enabled. v2 changes: - Move TARGET_PROT_DIN_STRIP check from target_check_read_strip() into target_complete_ok_work() (Sagi) Cc: Martin K. Petersen <[email protected]> Cc: Sagi Grimberg <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07target/sbc: Add sbc_dif_read_strip software emulationNicholas Bellinger2-4/+28
Split up __sbc_dif_verify_read() so that VERIFY READ emulation can perform target-core specific READ_STRIP, seperate from the existing FILEIO/RAMDISK backend emulation code. Also add sbc_dif_read_strip() in order to determine number of sectors using cmd->prot_length, and skip the extra sbc_dif_copy_prot(). Reviewed-by: Sagi Grimberg <[email protected]> Cc: Martin K. Petersen <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07target: Enable WRITE_INSERT emulation in target_execute_cmdNicholas Bellinger1-0/+9
This patch enables WRITE_INSERT emulation in target_execute_cmd() in order to locally generate DIF PI before submitting the WRITE to the underlying backend device. This is required for fabric drivers that currently don't support DIF over-the-wire, in order to inact with backend devices that have hardware (IBLOCK) or software (FILEIO + RAMDISK) support for handling T10 PI. v2 changes: - Convert to sbc_dif_generate() usage (Sagi) Reviewed-by: Sagi Grimberg <[email protected]> Cc: Martin K. Petersen <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07target/sbc: Add sbc_dif_generate software emulationNicholas Bellinger2-0/+45
This patch adds WRITE_INSERT emulation within target-core using TYPE1 / TYPE3 PI modes in sbc_dif_generate() code. This is useful in order for existing legacy fabrics that do not support protection offloads to interact with backend devices that currently have T10 PI enabled. v2 changes: - Rename to sbc_dif_generate() (Sagi) Cc: Martin K. Petersen <[email protected]> Cc: Sagi Grimberg <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07target/sbc: Only expose PI read_cap16 bits when supported by fabricNicholas Bellinger1-2/+5
Only expose the PI protection type bits in READ_CAPACITY_16 if the session + fabric support DIX PASS operations. Reviewed-by: Sagi Grimberg <[email protected]> Cc: Martin K. Petersen <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07target/spc: Only expose PI mode page bits when supported by fabricNicholas Bellinger1-11/+17
Only expose the control modepage bit for Application Tag Owner (ATO) if the session + fabric support DIX PASS operations. Reviewed-by: Sagi Grimberg <[email protected]> Cc: Martin K. Petersen <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07target/spc: Only expose PI inquiry bits when supported by fabricNicholas Bellinger1-7/+14
Only expose standard INQUIRY PROTECT=1 and EVPD=0x86 TYPE1/TYPE3 PI control bits if the session + fabric support DIX PASS operations. Reviewed-by: Sagi Grimberg <[email protected]> Cc: Martin K. Petersen <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07target: Pass in transport supported PI at session initializationNicholas Bellinger14-20/+52
In order to support local WRITE_INSERT + READ_STRIP operations for non PI enabled fabrics, the fabric driver needs to be able signal what protection offload operations are supported. This is done at session initialization time so the modes can be signaled by individual se_wwn + se_portal_group endpoints, as well as optionally across different transports on the same endpoint. For iser-target, set TARGET_PROT_ALL if the underlying ib_device has already signaled PI offload support, and allow this to be exposed via a new iscsit_transport->iscsit_get_sup_prot_ops() callback. For loopback, set TARGET_PROT_ALL to signal SCSI initiator mode operation. For all other drivers, set TARGET_PROT_NORMAL to disable fabric level PI. Cc: Martin K. Petersen <[email protected]> Cc: Sagi Grimberg <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07target/iblock: Fix double bioset_integrity_free bugNicholas Bellinger1-3/+2
This patch fixes a double free bug during IBLOCK backend shutdown where bioset_integrity_free() was incorrectly called ahead of bioset_free(), who is already making the same call directly. This bug was introduced with commit ecebbf6cc, and will end up triggering a general protection fault in iblock_free_device() Reviewed-by: Sagi Grimberg <[email protected]> Cc: Martin K. Petersen <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Giridhar Malavali <[email protected]> Cc: <[email protected]> #3.14+ Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07Target/sbc: Initialize COMPARE_AND_WRITE write_sg scatterlistMartin Svec1-1/+2
When compiled with CONFIG_DEBUG_SG set, uninitialized SGL leads to BUG() in compare_and_write_callback(). Signed-off-by: Martin Svec <[email protected]> Cc: <[email protected]> #3.12+ Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07target/rd: T10-Dif: RAM disk is allocating more space than required.Quinn Tran1-4/+10
Ram disk is allocating 8x more space than required for diff data. For large RAM disk test, there is small potential for memory starvation. (Use block_size when calculating total_sg_needed - sagi + nab) Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Cc: <[email protected]> #3.14+ Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07iscsi-target: Fix ERL=2 ASYNC_EVENT connection pointer bugNicholas Bellinger1-1/+3
This patch fixes a long-standing bug in iscsit_build_conn_drop_async_message() where during ERL=2 connection recovery, a bogus conn_p pointer could end up being used to send the ISCSI_OP_ASYNC_EVENT + DROPPING_CONNECTION notifying the initiator that cmd->logout_cid has failed. The bug was manifesting itself as an OOPs in iscsit_allocate_cmd() with a bogus conn_p pointer in iscsit_build_conn_drop_async_message(). Reported-by: Arshad Hussain <[email protected]> Reported-by: santosh kulkarni <[email protected]> Cc: <[email protected]> #3.1+ Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07Target/iser: Use Fastreg only if device supports signatureSagi Grimberg1-1/+2
Fastreg is mandatory for signature, so if the device doesn't support it we don't need to use it. Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07iser-target: Add missing se_cmd put for WRITE_PENDING in tx_comp_errNicholas Bellinger1-11/+26
This patch fixes a bug where outstanding RDMA_READs with WRITE_PENDING status require an extra target_put_sess_cmd() in isert_put_cmd() code when called from isert_cq_tx_comp_err() + isert_cq_drain_comp_llist() context during session shutdown. The extra kref PUT is required so that transport_generic_free_cmd() invokes the last target_put_sess_cmd() -> target_release_cmd_kref(), which will complete(&se_cmd->cmd_wait_comp) the outstanding se_cmd descriptor with WRITE_PENDING status, and awake the completion in target_wait_for_sess_cmds() to invoke TFO->release_cmd(). The bug was manifesting itself in target_wait_for_sess_cmds() where a se_cmd descriptor with WRITE_PENDING status would end up sleeping indefinately. Acked-by: Sagi Grimberg <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: <[email protected]> #3.10+ Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07target: Add TFO->abort_task for aborted task resources releaseNicholas Bellinger18-2/+111
Now that TASK_ABORTED status is not generated for all cases by TMR ABORT_TASK + LUN_RESET, a new TFO->abort_task() caller is necessary in order to give fabric drivers a chance to unmap hardware / software resources before the se_cmd descriptor is released via the normal TFO->release_cmd() codepath. This patch adds TFO->aborted_task() in core_tmr_abort_task() in place of the original transport_send_task_abort(), and also updates all fabric drivers to implement this caller. The fabric drivers that include changes to perform cleanup via ->aborted_task() are: - iscsi-target - iser-target - srpt - tcm_qla2xxx The fabric drivers that currently set ->aborted_task() to NOPs are: - loopback - tcm_fc - usb-gadget - sbp-target - vhost-scsi For the latter five, there appears to be no additional cleanup required before invoking TFO->release_cmd() to release the se_cmd descriptor. v2 changes: - Move ->aborted_task() call into transport_cmd_finish_abort (Alex) Cc: Alex Leung <[email protected]> Cc: Mark Rustad <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Vu Pham <[email protected]> Cc: Chris Boot <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Michael S. Tsirkin <[email protected]> Cc: Giridhar Malavali <[email protected]> Cc: Saurav Kashyap <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Sagi Grimberg <[email protected]> Cc: Or Gerlitz <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07target: Fix Task Aborted Status (TAS) handlingAlex Leung3-16/+18
This patch addresses three of long standing issues wrt to Task Aborted Status (TAS) handling. The first is the incorrect assumption in core_tmr_handle_tas_abort() that TASK_ABORTED status is sent for the task referenced by TMR ABORT_TASK, and sending TASK_ABORTED status for TMR LUN_RESET on the same nexus the LUN_RESET was received. The second is to ensure the lun reference count is dropped within transport_cmd_finish_abort() by calling transport_lun_remove_cmd() before invoking transport_cmd_check_stop_to_fabric(). The last is to fix the delayed TAS handling to allow outstanding WRITEs to complete before sending the TASK_ABORTED status. This includes changing transport_check_aborted_status() to avoid processing when SCF_SEND_DELAYED_TAS has not be set, and updating transport_send_task_abort() to drop the SCF_SENT_DELAYED_TAS check. Signed-off-by: Alex Leung <[email protected]> Cc: Alex Leung <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07iser-target: Match FRMR descriptors to available session tagsNicholas Bellinger1-15/+23
This patch changes isert_conn_create_fastreg_pool() to follow logic in iscsi_target_locate_portal() for determining how many FRMR descriptors to allocate based upon the number of possible per-session command slots that are available. This addresses an OOPs in isert_reg_rdma() where due to the use of ISCSI_DEF_XMIT_CMDS_MAX could end up returning a bogus fast_reg_descriptor when the number of active tags exceeded the original hardcoded max. Note this also includes moving isert_conn_create_fastreg_pool() from isert_connect_request() to isert_put_login_tx() before posting the final Login Response PDU in order to determine the se_nacl->queue_depth (eg: number of tags) per session the target will be enforcing. v2 changes: - Move isert_conn->conn_fr_pool list_head init into isert_conn_request() v3 changes: - Drop unnecessary list_empty() check in isert_reg_rdma() (Sagi) Cc: Sagi Grimberg <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: <[email protected]> #3.12+ Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07Target/iser: Fail SCSI WRITE command if device detected integrity errorSagi Grimberg1-2/+6
If during data-transfer a data-integrity error was detected we must fail the command with CHECK_CONDITION and not execute the command. Signed-off-by: Sagi Grimberg <[email protected]> Reported-by: Or Gerlitz <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07Target/iser: Move check signature status to a functionSagi Grimberg1-65/+50
Remove code duplication from RDMA_READ and RDMA_WRITE completions that do basically the same check. Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07Target/iser: Consider DIF and RDMA_READ completions when calculating ↵Sagi Grimberg1-6/+41
post_send counter If protection is involved, iSER target must wait for completion of RDMA_READ before sending SCSI response. So we must consider that when calculating post_send_buf_count additions, also when processing good/error completions. Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07Target/iser: Fix signature work requests accountingSagi Grimberg1-0/+2
As REG_SIG_MR work request and it's LOCAL_INVALIDATE are not accounted in post_send_buf_count we must color these with ISER_FASTREG_LI_WRID in order to process their error completions when the QP flushes. Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07iscsi-target: Add missing NopOUT->flag (LMB) sanity checkArshad Hussain1-0/+10
This patch adds check for NopOUT->flag (LMB) which is a mandatory as per RFC 3720 Section 10.18. (Fix up context changes for v3.14-rc code - nab) Signed-off-by: Arshad Hussain <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07IB/isert: Support T10-PI protected transactionsSagi Grimberg2-29/+311
In case the Target core passed transport T10 protection operation: 1. Register data buffer (data memory region) 2. Register protection buffer if exsists (prot memory region) 3. Register signature region (signature memory region) - use work request IB_WR_REG_SIG_MR 4. Execute RDMA 5. Upon RDMA completion check the signature status - if succeeded send good SCSI response - if failed send SCSI bad response with appropriate sense buffer (Fix up compile error in isert_reg_sig_mr, and fix up incorrect se_cmd->prot_type -> TARGET_PROT_NORMAL comparision - nab) (Fix failed sector assignment in isert_completion_rdma_* - Sagi + nab) (Fix enum assignements for protection type - Sagi) (Fix devision on 32-bit in isert_completion_rdma_* - Sagi + Fengguang) (Fix context change for v3.14-rc6 code - nab) (Fix iscsit_build_rsp_pdu inc_statsn flag usage - nab) Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2014-04-07IB/isert: Accept RDMA_WRITE completionsSagi Grimberg1-2/+17
In case of protected transactions, we will need to check the protection status of the transaction before sending SCSI response. So be ready for RDMA_WRITE completions. currently we don't ask for these completions, but for T10-PI we will. Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>