aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-07-28[SCSI] zfcp: Enable data division support for FCP devicesChristof Schmitt4-1/+19
Try to enable data division support for FCP devices and indicate in the adapter status flag if it succeeded. Reviewed-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Prevent access on uninitialized memory.Swen Schillig1-1/+1
Initialize allocated memory to zero to prevent access on error. This prevents a possible error in the error handling path. Signed-off-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Post events through FC transport classSven Schuetz6-0/+90
Post FC transport class netlink events for usage in the userspace, e.g. for HBAAPI. Supported events are those required for the polled events in HBAAPI. - link up - link down - incoming RSCN (events related to FC-AL are not supported, as zfcp has no support for FC-AL) Signed-off-by: Sven Schuetz <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Cleanup QDIO attachment and improve processing.Swen Schillig3-139/+69
Some definitions and structures in the zfcp QDIO processing are improved by the removal of not required variables and processing steps. I addition the naming of some variables is changed to make their purpose more clear. Signed-off-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Cleanup function parameters for sbal value.Swen Schillig6-50/+47
A lot of functions require the amount of SBALs as one of their parameter which is most times invariable. Therefore remove this parameter and set the SBAL value explicitly if a non standard value is required. In addition the warning message "oversized data" is replaced with a BUG_ON() statement assuring the limits defined and requested by zfcp. Signed-off-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Use correct width for timer_interval fieldChristof Schmitt2-1/+3
The timer_interval is 14 bits in width. Introduce a define for properly masking the value. Reviewed-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Remove SCSI device when removing unitChristof Schmitt3-2/+10
Configuring a LUN in zfcp, also creates a SCSI device. For consistency, it makes sense to remove the SCSI device when the LUN is deconfigured. Replace the flush_work with the call to scsi_remove_device: scsi_remove_device also takes the scan_mutex that synchronizes itself with any long running device discovery. Reviewed-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Use memdup_user and kstrdupChristof Schmitt2-12/+4
Use the functions memdup_user and kstrdup to allocate memory and copy the data in one step, saving some lines of code. Reviewed-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Fix retry after failed "open port" erp actionChristof Schmitt1-2/+1
Trying to enqueue a port erp action from the port erp strategy will fail in zfcp_erp_required_act. To try the same action again, return ZFCP_ERP_FAILED. Reviewed-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Fail erp after timeoutChristof Schmitt1-0/+6
After a timeout notification, do not try to run the erp strategy. Return from the erp with "failed" to possibly trigger a retry. Reviewed-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Use forced_reopen in terminate_rport_io callbackChristof Schmitt1-3/+5
When running in non-NPIV mode, the port_reopen in terminate_rport_io might succeed even though the remote port is not available. If the same port connection is held open from another operating system, the reopen is only a virtual operation and might not hit the SAN. Fix this by changing the call to forced_reopen that forces a logout/login operation in the SAN. Reviewed-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Register SCSI devices after successful fc_remote_port_addChristof Schmitt5-17/+33
When the successful return of an adisc is the final step to set the port online, the registration of SCSI devices might be omitted. SCSI devices that have been removed before (due to a short dev_loss_tmo setting) might not be attached again. The problem is that the registration of SCSI devices is done only after erp has finished. The correct place would be after the call to fc_remote_port_add to mimick the scan in the FC transport class. Change the registration of SCSI devices to be triggered after the fc_remote_port_add call. For the initial inquiry command to succeed, the unit must also be open. If the unit reopen is still pending, the inquiry command to the LUN will be deferred with DID_IMM_RETRY, so there is no harm from this approach. Reviewed-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Do not try "forced close" when port is already closedChristof Schmitt1-1/+5
When the port is already "physically closed" try the reopen instead. There is no way to send a "physically close" to an already closed port. Reviewed-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] zfcp: Do not unblock rport from REOPEN_PORT_FORCEDChristof Schmitt1-1/+2
When the REOPEN_PORT_FORCED erp action succeeds, the port has been closed. A REOPEN_PORT will try to open the port after the REPORT_PORT_FORCED. The rport should only be unblocked after the successful completion of the reopen port. Reviewed-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] sd: add support for runtime PMAlan Stern1-5/+16
This patch (as1399) adds runtime-PM support to the sd driver. The support is unsophisticated: If a SCSI disk device is mounted, or if its device file is held open, then the device will not be runtime-suspended; otherwise it will (provided userspace gives permission by writing "auto" to the sysfs power/control attribute). In order to make this work, a dev_set_drvdata() call had to be moved from sd_probe_async() to sd_probe(). Also, a few lines of code were changed to use a local variable instead of recalculating the address of an embedded struct device. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] implement runtime Power ManagementAlan Stern8-11/+201
This patch (as1398b) adds runtime PM support to the SCSI layer. Only the machanism is provided; use of it is up to the various high-level drivers, and the patch doesn't change any of them. Except for sg -- the patch expicitly prevents a device from being runtime-suspended while its sg device file is open. The implementation is simplistic. In general, hosts and targets are automatically suspended when all their children are asleep, but for them the runtime-suspend code doesn't actually do anything. (A host's runtime PM status is propagated up the device tree, though, so a runtime-PM-aware lower-level driver could power down the host adapter hardware at the appropriate times.) There are comments indicating where a transport class might be notified or some other hooks added. LUNs are runtime-suspended by calling the drivers' existing suspend handlers (and likewise for runtime-resume). Somewhat arbitrarily, the implementation delays for 100 ms before suspending an eligible LUN. This is because there typically are occasions during bootup when the same device file is opened and closed several times in quick succession. The way this all works is that the SCSI core increments a device's PM-usage count when it is registered. If a high-level driver does nothing then the device will not be eligible for runtime-suspend because of the elevated usage count. If a high-level driver wants to use runtime PM then it can call scsi_autopm_put_device() in its probe routine to decrement the usage count and scsi_autopm_get_device() in its remove routine to restore the original count. Hosts, targets, and LUNs are not suspended while they are being probed or removed, or while the error handler is running. In fact, a fairly large part of the patch consists of code to make sure that things aren't suspended at such times. [jejb: fix up compile issues in PM config variations] Signed-off-by: Alan Stern <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] convert to the new PM frameworkAlan Stern4-47/+105
This patch (as1397b) converts the SCSI midlayer to use the new PM callbacks (struct dev_pm_ops). A new source file, scsi_pm.c, is created to hold the new callback routines, and the existing suspend/resume code is moved there. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] Unify SAM_ and SAM_STAT_ macrosJames Bottomley9-40/+31
We have two separate definitions for identical constants with nearly the same name. One comes from the generic headers in scsi.h; the other is an enum in libsas.h ... it's causing confusion about which one is correct (fortunately they both are). Fix this by eliminating the libsas.h duplicate Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] mptfusion: release resources in error return pathTomas Henzl1-0/+3
We should release the resources in error return code path. The requested pci bars should be released under an error condition, when mpt_mapresources fails. Signed-off-by: Tomas Henzl <[email protected]> Acked-by: "Desai, Kashyap" <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] mptfusion: Bump version 03.04.17Kashyap, Desai1-2/+2
Version upgrade patch. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] mptfusion: Extra debug prints added relavent to Device missing delay ↵Kashyap, Desai7-26/+47
error handling Adding function name in original debug prints and few more debug prints are added. Signed-off-by: Kashyap Desai <[email protected]> Cc: Stable Tree <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] mptfusion: Block Error handling for deleting devices or Device in DMDKashyap, Desai3-10/+157
Issue description: In multipath topology, when device deletion is in transient state, multipath driver can call blk_flush_queue() as part of path failure. Before device get deleted from OS, Device may go OFFLINE as part of error handling kicked off triggered from multipathing driver. Above condition hits more frequently if device missing delay timer (which is LSI specific firmware parameter) is non zero value. root cause of this issue is Error handling thread is getting kicked off for device which is not really present(in transient state of deleting). This patch has solution for this issue. driver is now using eh_timed_out callback. See below. mptsas_transport_template->eh_timed_out = mptsas_eh_timed_out Using mptsas_eh_timed_out function, driver can decide weather vdevice is under Device missing delay or deleting state. for either of those cases, there is BLK_EH_RESET_TIMER return to scsi mid and error handling thread will not be kicked off for that particular scsi command. Signed-off-by: Kashyap Desai <[email protected]> Cc: Stable Tree <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] ibmvstgt: add __init/__exit macrosPeter Huewe1-2/+2
Add the __init and __exit macros to the module_init / module_exit functions from drivers/scsi/ibmvscsi/ibmvstgt.c Signed-off-by: Peter Huewe <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: Brian King <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] aacraid: Do not set DMA mask to 32 bit first if adapter only supports 31Rolf Eike Beer1-6/+8
Signed-off-by: Rolf Eike Beer <[email protected]> Acked-by: Achim Leubner <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: T10 DIF Type 2 supportArun Easi4-6/+43
Signed-off-by: Andrew Vasquez <[email protected]> Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Cleanup some dead-code and make some functions static.Andrew Vasquez5-60/+5
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Update copyright banner.Giridhar Malavali22-22/+22
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Rearranged and cleaned up the code for processing the ↵Giridhar Malavali4-40/+25
pending commands. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Updates for ISP82xx.Giridhar Malavali4-289/+42
Re-organized and cleaned up the ISP82xx specific code. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Do not allow ELS Passthru commands for ISP23xx adaptersHarish Zunjarrao1-13/+24
Signed-off-by: Harish Zunjarrao <[email protected]> Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Add CT passthru support for ISP23xx adaptersHarish Zunjarrao3-10/+162
Signed-off-by: Harish Zunjarrao <[email protected]> Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Don't issue set or get port param MBC if remote port is not ↵Madhuranath Iyengar1-0/+7
logged in Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Add qla2x00_free_fcports() functionChad Dupuis3-6/+15
This function was added to encapsulate freeing the memory for all the fcports associated with a particular vha. Also added a call to qla2x00_free_fcports() to qla2x00_free_device() to free the memory for all the fcports associated with a vha during device removal. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Stop firmware before doing init firmware.Andrew Vasquez1-2/+3
If BIOS is enabled then drivers init firmware fails since BIOS has done the init once. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Propogate transport disrupted status for cable pull ↵Duane Grigsby1-0/+3
conditions for faster failover. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Correct extended sense-data handling.Andrew Vasquez1-9/+18
Earlier implementation did not take into account the varying sizes of data buffers returned from structures sts_entry_t and sts_entry_24xx. Sense-data after the 20th byte could be incorrect. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Check for golden firmware and show version if availableMadhuranath Iyengar3-0/+42
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Use GFF_ID to check FCP-SCSI FC4 type before logging into ↵Chad Dupuis4-1/+103
Nx_Ports The default method that qla2xxx uses is the GID_PT nameserver command to get a list of Nx_Ports. This patch adds a GFF_ID call for each port returned by GID_PT to get the FC4 type. If the FC4 type is not FCP SCSI then the qla2xxx driver will not record that port in it's port database. For switches that do not support the GFF_ID command, the behavior will be for qla2xxx to store that port anyways. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Appropriately log FCP priority data messagesMadhuranath Iyengar3-20/+48
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Removed dependency for SRB structure for Marker processingGiridhar Malavali5-240/+19
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] qla2xxx: Don't issue set or get port param MBC if invalid port loop idMadhuranath Iyengar1-0/+7
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] iscsi_transport: wait on session in error handler pathMike Christie3-1/+44
wait for session to come online in eh_device_reset_handler and eh_target_reset_handler Signed-off-by: Mike Christie <[email protected]> Signed-off-by: Vikas Chaudhary <[email protected]> Signed-off-by: Ravi Anand <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] iscsi_transport: Modidify recovery_tmo from sysfsVikas Chaudhary1-5/+38
Added support to modify session->recovery_tmo from sysfs Signed-off-by: Vikas Chaudhary <[email protected]> Signed-off-by: Ravi Anand <[email protected]> Acked-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] sg: fix bio leak with a detached deviceFUJITA Tomonori1-0/+2
After blk_rq_map_user is successful, if we find that a device is unavailable (was detached), we must call blk_end_request_all to free bio(s) before blk_rq_unmap_user and blk_put_request. Reported-by: "Dailey, Nate" <[email protected]> Signed-off-by: FUJITA Tomonori <[email protected]> Tested-by: "Dailey, Nate" <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] fcoe: remove check for zero fabric nameVasu Dev1-1/+1
This check prevents FCF selection in NPV mode due to zero fabric name in that case and in turn flogi fails. Though NPV mode should not have this zero and should be fixed there also but spec also does not require initiator to ensure that fabric name must be non-zero, therefore dropping this check to get flogi working in NPV mode. Signed-off-by: Vasu Dev <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] libfc: Add retry logic to lport state machine when receiving LS_RJTBhanu Prakash Gollapudi1-36/+27
Call fc_lport_error to retry upto max retry count when FLOGI/SCR/NS gets rejected. Signed-off-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] Revert "[SCSI] fcoe: Fix using VLAN ID in creating lport's WWWN/WWPN"Vasu Dev1-10/+1
This reverts commit cc0136c2e9c10e889cb36e39710c0eb10707b396. That commit introduced vlan id info to WWPN but WWPN needs to remain static as an unique port identifier in the fabric, therefore variable fabric vlan id info doesn't need to be coded inside WWPN. After this revert, port arg to fcoe_wwn_from_mac is always zero but still leaving it as-is okay to later allow users to use NAA 2 scheme with this additional port arg. Note with this patch, existing zoning using WWPN would require re-zoning this time only and later no more re-zoning due to any vlan id changes. Signed-off-by: Vasu Dev <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] fcoe: fix offload feature flag change from netdevYi Zou1-19/+49
Currently, when FCoE netdev feature flags are toggled by the LLD, lport's corresponding flags are not updated. This causes the fc_fcp to still try to offload the I/O. This patch adds support of NETDEV_FEAT_CHANGE event in fcoe netdev device notification callback so we can update the lport offload flags appropriately. Signed-off-by: Yi Zou <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] libfc: don't require a local exchange for incoming requestsJoe Eykholt6-228/+174
Incoming requests shouldn't require a local exchange if we're just going to reply with one or two frames and don't expect anything further. Don't allocate exchanges for such requests until requested by the upper-layer protocol. The sequence is always NULL for new requests, so remove that as an argument to request handlers. Also change the first argument to lport->tt.seq_els_rsp_send from the sequence pointer to the received frame pointer, to supply the exchange IDs and destination ID info. Signed-off-by: Joe Eykholt <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-28[SCSI] libfc: add interface to allocate a sequence for incoming requestsJoe Eykholt2-0/+32
For incoming ELS and FCP requests, we often don't require an exchange and sequence, however, sometimes we do. For those cases, (primarily FCP requests for targets) add a function to set up the exchange and sequence. Signed-off-by: Joe Eykholt <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>