aboutsummaryrefslogtreecommitdiff
path: root/include/scsi
AgeCommit message (Collapse)Author
2009-04-03[SCSI] fcoe, libfcoe: Add support for FIP. FCoE discovery and keep-alive.Joe Eykholt
FIP is the new standard way to discover Fibre-Channel Forwarders (FCFs) by sending solicitations and listening for advertisements from FCFs. It also provides for keep-alives and period advertisements so that both parties know they have connectivity. If the FCF loses connectivity to the storage fabric, it can send a Link Reset to inform the E_node. This version is also compatible with pre-FIP implementations, so no configured selection between FIP mode and non-FIP mode is required. We wait a couple seconds after sending the initial solicitation and then send an old-style FLOGI. If we receive any FIP frames, we use FIP only mode. If the old FLOGI receives a response, we disable FIP mode. After every reset or link up, this determination is repeated. Signed-off-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>
2009-04-03[SCSI] fcoe: Add a header file defining the FIP protocol for FCoE.Joe Eykholt
Adds include/scsi/fc/fc_fip.h for FIP protocol definitions. Signed-off-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>
2009-04-03[SCSI] fcoe, libfc: fix double fcoe_softc memory allocVasu Dev
The foce_softc mem was reserved by libfc_host_alloc as well as by fcoe_host_alloc. Removes one liner fcoe_host_alloc completely, instead directly calls libfc_host_alloc to alloc scsi_host with libfc for just one fcoe_softc as fcoe private data. Moves libfc_host_alloc to libfc.h since it is a libfc API, placed lport_priv API adjacent to libfc_host_alloc since this is related to scsi_host priv data. 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>
2009-04-03[SCSI] fcoe: cleans up libfcoe.h and adds fcoe.h for fcoe moduleVasu Dev
Removes no where used several inline functions prefixed with skb_* and be16_to_cpu. Moves fcoe module specific func prototypes to fcoe.c from libfcoe.h, moved only need for build. Adds fcoe module header file fcoe.h and then moves fcoe module specific fcoe_percpu_s and fcoe_softc to fcoe.h from libfcoe.h. Moves all defines from fcoe.c to fcoe.h since now fcoe module has its own header file fcoe.h. [jejb: removed EXPORT_SYMBOL_GPL(fcoe_fc_crc) which caused a section mismatch] 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>
2009-04-03[SCSI] fcoe: removes default sw transport code file fcoe_sw.cVasu Dev
Moves only required code from fcoe_sw.c to libfcoe.c towards having just one source file for fcoe module, this gets rid off default sw transport code in a separate fcoe_sw.c file. Very minor renaming along this move, dropped _sw_ or _SW_ use in names and replaced them by _if_ as a auxiliary interface functions. Now some of these funcs can be removed or merged with other func after fcoe transport is gone, but that should be in another patch to keep this patch simple. Now the libfcoe.c file name for fcoe module doesn't go along well, so the libfcoe.c file renaming to fcoe.c as the only single fcoe module file is done in next patch to keep this patch clean and small for review. 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>
2009-04-03[SCSI] fcoe: removes fc_transport_fcoe.[ch] code filesVasu Dev
Remove unused fc_transport_fcoe.c and fc_transport_fcoe.h files. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03[SCSI] fcoe: prep work to completely remove fc_transport_fcoe codeVasu Dev
The fcoe transport code was added for generic FCoE transport infrastructure to allow additional offload related module loading on demand, this is not required anymore after recently added different offload approach by having offload related func ops in netdev. This patch removes fcoe transport related code use, calls functions directly between existing libfcoe.c and fcoe_sw.c for now, for example fcoe_sw_destroy and fcoe_sw_create calling. The fcoe_sw.c and libfcoe.c code will be further consolidated in later patches and then also the default fcoe sw transport code file fcoe_sw.c will be completely removed. The fcoe transport code files are completely removed in next patch to keep this patch simple for reviewing. [This patch is an update to a previous patch. This update resolves a build error as well as fixes a defect related to not calling fc_release_transport().] 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>
2009-04-03[SCSI] fcoe: Use per-CPU kernel function for dev_stats instead of an arrayRobert Love
Remove the hotplug creation of dev_stats, we allocate for all possible CPUs now when we allocate the lport. v2: Durring the 2.6.30 merge window, before these patches were comitted, 'percpu_ptr' was renamed 'per_cpu_ptr'. This latest update updates this patch for the name change. 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>
2009-04-03[SCSI] fcoe: Use percpu kernel funcs for struct fcoe_percpu_sRobert Love
Convert fcoe_percpu array to use the per-cpu variables that the kernel provides. Use the kernel's functions to access this structure. The cpu member of the fcoe_percpu_s is no longer needed, so this patch removes it too. 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>
2009-04-03[SCSI] fcoe: Initialize all possilbe skb_queue(s) when module is loadedRobert Love
Currently the skb_queue is initialized every time the associated CPU goes online. This patch has libfcoe initializing the skb_queue for all possible CPUs when the module is loaded. This patch also re-orders some declarations in the fcoe_rcv() function so the structure declarations are grouped before the primitive declarations. Lastly, this patch converts all CPU indicies to use unsigned int since CPU indicies should not be negative. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-13[SCSI] iscsi class: remove host no argument from session creation calloutMike Christie
We do not need to have llds set the host no for the session's parent, because we know the session's parent is going to be the host. This removes it from the session creation callback and converts the drivers. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-13[SCSI] libiscsi: pass session failure a session structMike Christie
The api for conn and session failures is akward because one takes a conn from the lib and one takes a session from the class. This syncs up the interfaces to use structs from the lib. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-13[SCSI] iscsi lib: remove qdepth param from iscsi host allocationMike Christie
The qdepth setting was useful when we needed libiscsi to verify the setting. Now we just need to make sure if older tools passed in zero then we need to set some default. So this patch just has us use the sht->cmd_per_lun or if for LLD does a host per session then we can set it on per host basis. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-13[SCSI] iscsi lib: have lib create work queue for transmitting IOMike Christie
We were using the shost work queue which ended up being a little akward since all iscsi hosts need a thread for scanning, but only drivers hooked into libiscsi need a workqueue for transmitting. So this patch moves the xmit workqueue to the lib. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-13[SCSI] iscsi class: fix lock dep warning on logoutMike Christie
We never should hit the lock up that is spit out when lock dep is on and we logout. But we have been using the shost work queue in a odd way. This patch has us use the work queue for scanning instead of creating our own, and this ends up also killing the lock dep warnings. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-13[SCSI] libiscsi: don't cap queue depth in iscsi modulesMike Christie
There is no need to cap the queue depth in the modules. We set this in userspace and can do that there. For performance testing with ram based targets, this is helpful since we can have very high queue depths. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-13[SCSI] libiscsi: replace scsi_debug logging with session/conn loggingMike Christie
This makes the logging a compile time option and replaces the scsi_debug macro with session and connection ones that print out a driver model id prefix. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-13[SCSI] libfc: add support of large receive offload by ddp in fc_fcpYi Zou
When LLD supports direct data placement (ddp) for large receive of an scsi i/o coming into fc_fcp, we call into libfc_function_template's ddp_setup() to prepare for a ddp of large receive for this read I/O. When I/O is complete, we call the corresponding ddp_done() to get the length of data ddped as well as to let LLD do clean up. fc_fcp_ddp_setup()/fc_fcp_ddp_done() are added to setup and complete a ddped read I/O described by the given fc_fcp_pkt. They would call into corresponding ddp_setup/ddp_done implemented by the fcoe layer. Eventually, fcoe layer calls into LLD's ddp_setup/ddp_done provided through net_device Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-13[SCSI] fcoe, libfc: check offload features from LLD through netdevYi Zou
This checks if net_devices supports FCoE offload ops in netdev_ops and it if it does, then sets up the corresponding flags in the associated fc_lport. For large send offload, the maximum length supported in one large send is now described by the added lso_max in fc_lport, which is setup initially from netdev->gso_max_size. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-13[SCSI] net, fcoe: add ETH_P_FCOE for Fibre Channel over Ethernet (FCoE)Yi Zou
This adds eth type ETH_P_FCOE for Fibre Channel over Ethernet (FCoE), consequently, the ETH_P_FCOE from fc_fcoe.h and fcoe skb->protocol is not set as ETH_P_FCOE. Signed-off-by: Yi Zou <yi.zou@intel.com> Acked-by: David Miller <davem@davemloft.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] Make scsi.h independent of the rest of the scsi includesJames Bottomley
This allows it to compile and be used on the ps3 platform that wants to use the #define values in scsi.h without actually having CONFIG_SCSI set. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] remove scsi_req_map_sgFUJITA Tomonori
No one uses scsi_execute_async with data transfer now. We can remove scsi_req_map_sg. Only scsi_eh_lock_door uses scsi_execute_async. scsi_eh_lock_door doesn't handle sense and the callback. So we can remove scsi_io_context too. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] libosd: SCSI/OSD Sense decoding supportBoaz Harrosh
Implementation of the osd_req_decode_sense() API. Can be called by library users to decode what failed in command executions. Add SCSI_OSD_DPRINT_SENSE Kconfig variable. Possible values are: 0 - Do not print any errors to messages file <KERN_ERR> 1 - (Default) Print only decoded errors that are not recoverable. Recoverable errors are those that the target has complied with the request but with a warning. For example read passed end of object will return zeros after the last valid byte. 2- Print all errors. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] libosd: OSDv2 auto detectionBoaz Harrosh
Auto detect an OSDv2 or OSDv1 target at run time. Note how none of the OSD API calls change. The tests do not know what device version it is. This test now passes against both the IBM-OSD-SIM OSD1 target as well as OSC's OSD2 target. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Reviewed-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] libosd: OSD version 2 SupportBoaz Harrosh
Add support for OSD2 at run time. It is now possible to run with both OSDv1 and OSDv2 targets at the same time. The actual detection should be preformed by the security manager, as the version is encoded in the capability structure. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Reviewed-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] libosd: attributes SupportBoaz Harrosh
Support for both List-Mode and Page-Mode osd attributes. One of these operations may be added to most other operations. Define the OSD standard's attribute pages constants and structures (osd_attributes.h) Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Reviewed-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] osd_uld: API for retrieving osd devices from KernelBoaz Harrosh
Kernel clients like exofs can retrieve struct osd_dev(s) by means of below API. + osduld_path_lookup() - given a path (e.g "/dev/osd0") locks and returns the corresponding struct osd_dev, which is then needed for subsequent libosd use. + osduld_put_device() - free up use of an osd_dev. Devices can be shared by multiple clients. The osd_uld_device's life time is governed by an embedded kref structure. The osd_uld_device holds an extra reference to both it's char-device and it's scsi_device, and will release these just before the final deallocation. There are three possible lock sources of the osd_uld_device 1. First and for most is the probe() function called by scsi-ml upon a successful login into a target. Released in release() when logout. 2. Second by user-mode file handles opened on the char-dev. 3. Third is here by Kernel users. All three locks must be removed before the osd_uld_device is freed. The MODULE has three lock sources as well: 1. scsi-ml at probe() time, removed after release(). (login/logout) 2. The user-mode file handles open/close. 3. Import symbols by client modules like exofs. TODO: This API is not enough for the pNFS-objects LD. A more versatile API will be needed. Proposed API could be: struct osd_dev *osduld_sysid_lookup(const char id[OSD_SYSTEMID_LEN]); Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] osd_uld: OSD scsi ULDBoaz Harrosh
Add a Linux driver module that registers as a SCSI ULD and probes for OSD type SCSI devices. When an OSD-type SCSI device is found a character device is created in the form of /dev/osdX - where X goes from 0 up to hard coded 64. The Major character device number used is 260. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Reviewed-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] libosd: OSDv1 HeadersBoaz Harrosh
Headers only patch. osd_protocol.h Contains a C-fied definition of the T10 OSD standard osd_types.h Contains CPU order common used types osd_initiator.h API definition of the osd_initiator library osd_sec.h Contains High level API for the security manager. [Note that checkpatch spews errors on things that are valid in this context and will not be fixed] Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Reviewed-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] add OSD_TYPEBoaz Harrosh
- Define the OSD_TYPE scsi device and let it show up in scans Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] Remove SUGGEST flagsMartin K. Petersen
The SUGGEST_* flags in the SCSI command result have been out of fashion for a while and we don't actually use them in the error handling. Remove the remaining occurrences. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] Check for deleted device in scsi_device_online()Hannes Reinecke
scsi_device_online() is not just a negation of SDEV_OFFLINE, also devices in state SDEV_DEL are actually offline. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12[SCSI] Add VPD helperMatthew Wilcox
Based on prior work by Martin Petersen and James Bottomley, this patch adds a generic helper for retrieving VPD pages from SCSI devices. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-10[SCSI] fcoe: Out of order tx frames was causing several check condition SCSI ↵Vasu Dev
status frames followed by these errors in log. [sdp] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK [sdp] Sense Key : Aborted Command [current] [sdp] Add. Sense: Data phase error This was causing some test apps to exit due to write failure under heavy load. This was due to a race around adding and removing tx frame skb in fcoe_pending_queue, Chris Leech helped me to find that brief unlocking period when pulling skb from fcoe_pending_queue in various contexts (fcoe_watchdog and fcoe_xmit) and then adding skb back into fcoe_pending_queue up on a failed fcoe_start_io could change skb/tx frame order in fcoe_pending_queue. Thanks Chris. This patch allows only single context to pull skb from fcoe_pending_queue at any time to prevent above described ordering issue/race by use of fcoe_pending_queue_active flag. This patch simplified fcoe_watchdog with modified fcoe_check_wait_queue by use of FCOE_LOW_QUEUE_DEPTH instead previously used several conditionals to clear and set lp->qfull. I think FCOE_MAX_QUEUE_DEPTH with FCOE_LOW_QUEUE_DEPTH will work better in re/setting lp->qfull and these could be fine tuned for performance. 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>
2009-03-10[SCSI] fcoe: ETH_P_8021Q is already in if_ether and fcoe is not using it anywayYi Zou
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>
2009-03-10[SCSI] libfc, fcoe: Remove unnecessary cast by removing inline wrapperRobert Love
Comment from "Andrew Morton <akpm@linux-foundation.org>" > +{ > + return (struct fcoe_softc *)lport_priv(lp); unneeded/undesirable cast of void*. There are probably zillions of instances of this - there always are. This whole inline function was unnecessary. The FCoE layer knows that it's data structure is stored in the lport private data, it can just access it from lport_priv(). Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-10[SCSI] libfc, fcoe: Fix kerneldoc commentsRobert Love
1) Added '()' for function names in kerneldoc comments 2) Changed comment bookends from '**/' to '*/'. The comment on the the mailing list was that '**/' "is consistently unconventional. Not wrong, just odd." The Documentation/kernel-doc-nano-HOWTO.txt states that kerneldoc comment blocks should end with '**/' but most (if not all) instance I found under drivers/scsi/ were only using the '*/' so I converted to that style. 3) Removed incorrect linebreaks in kerneldoc comments where found 4) Removed a few unnecessary blank comment lines in kerneldoc comment blocks Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-06[SCSI] libfc: Cleanup libfc_function_template commentsRobert Love
Made the comments more like the comments for struct scsi_host_template. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-06[SCSI] libfc: Don't violate transport template for rogue port creationRobert Love
Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-06[SCSI] libfc: rport retry on LS_RJT from certain ELSChris Leech
This allows any rport ELS to retry on LS_RJT. The rport error handling would only retry on resource allocation failures and exchange timeouts. I have a target that will occasionally reject PLOGI when we do a quick LOGO/PLOGI. When a critical ELS was rejected, libfc would fail silently leaving the rport in a dead state. The retry count and delay are managed by fc_rport_error_retry. If the retry count is exceeded fc_rport_error will be called. When retrying is not the correct course of action, fc_rport_error can be called directly. Signed-off-by: Chris Leech <christopher.leech@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-06[SCSI] libfc, fcoe: fixed locking issues with lport->lp_mutex around ↵Vasu Dev
lport->link_status The fcoe_xmit could call fc_pause in case the pending skb queue len is larger than FCOE_MAX_QUEUE_DEPTH, the fc_pause was trying to grab lport->lp_muex to change lport->link_status and that had these issues :- 1. The fcoe_xmit was getting called with bh disabled, thus causing "BUG: scheduling while atomic" when grabbing lport->lp_muex with bh disabled. 2. fc_linkup and fc_linkdown function calls lport_enter function with lport->lp_mutex held and these enter function in turn calls fcoe_xmit to send lport related FC frame, e.g. fc_linkup => fc_lport_enter_flogi to send flogi req. In this case grabbing the same lport->lp_mutex again in fc_puase from fcoe_xmit would cause deadlock. The lport->lp_mutex was used for setting FC_PAUSE in fcoe_xmit path but FC_PAUSE bit was not used anywhere beside just setting and clear this bit in lport->link_status, instead used a separate field qfull in fc_lport to eliminate need for lport->lp_mutex to track pending queue full condition and in turn avoid above described two locking issues. Also added check for lp->qfull in fc_fcp_lport_queue_ready to trigger SCSI_MLQUEUE_HOST_BUSY when lp->qfull is set to prevent more scsi-ml cmds while lp->qfull is set. This patch eliminated FC_LINK_UP and FC_PAUSE and instead used dedicated fields in fc_lport for this, this simplified all related conditional code. Also removed fc_pause and fc_unpause functions and instead used newly added lport->qfull directly in fcoe. 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>
2009-03-06[SCSI] libfc: Pass lport in exch_mgr_resetAbhijeet Joglekar
fc_exch_mgr structure is private to fc_exch.c. To export exch_mgr_reset to transport, transport needs access to the exch manager. Change exch_mgr_reset to use lport param which is the shared structure between libFC and transport. Alternatively, fc_exch_mgr definition can be moved to libfc.h so that lport can be accessed from mp*. Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-01-13[SCSI] iscsi_tcp: make padbuf non-staticKaren Xie
virt_to_page() call should not be used on kernel text and data addresses. virt_to_page() is used by sg_init_one(). So change padbuf to be allocated within iscsi_segment. Signed-off-by: Karen Xie <kxie@chelsio.com> Acked-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-01-06[SCSI] fc transport: restore missing dev_loss_tmo callback to LLDDJames Smart
When we reworked the transport for the rport lifetimes, in cases where the rport was reused as a container for tgt id bindings, we inadvertantly removed the callback to the driver indicating that dev_loss_tmo had fired. This patch restores that functionality. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-12-29[SCSI] fcoe: Fibre Channel over EthernetRobert Love
Encapsulation protocol for running Fibre Channel over Ethernet interfaces. Creates virtual Fibre Channel host adapters using libfc. This layer is the LLD to the scsi-ml. It allocates the Scsi_Host, utilizes libfc for Fibre Channel protocol processing and interacts with netdev to send/receive Ethernet packets. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-12-29[SCSI] libfc: A modular Fibre Channel libraryRobert Love
libFC is composed of 4 blocks supported by an exchange manager and a framing library. The upper 4 layers are fc_lport, fc_disc, fc_rport and fc_fcp. A LLD that uses libfc could choose to either use libfc's block, or using the transport template defined in libfc.h, override one or more blocks with its own implementation. The EM (Exchange Manager) manages exhcanges/sequences for all commands- ELS, CT and FCP. The framing library frames ELS and CT commands. The fc_lport block manages the library's representation of the host's FC enabled ports. The fc_disc block manages discovery of targets as well as handling changes that occur in the FC fabric (via. RSCN events). The fc_rport block manages the library's representation of other entities in the FC fabric. Currently the library uses this block for targets, its peer when in point-to-point mode and the directory server, but can be extended for other entities if needed. The fc_fcp block interacts with the scsi-ml and handles all I/O. Signed-off-by: Robert Love <robert.w.love@intel.com> [jejb: added include of delay.h to fix ppc64 compile prob spotted by sfr] Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-12-29[SCSI] FC protocol definition header filesRobert Love
Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-12-29[SCSI] add residual argument to scsi_execute and scsi_execute_reqFUJITA Tomonori
scsi_execute() and scsi_execute_req() discard the residual length information. Some callers need it. This adds residual argument (optional) to scsi_execute and scsi_execute_req. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-12-29[SCSI] libiscsi_tcp: support padding offloadMike Christie
cxgb3i does not offload the processing of the header, but it will always process the padding. This patch adds a padding offload flag to detect when the LLD supports this. The patch also modifies the header processing so that we do not try to read/bypass the header dugest in the skb. cxgb3i will not include it with the header like with other offload cards. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-12-29[SCSI] libiscsi: pass opcode into alloc_pdu calloutMike Christie
We do not need to allocate a itt for data_out, so this passes the opcode to the alloc_pdu callout. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>