Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934980AbcLOAum (ORCPT ); Wed, 14 Dec 2016 19:50:42 -0500 Received: from p3plsmtps2ded04.prod.phx3.secureserver.net ([208.109.80.198]:46328 "EHLO p3plsmtps2ded04.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934407AbcLOAuY (ORCPT ); Wed, 14 Dec 2016 19:50:24 -0500 x-originating-ip: 72.167.245.219 From: kys@exchange.microsoft.com To: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, ohering@suse.com, linux-scsi@vger.kernel.org, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com, martin.petersen@oracle.com, hare@suse.de, James.Bottomley@HansenPartnership.com Cc: Long Li , "K. Y. Srinivasan" , Subject: [PATCH 4/6] storvsc: use tagged SRB requests if supported by the device Date: Wed, 14 Dec 2016 18:46:01 -0800 Message-Id: <1481769963-2069-4-git-send-email-kys@exchange.microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1481769963-2069-1-git-send-email-kys@exchange.microsoft.com> References: <1481769928-2026-1-git-send-email-kys@exchange.microsoft.com> <1481769963-2069-1-git-send-email-kys@exchange.microsoft.com> Reply-To: kys@microsoft.com X-CMAE-Envelope: MS4wfH25vOgM9v6ceYHll+5DIMDKfQKQt/c0k5jkv7F0GZJEXGTHKqqwJL7ZMMMGhh7qwfRgtbdfDatgDh2jyXsJgRGoG0DEkVTL4TbrRPEYlSUHF2MX2fTb mhz9NiFfikVG3Ot/qPs2DJQbmFnCmDbEtijqcPCssvYUyXjp0JAtmeJGyVrd4kzAIVPXrzvkQu176pl/XMW8Aknqw8VMBPFfL1fMHjTDFNbF2ku0qFy/Jbfk gMhI7OOeW6OI5zCOomyygeNg2JyKi/9tJ1ZeTwhidicZMeOO6/M9bkkcZkvcvc4no5eGKbP3lk7NI4uBT73px7uELjatX16KFqPJis73n63tWJV4u8F7YYt+ A0UbannoKnkPC8pONXUvDtPtKQt49P8tjmpYZhRj0hRpEloWoicKGw+dsO/6AsimAHK3PyQlKdtzAJiuZ1+4I4U9+BUNa1SNEKTObFQNlZRxz+WPm+RxeT7u 9vYd7B0EiDsV/BwoFMcrU6dgEkGOnV5drodwAGF8qxdwhearDuUsOhLt4eWB7vupPvUAQ4M7fFTkk0UjT0VzKQff6dK0L9PhQHsbWqqEq+O1PH+1TgzIqIaW N+MTpPBUrQRd1fQWSi5r5NFZ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1444 Lines: 42 From: Long Li Properly set SRB flags when hosting device supports tagged queuing. This patch improves the performance on Fiber Channel disks. Signed-off-by: Long Li Reviewed-by: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan Cc: --- drivers/scsi/storvsc_drv.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 63f6b1a..3209387 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -136,6 +136,8 @@ struct hv_fc_wwn_packet { #define SRB_FLAGS_PORT_DRIVER_RESERVED 0x0F000000 #define SRB_FLAGS_CLASS_DRIVER_RESERVED 0xF0000000 +#define SP_UNTAGGED ((unsigned char) ~0) +#define SRB_SIMPLE_TAG_REQUEST 0x20 /* * Platform neutral description of a scsi request - @@ -1549,6 +1551,13 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd) vm_srb->win8_extension.srb_flags |= SRB_FLAGS_DISABLE_SYNCH_TRANSFER; + if (scmnd->device->tagged_supported) { + vm_srb->win8_extension.srb_flags |= + (SRB_FLAGS_QUEUE_ACTION_ENABLE | SRB_FLAGS_NO_QUEUE_FREEZE); + vm_srb->win8_extension.queue_tag = SP_UNTAGGED; + vm_srb->win8_extension.queue_action = SRB_SIMPLE_TAG_REQUEST; + } + /* Build the SRB */ switch (scmnd->sc_data_direction) { case DMA_TO_DEVICE: -- 1.7.4.1