aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-04-11[SCSI] qla2xxx: Fix documentation of ql2xfdmienable module parameterFerenc Wagner1-2/+2
The default is enabled since 7e47e5ca184548341a82eeb2238ee3622c43cae1. Signed-off-by: Ferenc Wagner <[email protected]> Acked-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] qla2xxx: General checkpatch corrections.Andrew Vasquez5-60/+69
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] qla2xxx: Fix to make conditional decision based on port number.Sarang Radke1-2/+2
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] qla2xxx: Free DMA memory only if it is allocated in vendor specific ↵Harish Zunjarrao1-2/+4
BSG command The qla84xx_mgmt_cmd function supports multiple subcommands. Some subcommands require DMA memory and some do not. Therefore check before freeing DMA memory whether it is allocated or not. Signed-off-by: Harish Zunjarrao <[email protected]> Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] qla2xxx: Add APEX support.Sarang Radke7-4/+518
Allows priority setting for FCP_CMNDs. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] qla2xxx: Re-organized BSG interface specific code.Giridhar Malavali7-831/+1230
1. Segregate BSG interface specific code to new files. 2. Handle multiple vendor specific commands indepedently. 3. Reorganised support for reset, management and update FCoE firmware commands. 4. Fixed memory leak issue in Loopback. 5. Added new vendor command to support iiDMA using BSG interface. 6. Proper cleanup of dma mapped and dma allocated buffers for BSG request. [jejb: fix up conflict and merge in Jiri Slaby lock imbalance patch] Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Harish Zunjarrao <[email protected]> Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] bfa: sg addr big endian fixJing Huang2-2/+17
sg address in IO request is not set up correctly for big endian platform. add new macros to properly swap the address. Signed-off-by: Jing Huang <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] bfa: protect idr using bfad_mutexJing Huang3-5/+11
idr is a global resource, protect it with global bfad_mutex. Signed-off-by: Jing Huang <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] bfa: use pci_iomap() and pci_iounmap()Jing Huang2-9/+1
Use pci_iomap() and pci_iounmap() to simplify the code. Remove uncessary #ifdef check for ia64 (it was added as a workaound for some RHEL 5.x release which doesn't export iounmap function) Signed-off-by: Jing Huang <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] bfa: fix the issue of not handling scsi_cmnd sg chaining caseJing Huang2-34/+17
Currently the driver doesn't take into consideraion of possible sg chaining when it walks through the sg list. This is fixed by using the sg_next() which automatically handles the chaining case. Obosolete code is removed as a result of this change. Signed-off-by: Jing Huang <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] bfa: add fc transport class based vport create/deleteJing Huang5-33/+239
Use duplicate fc transport template for physical and vitual port. Add vport create/delete/disalbe functions in the transport template of physical port. Changes to make the vport create/delete function to work under this framework. Signed-off-by: Jing Huang <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] don't kfree an initialized struct deviceAlan Stern1-2/+1
This patch (as1359) fixes a bug in scsi_alloc_target(). After a device structure has been initialized (and especially after its name has been set), it must not be freed directly. One has to call put_device() instead. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] don't reap targets upon device_add failureAlan Stern1-3/+0
This patch (as1358) fixes a bug in the error pathway of scsi_target_add(). If registration fails, the target should not be reaped. The reaping occurs later, when scanning is finished and all the child devices are removed. The current code leaves an unbalanced value in starget->reap_ref. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: Bump version 03.04.15Kashyap, Desai1-2/+2
Upgrade version from 3.04.14 to 3.04.15 Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: Proper error handling is added after mpt_config timeoutKashyap, Desai1-5/+11
Added proper error handling after mpt_config. Now check of MPI_IOCSTATUS_CONFIG_INVALID_PAGE is added. If error is MPI_IOCSTATUS_CONFIG_INVALID_PAGE, driver will return -ENODEV. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: Event data alignment with 4 byte.Kashyap, Desai1-1/+1
event_data needs to be 4 byte aligned to makes sure there is no unaligned memory access take place. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: Check for command status is added after completion.Kashyap, Desai1-10/+16
1) Corrected name string as "MPT SAS HOST" 2) Added proper check conditions for MPT_MGMT_STATUS_COMMAND_GOOD. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: Task abort is not supported for VolumesKashyap, Desai1-1/+13
1) corrected return value as SUCCESS instead of 0. 2) Added check in mptscsih_abort. mptfusion do not support task abort for Volumes. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: sanity check for vdevice pointer is addedKashyap, Desai3-0/+26
Added sanity checks before accessing vdevice and added vdevice->deleted setting for mptfc. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: Setting period,offset and width for SPI driverKashyap, Desai1-0/+5
Set factor, offset and width while target negotiation. Added config timeout 60 seconds. It was missing for only mptspi_read_spi_device_pg0 Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: Proper bus_type check is addedKashyap, Desai3-1/+12
Added proper bus_type check before processing event/ reset handler. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: mpt_detach is called properly at the time of rmmodKashyap, Desai2-5/+6
Current design of mptsas is as follow. MPTSAS will do probe() if pci id matches for available card in system, irrespective of mode of controller. If controller is I/T mode or I mode, things are fine. If controller is only in T mode, mptsas is not doing complete process of mptsas_probe(). It will only make sure IOC structure is created and IOC reference is available for mptstm driver. Now While removing module we should take care case of Target mode only mptsas. If we are removing IOC which is only in Target mode, We should only detach IOC instead of following rest of the cleanup process which is only required for T mode controller. Now For T mode controller, only part clean up is done instead of complete cleanup. mpt_detach will call early in case of Target mode only controller. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: mpt config will do Hard Reset based upon retry countsKashyap, Desai1-2/+7
mpt_config would only attempt a MUR before retrying the command. The driver will now retry a second time with a hard reset before leaving the function. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: Updated SCSI IO IOCTL error handling.Kashyap, Desai1-75/+86
Behavior changes only for IOCTLs that time out. Current behavior of Bus Reset remains the same for RAID Passthru Timeouts Current behavior of Diagnostic reset for any other type of IOCTL remains the same CHANGE: For IOCTL SCSI IOs that timeout, a Target Reset TM is sent, instead of Bus Reset. All error handing from that point is the same as what the driver currently does, which is to say that if the Device Reset TM fails it escalates do diagnostic reset. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mptfusion: Added new less expensive RESET (Message Unit Reset)Kashyap, Desai5-10/+177
Message Unit Reset - instructs the IOC to reset the Reply Post and Free FIFO's. All the Message Frames on Reply Free FIFO are discarded. All posted buffers are freed, and event notification is turned off. IOC doesnt reply to any outstanding request. This will transfer IOC to READY state. Message unit ready is less expensive operations than Hard Reset. soft reset will not force Firmware to reload again, it only do clean up of Message units. mpt_Soft_Hard_ResetHandler will first try for Soft Reset,if it fails then go for big hammer reset which is Hard Reset. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Bump version 05.100.00.00Kashyap, Desai1-4/+4
Upgraded version string. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Copyright 2010.Kashyap, Desai15-15/+15
Copyright changes for year 2010. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Default descriptor for RAID Passthru command.Kashyap, Desai1-2/+5
RAID_SCSI_IO_PASSTHROUGH: Driver needs to be send the default descriptor for RAID Passthru, currently its sending SCSI_IO descriptor. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: return -ENOMEM if memory allocation failed.Kashyap, Desai1-1/+10
Added proper return type values in case memory allocation failed. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: removed use of tm_cmds.mutex in IOCTL branch.Kashyap, Desai3-83/+108
Removed all the mutex's for ioc->tm_cmds.mutex, then created one single mutex inside the function mpt2sas_scsih_issue_tm. This is the single function used when sending task management. Also the sanity checks required for scsi mid layer escalation were moved to inside the same function because these checks need to be done while the mutex is held. The ioc->tm_cmds.mutex inside the IOCTL branch is really not required since there is another mutex in this code called for ctl_cmds handling this sync. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Fix for little endianKashyap, Desai5-26/+46
1. Fixes for little endian issues. 2. Now Debug info for Discovery event is more readable. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Driver will not treat NEEDS_INIT as failure.Kashyap, Desai1-15/+138
Now Driver will not treat NEEDS_INIT as failure. In addition to this, the driver will now display message to describe the the access flags when bits are set, so the end user can better understand failures. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Early return from function if shost is in recovery.Kashyap, Desai2-3/+5
Aded checks for shost_recovery flag for early return from function. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Use of get_free_pages for huge memorary allocation.Kashyap, Desai2-7/+10
use the get_free_pages API for larger contigious physical memory chunk. Also, the ioc->chain_depth need to be changed from a 16bit to 32bit variable because the number of chains will exceed 64k when the queue depth is large. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Corrected conditional checks for Internal device ResetKashyap, Desai1-3/+3
bug fix in the handling of the internal device reset event The reason code check in scsih_sas_device_status_change_event never evaluates as true for internal device reset, hence driver never quiesce s IO when firmware is sending a device reset. The fix is to change the evaluate to: if (event_data->ReasonCode != MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET && event_data->ReasonCode != MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET) return; Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Corrected time stampKashyap, Desai1-2/+2
incorrect timestamp on 32 bit platforms: The upper 32 bit of the timestamp was getting truncated when converting seconds to milliseconds, which was due to the variable being long. To fix the problem, the variable needs to be u64. Also the microseconds conversion to milliseconds was incorrect; it should be divide by 1000 instead of divide by 8. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas : Do not reset handle before calling _scsih_remove_device in ↵Kashyap, Desai1-2/+0
RESCAN task after HBA RESET Setting handle to zero is not required before _scsih_remove_device. Driver uses sas_device->handle reference in _scsih_remove_device. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] lpfc 8.3.11: Update Driver version to 8.3.11James Smart1-1/+1
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] lpfc 8.3.11: NPIV changesJames Smart5-8/+53
- Enable NPIV by default. - Added code to handle unsolicited LOGO on physical port. Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] lpfc 8.3.11: Fix AER uncorrectable non-fatal error handlingJames Smart1-23/+27
Only abort outstanding I/O to force the OS to retry failed I/Os for AER uncorrectable non-fatal errors instead of reseting the adapter. Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] lpfc 8.3.11: Driver management improvements via BSGJames Smart8-83/+296
- Add BSG support for PCI loopback testing. - Add BSG support for extended mailbox commands. Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] lpfc 8.3.11: SLI4 ImprovementsJames Smart4-55/+69
- Correct all SLI4 code to work on big endian systems. - Move read of sli4 params earlier so returned values are used correctly. Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] lpfc 8.3.11: FCF failover improvementsJames Smart5-13/+77
FCF failover improvements - Add random FCF failover when there are multiple FCFs available. - Prevent FCF log messages from being displayed for FC adapters. - Separate the New FCF and Modified FCF log messages. Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt: modify mptctl_exit() to call proper deregister functionsKei Tokunaga1-1/+12
This patch fixes some issues of mptctl_exit(). 1) It doesn't call mpt_deregister() for mptctl_taskmgmt_id => Insmoding/rmmoding mptctl.ko repeadtedly (up to MPT_MAX_PROTOCOL_DRIVERS-1 at most) can eat up all cb_idx, and that would cause a lack of MptCallbacks[], MptDriverClass[], and MptEvHandlers[]. 2) It doesn't call mpt_event_deregister() for mptctl_id => Need to call it. 3) It calls mpt_reset_deregister() for mptctl_taskmgmt_id => This could accidentally deregister an innocent reset handler that you don't want to. This patch also adds a check for mptctl_taskmgmt_id. Signed-off-by: Kei Tokunaga <[email protected]> Acked-by: "Desai, Kashyap" <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] libfc, libfcoe, fcoe: use smp_processor_id() only when preempt disabledJoe Eykholt5-45/+45
When the kernel is configured for preemption, using smp_processor_id() when preemption is enabled causes a warning backtrace and is wrong since we could move off of that CPU as soon as we get the ID, and we would be referencing the wrong CPU, and possibly an invalid one if it could be hotswapped out. Remove the fc_lport_get_stats() function and explicitly use per_cpu_ptr() to get the statistics. Where preemption has been disabled by holding a _bh lock continue to use smp_processor_id(), but otherwise use get_cpu()/put_cpu(). In fcoe_recv_frame() also changed the cases where we return in the middle to do a goto to the code which bumps ErrorFrames and does a put_cpu(). Two of these cases didn't bump ErrorFrames before, but doing so is harmless because they "can't happen", due to prior length checks. Also rearranged code in fcoe_recv_frame() to have only one call to fc_exch_recv(). It's just as efficient and saves a call to put_cpu(). In fc_fcp.c, adjusted a FIXME comment for code which doesn't need fixing. Signed-off-by: Joe Eykholt <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] libfc: Add debug statements when fc_fcp returns DID_ERROR to scsi-mlRobert Love1-2/+17
DID_ERROR cases can be ambigouos. Debugging FCP error cases will be much easier if we have debug statements when we hit these error conditions. This patch simply adds debug messages using the FC_FCP_DBG macro when we return DID_ERROR to SCSI. This way if a DID_ERROR is reproducible turning on debug_logging will give a clue to developers as to what the problem might be. Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] libfc: fix fcp pkt recovery in fc_fcp_recv_dataVasu Dev1-19/+28
Currently fc_fcp_recv_data calls fc_fcp_retry_cmd to retry failed IO but in this case tgt is still sending data frames, therefore exchange needs to be aborted first before initiating retry. So this patch fixes this by aborting exchange first then have retry. Renames fc_timeout_error to fc_fcp_recovery since fc_timeout_error is already called from several other places beside from fcp timeout handler and then used fc_fcp_recovery for abort & retry from fc_fcp_recv_data, this rename also required renaming FC_CMD_TIME_OUT status to FC_CMD_RECOVERY to be consistent with new fc_fcp_recovery. Data frames are not expected for an DDPed exchange and potentially it could be tampered data frame, so does recovery in this case by calling fc_fcp_recovery. Signed-off-by: Vasu Dev <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] libfc: use offload EM instance again instead jumping to next EMVasu Dev1-10/+5
Since use of offloads is more efficient than switching to non-offload EM. However kept logic same to call em_match if it is provided in the list of EMs. Converted fc_exch_alloc to inline being now tiny a function and already not an exported libfc API any more. Signed-off-by: Vasu Dev <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] libfc: fixes unnecessary seq id jumpVasu Dev1-14/+5
In some cases seq is incremented twice causing unnecessary seq jump, for instance fc_exch_recv_seq_resp increments seq id when fc_sof_is_init is true and that is true for each incoming xfer ready but then fc_fcp_send_data does another seq increment to send data for xfer ready. This patch removes all such seq id jumps, at least it eliminates few calls to fc_seq_start_next using ex_lock. Also removes seq id update with incoming frame's seq id as this is not needed since each end (I or T) just need to send incremented their own seq id on each TSI from other end & before sending new sequence within a exchange. Signed-off-by: Vasu Dev <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] libfc: fix sequence-initiative WARN in fc_seq_start_nextJoe Eykholt1-1/+1
When starting a new response sequence in a multi-sequence exchange, a warning was issued that sequence initiative wasn't held. The bug was that sequence initiative was cleared by the previous sequence due to the END_SEQ flag being on. The intent may have been to check LAST_SEQ. Change just to check SEQ_INIT. Signed-off-by: Joe Eykholt <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: James Bottomley <[email protected]>