aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAge
* MFD: mcp-sa11x0/assabet: move assabet reset handling out of mcp-sa11x0.cRussell King2012-02-18
| | | | | | | | | Move the assabet specific reset handling out of mcp-sa11x0.c, into its board file. This leaves the mcp code free from all board specific details. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-assabet: add support for UCB1x00 GPIO switchesRussell King2012-02-18
| | | | | | | | | Add support for UCB1x00 GPIO buttons found on the Assabet platform. We can now trivially support these buttons as we have standardized gpiolib, genirq and gpio keyboard support in place for this device. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: add wakeup supportRussell King2012-02-18
| | | | | | | | | | | | | Add genirq wakeup support for the ucb1x00 device. This allows an attached gpio_keys driver to wakeup the system. Touchscreen is also possible. When there are no wakeup sources, ask the platform to assert the reset signal to avoid any unexpected behaviour; this also puts the reset signal at the right level when power is removed from the device. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00: convert to use genirqRussell King2012-02-18
| | | | | | | | | | | | | Convert the ucb1x00 driver to use genirq's interrupt services, rather than its own private implementation. This allows a wider range of drivers to use the GPIO interrupts (such as the gpio_keys driver) without being aware of the UCB1x00's private IRQ system. This prevents the UCB1x00 core driver from being built as a module, so adjust the configuration to add that restriction. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: mcp-core: remove legacy driver suspend/resume methodsRussell King2012-02-18
| | | | | | | | The legacy driver suspend/resume methods are no longer used, so get rid of them. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: convert to use dev_pm_opsRussell King2012-02-18
| | | | | | | | Convert the ucb1x00-core driver to use dev_pm_ops rather than the legacy members in the mcp driver. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: mcp-sa11x0: complain if mcp clock is left enabledRussell King2012-02-18
| | | | | | | | | Issue a warning if the mcp clock was left enabled by some driver when we're suspending or tearing down the core driver for the device. This is an aid for debugging missing disable calls. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: disable mcp clock when bus is not requiredRussell King2012-02-18
| | | | | | | | | The ucb1x00-core was leaving the mcp clock enabled indefinitely after probe. This needlessly wastes power. Add the necessary disables to ensure that the clock remains off when we don't need it. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: add missing ucb1x00_enable()/ucb1x00_disable()Russell King2012-02-18
| | | | | | | | | | | | | | | | | ucb1x00_enable() and ucb1x00_disable() are used for power saving on the SIB interface, allowing the host supplied clock to be disabled when not required. We require drivers which access the ucb1x00 to ensure that they have enabled the clock prior to accessing the device, and they should disable it once they're done. As we don't expect gpiolib users to be aware of this detail, we must make these calls in the gpiolib interfaces. Add them. Also add them to the resume method, which needs to re-establish the GPIO pin settings. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: scan drivers in same order they're registeredRussell King2012-02-18
| | | | | | | | | | Cosmetic patch to scan the list of drivers in the order that the drivers are registered, rather than the reverse order. This avoids surprises when drivers get probed in the reverse order, and input devices get registered in a different order due to bind/unbind than from boot. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: add owner and dev initializers to gpio structureRussell King2012-02-18
| | | | | | | | Register the gpio device with proper .owner and .dev elements set appropraitely. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: clean up device handling in probeRussell King2012-02-18
| | | | | | | Clean up the device handling so we can use the struct device sanely. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: use mutexes instead of semaphoresRussell King2012-02-18
| | | | | | | | Convert the ucb1x00 driver to use mutexes rather than the depreciated semaphores for exclusive access to the ADC. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: add .owner initializer and module aliasRussell King2012-02-18
| | | | | | | | Add a .owner initializer to the UCB1x00 mcp driver structure, and set an appropriate module alias to identify this driver. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: add handling for ucb1x00 resetRussell King2012-02-18
| | | | | | | | | Provide a way to handle the software controlled ucb1x00 reset signal from the ucb1x00-core driver without having to code platform specifics into these drivers. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: get rid of mach/hardware.h includeRussell King2012-02-18
| | | | | | | | Nothing in this driver requires anything from the machine/platform headers, so remove this needless header file. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-ts: provide input layer with device parentRussell King2012-02-18
| | | | | | | | | | Provide the input layer struct device with its parent device, so that the input layer's device appears in the correct place in the device tree. This also allows the input device to be visibily associated with its hardware. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: mcp/ucb1x00: separate ucb1x00 driver data from the MCP dataRussell King2012-02-18
| | | | | | | | | | Patch taken from 5dd7bf59e0 (ARM: sa11x0: Implement autoloading of codec and codec pdata for mcp bus.) by Jochen Friedrich <jochen@scram.de>. This adds just the codec data part of the patch. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: mcp-sa11x0: use _noirq resume methodsRussell King2012-02-03
| | | | | | | | | The genirq code requires early access to interrupt controllers. In order to allow this, we need to resume the MCP via the _noirq methods instead of the standard methods. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: mcp-sa11x0: convert to use dev_pm_opsRussell King2012-02-03
| | | | | | | | Convert the sa11x0 MCP driver to use dev_pm_ops rather than the legacy members in the platform driver. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: mcp-sa11x0: convert mcp-sa11x0 to use platform resourcesRussell King2012-02-03
| | | | | | | | | | | | | | | | | Patch taken from af9081ae64 (ARM: sa1100: Refactor mcp-sa11x0 to use platform resources.) by Jochen Friedrich <jochen@scram.de>, and fixes applied. We can safely do this now that we have sanitized host removal; the original patch had use-after-free bugs in the removal code. Not only that, but there was no checking of the ioremap() return. The final change over Jochen's patch is that we wrap the base pointer selection inside the various register indexes, which reduces the possibility of the wrong register index being used. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: mcp-sa11x0: add .owner initializerRussell King2012-02-03
| | | | | | | | | | | Patch partly taken from af9081ae64 (ARM: sa1100: Refactor mcp-sa11x0 to use platform resources.) by Jochen Friedrich <jochen@scram.de> Move the MODULE_ALIAS() alongside the other MODULE_* definitions, and use DRIVER_NAME to ensure that the driver is consistently named. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: mcp-sa11x0: move setup of PPC unit out of mcp-sa11x0.cRussell King2012-02-03
| | | | | | | | | | | | | | Patch taken from af9081ae64 (ARM: sa1100: Refactor mcp-sa11x0 to use platform resources.) by Jochen Friedrich <jochen@scram.de>, and consolidated to use a common function. Move the setup of the PPC unit out of mcp-sa11x0 into the core SA11x0 code, and call it from each platforms initialization file. This centralizes the setup of the PPC unit while not polluting the mcp-sa11x0 driver with these details. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: mcp-sa11x0: remove DMA initializers and variablesRussell King2012-02-03
| | | | | | | | | The dma_device_t variables are only ever written to by mcp-sa11x0 and never read. As the old SA11x0 DMA support will be removed, remove these so that it no longer depends on the old SA11x0 DMA definitions. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: mcp-core: sanitize host creation/removalRussell King2012-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | host_unregister() gives us no chance between removing the device and the mcp data structure being freed to access the data inbetween, which drivers may need to do if they need to iounmap() pointers in their private data structures. Therefore, re-jig the interfaces, which are now, on creation: mcp = mcp_host_alloc() if (mcp) { ret = mcp_host_add(mcp, data); if (!ret) mcp_host_free(mcp); } and on removal: mcp_host_del(mcp); ... access mcp ... mcp_host_free(mcp); The free does the final put_device() on the struct device as one would expect. Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-ts: fix resume failureRussell King2012-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the ucb1x00 touchscreen is resumed while the touchscreen is being touched, the main thread stops responding. This occurs because two things happen: 1. When we suspended, we were woken up, and executed the loop. Finding that the touchscreen was not pressed, we prepare to schedule for a maximum timeout, before being stopped in try_to_freeze(). 2. an irq occurs, we disable the irq, and mark it as disabled, and wake the thread. This wake occurs while the thread is still within __refrigerator() 3. The thread is unfrozen, and __refrigerator() sets the threads state back to INTERRUPTIBLE. We then drop into schedule_timeout() with an infinite timeout and the IRQ disabled. This prevents any further screen touches activating the thread. Fix this by using kthread_freezable_should_stop() which handles the freezing issues for us outside of the hotspot where the task state matters. Include a flag to ignore the touchscreen until it is released to avoid sending unintended data to the application. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: fix gpiolib direction_output handlingRussell King2012-01-21
| | | | | | | | | | gpiolib drivers should first set the output data before setting the direction to avoid putting glitches on an output signal. As an additional bonus, we tweak the code to avoid unnecessary register writes to the output and direction registers if they have no need to be updated. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: ucb1x00-core: fix missing restore of io output data on resumeRussell King2012-01-21
| | | | | | | | We were not restoring the UCB1x00 gpio output data on resume, resulting in incorrect GPIO output data after a resume. Add the missing register write. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* MFD: mcp-core: fix complaints from the genirq layerRussell King2012-01-20
| | | | | | | | | | The genirq layer complains if an interrupt handler returns with interrupts enabled. The UCB1x00 handler does just this, because ucb1x00_enable() calls mcp_enable(), which uses spin_lock_irq() rather than spin_lock_irqsave(). Convert this, and the divisor setting functions to use spin_lock_irqsave(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Revert "ARM: sa11x0: Implement autoloading of codec and codec pdata for mcp ↵Russell King2012-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | bus." This reverts commit 5dd7bf59e0e8563265b3e5b33276099ef628fcc7. Conflicts: scripts/mod/file2alias.c This change is wrong on many levels. First and foremost, it causes a regression. On boot on Assabet, which this patch gives a codec id of 'ucb1x00', it gives: ucb1x00 ID not found: 1005 0x1005 is a valid ID for the UCB1300 device. Secondly, this patch is way over the top in terms of complexity. The only device which has been seen to be connected with this MCP code is the UCB1x00 (UCB1200, UCB1300 etc) devices, and they all use the same driver. Adding a match table, requiring the codec string to match the hardware ID read out of the ID register, etc is completely over the top when we can just read the hardware ID register.
* Revert "ARM: sa1100: Refactor mcp-sa11x0 to use platform resources."Russell King2012-01-20
| | | | | | This reverts commit af9081ae64b941d32239b947882cd59ba855c5db. This revert is necessary to revert 5dd7bf59e0e8563265b3e5b33276099ef628fcc7.
* Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2012-01-19
|\ | | | | | | | | | | | | | | | | | | | | | | gpio bug fixes for v3.3 * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: gpio: tps65910: Use correct offset for gpio initialization gpio/it8761e: Restrict it8761e gpio driver to x86. gpio-ml-ioh: cleanup __iomem annotation usage gpio-ml-ioh: cleanup NULL pointer checking gpio-pch: cleanup __iomem annotation usage gpio-pch: cleanup NULL pointer checking
| * gpio: tps65910: Use correct offset for gpio initializationLaxman Dewangan2012-01-18
| | | | | | | | | | | | | | | | Using the correct gpio offset for setting the initial value of gpio when setting output direction. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * gpio/it8761e: Restrict it8761e gpio driver to x86.Grant Likely2012-01-17
| | | | | | | | | | | | | | | | | | This driver does an unconditional read of io space during module init which causes a bad dereference on ARM. It looks to me like this is an x86 only drivers, so restrict it to only compile on x86. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Denis Turischev <denis@compulab.co.il>
| * gpio-ml-ioh: cleanup __iomem annotation usageMárton Németh2012-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The __iomem annotation is to be used together with pointers used in iowrite32() but not for pointers returned by kzalloc(). For more details see [1] and [2]. This patch will remove the following sparse warning (i.e. when copiling with "make C=1"): * warning: incorrect type in assignment (different address spaces) References: [1] A new I/O memory access mechanism (Sep 15, 2004) http://lwn.net/Articles/102232/ [2] Being more anal about iospace accesses (Sep 15, 2004) http://lwn.net/Articles/102240/ Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * gpio-ml-ioh: cleanup NULL pointer checkingMárton Németh2012-01-16
| | | | | | | | | | | | | | | | This patch will remove the following sparse warning ("make C=1"): * warning: Using plain integer as NULL pointer Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * gpio-pch: cleanup __iomem annotation usageMárton Németh2012-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The __iomem annotation is to be used together with pointers used as iowrite32() parameter. For more details see [1] and [2]. This patch will remove the following sparse warnings ("make C=1"): * warning: incorrect type in assignment (different address spaces) * warning: incorrect type in argument 1 (different address spaces) * warning: incorrect type in argument 2 (different address spaces) References: [1] A new I/O memory access mechanism (Sep 15, 2004) http://lwn.net/Articles/102232/ [2] Being more anal about iospace accesses (Sep 15, 2004) http://lwn.net/Articles/102240/ Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * gpio-pch: cleanup NULL pointer checkingMárton Németh2012-01-16
| | | | | | | | | | | | | | | | This patch will remove the following sparse warning ("make C=1"): * warning: Using plain integer as NULL pointer Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* | Merge branch 'for-next-merge' of ↵Linus Torvalds2012-01-18
|\ \ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending * 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: ib_srpt: Initial SRP Target merge for v3.3-rc1
| * | ib_srpt: Initial SRP Target merge for v3.3-rc1Bart Van Assche2011-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the kernel module ib_srpt SCSI RDMA Protocol (SRP) target implementation conforming to the SRP r16a specification for the mainline drivers/target infrastructure. This driver was originally developed by Vu Pham and has been optimized by Bart Van Assche and merged into upstream LIO based on his srpt-lio-4.1 branch here: https://github.com/bvanassche/srpt-lio/commits/srpt-lio-4.1/ This updated patch also contains the following two changes from lio-core-2.6.git/master. One is to fix a bug with 1 >= task->task_sg[] chained mappings in ib_srpt, and the other to convert the configfs control plane to reference IB Port GUID and struct srpt_port directly following mainline v4.x target_core_fabric_configfs.c convertion for ib_srpt to work with rtslib/rtsadmin v2 code. These seperate patches can be found here: ib_srpt: Fix bug with chainged SGLs in srpt_map_sg_to_ib_sge http://www.risingtidesystems.com/git/?p=lio-core-2.6.git;a=commitdiff;h=ea485147563b6555a97dbf811825fbb586519252 ib_srpt: Convert se_wwn endpoint reference to struct srpt_port->port_wwn http://www.risingtidesystems.com/git/?p=lio-core-2.6.git;a=commitdiff;h=4e544a210acb227df1bb4ca5086e65bdf4e648ea This also includes the following recent v1 -> v2 review changes: ib_srpt: Fix potential out-of-bounds array access ib_srpt: Avoid failed multipart RDMA transfers ib_srpt: Fix srpt_alloc_fabric_acl failure case return value ib_srpt: Update comments to reference $driver/$port layout ib_srpt: Fix sport->port_guid formatting code ib_srpt: Remove legacy use_port_guid_in_session_name module parameter ib_srpt: Convert srp_max_rdma_size into per port configfs attribute ib_srpt: Convert srp_max_rsp_size into per port configfs attribute ib_srpt: Convert srpt_sq_size into per port configfs attribute and v2 -> v3 review changes: ib_srpt: Fix possible race with srp_sq_size in srpt_create_ch_ib ib_srpt: Fix possible race with srp_max_rsp_size in srpt_release_channel_work ib_srpt: Fix up MAX_SRPT_RDMA_SIZE define ib_srpt: Make srpt_map_sg_to_ib_sge() failure case return -EAGAIN ib_srpt: Convert port_guid to use subnet_prefix + interface_id formatting ib_srpt: Make srpt_check_stop_free return kref_put status ib_srpt: Make compilation with BUG=n proceed` ib_srpt: Use new target_core_fabric.h include ib_srpt: Check hex2bin() return code to silence build warning Cc: Bart Van Assche <bvanassche@acm.org> Cc: Roland Dreier <roland@purestorage.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Vu Pham <vu@mellanox.com> Cc: David Dillow <dillowda@ornl.gov> Signed-off-by: Nicholas A. Bellinger <nab@risingtidesystems.com>
* | | Merge branch 'for-next' of ↵Linus Torvalds2012-01-18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (26 commits) target: Set additional sense length field in sense data target: Remove legacy device status check from transport_execute_tasks target: Remove __transport_execute_tasks() for each processing context target: Remove extra se_device->execute_task_lock access in fast path target: Drop se_device TCQ queue_depth usage from I/O path target: Fix possible NULL pointer with __transport_execute_tasks target: Remove TFO->check_release_cmd() fabric API caller tcm_fc: Convert ft_send_work to use target_submit_cmd target: Add target_submit_cmd() for process context fabric submission target: Make target_put_sess_cmd use target_release_cmd_kref target: Set response format in INQUIRY response target: tcm_mod_builder: small fixups Documentation/target: Fix tcm_mod_builder.py build breakage target: remove overagressive ____cacheline_aligned annoations tcm_loop: bump max_sectors target/configs: remove trailing newline from udev_path and alias iscsi-target: fix chap identifier simple_strtoul usage target: remove useless casts target: simplify target_check_cdb_and_preempt target: Move core_scsi3_check_cdb_abort_and_preempt ...
| * | target: Set additional sense length field in sense dataRoland Dreier2011-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The target code was not setting the additional sense length field in the sense data it returned, which meant that at least the Linux stack ignored the ASC/ASCQ fields. For example, without this patch, on a tcm_loop device: # sg_raw -v /dev/sda 2 0 0 0 0 0 gives cdb to send: 02 00 00 00 00 00 SCSI Status: Check Condition Sense Information: Fixed format, current; Sense key: Illegal Request Raw sense data (in hex): 70 00 05 00 00 00 00 00 while after the patch we correctly get the following (which matches what a regular disk returns): cdb to send: 02 00 00 00 00 00 SCSI Status: Check Condition Sense Information: Fixed format, current; Sense key: Illegal Request Additional sense: Invalid command operation code Raw sense data (in hex): 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 Signed-off-by: Roland Dreier <roland@purestorage.com> Cc: stable@kernel.org Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
| * | target: Remove legacy device status check from transport_execute_tasksNicholas Bellinger2011-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes a legacy se_dev_check_online() check from within transport_execute_tasks() that should no longer be necessary as transport_lookup_cmd_lun() is already making this call. Using transport_cmd_check_stop() from transport_execute_tasks() should already be checking per se_cmd context for each descriptor upon active I/O shutdown, so no need to acquire dev->dev_status_lock again while executing se_task submission. Cc: Christoph Hellwig <hch@lst.de> Cc: Roland Dreier <roland@purestorage.com> Cc: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
| * | target: Remove __transport_execute_tasks() for each processing contextNicholas Bellinger2011-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the original usage of __transport_execute_tasks() ahead of every transport_get_cmd_from_queue() call in transport_processing_thread(). This helps reduce se_device->execute_task_lock contention between qla2xxx wq with target_submit_cmd() for READs and transport_processing_thread() context servicing WRITEs with full payloads for I/O submission. It also adds a __transport_execute_tasks() to kick the task queue again without a *se_cmd descriptor with existing queue full logic, but this may end up not being necessary. Cc: Christoph Hellwig <hch@lst.de> Cc: Roland Dreier <roland@purestorage.com> Cc: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
| * | target: Remove extra se_device->execute_task_lock access in fast pathNicholas Bellinger2011-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes __transport_execute_tasks() perform the addition of tasks to dev->execute_task_list via __transport_add_tasks_from_cmd() while holding dev->execute_task_lock during normal I/O fast path submission. It effectively removes the unnecessary re-acquire of dev->execute_task_lock during transport_execute_tasks() -> transport_add_tasks_from_cmd() ahead of calling __transport_execute_tasks() to queue tasks for the passed *se_cmd descriptor. (v2: Re-add goto check_depth usage for multi-task submission for now..) Cc: Christoph Hellwig <hch@lst.de> Cc: Roland Dreier <roland@purestorage.com> Cc: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
| * | target: Drop se_device TCQ queue_depth usage from I/O pathNicholas Bellinger2011-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, pSCSI devices have been the ones that required target-core to enforce a per se_device->depth_left. This patch changes target-core to no longer (by default) enforce a per se_device->depth_left or sleep in transport_tcq_window_closed() when we out of queue slots for all backend export cases. Cc: Christoph Hellwig <hch@lst.de> Cc: Roland Dreier <roland@purestorage.com> Cc: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
| * | target: Fix possible NULL pointer with __transport_execute_tasksNicholas Bellinger2011-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes __transport_execute_tasks() use a local *se_dev reference to prevent direct se_cmd->se_dev access after transport_cmd_check_stop() -> transport_add_tasks_from_cmd() has been called, as in the current implementation we can expect __transport_execute_tasks() may be called from another context that may have already completed the I/O. Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
| * | tcm_fc: Convert ft_send_work to use target_submit_cmdNicholas Bellinger2011-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the main ft_send_work() I/O path to use target_submit_cmd() with a single se_cmd->cmd_kref reference that is released via the existing ft_check_stop_free() response path callback. It also makes ft_send_tm() use transport_init_se_cmd() and target_get_sess_cmd() to also use single se_cmd->cmd_kref reference. Cc: Christoph Hellwig <hch@lst.de> Cc: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
| * | target: Add target_submit_cmd() for process context fabric submissionNicholas Bellinger2011-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a target_submit_cmd() caller that can be used by fabrics to submit an uninitialized se_cmd descriptor to an struct se_session + unpacked_lun from workqueue process context. This call will invoke the following steps: - transport_init_se_cmd() to setup se_cmd specific pointers - Obtain se_cmd->cmd_kref references with target_get_sess_cmd() - set se_cmd->t_tasks_bidi - transport_lookup_cmd_lun() to setup struct se_cmd->se_lun from the passed unpacked_lun - transport_generic_allocate_tasks() to setup the passed *cdb, and - transport_handle_cdb_direct() handle READ dispatch or WRITE ready-to-transfer callback to fabric v2 changes from hch feedback: *) Add target_sc_flags_table for target_submit_cmd flags *) Rename bidi parameter to flags, add TARGET_SCF_BIDI_OP *) Convert checks to BUG_ON *) Add out_check_cond for transport_send_check_condition_and_sense usage v3 changes: *) Add TARGET_SCF_ACK_KREF for target_submit_cmd into target_get_sess_cmd to determine when the fabric caller is expecting a second kref_put() from fabric packet acknowledgement. Cc: Christoph Hellwig <hch@lst.de> Cc: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
| * | target: Make target_put_sess_cmd use target_release_cmd_krefNicholas Bellinger2011-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves target_put_sess_cmd() to use a se_cmd->cmd_kref callback target_release_cmd_kref when performing driver release of fabric->se_cmd descriptor memory. It sets the default cmd_kref count value to '2' within target_get_sess_cmd() setup, and currently assumes TFO->check_stop_free() usage. It drops se_tfo->check_release_cmd() usage in the main transport_release_cmd codepath. Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>