History log of /drivers/scsi/libfc/fc_libfc.h
Revision Date Author Comments
8e6c5363dc52afbc60011c2c079bf4c4d26b1272 04-Dec-2012 Robert Love <robert.w.love@intel.com> libfc, libfcoe, fcoe: Convert debug_logging macros to pr_info

Convert libfc, libfcoe and fcoe's debug_logging macros
to use pr_info() instead of printk(KERN_INFO, ...). checkpatch.pl
now complains about this, so convert libfcoe to preferred
method.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com>
77dfce076cbd76c04e90abff188d058cdbff78dd 25-Nov-2011 Cong Wang <amwang@redhat.com> scsi: remove the second argument of k[un]map_atomic()

Signed-off-by: Cong Wang <amwang@redhat.com>
6a716a8535ea8ed7676cea1e122f1c3d02e55b6b 17-May-2011 Yi Zou <yi.zou@intel.com> [SCSI] libfc: release DDP context if frame_send() fails

In case frame_send() fails, make sure to let the underlying HW release the DDP
context that has already been set up before calling frame_send().

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
acc1a921659561c4ea97eca6e3c2633adecbcd81 29-Jan-2011 Kiran Patil <kiran.patil@intel.com> [SCSI] libfc: Extending lport's roles for target if there is a registered 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>
70d53b046a6221e3ceb3bd8eaa807ef6a1c53762 29-Jan-2011 Joe Eykholt <jeykholt@cisco.com> [SCSI] libfc: add hook to notify providers of local port changes

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>
96ad846445ae33dcae1805b68752e3d5c840e3ed 29-Jan-2011 Joe Eykholt <jeykholt@cisco.com> [SCSI] libfc: add hook for FC-4 provider registration

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>
9b90dc80ba2e566a48585174b1e5ab00e16f0456 01-Dec-2010 Yi Zou <yi.zou@intel.com> [SCSI] libfc: add print of exchange id for debugging fc_fcp

This is very helpful to match up the corresponding exchange to the actual I/O
described by the fsp, particularly when you do a side-by-side comparison of
the syslog with your trace.

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>
0685230c59b5482e04ab50e7afc51119ceaba651 21-Jul-2010 Joe Eykholt <jeykholt@cisco.com> [SCSI] libfc: add discovery-private pointer for LLD

For VN_port to VN_port mode, FIP will do discovery and needs a
way to find its state from the local port or discovery structure.
It seems that any other LLD that implements its own discovery
would also need something like this.

Replace disc->lport with disc->priv, and use container_of to
find the lport. We could use disc->priv for that, but
container_of is smaller and faster.

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>
7b2787ec15b9d1c2f716da61b0eec21a3f5e6520 08-May-2010 Robert Love <robert.w.love@intel.com> [SCSI] libfc: Move the port_id into lport

This patch creates a port_id member in struct fc_lport.
This allows libfc to just deal with fc_lport instances
instead of calling into the fc_host to get the port_id.

This change helps in only using symbols necessary for
operation from the libfc structures. libfc still needs
to change the fc_host_port_id() if the port_id changes
so the presentation layer (scsi_transport_fc) can provide
the user with the correct value, but libfc shouldn't
rely on the presentation layer for operational values.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
ce8b5df04292e93a117d9f863af206245bf61271 09-Apr-2010 Chris Leech <christopher.leech@intel.com> [SCSI] libfc: set both precision and field with when printing FC IDs

Most of the prints of fabric IDs were specified as %6x, which will not
print any leading 0s. It's nice to see leading 0s for identifiers
like this, which are a fixed length. This patch sets the precision
modifier as well, making the specifier %6.6x, which forces the
printing of leading 0s.

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@suse.de>
3a3b42bf89a9b90ae9ed2c57fdc378e5473a0ef9 03-Nov-2009 Robert Love <robert.w.love@intel.com> [SCSI] libfc: Formatting cleanups across libfc

This patch makes a variety of cleanup changes to all libfc files.

This patch adds kernel-doc headers to all functions lacking them
and attempts to better format existing headers. It also add kernel-doc
headers to structures.

This patch ensures that the current naming conventions for local ports,
remote ports and remote port private data is upheld in the following
manner.

struct instance (i.e. variable name)
--------------------------------------------------
fc_lport lport
fc_rport rport
fc_rport_libfc_priv rpriv
fc_rport_priv rdata

I also renamed dns_rp and ptp_rp to dns_rdata and ptp_rdata
respectively.

I used emacs 'indent-region' and 'tabify' on all libfc files
to correct spacing alignments.

I feel sorry for anyone attempting to review this patch.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
5868287460b0fc243e828a0b856cd53d8bf45739 03-Nov-2009 Robert Love <robert.w.love@intel.com> [SCSI] libfc: Add routine to copy data from a buffer to a SG list

When handling the multi-frame responses of fc pass-thru requests,
a code segment similar to fc_fcp_recv_data (routine to receive
inbound SCSI data) is used in the response handler. This patch
is to add a routine, called fc_copy_buffer_to_sglist(), to handle
the common function of copying data from a buffer to a scatter-
gather list in order to avoid code duplication.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
93e6d5ab9969a9200752658677eafd96772302f0 03-Nov-2009 Robert Love <robert.w.love@intel.com> [SCSI] libfc: Move libfc_init and libfc_exit to fc_libfc.c

These routines are for the libfc kernel module and should be in
the libfc .c file.

Moving the libfc __init routine into fc_libfc.c caused the creation
of the fc_setup_fcp() and fc_destroy_fcp() routines so that
scsi_pkt_cachep was not exposed outside of fc_fcp.c.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
8866a5d9075b7129194576f5f810e85a693c40ba 03-Nov-2009 Robert Love <robert.w.love@intel.com> [SCSI] libfc: Add libfc/fc_libfc.[ch] for libfc internal routines

include/scsi/libfc.h is currently loaded with common code
shared between libfc's sub-modules as well as shared between
libfc and fcoe. Previous patches attempted to move out
non-common code. This patch creates two files for common
libfc routines that will not be shared with fcoe, fnic or
any other LLDs.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>