20 Sep, 2016
1 commit
-
If a VFC port gets unmapped in the VIOS, it may not respond with a CRQ
init complete following H_REG_CRQ. If this occurs, we can end up having
called scsi_block_requests and not a resulting unblock until the init
complete happens, which may never occur, and we end up hanging I/O
requests. This patch ensures the host action stay set to
IBMVFC_HOST_ACTION_TGT_DEL so we move all rports into devloss state and
unblock unless we receive an init complete.Cc:
Signed-off-by: Brian King
Acked-by: Tyrel Datwyler
Signed-off-by: Martin K. Petersen
09 Sep, 2016
1 commit
-
Fix typo in parameter description.
Signed-off-by: Wei Yongjun
Reviewed-by: Tyrel Datwyler
Signed-off-by: Martin K. Petersen
26 Aug, 2016
2 commits
-
The ibmvfc driver currently doesn't support FC Class 3 Error Recovery.
However, it is simply a matter of informing the VIOS that the payload
expects to use sequence level error recovery via a bit flag in the
ibmvfc_cmd structure.This patch adds a module parameter to enable error recovery support at
boot time. When enabled the RETRY service parameter bit is set during
PRLI, and ibmvfc_cmd->flags includes the IBMVFC_CLASS_3_ERR bit.Signed-off-by: Tyrel Datwyler
Signed-off-by: Martin K. Petersen -
The READ FCP_XFER_READY DISABLED bit is required to always be set to one
since FCP-3. Set it in the service parameter page frame during process
login.Signed-off-by: Tyrel Datwyler
Signed-off-by: Martin K. Petersen
05 Aug, 2016
1 commit
-
Pull SCSI target updates from Nicholas Bellinger:
"The most notable item is IBM virtual SCSI target driver, that was
originally ported to target-core back in 2010 by Tomo-san, and has
been brought forward to v4.x code by Bryant Ly, Michael Cyr and co
over the last months.Also included are two ORDERED task related bug-fixes Bryant + Michael
found along the way using ibmvscsis with AIX guests, plus a few
miscellaneous target-core + iscsi-target bug-fixes with associated
stable tags"* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
target: fix spelling mistake: "limitiation" -> "limitation"
target: Fix residual overflow handling in target_complete_cmd_with_length
tcm_fc: set and unset FCP_SPPF_TARG_FCN
iscsi-target: Fix panic when adding second TCP connection to iSCSI session
ibmvscsis: Initial commit of IBM VSCSI Tgt Driver
target: Fix ordered task CHECK_CONDITION early exception handling
target: Fix ordered task target_setup_cmd_from_cdb exception hang
target: Fix max_unmap_lba_count calc overflow
target: Fix race between iscsi-target connection shutdown + ABORT_TASK
target: Fix missing complete during ABORT_TASK + CMD_T_FABRIC_STOP
20 Jul, 2016
1 commit
-
This driver is a pick up of the old IBM VIO scsi Target Driver
that was started by Nick and Fujita 2-4 years ago.
http://comments.gmane.org/gmane.linux.scsi/90119The driver provides a virtual SCSI device on IBM Power Servers.
This patch contains the fifth version for an initial merge of the
tcm ibmvscsis driver. More information on this driver and config
can be found:https://github.com/powervm/ibmvscsis/wiki/Configuration
http://www.linux-iscsi.org/wiki/IBM_vSCSI(Drop extra libsrp review breakage + Fix kconfig typo - nab)
Signed-off-by: Steven Royer
Signed-off-by: Tyrel Datwyler
Signed-off-by: Michael Cyr
Signed-off-by: Bryant G. Ly
Cc: FUJITA Tomonori
Signed-off-by: Nicholas Bellinger
16 Jul, 2016
1 commit
-
My static checker complains that we need to unlock on this path. Seems
true.Signed-off-by: Dan Carpenter
Reviewed-by: Brian King
Reviewed-by: Ewan D. Milne
Signed-off-by: Martin K. Petersen
24 Feb, 2016
8 commits
-
When logging async events the scsi_id, wwpn, and node_name values are
used directly from the CRQ struct which are of type __be64. This can be
confusing to someone looking through the log on a LE system. Instead
byteswap these values to host endian prior to logging.Signed-off-by: Tyrel Datwyler
Reviewed-by: Johannes Thumshirn
Signed-off-by: Martin K. Petersen -
In a couple places the magic value of 2 is used to check the return code
of hypercalls. This translates to H_CLOSED.Signed-off-by: Tyrel Datwyler
Reviewed-by: Johannes Thumshirn
Signed-off-by: Martin K. Petersen -
The values returned by the show functions for the host os_type,
mad_version, and partition_number attributes get their values directly
from the madapter_info struct whose associated fields are __be32
typed. Added endian conversion to ensure these values are sane on LE
platforms.Signed-off-by: Tyrel Datwyler
Reviewed-by: Johannes Thumshirn
Signed-off-by: Martin K. Petersen -
A VIOSRP_HOST_CONFIG_TYPE management datagram (MAD) has existed in the
code for some time. From what information I've gathered from Brian King
this was likely implemented on the host side in a SLES 9 based VIOS,
which is no longer supported anywhere. Further, it is not defined in
PAPR or supported by any AIX based VIOS.Treating as bit rot and removing the associated host config code. The
config attribute and its show function are left as not to break
userspace. The behavior remains the same returning nothing.Signed-off-by: Tyrel Datwyler
Reviewed-by: Johannes Thumshirn
Signed-off-by: Martin K. Petersen -
The root node of the OF device tree is exported as of_root. No need to
look up the root by path name. Instead just get a reference directly via
of_root.Signed-off-by: Tyrel Datwyler
Reviewed-by: Johannes Thumshirn
Signed-off-by: Martin K. Petersen -
Add defines for mad version and mad os_type, and replace the magic
numbers in set_adapter_info() accordingly.Signed-off-by: Tyrel Datwyler
Reviewed-by: Johannes Thumshirn
Reviewed-by: Manoj Kumar
Signed-off-by: Martin K. Petersen -
The PAPR defines four valid header values for the first byte of a CRQ
message. Namely, an unused/empty message (0x00), a valid
command/response entry (0x80), a valid initialization entry (0xC0), and
a valid transport event (0xFF). Further, initialization responses have
two formats namely initialize (0x01) and initialize complete
(0x02). Define these values as enums and use them in the code in
place of their magic number equivalents.Signed-off-by: Tyrel Datwyler
Reported-by: Johannes Thumshirn
Reviewed-by: Manoj Kumar
Signed-off-by: Martin K. Petersen -
The enum values for VIOSRP_LINUX_FORMAT and VIOSRP_INLINE_FORMAT are off
by one. They are currently defined as 0x06 and 0x07 respetively. These
values are defined in PAPR correctly as 0x05 and 0x06. This
inconsistency has gone unnoticed as neither enum is currently used. The
possible future support of PING messages between the VIOS and client
adapter relies on VIOSRP_INLINE_FORMAT crq messages. Corrected these
enum values to match PAPR definitions.Signed-off-by: Tyrel Datwyler
Reviewed-by: Johannes Thumshirn
Reviewed-by: Manoj Kumar
Signed-off-by: Martin K. Petersen
12 Nov, 2015
3 commits
-
SCSI queue for 4.4.
Signed-off-by: Martin K. Petersen
-
As defined in 4.6.9 of SAM-4, the encoding of LUN is
on 5 bits (max_lun=32) and the current value is only 8.
Set max_lun to IBMVSCSI_MAX_LUN (32).Signed-off-by: Laurent Vivier
Signed-off-by: Martin K. Petersen -
As devices with values greater than that are silently ignored,
this gives some hints to the sys admin to know why he doesn't see
his devices...Signed-off-by: Laurent Vivier
Signed-off-by: Martin K. Petersen
10 Nov, 2015
1 commit
-
This patch changes the !blk-mq path to the same defaults as the blk-mq
I/O path by always enabling block tagging, and always using host wide
tags. We've had blk-mq available for a few releases so bugs with
this mode should have been ironed out, and this ensures we get better
coverage of over tagging setup over different configs.Signed-off-by: Christoph Hellwig
Acked-by: Jens Axboe
Reviewed-by: Hannes Reinecke
Signed-off-by: James Bottomley
19 May, 2015
1 commit
-
The SCSI standard defines 64-bit values for LUNs. Large arrays
employing large or hierarchical LUN numbers become more and more
common. So update the SRP initiator to use 64-bit LUN numbers.
See also Hannes Reinecke, commit 9cb78c16f5da ("scsi: use 64-bit LUNs"),
June 2014.The largest LUN number that has been tested is 0xd2003fff00000000.
Checked the following structure sizes with gdb:
* sizeof(struct srp_cmd) = 48
* sizeof(struct srp_tsk_mgmt) = 48
* sizeof(struct srp_aer_req) = 36The ibmvscsi changes have been compile tested only (on a PPC system).
Signed-off-by: Bart Van Assche
Reviewed-by: Hannes Reinecke
Reviewed-by: Sagi Grimberg
Reviewed-by: Yann Droneaud
Cc: Sebastian Parschauer
Cc: Brian King
Cc: Nathan Fontenot
Cc: Tyrel Datwyler
Signed-off-by: Doug Ledford
04 Dec, 2014
2 commits
-
Reported-by: Stephen Rothwell
Signed-off-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
Acked-by: Brian King -
Since we got rid of ordered tag support in 2010 the prime use case of
switching on and off ordered tags has been obsolete. The other function
of enabling/disabling tagging entirely has only been correctly implemented
by the 53c700 driver and isn't generally useful.Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
Reviewed-by: Martin K. Petersen
24 Nov, 2014
2 commits
-
Drop the now unused reason argument from the ->change_queue_depth method.
Also add a return value to scsi_adjust_queue_depth, and rename it to
scsi_change_queue_depth now that it can be used as the default
->change_queue_depth implementation.Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Christie
Reviewed-by: Hannes Reinecke -
All drivers use the implementation for ramping the queue up and down, so
instead of overloading the change_queue_depth method call the
implementation diretly if the driver opts into it by setting the
track_queue_depth flag in the host template.Note that a few drivers validated the new queue depth in their
change_queue_depth method, but as we never go over the queue depth
set during slave_configure or the sysfs file this isn't nessecary
and can safely be removed.Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Christie
Reviewed-by: Hannes Reinecke
Reviewed-by: Venkatesh Srinivas
12 Nov, 2014
4 commits
-
Remove the tagged argument from scsi_adjust_queue_depth, and just let it
handle the queue depth. For most drivers those two are fairly separate,
given that most modern drivers don't care about the SCSI "tagged" status
of a command at all, and many old drivers allow queuing of multiple
untagged commands in the driver.Instead we start out with the ->simple_tags flag set before calling
->slave_configure, which is how all drivers actually looking at
->simple_tags except for one worke anyway. The one other case looks
broken, but I've kept the behavior as-is for now.Except for that we only change ->simple_tags from the ->change_queue_type,
and when rejecting a tag message in a single driver, so keeping this
churn out of scsi_adjust_queue_depth is a clear win.Now that the usage of scsi_adjust_queue_depth is more obvious we can
also remove all the trivial instances in ->slave_alloc or ->slave_configure
that just set it to the cmd_per_lun default.Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Christie
Reviewed-by: Hannes Reinecke
Reviewed-by: Martin K. Petersen -
Allow a driver to ask for block layer tags by setting .use_blk_tags in the
host template, in which case it will always see a valid value in
request->tag, similar to the behavior when using blk-mq. This means even
SCSI "untagged" commands will now have a tag, which is especially useful
when using a host-wide tag map.Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Christie
Reviewed-by: Martin K. Petersen
Reviewed-by: Hannes Reinecke -
Unless we want to build a SPI tag message we should just check SCMD_TAGGED
instead of reverse engineering a tag type through the use of
scsi_populate_tag_msg.Also rename the function to spi_populate_tag_msg, make it behave like the
other spi message helpers, and move it to the spi transport class.Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Christie
Reviewed-by: Hannes Reinecke -
Most drivers use exactly the same implementation, so provide it as a
library function.Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
Reviewed-by: Mike Christie
Reviewed-by: Martin K. Petersen
Reviewed-by: Hannes Reinecke
26 Jul, 2014
1 commit
-
Added big endian annotations to relevant data structure fields, and necessary
byte swappings to support little endian builds.Signed-off-by: Brian King
Signed-off-by: Tyrel Datwyler
Signed-off-by: Christoph Hellwig
18 Jul, 2014
2 commits
-
The IBM virtual SCSI protocol has been obsoleted by ibmvfc, and there
are no reported of the driver left.Signed-off-by: Christoph Hellwig
Reviewed-by: Paolo Bonzini
Reviewed-by: Hannes Reinecke -
Now that we're using 64-bit LUNs internally we need to increase
the size of max_luns to 64 bits, too.Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
Reviewed-by: Ewan Milne
Signed-off-by: Christoph Hellwig
25 Jun, 2014
2 commits
-
Add a memory barrier prior to sending a new command to the VIOS
to ensure the VIOS does not receive stale data in the command buffer.
Also add a memory barrier when processing the CRQ for completed commands.Signed-off-by: Brian King
Acked-by: Nathan Fontenot
Cc: stable@vger.kernel.org
Signed-off-by: Christoph Hellwig -
If a CRQ reset is triggered for some reason while in the middle
of performing VSCSI adapter initialization, we don't want to
call the done function for the initialization MAD commands as
this will only result in two threads attempting initialization
at the same time, resulting in failures.Signed-off-by: Brian King
Acked-by: Nathan Fontenot
Cc: stable@vger.kernel.org
Signed-off-by: Christoph Hellwig
18 Apr, 2014
1 commit
-
Replace various -20/+19 hardcoded nice values with MIN_NICE/MAX_NICE.
Signed-off-by: Dongsheng Yang
Acked-by: Tejun Heo
Signed-off-by: Peter Zijlstra
Link: http://lkml.kernel.org/r/ff13819fd09b7a5dba5ab5ae797f2e7019bdfa17.1394532288.git.yangds.fnst@cn.fujitsu.com
Cc: devel@driverdev.osuosl.org
Cc: devicetree@vger.kernel.org
Cc: fcoe-devel@open-fcoe.org
Cc: linux390@de.ibm.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: linux-s390@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Cc: nbd-general@lists.sourceforge.net
Cc: ocfs2-devel@oss.oracle.com
Cc: openipmi-developer@lists.sourceforge.net
Cc: qla2xxx-upstream@qlogic.com
Cc: linux-arch@vger.kernel.org
[ Consolidated the patches, twiddled the changelog. ]
Signed-off-by: Ingo Molnar
20 Mar, 2014
1 commit
-
It's a NOOP since 2.6.35 and it will be removed one day.
[jejb: remove from missed arm scsi drivers]
Signed-off-by: Michael Opdenacker
Signed-off-by: James Bottomley
07 Sep, 2013
2 commits
-
This fixes an issue seen with devices getting marked offline
in a scenario where a VIOS was getting rebooted while a
client VFC adapter is in SCSI EH and prevents unnecessary
EH escalation in some scenarios.Signed-off-by: Brian King
Acked-by: Robert Jennings
Signed-off-by: James Bottomley -
The hypervisor is big endian, so little endian kernel builds need
to byteswap.[jejb: fix checkpatch errors]
Signed-off-by: Anton Blanchard
Signed-off-by: James Bottomley
03 May, 2013
3 commits
-
Signed-off-by: Brian King
Acked-by: Robert Jennings
Signed-off-by: James Bottomley -
Adds support for a new VIOS feature that allows ibmvfc to
optimize terminate_rport_io by telling the VIOS the target
is no longer accessible on the fabric and that it should
not send an ABTS out on the fabric to the device.Signed-off-by: Brian King
Acked-by: Robert Jennings
Signed-off-by: James Bottomley -
If attempting to abort requests due to a fail fail timeout
or error handling while the link is down, we cannot send
an abort out on the fabric. We can, however, send a cancel
to the VIOS. This fixes ibmvfc to send a cancel in this
case to prevent error handling from failing and/or
escalating.Signed-off-by: Brian King
Acked-by: Robert Jennings
Signed-off-by: James Bottomley