Linux-USB Archive on
 help / color / Atom feed
From: Damien Le Moal <>
To: "Martin K. Petersen" <>,
	Justin Piszcz <>
Cc: 'LKML' <>,
	"" <>,
	"" <>
Subject: Re: 5.2.x kernel: WD 8TB USB Drives: Unaligned partial completion (resid=78, sector_sz=512)
Date: Tue, 13 Aug 2019 03:47:09 +0000
Message-ID: <> (raw)
In-Reply-To: <>

On 2019/08/12 19:12, Martin K. Petersen wrote:
> Justin,
>>> Attached 2 x brand new Western Digital 8TB USB 3.0 drives awhile back
>>> and ran some file copy tests and was getting these warnings-- is
>>> there any way to avoid these warnings?  I did confirm with parted
>>> that the partition was aligned but this appears to be something
>>> related to the firmware on the device according to [1] and [2]?
>> sg_vpd_bdc.txt
>> Block device characteristics VPD page (SBC):
>>   Nominal rotation rate: 5400 rpm
>>   Product type: Not specified
>>   WABEREQ=0
>>   WACEREQ=0
>>   Nominal form factor: 3.5 inch
>>   ZONED=0
> Damien: What can we do to limit the messages in cases like this? Would
> it make sense to make the residual warning conditional on sd_is_zoned()?

These WD drives are regular disks, not SMR. Making the warning conditional on
sd_is_zoned() will not reduce the amount of messages. REPORT ZONES is the only
command that could result in a resid not being aligned to the block size since
by definition the command reply is composed of 64B zone descriptors. But that
command is now processed through a device method and is not a REQ_OP_XXX
anymore, so as an internal req, it does not go through sd_done() for completion
right ? All other zone commands either have no buffer, or the exact same
requirement as regular disks, expecting a block aligned resid. So I think that
using sd_is_zoned() is not relevant to this problem.

Bottom line: this USB adapter is weird and likely triggers all the unaligned
resid. I do get regularly reports of similar problem with SAS HBAs, all always
fixed with HBA FW updates. Not sure if there is a FW available for these drives.
I will ask internally.

In the mean time, rate limiting or removing the sd_printk() call may be the only
option. Failing all commands with an invalid resid would be safer I guess, but
will at best likely cause a lot of retry on these buggy devices, and break the
drive operation/perfomance completely in the worst case.

Or the usb mass storage device driver could add some silent forced resid
alignment too.

Best regards.

Damien Le Moal
Western Digital Research

  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-03  9:10 Justin Piszcz
2019-08-03 11:36 ` Markus Reichelt
2019-08-03 19:00 ` Alan Stern
2019-08-03 19:37   ` Justin Piszcz
2019-08-08  2:03 ` Martin K. Petersen
2019-08-08  8:27   ` Justin Piszcz
2019-08-13  2:12     ` Martin K. Petersen
2019-08-13  3:47       ` Damien Le Moal [this message]
2019-08-13 10:48       ` Damien Le Moal
2019-08-13 20:58         ` Justin Piszcz

Reply instructions:

You may reply publically 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:

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

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-USB Archive on

Archives are clonable:
	git clone --mirror linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ \
	public-inbox-index linux-usb

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox