From nobody Tue Apr 7 14:03:05 2026 Received: from mail-qv1-f65.google.com (mail-qv1-f65.google.com [209.85.219.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EF1C378D80 for ; Wed, 25 Feb 2026 23:14:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772061243; cv=none; b=SBVRsIZhdc6Tc0VcfzCjJ65tEonh5y9zDCscpzNcMVqRiPxWGka/vOGve5OuFWphF1ux26nF7+HRjUtS1SR2YZ9RzcA+c84mpkubYBXoqv6VKpbfuoNBQlnciqwsCqUunMFFaVDOiY40EEoHmiqN4RLXmHSEiixRQhSU5Y2LQos= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772061243; c=relaxed/simple; bh=ZKupJcpDk412tRvHx2oY49WGENTOA6g3D3dL6CQUfEQ=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=Z7pSx8KFj4gWmM6Cr7tQe//02oW4LyQ0edqMJqZQ6mLLGhCB/YmnvHUIynkiIVxJ03NjOYhJfQFwGG6v6hSs0cxK3UUyvlO0T0IUMc9eqJtkPgcs1J2BYyJdQPJrksWxvLjkKLWL8z11E7MuKP8wgA1VyFybPui10BqttL9k+Qg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Ei71Zzlx; arc=none smtp.client-ip=209.85.219.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ei71Zzlx" Received: by mail-qv1-f65.google.com with SMTP id 6a1803df08f44-899a615825fso3174306d6.3 for ; Wed, 25 Feb 2026 15:14:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772061240; x=1772666040; darn=vger.kernel.org; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=6Zo072AtpeglW5vzuPR7O93iMv1AZlyADWsBJMQs7nY=; b=Ei71ZzlxxOnhj3ixJoCmpmibX52CXAmVyLwE+mIcqeCWvm8bRSif2vJyKHRSPyXwFT 713Uk1/28r9Nqggh4WfheM+Uszg01dhwlRQ13EozAV8Eu3UFN7Tx4c4VzJk8CMY1td5A Keleci7Z/aVtGIagZjppDC4AcRh7L5QTJuvCv4h844lp1LxvvyrLNCU7HrExj/fbxJW7 QF9XLpVWM9d8akUKYlooHsRvBNykeaNnop7CgSRkDbRzYKAx9yQfcAbaLO/6tqZsh56M PM056WK2+UMMCN6Jj7AtraOqqA4K4ExEPj/u48E5nET+DvrbJqlbU1GiBhWmFmKKJGS+ uDuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061240; x=1772666040; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6Zo072AtpeglW5vzuPR7O93iMv1AZlyADWsBJMQs7nY=; b=cwrTHniI8xoKq5s7Ixynutk9a3k+3OJd3lsD3EL/aMBWnPpNwWAvlewcwpprJocJ6F 4X74eUn0n2+PIDcflG0VrVOvAjbs4kSw3YI9yFtyNNFY0S5c76wBixa8h/SO6Eemrx0u qcTr6WiXYFCmBwd7M/bch/FS2T2VShjA/7Q8RBLgwRBUhuuAvMo3bUveyWSuLV2TmRTE v329LwwK9J7eKtZxyUAW0hWV/yMmly1a8tZzIhlJRCQFA4OP7oqt5hgDtCxKXkPUxT8Z 8I/hYjDWnF4pi3FcDHSGmT/XPa0F/vm1rKtpl9HrxOP3h8vRlMXsI8vW/c+IHEvFpYV4 nHXA== X-Forwarded-Encrypted: i=1; AJvYcCX2ScFPqW0Lll9mIA+G+J35Zify+btlG1aOZbJRN6qB+AW5bx16sPlAl4Z1b2kF25OYx0L1v6NSLCMla/c=@vger.kernel.org X-Gm-Message-State: AOJu0YwmrTUpZd1LFZTbYYOxCQHrwwTChrX6AomKa2XsMaeYX0h31Hpt UlusfVYCV4YKXNz/Jz8NTM9/6hxF/QvsgvyNliXtCRuiUc0nBOYw0wF7 X-Gm-Gg: ATEYQzx1dLy2PLZI7Ko5mLT0aIy/r6xngbj2mnbIWF54T8RjC2LRWjJXCgCOLi6xXLb zIXccBBIR4AHGgFROSexW1OtAfYJrV/lBeFbAErGGYfMDJcpCQdnuYxHxzLR+p38eQV+Fia2ZEf hIaYvNzAFPJBJAKDZBWNP8rfFUPY/oI1F1cdfjh0IbVpc+Ls7xP08n4Fpn0kQjh/vdVYFoffhv2 vvyloG9pcIYOw8X1k3jSu1SlNRPelzdV9Wse3FsDqyqfMOJfkixfT2UH+hAWc5YCZQA5uyBVGm9 LtMS71gNFlu0noAjWABx0YQ2Btsc7yvFDk20NKE5oDyluUoqSuGnrnYfhirrQtm3uUrQcKbdiQU IVDoI8TXmIML3+gtcpJueW3fO2wkr0UZNaNWgjpoL5r1aGw6uL1Q77yilHa/T1OiWAe43EINMpi gjQGM7+HkLYdUEQyvURFRXatYyU55bZLm0sMlRRdpna0AojP76ml+1YAw0pXzkEFRSAhQ9nwxIC 67p9w== X-Received: by 2002:a05:6214:1c47:b0:894:6622:a6d4 with SMTP id 6a1803df08f44-89979f32bf2mr252222636d6.61.1772061240013; Wed, 25 Feb 2026 15:14:00 -0800 (PST) Received: from ?IPV6:2601:244:417c:14a0:214:15e2:6a74:6134? ([2601:244:417c:14a0:214:15e2:6a74:6134]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-899c7374e07sm2799996d6.33.2026.02.25.15.13.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Feb 2026 15:13:58 -0800 (PST) Message-ID: <786c3713-ebd7-406a-bb93-ce43e249583d@gmail.com> Date: Wed, 25 Feb 2026 17:13:57 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: linux-scsi@vger.kernel.org Cc: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, linux-kernel@vger.kernel.org, kylek389@gmail.com From: Kamil Kaminski Subject: Subject: [PATCH 1/2] scsi: core: Treat "Logical unit access not authorized" as permanent error Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: quoted-printable From 21dfa18035fb03b9c141550aeded92cf6d23473a Mon Sep 17 00:00:00 2001 From: Kamil Kaminski Date: Wed, 25 Feb 2026 13:42:12 -0600 Subject: [PATCH 1/2] scsi: core: Treat "Logical unit access not=20 authorized" as =C2=A0permanent error SanDisk Extreme Portable SSD and similar hardware-encrypted USB drives return Sense Key DATA_PROTECT (0x07) with ASC 0x74, ASCQ 0x71 ("Logical unit access not authorized") when password-locked. The SCSI error handler currently treats this as a generic DATA_PROTECT error. While it eventually fails the command, the block layer continues retrying operations, causing excessive I/O errors that saturate the USB bus and crash xHCI controllers (kernel bug 216696). Add special handling to return SUCCESS immediately for ASC 0x74/ASCQ 0x71, preventing SCSI-level retries and allowing the sd driver to handle the condition gracefully. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=3D216696 Signed-off-by: Kamil Kaminski --- =C2=A0drivers/scsi/scsi_error.c | 18 ++++++++++++++++++ =C2=A01 file changed, 18 insertions(+) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 147127fb4db9..aceb7c55893b 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -692,6 +691,23 @@ enum scsi_disposition scsi_check_sense(struct=20 scsi_cmnd *scmd) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* these are not supported */ =C2=A0 =C2=A0 =C2=A0case DATA_PROTECT: +=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* ASC 0x74/ASCQ 0x71: "Logical unit acce= ss not authorized" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* This indicates a password-locked or ha= rdware-encrypted device +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* (e.g., SanDisk Extreme Portable SSD, W= D My Passport) that +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* requires vendor-specific unlock softwa= re. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* Unlike write protection, this is a sec= urity lock that cannot +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* be cleared by the OS. Retrying causes = USB bus saturation. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* Treat as permanent failure immediately. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/ +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (sshdr.asc =3D=3D 0x74 && sshdr.ascq =3D=3D= 0x71) { +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sdev_printk(KERN_WARNING, scmd->= device, +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "scs= i: Logical unit access not authorized - device=20 is password locked, treating as permanent error\n"); +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 set_scsi_ml_byte(scmd, SCSIML_ST= AT_TGT_FAILURE); +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return SUCCESS; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 } =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (sshdr.asc =3D=3D 0x27 && sshdr.ascq = =3D=3D 0x07) { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Thin provisioning hard = threshold reached */ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set_scsi_ml_byte(scmd, SCS= IML_STAT_NOSPC); --=20 2.53.0