summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
Commit message (Collapse)AuthorAgeFilesLines
* SCSI: Fix error handling when no ULD is attachedMartin K. Petersen2012-04-151-1/+1
| | | | | | | | | | | | | | Commit 18a4d0a22ed6 ("[SCSI] Handle disk devices which can not process medium access commands") introduced a bug in which we would attempt to dereference the scsi driver even when the device had no ULD attached. Ensure that a driver is registered and make the driver accessor function more resilient to errors during device discovery. Reported-by: Elric Fu <elricfu1@gmail.com> Reported-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'akpm' (Andrew's patch-bomb)Linus Torvalds2012-04-051-8/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge batch of fixes from Andrew Morton: "The simple_open() cleanup was held back while I wanted for laggards to merge things. I still need to send a few checkpoint/restore patches. I've been wobbly about merging them because I'm wobbly about the overall prospects for success of the project. But after speaking with Pavel at the LSF conference, it sounds like they're further toward completion than I feared - apparently davem is at the "has stopped complaining" stage regarding the net changes. So I need to go back and re-review those patchs and their (lengthy) discussion." * emailed from Andrew Morton <akpm@linux-foundation.org>: (16 patches) memcg swap: use mem_cgroup_uncharge_swap fix backlight: add driver for DA9052/53 PMIC v1 C6X: use set_current_blocked() and block_sigmask() MAINTAINERS: add entry for sparse checker MAINTAINERS: fix REMOTEPROC F: typo alpha: use set_current_blocked() and block_sigmask() simple_open: automatically convert to simple_open() scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open() libfs: add simple_open() hugetlbfs: remove unregister_filesystem() when initializing module drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback fs/xattr.c:setxattr(): improve handling of allocation failures fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed fs/xattr.c: suppress page allocation failure warnings from sys_listxattr() sysrq: use SEND_SIG_FORCED instead of force_sig() proc: fix mount -t proc -o AAA
| * simple_open: automatically convert to simple_open()Stephen Boyd2012-04-051-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many users of debugfs copy the implementation of default_open() when they want to support a custom read/write function op. This leads to a proliferation of the default_open() implementation across the entire tree. Now that the common implementation has been consolidated into libfs we can replace all the users of this function with simple_open(). This replacement was done with the following semantic patch: <smpl> @ open @ identifier open_f != simple_open; identifier i, f; @@ -int open_f(struct inode *i, struct file *f) -{ ( -if (i->i_private) -f->private_data = i->i_private; | -f->private_data = i->i_private; ) -return 0; -} @ has_open depends on open @ identifier fops; identifier open.open_f; @@ struct file_operations fops = { ... -.open = open_f, +.open = simple_open, ... }; </smpl> [akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge tag 'scsi-misc' of ↵Linus Torvalds2012-03-3157-938/+4247
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 Pull SCSI updates from James Bottomley: "This is primarily another round of driver updates (lpfc, bfa, fcoe, ipr) plus a new ufshcd driver. There shouldn't be anything controversial in here (The final deletion of scsi proc_ops which caused some build breakage has been held over until the next merge window to give us more time to stabilise it). I'm afraid, with me moving continents at exactly the wrong time, anything submitted after the merge window opened has been held over to the next merge window." * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (63 commits) [SCSI] ipr: Driver version 2.5.3 [SCSI] ipr: Increase alignment boundary of command blocks [SCSI] ipr: Increase max concurrent oustanding commands [SCSI] ipr: Remove unnecessary memory barriers [SCSI] ipr: Remove unnecessary interrupt clearing on new adapters [SCSI] ipr: Fix target id allocation re-use problem [SCSI] atp870u, mpt2sas, qla4xxx use pci_dev->revision [SCSI] fcoe: Drop the rtnl_mutex before calling fcoe_ctlr_link_up [SCSI] bfa: Update the driver version to 3.0.23.0 [SCSI] bfa: BSG and User interface fixes. [SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario. [SCSI] bfa: Move service parameter programming logic into firmware. [SCSI] bfa: Revised Fabric Assigned Address(FAA) feature implementation. [SCSI] bfa: Flash controller IOC pll init fixes. [SCSI] bfa: Serialize the IOC hw semaphore unlock logic. [SCSI] bfa: Modify ISR to process pending completions [SCSI] bfa: Add fc host issue lip support [SCSI] mpt2sas: remove extraneous sas_log_info messages [SCSI] libfc: fcoe_transport_create fails in single-CPU environment [SCSI] fcoe: reduce contention for fcoe_rx_list lock [v2] ...
| * | [SCSI] ipr: Driver version 2.5.3Brian King2012-03-281-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] ipr: Increase alignment boundary of command blocksBrian King2012-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latest generation of ipr hardware performs best when command blocks are aligned to a boundary equal to the size of the command block. Ensure 512 byte alignment, since this is the largest size command block we can send. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] ipr: Increase max concurrent oustanding commandsBrian King2012-03-282-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Increase the total number of max concurrent outstanding commands for the most recent family of adapters in order to improve overall adapter performance. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] ipr: Remove unnecessary memory barriersBrian King2012-03-281-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ipr driver added some memory barriers in order to ensure a PowerPC sync instruction was executed prior to sending a command to the adapter to ensure the command block was coherent with respect to the PCI bus's view of memory. However, some time ago, the powerpc architecture writel macros were changed to include the sync since most drivers don't properly handle this. So remove these memory barriers since they are not needed and result in executing twice as many sync instructions, which has a significant performance penalty. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] ipr: Remove unnecessary interrupt clearing on new adaptersBrian King2012-03-282-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | The latest ipr hardware no longer requires the driver to issue any MMIOs to clear the interrupt so remove this to optimize performance. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] ipr: Fix target id allocation re-use problemBrian King2012-03-281-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the latest ipr SAS adapters, target id's are a completely logical construct that are managed in the ipr driver. This fixes an issue that can arise if a device is deleted via sysfs. If a new device is then physically added, it will use the previous device's target id. If the host is then rescanned, the device that had been deleted, since it is using the same target id as the new device is using, will never be found, resulting in a missing device. Fix this by only freeing the target id only if the resource is actually gone. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] atp870u, mpt2sas, qla4xxx use pci_dev->revisionSergei Shtylyov2012-03-284-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | commit 44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (PCI: Change all drivers to use pci_device->revision) converted all drivers to use pci_dev->revision. Convert these three drivers which got missed. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] fcoe: Drop the rtnl_mutex before calling fcoe_ctlr_link_upRobert Love2012-03-281-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rtnl_lock is primarily used to serialize networking driver changes as well as to ensure that a networking driver is not removed when making changes to it. fcoe also uses the rtnl_lock to protect the fcoe hostlist. fcoe_create holds the rtnl_lock over the entirity of the routine including a the call to fcoe_ctlr_link_up. This causes the below deadlock because fcoe_ctlr_link_up acquires the fcoe_ctlr ctlr_mutex and this deadlocks with a libfcoe thread that acquires the fcoe_ctlr ctlr_mutex and then the rtnl_lock (to update a MAC address). This patch drops the rtnl_lock before calling fcoe_ctlr_link_up and therefore the deadlock is prevented. https://bugzilla.kernel.org/show_bug.cgi?id=42918 the existing dependency chain (in reverse order) is: -> #1 (&fip->ctlr_mutex){+.+...}: [<c1091f70>] lock_acquire+0x80/0x1b0 [<c147655d>] mutex_lock_nested+0x6d/0x340 [<f8970c32>] fcoe_ctlr_link_up+0x22/0x180 [libfcoe] [<f894620e>] fcoe_create+0x47e/0x6e0 [fcoe] [<f8973dd3>] fcoe_transport_create+0x143/0x250 [libfcoe] [<c10527e0>] param_attr_store+0x30/0x60 [<c1052696>] module_attr_store+0x26/0x40 [<c11a201e>] sysfs_write_file+0xae/0x100 [<c11449df>] vfs_write+0x8f/0x160 [<c1144cbd>] sys_write+0x3d/0x70 [<c147a0c4>] syscall_call+0x7/0xb -> #0 (rtnl_mutex){+.+.+.}: [<c109164b>] __lock_acquire+0x140b/0x1720 [<c1091f70>] lock_acquire+0x80/0x1b0 [<c147655d>] mutex_lock_nested+0x6d/0x340 [<c13a10c4>] rtnl_lock+0x14/0x20 [<f89445ac>] fcoe_update_src_mac+0x2c/0xb0 [fcoe] [<f8971712>] fcoe_ctlr_timer_work+0x712/0xb60 [libfcoe] [<c104fb69>] process_one_work+0x179/0x5d0 [<c10502f1>] worker_thread+0x121/0x2d0 [<c10550ed>] kthread+0x7d/0x90 [<c1481a82>] kernel_thread_helper+0x6/0x10 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&fip->ctlr_mutex); lock(rtnl_mutex); lock(&fip->ctlr_mutex); lock(rtnl_mutex); *** DEADLOCK *** Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] bfa: Update the driver version to 3.0.23.0Krishna Gudipati2012-03-281-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] bfa: BSG and User interface fixes.Krishna Gudipati2012-03-284-22/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made changes to set the rport maxfrsize param to use a value that is equal to or less than the Buffer-to-Buffer Receive Data_Field size specified in the Common Service Parameters. Increased the diag memtest timeout for the Brocade-1860 adapters. Made changes to enable valid port speed configuration check for all adapters. Made changes to increase the max hw segments in a request, in order to support larger data transfers from user space. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario.Krishna Gudipati2012-03-283-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the LPS (Logical Port Services) state machine to send a FDISC/FLOGI to the FW from the request queue wait state, when there is space available again on the request queue. Made changes to free the vport on LOGO/cleanup complete instead of free'ing it from vport_delete_handler in the module unload scenario. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] bfa: Move service parameter programming logic into firmware.Krishna Gudipati2012-03-281-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | Programming of the service parameters Tx credits etc., is now done in firmware. Remove the logic of sending the service parameters to firmware from driver. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] bfa: Revised Fabric Assigned Address(FAA) feature implementation.Krishna Gudipati2012-03-2810-380/+525
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made changes to the Fabric Assigned Address(FAA) feature implementation. Introduced the IOCFC state machine, which now handles the FAA logic, IOC and BFA sub-modules enablement. Removed un-wanted FAA enable/disable routines; FAA is enabled by default. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] bfa: Flash controller IOC pll init fixes.Krishna Gudipati2012-03-282-45/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made changes to resume the flash controller if it is halted before going ahead with flash controller pause/resume logic. Made changes to avoid clearing off the interrupts during the initial pll initialization. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] bfa: Serialize the IOC hw semaphore unlock logic.Krishna Gudipati2012-03-281-12/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | Made changes to ensure only the function that comes first will execute the IOC hw semaphore unlock logic. Used IOC init sem register to serialize execution of the unlock logic. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] bfa: Modify ISR to process pending completionsKrishna Gudipati2012-03-281-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | Made changes to the driver ISR to process any pending completions even if the RME bit is not set in the interrupt status register. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] bfa: Add fc host issue lip supportKrishna Gudipati2012-03-281-1/+38
| | | | | | | | | | | | | | | Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] mpt2sas: remove extraneous sas_log_info messagesSathisha Nanjappa2012-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix ensures that the IOP_LOGINFO_CODE_TASK_TERMINATED messages do not clutter the sas_log_info messages. Bugzilla 42142 - mpt2sas: Number specified in wrong base https://bugzilla.kernel.org/show_bug.cgi?id=42142 Signed-off-by: Sathisha Nanjappa <sathisha.nanjappa@hp.com> Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] libfc: fcoe_transport_create fails in single-CPU environmentSteven Clark2012-03-281-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting fcoe fails at fcoe_transport_create when attempting to allocate a pool of 4K exchanges on a 64-bit single-CPU environment because the call to __alloc_percpu() is greater than the max of 32K. This patch reduces the number of exchanges to fit within the maximum allowed space. [ Whitespace problems fixed by Robert Love to satisfy chechpatch.pl ] Signed-off-by: Steven Clark <sclark@crossbeam.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] fcoe: reduce contention for fcoe_rx_list lock [v2]Neil Horman2012-03-281-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is potentially lots of contention for the rx_list_lock. On a cpu that is receiving lots of fcoe traffic, the softirq context has to add and release the lock for every frame it receives, as does the receiving per-cpu thread. We can reduce this contention somewhat by altering the per-cpu threads loop such that when traffic is detected on the fcoe_rx_list, we splice it to a temporary list. In this way, we can process multiple skbs while only having to acquire and release the fcoe_rx_list lock once. [ Braces around single statement while loop removed by Robert Love to satisfy checkpath.pl. ] Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] fcoe: remove frame dropping code from fcoe_percpu_cleanNeil Horman2012-03-281-19/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit e7a51997dad4e17395be1209970e18d2e9305b24 ([SCSI] fcoe: flush per-cpu thread work when destroying interface) added a skb flush to the fcoe_rx_list, which ensures that we push any pending frames on the list through the per-cpu receive thread. Because of this, its redundant to lock and scan the list first, dropping any arriving frames. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] bnx2fc: Remove bh disable in softirq contextNeil Horman2012-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As with the fcoe sw transport, the bnx2fc packet handler function runs only in softirq context. Theres no need to disable bottom halves here Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] foce: remove bh disable from fcoe sw transport rcv functionNeil Horman2012-03-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fcoe sw recive packet function (fcoe_rcv) only ever executes in softirq context. Given that, and the fact that no use of the fcoe_rx_list is made in irq context, its not necessecary to disable bottom halves while actually receiving the frame. Convert spin_*_bh calls in that function to their lock-only equivalents Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] libfcoe: Support extra MAC descriptor to be used as FCoE MACBhanu Prakash Gollapudi2012-03-281-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some switch implementations (eg., HP virtual connect FlexFabric) send two MAC descriptors in FIP FLOGI response, with first MAC descriptor (granted_mac) used as FPMA, and the second one (fcoe_mac) used as destination address for sending/receiving FCoE packets. fip_mac continues to be used for FIP traffic. This patch introduces fcoe_mac in fcoe_fcf structure. For regular switches, both fcoe_mac and fip_mac will be the same. For the switches that send additional MAC descriptor, fcoe_mac is updated. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] libfc: update fc_host mfs along with updating lport->mfsVasu Dev2012-03-281-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently fc_host mfs is not getting updated in case its changed during FLOGI and that leaves fc_host to show its initial old value in sysfs, so instead have fc_host mfs updated along with updating lport mfs during FLOGI. Also in case of bad mfs during flogi, error out instead of continuing with flogi. [ Changes made by Robert Love: condition to '>=' and added printing of lport->mfs in DBG statement. FLOGI resp processing failed without being able to compare FCoE MFS 2112 against an incoming MFS of 2112 ] Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] libfcoe: Do not sends FDISCs before FLOGI during CVLBhanu Prakash Gollapudi2012-03-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When handling CVL with no Vx port descriptors, lports for NPIV ports are reset before issuing the ctlr_reset. This causes FDISCs to be issued before successful FLOGI. Fix it by resetting the controller before resetting the lports. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] fcoe: Ensure fcoe_recv_frame is always called in process contextNeil Horman2012-03-281-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 859b7b649ab58ee5cbfb761491317d5b315c1b0f introduced the ability to call fcoe_recv_frame in softirq context. While this is beneficial to performance, its not safe to do, as it breaks the serialization of access to the lport structure (i.e. when an fcoe interface is being torn down, theres no way to serialize the teardown effort with the completion of receieve operations occuring in softirq context. As a result, lport (and other) data structures can be read and modified in parallel leading to corruption. Most notable is the vport list, which is protected by a mutex, that will cause a panic if a softirq receive while said mutex is locked. Additionaly, the ema_list, discussed here: http://lists.open-fcoe.org/pipermail/devel/2012-February/011947.html Can be corrupted if a list traversal occurs in softirq context at the same time as a list delete in process context. And generally the lport state variables will not be stable, and may lead to unpredictable results. The most direct fix is to remove the bits from the above commit that allowed fcoe_recv_frame to be called in softirq context. We just force all frames to be handled by the per-cpu rx threads. This will allow the fcoe_if_destroy's use of fcoe_percpu_clean to function properly, ensuring that no frames are being received while the lport is being torn down. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Reviewed-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] pm8001: Use spin_lock_irqsave() for task_state.Santosh Nayak2012-03-281-8/+10
| | | | | | | | | | | | | | | | | | Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] vmw_pvscsi: Try setting host->max_id as suggested by the device.Arvind Kumar2012-03-272-25/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fetch the config page from the device to learn max target id to set host->max_id. Also, fix some indentation issues and update the 'Maintained by' field. Signed-off-by: Arvind Kumar <arvindkumar@vmware.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] scsi_debug: Fix incorrect page length in logical block provisioning VPDMartin K. Petersen2012-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The page length for the 0xb2 VPD page is defined to be 4 bytes when no provisioning descriptors are provided (DP=0). Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] scsi_debug: add LBPRZ supportEric Sandeen2012-03-271-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add LBPRZ support to scsi_debug; i.e. read zeros for unmapped blocks. Rather than checking for unmapped blocks at read time, this just zeroes them on the backing store at unmap time so it behaves the same way. This also adds a module parameter to disable it. lbprz, "unmapped blocks return 0 on read (def=1)" [jejb: fix whitespace errors] Signed-off-by: Eric Sandeen <sandeen@redhat.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] iscsi class: fix gfp use in ping compl and host eventMike Christie2012-03-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a ping or host event were to occur when memory is low we do not want to use GFP_KERNEL, because the paths sending them cannot block for data to be written. These paths might be needed to recover write paths. Use GFP_NOIO instead. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] bfa: Fix endian bug in bfad_iocmd_debug_fw_core().Santosh Nayak2012-03-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Casting pointer from native data type to other type is endian-sensitive. "iocmd->offset" is 64 bit but we use only first 32 bit. It works in little-endian system but in big-endian system it will break. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] qla4xxx: Update driver version to 5.02.00-k16Vikas Chaudhary2012-03-271-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] iscsi_transport: Added error status code for ping comp eventVikas Chaudhary2012-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defined error codes for ping completion status. This patch take care of Mike Christie's commets Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] qla4xxx: assign correct address for iscsi_cls_hostVikas Chaudhary2012-03-271-2/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] st: expand ability to write immediate filemarksLee Duncan2012-03-272-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The st tape driver recently added the MTWEOFI ioctl, which writes a tape filemark (EOF), like the MTWEOF ioctl, except that MTWEOFI returns immediately. This makes certain applications, like backup software, run much more quickly on buffered tape drives. Since legacy applications do not know about this new MTWEOFI ioctl, this patch adds a new ioctl option that tells the st driver to return immediately when writing an EOF (i.e. a filemark). This new flag is much like the existing flag that tells the st driver to perform writes (and certain other IOs) immediately, but this new flag only applies to writing EOFs. This new feature is controlled via the MTSETDRVBUFFER ioctl, using the newly-defined MT_ST_NOWAIT_EOF flag. Use of this new feature is displayed via the sysfs tape "options" attribute. The st documentation was updated to mention this new flag, as well as the problems that can occur from using it. Signed-off-by: Lee Duncan <lduncan@suse.com> Acked-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.30: Update lpfc to version 8.3.30James Smart2012-03-271-1/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.30: Revert fix for Link Pull Causes I/O FailuresJames Smart2012-03-272-10/+0
| | | | | | | | | | | | | | | | | | Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.30: Added more T10 DIF debugfs error injectionJames Smart2012-03-273-60/+180
| | | | | | | | | | | | | | | | | | Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.30: Update copyright date for files modified in 2012James Smart2012-03-274-4/+4
| | | | | | | | | | | | | | | | | | Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.30: Fix handling of REG_VFI and cable pull.James Smart2012-03-271-1/+8
| | | | | | | | | | | | | | | | | | Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.30: Enhancements for T10 DIF debugfs error injectionJames Smart2012-03-273-148/+203
| | | | | | | | | | | | | | | | | | Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.30: Change default DA_ID support from disabled to enabledJames Smart2012-03-271-1/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.30: Flush reset register writeJames Smart2012-03-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Used PCI configure space read to flush PCI function reset register write Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | [SCSI] lpfc 8.3.30: Update copyright date for files modified in 2012James Smart2012-03-278-8/+8
| | | | | | | | | | | | | | | | | | Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
OpenPOWER on IntegriCloud