summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi/ibmvfc.c
Commit message (Collapse)AuthorAgeFilesLines
* scsi: ibmvfc: don't check for failure from mempool_alloc()NeilBrown2017-04-191-6/+0Star
| | | | | | | | | mempool_alloc() cannot fail when passed GFP_NOIO or any other gfp setting that is permitted to sleep. So remove this pointless code. Signed-off-by: NeilBrown <neilb@suse.com> Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: remove eh_timed_out methods in the transport templateChristoph Hellwig2017-02-071-0/+1
| | | | | | | | | | | | | Instead define the timeout behavior purely based on the host_template eh_timed_out method and wire up the existing transport implementations in the host templates. This also clears up the confusion that the transport template method overrides the host template one, so some drivers have to re-override the transport template one. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: fc: use bsg_job_doneJohannes Thumshirn2016-11-181-1/+1
| | | | | | | | | | fc_bsg_jobdone() and bsg_job_done() are 1:1 copies now so use the bsg-lib one instead of the FC private implementation. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: change FC drivers to use 'struct bsg_job'Johannes Thumshirn2016-11-181-4/+5
| | | | | | | | | | | Change FC drivers to use 'struct bsg_job' from bsg-lib.h instead of 'struct fc_bsg_job' from scsi_transport_fc.h and remove 'struct fc_bsg_job'. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: fc: provide fc_bsg_to_rport() helperJohannes Thumshirn2016-11-181-1/+1
| | | | | | | | | | | Provide fc_bsg_to_rport() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Also move all LLDDs to use the new helper. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: fc: provide fc_bsg_to_shost() helperJohannes Thumshirn2016-11-181-2/+2
| | | | | | | | | | | Provide fc_bsg_to_shost() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Also use this little helper in the LLDDs. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: fc: Export fc_bsg_jobdone and use it in FC driversJohannes Thumshirn2016-11-181-1/+2
| | | | | | | | | | | | | | | | Export fc_bsg_jobdone so drivers can use it directly instead of doing the round-trip via struct fc_bsg_job::job_done() and use it in the LLDDs. That way we can also unify the interfaces of fc_bsg_jobdone and bsg_job_done. As we've converted all LLDDs over to use fc_bsg_jobdone() directly, we can remove the function pointer from struct fc_bsg_job as well. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directlyJohannes Thumshirn2016-11-181-10/+12
| | | | | | | | | | Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpful when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: ibmvfc: Fix I/O hang when port is not mappedBrian King2016-09-201-1/+0Star
| | | | | | | | | | | | | | | 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: <stable@vger.kernel.org> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: ibmvfc: fix typo in parameter descriptionWei Yongjun2016-09-091-1/+1
| | | | | | | | Fix typo in parameter description. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: ibmvfc: add FC Class 3 Error Recovery supportTyrel Datwyler2016-08-261-0/+10
| | | | | | | | | | | | | | 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 <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: ibmvfc: Set READ FCP_XFER_READY DISABLED bit in PRLITyrel Datwyler2016-08-261-0/+1
| | | | | | | | | 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 <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* ibmvfc: prevent a potential deadlockDan Carpenter2016-07-151-0/+2
| | | | | | | | | | My static checker complains that we need to unlock on this path. Seems true. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* ibmvfc: byteswap scsi_id, wwpn, and node_name prior to loggingTyrel Datwyler2016-02-241-1/+2
| | | | | | | | | | | 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 <tyreld@linux.vnet.ibm.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: use host wide tags by defaultChristoph Hellwig2015-11-101-1/+0Star
| | | | | | | | | | | | | 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 <hch@lst.de> Acked-by: Jens Axboe <axboe@kernel.dk> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* ibmvfc: remove unused tag variableChristoph Hellwig2014-12-041-1/+0Star
| | | | | | | | Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com Reviewed-by: Hannes Reinecke <hare@suse.de> Acked-by: Brian King <brking@linux.vnet.ibm.com>
* scsi: remove ->change_queue_type methodChristoph Hellwig2014-12-041-1/+0Star
| | | | | | | | | | | | 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 <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com Reviewed-by: Hannes Reinecke <hare@suse.de>
* scsi: drop reason argument from ->change_queue_depthChristoph Hellwig2014-11-241-7/+2Star
| | | | | | | | | | | 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 <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
* scsi: avoid ->change_queue_depth indirection for queue full trackingChristoph Hellwig2014-11-241-0/+1
| | | | | | | | | | | | | | | | | 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 <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Venkatesh Srinivas <venkateshs@google.com>
* scsi: don't set tagging state from scsi_adjust_queue_depthChristoph Hellwig2014-11-121-7/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: always assign block layer tags if enabledChristoph Hellwig2014-11-121-5/+6
| | | | | | | | | | | | | 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 <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
* scsi: remove abuses of scsi_populate_tagChristoph Hellwig2014-11-121-13/+3Star
| | | | | | | | | | | | | 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 <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
* scsi: provide a generic change_queue_type methodChristoph Hellwig2014-11-121-24/+1Star
| | | | | | | | | | | Most drivers use exactly the same implementation, so provide it as a library function. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
* ibmvfc: fix little endian issuesTyrel Datwyler2014-07-251-233/+240
| | | | | | | | | Added big endian annotations to relevant data structure fields, and necessary byte swappings to support little endian builds. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: use 64-bit value for 'max_luns'Hannes Reinecke2014-07-171-2/+2
| | | | | | | | | | 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 <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@infradead.org> Reviewed-by: Ewan Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* sched, treewide: Replace hardcoded nice values with MIN_NICE/MAX_NICEDongsheng Yang2014-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Replace various -20/+19 hardcoded nice values with MIN_NICE/MAX_NICE. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Peter Zijlstra <peterz@infradead.org> 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 <mingo@kernel.org>
* [SCSI] ibmvfc: Fix for offlining devices during error recoveryBrian King2013-09-061-2/+13
| | | | | | | | | | | 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 <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] ibmvfc: Suppress ABTS if target goneBrian King2013-05-021-6/+7
| | | | | | | | | | | 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 <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] ibmvfc: Send cancel when link is downBrian King2013-05-021-5/+8
| | | | | | | | | | | | | 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 <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] ibmvfc: Support FAST_IO_FAIL in EH handlersBrian King2013-05-021-17/+52
| | | | | | | | | | | Adds support for receiving FAST_IO_FAIL from fc_block_scsi_eh when in error recovery. This fixes cases of devices being taken offline when they are no longer accessible on the fabric, preventing them from coming back online when the fabric recovers. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] ibmvfc: Properly set cancel flags when cancelling abortBrian King2013-05-021-1/+1
| | | | | | | | | | | The flags on a cancel operation are intended to indicate what, if any, TMF will follow the cancel request. This fixes a case where we were incorrectly setting the abort task set flag on the cancel flag when we were cancelling an abort task set. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* Drivers: scsi: remove __dev* attributes.Greg Kroah-Hartman2013-01-041-1/+1
| | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Adam Radford <linuxraid@lsi.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* [SCSI] ibmvfc: Ignore fabric RSCNs when link is deadBrian King2012-09-241-2/+4
| | | | | | | | | | | This fixes an issues seen where a Fabric RSCN event was received while the link was down, which resulted in repeated attempts to log back into the fabric, which then failed, resulting in the ibmvfc driver taking the host offline. Fix this by delaying taking any action regarding the fabric RSCN until the link comes back up. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] ibmvfc: Fix double completion on abort timeoutBrian King2012-09-241-1/+29
| | | | | | | | | | | | | If an abort request times out to the virtual fibre channel adapter, the ibmvfc driver will kick off a reset of the adapter. This patch ensures we wait for the both the abort request and the request being aborted to be completed prior to exiting the eh_abort handler. This fixes a bug where the ibmvfc driver was erroneously returning success to the eh_abort handler then later sending back a response to the same command. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* powerpc+sparc/vio: Modernize driver registrationBenjamin Herrenschmidt2012-03-281-5/+2Star
| | | | | | | | | | This makes vio_register_driver() get the module owner & name at compile time like PCI drivers do, and adds a name pointer directly in struct vio_driver to avoid having to explicitly initialize the embedded struct device. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: David S. Miller <davem@davemloft.net>
* [SCSI] ibmvfc: Fix Virtual I/O failover hangBrian King2011-06-291-2/+2
| | | | | | | | | | If a Virtual I/O server fails in a dual virtual I/O server multipath configuration, ensure we delete all remote ports so that path failover can occur. For a single path configuration, the remote ports will go into devloss state. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] ibmvfc: Improve ibmvfc_async_desc memory layoutRobert Jennings2010-12-211-14/+14
| | | | | | | | | By changing field ordering we can avoid a couple of memory holes in the tables that use the ibmvfc_async_desc structure. Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* SCSI host lock push-downJeff Garzik2010-11-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Move the mid-layer's ->queuecommand() invocation from being locked with the host lock to being unlocked to facilitate speeding up the critical path for drivers who don't need this lock taken anyway. The patch below presents a simple SCSI host lock push-down as an equivalent transformation. No locking or other behavior should change with this patch. All existing bugs and locking orders are preserved. Additionally, add one parameter to queuecommand, struct Scsi_Host * and remove one parameter from queuecommand, void (*done)(struct scsi_cmnd *) Scsi_Host* is a convenient pointer that most host drivers need anyway, and 'done' is redundant to struct scsi_cmnd->scsi_done. Minimal code disturbance was attempted with this change. Most drivers needed only two one-line modifications for their host lock push-down. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Acked-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [SCSI] ibmvfc: Handle Virtual I/O Server rebootBrian King2010-10-081-2/+4
| | | | | | | | | | | | | | If a Virtual I/O server is rebooted, the client fibre channel sees a transport event on its CRQ, which causes it to attempt to reconnect to the CRQ. For a period of time during the VIOS reboot, the client's attempts to register the CRQ will return H_CLOSED, indicating the server side is not currently registered. The ibmvfc driver was not handling this well and was taking the virtual adapter offline. Fix this by re-enabling our interrupt and waiting for the event on our CRQ indicating the server is back, at which point we can reconnect. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] ibmvfc: prep for fc host dev loss tmo supportMike Christie2010-10-081-13/+2Star
| | | | | | | | | | | | | | | | This removes the driver's get_host_def_dev_loss_tmo callback and just has the driver set the dev loss using the fc class fc_host_dev_loss_tmo macro like is done for other fc params. This patch also removes the module dev loss param. To override the value the fc host sysfs value being added in the fc class patch can be used instead of the driver module param. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] ibmvfc: Log link up/down eventsBrian King2010-09-171-24/+50
| | | | | | | | | | | By default, ibmvfc does not log any async events in order to avoid flooding the log with them. Improve on this by logging by default events that are not likely to flood the log, such as link up/down. Having these events in the log will improve the ability to debug issues with ibmvfc. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] ibmvfc: do not reset dev_loss_tmo in slave calloutMike Christie2010-09-051-3/+7
| | | | | | | | | | | This fixes a bug where the driver was resetting the rport dev_loss_tmo when devices were added by adding support for the get_host_def_dev_loss_tmo callout. Patch has only been compile tested. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] ibmvfc: Fix terminate_rport_ioBrian King2010-08-061-169/+203
| | | | | | | | | | | | The ibmvfc driver was incorrectly obtaining a scsi_target pointer from an fc_rport. The way it is coded ensures that ibmvfc's terminate_rport_io handler does absolutely nothing. Fix this up to iterate through affected devices differently, sending cancel and abort task set as appropriate. Without this patch, fast_io_fail_tmo is broken for ibmvfc. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] ibmvfc: Fix rport add/delete race resulting in oopsBrian King2010-08-061-0/+8
| | | | | | | | | | | | | Commit 43c8da907ccc656935d1085701f4db83385d8a59 introduced a race condition which can occur when adding/deleting rports. There are two possible threads now that can be deleting rports in the ibmvfc driver, which can result in list_del being called twice, resulting in an oops. This patch adds a new state to the ibmvfc_target struct to indicate the target has been removed from the list and is in the process of being deleted. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] ibmvfc: Add support for fc_block_scsi_ehBrian King2010-07-271-0/+4
| | | | | | | | | Adds support for fc_block_scsi_eh to block the EH handlers if the target device is in the blocked state to ensure we don't take devices offline. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] ibmvfc: Fix soft lockup on resumeBrian King2010-07-271-27/+54
| | | | | | | | | | | | | | | This fixes a softlockup seen on resume. During resume, the CRQ must be reenabled. However, the H_ENABLE_CRQ hcall used to do this may return H_BUSY or H_LONG_BUSY. When this happens, the caller is expected to retry later. Normally the H_ENABLE_CRQ succeeds relatively soon. However, we have seen cases where this can take long enough to see softlockup warnings. This patch changes a simple loop, which was causing the softlockup, to a loop at task level which sleeps between retries rather than simply spinning. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* Merge remote branch 'origin' into secretlab/next-devicetreeGrant Likely2010-05-221-2/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * sysfs: add struct file* to bin_attr callbacksChris Wright2010-05-211-1/+2
| | | | | | | | | | | | | | | | | | This allows bin_attr->read,write,mmap callbacks to check file specific data (such as inode owner) as part of any privilege validation. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * [SCSI] ibmvfc: Reduce error recovery timeoutBrian King2010-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | If a command times out resulting in EH getting invoked, we wait for the aborted commands to come back after sending the abort. Shorten the amount of time we wait for these responses, to ensure we don't get stuck in EH for several minutes. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * [SCSI] ibmvfc: Fix command completion handlingBrian King2010-05-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commands which are completed by the VIOS are placed on a CRQ in kernel memory for the ibmvfc driver to process. Each CRQ entry is 16 bytes. The ibmvfc driver reads the first 8 bytes to check if the entry is valid, then reads the next 8 bytes to get the handle, which is a pointer the completed command. This fixes an issue seen on Power 7 where the processor reordered the loads from memory, resulting in processing command completion with a stale handle. This could result in command timeouts, and also early completion of commands. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>