scsi: target: iscsi: cxgbit: fix max iso npdu calculation
authorVarun Prakash <varun@chelsio.com>
Wed, 11 Jul 2018 16:33:43 +0000 (22:03 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2018 07:26:24 +0000 (09:26 +0200)
commitca5fc53ad40104b110c659cbf20c9aa23881264f
tree06ae2bdbce07e93ae4a6ec4cdd7c1ec77a2d151e
parent384f0d9fe4ad699251ff2f2686533a9b9356132d
scsi: target: iscsi: cxgbit: fix max iso npdu calculation

[ Upstream commit 1b350ea0c2f4df9aa30426614c8eb755a8c32814 ]

- rounddown CXGBIT_MAX_ISO_PAYLOAD by csk->emss before calculating
  max_iso_npdu to get max TCP payload in multiple of mss.

- call cxgbit_set_digest() before cxgbit_set_iso_npdu() to set
  csk->submode, it is used in calculating number of iso pdus.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/iscsi/cxgbit/cxgbit_target.c