On Tue, 2008-10-14 at 17:46 -0700, Steve Ma wrote:
> The local port id is not showing correctly in /sys.
> This patch is to allow the most recent local port id setting
> to show in /sys.
>
> Signed-off-by: Steve Ma <[EMAIL PROTECTED]>
> ---
>
> drivers/scsi/libfc/fc_lport.c | 20 ++++++++------------
> include/scsi/libfc/libfc.h | 5 -----
> 2 files changed, 8 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
> index 569fdc1..d6136ee 100644
> --- a/drivers/scsi/libfc/fc_lport.c
> +++ b/drivers/scsi/libfc/fc_lport.c
> @@ -180,18 +180,6 @@ static void fc_lport_ptp_setup(struct fc_lport *lport,
> fc_lport_enter_ready(lport);
> }
>
> -/**
> - * fc_get_host_port_state - supports fc_function_template
> - * @shost: The host whose port state should be returned
> - */
> -void fc_get_host_port_id(struct Scsi_Host *shost)
> -{
> - struct fc_lport *lp = shost_priv(shost);
> -
> - fc_host_port_id(shost) = lp->fid;
> -}
> -EXPORT_SYMBOL(fc_get_host_port_id);
> -
> void fc_get_host_port_type(struct Scsi_Host *shost)
> {
> /* TODO - currently just NPORT */
> @@ -199,6 +187,10 @@ void fc_get_host_port_type(struct Scsi_Host *shost)
> }
> EXPORT_SYMBOL(fc_get_host_port_type);
>
> +/**
> + * fc_get_host_port_state - supports fc_function_template
> + * @shost: The host whose port state should be returned
> + */
> void fc_get_host_port_state(struct Scsi_Host *shost)
> {
> struct fc_lport *lp = shost_priv(shost);
> @@ -675,6 +667,7 @@ static void fc_lport_recv_flogi_req(struct fc_seq *sp_in,
> }
>
> lport->fid = local_fid;
> + fc_host_port_id(lport->host) = lport->fid;
Joe: Wasn't your comment that we shouldn't even have an lport->fid? Instead we
should just use the fc_host_port_id(Scsi_Host) all the time. Also, that we
should try and eliminate any other duplicated fields.
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel