[SCSI] be2iscsi: Limit max_xmit_length
authorJayamohan Kallickal <jayamohank@serverengines.com>
Wed, 21 Jul 2010 22:56:45 +0000 (04:26 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 28 Jul 2010 14:05:36 +0000 (09:05 -0500)
This patch limits max_xmit_length to 64K incase older
utilities are used

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/be2iscsi/be_iscsi.c

index de79b7cf804d1a3ba661629e17d7fc6e910f00fe..a131a576a1020f339a58258699fdd666c7c35029 100644 (file)
@@ -277,6 +277,10 @@ int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
                if (session->max_burst > 262144)
                        session->max_burst = 262144;
                break;
+       case ISCSI_PARAM_MAX_XMIT_DLENGTH:
+               if ((conn->max_xmit_dlength > 65536) ||
+                   (conn->max_xmit_dlength == 0))
+                       conn->max_xmit_dlength = 65536;
        default:
                return 0;
        }