Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213306
b: refs/heads/master
c: 8196a93
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Sep 5, 2010
1 parent 074d11d commit 0fb04da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: 143beaa811aa3cfc4ae8b4a2092f232ad78b33da
refs/heads/master: 8196a934eea3810be6243b307b336136d63bbc48
14 changes: 10 additions & 4 deletions trunk/drivers/scsi/fnic/fnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,13 @@ 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;

if (!rport || fc_remote_port_chkready(rport))
return -ENXIO;

scsi_activate_tcq(sdev, FNIC_DFLT_QUEUE_DEPTH);
rport->dev_loss_tmo = fnic->config.port_down_timeout / 1000;

return 0;
}

Expand All @@ -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 *);
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 0fb04da

Please sign in to comment.