Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp1208196ybh; Sat, 3 Aug 2019 20:38:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrx1Ab8jtNXoz2GSeZszevUPOts/xzKHSZesAOT8Sz1p0i58CLCgRWq78d9hw8V9i8lb9s X-Received: by 2002:a65:6288:: with SMTP id f8mr124698002pgv.292.1564889924975; Sat, 03 Aug 2019 20:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564889924; cv=none; d=google.com; s=arc-20160816; b=vOx3SBvv81PJFIhd+ce/G01abLeeYqAhB3wA6AzZfbH3q1IKQ40A9npV2JtYYabJiQ TQBcWHQElLUKjdbDpFImfPEP/DyhIXu5fze5UClIHt/bMyDZufcTI7WymtZfoSe9uMNl vL6CmF7yhQWgPTJHk7Fk5JbvQOEuHPCq+ITVIRFz6f7wBSjkJI62f+JrPpJ9VmUUWtqo 45fk+5HAxem2kDOIAJtPLoJtePtyNOTqCB/aC5xiMrHELQTGNFUcJb0G3CPx8xie+6E3 nV5yRCsASOtKViSC1jHsnqXjAByCXwC2POCGDoZFZxzVGU8TlvjHPEVYniQDjR8k3hX5 d2rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject:to :from:dkim-signature; bh=Gm2dij4mV6+WhXehQstbnX0dBMHnBu3lMZ3v1HK+VF4=; b=B1SWcwXQ0+wT3lwN0J8KX18VMZRTaLrYkz1filriA9fQju9BDzGfmYhQcUEjVhKYOL KK+2pyNT3TXEvn0QjfTyyW6reI971hNhISiIMUyJh16gPxG+kjxLLJk65kdNjhjA967B up5jpbbdZz4pWeTqK3jOtW7kpxLTprqT33w1c1tRzCVuaLRR+aicqOwGfAoV3bSXHSMV INkew2iQ1UyHCIxSJJKyF4QC/jLFkw6OtrjT8g+ktHwh0kzC2LoTFjvI/j/K7I8eWWoz 9Yl4DxfI+GnC8FPWruY3nBMv0Ssat1annDJhJS7nzXi3zdxY//Bfe3ZyaGokxSJ9xogp lMsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lucidpixels.com header.s=google header.b=pA4I0CsY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=lucidpixels.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si36547865plo.328.2019.08.03.20.38.29; Sat, 03 Aug 2019 20:38:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lucidpixels.com header.s=google header.b=pA4I0CsY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=lucidpixels.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388021AbfHCJKt (ORCPT + 99 others); Sat, 3 Aug 2019 05:10:49 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]:46321 "EHLO mail-qt1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387945AbfHCJKs (ORCPT ); Sat, 3 Aug 2019 05:10:48 -0400 Received: by mail-qt1-f172.google.com with SMTP id h21so76382220qtn.13 for ; Sat, 03 Aug 2019 02:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lucidpixels.com; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding:thread-index:content-language; bh=Gm2dij4mV6+WhXehQstbnX0dBMHnBu3lMZ3v1HK+VF4=; b=pA4I0CsYbQ+1vLeL6j5N0qmwVK3vbQr2ROu+0WMjBCrIvw7i/qLoLhpL3gZC5oFyvo D8InH/VnZPlEW4W1kJUW3kFYpLkX3pi8AU++fS4+Lwqc4TIOT/KZL2sOR58GuxfjhXBD cq2oU8Y+w0SuGEdWQF6o3suq0FHJegLcPsyFg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding:thread-index:content-language; bh=Gm2dij4mV6+WhXehQstbnX0dBMHnBu3lMZ3v1HK+VF4=; b=VLZr+ohhrr0Nlb8apqCp9id6c18kujB/JQxy06zgaFe37o8ENRRYhqmyPl0+Zrx7Kj tRB4PjyqbHbdlubw9xtydfT7TdDCanAvP9csu3wuqujLp3az+MAR6UOBHMvB3bWK9Wrh TJaVOPp2JnYBNq7DmQMUKv1r9n1EDj2r10sLXbTMsd3/OLWzaudVKZ3EpurJhLoAA3pU Y0fjxuC2eoX991wqgv6BXszxVoRPVnFAx+3ynM15PqB6EY77oyOWRSoKsLPJCyur56sz LP0mKy5u3DWvoqvuooFUN4qWP6/09qkl6JfrmmuxwQcrmRtj+u+7Mj21JOlOpsGJ1HVf bCig== X-Gm-Message-State: APjAAAXmOIRZNS1gxCnyYf6uKVkTLeEKuNEDHlEmludrioHMq3+tuJky z0OLOpEx9g1jCwbiib7Eu1WxvTPAI6w= X-Received: by 2002:ac8:2baa:: with SMTP id m39mr100092554qtm.242.1564823447119; Sat, 03 Aug 2019 02:10:47 -0700 (PDT) Received: from WARPC (pool-173-72-201-135.clppva.fios.verizon.net. [173.72.201.135]) by smtp.gmail.com with ESMTPSA id r17sm35011821qtf.26.2019.08.03.02.10.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Aug 2019 02:10:46 -0700 (PDT) From: "Justin Piszcz" To: "'LKML'" , , Subject: 5.2.x kernel: WD 8TB USB Drives: Unaligned partial completion (resid=78, sector_sz=512) Date: Sat, 3 Aug 2019 05:10:44 -0400 Message-ID: <006d01d549db$54e42140$feac63c0$@lucidpixels.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AdVJ2z/+9mq0jIkOQpG4zabX2Rwi3A== Content-Language: en-us Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?=A0 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]? [1]=A0https://patchwork.kernel.org/patch/9573203/ [2] https://patchwork.kernel.org/patch/9597797/ Part of the patch in [2] - if the firmware is buggy is there a patch or workaround for these drives (when used in the USB enclosures) to avoid = this issue? + default: + /* + * In case of bogus fw or device, we could end up having + * an unaligned partial completion. Check this here and force + * alignment. + */ + resid =3D scsi_get_resid(SCpnt); + if (resid & (sector_size - 1)) { + sd_printk(KERN_INFO, sdkp, + "Unaligned partial completion (resid=3D%u, sector_sz=3D%u)\n", + resid, sector_size); + resid =3D min(scsi_bufflen(SCpnt), + round_up(resid, sector_size)); + scsi_set_resid(SCpnt, resid); + } Errors: Jul 18 16:25:02 name kernel: [87305.605993] sd 8:0:0:0: [sdg] Unaligned partial completion (resid=3D78, sector_sz=3D512) Jul 18 16:25:02 name=A0kernel: [87305.605993] sd 8:0:0:0: [sdg] = Unaligned partial completion (resid=3D78, sector_sz=3D512) Jul 18 16:25:15 name=A0kernel: [87318.292262] sd 7:0:0:0: [sdf] = Unaligned partial completion (resid=3D78, sector_sz=3D512) Jul 18 16:25:15 name=A0kernel: [87318.292262] sd 7:0:0:0: [sdf] = Unaligned partial completion (resid=3D78, sector_sz=3D512)