Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161026
b: refs/heads/master
c: 52ff878
h: refs/heads/master
v: v3
  • Loading branch information
Vasu Dev authored and James Bottomley committed Aug 22, 2009
1 parent ac7692d commit 81c0f72
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 138 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: d459b7ea1b4c7aa3dacfeee174d02b2f7a95850d
refs/heads/master: 52ff878c912215210f53c0a080552dd6ba3055a2
16 changes: 6 additions & 10 deletions trunk/drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,8 @@ static int fcoe_shost_config(struct fc_lport *lp, struct Scsi_Host *shost,
*/
static inline int fcoe_em_config(struct fc_lport *lp)
{
BUG_ON(lp->emp);

lp->emp = fc_exch_mgr_alloc(lp, FC_CLASS_3,
FCOE_MIN_XID, FCOE_MAX_XID);
if (!lp->emp)
if (!fc_exch_mgr_alloc(lp, FC_CLASS_3, FCOE_MIN_XID,
FCOE_MAX_XID, NULL))
return -ENOMEM;

return 0;
Expand Down Expand Up @@ -478,8 +475,7 @@ static int fcoe_if_destroy(struct net_device *netdev)
scsi_remove_host(lp->host);

/* There are no more rports or I/O, free the EM */
if (lp->emp)
fc_exch_mgr_free(lp->emp);
fc_exch_mgr_free(lp);

/* Free existing skbs */
fcoe_clean_pending_queue(lp);
Expand Down Expand Up @@ -634,7 +630,7 @@ static int fcoe_if_create(struct net_device *netdev)
return rc;

out_lp_destroy:
fc_exch_mgr_free(lp->emp); /* Free the EM */
fc_exch_mgr_free(lp);
out_netdev_cleanup:
fcoe_netdev_cleanup(fc);
out_host_put:
Expand Down Expand Up @@ -1277,7 +1273,7 @@ int fcoe_percpu_receive_thread(void *arg)
fh = fc_frame_header_get(fp);
if (fh->fh_r_ctl == FC_RCTL_DD_SOL_DATA &&
fh->fh_type == FC_TYPE_FCP) {
fc_exch_recv(lp, lp->emp, fp);
fc_exch_recv(lp, fp);
continue;
}
if (fr_flags(fp) & FCPHF_CRC_UNCHECKED) {
Expand All @@ -1298,7 +1294,7 @@ int fcoe_percpu_receive_thread(void *arg)
fc_frame_free(fp);
continue;
}
fc_exch_recv(lp, lp->emp, fp);
fc_exch_recv(lp, fp);
}
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/fcoe/libfcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb)
stats->RxFrames++;
stats->RxWords += skb->len / FIP_BPW;

fc_exch_recv(lp, lp->emp, fp);
fc_exch_recv(lp, fp);
return;

len_err:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/fnic/fnic_fcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void fnic_handle_frame(struct work_struct *work)
}
spin_unlock_irqrestore(&fnic->fnic_lock, flags);

fc_exch_recv(lp, lp->emp, fp);
fc_exch_recv(lp, fp);
}

}
Expand Down
20 changes: 9 additions & 11 deletions trunk/drivers/scsi/fnic/fnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,14 +671,6 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
lp->link_up = 0;
lp->tt = fnic_transport_template;

lp->emp = fc_exch_mgr_alloc(lp, FC_CLASS_3,
FCPIO_HOST_EXCH_RANGE_START,
FCPIO_HOST_EXCH_RANGE_END);
if (!lp->emp) {
err = -ENOMEM;
goto err_out_remove_scsi_host;
}

lp->max_retry_count = fnic->config.flogi_retries;
lp->max_rport_retry_count = fnic->config.plogi_retries;
lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS |
Expand All @@ -693,12 +685,18 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
fc_set_wwnn(lp, fnic->config.node_wwn);
fc_set_wwpn(lp, fnic->config.port_wwn);

fc_exch_init(lp);
fc_lport_init(lp);
fc_exch_init(lp);
fc_elsct_init(lp);
fc_rport_init(lp);
fc_disc_init(lp);

if (!fc_exch_mgr_alloc(lp, FC_CLASS_3, FCPIO_HOST_EXCH_RANGE_START,
FCPIO_HOST_EXCH_RANGE_END, NULL)) {
err = -ENOMEM;
goto err_out_remove_scsi_host;
}

fc_lport_config(lp);

if (fc_set_mfs(lp, fnic->config.maxdatafieldsize +
Expand Down Expand Up @@ -738,7 +736,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
return 0;

err_out_free_exch_mgr:
fc_exch_mgr_free(lp->emp);
fc_exch_mgr_free(lp);
err_out_remove_scsi_host:
fc_remove_host(fnic->lport->host);
scsi_remove_host(fnic->lport->host);
Expand Down Expand Up @@ -827,7 +825,7 @@ static void __devexit fnic_remove(struct pci_dev *pdev)

fc_remove_host(fnic->lport->host);
scsi_remove_host(fnic->lport->host);
fc_exch_mgr_free(fnic->lport->emp);
fc_exch_mgr_free(fnic->lport);
vnic_dev_notify_unset(fnic->vdev);
fnic_free_vnic_resources(fnic);
fnic_free_intr(fnic);
Expand Down
Loading

0 comments on commit 81c0f72

Please sign in to comment.