diff options
author | Joe Eykholt <jeykholt@cisco.com> | 2009-05-06 13:52:12 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-08 14:29:07 -0400 |
commit | 5f48f70ecef25df93e122985272ff647f5653836 (patch) | |
tree | aa649391e6629ec9f4009ce83dec3f24c37d0e62 /drivers/scsi/fcoe | |
parent | f00a3328bf9ecff46abd68a421693ba71cd16fc8 (diff) |
[SCSI] libfcoe: fip: fix non-FIP-mode FLOGI state after reset.
When a reset is sent using fcoeadm on a non-FIP mode NIC,
there's no link flap, so the fcoe_ctlr stays in non-FIP mode.
In that case, FIP wasn't setting the flogi_oxid or map_dest flag,
causing the FLOGI to be sent with the both wrong source MAC and
the wrong destination MAC address, causing it to fail.
This leads to a non-functioning HBA until a link flap or
instance delete/create.
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 62ba0f39c6bd..a7ecafb9a507 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
@@ -447,14 +447,10 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
447 | u16 old_xid; | 447 | u16 old_xid; |
448 | u8 op; | 448 | u8 op; |
449 | 449 | ||
450 | if (fip->state == FIP_ST_NON_FIP) | ||
451 | return 0; | ||
452 | |||
453 | fh = (struct fc_frame_header *)skb->data; | 450 | fh = (struct fc_frame_header *)skb->data; |
454 | op = *(u8 *)(fh + 1); | 451 | op = *(u8 *)(fh + 1); |
455 | 452 | ||
456 | switch (op) { | 453 | if (op == ELS_FLOGI) { |
457 | case ELS_FLOGI: | ||
458 | old_xid = fip->flogi_oxid; | 454 | old_xid = fip->flogi_oxid; |
459 | fip->flogi_oxid = ntohs(fh->fh_ox_id); | 455 | fip->flogi_oxid = ntohs(fh->fh_ox_id); |
460 | if (fip->state == FIP_ST_AUTO) { | 456 | if (fip->state == FIP_ST_AUTO) { |
@@ -466,6 +462,15 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
466 | fip->map_dest = 1; | 462 | fip->map_dest = 1; |
467 | return 0; | 463 | return 0; |
468 | } | 464 | } |
465 | if (fip->state == FIP_ST_NON_FIP) | ||
466 | fip->map_dest = 1; | ||
467 | } | ||
468 | |||
469 | if (fip->state == FIP_ST_NON_FIP) | ||
470 | return 0; | ||
471 | |||
472 | switch (op) { | ||
473 | case ELS_FLOGI: | ||
469 | op = FIP_DT_FLOGI; | 474 | op = FIP_DT_FLOGI; |
470 | break; | 475 | break; |
471 | case ELS_FDISC: | 476 | case ELS_FDISC: |