All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Eykholt <jeykholt@cisco.com>
To: michaelc@cs.wisc.edu
Cc: linux-scsi@vger.kernel.org, andrew.vasquez@qlogic.com,
	giridhar.malavali@qlogic.com, James.Smart@Emulex.Com,
	brking@us.ibm.com
Subject: Re: [PATCH 4/5] fnic: do not reset dev_loss_tmo in slave callout
Date: Fri, 06 Aug 2010 08:06:31 -0700	[thread overview]
Message-ID: <4C5C24F7.3050403@cisco.com> (raw)
In-Reply-To: <1281081761-24586-5-git-send-email-michaelc@cs.wisc.edu>

On 8/6/10 1:02 AM, michaelc@cs.wisc.edu wrote:
> From: Mike Christie<michaelc@cs.wisc.edu>
>
> This fixes a bug where the driver was resetting the
> rport dev_loss_tmo when devices were added by adding
> support for the get_host_def_dev_loss_tmo callout.

fnic devloss timeout isn't settable on the host.
It's only configurable from network configuration.
So, I think this patch is unnecessary.

Note that we don't have a set method, so the
/sys file will be read-only.

> Patch has only been compile tested.
>
> Signed-off-by: Mike Christie<michaelc@cs.wisc.edu>
> ---
>   drivers/scsi/fnic/fnic_main.c |   14 ++++++++++----
>   1 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
> index 9eb7a9e..df91a61 100644
> --- a/drivers/scsi/fnic/fnic_main.c
> +++ b/drivers/scsi/fnic/fnic_main.c
> @@ -80,8 +80,6 @@ static struct libfc_function_template fnic_transport_template = {
>   static int fnic_slave_alloc(struct scsi_device *sdev)
>   {
>   	struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
> -	struct fc_lport *lp = shost_priv(sdev->host);
> -	struct fnic *fnic = lport_priv(lp);
>
>   	sdev->tagged_supported = 1;
>
> @@ -89,8 +87,6 @@ static int fnic_slave_alloc(struct scsi_device *sdev)
>   		return -ENXIO;
>
>   	scsi_activate_tcq(sdev, FNIC_DFLT_QUEUE_DEPTH);
> -	rport->dev_loss_tmo = fnic->config.port_down_timeout / 1000;
> -
>   	return 0;
>   }
>
> @@ -113,6 +109,15 @@ static struct scsi_host_template fnic_host_template = {
>   	.shost_attrs = fnic_attrs,
>   };
>
> +static void
> +fnic_get_host_def_loss_tmo(struct Scsi_Host *shost)
> +{
> +	struct fc_lport *lp = shost_priv(shost);
> +	struct fnic *fnic = lport_priv(lp);
> +
> +	fc_host_def_dev_loss_tmo(shost) = fnic->config.port_down_timeout / 1000;
> +}
> +
>   static void fnic_get_host_speed(struct Scsi_Host *shost);
>   static struct scsi_transport_template *fnic_fc_transport;
>   static struct fc_host_statistics *fnic_get_stats(struct Scsi_Host *);
> @@ -142,6 +147,7 @@ static struct fc_function_template fnic_fc_functions = {
>   	.show_rport_dev_loss_tmo = 1,
>   	.issue_fc_host_lip = fnic_reset,
>   	.get_fc_host_stats = fnic_get_stats,
> +	.get_host_def_dev_loss_tmo = fnic_get_host_def_loss_tmo,
>   	.dd_fcrport_size = sizeof(struct fc_rport_libfc_priv),
>   	.terminate_rport_io = fnic_terminate_rport_io,
>   	.bsg_request = fc_lport_bsg_request,

  parent reply	other threads:[~2010-08-06 15:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06  8:02 FC: fix rport dev_loss_tmo initialization michaelc
2010-08-06  8:02 ` [PATCH 1/5] fc class: add fc host default default dev loss setting michaelc
2010-08-06  8:02   ` [PATCH 2/5] qla2xxx: do not reset dev_loss_tmo in slave callout michaelc
2010-08-06  8:02     ` [PATCH 3/5] lpfc: " michaelc
2010-08-06  8:02       ` [PATCH 4/5] fnic: " michaelc
2010-08-06  8:02         ` [PATCH 5/5] ibmvfc: " michaelc
2010-08-06 15:06         ` Joe Eykholt [this message]
2010-08-06 16:32           ` [PATCH 4/5] fnic: " Mike Christie
2010-08-06 16:51             ` Mike Christie
2010-08-06 20:20               ` James Bottomley
2010-08-06 21:14                 ` Mike Christie
2010-08-06  8:05       ` [PATCH 3/5] lpfc: " Mike Christie
2010-08-09 14:53   ` [PATCH 1/5] fc class: add fc host default default dev loss setting James Smart
2010-08-09 15:00     ` Mike Christie
2010-08-09 15:17       ` Mike Christie
2010-08-09 18:32         ` Andrew Vasquez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C5C24F7.3050403@cisco.com \
    --to=jeykholt@cisco.com \
    --cc=James.Smart@Emulex.Com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=brking@us.ibm.com \
    --cc=giridhar.malavali@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.