public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <mkp@mkp.net>
To: Eric Sandeen <sandeen@redhat.com>
Cc: dgilbert@interlog.com,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"Lukáš Czerner" <lczerner@redhat.com>
Subject: Re: [PATCH V2] scsi_debug: add LBPRZ support
Date: Thu, 08 Mar 2012 10:48:29 -0500	[thread overview]
Message-ID: <yq1ty1zf60i.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <4F584BCF.7030803@redhat.com> (Eric Sandeen's message of "Thu, 08 Mar 2012 00:03:59 -0600")

>>>>> "Eric" == Eric Sandeen <sandeen@redhat.com> writes:

Eric> note, I didn't change the return value of inquiry_evpd_b2(); that
Eric> seems unrelated to this change, and should be a separate patch,
Eric> no?


scsi_debug: Fix incorrect page length in logical block provisioning VPD

The page length for the 0xb2 VPD page is defined to be 4 bytes when no
provisioning descriptors are provided (DP=0).

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

---

diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 6888b2c..a393a61 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -777,7 +777,7 @@ static int inquiry_evpd_b1(unsigned char *arr)
 /* Thin provisioning VPD page (SBC-3) */
 static int inquiry_evpd_b2(unsigned char *arr)
 {
-	memset(arr, 0, 0x8);
+	memset(arr, 0, 0x4);
 	arr[0] = 0;			/* threshold exponent */
 
 	if (scsi_debug_lbpu)
@@ -789,7 +789,7 @@ static int inquiry_evpd_b2(unsigned char *arr)
 	if (scsi_debug_lbpws10)
 		arr[1] |= 1 << 5;
 
-	return 0x8;
+	return 0x4;
 }
 
 #define SDEBUG_LONG_INQ_SZ 96

  parent reply	other threads:[~2012-03-08 16:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 20:09 [PATCH] scsi_debug: add LBPRZ support Eric Sandeen
2012-03-08  1:00 ` Douglas Gilbert
2012-03-08  1:18   ` Eric Sandeen
2012-03-08  5:04     ` Martin K. Petersen
2012-03-08  6:03   ` [PATCH V2] " Eric Sandeen
2012-03-08 15:47     ` Martin K. Petersen
2012-03-08 15:48     ` Martin K. Petersen [this message]
2012-03-10 18:47       ` Douglas Gilbert
2012-03-10 18:45     ` Douglas Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yq1ty1zf60i.fsf@sermon.lab.mkp.net \
    --to=mkp@mkp.net \
    --cc=dgilbert@interlog.com \
    --cc=lczerner@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox