linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument
@ 2011-02-04  2:47 Bhanu Gollapudi
  2011-02-25 16:53 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Bhanu Gollapudi @ 2011-02-04  2:47 UTC (permalink / raw)
  To: linux-scsi@vger.kernel.org, devel@open-fcoe.org; +Cc: Mike Christie

fc_fill_fc_hdr() expects fc_frame as an argument. Introduce __fc_fill_fc_hdr to
accept fc_frame_header as an argument.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
---
 include/scsi/fc_encode.h |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/include/scsi/fc_encode.h b/include/scsi/fc_encode.h
index 6d293c8..be418d8 100644
--- a/include/scsi/fc_encode.h
+++ b/include/scsi/fc_encode.h
@@ -46,16 +46,11 @@ struct fc_ct_req {
 	} payload;
 };
 
-/**
- * fill FC header fields in specified fc_frame
- */
-static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl,
-				  u32 did, u32 sid, enum fc_fh_type type,
-				  u32 f_ctl, u32 parm_offset)
+static inline void __fc_fill_fc_hdr(struct fc_frame_header *fh,
+				    enum fc_rctl r_ctl,
+				    u32 did, u32 sid, enum fc_fh_type type,
+				    u32 f_ctl, u32 parm_offset)
 {
-	struct fc_frame_header *fh;
-
-	fh = fc_frame_header_get(fp);
 	WARN_ON(r_ctl == 0);
 	fh->fh_r_ctl = r_ctl;
 	hton24(fh->fh_d_id, did);
@@ -68,6 +63,19 @@ static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl,
 }
 
 /**
+ * fill FC header fields in specified fc_frame
+ */
+static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl,
+				  u32 did, u32 sid, enum fc_fh_type type,
+				  u32 f_ctl, u32 parm_offset)
+{
+	struct fc_frame_header *fh;
+
+	fh = fc_frame_header_get(fp);
+	__fc_fill_fc_hdr(fh, r_ctl, did, sid, type, f_ctl, parm_offset);
+}
+
+/**
  * fc_adisc_fill() - Fill in adisc request frame
  * @lport: local port.
  * @fp: fc frame where payload will be placed.
-- 
1.7.0.6





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument
  2011-02-04  2:47 [PATCH] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument Bhanu Gollapudi
@ 2011-02-25 16:53 ` James Bottomley
  2011-02-25 23:05   ` Robert Love
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2011-02-25 16:53 UTC (permalink / raw)
  To: Bhanu Gollapudi
  Cc: linux-scsi@vger.kernel.org, devel@open-fcoe.org, Mike Christie,
	robert.w.love

On Thu, 2011-02-03 at 18:47 -0800, Bhanu Gollapudi wrote:
> fc_fill_fc_hdr() expects fc_frame as an argument. Introduce __fc_fill_fc_hdr to
> accept fc_frame_header as an argument.

Not sure you noticed this, Robert, but I need it to get the bnx2fc
driver compiling ... could you ack or send as part of the libfc updates?

Thanks,

James


> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
> ---
>       include/scsi/fc_encode.h |   26 +++++++++++++++++---------
>  1 files changed, 17 insertions(+), 9 deletions(-)
> 
> diff --git a/include/scsi/fc_encode.h b/include/scsi/fc_encode.h
> index 6d293c8..be418d8 100644
> --- a/include/scsi/fc_encode.h
> +++ b/include/scsi/fc_encode.h
> @@ -46,16 +46,11 @@ struct fc_ct_req {
>  	} payload;
>  };
>  
> -/**
> - * fill FC header fields in specified fc_frame
> - */
> -static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl,
> -				  u32 did, u32 sid, enum fc_fh_type type,
> -				  u32 f_ctl, u32 parm_offset)
> +static inline void __fc_fill_fc_hdr(struct fc_frame_header *fh,
> +				    enum fc_rctl r_ctl,
> +				    u32 did, u32 sid, enum fc_fh_type type,
> +				    u32 f_ctl, u32 parm_offset)
>  {
> -	struct fc_frame_header *fh;
> -
> -	fh = fc_frame_header_get(fp);
>  	WARN_ON(r_ctl == 0);
>  	fh->fh_r_ctl = r_ctl;
>  	hton24(fh->fh_d_id, did);
> @@ -68,6 +63,19 @@ static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl,
>  }
>  
>  /**
> + * fill FC header fields in specified fc_frame
> + */
> +static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl,
> +				  u32 did, u32 sid, enum fc_fh_type type,
> +				  u32 f_ctl, u32 parm_offset)
> +{
> +	struct fc_frame_header *fh;
> +
> +	fh = fc_frame_header_get(fp);
> +	__fc_fill_fc_hdr(fh, r_ctl, did, sid, type, f_ctl, parm_offset);
> +}
> +
> +/**
>   * fc_adisc_fill() - Fill in adisc request frame
>   * @lport: local port.
>   * @fp: fc frame where payload will be placed.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument
  2011-02-25 16:53 ` James Bottomley
@ 2011-02-25 23:05   ` Robert Love
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Love @ 2011-02-25 23:05 UTC (permalink / raw)
  To: James Bottomley
  Cc: Bhanu Gollapudi, linux-scsi@vger.kernel.org, devel@open-fcoe.org,
	Mike Christie

On Fri, 2011-02-25 at 08:53 -0800, James Bottomley wrote:
> On Thu, 2011-02-03 at 18:47 -0800, Bhanu Gollapudi wrote:
> > fc_fill_fc_hdr() expects fc_frame as an argument. Introduce __fc_fill_fc_hdr to
> > accept fc_frame_header as an argument.
> 
> Not sure you noticed this, Robert, but I need it to get the bnx2fc
> driver compiling ... could you ack or send as part of the libfc updates?
> 

It's in the update I just mailed, [patch 4/8].

Thanks, //Rob


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-25 23:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-04  2:47 [PATCH] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument Bhanu Gollapudi
2011-02-25 16:53 ` James Bottomley
2011-02-25 23:05   ` Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).