summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] bnx2i : Fix command session number jump issue seen during cable pull testAnil Veerabhadrappa2009-08-231-3/+0Star
| | | | | | | | | | | | | | | | Without the fix bnx2i would fail tt->xmit_task() when link is down and libiscsi would have already incremented session->cmdsn before calling bnx2i's xmit_task() entry point and will just return the command to SCSI-ML when xmit_task() fails. libiscsi does not retract the session->cmdsn as the command was never sent on wire. It is generally good idea for LLD, bnx2i to accept the scsi cmnd/nopout and let upper layer timeout and go though normal session recovery process. When link is down, unsolicited nopout will not be accepted by bnx2i and connection will never enter recovery state. This fix is required for MPIO to work corectly Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: removes phys_dev and renames real_dev to netdev.Vasu Dev2009-08-232-47/+51
| | | | | | | | | | | | | | | | | | | | The phys_dev was used only to locate common offload EM instance for all FCoE instances on a eth devices in function fcoe_em_config, so just updated fcoe_em_config to look for actual real eth device in locating common offload EM instance and then no need to store phys_dev in fcoe_softc, so removes phys_dev from fcoe_softc also. Renames fcoe_softc real_dev to netdev and updates all its uses to use netdev. So effectively no functional change, use of single netdev instead phys_dev and real_dev saves one pointer memory in fcoe_softc, also real_dev used here was confusing with vlan driver terminology since real_dev in vlan driver is referred to physical eth device. 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@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: Remove page flags check for sglistYi Zou2009-08-231-27/+0Star
| | | | | | | | | | | I don't believe this check is needed any more in the current kernel, which, if I understand correctly, is for compound page where only the first page is supposed to get ref-counted. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: Remove FC_FRAME_SG_LEN in fc_fcp_send_dataYi Zou2009-08-231-2/+0Star
| | | | | | | | | | | | | | | | FC_FRAME_SG_LEN is 4 which is too small when offload is enabled. Actually, the WARN_ON() in fc_fcp_send_data() should be: WARN_ON(skb_shinfo(fp_skb(fp))->nr_frags > MAX_SKB_FRAGS); But since we will not get anything more than 64K anyway, so there is no need to do this anyway here. Therefore, I am getting rid of FC_FRAME_SG_LEN here and the WARN_ON here. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: Remove ifdef for NETIF_F_FCOE_CRC and NETIF_F_FSOYi Zou2009-08-231-6/+0Star
| | | | | | | | | | Remove the extra ifdef for NETIF_F_FSO and NETIF_F_FCOE_CRC since they are already defined in the current kernel as in include/linux/netdevice.h. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe, libfc: adds offload EM per eth device with only single xid ↵Vasu Dev2009-08-233-79/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | range per EM Updates fcoe_em_config to allocate a single instance of sharable offload EM for supported lp->lro_xid per eth device, and then share this EM for subsequently more lports creation on same eth device (e.g when using VLAN). Adds tiny fcoe_oem_match function for offload EM to return true for read types IO to have read IO exchanges allocated from offload shared EM. Removes fc_em_alloc_xid function completely which was needed to manage two xid ranges within a EM, this is not needed any more with allocation of separate sharable offload EM per eth device. Instead this patch adds simple xid allocation logic to manage single xid range. Adds fc_exch_em_alloc with mp->next_xid as cursor to allocate new xid from single xid range of EM, uses mp->next_xid instead removed mp->last_xid which slightly increase probability of finding empty xid on exch allocation. Removes restriction of not allowing use of xid zero along with changing two xid range change to single xid range. Makes fc_fcp_ddp_setup calling conditional to only xid allocated from shared offload EM. 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@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: modifies fcoe_hostlist_lock uses as prep work to add shared ↵Vasu Dev2009-08-231-8/+18
| | | | | | | | | | | | | | offload EM Modifies fcoe_hostlist_lock uses such that a new EM allocation in fcoe_em_config and adding new fcoe_softc using fcoe_hostlist_add are atomic, this is to ensure that a shared offload EM gets allocated only once per eth device for its all lports. 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@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe, fnic, libfc: modifies current code paths to use EM anchor listVasu Dev2009-08-235-97/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modifies current code to use EM anchor list in EM allocation, EM free, EM reset, exch allocation and exch lookup code paths. 1. Modifies fc_exch_mgr_alloc to accept EM match function and then have allocated EM added to the lport using fc_exch_mgr_add API while also updating EM kref for newly added EM. 2. Updates fc_exch_mgr_free API to accept only lport pointer instead EM and then have this API free all EMs of the lport from EM anchor list. 3. Removes single lport pointer link from the EM, which was used in associating lport pointer in newly allocated exchange. Instead have lport pointer passed along new exchange allocation call path and then store passed lport pointer in newly allocated exchange, this will allow a single EM instance to be used across more than one lport and used in EM reset to reset only lport specific exchanges. 4. Modifies fc_exch_mgr_reset to reset all EMs from the EM anchor list of the lport, adds additional exch lport pointer (ep->lp) check for shared EM case to reset exchange specific to a lport requested reset. 5. Updates exch allocation API fc_exch_alloc to use EM anchor list and its anchor match func pointer. The fc_exch_alloc will walk the list of EMs until it finds a match, a match will be either null match func pointer or call to match function returning true value. 6. Updates fc_exch_recv to accept incoming frame on local port using only lport pointer and frame pointer without specifying EM instance of incoming frame. Instead modified fc_exch_recv to locate EM for the incoming frame by matching xid of incoming frame against a EM xid range. This change was required to use EM list in libfc Rx path and after this change the lport fc_exch_mgr pointer emp is not needed anymore, so removed emp pointer. 7. Updates fnic for removed lport emp pointer and above modified libfc APIs fc_exch_recv, fc_exch_mgr_alloc and fc_exch_mgr_free. 8. Removes exch_get and exch_put from libfc_function_template as these are no longer needed with EM anchor list and its match function use. Also removes its default function fc_exch_get. A defect this patch introduced regarding the libfc initialization order in the fnic driver was fixed by Joe Eykholt <jeykholt@cisco.com>. 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@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: Remove the FC_EM_DBG macroRobert Love2009-08-231-7/+6Star
| | | | | | | | | | | | | | | | | Currently there is a 1:1 relationship between the lport and exchange manager. This macro takes an EM as an argument and determines the lport from it. However, later patches will use an EM list per lport, so we will no longer have this 1:1 relationship- this macro must change. The FC_EM_DBG macro is rarely used. There are four callers, two can use FC_LPORT_DBG instead and two can be removed since they're not necessary. This patch makes those changes and removes the macro. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe, libfc: adds exchange manager(EM) anchor list per lport and ↵Vasu Dev2009-08-233-7/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related APIs Adds EM list using a anchor struct fc_exch_mgr_anchor, anchor is used to allow same EM instance sharing across more than one lport on a eth device, this implementation is per discussed design posted at http://www.open-fcoe.org/pipermail/devel/2009-June/002566.html. The shared EM is required for multiple lports on eth device when using multiple VLANs or NPIV. Adds fc_exch_mgr_add API to add a EM to the lport and fc_exch_mgr_del API to delete previously added EM. Also adds function fc_exch_mgr_destroy() to destroy allocated EM. The kref is added to the EM to keep track of EM usage count, the EM is destroyed when no longer in use upon kref reaching to zero. The caller can specify match function to fc_exch_mgr_add, this will be used in determining exchange allocation from its EM or not. Moved calling of fcoe_em_config below fcoe_libfc_config calling, so that list head lp->ema_list is initialized before configuring EM. 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@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: fix: cancel rport retry timerJoe Eykholt2009-08-231-2/+1Star
| | | | | | | | | | | | | | | The timer for rport retries wasn't getting canceled, and would occasionally go off after the module was unloaded. Add logic to cancel the timer in fc_rport_work(). Since we cancel the timer before deleting the rdata, it is no longer necessary to do a get_device() for the pending timer. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: fc_rport_logoff should not drop the lockJoe Eykholt2009-08-231-22/+38
| | | | | | | | | | | | | | | | | | | | fc_rport_logoff drops the rport lock in order to cancel work that may be pending. This is undesirable as the state can completely change, and the caller may not expect that the lock could've been dropped. If there is work pending, it will acquire the rdata mutex and so we're protected and can change the event from READY to DELETE. Queue the work only if there is no event already pending. There were a couple other cases where the state was set to DELETE and work queued, even though the state may have already been DELETE. Fix these using a common function fc_rport_enter_delete(). Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: rename rport state "NONE" to "DELETE".Joe Eykholt2009-08-231-14/+14
| | | | | | | | | | | | | | | State RPORT_ST_NONE was intented to be an invalid state (0), never used. This was a misguided attempt to be sure it was always initialized. Having an extra state meaning nothing requires switch statements to have a case covering that state. State NONE has been used instead to mean the remote port is being deleted. Changing the name to RPORT_ST_DELETE. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: fix WARNING from fc_seq_start_next on closed exchangesJoe Eykholt2009-08-231-1/+0Star
| | | | | | | | | | | | | | | | We saw periodic messages like: WARNING: at drivers/scsi/libfc/fc_exch.c:825 fc_seq_start_next+0x30/0x4b This was due to trying to allocate a sequence in a request handler when the exchange had been reset. Delete the WARN_ON. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: in fc_lport_destroy, flush rports after turning off linkJoe Eykholt2009-08-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | During an fcoe module unload, we saw a problem where fc_rport_work() finds the lport has been freed. The rdata points to an area containing 0x6b6b6b6b... the pool poison value from kmem_free(). In fcoe_if_destroy() we call fc_fabric_logoff() then fc_lport_destroy(). fc_fabric_logoff() flushes the remote port work, but we're still receiving requests, and an RSCN or PLOGI arrives which creates more rports. Note that although the LLD also checks link_up, it doesn't do it under the lport mutex, so it can deliver frames to fc_lport_recv_req() even after link_up is cleared. So, re-check link_up there. We need to flush the rports by calling disc_stop_final() after we clear link_up. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: stop login after fabric logoffJoe Eykholt2009-08-231-8/+34
| | | | | | | | | | | | | | | | | | | | | | | When removing the fcoe module, several lports were being shut down through fc_lport_fabric_logoff(). Occasionally, one would enter reset state before fc_lport_destroy() was called, and since link_up was still true, it would log back in. If we just clear link_up earlier, then we wouldn't be accepting LOGO requests from other initiators while we are shutting down. Fix by changing the LOGO response handler to enter DISABLED instead of RESET. Add an fc_lport_enter_disabled() function which does what fc_lport_enter_reset() did, except it doesn't proceed to FLOGI state. Move the code that was common between fc_lport_enter_reset() and fc_lport_enter_disabled() into a new fc_lport_reset_locked() function. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: rename lport NONE state to DISABLEDJoe Eykholt2009-08-232-7/+7
| | | | | | | | | | | | The state NONE was meant to be invalid, but has been used as the initial state. Rename it to be DISABLED, as more descriptive. Further patches will make it the like the RESET state, except it won't transition to FLOGI until fc_lport_fabric_login() is called. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: stop delivery of received frames before doing lport_destroy()Joe Eykholt2009-08-231-3/+3
| | | | | | | | | | | To be more sure that no more input arrives at the local port as it is being destroyed, clean the queues in the per-cpu receive threads. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: Call dev_ethtool_get_settings() in fcoe_link_okYi Zou2009-08-231-21/+17Star
| | | | | | | | | | No need to check phys_dev here, just call dev_ethtool_get_settings() directly will take care of this. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfcoe: Set fip_flags according to fcf and lport's capability of ↵Yi Zou2009-08-231-3/+9
| | | | | | | | | | | | SPMA support When encap the els for FIP, set the fip_flags according to the FCF and lport's capability of supporting SPMA or FPMA or both. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: Fix validation of mac address when checking for spma supportYi Zou2009-08-231-1/+1
| | | | | | | | | | Fix this bug of validating the wrong mac address while checking for SAN MAC address support from LLD as we should check ha->addr not ctlr.ctl_src_addr. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] ALUA: send STPG if explicit and implicit is supportedMike Christie2009-08-231-1/+1
| | | | | | | | | | | | | | alua_activate only sends a STPG if only explicit is suppored. As a result, for EMC targets that support both we end up doing a implicit failover when X commands are finally sent to the other SP. This patch does a AND on the h->tpgs, so we do a explicit failover right away. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] scsi_transport_sas: fix incorrect duplicate setup of max_physJames Bottomley2009-08-231-4/+0Star
| | | | | | | | | There are two setup places for max_phys in scsi_transport_sas.c; one incorrectly places a NULL into host_attrs instead of port_attrs. Remove it. Reported-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fc_transport: Correct max fc_host attribute countJames Smart2009-08-231-1/+1
| | | | | | Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.4: Update driver version to 8.3.4James Smart2009-08-231-1/+1
| | | | | | | | Update driver version to 8.3.4 Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.4: Remove spaces before newlines in several log messagesJames Smart2009-08-236-13/+13
| | | | | | | | Remove spaces before newlines in several log messages Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.4: Add bsg (SGIOv4) support for ELS/CT supportJames Smart2009-08-2310-2/+954
| | | | | | | | | | Add bsg (SGIOv4) support for sending and receiving ELS, CT commands This patch adds a new file, lpfc_bsg.c. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.4: NPIV vport fixesJames Smart2009-08-237-56/+168
| | | | | | | | | | | | NPIV vport fixes - Fixed static vport creation on SLI4 HBAs - Fixed vport create sending init_vpi before REG_VFI - Fix unable to create vports on SLI4 HBA's Port2 Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.4: Fix a pair of FCoE issuesJames Smart2009-08-235-5/+92
| | | | | | | | | | | Fix a pair of FCoE issues - Fix Region 23 FCoE Parameters not being read correctly - Fix race condition when there are FCoE events during FCF table read Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.4: Various SLI3 fixesJames Smart2009-08-234-16/+31
| | | | | | | | | | | Various SLI3 fixes - Fix for firmware dump failure - Fix inband remote management Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.4: Consistently Implement persistent port disableJames Smart2009-08-238-32/+242
| | | | | | | | | | | | Consistently implement persistent port disable. Ability was to be managed in the adapter via firmware via flash settings. However, not all firmware images supported it. Uniformly support it everywhere. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.4: Various SLI4 fixesJames Smart2009-08-237-99/+190
| | | | | | | | | | | | | | | | | | Various SLI4 fixes - Fix switch name not used in the FCF record for FCoE HBAs - Enabled HBA UE error polling error-condition action code - Rewrite lpfc_sli4_scmd_to_wqidx_distr() to handle counter rollover cleanly - Modify resume_rpi mailbox data structure to match current SLI4 spec - Do not issue mailbox command in MBX_POLL mode when LPFC_HBA_ERROR is set - Wait for HBA POST completion before checking Online and UE registers - Fix accumulated total length not being filled in on unsolicited IOCBs - Use PCI config space register to determine SLI rev of HBA - Turn on starting ELS tmo function timer during device initialization Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: convert to %pMJohannes Berg2009-08-231-4/+2Star
| | | | | | | | | | print_mac is being deprecated, and %pM makes for smaller code anyway. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc: don't dereference NULLJiri Slaby2009-08-231-2/+1Star
| | | | | | | | | | When kzalloc fails in lpfc_hba_alloc, don't dereference the NULL by lpfc_printf_log. Use dev_err instead. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-By: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla2xxx: Fix __LITTLE_ENDIAN definition warningsDave Jones2009-08-231-1/+1
| | | | | | | | | | On ppc64, gcc 4.4 spews lots of.. drivers/scsi/qla2xxx/qla_def.h:1485:7: warning: "__LITTLE_ENDIAN" is not defined Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: register given device with cnic if shost != NULL in ep_connect()Anil Veerabhadrappa2009-08-232-4/+10
| | | | | | | | | | | | | | | | | When using iface, bnx2i was unable to offload further connections after all active sessions are logged out. bnx2i will unregister the device from cnic when the last connection is torn down. Next call to ep_connect() will fail because the device is not registered. This issue is not seen if shost == NULL is passed to ep_connect() call because in that case bnx2i will registers all known devices with cnic before doing a route look-up. When shost != NULL, bnx2i knows the device on which to offload the connection and has to register this device before attempting to offload the connection Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] scsi_transport_fc: fix kernel-doc param nameRandy Dunlap2009-08-231-1/+1
| | | | | | | | | Change function parameter name in kernel-doc to match the function's actual parameter name, to fix 2 kernel-doc warnings. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: convert bnx2i_dev_lock to mutexAnil Veerabhadrappa2009-08-231-29/+25Star
| | | | | | | | | | | | | convert bnx2i_dev_lock to type mutex from rwlock_t because cnic->register_device() can sleep for various reasons including memory allocation, waiting for ISCSI_INIT completion and while acquiring mutex lock, cnic_lock. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: bug fixes in bnx2i_init_one to handle error conditionsAnil Veerabhadrappa2009-08-231-12/+19
| | | | | | | | | | | | | Fixed bnx2i_init_one() to properly handle return code of cnic->register_device() and propagate it back to the caller. No need to check for BNX2I_CNIC_REGISTERED, because unless the adapter is added to adapter_list it will not be registered in ep_connect context Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: remove global variable bnx2i_reg_devicesAnil Veerabhadrappa2009-08-231-19/+1Star
| | | | | | | | | | | Removed bnx2i_reg_devices as this counter is not really used in a meaningful way Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] Print failed commandsMartin K. Petersen2009-08-231-0/+1
| | | | | | | | | When a request fails we print the sense data but not the actual command that failed. Add a printout of the operation + CDB for failed commands. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] scsi_dh: Reference count scsi_dh_attachChandra Seetharaman2009-08-231-7/+16
| | | | | | | | | | | | | | Problem reported: http://marc.info/?l=dm-devel&m=124585978305866&w=2 scsi_dh does not do a refernce count for attach/detach, and this affects the way it is supposed to work with multipath when a device is not in the dev_list of the hardware handler. This patch adds a reference count that counts each attach. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] update scsi/constants.cDouglas Gilbert2009-08-231-20/+75
| | | | | | | | | | | | | | | | | | | It has been 3 years since this file was sync-ed with www.t10.org . Information taken from the last bunch of drafts released in May 2009. More asc/ascq codes are coming for thin provisioning; when approved and allocated another patch could add them prior to this patch going live. Changelog: - add some new command names and rename two commands - sync asc/ascq table with www.t10.org/lists/asc-num.txt - correct bug in scsi_extd_sense_format() [second for loop] Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: fix config request and diag reset deadlockKashyap, Desai2009-08-141-65/+20Star
| | | | | | | | Moving the setting and clearing of the mutex's to _config_request. There was a mutex deadlock when diag reset is called from inside _config_request, so diag reset was moved to outside the mutexs. Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Bump driver version 01.100.04.00Kashyap, Desai2009-08-131-2/+2
| | | | | | | Bump version to 01.100.04.00 Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: fix oops because drv data points to NULL on resume from ↵Kashyap, Desai2009-08-131-3/+3
| | | | | | | | | | | | hibernate Fix another ocurring when the system resumes. This oops was due to driver setting the pci drvdata to NULL on the prior hibernation. Becuase it was set to NULL, upon resmume we assume the pci drvdata is non-zero, and we oops. To fix the ooops, we don't set pci drvdata to NULL at hibernation time. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: fix crash due to Watchdog is active while OS in standby modeKashyap, Desai2009-08-133-28/+64
| | | | | | | | | Fix oops ocurring at hibernation time. This oops was due to the firmware fault watchdog timer still running after we freed resources. To fix the issue we need to terminate the watchdog timer at hibernation time. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: fix infinite loop inside config requestKashyap, Desai2009-08-131-0/+6
| | | | | | | | | This restriction is introduced just to avoid loop of config_request. Retry must be limited so we have restricted config request to maximum 2 times. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Excessive log info causes sas iounit page time outKashyap, Desai2009-08-132-0/+8
| | | | | | | | | | Inhibit 0x3117 loginfos - during cable pull, there are too many printks going to the syslog, this is have impact on how fast the interrupt routine can handle keeping up with command completions; this was the root cause to the config pages timeouts. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Raid 10 Value is showing as Raid 1E in /va/log/messagesKashyap, Desai2009-08-131-26/+64
| | | | | | | | | | | | | | When a volume is activated, the driver will recieve a pair of ir config change events to remove the foreign volume, then add the native. In the process of the removal event, the hidden raid componet is removed from the parent.When the disks is added back, the adding of the port fails becuase there is no instance of the device in its parent. To fix this issue, the driver needs to call mpt2sas_transport_update_links() prior to calling _scsih_add_device. In addition, we added sanity checks on volume add and removal to ignore events for foreign volumes. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>