summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-05-01[SCSI] ipr: increase the dump size for 64 bit adaptersKleber Sacilotto de Souza2-21/+75
Currently the size of the dump generated by the driver is limited in 4MB, which is insufficient to gather much useful data from the new 64 bit adapters. This patch makes the needed changes to increase the dump limit for the 64 bit adapters to 32MB, or even to a bigger value in the future, but keeping the current limitations for the legacy 32 bit adapters. Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] mvsas: add support for Task collector mode and fixed relative bugsXiangliang Yu11-152/+294
1. Add support for Task collector mode. 2. Fixed relative collector mode bug: - I/O failed when disks is on two ports - system hang when hotplug disk - system hang when unplug disk during run IO 3. Unlock ap->lock within .lldd_execute_task for direct mode to improve performance Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] mvsas: add support for Marvell 88SE9445/88SE9485Xiangliang Yu2-0/+22
This is support for Marvell 88SE9445/88SE9485 SAS/SATA HBA, which is based on Marvell 88SE9480. Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] scsi_dh_alua: Attach to UNAVAILABLE/OFFLINE AAS devicesMartin George1-1/+1
The SCSI ALUA handler currently fails to attach to devices reporting an UNAVAILABLE/OFFLINE AAS. But given that an UNAVAILABLE/OFFLINE AAS can transition to other states like ACTIVE/OPTIMIZED, ACTIVE/NON-OPTIMIZED, etc. as per SPC4, this ALUA handler behavior should be rectified so as to attach to devices which also report an UNAVAILABLE/OFFLINE AAS. Signed-off-by: Martin George <marting@netapp.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] mptfusion: Bump version 3.4.19Kashyap, Desai1-2/+2
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] mptfusion: Adding inline data padding support for TAPE drive.Kashyap, Desai1-0/+22
Adding support for inline data padding for TAPE drive when running U320. [jejb: whitespace fixes] Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] mptfusion: Remove debug print from mptscsih_qcmd()Kashyap, Desai1-4/+1
Remove debug print from mptscsih_qcmd function call. This debug print cause flood of prints and difficult to debug other issues. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] bnx2fc: increase cleanup wait timeNithin Nayak Sujir1-1/+1
FW may take more time cleaning up IOs issued to multiple targets. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] bnx2fc: Do not use HBA_DBG macro when lport is not availableNithin Nayak Sujir1-1/+1
Use MISC_DBG instead. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] bnx2fc: call scsi_done if session goes to not ready from readyNithin Nayak Sujir1-0/+6
If the session is not ready yet, we ask the SCSI-ml to retry. However, if the session is just uploaded, we should not retry, but instead call scsi_done to fail the IO. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] bnx2fc: Release the reference to hba only after the interface is ↵Nithin Nayak Sujir1-2/+2
destroyed Prematurely decrementing the reference may lead to cmd_mgr becoming NULL with the cmds are still active. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] scsi_transport_fc: Fix deadlock during fc_remove_hostNithin Nayak Sujir1-6/+5
Creating and destroying fcoe interface in a tight loop leads to a system deadlock with the following call traces: Call Trace: [<ffffffff814f4b3d>] schedule_timeout+0x1fd/0x2c0 [<ffffffff814f469f>] ? wait_for_common+0x4f/0x190 [<ffffffff814f469f>] ? wait_for_common+0x4f/0x190 [<ffffffff814f4737>] wait_for_common+0xe7/0x190 [<ffffffff81042fa0>] ? default_wake_function+0x0/0x20 [<ffffffff81082c2d>] ? trace_hardirqs_on+0xd/0x10 [<ffffffff814f48bd>] wait_for_completion+0x1d/0x20 [<ffffffff81066d90>] flush_workqueue+0x290/0x5f0 [<ffffffff81066b00>] ? flush_workqueue+0x0/0x5f0 [<ffffffff81067148>] destroy_workqueue+0x38/0x340 [<ffffffffa0260289>] fc_remove_host+0x1b9/0x1f0 [scsi_transport_fc] [<ffffffffa02ed195>] bnx2fc_if_destroy+0xc5/0x1f0 [bnx2fc] [<ffffffffa02ed33a>] bnx2fc_destroy+0x7a/0x100 [bnx2fc] [<ffffffffa02c789b>] fcoe_transport_destroy+0x9b/0x1b0 [libfcoe] [<ffffffff81069ec2>] param_attr_store+0x52/0x80 [<ffffffff81069976>] module_attr_store+0x26/0x30 [<ffffffff8119e726>] sysfs_write_file+0xe6/0x170 [<ffffffff81134710>] vfs_write+0xd0/0x1a0 [<ffffffff811348e4>] sys_write+0x54/0xa0 [<ffffffff81002e02>] system_call_fastpath+0x16/0x1b Call Trace: [<ffffffff81074865>] async_synchronize_cookie_domain+0x75/0x120 [<ffffffff8106caa0>] ? autoremove_wake_function+0x0/0x40 [<ffffffff81074925>] async_synchronize_cookie+0x15/0x20 [<ffffffff8107494c>] async_synchronize_full+0x1c/0x40 [<ffffffffa0057466>] sd_remove+0x36/0xc0 [sd_mod] [<ffffffff81358a75>] __device_release_driver+0x75/0xe0 [<ffffffff81358bef>] device_release_driver+0x2f/0x50 [<ffffffff81357aee>] bus_remove_device+0xbe/0x120 [<ffffffff813553ef>] device_del+0x12f/0x1e0 [<ffffffff8137454d>] __scsi_remove_device+0xbd/0xc0 [<ffffffff81374585>] scsi_remove_device+0x35/0x50 [<ffffffff813746a7>] __scsi_remove_target+0xe7/0x110 [<ffffffff81374730>] ? __remove_child+0x0/0x30 [<ffffffff81374753>] __remove_child+0x23/0x30 [<ffffffff81354a2c>] device_for_each_child+0x4c/0x80 [<ffffffff81374703>] scsi_remove_target+0x33/0x60 [<ffffffffa02622c6>] fc_starget_delete+0x26/0x30 [scsi_transport_fc] [<ffffffffa026271a>] fc_rport_final_delete+0xaa/0x200 [scsi_transport_fc] [<ffffffff8106585a>] process_one_work+0x1aa/0x540 [<ffffffff810657eb>] ? process_one_work+0x13b/0x540 [<ffffffffa0262670>] ? fc_rport_final_delete+0x0/0x200 [scsi_transport_fc] [<ffffffff81067ac9>] worker_thread+0x179/0x410 [<ffffffff81067950>] ? worker_thread+0x0/0x410 [<ffffffff8106c546>] kthread+0xb6/0xc0 [<ffffffff8103879b>] ? finish_task_switch+0x4b/0xe0 [<ffffffff81003ca4>] kernel_thread_helper+0x4/0x10 [<ffffffff814f7994>] ? restore_args+0x0/0x30 [<ffffffff8106c490>] ? kthread+0x0/0xc0 [<ffffffff81003ca0>] ? kernel_thread_helper+0x0/0x10 fc_remove_host() waits for flushing the workqueue, but it is stuck at flushing the first work. The first work doesnt complete, because it is waiting for async layer to complete the IOs. The async layer cannot complete the IO as the terminate_rport_io for the second work was not called, which will be called only when the first work completes. Hence the deadlock. To resolve this deadlock, the workqueue allocation has been modified from create_singlethread_workqueue() to alloc_workqueue(). In addition, fc_terminate_rport_io() should be called before the scsi_flush_work() to avoid the similar deadlock as above. scsi fc alloc queue. move terminate rport io before flush Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] lpfc 8.3.23: Update driver version to 8.3.23James Smart1-1/+1
Update driver version to 8.3.22 Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] lpfc 8.3.23: BSG additions and fixesJames Smart2-25/+164
- Fixed the mixed declarations and codes which violate ISO C90 (declarations in subsections that assign at declaration) - Add BSG data transfer size protection in mailbox command pass-through path - Invoke BSG job_done while holding spinlock to fix deadlock - Added support for checking SLI_CONFIG subcommands - Fixed bug in BSG mailbox size check to non-embedded external buffer Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] lpfc 8.3.23: Fixes related to new hardwareJames Smart4-20/+48
Fixes related to new hardware - Restrict driver to look at BAR2 or BAR4 only for if_type 0. - Allow SLI4 with FCOE_MODE not set for new SLI4 FC adapters. - Add Temporary RPI field to the ELS request WQE. - Do not override CT field in issue_els_flogi for SLI4 IF type 2 - For RQ_CREATE_V2 mbx cmd: fill in the rqe_size and page_size for RQ_CREATE. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] lpfc 8.3.23: Miscellaneous fixesJames Smart6-14/+39
Miscellaneous fixes - Do not limit RPI Count to a minimum of 64 - Fix FCFI incorrect on received unsolicited frames. - Save the FCFI returned in the REG_FCFI mailbox command if it was successful. - Fixed Vports not sending FDISC after lips. - Align based on the SLI4_PAGE_SIZE. - Fixed double byte swap on received RRQ. - Fixed mask size for the wq_id mask from 0x7F to 0x7FFF. - Clear FC_FABRIC flag when NPIV LOGO completes (and add a log message). - Modified driver to skip round robin only when ulpStatus==LOCAL_REJECT and word4=SEQUENCE_TIMEOUT to prevent FLOGI to disconnected FCF. - Don't add rport if driver unloading Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] lpfc 8.3.23: Debugfs enhancementsJames Smart3-222/+759
Debugfs enhancements - Added iDiag support for new adapters. - Added queue entry access methods. - Fix host/port index in decimal - Added Doorbell register access methods. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] bfa: Move debugfs initialization before bfa init.Krishna Gudipati2-28/+27
Move the initialization of debugfs before bfa init, to enable us to collect driver/firmware traces if init fails. Also add a printk to display message on bfa_init failure. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] bfa: firmware download fixJing Huang2-35/+29
This patch includes fixes for two issues releated to firmware download implementation: 1) Merged memory leak fix provided by Jesper Juhl <jj@chaosbits.net>. Basically we need to call release_firmware() after request_firmware(). 2) fixed issues with the firmware download interface as pointed out by Rolf Eike Beer <eike@sf-mail.de> in linux-scsi. Rearranged the code and fixed related function protypes. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] ipr: improve interrupt service routine performanceWayne Boyer1-29/+39
During performance testing on P7 machines it was observed that the interrupt service routine was doing unnecessary MMIO operations. This patch rearranges the logic of the routine and moves some of the code out of the main routine. The result is that there are now fewer MMIO operations in the performance path of the code. As a result of the above change, an existing condition was exposed where the driver could get an "unexpected" hrrq interrupt. The original code would flag the interrupt as unexpected and then reset the adapter. After further analysis it was confirmed that this condition can occasionally occur and that the interrupt can safely be ignored. Additional code in this patch detects this condition, clears the interrupt and allows the driver to continue without resetting the adapter. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] scsi_dh_rdac : decide whether to send mode select based on operating modeMoger, Babu1-1/+16
Based on the operating modes, handler decides whether to send mode select or not. Purpose here is to reduce io-shipping as much as possible whenever there is an option. Signed-off-by: Babu Moger <babu.moger@lsi.com> Reviewed-by: Yanling Qi <yanling.qi@lsi.com> Reviewed-by: Sudhir Dachepalli <Sudhir.Dachepalli@lis.com> Reviewed-by: Somasundaram Krishnasamy <Somasundaram.Krishnasamy@lsi.com> Reviewed-by: Bob Stankey <Robert.Stankey@lsi.com> Reviewed-by: Vijay Chauhan <Vijay.Chauhan@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] scsi_dh_rdac : Detect the different RDAC operating modesMoger, Babu1-13/+20
This patch detects different operating RDAC modes during the discovery. It also collects the information about the preferred path. Signed-off-by: Babu Moger <babu.moger@lsi.com> Reviewed-by: Yanling Qi <yanling.qi@lsi.com> Reviewed-by: Sudhir Dachepalli <Sudhir.Dachepalli@lis.com> Reviewed-by: Somasundaram Krishnasamy <Somasundaram.Krishnasamy@lsi.com> Reviewed-by: Bob Stankey <Robert.Stankey@lsi.com> Reviewed-by: Vijay Chauhan <Vijay.Chauhan@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] scsi_dh_rdac : Add definitions for different RDAC operating modesMoger, Babu1-3/+19
This patch adds definitions to support for different operating modes for LSI rdac storage. Currently, rdac support 3 operation modes. 1. RDAC mode(legacy) 2. AVT mode 3. IOSHIP mode These definitions are used while activating the path(rdac_activate). Signed-off-by: Babu Moger <babu.moger@lsi.com> Reviewed-by: Yanling Qi <yanling.qi@lsi.com> Reviewed-by: Sudhir Dachepalli <Sudhir.Dachepalli@lis.com> Reviewed-by: Somasundaram Krishnasamy <Somasundaram.Krishnasamy@lsi.com> Reviewed-by: Bob Stankey <Robert.Stankey@lsi.com> Reviewed-by: Vijay Chauhan <Vijay.Chauhan@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] ipr: remove unneeded volatile declarationsWayne Boyer1-3/+3
This patch removes three volatile declarations based on some feedback and code analysis. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] mpt2sas : WarpDrive New product SSS6200 support addedKashyap, Desai5-74/+637
This patch has Support for the new solid state device product SSS6200 from LSI and relavent features w.r.t SSS6200. The major feature added in this driver is supporting Direct-I/O to the SSS6200 storage.There are some additional changes done to avoid exposing the RAID member disks to the OS and hiding/exposing drives based on the OEM Specific Flag in Manufacturing Page10 (this is required to handle specific changes in the SSS6200 firmware). Each and every changes are listed below. 1. Hiding IR related messages. For SSS6200, the driver is modified not to print IR related events. Even if the debugging is enabled the IR related messages will not be displayed. In some places if there is a need to display a message related to IR the string "IR" is replaced with string "DD" and the string "volume" is replaced with "direct drive". But the function names are not changed hence there are some places where the reference to volume can be seen if debug level is set. 2. Removed RAID transport support In Linux the user can retrieve RAID volume information from the sysfs directory. This support is removed for SSS6200. 3. Direct I/O support. The driver tries to enable direct I/O when a volume is reported to the driver by the firmware through IRCC events and the driver does this just before reporting to the OS, hence all the OS issued I/O can go through direct path if they can, The first validation is to see whether the manufacturing page10 flag is set to expose all drives always. If that is set, the driver will not enable direct I/O and displays the message "DDIO" is disabled globally as drives are exposed. The driver checks whether there is more than one volume in the controller, if so the direct I/O will be disabled globally for all volumes in the controller and the message displayed will be "DDIO is disabled globally as number of drives > 1. If retrieving number of PD is failed the driver will not enable direct I/O and displays the message Failure in computing number of drives DDIO disabled. If memory allocation for RAIDVolumePage0 is failed, the driver will not enable direct I/O and displays the message Memory allocation failure for RVPG0 DDIO disabled. If retrieving RAIDVolumePage0 is failed the driver will not enable direct I/O and displays the message Failure in retrieving RVPG0 DDIO disabled If the number of PD in a volume is greater than 8, then the direct I/O will be disabled. If any of individual drives handle retrieval is failed then the DD-IO will be disabled. If the volume is not RAID0 or if the block size is not 512 then the DD-IO will be disabled. If the volume size is greater than 2TB then the DD-IO will be disabled. If the driver is not able to find a valid stripe exponent using the configured stripe size then the DD-IO will be disabled When the DD-IO is enabled the driver will check every I/O request issued to the storage and checks whether the request is either READ6/WRITE6/READ10/WRITE10, if it is and if the complete I/O transfer is within a stripe size then the I/O is redirected to the drive directly instead of the volume. On completion of every I/O, if the completion is failure means if the reply is address reply with a reply frame associated with it, then the type of I/O will be checked, if the I/O is direct then the I/O will be retried to the volume once. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Reviewed-by: Eric Moore <eric.moore@lsi.com> Reviewed-by: Sathya Prakash <sathya.prakash@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] fusion: do not check serial_number in the abort handlerChristoph Hellwig1-5/+3
The SCSI midlayer stops all command processing when in error handling, which means there is no chance for command reuse when the abort handler is called. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] mpt2sas: do not check serial_number in the abort handlerChristoph Hellwig1-2/+1
The SCSI midlayer stops all command processing when in error handling, which means there is no chance for command reuse when the abort handler is called. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: "Moore, Eric" <Eric.Moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] usb-storage: do not increment cmd->serial_numberChristoph Hellwig1-1/+0
The isd200 sub-driver increments the command serial number despite not using it at all in it's routine for sending internal scsi commands. Remove the increment to prepare for removing the serial_number field. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] remove cmd->serial_number litterChristoph Hellwig17-286/+255
Stop using cmd->serial_number in printks. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] fcoe: have fcoe log off and lport destroy before ndo_fcoe_disableVasu Dev1-71/+60
Currently fcoe interface cleanup is done after ndo_fcoe_disable and that prevents logoff going out to the peer, so this patch moves all netdev cleanup and its releasing inside fcoe_interface_cleanup to have log off before ndo_fcoe_disable disables the fcoe. This patch also fixes asymmetric rtnl locking around fcoe_if_destroy, as currently this function requires rtnl held by its caller and then have this func drops the lock, instead now don't have any processing under rtnl inside fcoe_if_destroy, this required moving few func to get build working again. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] libfc: rec tov value and REC_TOV_CONST units usages is incorrectVasu Dev1-23/+9
Added REC_TOV_CONST intent was to have rec tov as e_d_tov + 1s but currently it is e_d_tov + 1ms since e_d_tov is stored in ms unit. Also returned rec tov by get_fsp_rec_tov is in ms and this ms tov is used as-is with fc_fcp_timer_set expecting jiffies tov. Fixed this by having get_fsp_rec_tov return rec tov in jiffies as e_d_tov + 1s and then use jiffies tov w/ fc_fcp_timer_set. Also some cleanup, no need to cache get_fsp_rec_tov return value in local rec_tov at various places. 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 <James.Bottomley@suse.de>
2011-05-01[SCSI] libfc: remove duplicate ema_list initVasu Dev1-1/+0
As ema_list is already initialized by libfc_host_alloc. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] libfcoe: fix wrong comment in fcoe_transport_detachYi Zou1-1/+1
fix typo of '_attach' -> '_detach' in the comment. Reported-by: Frank Zhang <frank_1.zhang@intel.com> Signed-off-by: Yi Zou <yi.zou@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 <James.Bottomley@suse.de>
2011-05-01[SCSI] libfcoe: fix possible buffer overflow in fcoe_transport_showYi Zou1-2/+2
possible buffer overflow in fcoe_transport_show when reaching the end of buffer and crossing PAGE_SIZE boundary. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Tomas Henzl <thenzl@redhat.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 <James.Bottomley@suse.de>
2011-05-01[SCSI] libfcoe: clean up netdev mapping properly when the transport goes awayYi Zou1-0/+14
When rmmoving the underlying fcoe transport driver module by force when it's attached and in use, the correspoding netdev mapping should be cleaned up properly as well, otherwise the lookup for a given netdev for the transport would still return non NULL pointer, causing "unable to handle paging request" bug. Signed-off-by: Yi Zou <yi.zou@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 <James.Bottomley@suse.de>
2011-05-01[SCSI] libfc: Move host_lock usage into ramp_up/down routinesRobert Love1-10/+15
The host_lock is still used to protect the can_queue value in the Scsi_Host, but it doesn't need to be held and released by each caller. This patch moves the lock usage into the fc_fcp_can_queue_ramp_up and fc_fcp_can_queue_ramp_down routines. Signed-off-by: Robert Love <robert.w.love@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] esp, scsi_tgt_lib, fcoe: use list_move() instead of ↵Kirill A. Shutemov3-12/+6
list_del()/list_add() combination Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] fcoe: remove unnecessary module state checkYi Zou1-47/+0
The check of module state being MODULE_STATE_LIVE is no longer needed for the individual fcoe transport driver, e.g., fcoe.ko, as sysfs entries now go to libfcoe now, if it reaches fcoe.ko, it has to be already registered. The module state check for libfcoe will guard the possible race condition of sysfs being writable before module_init function is called and after module_exit. Signed-off-by: Yi Zou <yi.zou@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 <James.Bottomley@suse.de>
2011-05-01[SCSI] fcoe: Remove mutex_trylock/restart_syscall checksRobert Love1-20/+4
These checks were initially added to avoid a lockdep false positive when dealing with the s_active, rtnl and fcoe_config_mutex mutexes. Recently the create, destroy, enable and disable sysfs entries were moved from fcoe.ko to libfcoe.ko. With this change the mutex usage was shuffled around and the lockdep false positive stopped happening. We can now remove these checks. Signed-off-by: Robert Love <robert.w.love@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] libfcoe: Remove mutex_trylock/restart_syscall checksRobert Love1-25/+11
This code was incorrectly ported from fcoe.c when the fcoe transport infrastructure was put into place. It was originally needed in fcoe.c when dealing with the rtnl mutex. In that code it was only needed to avoid a lockdep false positive. In libfcoe we don't deal with the rtnl mutex, we don't get the lockdep false positive and therefore we don't need these checks. Signed-off-by: Robert Love <robert.w.love@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] bnx2fc: introduce missing kfreeJulia Lawall1-0/+3
Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] ipr: fix synchronous request flags for better performanceWayne Boyer2-2/+3
In testing it was noticed that Extended Delay after Reset flag was being set for gscsi and volume set devices. This had a negative effect on performance for volume sets. The fix is to only set the flag for gscsi devices. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] qla2xxx: Update version number to 8.03.07.03-k.Madhuranath Iyengar1-2/+2
A minor change in the versioning. We'll be attaching the "-k" in the end. Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] qla2xxx: Log fcport state transitions when debug messages are enabled.Chad Dupuis6-8/+35
Add the inline function qla2x00_set_port_state() so that when a fcport state transition happens we can log the state transition if debug messages are enabled. Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] qla2xxx: Verify login-state has transitioned to PRLI-completed.Andrew Vasquez2-5/+23
Before driver's own internal state is marked as PLOGI/PRLI complete. This additional check closes a window seen with dual-personality initiator/target devices where a driver's PLOGI/PRLI request occurs within the window after the target's PLOGI request has completed, but prior to the target's PRLI arriving and processed by the firmware. Without this additional check, the firmware will return port-information stating that the port neither supports target nor initiator functions, causing the driver to register the rport prematurely to the FC-transport without the proper 'roles' being set. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] qla2xxx: Limit the logs in case device state does not change for ISP82xx.Giridhar Malavali1-4/+14
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] qla2xxx: Add the ql2xdontresethba module_param.Giridhar Malavali3-0/+10
Also, change the ISP82xx code to only reset if this module_param is set and reset is intended via the QLA82XX_DEV_NEED_RESET case. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] qla2xxx: Display hardware/firmware registers to get more information ↵Giridhar Malavali1-0/+18
about the error for ISP82xx. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] qla2xxx: Add test for valid loop id to qla2x00_relogin().Joe Carnuccio3-3/+14
If fabric device has invalid loop id (FC_NO_LOOP_ID) then call qla2x00_find_new_loop_id() to attempt to obtain valid loop id. Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] qla2xxx: Perform FCoE context reset before trying adapter reset for ↵Giridhar Malavali2-11/+37
ISP82xx. For certain failures, try to recover first by doing FCoE context reset before attempting big hammer approach(adpater reset). Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>