From patchwork Wed Sep 24 09:00:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 392820 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id CEC4D140095; Wed, 24 Sep 2014 19:01:41 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XWiSA-0003iL-IN; Wed, 24 Sep 2014 09:01:38 +0000 Received: from mail-we0-f182.google.com ([74.125.82.182]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XWiRk-0003VJ-6M for kernel-team@lists.ubuntu.com; Wed, 24 Sep 2014 09:01:12 +0000 Received: by mail-we0-f182.google.com with SMTP id u57so3941240wes.41 for ; Wed, 24 Sep 2014 02:01:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2PCX30mdFAiZXwdc4p8jNeXNS1UTCYypFnpnHTWaa0w=; b=jfV2LaIH66fw5N/AYM/abz0GfExHWYRknvFIAYoT1PgJ6jOmo0u9Rzc2U8wDVJYhio X9BxmGDNXXLo3zL6z4Y6VeZ17mRRHOqhhb8AhIqsFrDmkDJe/olMrlz700luOduwE1HZ po7XpHtRzNLjOQBSwZvT399HdzyG1FSW0dQclHdEBCCcXWOlHtpeSGns9LosXABSpT8Y eHn1DPGi49U/49CFP75PL9Fnga7iweZ1cuNl0cbtTuCw9+q/Fx5MmcLPN5Uug2zX/YzH RjkY4LkzxJ7LWgCx4ZJ9JYnP3iJHQ52B/FikS3uzlWkV56rQGSTwTzsKh1x8CXBuqAbn xtwA== X-Gm-Message-State: ALoCoQlyG9ka3XaCxYkyy0h8myy/SgIi2DYUDNQes7nBcVbQfF8P0I1YxHVZYzsrrZHkG+KvqTE5 X-Received: by 10.180.103.40 with SMTP id ft8mr9924886wib.52.1411549272032; Wed, 24 Sep 2014 02:01:12 -0700 (PDT) Received: from localhost ([2001:470:6973:2:78b9:724f:ec05:5c33]) by mx.google.com with ESMTPSA id ks10sm18657530wjb.38.2014.09.24.02.01.11 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 24 Sep 2014 02:01:11 -0700 (PDT) From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 10/11] Drivers: add blist flags Date: Wed, 24 Sep 2014 10:00:46 +0100 Message-Id: <1411549247-6511-11-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1411549247-6511-1-git-send-email-apw@canonical.com> References: <1411549247-6511-1-git-send-email-apw@canonical.com> Cc: Andy Whitcroft X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: "K. Y. Srinivasan" Add blist flags to permit the reading of the VPD pages even when the target may claim SPC-2 compliance. MSFT targets currently claim SPC-2 compliance while they implement post SPC-2 features. With this patch we can correctly handle WRITE_SAME_16 issues. Signed-off-by: K. Y. Srinivasan Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig (cherry picked from commit f3cfabce7a2e92564d380de3aad4b43901fb7ae6) BugLink: http://bugs.launchpad.net/bugs/1354397 Signed-off-by: Andy Whitcroft --- drivers/scsi/storvsc_drv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index ed0f899..fecac5d0 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -327,6 +327,8 @@ MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size (bytes)"); */ static int storvsc_timeout = 180; +static int msft_blist_flags = BLIST_TRY_VPD_PAGES; + #define STORVSC_MAX_IO_REQUESTS 200 static void storvsc_on_channel_callback(void *context); @@ -1449,6 +1451,14 @@ static int storvsc_device_configure(struct scsi_device *sdevice) sdevice->no_write_same = 1; + /* + * Add blist flags to permit the reading of the VPD pages even when + * the target may claim SPC-2 compliance. MSFT targets currently + * claim SPC-2 compliance while they implement post SPC-2 features. + * With this patch we can correctly handle WRITE_SAME_16 issues. + */ + sdevice->sdev_bflags |= msft_blist_flags; + return 0; }