In point-to-multipoint mode, incoming FLOGIs are addressed to the local
port ID, not to 0xfffffe.  Also, any incoming fabric FLOGIs would
indicate a node running in non-FIP point-to point.

In point-to-multipoint mode, send all incoming ELS requests
to the remote port receive handler.

Signed-off-by: Joe Eykholt <[email protected]>
---
 drivers/scsi/libfc/fc_lport.c |   43 +++++++++++++++++++++--------------------
 1 files changed, 22 insertions(+), 21 deletions(-)


diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index f7bff2c..f4bf25c 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -904,27 +904,28 @@ static void fc_lport_recv_req(struct fc_lport *lport, 
struct fc_seq *sp,
                 * Check opcode.
                 */
                recv = lport->tt.rport_recv_req;
-               switch (fc_frame_payload_op(fp)) {
-               case ELS_FLOGI:
-                       recv = fc_lport_recv_flogi_req;
-                       break;
-               case ELS_LOGO:
-                       fh = fc_frame_header_get(fp);
-                       if (ntoh24(fh->fh_s_id) == FC_FID_FLOGI)
-                               recv = fc_lport_recv_logo_req;
-                       break;
-               case ELS_RSCN:
-                       recv = lport->tt.disc_recv_req;
-                       break;
-               case ELS_ECHO:
-                       recv = fc_lport_recv_echo_req;
-                       break;
-               case ELS_RLIR:
-                       recv = fc_lport_recv_rlir_req;
-                       break;
-               case ELS_RNID:
-                       recv = fc_lport_recv_rnid_req;
-                       break;
+               if (!lport->point_to_multipoint) {
+                       switch (fc_frame_payload_op(fp)) {
+                       case ELS_FLOGI:
+                               recv = fc_lport_recv_flogi_req;
+                               break;
+                       case ELS_LOGO:
+                               if (ntoh24(fh->fh_s_id) == FC_FID_FLOGI)
+                                       recv = fc_lport_recv_logo_req;
+                               break;
+                       case ELS_RSCN:
+                               recv = lport->tt.disc_recv_req;
+                               break;
+                       case ELS_ECHO:
+                               recv = fc_lport_recv_echo_req;
+                               break;
+                       case ELS_RLIR:
+                               recv = fc_lport_recv_rlir_req;
+                               break;
+                       case ELS_RNID:
+                               recv = fc_lport_recv_rnid_req;
+                               break;
+                       }
                }
 
                recv(sp, fp, lport);


_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to