summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-05-10[SCSI] bnx2i: Updated version and copyright yearEddie Wai7-9/+9
Old version: 2.7.0.3 New version: 2.7.2.2 Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-10[SCSI] bnx2i: Added the setting of target can_queue via target_allocEddie Wai1-0/+1
This will set the target can_queue limit to the number of preallocated session tasks set during creation. "Could not send nopout" messages were observed without this when the iSCSI connection experiences dropped frames under heavy I/O stress. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-10[SCSI] pm8001: raise host can queueMark Salyzyn3-13/+17
This is a followup to a patch provided by Jack Wang on September 21 2011. After increasing the CAN_QUEUE to 510 in pm8001 we discovered some performance degredation from time to time. We needed to increase the MPI queue to compensate and ensure we never hit that limit. We also needed to double the margin to support event and administrivial commands that take from the pool resulting in an occasional largely unproductive command completion with soft error to the caller when the command pool is overloaded temporarily. Signed-off-by: Mark Salyzyn <mark_salyzyn@xyratex.com> Acked-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-10[SCSI] ufs: Assign UTRLBAU = upper_32_ bits(UTRLD base address)Santosh Yaraganavi1-3/+3
UTP Transfer request list base registers UTRLBA and UTRLBAU must be assigned, lower-32 and upper-32 bits of UTRLD list physical base addresses respectively. Currently UTRLBAU is being assigned lower-32 bits of UTRLD physical base address. This will cause an issue with controllers that can support 64-bit addressing. This patch correctly assigns upper-32 bits of UTRLD physical base address to UTRLBAU. Reported-by: Rene De Jong <rene.dejong@arm.com> Signed-off-by: Santosh Yaraganavi <santoshsy@gmail.com> Reviewed-by: Vinayak Holikatti <vinholikatti@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-10[SCSI] fcoe: remove a stray unlockDan Carpenter1-3/+2
We moved the locking in dd060e74fb "[SCSI] fcoe: remove frame dropping code from fcoe_percpu_clean" but this unlock was missed. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-10[SCSI] libfcoe: fix VN2VN N_Port_ID Beacon source MACYi Zou1-1/+7
FC-BB-6 v1.04 7.9.8.14 N_Port_ID Beacon: "A N_Port_ID Beacon is multicast and uses the VN_Port MAC address as source address." Currently, libfcoe is using ENode MAC, this seems ok and functionality wise not a problem in my back to back testing setup, however, just fix this to make libfcoe VN2VN support more spec compliant. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-10[SCSI] fcoe: Don't hold rtnl_mutex in fcoe_update_src_macRobert Love1-2/+0
The rtnl_mutex was held to protect calls to dev_uc_add and dev_uc_del. Holding rtnl is not required as those functions make use of the netif_addr_lock* API to protect the MAC changing. This change fixes the following regression by removing the rtnl usage when fcoe_update_src_mac is called. 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> Tested-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-10[SCSI] libfc: defer releasing master lport until complete fcoe interface ↵Vasu Dev1-2/+7
cleanuped up The fcoe controller has back references, therefore defer releasing master lport which gets freed along scsi_host_put and then free it once fcoe interface is fully cleaned. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.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>
2012-05-10[SCSI] libfc: flush lport worker after its disabledVasu Dev1-1/+1
The lport could get timeout armed while its getting disabled, so flush lport worker after its disabled and ignore lport retry in that case instead of WARN_ON. [13192.936858] WARNING: at drivers/scsi/libfc/fc_lport.c:1573 fc_lport_timeout+0x53/0xa9 [libfc]() [13192.938026] Hardware name: Bochs [13192.938620] Modules linked in: fcoe libfcoe libfc scsi_transport_fc scsi_tgt fuse 8021q garp stp llc sunrpc ipv6 uinput microcode joydev pcspkr ixgbe e1000 i2c_piix4 i2c_core virtio_balloon dca mdio virtio_blk virtio_pci virtio_ring virtio floppy [last unloaded: speedstep_lib] [13192.942589] Pid: 23605, comm: kworker/0:6 Tainted: G W 3.2.0+ #71 [13192.943587] Call Trace: [13192.944052] [<ffffffff810403f4>] warn_slowpath_common+0x85/0x9d [13192.944940] [<ffffffff81040426>] warn_slowpath_null+0x1a/0x1c [13192.945734] [<ffffffffa02746eb>] fc_lport_timeout+0x53/0xa9 [libfc] [13192.946665] [<ffffffff81058d88>] process_one_work+0x20c/0x3ad [13192.947541] [<ffffffff81058cbe>] ? process_one_work+0x142/0x3ad [13192.948423] [<ffffffffa0274698>] ? fc_lport_enter_ns+0x178/0x178 [libfc] [13192.949363] [<ffffffff8105a313>] worker_thread+0xfd/0x181 [13192.950191] [<ffffffff8105a216>] ? manage_workers.clone.15+0x173/0x173 [13192.951100] [<ffffffff8105e19b>] kthread+0xa4/0xac [13192.951755] [<ffffffff814edbb4>] kernel_thread_helper+0x4/0x10 [13192.952520] [<ffffffff814e5cb4>] ? retint_restore_args+0x13/0x13 [13192.953398] [<ffffffff8105e0f7>] ? __init_kthread_worker+0x5b/0x5b [13192.954278] [<ffffffff814edbb0>] ? gs_change+0x13/0x13 [13192.954911] ---[ end trace 9763213b95bbd803 ]--- Signed-off-by: Vasu Dev <vasu.dev@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.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>
2012-05-10[SCSI] fcoe: remove lport from net device before doing per cpu rx thread cleanupVasu Dev2-5/+24
Remove lport from net device and then do synchronize net device to flush inflight rx frames for the lport before doing fcoe_percpu_clean. In case of master lport, remove all rx packet handlers completely and then only do fcoe_percpu_clean. This required splitting fcoe_interface_cleanup to do remove part separately and for that added func fcoe_interface_remove and then call it from fcoe_if_destory before doing fcoe_percpu_clean. However if fcoe_interface_remove() is already called then don't call again from fcoe_interface_cleanup() to preserve its existing flows. This patch along with Neil's other patch to avoid soft irq context on ingress will avoid passing up frames on disabled lport as discussed in this mail thread:- http://lists.open-fcoe.org/pipermail/devel/2012-February/011947.html Signed-off-by: Vasu Dev <vasu.dev@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.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>
2012-05-10[SCSI] ufs: Update MAINTAINERSVinayak Holikatti1-0/+8
Add myself and Santosh Y as maintainers for drivers/scsi/ufs/ Signed-off-by: Vinayak Holikatti <vinholikatti@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-10[SCSI] ufs: Fix evaluation of UTP task completion codeVenkatraman S1-1/+1
While interpreting the result of UTP task completion status, by using boolean &&, the evaluation would fail when the UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED was received. Either UPIU_TASK_MANAGEMENT_FUNC_COMPL or UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED should be considered as a success result. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Santosh Y <santoshsy@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-10[SCSI] mpt2sas: move the scsi_host_put to the right placeTomas Henzl1-1/+1
When scsi_add_host fails the scsi_host_put should be called. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-10[SCSI] fc class: fix scanning when devs are offlineMike Christie1-10/+14
When a rport is added back or the role is changed the fc class will queue a scan and then call scsi_target_unblock. The problem with this is if the devices are in the SDEV_OFFLINE state and the scan is run before the scsi_target_unblock, then the scan will see LUN0 as offline and the scan will fail. This patch moves the unblock call to before the scan, so we know the device state will be set correctly when the scan is run. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-10[SCSI] st: fix memory leak with >1MB tape I/ODavid Jeffery1-1/+1
There is a memory leak in the st driver when sending large enough reads or writes using st's direct I/O path. As part of mapping the application's memory, a buffer to hold page pointers is allocated and the count of mapped pages is stored in field do_dio. A non-zero do_dio marks that direct I/O is in use. But do_dio is only 1 byte in size. Mapping 256 4k pages overflows do_dio and causes it to be set to 0, like direct I/O option was not used. When the I/O completes, the buffer to hold the page pointers is not freed, and the page counts of the mapped pages are not reduced. Every I/O of this size then leaks memory. The size of do_dio needs to be increased to prevent it wrapping around. Signed-off-by: David Jeffery <djeffery@redhat.com> Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] bfa: Update the MAINTAINERS file.Krishna Gudipati1-0/+1
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] bfa: Fix bfa logging for Logical port state change notificationKrishna Gudipati1-3/+3
Made changes to have the same logging level for Logical port online and offline events, to display these events in pairs. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] bfa: sysfs model description fix.Krishna Gudipati1-17/+2
Make changes to remove unsupported model numbers from the sysfs model description routine. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] bfa: Fix to defer vport delete handler invocation till firmware logo ↵Krishna Gudipati4-32/+15
response. Made changes to avoid queuing the vport delete work to IM driver work queue in the bfa_fcb_lport_delete() - since at this stage we are not completely done with using the vport structure as we are still waiting for the LOGO response from the fw in online state or just doing some cleanup. Since queuing up the vport delete work at this stage will result in the FC transport layer to clean up the vport before we get the response from firmware. Made changes to queue the port delete work to the IM driver work queue - from the bfa_fcs_vport_free() function since at this state we are done with using the vport data structure and the FCS state machine is completely cleaned up. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] storvsc: Properly handle errors from the hostK. Y. Srinivasan1-5/+15
Hyper-V cannot process some commands like ATA_12 and ATA_16. It also returns a very generic error when this happens (SRB_STATUS_ERROR). Most of the time we treat SRB_STATUS_ERROR as DID_TARGET_FAILURE which causes error handler retry, but in the case of pass through commands, they'll never succeed (and the error handler will offline the device), so put a discriminating block in the command completion routing and send the SRB_STATUS_ERROR upwards with DID_PASSTHROUGH for commands we know should not be retried. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Get Port State and Speed of the AdapterJohn Soni Jose3-0/+140
Implement ISCSI_HOST_PARAM_PORT_STATE and ISCSI_HOST_PARAM_PORT_SPEED to get the Adapter port state and port name Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: adding functionality to change network settings using iscsiadmMike Christie7-106/+858
This patch allows iscsiadm to set/ delete static IP and enable /disable DHCP. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Adding bsg interface for be2iscsiJayamohan Kallickal4-1/+162
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Get Initiator Name for the iSCSI_HostJohn Soni Jose5-0/+92
Implement the ISCSI_HOST_PARAM_INITIATOR_NAME for .get_host_param Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Return async handle of unknown opcode to free list.Jayamohan Kallickal1-2/+1
The async handle corresponding to unknown Opcode was not freed earlier. This code does the fix for that. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Check ASYNC PDU Handle corresponds to HDR/DATA HandleJayamohan Kallickal1-6/+2
For each ASYNC PDU received there is an HDR and DATA handle for it. There will be only 1 HDR ASYNC Handle, but DATA Handle can be more than 1 for each ASYNC PDU received. Checking if the ASYNC Handle correspongs to HDR or DATA while returning the Handle to the free list. hwi_free_async_msg just return the handles to the free list. No return values are needed so changing the return type to void. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Bump the driver VersionJayamohan Kallickal2-1/+2
Signed-off-by: Minh Tran <MinhDuc.Tran@Emulex.Com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Update external Branding to EmulexJayamohan Kallickal3-5/+5
Change MODULE_AUTHOR, driver name and other external print strings from Serverengines to Emulex. Signed-off-by: Minh Tran <MinhDuc.Tran@Emulex.Com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Fix the function return values.Jayamohan Kallickal1-4/+3
Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Code cleanup, removing the goto statementJayamohan Kallickal1-7/+4
Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Fix double free of MCCQ info memory.Jayamohan Kallickal1-1/+3
In case of MCC_Q creation failed, the MCCQ info memory is freed from be_mcc_queues_destroy and be_mcc_queues_create. This caused kernel to panic because of double free. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Set num_cpu = 1 if pci_enable_msix failsJayamohan Kallickal1-1/+4
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Fix typo function name mismatchJayamohan Kallickal1-1/+1
Signed-off-by: Minh Tran <MinhDuc.Tran@Emulex.Com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Freeing of WRB and SGL Handle in cleanup taskMike Christie1-45/+62
The WRB and SGL Handle allocated for Login task were not freed back to the pool after the login process was done. This code releases the WRB and SGL Handle after the login process. v2: - Fix up locking so bh calls are not done when not needed. - Make beiscsi_cleanup_task static. Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> [various fixes] Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: WRB Initialization and Failure code path changeJayamohan Kallickal2-53/+49
Removing code duplication during the WRB_Handle and WRB initialization. Added memory allocation failure handling code during WRB initialization. Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Fix in ASYNC PDU stitching logic.Jayamohan Kallickal1-2/+2
The buffer length passed for processing the ASYNC PDU was not proper. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] be2iscsi: Fix in the Asynchronous Code PathJayamohan Kallickal2-46/+47
Set the ASYNC PDU Handle pBuffer for Data ring with the VA/PA of the allocated memory for it. To get the correct ASYNC PDY Handle iterate the list and compare the PA set during initialization with the passed PHY Address. The buffer_size and num_enteries are common for HDR and Data ring Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] hpsa: use check_signatureAkinobu Mita2-4/+2
Use check_signature to find a signature in the mmio address. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] aacraid: add an iounmap call to aac_src_ioremapTomas Henzl1-0/+2
The patch 116046127d1a3bad2853d02781ad9fee33f05e5a "[SCSI] aacraid: Added Sync.mode to support series 7/8/9 controllers" removed an iounmap call from aac_src_ioremap. Before that, the iounmap has been called twice with the same value (dev->base and dev->regs.src.bar0) and the iounmap complained about it (iounmap: bad address ...). The proper solution is a change the paremeter from bar0 to bar1. Fix this by adding a an iounmap(dev->regs.src.bar1) call. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Achim Leubner <achim_leubner@pmc-sierra.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] scsi_dh_alua: Optimize the STPG commandMoger, Babu1-3/+26
This patch optimizes the set target port group(STPG) command. During our testing, we found that it is not optimal to send stpg command every time the path group switch happens. This patch uses PREF (preferred target port) bit with combination of flags passed by multipath user level tool to optimize this behaviour. If PREF bit is set then it issues a STPG command, otherwise it will let implicit transfer take place. By default there is no change in the behaviour. User tool needs to pass the parameter to make this change take effect. Patch has been tested on NetApp E series storage. Signed-off-by: Babu Moger <babu.moger@netapp.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] scsi_dh_alua: Store the PREF bit from RTPGMoger, Babu1-1/+4
PREF bit indicates preferred target port group for accessing a logical unit. This bit is used to optimize the STPG command handling. Signed-off-by: Babu Moger <babu.moger@netapp.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] scsi_dh_alua: Inroduce the set_params interface scsi_dh_alua handlerMoger, Babu1-0/+36
Handler expects only one parameter to set the flag ALUA_OPTIMIZE_STPG. This flag is used to optimize the STPG behaviour. There is no change in behaviour by default. For example, to set the flag pass the following parameters from multipath.conf hardware_handler "2 alua 1" Signed-off-by: Babu Moger <babu.moger@netapp.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] be2iscsi: Remove unused OFFSET_IN_PAGE() macroRoland Dreier1-4/+0
Signed-off-by: Roland Dreier <roland@purestorage.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] mpt2sas: Bump driver vesion to 13.100.00.00nagalakshmi.nandigama@lsi.com1-2/+2
Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] mpt2sas: Fix for panic happening because of improper memory allocationnagalakshmi.nandigama@lsi.com1-3/+3
The ioc->pfacts member in the IOC structure is getting set to zero following a call to _base_get_ioc_facts due to the memset in that routine. So if the ioc->pfacts was read after a host reset, there would be a NULL pointer dereference. The routine _base_get_ioc_facts is called from context of host reset. The problem in _base_get_ioc_facts is the size of Mpi2IOCFactsReply is 64, whereas the sizeof "struct mpt2sas_facts" is 60, so there is a four byte overflow resulting from the memset. Also, there is memset in _base_get_port_facts using the incorrect structure, it should be "struct mpt2sas_port_facts" instead of Mpi2PortFactsReply. Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> CC: stable@vger.kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] mpt2sas: Fix for hard drive going OFFLINE when hard reset issued and ↵nagalakshmi.nandigama@lsi.com1-8/+10
simultaneously another hard drive is hot unplugged Following the host reset, the firmware discovery is reassigning another hard drive in the topology to the same device handle as that device is getting hot removed. Until the driver device removal routine is called, there will be two hard drive with the matching device handle in the internal device link list. In the device removal routine, a separate function which moves the device from BLOCKED into OFFLINE state. Since this routine is passed with the device handle passed as input parameter, the routine will be traversing the internal device link list searching for matching device handle. This results in two devices with matching device handle, therefore both devices goes OFFLINE. To fix this issue,the input parameter is changed from device handle to SAS address, therefore only the device that is hot unplugged will be placed in OFFLINE state. Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Cc: stable@vger.kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] mpt2sas: Set the phy identifier of the end device to the phy number ↵nagalakshmi.nandigama@lsi.com1-0/+3
of the parent device it is linked to The phy_identifier inside the routine _transport_set_identify() is set to sas_device_page_zero->PhyNum. This returns the phy number of the parent device this device is linked to. Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] mpt2sas : While enabling phy, read the current port number from sas ↵nagalakshmi.nandigama@lsi.com1-2/+59
iounit page 0 instead of page 1 The port number is changing after disabling/enabling phys using the SysFS interface This is because the firmware behavour changed where it would read the the port number then set it to some different value even though Auto Port Config is turned on. With this change of behavour in FW, it is possible that the expanders are moved from one port to another after disabling /enabling phys. This is occuring because the port number in sas iounit page 1 is not matching up to the current port in page 0. In order to fix this the driver is modified to read the current port number from sas iounit page 0 instead of page 1. Also copy the port and phy flags over from page 0 to page 1. Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] mpt2sas: Fix linux driver sparse errorsnagalakshmi.nandigama@lsi.com2-4/+6
Fix several endian issues found by runing sparse. Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-23[SCSI] mpt2sas: Fix security scan issues reported by source code analysis toolnagalakshmi.nandigama@lsi.com3-18/+51
Modified the source code as per the findings reported by the source code analysis tool. Source code for the following functionalities has been touched. None of the driver functionalities has changed. - SMP Passthrough IOCTL - Debug messages for MPT Replies (i.e. bit 9 of Logging Level) - Task Management using sysfs - Device removal, i.e. when a target device (including any PD within a volume) is removed, and Volume Deletion. - Trace Buffer Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>