Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204257
b: refs/heads/master
c: 0685230
h: refs/heads/master
i:
  204255: 17969c6
v: v3
  • Loading branch information
Joe Eykholt authored and James Bottomley committed Jul 28, 2010
1 parent 8ad0ea2 commit b263bd0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 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: fdb068c6cd6e30d43664f856d3530715a5742713
refs/heads/master: 0685230c59b5482e04ab50e7afc51119ceaba651
14 changes: 7 additions & 7 deletions trunk/drivers/scsi/libfc/fc_disc.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void fc_disc_stop_rports(struct fc_disc *disc)
struct fc_lport *lport;
struct fc_rport_priv *rdata;

lport = disc->lport;
lport = fc_disc_lport(disc);

mutex_lock(&disc->disc_mutex);
list_for_each_entry_rcu(rdata, &disc->rports, peers)
Expand Down Expand Up @@ -96,7 +96,7 @@ static void fc_disc_recv_rscn_req(struct fc_seq *sp, struct fc_frame *fp,
LIST_HEAD(disc_ports);
struct fc_disc_port *dp, *next;

lport = disc->lport;
lport = fc_disc_lport(disc);

FC_DISC_DBG(disc, "Received an RSCN event\n");

Expand Down Expand Up @@ -275,7 +275,7 @@ static void fc_disc_start(void (*disc_callback)(struct fc_lport *,
*/
static void fc_disc_done(struct fc_disc *disc, enum fc_disc_event event)
{
struct fc_lport *lport = disc->lport;
struct fc_lport *lport = fc_disc_lport(disc);
struct fc_rport_priv *rdata;

FC_DISC_DBG(disc, "Discovery complete\n");
Expand Down Expand Up @@ -313,7 +313,7 @@ static void fc_disc_done(struct fc_disc *disc, enum fc_disc_event event)
*/
static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp)
{
struct fc_lport *lport = disc->lport;
struct fc_lport *lport = fc_disc_lport(disc);
unsigned long delay = 0;

FC_DISC_DBG(disc, "Error %ld, retries %d/%d\n",
Expand Down Expand Up @@ -353,7 +353,7 @@ static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp)
static void fc_disc_gpn_ft_req(struct fc_disc *disc)
{
struct fc_frame *fp;
struct fc_lport *lport = disc->lport;
struct fc_lport *lport = fc_disc_lport(disc);

WARN_ON(!fc_lport_test_ready(lport));

Expand Down Expand Up @@ -396,7 +396,7 @@ static int fc_disc_gpn_ft_parse(struct fc_disc *disc, void *buf, size_t len)
struct fc_rport_identifiers ids;
struct fc_rport_priv *rdata;

lport = disc->lport;
lport = fc_disc_lport(disc);
disc->seq_count++;

/*
Expand Down Expand Up @@ -733,7 +733,7 @@ int fc_disc_init(struct fc_lport *lport)
mutex_init(&disc->disc_mutex);
INIT_LIST_HEAD(&disc->rports);

disc->lport = lport;
disc->priv = lport;

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/libfc/fc_libfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extern unsigned int fc_debug_logging;
#define FC_DISC_DBG(disc, fmt, args...) \
FC_CHECK_LOGGING(FC_DISC_LOGGING, \
printk(KERN_INFO "host%u: disc: " fmt, \
(disc)->lport->host->host_no, \
fc_disc_lport(disc)->host->host_no, \
##args))

#define FC_RPORT_ID_DBG(lport, port_id, fmt, args...) \
Expand Down
9 changes: 7 additions & 2 deletions trunk/include/scsi/libfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ struct libfc_function_template {
* @buf_len: Length of the discovery buffer
* @disc_id: Discovery ID
* @rports: List of discovered remote ports
* @lport: The local port that discovery is for
* @priv: Private pointer for use by discovery code
* @disc_mutex: Mutex that protects the discovery context
* @partial_buf: Partial name buffer (if names are returned
* in multiple frames)
Expand All @@ -755,7 +755,7 @@ struct fc_disc {
u16 disc_id;

struct list_head rports;
struct fc_lport *lport;
void *priv;
struct mutex disc_mutex;
struct fc_gpn_ft_resp partial_buf;
struct delayed_work disc_work;
Expand Down Expand Up @@ -1003,6 +1003,11 @@ void fc_rport_terminate_io(struct fc_rport *);
*****************************/
int fc_disc_init(struct fc_lport *);

static inline struct fc_lport *fc_disc_lport(struct fc_disc *disc)
{
return container_of(disc, struct fc_lport, disc);
}

/*
* FCP LAYER
*****************************/
Expand Down

0 comments on commit b263bd0

Please sign in to comment.