summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'scsi-for-linus' of ↵Linus Torvalds2013-11-1492-1420/+5591
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull first round of SCSI updates from James Bottomley: "This patch set is driver updates for qla4xxx, scsi_debug, pm80xx, fcoe/libfc, eas2r, lpfc, be2iscsi and megaraid_sas plus some assorted bug fixes and cleanups" * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (106 commits) [SCSI] scsi_error: Escalate to LUN reset if abort fails [SCSI] Add 'eh_deadline' to limit SCSI EH runtime [SCSI] remove check for 'resetting' [SCSI] dc395: Move 'last_reset' into internal host structure [SCSI] tmscsim: Move 'last_reset' into host structure [SCSI] advansys: Remove 'last_reset' references [SCSI] dpt_i2o: return SCSI_MLQUEUE_HOST_BUSY when in reset [SCSI] dpt_i2o: Remove DPTI_STATE_IOCTL [SCSI] megaraid_sas: Fix synchronization problem between sysPD IO path and AEN path [SCSI] lpfc: Fix typo on NULL assignment [SCSI] scsi_dh_alua: ALUA handler attach should succeed while TPG is transitioning [SCSI] scsi_dh_alua: ALUA check sense should retry device internal reset unit attention [SCSI] esas2r: Cleanup snprinf formatting of firmware version [SCSI] esas2r: Remove superfluous mask of pcie_cap_reg [SCSI] esas2r: Fixes for big-endian platforms [SCSI] esas2r: Directly call kernel functions for atomic bit operations [SCSI] lpfc 8.3.43: Update lpfc version to driver version 8.3.43 [SCSI] lpfc 8.3.43: Fixed not processing task management IOCB response status [SCSI] lpfc 8.3.43: Fixed spinlock hang. [SCSI] lpfc 8.3.43: Fixed invalid Total_Data_Placed value received for els and ct command responses ...
| * Merge tag 'fcoe-3.13' into for-linusJames Bottomley2013-11-1012-176/+310
| |\ | | | | | | | | | | | | | | | Pull Request for 3.13 for FCOE tree. Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * scsi: Convert uses of compare_ether_addr to ether_addr_equalJoe Perches2013-10-145-18/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preliminary to removing compare_ether_addr altogether: Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Done via cocci script: $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * fcoe: Fix missing mutex_unlock in fcoe_sysfs_fcf_add error pathNeil Horman2013-10-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this pending patch: http://patchwork.open-fcoe.org/patch/104/ Tomas Henzl noted that the error path when fcoe_fcf_device_add fails, was missing a mutex_unlock call. Not sure what staet the integration of the above patch is in, but if you could either merge this with it, or apply it on top of what you already have, that would be great. Thanks! Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: thenzl@redhat.com Reported-by: thenzl@redhat.com Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * libfcoe: Make fcoe_sysfs optional / fix fnic NULL exceptionRobert Love2013-10-114-32/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fnic doesn't use any of the create/destroy/enable/disable interfaces either from the (legacy) module paramaters or the (new) fcoe_sysfs interfaces. When fcoe_sysfs was introduced fnic wasn't changed since it wasn't using the interfaces. libfcoe incorrectly assumed that that all of its users were using fcoe_sysfs and when adding and deleting FCFs would assume the existance of a fcoe_ctlr_device. fnic was not allocating this structure because it doesn't care about the standard user interfaces (fnic starts on link only). If/When libfcoe tried to use the fcoe_ctlr_device's lock for the first time a NULL pointer exception would be triggered. Since fnic doesn't care about sysfs or user interfaces, the solution is to drop libfcoe's assumption that all drivers are using fcoe_sysfs. This patch accomplishes this by changing some of the structure relationships. We need a way to determine when a LLD is using fcoe_sysfs or not and we can do that by checking for the existance of the fcoe_ctlr_device. Prior to this patch, it was assumed that the fcoe_ctlr structure was allocated with the fcoe_ctlr_device and immediately followed it in memory. To reach the fcoe_ctlr_device we would simply go back in memory from the fcoe_ctlr to get the fcoe_ctlr_device. Since fnic doesn't allocate the fcoe_ctlr_device, we cannot keep that assumption. This patch adds a pointer from the fcoe_ctlr to the fcoe_ctlr_device. For bnx2fc and fcoe we will continue to allocate the two structures together, but then we'll set the ctlr->cdev pointer to point at the fcoe_ctlr_device. fnic will not change and will continue to allocate the fcoe_ctlr itself, and ctlr->cdev will remain NULL. When libfcoe adds fcoe_fcf's to the fcoe_ctlr it will check if ctlr->cdev is set and only if so will it continue to interact with fcoe_sysfs. Signed-off-by: Robert Love <robert.w.love@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Tested-by: Hiral Patel <hiralpat@cisco.com>
| | * fcoe: Reduce fcoe_sysfs_fcf_add() stack usageBart Van Assche2013-09-041-17/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following compiler warning: drivers/scsi/fcoe/fcoe_ctlr.c: In function fcoe_sysfs_fcf_add: drivers/scsi/fcoe/fcoe_ctlr.c:211:1: warning: the frame size of 1480 bytes is larger than 1024 bytes [-Wframe-larger-than=] Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * fcoe: Add missing newlines in debug messagesBart Van Assche2013-09-042-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | FCoE debug statements must end in a newline. Add one where it is missing. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * fcoe: Declare fcoe_ctlr_mode_set() staticBart Van Assche2013-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The function fcoe_ctlr_mode_set() is local, hence declare it static. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * fcp: Do not interpret check condition as underrunBart Van Assche2013-09-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch avoids that the FCoE initiator sends a REC message after having received a SCSI response with non-zero status and non-zero DATA IN buffer length. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * libfc: Do not invoke the response handler after fc_exch_done()Bart Van Assche2013-09-042-39/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the FCoE initiator driver invokes fc_exch_done() from inside the libfc response handler, FCoE target drivers typically invoke fc_exch_done() from outside the libfc response handler. The object fc_exch.arg points at may disappear as soon as fc_exch_done() has finished. So it's important not to invoke the response handler function after fc_exch_done() has finished. Modify libfc such that this guarantee is provided if fc_exch_done() is invoked from outside a response handler. This patch fixes a sporadic crash in FCoE target implementations after a command has been aborted. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * libfc: Reduce exchange lock contention in fc_exch_recv_abts()Bart Van Assche2013-09-041-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the time during which the exchange lock is held by allocating a frame before obtaining the exchange lock. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * libfc: Avoid that sending after an abort triggers a kernel warningBart Van Assche2013-09-041-22/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling fc_seq_send() after an ABTS message has been received triggers a kernel warning (WARN_ON(!(ep->esb_stat & ESB_ST_SEQ_INIT))). Avoid this by returning -ENXIO to the caller if fc_seq_send() is invoked after an ABTS message has been received. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * libfc: Protect ep->esb_stat changes via ex_lockBart Van Assche2013-09-041-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch avoids that the WARN_ON(!(ep->esb_stat & ESB_ST_SEQ_INIT)) statement in fc_seq_send_locked() gets triggered sporadically when running FCoE target code due to concurrent ep->esb_stat modifications. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * libfc: Fix a race in fc_exch_timer_set_locked()Bart Van Assche2013-09-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is allowed to pass a zero timeout value to fc_seq_exch_abort(). Avoid that this can cause the timeout function to drop the exchange reference before it has been increased by fc_exch_timer_set_locked(). This patch fixes a crash when running FCoE target code with poisoning enabled in the memory allocator. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * libfc: Clarify fc_exch_find()Bart Van Assche2013-09-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The condition ep != NULL && ep->xid != xid can never be met. Make this explicit. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * libfc: Micro-optimize fc_setup_exch_mgr()Bart Van Assche2013-09-041-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Convert a loop into an ilog2() call. Although this code is not performance sensitive this conversion makes this code easier to read. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * libfc: Debug code fixesBart Van Assche2013-09-042-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The second argument of fc_lport_error() may be a valid frame pointer. Hence only print it as an error code if it really is an error code. Debug statements must end in a newline. Add one where it is missing. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * libfc: Source code comment spelling fixesBart Van Assche2013-09-044-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | Change 'initiaive' into 'initiative', 'remainig' into 'remaining' and change 'exected' into 'expected'. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * fcoe: cleanup return codes from fcoe_rcvNeil Horman2013-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | the return codes from fcoe_rcv should be NET_RX_*, not 0 or -1. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * fcoe: make sure fcoe frames are unshared prior to manipulating themNeil Horman2013-09-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on my last patch I noticed that fcoe_rcv has a simmilar problem, in that it manipulates the passed in skb without checking to see if it has other users. Making manipulations to a shared skb can result in various corruptions. Easy fix, just make sure the skb is unshared prior to doing anything with it. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| | * fcoe: ensure that skb placed on the fip_recv_list are unsharedNeil Horman2013-09-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently had this Oops reported to me on the 3.10 kernel: [ 807.554955] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 807.562799] IP: [<ffffffff814e6fc7>] skb_dequeue+0x47/0x70 [ 807.568296] PGD 20c889067 PUD 20c8b8067 PMD 0 [ 807.572769] Oops: 0002 [#1] SMP [ 807.655597] Hardware name: Dell Inc. PowerEdge R415/0DDT2D, BIOS 1.8.6 12/06/2011 [ 807.663079] Workqueue: events fcoe_ctlr_recv_work [libfcoe] [ 807.668656] task: ffff88020b42a160 ti: ffff88020ae6c000 task.ti: ffff88020ae6c000 [ 807.676126] RIP: 0010:[<ffffffff814e6fc7>] [<ffffffff814e6fc7>] skb_dequeue+0x47/0x70 [ 807.684046] RSP: 0000:ffff88020ae6dd70 EFLAGS: 00010097 [ 807.689349] RAX: 0000000000000246 RBX: ffff8801d04d6700 RCX: 0000000000000000 [ 807.696474] RDX: 0000000000000000 RSI: 0000000000000246 RDI: ffff88020df26434 [ 807.703598] RBP: ffff88020ae6dd88 R08: 00000000000173e0 R09: ffff880216e173e0 [ 807.710723] R10: ffffffff814e5897 R11: ffffea0007413580 R12: ffff88020df26420 [ 807.717847] R13: ffff88020df26434 R14: 0000000000000004 R15: ffff8801d04c42ce [ 807.724972] FS: 00007fdaab6048c0(0000) GS:ffff880216e00000(0000) knlGS:0000000000000000 [ 807.733049] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 807.738785] CR2: 0000000000000008 CR3: 000000020cbc9000 CR4: 00000000000006f0 [ 807.745910] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 807.753033] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 807.760156] Stack: [ 807.762162] ffff8801d04d6700 0000000000000001 ffff88020df26400 ffff88020ae6de20 [ 807.769586] ffffffffa0444409 ffff88020b046a00 ffff88020ae6dde8 ffffffff810105be [ 807.777008] ffff88020b42a868 0000000000000000 ffff88020df264a8 ffff88020df26348 [ 807.784431] Call Trace: [ 807.786885] [<ffffffffa0444409>] fcoe_ctlr_recv_work+0x59/0x9a0 [libfcoe] [ 807.793755] [<ffffffff810105be>] ? __switch_to+0x13e/0x4a0 [ 807.799324] [<ffffffff8107d0e6>] process_one_work+0x176/0x420 [ 807.805151] [<ffffffff8107dd0b>] worker_thread+0x11b/0x3a0 [ 807.810717] [<ffffffff8107dbf0>] ? rescuer_thread+0x350/0x350 [ 807.816545] [<ffffffff810842b0>] kthread+0xc0/0xd0 [ 807.821416] [<ffffffff810841f0>] ? insert_kthread_work+0x40/0x40 [ 807.827503] [<ffffffff8160ce2c>] ret_from_fork+0x7c/0xb0 [ 807.832897] [<ffffffff810841f0>] ? insert_kthread_work+0x40/0x40 [ 807.858500] RIP [<ffffffff814e6fc7>] skb_dequeue+0x47/0x70 [ 807.864076] RSP <ffff88020ae6dd70> [ 807.867558] CR2: 0000000000000008 Looks like the root cause is the fact that the packet recieve function fcoe_ctlr_recv enqueues the skb to a sk_buff_head_list prior to ensuring that the skb is unshared. This can happen when multiple packet listeners recieve an skb, as the deliver_skb function just increments skb->users for each handler. As a result, having multiple users of a single skb results in multiple manipulators of its methods, implying list corruption, and the oops recorded above. The fix is pretty easy, just make sure that we clone the skb if its got multiple users with the skb_share_check function, like other protocols do. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
| * | [SCSI] scsi_error: Escalate to LUN reset if abort failsHannes Reinecke2013-10-251-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a command abort fails there is a fair chance that all other aborts will be failing, too. So we should be calling LUN reset directly after the first failed abort and skip aborting the remaining commands. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] Add 'eh_deadline' to limit SCSI EH runtimeHannes Reinecke2013-10-254-6/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patchs adds an 'eh_deadline' sysfs attribute to the scsi host which limits the overall runtime of the SCSI EH. The 'eh_deadline' value is stored in the now obsolete field 'resetting'. When a command is failed the start time of the EH is stored in 'last_reset'. If the overall runtime of the SCSI EH is longer than last_reset + eh_deadline, the EH is short-circuited and falls through to issue a host reset only. [jejb: add comments in Scsi_Host about new fields] Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] remove check for 'resetting'Hannes Reinecke2013-10-252-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | Field is now unused, so this is dead code. [jejb: remove resetting and last_reset from Scsi_Host] Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] dc395: Move 'last_reset' into internal host structureHannes Reinecke2013-10-251-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | 'last_reset' is only used internally, so move it into the internal host structure. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] tmscsim: Move 'last_reset' into host structureHannes Reinecke2013-10-252-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | The 'last_reset' value is only used internally, so move it into the internal host structure. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] advansys: Remove 'last_reset' referencesHannes Reinecke2013-10-251-4/+4
| | | | | | | | | | | | | | | | | | | | | Serves no purpose whatsoever. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] dpt_i2o: return SCSI_MLQUEUE_HOST_BUSY when in resetHannes Reinecke2013-10-251-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the HBA is in reset we should be returning 'busy' and not rely on the obscure 'last_reset' feature. [jejb: checkpatch fixes] Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] dpt_i2o: Remove DPTI_STATE_IOCTLHannes Reinecke2013-10-252-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | scsi_block_host/scsi_unlock_host provides the required functionality. [jejb: checkpatch fixes] Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] megaraid_sas: Fix synchronization problem between sysPD IO path and ↵Sumit.Saxena@lsi.com2013-10-252-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AEN path There is syncronization problem between sysPD IO path and AEN path. Driver maintains instance->pd_list[] array, which will get updated(by calling function megasas_get_pd_list[]), whenever any of below events occurs- MR_EVT_PD_INSERTED MR_EVT_PD_REMOVED MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED MR_EVT_FOREIGN_CFG_IMPORTED At same time running sysPD IO will be accessing the same array instance->pd_list[], which is getting updated in AEN path, because of this IO may not get correct PD info from instance->pd_list[] array. Signed-off-by: Adam Radford <adam.radford@lsi.com> Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc: Fix typo on NULL assignmentFelipe Pena2013-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the lpfc_ct_free_iocb function after freeing associated memory to the ctiocb->context3, the ctiocb->context1 is set to NULL instead of context3. Signed-off-by: Felipe Pena <felipensp@gmail.com> Acked-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] scsi_dh_alua: ALUA handler attach should succeed while TPG is ↵Stewart, Sean2013-10-251-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | transitioning During testing, it was discovered that when a device tries to attach to the alua handler while in TPG state of transitioning, the alua_rtpg function will wait for it to exit the state before allowing it to continue. As a result, if the 60 second timeout expires, the alua handler will not attach to the device. To fix this, I have introduced an input argument to alua_rtpg called wait_for_transition. The idea is that it will wait for the transition to complete before an activation (because the current TPG state has some bearing in that case), but during a discovery if it is transitioning, it will not wait, and will store the state as standby for the time being. I believe the precedent exists for this from commit c0d289b3e59577532c45ee9110ef81bd7b341272 Since if the device reports a state of transitioning, it can transition to other more valid states, and it has been established TPGS is supported on the device, if it is attaching. Signed-off-by: Sean Stewart <Sean.Stewart@netapp.com> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] scsi_dh_alua: ALUA check sense should retry device internal reset ↵Stewart, Sean2013-10-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unit attention When the scsi_dh_alua handler issues an RTPG during initialization, if it gets 0x06/0x29/0x04 as the sense, it will fail to attach the handler. NetApp E-Series returns 0x29/0x00 for power on, and 0x29/0x04 for conditions that cause the controller to reboot again. These conditions should be treated identically within the handler. Signed-off-by: Sean Stewart <Sean.Stewart@netapp.com> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] esas2r: Cleanup snprinf formatting of firmware versionBradley Grove2013-10-251-3/+3
| | | | | | | | | | | | | | | Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] esas2r: Remove superfluous mask of pcie_cap_regBradley Grove2013-10-251-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] esas2r: Fixes for big-endian platformsBradley Grove2013-10-252-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In esas2r_format_init_msg(), sgl_page_size and epoch_time params are converted to little endian and the firmware version read from the hba is converted to cpu endianess. In esas2r_rq_init_request, correct and simplify the construction of the SCSI handle. These fixes are the result of testing on a PPC64 machine. Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] esas2r: Directly call kernel functions for atomic bit operationsBradley Grove2013-10-2510-306/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the code embedded the kernel's test_bit/clear_bit functions in wrappers that accepted u32 parameters. The wrapper cast these parameters to longs before passing them to the kernel's bit functions. This did not work properly on platforms with 64-bit longs. Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.43: Update lpfc version to driver version 8.3.43James Smart2013-10-251-1/+1
| | | | | | | | | | | | | | | Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.43: Fixed not processing task management IOCB response statusJames Smart2013-10-254-21/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the changes requested by Jeremy Linton: http://marc.info/?l=linux-scsi&m=136242124409687&w=2 The patch revises the command issuing behavior, detecting cases where the Task Mgmt command may have completed but with a non-successful status, which it previously treated as a successful TMF. The patch also corrects a flushing of I/O that was done which should only be done on successful TMF completion. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.43: Fixed spinlock hang.James Smart2013-10-251-2/+6
| | | | | | | | | | | | | | | Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.43: Fixed invalid Total_Data_Placed value received for els ↵James Smart2013-10-252-4/+40
| | | | | | | | | | | | | | | | | | | | | and ct command responses Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.43: Fixed invalid fcp_rsp length fir FCP_ICMNDJames Smart2013-10-252-8/+35
| | | | | | | | | | | | | | | Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.43: Fixed invalid mailbox timeoutsJames Smart2013-10-251-0/+112
| | | | | | | | | | | | | | | Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.43: Fixed spinlock inversion problem.James Smart2013-10-251-4/+5
| | | | | | | | | | | | | | | Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.43: Fix crash after xri limit is reached.James Smart2013-10-252-7/+13
| | | | | | | | | | | | | | | Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] Derive the FLUSH_TIMEOUT from the basic I/O timeoutJames Bottomley2013-10-252-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than having a separate constant for specifying the timeout on FLUSH operations, use the basic I/O timeout value that is already configurable on a per target basis to derive the FLUSH timeout. Looking at the current definitions of these timeout values, the FLUSH operation is supposed to have a value that is twice the normal timeout value. This patch preserves this relationship while leveraging the flexibility of specifying the I/O timeout. Based on a prior patch by KY Srinivasan <kys@microsoft.com> Reviewed-by: KY Srinivasan <kys@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] pm80xx: Firmware logging support.Anand Kumar Santhanam2013-10-259-1/+510
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Supports below logging facilities, Inbound outbound queues dump. Non fatal dump in case of IO failures. Fatal dump in case of firmware failure. [jejb: checkpatch spacing fixes] Signed-off-by: Anandkumar.Santhanam@pmcs.com Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] pm80xx: Phy settings support for motherboard controller.Anand Kumar Santhanam2013-10-255-3/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Phy profile implementation to support phy settings feature for motherboard controllers. [jejb: checkpatch fixes] Signed-off-by: Anandkumar.Santhanam@pmcs.com Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] pm80xx: IButton security feature support for motherboard controllers.Anand Kumar Santhanam2013-10-251-1/+22
| | | | | | | | | | | | | | | | | | Signed-off-by: Anandkumar.Santhanam@pmcs.com Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] pm80xx: Print SAS address of IO failed device.Anand Kumar Santhanam2013-10-252-1/+103
| | | | | | | | | | | | | | | | | | | | | [jejb: checkpatch fixes] Signed-off-by: Anandkumar.Santhanam@pmcs.com Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
OpenPOWER on IntegriCloud