- 28 Mar, 2012 25 commits
-
-
Brian King authored
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>
-
Brian King authored
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>
-
Brian King authored
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>
-
Sergei Shtylyov authored
commit 44c10138 (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>
-
Robert Love authored
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>
-
Krishna Gudipati authored
Signed-off-by:
Krishna Gudipati <kgudipat@brocade.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Krishna Gudipati authored
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>
-
Krishna Gudipati authored
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>
-
Krishna Gudipati authored
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>
-
Krishna Gudipati authored
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>
-
Krishna Gudipati authored
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>
-
Krishna Gudipati authored
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>
-
Krishna Gudipati authored
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>
-
Krishna Gudipati authored
Signed-off-by:
Krishna Gudipati <kgudipat@brocade.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sathisha Nanjappa authored
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=42142Signed-off-by:
Sathisha Nanjappa <sathisha.nanjappa@hp.com> Acked-by:
"Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Steven Clark authored
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>
-
Neil Horman authored
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>
-
Neil Horman authored
commit e7a51997 ([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>
-
Neil Horman authored
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>
-
Neil Horman authored
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>
-
Bhanu Prakash Gollapudi authored
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>
-
Vasu Dev authored
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>
-
Bhanu Prakash Gollapudi authored
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>
-
Neil Horman authored
commit 859b7b64 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>
-
Santosh Nayak authored
Signed-off-by:
Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- 27 Mar, 2012 15 commits
-
-
Arvind Kumar authored
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>
-
Martin K. Petersen authored
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>
-
Eric Sandeen authored
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>
-
Mike Christie authored
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>
-
Santosh Nayak authored
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>
-
Vikas Chaudhary authored
Signed-off-by:
Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Vikas Chaudhary authored
We don't need to pack 'struct iscsi_chap_rec' as buffer is built locally in the driver and pass to the user-space. 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>
-
Vikas Chaudhary authored
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>
-
Vikas Chaudhary authored
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>
-
Lee Duncan authored
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>
-
James Smart authored
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>
-
James Smart authored
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>
-
James Smart authored
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>
-
James Smart authored
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>
-
James Smart authored
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>
-