diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
commit | bbb20089a3275a19e475dbc21320c3742e3ca423 (patch) | |
tree | 216fdc1cbef450ca688135c5b8969169482d9a48 /drivers/scsi/fcoe/libfcoe.c | |
parent | 3e48e656903e9fd8bc805c6a2c4264d7808d315b (diff) | |
parent | 657a77fa7284d8ae28dfa48f1dc5d919bf5b2843 (diff) |
Merge branch 'dmaengine' into async-tx-next
Conflicts:
crypto/async_tx/async_xor.c
drivers/dma/ioat/dma_v2.h
drivers/dma/ioat/pci.c
drivers/md/raid5.c
Diffstat (limited to 'drivers/scsi/fcoe/libfcoe.c')
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 125 |
1 files changed, 76 insertions, 49 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 62ba0f39c6bd..f544340d318b 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
@@ -56,15 +56,28 @@ static void fcoe_ctlr_recv_work(struct work_struct *); | |||
56 | 56 | ||
57 | static u8 fcoe_all_fcfs[ETH_ALEN] = FIP_ALL_FCF_MACS; | 57 | static u8 fcoe_all_fcfs[ETH_ALEN] = FIP_ALL_FCF_MACS; |
58 | 58 | ||
59 | static u32 fcoe_ctlr_debug; /* 1 for basic, 2 for noisy debug */ | 59 | unsigned int libfcoe_debug_logging; |
60 | module_param_named(debug_logging, libfcoe_debug_logging, int, S_IRUGO|S_IWUSR); | ||
61 | MODULE_PARM_DESC(debug_logging, "a bit mask of logging levels"); | ||
60 | 62 | ||
61 | #define FIP_DBG_LVL(level, fmt, args...) \ | 63 | #define LIBFCOE_LOGGING 0x01 /* General logging, not categorized */ |
64 | #define LIBFCOE_FIP_LOGGING 0x02 /* FIP logging */ | ||
65 | |||
66 | #define LIBFCOE_CHECK_LOGGING(LEVEL, CMD) \ | ||
67 | do { \ | ||
68 | if (unlikely(libfcoe_debug_logging & LEVEL)) \ | ||
62 | do { \ | 69 | do { \ |
63 | if (fcoe_ctlr_debug >= (level)) \ | 70 | CMD; \ |
64 | FC_DBG(fmt, ##args); \ | 71 | } while (0); \ |
65 | } while (0) | 72 | } while (0); |
73 | |||
74 | #define LIBFCOE_DBG(fmt, args...) \ | ||
75 | LIBFCOE_CHECK_LOGGING(LIBFCOE_LOGGING, \ | ||
76 | printk(KERN_INFO "libfcoe: " fmt, ##args);) | ||
66 | 77 | ||
67 | #define FIP_DBG(fmt, args...) FIP_DBG_LVL(1, fmt, ##args) | 78 | #define LIBFCOE_FIP_DBG(fmt, args...) \ |
79 | LIBFCOE_CHECK_LOGGING(LIBFCOE_FIP_LOGGING, \ | ||
80 | printk(KERN_INFO "fip: " fmt, ##args);) | ||
68 | 81 | ||
69 | /* | 82 | /* |
70 | * Return non-zero if FCF fcoe_size has been validated. | 83 | * Return non-zero if FCF fcoe_size has been validated. |
@@ -198,6 +211,8 @@ static void fcoe_ctlr_solicit(struct fcoe_ctlr *fip, struct fcoe_fcf *fcf) | |||
198 | sol->fip.fip_subcode = FIP_SC_SOL; | 211 | sol->fip.fip_subcode = FIP_SC_SOL; |
199 | sol->fip.fip_dl_len = htons(sizeof(sol->desc) / FIP_BPW); | 212 | sol->fip.fip_dl_len = htons(sizeof(sol->desc) / FIP_BPW); |
200 | sol->fip.fip_flags = htons(FIP_FL_FPMA); | 213 | sol->fip.fip_flags = htons(FIP_FL_FPMA); |
214 | if (fip->spma) | ||
215 | sol->fip.fip_flags |= htons(FIP_FL_SPMA); | ||
201 | 216 | ||
202 | sol->desc.mac.fd_desc.fip_dtype = FIP_DT_MAC; | 217 | sol->desc.mac.fd_desc.fip_dtype = FIP_DT_MAC; |
203 | sol->desc.mac.fd_desc.fip_dlen = sizeof(sol->desc.mac) / FIP_BPW; | 218 | sol->desc.mac.fd_desc.fip_dlen = sizeof(sol->desc.mac) / FIP_BPW; |
@@ -213,7 +228,7 @@ static void fcoe_ctlr_solicit(struct fcoe_ctlr *fip, struct fcoe_fcf *fcf) | |||
213 | sol->desc.size.fd_size = htons(fcoe_size); | 228 | sol->desc.size.fd_size = htons(fcoe_size); |
214 | 229 | ||
215 | skb_put(skb, sizeof(*sol)); | 230 | skb_put(skb, sizeof(*sol)); |
216 | skb->protocol = htons(ETH_P_802_3); | 231 | skb->protocol = htons(ETH_P_FIP); |
217 | skb_reset_mac_header(skb); | 232 | skb_reset_mac_header(skb); |
218 | skb_reset_network_header(skb); | 233 | skb_reset_network_header(skb); |
219 | fip->send(fip, skb); | 234 | fip->send(fip, skb); |
@@ -241,7 +256,7 @@ void fcoe_ctlr_link_up(struct fcoe_ctlr *fip) | |||
241 | fip->last_link = 1; | 256 | fip->last_link = 1; |
242 | fip->link = 1; | 257 | fip->link = 1; |
243 | spin_unlock_bh(&fip->lock); | 258 | spin_unlock_bh(&fip->lock); |
244 | FIP_DBG("%s", "setting AUTO mode.\n"); | 259 | LIBFCOE_FIP_DBG("%s", "setting AUTO mode.\n"); |
245 | fc_linkup(fip->lp); | 260 | fc_linkup(fip->lp); |
246 | fcoe_ctlr_solicit(fip, NULL); | 261 | fcoe_ctlr_solicit(fip, NULL); |
247 | } else | 262 | } else |
@@ -350,6 +365,8 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip, int ports, u8 *sa) | |||
350 | kal->fip.fip_dl_len = htons((sizeof(kal->mac) + | 365 | kal->fip.fip_dl_len = htons((sizeof(kal->mac) + |
351 | ports * sizeof(*vn)) / FIP_BPW); | 366 | ports * sizeof(*vn)) / FIP_BPW); |
352 | kal->fip.fip_flags = htons(FIP_FL_FPMA); | 367 | kal->fip.fip_flags = htons(FIP_FL_FPMA); |
368 | if (fip->spma) | ||
369 | kal->fip.fip_flags |= htons(FIP_FL_SPMA); | ||
353 | 370 | ||
354 | kal->mac.fd_desc.fip_dtype = FIP_DT_MAC; | 371 | kal->mac.fd_desc.fip_dtype = FIP_DT_MAC; |
355 | kal->mac.fd_desc.fip_dlen = sizeof(kal->mac) / FIP_BPW; | 372 | kal->mac.fd_desc.fip_dlen = sizeof(kal->mac) / FIP_BPW; |
@@ -365,7 +382,7 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip, int ports, u8 *sa) | |||
365 | } | 382 | } |
366 | 383 | ||
367 | skb_put(skb, len); | 384 | skb_put(skb, len); |
368 | skb->protocol = htons(ETH_P_802_3); | 385 | skb->protocol = htons(ETH_P_FIP); |
369 | skb_reset_mac_header(skb); | 386 | skb_reset_mac_header(skb); |
370 | skb_reset_network_header(skb); | 387 | skb_reset_network_header(skb); |
371 | fip->send(fip, skb); | 388 | fip->send(fip, skb); |
@@ -413,6 +430,8 @@ static int fcoe_ctlr_encaps(struct fcoe_ctlr *fip, | |||
413 | cap->fip.fip_subcode = FIP_SC_REQ; | 430 | cap->fip.fip_subcode = FIP_SC_REQ; |
414 | cap->fip.fip_dl_len = htons((dlen + sizeof(*mac)) / FIP_BPW); | 431 | cap->fip.fip_dl_len = htons((dlen + sizeof(*mac)) / FIP_BPW); |
415 | cap->fip.fip_flags = htons(FIP_FL_FPMA); | 432 | cap->fip.fip_flags = htons(FIP_FL_FPMA); |
433 | if (fip->spma) | ||
434 | cap->fip.fip_flags |= htons(FIP_FL_SPMA); | ||
416 | 435 | ||
417 | cap->encaps.fd_desc.fip_dtype = dtype; | 436 | cap->encaps.fd_desc.fip_dtype = dtype; |
418 | cap->encaps.fd_desc.fip_dlen = dlen / FIP_BPW; | 437 | cap->encaps.fd_desc.fip_dlen = dlen / FIP_BPW; |
@@ -421,10 +440,12 @@ static int fcoe_ctlr_encaps(struct fcoe_ctlr *fip, | |||
421 | memset(mac, 0, sizeof(mac)); | 440 | memset(mac, 0, sizeof(mac)); |
422 | mac->fd_desc.fip_dtype = FIP_DT_MAC; | 441 | mac->fd_desc.fip_dtype = FIP_DT_MAC; |
423 | mac->fd_desc.fip_dlen = sizeof(*mac) / FIP_BPW; | 442 | mac->fd_desc.fip_dlen = sizeof(*mac) / FIP_BPW; |
424 | if (dtype != ELS_FLOGI) | 443 | if (dtype != FIP_DT_FLOGI) |
425 | memcpy(mac->fd_mac, fip->data_src_addr, ETH_ALEN); | 444 | memcpy(mac->fd_mac, fip->data_src_addr, ETH_ALEN); |
445 | else if (fip->spma) | ||
446 | memcpy(mac->fd_mac, fip->ctl_src_addr, ETH_ALEN); | ||
426 | 447 | ||
427 | skb->protocol = htons(ETH_P_802_3); | 448 | skb->protocol = htons(ETH_P_FIP); |
428 | skb_reset_mac_header(skb); | 449 | skb_reset_mac_header(skb); |
429 | skb_reset_network_header(skb); | 450 | skb_reset_network_header(skb); |
430 | return 0; | 451 | return 0; |
@@ -447,14 +468,10 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
447 | u16 old_xid; | 468 | u16 old_xid; |
448 | u8 op; | 469 | u8 op; |
449 | 470 | ||
450 | if (fip->state == FIP_ST_NON_FIP) | ||
451 | return 0; | ||
452 | |||
453 | fh = (struct fc_frame_header *)skb->data; | 471 | fh = (struct fc_frame_header *)skb->data; |
454 | op = *(u8 *)(fh + 1); | 472 | op = *(u8 *)(fh + 1); |
455 | 473 | ||
456 | switch (op) { | 474 | if (op == ELS_FLOGI) { |
457 | case ELS_FLOGI: | ||
458 | old_xid = fip->flogi_oxid; | 475 | old_xid = fip->flogi_oxid; |
459 | fip->flogi_oxid = ntohs(fh->fh_ox_id); | 476 | fip->flogi_oxid = ntohs(fh->fh_ox_id); |
460 | if (fip->state == FIP_ST_AUTO) { | 477 | if (fip->state == FIP_ST_AUTO) { |
@@ -466,6 +483,15 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
466 | fip->map_dest = 1; | 483 | fip->map_dest = 1; |
467 | return 0; | 484 | return 0; |
468 | } | 485 | } |
486 | if (fip->state == FIP_ST_NON_FIP) | ||
487 | fip->map_dest = 1; | ||
488 | } | ||
489 | |||
490 | if (fip->state == FIP_ST_NON_FIP) | ||
491 | return 0; | ||
492 | |||
493 | switch (op) { | ||
494 | case ELS_FLOGI: | ||
469 | op = FIP_DT_FLOGI; | 495 | op = FIP_DT_FLOGI; |
470 | break; | 496 | break; |
471 | case ELS_FDISC: | 497 | case ELS_FDISC: |
@@ -601,7 +627,8 @@ static int fcoe_ctlr_parse_adv(struct sk_buff *skb, struct fcoe_fcf *fcf) | |||
601 | ((struct fip_mac_desc *)desc)->fd_mac, | 627 | ((struct fip_mac_desc *)desc)->fd_mac, |
602 | ETH_ALEN); | 628 | ETH_ALEN); |
603 | if (!is_valid_ether_addr(fcf->fcf_mac)) { | 629 | if (!is_valid_ether_addr(fcf->fcf_mac)) { |
604 | FIP_DBG("invalid MAC addr in FIP adv\n"); | 630 | LIBFCOE_FIP_DBG("Invalid MAC address " |
631 | "in FIP adv\n"); | ||
605 | return -EINVAL; | 632 | return -EINVAL; |
606 | } | 633 | } |
607 | break; | 634 | break; |
@@ -634,8 +661,8 @@ static int fcoe_ctlr_parse_adv(struct sk_buff *skb, struct fcoe_fcf *fcf) | |||
634 | case FIP_DT_LOGO: | 661 | case FIP_DT_LOGO: |
635 | case FIP_DT_ELP: | 662 | case FIP_DT_ELP: |
636 | default: | 663 | default: |
637 | FIP_DBG("unexpected descriptor type %x in FIP adv\n", | 664 | LIBFCOE_FIP_DBG("unexpected descriptor type %x " |
638 | desc->fip_dtype); | 665 | "in FIP adv\n", desc->fip_dtype); |
639 | /* standard says ignore unknown descriptors >= 128 */ | 666 | /* standard says ignore unknown descriptors >= 128 */ |
640 | if (desc->fip_dtype < FIP_DT_VENDOR_BASE) | 667 | if (desc->fip_dtype < FIP_DT_VENDOR_BASE) |
641 | return -EINVAL; | 668 | return -EINVAL; |
@@ -651,8 +678,8 @@ static int fcoe_ctlr_parse_adv(struct sk_buff *skb, struct fcoe_fcf *fcf) | |||
651 | return 0; | 678 | return 0; |
652 | 679 | ||
653 | len_err: | 680 | len_err: |
654 | FIP_DBG("FIP length error in descriptor type %x len %zu\n", | 681 | LIBFCOE_FIP_DBG("FIP length error in descriptor type %x len %zu\n", |
655 | desc->fip_dtype, dlen); | 682 | desc->fip_dtype, dlen); |
656 | return -EINVAL; | 683 | return -EINVAL; |
657 | } | 684 | } |
658 | 685 | ||
@@ -715,9 +742,10 @@ static void fcoe_ctlr_recv_adv(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
715 | } | 742 | } |
716 | mtu_valid = fcoe_ctlr_mtu_valid(fcf); | 743 | mtu_valid = fcoe_ctlr_mtu_valid(fcf); |
717 | fcf->time = jiffies; | 744 | fcf->time = jiffies; |
718 | FIP_DBG_LVL(found ? 2 : 1, "%s FCF for fab %llx map %x val %d\n", | 745 | if (!found) { |
719 | found ? "old" : "new", | 746 | LIBFCOE_FIP_DBG("New FCF for fab %llx map %x val %d\n", |
720 | fcf->fabric_name, fcf->fc_map, mtu_valid); | 747 | fcf->fabric_name, fcf->fc_map, mtu_valid); |
748 | } | ||
721 | 749 | ||
722 | /* | 750 | /* |
723 | * If this advertisement is not solicited and our max receive size | 751 | * If this advertisement is not solicited and our max receive size |
@@ -794,7 +822,8 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
794 | ((struct fip_mac_desc *)desc)->fd_mac, | 822 | ((struct fip_mac_desc *)desc)->fd_mac, |
795 | ETH_ALEN); | 823 | ETH_ALEN); |
796 | if (!is_valid_ether_addr(granted_mac)) { | 824 | if (!is_valid_ether_addr(granted_mac)) { |
797 | FIP_DBG("invalid MAC addrs in FIP ELS\n"); | 825 | LIBFCOE_FIP_DBG("Invalid MAC address " |
826 | "in FIP ELS\n"); | ||
798 | goto drop; | 827 | goto drop; |
799 | } | 828 | } |
800 | break; | 829 | break; |
@@ -812,8 +841,8 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
812 | els_dtype = desc->fip_dtype; | 841 | els_dtype = desc->fip_dtype; |
813 | break; | 842 | break; |
814 | default: | 843 | default: |
815 | FIP_DBG("unexpected descriptor type %x " | 844 | LIBFCOE_FIP_DBG("unexpected descriptor type %x " |
816 | "in FIP adv\n", desc->fip_dtype); | 845 | "in FIP adv\n", desc->fip_dtype); |
817 | /* standard says ignore unknown descriptors >= 128 */ | 846 | /* standard says ignore unknown descriptors >= 128 */ |
818 | if (desc->fip_dtype < FIP_DT_VENDOR_BASE) | 847 | if (desc->fip_dtype < FIP_DT_VENDOR_BASE) |
819 | goto drop; | 848 | goto drop; |
@@ -854,8 +883,8 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
854 | return; | 883 | return; |
855 | 884 | ||
856 | len_err: | 885 | len_err: |
857 | FIP_DBG("FIP length error in descriptor type %x len %zu\n", | 886 | LIBFCOE_FIP_DBG("FIP length error in descriptor type %x len %zu\n", |
858 | desc->fip_dtype, dlen); | 887 | desc->fip_dtype, dlen); |
859 | drop: | 888 | drop: |
860 | kfree_skb(skb); | 889 | kfree_skb(skb); |
861 | } | 890 | } |
@@ -881,7 +910,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, | |||
881 | struct fc_lport *lp = fip->lp; | 910 | struct fc_lport *lp = fip->lp; |
882 | u32 desc_mask; | 911 | u32 desc_mask; |
883 | 912 | ||
884 | FIP_DBG("Clear Virtual Link received\n"); | 913 | LIBFCOE_FIP_DBG("Clear Virtual Link received\n"); |
885 | if (!fcf) | 914 | if (!fcf) |
886 | return; | 915 | return; |
887 | if (!fcf || !fc_host_port_id(lp->host)) | 916 | if (!fcf || !fc_host_port_id(lp->host)) |
@@ -939,9 +968,9 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, | |||
939 | * reset only if all required descriptors were present and valid. | 968 | * reset only if all required descriptors were present and valid. |
940 | */ | 969 | */ |
941 | if (desc_mask) { | 970 | if (desc_mask) { |
942 | FIP_DBG("missing descriptors mask %x\n", desc_mask); | 971 | LIBFCOE_FIP_DBG("missing descriptors mask %x\n", desc_mask); |
943 | } else { | 972 | } else { |
944 | FIP_DBG("performing Clear Virtual Link\n"); | 973 | LIBFCOE_FIP_DBG("performing Clear Virtual Link\n"); |
945 | fcoe_ctlr_reset(fip, FIP_ST_ENABLED); | 974 | fcoe_ctlr_reset(fip, FIP_ST_ENABLED); |
946 | } | 975 | } |
947 | } | 976 | } |
@@ -989,10 +1018,6 @@ static int fcoe_ctlr_recv_handler(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
989 | op = ntohs(fiph->fip_op); | 1018 | op = ntohs(fiph->fip_op); |
990 | sub = fiph->fip_subcode; | 1019 | sub = fiph->fip_subcode; |
991 | 1020 | ||
992 | FIP_DBG_LVL(2, "ver %x op %x/%x dl %x fl %x\n", | ||
993 | FIP_VER_DECAPS(fiph->fip_ver), op, sub, | ||
994 | ntohs(fiph->fip_dl_len), ntohs(fiph->fip_flags)); | ||
995 | |||
996 | if (FIP_VER_DECAPS(fiph->fip_ver) != FIP_VER) | 1021 | if (FIP_VER_DECAPS(fiph->fip_ver) != FIP_VER) |
997 | goto drop; | 1022 | goto drop; |
998 | if (ntohs(fiph->fip_dl_len) * FIP_BPW + sizeof(*fiph) > skb->len) | 1023 | if (ntohs(fiph->fip_dl_len) * FIP_BPW + sizeof(*fiph) > skb->len) |
@@ -1004,7 +1029,7 @@ static int fcoe_ctlr_recv_handler(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
1004 | fip->map_dest = 0; | 1029 | fip->map_dest = 0; |
1005 | fip->state = FIP_ST_ENABLED; | 1030 | fip->state = FIP_ST_ENABLED; |
1006 | state = FIP_ST_ENABLED; | 1031 | state = FIP_ST_ENABLED; |
1007 | FIP_DBG("using FIP mode\n"); | 1032 | LIBFCOE_FIP_DBG("Using FIP mode\n"); |
1008 | } | 1033 | } |
1009 | spin_unlock_bh(&fip->lock); | 1034 | spin_unlock_bh(&fip->lock); |
1010 | if (state != FIP_ST_ENABLED) | 1035 | if (state != FIP_ST_ENABLED) |
@@ -1039,14 +1064,15 @@ static void fcoe_ctlr_select(struct fcoe_ctlr *fip) | |||
1039 | struct fcoe_fcf *best = NULL; | 1064 | struct fcoe_fcf *best = NULL; |
1040 | 1065 | ||
1041 | list_for_each_entry(fcf, &fip->fcfs, list) { | 1066 | list_for_each_entry(fcf, &fip->fcfs, list) { |
1042 | FIP_DBG("consider FCF for fab %llx VFID %d map %x val %d\n", | 1067 | LIBFCOE_FIP_DBG("consider FCF for fab %llx VFID %d map %x " |
1043 | fcf->fabric_name, fcf->vfid, | 1068 | "val %d\n", fcf->fabric_name, fcf->vfid, |
1044 | fcf->fc_map, fcoe_ctlr_mtu_valid(fcf)); | 1069 | fcf->fc_map, fcoe_ctlr_mtu_valid(fcf)); |
1045 | if (!fcoe_ctlr_fcf_usable(fcf)) { | 1070 | if (!fcoe_ctlr_fcf_usable(fcf)) { |
1046 | FIP_DBG("FCF for fab %llx map %x %svalid %savailable\n", | 1071 | LIBFCOE_FIP_DBG("FCF for fab %llx map %x %svalid " |
1047 | fcf->fabric_name, fcf->fc_map, | 1072 | "%savailable\n", fcf->fabric_name, |
1048 | (fcf->flags & FIP_FL_SOL) ? "" : "in", | 1073 | fcf->fc_map, (fcf->flags & FIP_FL_SOL) |
1049 | (fcf->flags & FIP_FL_AVAIL) ? "" : "un"); | 1074 | ? "" : "in", (fcf->flags & FIP_FL_AVAIL) |
1075 | ? "" : "un"); | ||
1050 | continue; | 1076 | continue; |
1051 | } | 1077 | } |
1052 | if (!best) { | 1078 | if (!best) { |
@@ -1056,7 +1082,8 @@ static void fcoe_ctlr_select(struct fcoe_ctlr *fip) | |||
1056 | if (fcf->fabric_name != best->fabric_name || | 1082 | if (fcf->fabric_name != best->fabric_name || |
1057 | fcf->vfid != best->vfid || | 1083 | fcf->vfid != best->vfid || |
1058 | fcf->fc_map != best->fc_map) { | 1084 | fcf->fc_map != best->fc_map) { |
1059 | FIP_DBG("conflicting fabric, VFID, or FC-MAP\n"); | 1085 | LIBFCOE_FIP_DBG("Conflicting fabric, VFID, " |
1086 | "or FC-MAP\n"); | ||
1060 | return; | 1087 | return; |
1061 | } | 1088 | } |
1062 | if (fcf->pri < best->pri) | 1089 | if (fcf->pri < best->pri) |
@@ -1100,7 +1127,7 @@ static void fcoe_ctlr_timeout(unsigned long arg) | |||
1100 | if (sel != fcf) { | 1127 | if (sel != fcf) { |
1101 | fcf = sel; /* the old FCF may have been freed */ | 1128 | fcf = sel; /* the old FCF may have been freed */ |
1102 | if (sel) { | 1129 | if (sel) { |
1103 | printk(KERN_INFO "host%d: FIP selected " | 1130 | printk(KERN_INFO "libfcoe: host%d: FIP selected " |
1104 | "Fibre-Channel Forwarder MAC %s\n", | 1131 | "Fibre-Channel Forwarder MAC %s\n", |
1105 | fip->lp->host->host_no, | 1132 | fip->lp->host->host_no, |
1106 | print_mac(buf, sel->fcf_mac)); | 1133 | print_mac(buf, sel->fcf_mac)); |
@@ -1110,7 +1137,7 @@ static void fcoe_ctlr_timeout(unsigned long arg) | |||
1110 | fip->ctlr_ka_time = jiffies + sel->fka_period; | 1137 | fip->ctlr_ka_time = jiffies + sel->fka_period; |
1111 | fip->link = 1; | 1138 | fip->link = 1; |
1112 | } else { | 1139 | } else { |
1113 | printk(KERN_NOTICE "host%d: " | 1140 | printk(KERN_NOTICE "libfcoe: host%d: " |
1114 | "FIP Fibre-Channel Forwarder timed out. " | 1141 | "FIP Fibre-Channel Forwarder timed out. " |
1115 | "Starting FCF discovery.\n", | 1142 | "Starting FCF discovery.\n", |
1116 | fip->lp->host->host_no); | 1143 | fip->lp->host->host_no); |
@@ -1234,7 +1261,7 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *fip, struct fc_frame *fp, u8 *sa) | |||
1234 | return -EINVAL; | 1261 | return -EINVAL; |
1235 | } | 1262 | } |
1236 | fip->state = FIP_ST_NON_FIP; | 1263 | fip->state = FIP_ST_NON_FIP; |
1237 | FIP_DBG("received FLOGI LS_ACC using non-FIP mode\n"); | 1264 | LIBFCOE_FIP_DBG("received FLOGI LS_ACC using non-FIP mode\n"); |
1238 | 1265 | ||
1239 | /* | 1266 | /* |
1240 | * FLOGI accepted. | 1267 | * FLOGI accepted. |
@@ -1263,7 +1290,7 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *fip, struct fc_frame *fp, u8 *sa) | |||
1263 | memcpy(fip->dest_addr, sa, ETH_ALEN); | 1290 | memcpy(fip->dest_addr, sa, ETH_ALEN); |
1264 | fip->map_dest = 0; | 1291 | fip->map_dest = 0; |
1265 | if (fip->state == FIP_ST_NON_FIP) | 1292 | if (fip->state == FIP_ST_NON_FIP) |
1266 | FIP_DBG("received FLOGI REQ, " | 1293 | LIBFCOE_FIP_DBG("received FLOGI REQ, " |
1267 | "using non-FIP mode\n"); | 1294 | "using non-FIP mode\n"); |
1268 | fip->state = FIP_ST_NON_FIP; | 1295 | fip->state = FIP_ST_NON_FIP; |
1269 | } | 1296 | } |