From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32F1F1A76A1; Tue, 30 Jul 2024 17:24:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722360278; cv=none; b=QQXLw/SwJgsKZuJr/nZZuzRgBM30X3yYgkVvqHpSKXDZN+TBXvlm28rMIPNu0VwAm9z/yxg1Ota/QWRZwXEFgjdDCa50MxYY1kzi/ZNbm3BoSvvqDyUt6GMNpuEcaR1K5wCrUjUG0/tMyj229ZxT/WpUuMubdhpl6vQhwQXUd4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722360278; c=relaxed/simple; bh=k/sUcE+YL36QDOoG5PPP2Ndi6j+y6XBUuFVH52kFMTI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ygv0PwSmpgztDIhQ82RPaEtwF4ZJz3rvh9JQHdWaeUDFpjpJq0BpMrzZdb/MHVFdfPfB46/4oXgzfH8wr4UOkt2oyJ5D5efLqyoukLYFRH28NzSpSIIijt2YXT6asqtE4WQ2K3UeCs6604uSU64Nlu3gr+d1G+HeT+4JGt+LeiE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oF0nqBaF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="oF0nqBaF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25C66C32782; Tue, 30 Jul 2024 17:24:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722360278; bh=k/sUcE+YL36QDOoG5PPP2Ndi6j+y6XBUuFVH52kFMTI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oF0nqBaFjoEb6AFl1oebcYLVcBhbwtwa3flOtxCqpevP0sBorbPKRpu7Et3mAIOu8 VhCjg4SCY0R/I8vttnEV49jAyZo12HoQmDHYTKNmBxvC6Yr2RXLN+HXC0GqBgciMA2 kqJRHmwlmhcNYaTrmh99IhhFHiYewllZ7z17hUtw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Saurav Kashyap , Nilesh Javali , Himanshu Madhani , "Martin K. Petersen" Subject: [PATCH 6.10 650/809] scsi: qla2xxx: Return ENOBUFS if sg_cnt is more than one for ELS cmds Date: Tue, 30 Jul 2024 17:48:46 +0200 Message-ID: <20240730151750.550322429@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240730151724.637682316@linuxfoundation.org> References: <20240730151724.637682316@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Saurav Kashyap commit ce2065c4cc4f05635413f63f6dc038d7d4842e31 upstream. Firmware only supports single DSDs in ELS Pass-through IOCB (0x53h), sg cnt is decided by the SCSI ML. User is not aware of the cause of an acutal error. Return the appropriate return code that will be decoded by API and application and proper error message will be displayed to user. Fixes: 6e98016ca077 ("[SCSI] qla2xxx: Re-organized BSG interface specific code.") Cc: stable@vger.kernel.org Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-5-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_bsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c @@ -324,7 +324,7 @@ qla2x00_process_els(struct bsg_job *bsg_ "request_sg_cnt=%x reply_sg_cnt=%x.\n", bsg_job->request_payload.sg_cnt, bsg_job->reply_payload.sg_cnt); - rval = -EPERM; + rval = -ENOBUFS; goto done; }