From: Bernd Schubert <bernd.schubert@fastmail.fm>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Nix <nix@esperi.org.uk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-scsi@vger.kernel.org, nick.cheng@areca.com.tw,
stable@vger.kernel.org, Douglas Gilbert <dgilbert@interlog.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH] scsi disk: Use its own buffer for the vpd request
Date: Mon, 26 Aug 2013 22:15:52 +0200 [thread overview]
Message-ID: <521BB778.5050701@fastmail.fm> (raw)
In-Reply-To: <yq1li4ker0k.fsf@sermon.lab.mkp.net>
Martin,
sorry for my late reply, I entirely lost track of this (customer issues,
vacation, lots of main work, ...).
On 08/02/2013 05:00 AM, Martin K. Petersen wrote:
>>>>>> "Bernd" == Bernd Schubert <bernd.schubert@fastmail.fm> writes:
>
> Bernd,
>
> Bernd> Once I noticed that scsi_get_vpd_page() works fine from other
> Bernd> function calls and that it is not 0x89, but already 0x0 that
> Bernd> fails fixing it became easy.
>
> Bernd> Nix, any chance you could verify it also works for you?
>
> Do we get an appropriate error back when we try to issue WRITE SAME
> 10/16? If so, I'm OK with this fix.
>
> And thanks for looking into this!
>
Is testing with sg_write_same sufficient?
With F/W V1.49:
> (squeeze)fslab2:~# lsscsi | grep sda
> [2:0:0:0] disk ATA HDS724040KLSA80 KFAO /dev/sda
> (squeeze)fslab2:~# strace -f sg_write_same --10 -v --num=0 --lba=0 /dev/sda
> ioctl(3, SG_IO, {'S', SG_DXFER_TO_DEV, cmd[10]=[41, 00, 00, 00, 00, 00, 00, 00, 00, 00], mx_sb_len=32, iovec_count=0, dxfer_len=512, timeout=60000, flags=0, data[512]=["\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=02, masked_status=01, sb[18]=[70, 00, 05, 00, 00, 00, 00, 0a, 00, 00, 00, 00, 20, 00, 00, 00, 00, 00], host_status=0, driver_status=0x8, resid=0, duration=0, info=0x1}) = 0
> write(2, "Write same: Fixed format, curre"..., 114Write same: Fixed format, current; Sense key: Illegal Request
> Additional sense: Invalid command operation code
> ) = 114
> write(2, "Write same(10) command not suppo"..., 37Write same(10) command not supported
> ) = 37
> (squeeze)fslab2:~# strace -f sg_write_same --16 -v --num=0 --lba=0 /dev/sda
> ioctl(3, SG_IO, {'S', SG_DXFER_TO_DEV, cmd[16]=[93, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00], mx_sb_len=32, iovec_count=0, dxfer_len=512, timeout=60000, flags=0, data[512]=["\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=02, masked_status=01, sb[18]=[70, 00, 05, 00, 00, 00, 00, 0a, 00, 00, 00, 00, 24, 00, 00, 00, 00, 00], host_status=0, driver_status=0x8, resid=0, duration=0, info=0x1}) = 0
> write(2, "Write same: Fixed format, curre"..., 104Write same: Fixed format, current; Sense key: Illegal Request
> Additional sense: Invalid field in cdb
> ) = 104
> write(2, "bad field in Write same(16) cdb,"..., 63bad field in Write same(16) cdb, option probably not supported
> ) = 63
Now with F/W V1.46
> (squeeze)fslab2:~# lsscsi | grep sdk
> [10:0:1:2] disk Hitachi HDS724040KLSA80 R001 /dev/sdk
> (squeeze)fslab2:~# cat /sys/class/scsi_host/host10/host_fw_model
> ARC-1260
> (squeeze)fslab2:~# strace -f sg_write_same --10 -v --num=0 --lba=0 /dev/sdk
> execve("/usr/bin/sg_write_same", ["sg_write_same", "--10", "-v", "--num=0", "--lba=0", "/dev/sdk"], [/* 26 vars */]) = 0
> ioctl(3, SG_IO, {'S', SG_DXFER_TO_DEV, cmd[10]=[41, 00, 00, 00, 00, 00, 00, 00, 00, 00], mx_sb_len=32, iovec_count=0, dxfer_len=512, timeout=60000, flags=0, data[512]=["\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[19]=[f0, 00, 05, 00, 00, 00, 00, 0b, 00, 00, 00, 00, 20, 00, 00, 00, 02, 00, 00], host_status=0, driver_status=0x8, resid=0, duration=0, info=0x1}) = 0
> write(2, "Write same: Fixed format, curre"..., 134Write same: Fixed format, current; Sense key: Illegal Request
> Additional sense: Invalid command operation code
> Info fld=0x0 [0]
> ) = 134
> write(2, "Write same(10) command not suppo"..., 37Write same(10) command not supported
> ) = 37
> (squeeze)fslab2:~# strace -f sg_write_same --16 -v --num=0 --lba=0 /dev/sdk
> execve("/usr/bin/sg_write_same", ["sg_write_same", "--16", "-v", "--num=0", "--lba=0", "/dev/sdk"], [/* 26 vars */]) = 0
> ioctl(3, SG_IO, {'S', SG_DXFER_TO_DEV, cmd[16]=[93, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00], mx_sb_len=32, iovec_count=0, dxfer_len=512, timeout=60000, flags=0, data[512]=["\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...], status=00, masked_status=00, sb[19]=[f0, 00, 05, 00, 00, 00, 00, 0b, 00, 00, 00, 00, 20, 00, 00, 00, 02, 00, 00], host_status=0, driver_status=0x8, resid=0, duration=0, info=0x1}) = 0
> write(2, "Write same: Fixed format, curre"..., 134Write same: Fixed format, current; Sense key: Illegal Request
> Additional sense: Invalid command operation code
> Info fld=0x0 [0]
> ) = 134
> write(2, "Write same(16) command not suppo"..., 37Write same(16) command not supported
> ) = 37
Is this sufficient, or do you need something else?
Thanks,
Bernd
next prev parent reply other threads:[~2013-08-26 20:15 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 10:10 [SCSI REGRESSION] 3.10.2 or 3.10.3: arcmsr failure at bootup / early userspace transition Nick Alcock
2013-07-29 13:01 ` Bernd Schubert
2013-07-29 13:05 ` Nix
2013-07-29 14:16 ` Bernd Schubert
2013-07-29 15:01 ` Nix
2013-07-29 20:04 ` Nix
2013-07-29 20:15 ` Martin K. Petersen
2013-07-29 21:09 ` Nix
2013-07-29 23:34 ` Martin K. Petersen
2013-07-30 18:09 ` Bernd Schubert
2013-07-31 0:07 ` Nick Alcock
2013-07-31 3:19 ` Martin K. Petersen
2013-07-31 3:15 ` Martin K. Petersen
2013-07-31 17:51 ` Bernd Schubert
2013-07-31 18:40 ` Bernd Schubert
2013-08-01 14:34 ` [PATCH] scsi disk: Use its own buffer for the vpd request Bernd Schubert
2013-08-01 14:37 ` Bernd Schubert
2013-08-02 3:00 ` Martin K. Petersen
2013-08-26 20:15 ` Bernd Schubert [this message]
2013-08-02 23:46 ` Nick Alcock
2013-08-03 11:17 ` Nick Alcock
2013-08-30 10:01 ` Nix
2013-08-31 1:53 ` Greg KH
2013-08-31 19:48 ` Nix
2013-09-01 18:40 ` Bernd Schubert
2013-09-20 22:51 ` Martin K. Petersen
2013-09-23 12:47 ` [PATCH] scsi disk: Reduce buffer size for " Bernd Schubert
2013-07-30 0:28 ` [SCSI REGRESSION] 3.10.2 or 3.10.3: arcmsr failure at bootup / early userspace transition Douglas Gilbert
2013-07-30 0:56 ` Nix
2013-07-30 18:14 ` Bernd Schubert
2013-07-30 21:20 ` Nix
2013-08-01 14:55 ` Bernd Schubert
2013-08-01 16:04 ` Nix
2013-08-01 16:21 ` Bernd Schubert
2013-07-31 3:10 ` Martin K. Petersen
2013-07-29 14:27 ` Martin K. Petersen
2013-07-29 14:26 ` Martin K. Petersen
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=521BB778.5050701@fastmail.fm \
--to=bernd.schubert@fastmail.fm \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dgilbert@interlog.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nick.cheng@areca.com.tw \
--cc=nix@esperi.org.uk \
--cc=stable@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.