aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/fcoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.c')
-rw-r--r--drivers/scsi/fcoe/fcoe.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 30161a26387a..d5f009ad0388 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -70,8 +70,6 @@ static struct fc_lport *fcoe_hostlist_lookup(const struct net_device *);
70static int fcoe_hostlist_add(const struct fc_lport *); 70static int fcoe_hostlist_add(const struct fc_lport *);
71static int fcoe_hostlist_remove(const struct fc_lport *); 71static int fcoe_hostlist_remove(const struct fc_lport *);
72 72
73static struct Scsi_Host *fcoe_host_alloc(struct scsi_host_template *, int);
74
75static int fcoe_check_wait_queue(struct fc_lport *); 73static int fcoe_check_wait_queue(struct fc_lport *);
76static void fcoe_recv_flogi(struct fcoe_softc *, struct fc_frame *, u8 *); 74static void fcoe_recv_flogi(struct fcoe_softc *, struct fc_frame *, u8 *);
77static int fcoe_device_notification(struct notifier_block *, ulong, void *); 75static int fcoe_device_notification(struct notifier_block *, ulong, void *);
@@ -464,8 +462,8 @@ static int fcoe_if_create(struct net_device *netdev)
464 if (lp) 462 if (lp)
465 return -EEXIST; 463 return -EEXIST;
466 464
467 shost = fcoe_host_alloc(&fcoe_shost_template, 465 shost = libfc_host_alloc(&fcoe_shost_template,
468 sizeof(struct fcoe_softc)); 466 sizeof(struct fcoe_softc));
469 if (!shost) { 467 if (!shost) {
470 FC_DBG("Could not allocate host structure\n"); 468 FC_DBG("Could not allocate host structure\n");
471 return -ENOMEM; 469 return -ENOMEM;
@@ -1716,33 +1714,6 @@ void fcoe_clean_pending_queue(struct fc_lport *lp)
1716EXPORT_SYMBOL_GPL(fcoe_clean_pending_queue); 1714EXPORT_SYMBOL_GPL(fcoe_clean_pending_queue);
1717 1715
1718/** 1716/**
1719 * libfc_host_alloc() - Allocate a Scsi_Host with room for the fc_lport
1720 * @sht: ptr to the scsi host templ
1721 * @priv_size: size of private data after fc_lport
1722 *
1723 * Returns: ptr to Scsi_Host
1724 * TODO: to libfc?
1725 */
1726static inline struct Scsi_Host *
1727libfc_host_alloc(struct scsi_host_template *sht, int priv_size)
1728{
1729 return scsi_host_alloc(sht, sizeof(struct fc_lport) + priv_size);
1730}
1731
1732/**
1733 * fcoe_host_alloc() - Allocate a Scsi_Host with room for the fcoe_softc
1734 * @sht: ptr to the scsi host templ
1735 * @priv_size: size of private data after fc_lport
1736 *
1737 * Returns: ptr to Scsi_Host
1738 */
1739struct Scsi_Host *fcoe_host_alloc(struct scsi_host_template *sht, int priv_size)
1740{
1741 return libfc_host_alloc(sht, sizeof(struct fcoe_softc) + priv_size);
1742}
1743EXPORT_SYMBOL_GPL(fcoe_host_alloc);
1744
1745/**
1746 * fcoe_reset() - Resets the fcoe 1717 * fcoe_reset() - Resets the fcoe
1747 * @shost: shost the reset is from 1718 * @shost: shost the reset is from
1748 * 1719 *