Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173661
b: refs/heads/master
c: 3a3b42b
h: refs/heads/master
i:
  173659: 43de4f1
v: v3
  • Loading branch information
Robert Love authored and James Bottomley committed Dec 4, 2009
1 parent 6ca469d commit 084fadb
Show file tree
Hide file tree
Showing 10 changed files with 1,625 additions and 1,256 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a51ab39606042e76a483547620699530caa12c40
refs/heads/master: 3a3b42bf89a9b90ae9ed2c57fdc378e5473a0ef9
78 changes: 38 additions & 40 deletions trunk/drivers/scsi/libfc/fc_disc.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ static int fc_disc_single(struct fc_lport *, struct fc_disc_port *);
static void fc_disc_restart(struct fc_disc *);

/**
* fc_disc_stop_rports() - delete all the remote ports associated with the lport
* @disc: The discovery job to stop rports on
* fc_disc_stop_rports() - Delete all the remote ports associated with the lport
* @disc: The discovery job to stop remote ports on
*
* Locking Note: This function expects that the lport mutex is locked before
* calling it.
Expand All @@ -74,9 +74,9 @@ void fc_disc_stop_rports(struct fc_disc *disc)

/**
* fc_disc_recv_rscn_req() - Handle Registered State Change Notification (RSCN)
* @sp: Current sequence of the RSCN exchange
* @fp: RSCN Frame
* @lport: Fibre Channel host port instance
* @sp: The sequence of the RSCN exchange
* @fp: The RSCN frame
* @lport: The local port that the request will be sent on
*
* Locking Note: This function expects that the disc_mutex is locked
* before it is called.
Expand Down Expand Up @@ -185,9 +185,9 @@ static void fc_disc_recv_rscn_req(struct fc_seq *sp, struct fc_frame *fp,

/**
* fc_disc_recv_req() - Handle incoming requests
* @sp: Current sequence of the request exchange
* @fp: The frame
* @lport: The FC local port
* @sp: The sequence of the request exchange
* @fp: The request frame
* @lport: The local port receiving the request
*
* Locking Note: This function is called from the EM and will lock
* the disc_mutex before calling the handler for the
Expand Down Expand Up @@ -215,7 +215,7 @@ static void fc_disc_recv_req(struct fc_seq *sp, struct fc_frame *fp,

/**
* fc_disc_restart() - Restart discovery
* @lport: FC discovery context
* @disc: The discovery object to be restarted
*
* Locking Note: This function expects that the disc mutex
* is already locked.
Expand All @@ -242,9 +242,9 @@ static void fc_disc_restart(struct fc_disc *disc)
}

/**
* fc_disc_start() - Fibre Channel Target discovery
* @lport: FC local port
* @disc_callback: function to be called when discovery is complete
* fc_disc_start() - Start discovery on a local port
* @lport: The local port to have discovery started on
* @disc_callback: Callback function to be called when discovery is complete
*/
static void fc_disc_start(void (*disc_callback)(struct fc_lport *,
enum fc_disc_event),
Expand All @@ -265,8 +265,8 @@ static void fc_disc_start(void (*disc_callback)(struct fc_lport *,

/**
* fc_disc_done() - Discovery has been completed
* @disc: FC discovery context
* @event: discovery completion status
* @disc: The discovery context
* @event: The discovery completion status
*
* Locking Note: This function expects that the disc mutex is locked before
* it is called. The discovery callback is then made with the lock released,
Expand All @@ -286,8 +286,8 @@ static void fc_disc_done(struct fc_disc *disc, enum fc_disc_event event)
}

/*
* Go through all remote ports. If they were found in the latest
* discovery, reverify or log them in. Otherwise, log them out.
* Go through all remote ports. If they were found in the latest
* discovery, reverify or log them in. Otherwise, log them out.
* Skip ports which were never discovered. These are the dNS port
* and ports which were created by PLOGI.
*/
Expand All @@ -307,8 +307,8 @@ static void fc_disc_done(struct fc_disc *disc, enum fc_disc_event event)

/**
* fc_disc_error() - Handle error on dNS request
* @disc: FC discovery context
* @fp: The frame pointer
* @disc: The discovery context
* @fp: The error code encoded as a frame pointer
*/
static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp)
{
Expand Down Expand Up @@ -344,7 +344,7 @@ static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp)

/**
* fc_disc_gpn_ft_req() - Send Get Port Names by FC-4 type (GPN_FT) request
* @lport: FC discovery context
* @lport: The discovery context
*
* Locking Note: This function expects that the disc_mutex is locked
* before it is called.
Expand Down Expand Up @@ -378,9 +378,9 @@ static void fc_disc_gpn_ft_req(struct fc_disc *disc)

/**
* fc_disc_gpn_ft_parse() - Parse the body of the dNS GPN_FT response.
* @lport: Fibre Channel host port instance
* @buf: GPN_FT response buffer
* @len: size of response buffer
* @lport: The local port the GPN_FT was received on
* @buf: The GPN_FT response buffer
* @len: The size of response buffer
*
* Goes through the list of IDs and names resulting from a request.
*/
Expand Down Expand Up @@ -479,10 +479,8 @@ static int fc_disc_gpn_ft_parse(struct fc_disc *disc, void *buf, size_t len)
}

/**
* fc_disc_timeout() - Retry handler for the disc component
* @work: Structure holding disc obj that needs retry discovery
*
* Handle retry of memory allocation for remote ports.
* fc_disc_timeout() - Handler for discovery timeouts
* @work: Structure holding discovery context that needs to retry discovery
*/
static void fc_disc_timeout(struct work_struct *work)
{
Expand All @@ -496,9 +494,9 @@ static void fc_disc_timeout(struct work_struct *work)

/**
* fc_disc_gpn_ft_resp() - Handle a response frame from Get Port Names (GPN_FT)
* @sp: Current sequence of GPN_FT exchange
* @fp: response frame
* @lp_arg: Fibre Channel host port instance
* @sp: The sequence that the GPN_FT response was received on
* @fp: The GPN_FT response frame
* @lp_arg: The discovery context
*
* Locking Note: This function is called without disc mutex held, and
* should do all its processing with the mutex held
Expand Down Expand Up @@ -569,9 +567,9 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp,

/**
* fc_disc_gpn_id_resp() - Handle a response frame from Get Port Names (GPN_ID)
* @sp: exchange sequence
* @fp: response frame
* @rdata_arg: remote port private data
* @sp: The sequence the GPN_ID is on
* @fp: The response frame
* @rdata_arg: The remote port that sent the GPN_ID response
*
* Locking Note: This function is called without disc mutex held.
*/
Expand Down Expand Up @@ -639,7 +637,7 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp,

/**
* fc_disc_gpn_id_req() - Send Get Port Names by ID (GPN_ID) request
* @lport: local port
* @lport: The local port to initiate discovery on
* @rdata: remote port private data
*
* Locking Note: This function expects that the disc_mutex is locked
Expand All @@ -656,16 +654,16 @@ static int fc_disc_gpn_id_req(struct fc_lport *lport,
if (!fp)
return -ENOMEM;
if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, FC_NS_GPN_ID,
fc_disc_gpn_id_resp, rdata, lport->e_d_tov))
fc_disc_gpn_id_resp, rdata, lport->e_d_tov))
return -ENOMEM;
kref_get(&rdata->kref);
return 0;
}

/**
* fc_disc_single() - Discover the directory information for a single target
* @lport: local port
* @dp: The port to rediscover
* @lport: The local port the remote port is associated with
* @dp: The port to rediscover
*
* Locking Note: This function expects that the disc_mutex is locked
* before it is called.
Expand All @@ -683,7 +681,7 @@ static int fc_disc_single(struct fc_lport *lport, struct fc_disc_port *dp)

/**
* fc_disc_stop() - Stop discovery for a given lport
* @lport: The lport that discovery should stop for
* @lport: The local port that discovery should stop on
*/
void fc_disc_stop(struct fc_lport *lport)
{
Expand All @@ -697,7 +695,7 @@ void fc_disc_stop(struct fc_lport *lport)

/**
* fc_disc_stop_final() - Stop discovery for a given lport
* @lport: The lport that discovery should stop for
* @lport: The lport that discovery should stop on
*
* This function will block until discovery has been
* completely stopped and all rports have been deleted.
Expand All @@ -709,8 +707,8 @@ void fc_disc_stop_final(struct fc_lport *lport)
}

/**
* fc_disc_init() - Initialize the discovery block
* @lport: FC local port
* fc_disc_init() - Initialize the discovery layer for a local port
* @lport: The local port that needs the discovery layer to be initialized
*/
int fc_disc_init(struct fc_lport *lport)
{
Expand Down
33 changes: 21 additions & 12 deletions trunk/drivers/scsi/libfc/fc_elsct.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,22 @@
#include <scsi/libfc.h>
#include <scsi/fc_encode.h>

/*
* fc_elsct_send - sends ELS/CT frame
/**
* fc_elsct_send() - Send an ELS or CT frame
* @lport: The local port to send the frame on
* @did: The destination ID for the frame
* @fp: The frame to be sent
* @op: The operational code
* @resp: The callback routine when the response is received
* @arg: The argument to pass to the response callback routine
* @timer_msec: The timeout period for the frame (in msecs)
*/
struct fc_seq *fc_elsct_send(struct fc_lport *lport,
u32 did,
struct fc_frame *fp,
unsigned int op,
void (*resp)(struct fc_seq *,
struct fc_frame *fp,
void *arg),
void *arg, u32 timer_msec)
struct fc_seq *fc_elsct_send(struct fc_lport *lport, u32 did,
struct fc_frame *fp, unsigned int op,
void (*resp)(struct fc_seq *,
struct fc_frame *,
void *),
void *arg, u32 timer_msec)
{
enum fc_rctl r_ctl;
enum fc_fh_type fh_type;
Expand All @@ -65,6 +70,10 @@ struct fc_seq *fc_elsct_send(struct fc_lport *lport,
}
EXPORT_SYMBOL(fc_elsct_send);

/**
* fc_elsct_init() - Initialize the ELS/CT layer
* @lport: The local port to initialize the ELS/CT layer for
*/
int fc_elsct_init(struct fc_lport *lport)
{
if (!lport->tt.elsct_send)
Expand All @@ -75,8 +84,8 @@ int fc_elsct_init(struct fc_lport *lport)
EXPORT_SYMBOL(fc_elsct_init);

/**
* fc_els_resp_type() - return string describing ELS response for debug.
* @fp: frame pointer with possible error code.
* fc_els_resp_type() - Return a string describing the ELS response
* @fp: The frame pointer or possible error code
*/
const char *fc_els_resp_type(struct fc_frame *fp)
{
Expand Down
Loading

0 comments on commit 084fadb

Please sign in to comment.