- 18 8月, 2015 1 次提交
-
-
由 Hiral Shah 提交于
fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack We added changes in fnic driver patch 1.6.0.16 to acquire io_req_lock in fnic_queuecommand() before issuing I/O so that io completion is serialized. But when releasing the lock we check for the I/O flag and this could be modified if IO abort occurs before I/O completion. In this case we wont release the lock and causes deadlock in some scenerios. Using the local variable to check the IO lock status will resolve the problem. Fixes: 41df7b02Signed-off-by: NHiral Shah <hishah@cisco.com> Signed-off-by: NSesidhar Baddela <sebaddel@cisco.com> Signed-off-by: NAnil Chintalapati <achintal@cisco.com> Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com> Cc: stable@vger.kernel.org Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
- 30 12月, 2014 1 次提交
-
-
When I/O is aborted by mid-layer, fnic FW will complete the I/O before completing the abort task. In some cases abort request is completed before the I/O, which could lead to inconsistent driver and firmware states. In this case firmware reset would clear the inconsistent state. Signed-off-by: NAnil Chintalapati <achintal@cisco.com> Signed-off-by: NSesidhar Baddela <sebaddel@cisco.com> Signed-off-by: NHiral Shah <hishah@cisco.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 20 11月, 2014 2 次提交
-
-
由 Hiral Shah 提交于
When issuing I/O request, if the I/O completes before returning from fnic_queuecommand(), we may be referencing scsi_cmnd structure that may be freed by interrupt handler. Acquring IO lock would synchronize fnic_queuecommand and interrupt handler. - Increment fnic version from 1.6.0.15 to 1.6.0.16 Signed-off-by: NHiral Shah <hishah@cisco.com> Signed-off-by: NSesidhar Baddela <sebaddel@cisco.com> Signed-off-by: NAnil Chintalapati <achintal@cisco.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Hiral Shah 提交于
IOs belonging to an rport are aborted with Internal terminate option when rport goes offline. Any new IO issued to the rport during this time can reuse the terminated exchange which will cause inconsistent state of the exchange between local port and remote port. fc_rport_priv is set to RPORT_ST_DELETE before exchanges are aborted by libfc. Not issuing amy more I/O requests when RPORT_ST_DELETE is set, will avoid inconsistent state of the exchange between local port and remote port. - Increment fnic version from 1.6.0.13 to 1.6.0.14 Signed-off-by: NHiral Shah <hishah@cisco.com> Signed-off-by: NSesidhar Baddela <sebaddel@cisco.com> Signed-off-by: NAnil Chintalapati <achintal@cisco.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 12 11月, 2014 1 次提交
-
-
由 Christoph Hellwig 提交于
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: NChristoph Hellwig <hch@lst.de> Reviewed-by: NMike Christie <michaelc@cs.wisc.edu> Reviewed-by: NHannes Reinecke <hare@suse.de>
-
- 26 7月, 2014 1 次提交
-
-
由 Christoph Hellwig 提交于
Current the midlayer fakes up a struct request for the explicit reset ioctls, and those don't have a tag allocated to them. The fnic driver pokes into midlayer structures to paper over this design issue, but that won't work for the blk-mq case. Either someone who can actually test the hardware will have to come up with a similar hack for the blk-mq case, or we'll have to bite the bullet and fix the way the EH ioctls work for real, but until that happens we fail these explicit requests here. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NWebb Scales <webbnh@hp.com> Acked-by: NJens Axboe <axboe@kernel.dk> Tested-by: NBart Van Assche <bvanassche@acm.org> Tested-by: NRobert Elliott <elliott@hp.com> Cc: Hiral Patel <hiralpat@cisco.com> Cc: Suma Ramars <sramars@cisco.com> Cc: Brian Uchino <buchino@cisco.com>
-
- 18 7月, 2014 1 次提交
-
-
由 Hannes Reinecke 提交于
The SCSI standard defines 64-bit values for LUNs, and large arrays employing large or hierarchical LUN numbers become more and more common. So update the linux SCSI stack to use 64-bit LUN numbers. Signed-off-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NChristoph Hellwig <hch@infradead.org> Reviewed-by: NEwan Milne <emilne@redhat.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 19 5月, 2014 1 次提交
-
-
由 Hiral Shah 提交于
In fnic abort handler, abort queuing can be failed when hardware queue is full. The command state is left as abort queued. The command with abort queued state will never be queued next time for abort or termiantion. Fix restores the command state in above case. Signed-off-by: NHiral Shah <hishah@cisco.com> Signed-off-by: NSesidhar Baddela <sebaddel@cisco.com> Signed-off-by: NNarsimhulu Musini <nmusini@cisco.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 25 10月, 2013 2 次提交
-
-
由 Hiral Patel 提交于
This feature gathers active and cumulative per fnic stats for io, abort, terminate, reset, vlan discovery path and it also includes various important stats for debugging issues. It also provided debugfs and ioctl interface for user to retrieve these stats. It also provides functionality to reset cumulative stats through user interface. Signed-off-by: NHiral Patel <hiralpat@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Narsimhulu Musini 提交于
Fixed appropriate error codes that returns negative error number on failure, and 0 on success. fnic_reset() is used directly by the fc transport callback issue_fc_host_lip which requires a negative error number on failure. Signed-off-by: NNarsimhulu Musini <nmusini@cisco.com> Signed-off-by: NHiral Patel <hiralpat@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 12 9月, 2013 4 次提交
-
-
由 Hiral Patel 提交于
Introduced module params to provide dynamic way of configuring queue depth. Added support to get max io throttle count through UCSM to configure maximum outstanding IOs supported by fnic and push that value to scsi mid-layer. Supported IO throttle values: UCSM IO THROTTLE VALUE FNIC MAX OUTSTANDING IOS ------------------------------------------------------ 16 (Default) 2048 <= 256 256 > 256 <ucsm value> Signed-off-by: NHiral Patel <hiralpat@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Sesidhar Beddel 提交于
Kernel panics due to NULL lport while executing the log message because of synchronization issues between libfc and scsi transport fc. Checking for NULL pointers at the beginning of this routine would resolve the issue from kernel panic point of view. Signed-off-by: NSesidhar Baddel <sebaddel@cisco.com> Signed-off-by: NHiral Patel <hiralpat@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Sesidhar Beddel 提交于
Hitting BUG_ON(io_req->abts_done) in fnic_rport_exch_reset in case of timing issue and also to some extent locking issue where abts and terminate is happening around same timing. The code changes are intended to update CMD_STATE(sc) and io_req->abts_done together. Signed-off-by: NSesidhar Beddel <sebaddel@cisco.com> Signed-off-by: NHiral Patel <hiralpat@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Suma Ramars 提交于
Remove fnic driver QUEUE_FULL handling code instead let SCSI mid layer handle queue full and use its algorithm to ramp down/up queue Signed-off-by: NSuma Ramars <sramars@cisco.com> Signed-off-by: NHiral Patel <hiralpat@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 27 6月, 2013 1 次提交
-
-
由 Dan Carpenter 提交于
There is an unlock missing if the == FNIC_IOREQ_ABTS_PENDING is false. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NHiral Patel <hiralpat@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 23 2月, 2013 4 次提交
-
-
由 Hiral Patel 提交于
Fnic Trace utility is a tracing functionality built directly into fnic driver to trace events. The benefit that trace buffer brings to fnic driver is the ability to see what it happening inside the fnic driver. It also provides the capability to trace every IO event inside fnic driver to debug panics, hangs and potentially IO corruption issues. This feature makes it easy to find problems in fnic driver and it also helps in tracking down strange bugs in a more manageable way. Trace buffer is shared across all fnic instances for this implementation. Signed-off-by: NHiral Patel <hiralpat@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Hiral Patel 提交于
Added new fnic debug flags for identifying IO state at every stage of IO while debugging and also added more log messages for better debugging capability. Signed-off-by: NSesidhar Baddela <sebaddel@cisco.com> Signed-off-by: NHiral Patel <hiralpat@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Hiral Patel 提交于
The issue was observed when LUN Reset is issued through IOCTL or sg_reset utility. fnic driver issues LUN RESET to firmware. On successful completion of device reset, driver cleans up all the pending IOs that were issued prior to device reset. These pending IOs are expected to be in ABTS_PENDING state. This works fine, when the device reset operation resulted from midlayer, but not when device reset was triggered from IOCTL path as the pending IOs were not in ABTS_PENDING state. execution path hits panic if the pending IO is not in ABTS_PENDING state. Changes: The fix replaces BUG_ON check in fnic_clean_pending_aborts() with marking pending IOs as ABTS_PENDING if they were not in ABTS_PENDING state and skips if they were already in ABTS_PENDING state. An extra check is added to validate the abort status of the commands after a delay of 2 * E_D_TOV using a helper function. The helper function returns 1 if it finds any pending IO in ABTS_PENDING state, belong to the LUN on which device reset was issued else 0. With this, device reset operation returns success only if the helper funciton returns 0, otherwise it returns failure. Other changes: - Removed code in fnic_clean_pending_aborts() that returns failure if it finds io_req NULL, instead of returning failure added code to continue with next io - Added device reset flags for debugging in fnic_terminate_rport_io, fnic_rport_exch_reset, and fnic_clean_pending_aborts Signed-off-by: NNarsimhulu Musini <nmusini@cisco.com> Signed-off-by: NHiral Patel <hiralpat@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Hiral Patel 提交于
1. Handling overlapped firmware resets This fix serialize multiple firmware resets to avoid situation where fnic device fails to come up for link up event, when firmware resets are issued back to back. If there are overlapped firmware resets are issued, the firmware reset operation checks whether there is any firmware reset in progress, if so it polls for its completion in a loop with 100ms delay. 2. Handling device reset timeout fnic_device_reset code has been modified to handle Device reset timeout: - Issue terminate on device reset timeout. - Introduced flags field (one of the scratch fields in scsi_cmnd). With this, device reset request would have DEVICE_RESET flag set for other routines to determine the type of the request. Also modified fnic_terminate_rport_io, fnic_rport_exch_rset, completion routines to handle SCSI commands with DEVICE_RESET flag. 3. LUN/Device Reset hangs when issued through IOCTL using utilities like sg_reset. Each SCSI command is associated with a valid tag, fnic uses this tag to retrieve associated scsi command on completion. the LUN/Device Reset issued through IOCTL resulting into a SCSI command that is not associated with a valid tag. So fnic fails to retrieve associated scsi command on completion, which causes hang. This fix allocates tag, associates it with the scsi command and frees the tag, when the operation completed. 4. Preventing IOs during firmware reset. Current fnic implementation allows IO submissions during firmware reset. This fix synchronizes IO submissions and firmware reset operations. It ensures that IOs issued to fnic prior to reset will be issued to the firmware before firmware reset. Signed-off-by: NNarsimhulu Musini <nmusini@cisco.com> Signed-off-by: NHiral Patel <hiralpat@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 30 6月, 2011 1 次提交
-
-
由 Abhijeet Joglekar 提交于
Driver was incorrectly using the SLAB_CACHE_DMA flag when creating a cache for SGLs. fnic device does not have 24-bit DMA restrictions. Remove the flag and allocations from ZONE_DMA. Thanks to Roland Dreier and David Rientjes for pointing out the bug. Signed-off-by: NAbhijeet Joglekar <abjoglek@cisco.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 31 3月, 2011 1 次提交
-
-
由 Lucas De Marchi 提交于
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: NLucas De Marchi <lucas.demarchi@profusion.mobi>
-
- 17 11月, 2010 1 次提交
-
-
由 Jeff Garzik 提交于
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: NJeff Garzik <jgarzik@redhat.com> Acked-by: NJames Bottomley <James.Bottomley@suse.de> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 28 7月, 2010 1 次提交
-
-
由 Roel Kluin 提交于
In fnic_abort_cmd() and fnic_device_reset() assign `rport' earlier to make FNIC_SCSI_DBG() calls cleaner. In fnic_clean_pending_aborts() `rport' is not used. Signed-off-by: NRoel Kluin <roel.kluin@gmail.com> Acked-by: NAbhijeet Joglekar <abjoglek@cisco.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
- 30 3月, 2010 1 次提交
-
-
由 Tejun Heo 提交于
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: NTejun Heo <tj@kernel.org> Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
-
- 05 12月, 2009 3 次提交
-
-
由 Joe Eykholt 提交于
Use libfcoe as a common FIP implementation with fcoe. FIP or non-FIP mode is fully automatic if the firmware supports and enables it. Even if FIP is not supported, this uses libfcoe for the non-FIP handling of FLOGI and its response. Use the new lport_set_port_id() notification to capture successful FLOGI responses and port_id resets. While transitioning between Ethernet and FC mode, all rx and tx FC frames are queued. In Ethernet mode, all frames are passed to the exchange manager to capture FLOGI responses. Change to set data_src_addr to the ctl_src_addr whenever it would have previously been zero because we're not logged in. This seems safer so we'll never send a frame with a 0 source MAC. This also eliminates a special case for sending FLOGI frames. Signed-off-by: NJoe Eykholt <jeykholt@cisco.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
由 Christof Schmitt 提交于
Move the duplicated code from FC LLDs to SCSI FC transport class. Acked-by: NJames Smart <james.smart@emulex.com> Acked-by: NGiridhar Malavali <giridhar.malavali@qlogic.com> Acked-by: NAbhijeet Joglekar <abjoglek@cisco.com> Signed-off-by: NChristof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
由 Abhijeet Joglekar 提交于
Signed-off-by: NAbhijeet Joglekar <abjoglek@cisco.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
- 26 6月, 2009 1 次提交
-
-
由 Roel Kluin 提交于
The shost sg tablesize is set to FNIC_MAX_SG_DESC_CNT and fnic uses scsi_dma_map, so both BUG_ONs can be removed. scsi_dma_map may return -ENOMEM, sg_count should be int to catch that. Signed-off-by: NRoel Kluin <roel.kluin@gmail.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 14 5月, 2009 1 次提交
-
-
由 Abhijeet Joglekar 提交于
fnic is a driver for the Cisco PCI-Express FCoE HBA Signed-off-by: NAbhijeet Joglekar <abjoglek@cisco.com> Signed-off-by: NJoe Eykholt <jeykholt@cisco.com> Signed-off-by: NMike Christie <michaelc@cs.wisc.edu> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-