summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] cxgbi: convert to use iscsi_conn_get_addr_paramMike Christie2011-02-244-22/+22
| | | | | | | | This has cxgbi use the iscsi_conn_get_addr_param helper and the get ep callback. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] iscsi class: add callout to get iscsi_endpoint valuesMike Christie2011-02-241-2/+37
| | | | | | | | | | | | | | | | For drivers using the ep callbacks the addr and port are attached to the endpoint instead of the conn. This adds a callout to the iscsi_transport to get ep values. It also adds locking around the get param call to make sure that ep_disconnect does not free the LLD's ep interconnect structs from under us (the ep has a refcount so it will not go away but the LLD may have structs from other subsystems that are not allocated in the ep so we need to protect them from getting freed). Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] iscsi_tcp: use iscsi_conn_get_addr_param libiscsi functionMike Christie2011-02-242-67/+71
| | | | | | | | | | | | | | This has iscsi_tcp use the iscsi_conn_get_addr_param libiscsi function. It also drops the use of the libiscsi session portal buffers, so they can be removed in the next patches. Instead of copying the values at bind time we get them during get() time. If we are not connected userspace will now get -ENOTCONN, so it knows that connection is disconnected instead of a possible stale value. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libiscsi: add helper to convert addr to stringMike Christie2011-02-241-3/+41
| | | | | | | | | This adds a helper to convert a addr struct to a string. This will be used by the drivers in the next patches. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] iscsi class: remove unused active variableMike Christie2011-02-241-2/+0
| | | | | | | | The active variable on the iscsi_cls_conn is not used so this patch removes it. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] iscsi: fix iscsi_endpoint leakMike Christie2011-02-241-13/+50
| | | | | | | | | | When iscsid restarts it does not know the connection's endpoint, so it is getting leaked. This fixes the problem by having the iscsi class force a disconnect before a new connection is bound. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] cxgbi: enable TEXT PDU supportMike Christie2011-02-242-2/+2
| | | | | | | | cxgb3i and cxgb4i support TEXT PDU offloading, so set the bits to enable it. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: Updated to version 2.6.2.3Eddie Wai2011-02-241-2/+2
| | | | | | Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: Added iSCSI text pdu support for iSCSI offloadEddie Wai2011-02-243-1/+123
| | | | | | | | | This is part of an effort to support send target discovery via the iSCSI offload path. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: Added jumbo MTU support for the no shost caseEddie Wai2011-02-241-1/+1
| | | | | | | | | | | | For scenarios where the shost is not being passed to bnx2i for the iSCSI offload connection request, the code would consult the routing table to select the CNIC device. This code path will erroneously error out if the corresponding L2 interface's MTU has been setup to > 1500. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: Added support for the 57712(E) devicesEddie Wai2011-02-241-4/+6
| | | | | | | | | | Moved all PCI_DEVICE_ID_NX2_57712(E) definitions to pci_ids.h Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Acked-by: Michael Chan <mchan@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: Added handling for unsupported iSCSI offload hbaEddie Wai2011-02-241-0/+15
| | | | | | | | | The hba will now be unregistered and freed when iSCSI offload is not supported by the NIC. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: Fixed the 32-bit swapping of the LUN field for nopouts for 5771XEddie Wai2011-02-241-3/+3
| | | | | | | | | Fixed a bug where the 64-bit LUN field for nopouts were 32-bit swapped. This only pertains to 5771X devices. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: Allow ep CONNECT_FAILED condition to go through proper cleanupEddie Wai2011-02-241-1/+1
| | | | | | | | | | Allow CNIC to go through the proper cleanup procedure for an endpoint which failed to connect. Proper cleanup is necessary for the chip to reset back to the initial state for the offloaded endpoint. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.21: Change lpfc driver version to 8.3.21James Smart2011-02-181-2/+2
| | | | | | Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.21: Debugfs additionsJames Smart2011-02-185-55/+972
| | | | | | | | | | | | | - Add the driver debugfs framework for supporting debugfs read and write operations, and iDiag command structure. - Add read and write to SLI4 device PCI config space registers. - Add the driver support of debugfs PCI config space register bits set/clear methods to the provided bitmask. - Add iDiag driver support for SLI4 device queue diagnostic. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.21: Initialization and user interface changesJames Smart2011-02-187-37/+72
| | | | | | | | | | | | - Make link speed not supported by port message an error message. - Add support for new SLI failure codes add sysfs parameter to reflect the security setting and current state. - Add all lpfc module parameters to the /sys/modules/lpfc/parameters directory. [jejb: fix up compile failure] Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.21: FC Discovery changesJames Smart2011-02-189-7/+219
| | | | | | | | | | | | | | FC Discovery changes - Treat received PLOGI while logged in as a relogin (unregister and reregister). - Added a timer to delay Nport discovery when clean bit is cleared and Fabric portname/nodename/FCID is changed. - Invalidate Port's DID when receiving PLOGI from p2p port with CONFIG_PORT mailbox command. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.21: RRQ Implementation fixesJames Smart2011-02-187-138/+205
| | | | | | | | | | | | | | | | | | | | | | | RRQ Implementation fixes - Added checks to prevent a call to findnode_did in clr_active_rrq - Added the del_sync_timer call for the rrq_tmr to the stop_hba_timers routine. - Added a check in __lpfc_set_active_rrq for the driver unloading to prevent adding an rrq when the driver is being removed. - Add code to scsi_iocb_cmpl to check for the remote stop and add the rrq. - Added the same check to els retry. - Added code to compare the source did in the els rrq to the vports did and chose the right exchange ID. - Initialize the start_cmd pointer to indicate when we have looped through all of the scsi buffers. - Remove the need for the lock around the clearing of the active bit in the rrq. - Added code to clean the els and fcp xri aborted list and remove the all of the RRQs for a deleted vport. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.21: Critical Errors and Bug FixesJames Smart2011-02-1812-56/+264
| | | | | | | | | | | | | | | | | | | Critical Errors: - Correctly handle non-zero return lpfc_workq_post_event and return ENOMEM - Save the irq level when locking the host_lock in lpfc_findnode_did Bug Fixes: - Adjust payload_length and request_length for sli4_config mailbox commands. - Add the freed sgl/XRI to the tail of the list rather than to the head. - Set the FC_VPORT_NEEDS_INIT_VPI on vport deletes and check it before issuing a fdisc on an els retry. - Only call lpfc_hba_init_link() if phba->cfg_suppress_link_up is LPFC_INITIALIZE_LINK. - Add support for SLI-4 Performance Hints Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: fix bad comparisonDan Carpenter2011-02-181-1/+1
| | | | | | | | | '!' has higher precedence than '&'. CFGTBL_ChangeReq is 0x1 so the original code is equivelent to if (!doorbell_value) {... Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Do not attempt kdump if we detect resetting controller failed.Stephen M. Cameron2011-02-181-3/+3
| | | | | | | | | We can get completions left over from before the attempted reset which will interfere with the kdump. Better to just not make the attempt in that case. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Inform controller we are using 32-bit tags.Stephen M. Cameron2011-02-182-11/+14
| | | | | | | | | | Controller will transfer only 32-bits on completion if it knows we are only using 32-bit tags. Also, some newer controllers apparently (and erroneously) require that we only use 32-bit tags, and that we inform the controller of this. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Add transport_mode host attribute in /sysStephen M. Cameron2011-02-181-1/+17
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: make hpsa.hpsa_simple_mode=1 module parameter actually workStephen M. Cameron2011-02-182-14/+24
| | | | | | | | | | | It's not enough to simple avoid putting the board into performant mode, as we have to set up the interrupts differently, etc. When I originally tested this module parameter, I tested it incorrectly without realizing it, and the driver was running in performant mode the whole time unbeknownst to me. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: do not re-order commands in internal queuesStephen M. Cameron2011-02-183-15/+14
| | | | | | | | Driver's internal queues should be FIFO, not LIFO. This is a port of an almost identical patch from cciss by Jens Axboe. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] ipr: Fix a race on multiple configuration changesKleber Sacilotto de Souza2011-02-181-2/+5
| | | | | | | | | | | | In a multiple configuration change scenario a remove notification can be followed by an immediate add notification for the same device, which will cause the device to be removed but never added back. This patch fixes the problem by ensuring that in such situations the device will be added back. Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libsas: convert to libata new error handlerJames Bottomley2011-02-132-8/+93
| | | | | | | | | | | | | | | | | The conversion is quite complex given that the libata new error handler has to be hooked into the current libsas timeout and error handling. The way this is done is to process all the failed commands via libsas first, but if they have no underlying sas task (and they're on a sata device) assume they are destined for the libata error handler and send them accordingly. Finally, activate the port recovery of the libata error handler for each port known to the host. This is somewhat suboptimal, since that port may not need recovering, but given the current architecture of the libata error handler, it's the only way; and the spurious activation is harmless. Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] scsi_dh_rdac : Adding MODULE VERSION for rdac device handlerMoger, Babu2011-02-121-0/+1
| | | | | | | | Adding MODULE_VERSION for scsi_dh_rdac. This will be helpful sometimes to get the code level without looking at the code. Signed-off-by: Babu Moger <babu.moger@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] scsi_dh: cosmetic change to sizeof()Hillf Danton2011-02-124-5/+5
| | | | | | | | | instead of doing sizeof(struct X) it's better to do sizeof(*v) where v is the variable pointing to struct X. Signed-off-by: Hillf Danton <dhillf@gmail.com> Signed-off-by: Babu Moger <babu.moger@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] scsi_dh_rdac: fix for lun_table update for rdac device handlerMoger, Babu2011-02-121-12/+10
| | | | | | | | | | | | | | | | | During one of our testing, we noticed that mode select command sent from the host did not have the lun_table updated. Problem is root caused to the way lun table is updated. Lun table update was done after the call to blk_rq_map_kern is made. This was causing problem because kernel uses bounce buffer(bio_copy_kern) if the address is not aligned. The command buffer updated after the call(blk_rq_map_kern) was not going on the wire. Moved the code to update the lun_table before the call to fix the problem. Signed-off-by: Babu Moger <babu.moger@lsi.com> Signed-off-by: Somasundaram Krishnasamy <Somasundaram.Krishnasamy@lsi.com> Signed-off-by: Yanling Qi <Yanling.Qi@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfcoe: Move common code from fcoe to libfcoe moduleBhanu Prakash Gollapudi2011-02-123-237/+224
| | | | | | | | | | | | | | | To facilitate LLDDs to reuse the code, skb queue related functions are moved to libfcoe, so that both fcoe and bnx2fc drivers can use them. The common structures fcoe_port, fcoe_percpu_s are moved to libfcoe. fcoe_port will now have an opaque pointer that points to corresponding driver's interface structure. Also, fcoe_start_io and fcoe_fc_crc are moved to libfcoe. As part of this change, fixed fcoe_start_io to return ENOMEM if skb_clone fails. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: use dedicated workqueue instead of system_wqTejun Heo2011-02-121-11/+21
| | | | | | | | | | | | | | | | | | | | | | fcoe uses the system_wq to destroy ports and the work items need to be flushed before the driver is unloaded. As the work items free the containing data structure, they can't be flushed directly. The workqueue should be flushed instead. Also, the destruction works can be chained - ie. destruction of a port may lead to destruction of another port where the work item for the former queues the work for the latter. Currently, the depth of chain can be at most two and fcoe_exit() makes sure everything is complete by calling flush_scheduled_work() twice. With commit c8efcc25 (workqueue: allow chained queueing during destruction), destroy_workqueue() can take care of chained works on workqueue destruction. Add and use fcoe_wq instead. Simply destroying fcoe_wq on driver unload takes care of flushing. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: introduce LLD event callbackBhanu Prakash Gollapudi2011-02-122-1/+19
| | | | | | | | | | This patch enables LLD to listen to rport events and perform LLD specific operations based on the rport event. This patch also stores sp_features and spp_type in rdata for further reference by LLD. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: Extending lport's roles for target if there is a registered ↵Kiran Patil2011-02-123-0/+21
| | | | | | | | | | | | | | | | | | | | target. Problem: From initaitor machine, when queried role of target (other end of connection), it is "initiator", hence SCSI-ml doesn't send any LUN Inquiry commands. Fix: If there is a registered target for FC_TYPE_FCP, extend lport's params (capability) to be target as well, By default lport params are INITIATOR only. Having this fix, caused initiator to send SCSI LUN inquiry command to target. Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: convert fcoe.ko to become an fcoe transport provider driverYi Zou2011-02-121-108/+62
| | | | | | | | | | | | | | | | | Remove the existing sysfs entry points of the fcoe.ko module parameters that are used to create/destroy/enable/disable an FCoE instance, rather, use the newly added fcoe transport code to attach itself as an FCoE transport provider when fcoe.ko gets loaded. There is no functionality change on the logic of fcoe interacts with upper libfc and lower netdev. The fcoe transport only acts as thin layer to provide a unified interface for all fcoe transport providers so all FCoE instances on any network interfaces from all vendors can be managed through the same Open-FCoE.org's user space tool package, which also has full DCB support. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: prepare fcoe for using fcoe transportYi Zou2011-02-121-14/+15
| | | | | | | | | | | Prepare the fcoe to convert it to use the newly added fcoe transport, making it as the default fcoe transport provider for libfcoe. This patch is to rename some of the variables to avoid any confusing names later as now there are several transports in the same file. 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@suse.de>
* [SCSI] libfcoe: include fcoe_transport.c into kernel libfcoe moduleYi Zou2011-02-123-9/+9
| | | | | | | | | | | | Now we can include the fcoe_transport.c to the build of the kernel libfcoe module. Move the module information to fcoe_transport, and it will have all the module parameters later for the create/destroy/enable/disable of an FCoE instance. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfcoe: rename libfcoe.c to fcoe_cltr.c for the coming fcoe_transport.cYi Zou2011-02-122-6/+8
| | | | | | | | | | | | | | The existing libfcoe.c is mostly for FIP support, rename it to reflect that fact and so we can add fcoe_transport.c to the make file to include both into the libfcoe kernel module. [ Minor modifications by Robert Love converting a few "__attribute__((packed))" modifiers to "__packed" to remove new checkpatch.pl WARNINGS ] 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@suse.de>
* [SCSI] libfcoe: add implementation to support fcoe transportYi Zou2011-02-122-0/+524
| | | | | | | | | | | | | | | | | | | | | | Add the new fcoe_transport.c file that implements basic fcoe transport interface. Eventually, the sysfs entries to create/destroy/enable/disable an FCoE instance will be coming to the fcoe transport layer, who does a look-up to find the corresponding transport provide and pass the corresponding action over to the identified provider. The fcoe.ko will become the default fcoe transport provider that can support FCoE on any given netdev interfaces, as the Open-FCoE.org's default software FCoE HBA solution. Any vendor specific FCoE HBA driver that is built on top of Open-FCoE's kernel stack of libfc & libfcoe as well as the user land tool of fcoe-utils can easily plug-in and start running FCoE on their network interfaces. The fcoe.ko will be converted to act as the default provider if no vendor specific transport provider is found, as it is always added to the very end of the list of attached transports. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfcoe: move logging macros into the local libfcoe.h header fileYi Zou2011-02-122-20/+27
| | | | | | | | | libfcoe kernel module debug macros will used by the fcoe transport code as well when later it gets added. 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@suse.de>
* [SCSI] libfc: Enhanced exchange ID selection mechanism and fix related EMA ↵Kiran Patil2011-02-121-21/+43
| | | | | | | | | | | | | | | | | | | | | | selection logic. Problem: In case of exchange responder case, EMA selection was defaulted to the last EMA from EMA list (lport.ema_list). If exchange ID is selected from offload pool and not setup DDP, resulting into incorrect selection of EMA, and eventually dropping the packet because unable to find exchange. Fix: Enhanced the exchange ID selection (depending upon request type and exchange responder) Made necessary enhancement in EMA selection algorithm. Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: export seq_release() for users of seq_assign()Joe Eykholt2011-02-121-0/+14
| | | | | | | | Target modules using lport->tt.seq_assign() get a hold on the exchange but have no way of releasing it. Add that. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: Remove usage of the Scsi_Host's host_lockRobert Love2011-02-121-14/+6
| | | | | | | | | | | | This patch removes the use of the Scsi_Host's host_lock within fc_queuecommand. It also removes the DEF_SCSI_QCMD usage so that libfc has fully moved on to the new queuecommand interface. Signed-off-by: Robert Love <robert.w.love@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Reviewed-by: Nicholas A. Bellinger <nab@linux-iscsi.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: use PRLI hook to get parameters when sending outgoing PRLIJoe Eykholt2011-02-121-3/+24
| | | | | | | | | | | | | When sending an outgoing PRLI as an initiator, get the parameters from registered providers so that they all get a chance to decide on roles. The passive provider is called last, and could override the initiator role. 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@suse.de>
* [SCSI] libfc: add hook to notify providers of local port changesJoe Eykholt2011-02-123-0/+45
| | | | | | | | | | | | | | | | | When an SCST provider is registered, it needs to know what local ports are available for configuration as targets. Add a notifier chain that is invoked when any local port that is added or deleted. Maintain a global list of local ports and add an interator function that calls a given function for every existing local port. This is used when first loading a provider. 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@suse.de>
* [SCSI] libfc: add method for setting handler for incoming exchangeJoe Eykholt2011-02-121-0/+19
| | | | | | | | | | | | | Add a method for setting handler for incoming exchange. For multi-sequence exchanges, this allows the target driver to add a response handler for handling subsequent sequences, and exchange manager resets. The new function is called fc_seq_set_resp(). 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@suse.de>
* [SCSI] libfc: add hook for FC-4 provider registrationJoe Eykholt2011-02-124-36/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow FC-4 provider modules to hook into libfc, mostly for targets. This should allow any FC-4 module to handle PRLI requests and maintain process-association states. Each provider registers its ops with libfc and then will be called for any incoming PRLI for that FC-4 type on any instance. The provider can decide whether to handle that particular instance using any method it likes, such as ACLs or other configuration information. A count is kept of the number of successful PRLIs from the remote port. Providers are called back with an implicit PRLO when the remote port is about to be deleted or has been reset. fc_lport_recv_req() now sends incoming FC-4 requests to FC-4 providers, and there is a built-in provider always registered for handling incoming ELS requests. The call to provider recv() routines uses rcu_read_lock() so that providers aren't removed during the call. That lock is very cheap and shouldn't affect any performance on ELS requests. Providers can rely on the RCU lock to protect a session lookup as well. 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@suse.de>
* [SCSI] libfc: fix sparse static and non-ANSI warningsRandy Dunlap2011-02-123-9/+9
| | | | | | | | | | Fix sparse warning for non-ANSI function declaration. Declare workqueue structs as static. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Robert Love <robert.w.love@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: drop FCoE LOGO in FIP modeVasu Dev2011-02-121-30/+54
| | | | | | | | | | | | | | | | | | | | Allowing FCoE LOGO followed by CVL in this case prevents FIP login back to the FCF and then keeps lport offline, only FIP LOGO and CLV needs to be processed while in FIP mode, therefore this patch drops FCoE LOGO in FIP mode. Added fcoe_filter_frames() to filter out above mentioned LOGO in fcoe rx path along with other existing filtering in code for bad CRC frames. Adding separate fcoe_filter_frames function helped with better code indentations and if needed then same will allow adding more filters at one place in future. This LOGO drop is added after FCP frames passed up to avoid any additional checks on fast path for this. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
OpenPOWER on IntegriCloud