Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5482207pxb; Wed, 26 Jan 2022 13:05:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxS3TqMv8PqW3XU7SfXiqEoQnWojguoxgKbdaRXVfwkXqIh2WEinIY1IoQtG1kdiVpmsPuI X-Received: by 2002:a17:90b:3ec5:: with SMTP id rm5mr8759224pjb.140.1643231130280; Wed, 26 Jan 2022 13:05:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643231130; cv=none; d=google.com; s=arc-20160816; b=ZST8K+uQVw1v+H6grhevA/0IaCawyBf8GzGP2KM56gPGZQyusLndyXEm/RcV5dydbq fDWRrI8se4hznYrmft3RzTAoun7nX/S/yYxco0QOpxldTjcqYn6PsbJyet2rYAtJsL2t d7rjVM+ASp/a+BaJMRmqUceZsC9Vr0QRI558u3iFocN0PYaUfOBxHXIEbx1jOp6jbri8 0ZXTDWiEBusL7NyDCXuAMjgFE1fJKH8d+nZjzylLl024SZtxpxUf6OYqkCwW0Vi1ecWW N/FAdc3CtbX27ALxl5agtjknJiwIgg+NUTy/VtEDCJaHl3ldb79CIOJQPOhPaZtFyO4f q2Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dC/zFZJmtsP6j9qj24Ln2gm6Bs+b5qGcitw5Gm7Y8Ro=; b=zxu16K9h+qNe1hZBDuGMBEMu5rOP5+bmB13F+GqQnJKvrEvTHba/8jWMBczQR0jcf9 +tzBdaQjG2JcrLZNGQ3iVotL8+eR+Xvsosx/kyNdIqNWeAFLHsLcZXlta+HMzwJFNuJp Lqay0wwSRVhf/3oLKc2VcQWpVH3Vpi5MEtCvVPmY3GoOia0zhLVYZMDBCiA72VHR7o3r rMRvEuMPoGf6RbrKCEM+CXmwJTAt5jKcGbmpuQJp2Bzs4XIjCroYKyNdGJ8LjLmqXMw+ Y6DpplQr8YNjw8lJApzwZ5wOYJmgAqCuDzk+2zYWpLC4ZlmMsYcNVvcSClzPrK9wrzs9 MViQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F1TA3Fcf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si345289pgh.302.2022.01.26.13.05.17; Wed, 26 Jan 2022 13:05:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F1TA3Fcf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240232AbiAZKvO (ORCPT + 99 others); Wed, 26 Jan 2022 05:51:14 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:52592 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240215AbiAZKvN (ORCPT ); Wed, 26 Jan 2022 05:51:13 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B5BB061835; Wed, 26 Jan 2022 10:51:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4684BC340E3; Wed, 26 Jan 2022 10:51:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643194272; bh=qKqDdH8fT1bUejTXj94PeLOWoPEeCNsRZYLJVmoIVZU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F1TA3Fcfce6HRDQ5yBJSd5XVUB4aTXjaBpL05mQUO84PsMzxgIF0C05gzHR+HFS6w fB+OyK/zU/SZpbAvAMjrpONvDyOm0mOhMw2f8MhoOUvmtpKNtb77kkrX8FaiZPdM2y uBNhCMqxmjkQOQ9z0pPVM2JxFH7LByxMDWXaObq4= Date: Wed, 26 Jan 2022 11:51:09 +0100 From: Greg Kroah-Hartman To: Neal Liu Cc: Felipe Balbi , Alan Stern , Chen Lin , Wesley Cheng , Nikita Yushchenko , Cai Huoqing , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-aspeed@lists.ozlabs.org, BMC-SW@aspeedtech.com Subject: Re: [PATCH] usb: gadget: mass_storage: add READ_TOC cmd mask check Message-ID: References: <20220126100856.3680716-1-neal_liu@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220126100856.3680716-1-neal_liu@aspeedtech.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 26, 2022 at 06:08:56PM +0800, Neal Liu wrote: > READ_TOC cmnd[2] specifies Format Field which is defined > in SCSI-3 spec. Add command mask to avoid marking this > sense data as invalid. > > Signed-off-by: Neal Liu > --- > drivers/usb/gadget/function/f_mass_storage.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c > index 46dd11dcb3a8..14d51695b8ae 100644 > --- a/drivers/usb/gadget/function/f_mass_storage.c > +++ b/drivers/usb/gadget/function/f_mass_storage.c > @@ -1944,7 +1944,7 @@ static int do_scsi_command(struct fsg_common *common) > common->data_size_from_cmnd = > get_unaligned_be16(&common->cmnd[7]); > reply = check_command(common, 10, DATA_DIR_TO_HOST, > - (7<<6) | (1<<1), 1, > + (7<<6) | (1<<1) | (1<<2), 1, Can we have real names here instead of magic numbers? And what commit does this fix? Is it a regression or has it always never worked properly? thanks, greg k-h