diff options
-rw-r--r-- | drivers/scsi/fcoe/fcoe_sw.c | 2 | ||||
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 12 | ||||
-rw-r--r-- | include/scsi/libfcoe.h | 8 |
3 files changed, 8 insertions, 14 deletions
diff --git a/drivers/scsi/fcoe/fcoe_sw.c b/drivers/scsi/fcoe/fcoe_sw.c index 007d1fbae808..f667dce1bbba 100644 --- a/drivers/scsi/fcoe/fcoe_sw.c +++ b/drivers/scsi/fcoe/fcoe_sw.c | |||
@@ -297,7 +297,7 @@ static int fcoe_sw_destroy(struct net_device *netdev) | |||
297 | if (!lp) | 297 | if (!lp) |
298 | return -ENODEV; | 298 | return -ENODEV; |
299 | 299 | ||
300 | fc = fcoe_softc(lp); | 300 | fc = lport_priv(lp); |
301 | 301 | ||
302 | /* Logout of the fabric */ | 302 | /* Logout of the fabric */ |
303 | fc_fabric_logoff(lp); | 303 | fc_fabric_logoff(lp); |
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index d006d6576817..02f044a87159 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
@@ -387,7 +387,7 @@ int fcoe_xmit(struct fc_lport *lp, struct fc_frame *fp) | |||
387 | 387 | ||
388 | WARN_ON((fr_len(fp) % sizeof(u32)) != 0); | 388 | WARN_ON((fr_len(fp) % sizeof(u32)) != 0); |
389 | 389 | ||
390 | fc = fcoe_softc(lp); | 390 | fc = lport_priv(lp); |
391 | /* | 391 | /* |
392 | * if it is a flogi then we need to learn gw-addr | 392 | * if it is a flogi then we need to learn gw-addr |
393 | * and my own fcid | 393 | * and my own fcid |
@@ -768,7 +768,7 @@ static int fcoe_check_wait_queue(struct fc_lport *lp) | |||
768 | struct sk_buff *skb; | 768 | struct sk_buff *skb; |
769 | struct fcoe_softc *fc; | 769 | struct fcoe_softc *fc; |
770 | 770 | ||
771 | fc = fcoe_softc(lp); | 771 | fc = lport_priv(lp); |
772 | spin_lock_bh(&fc->fcoe_pending_queue.lock); | 772 | spin_lock_bh(&fc->fcoe_pending_queue.lock); |
773 | 773 | ||
774 | /* | 774 | /* |
@@ -805,7 +805,7 @@ static void fcoe_insert_wait_queue_head(struct fc_lport *lp, | |||
805 | { | 805 | { |
806 | struct fcoe_softc *fc; | 806 | struct fcoe_softc *fc; |
807 | 807 | ||
808 | fc = fcoe_softc(lp); | 808 | fc = lport_priv(lp); |
809 | spin_lock_bh(&fc->fcoe_pending_queue.lock); | 809 | spin_lock_bh(&fc->fcoe_pending_queue.lock); |
810 | __skb_queue_head(&fc->fcoe_pending_queue, skb); | 810 | __skb_queue_head(&fc->fcoe_pending_queue, skb); |
811 | spin_unlock_bh(&fc->fcoe_pending_queue.lock); | 811 | spin_unlock_bh(&fc->fcoe_pending_queue.lock); |
@@ -823,7 +823,7 @@ static void fcoe_insert_wait_queue(struct fc_lport *lp, | |||
823 | { | 823 | { |
824 | struct fcoe_softc *fc; | 824 | struct fcoe_softc *fc; |
825 | 825 | ||
826 | fc = fcoe_softc(lp); | 826 | fc = lport_priv(lp); |
827 | spin_lock_bh(&fc->fcoe_pending_queue.lock); | 827 | spin_lock_bh(&fc->fcoe_pending_queue.lock); |
828 | __skb_queue_tail(&fc->fcoe_pending_queue, skb); | 828 | __skb_queue_tail(&fc->fcoe_pending_queue, skb); |
829 | spin_unlock_bh(&fc->fcoe_pending_queue.lock); | 829 | spin_unlock_bh(&fc->fcoe_pending_queue.lock); |
@@ -1113,7 +1113,7 @@ MODULE_PARM_DESC(destroy, "Destroy fcoe port"); | |||
1113 | */ | 1113 | */ |
1114 | int fcoe_link_ok(struct fc_lport *lp) | 1114 | int fcoe_link_ok(struct fc_lport *lp) |
1115 | { | 1115 | { |
1116 | struct fcoe_softc *fc = fcoe_softc(lp); | 1116 | struct fcoe_softc *fc = lport_priv(lp); |
1117 | struct net_device *dev = fc->real_dev; | 1117 | struct net_device *dev = fc->real_dev; |
1118 | struct ethtool_cmd ecmd = { ETHTOOL_GSET }; | 1118 | struct ethtool_cmd ecmd = { ETHTOOL_GSET }; |
1119 | int rc = 0; | 1119 | int rc = 0; |
@@ -1329,7 +1329,7 @@ int fcoe_hostlist_add(const struct fc_lport *lp) | |||
1329 | 1329 | ||
1330 | fc = fcoe_hostlist_lookup_softc(fcoe_netdev(lp)); | 1330 | fc = fcoe_hostlist_lookup_softc(fcoe_netdev(lp)); |
1331 | if (!fc) { | 1331 | if (!fc) { |
1332 | fc = fcoe_softc(lp); | 1332 | fc = lport_priv(lp); |
1333 | write_lock_bh(&fcoe_hostlist_lock); | 1333 | write_lock_bh(&fcoe_hostlist_lock); |
1334 | list_add_tail(&fc->list, &fcoe_hostlist); | 1334 | list_add_tail(&fc->list, &fcoe_hostlist); |
1335 | write_unlock_bh(&fcoe_hostlist_lock); | 1335 | write_unlock_bh(&fcoe_hostlist_lock); |
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index 89fdbb9a6a1b..f43d3833a7a8 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h | |||
@@ -58,16 +58,10 @@ struct fcoe_softc { | |||
58 | u8 address_mode; | 58 | u8 address_mode; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static inline struct fcoe_softc *fcoe_softc( | ||
62 | const struct fc_lport *lp) | ||
63 | { | ||
64 | return (struct fcoe_softc *)lport_priv(lp); | ||
65 | } | ||
66 | |||
67 | static inline struct net_device *fcoe_netdev( | 61 | static inline struct net_device *fcoe_netdev( |
68 | const struct fc_lport *lp) | 62 | const struct fc_lport *lp) |
69 | { | 63 | { |
70 | return fcoe_softc(lp)->real_dev; | 64 | return ((struct fcoe_softc *)lport_priv(lp))->real_dev; |
71 | } | 65 | } |
72 | 66 | ||
73 | static inline struct fcoe_hdr *skb_fcoe_header(const struct sk_buff *skb) | 67 | static inline struct fcoe_hdr *skb_fcoe_header(const struct sk_buff *skb) |