From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757664Ab3HMGhr (ORCPT ); Tue, 13 Aug 2013 02:37:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60820 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757542Ab3HMGex (ORCPT ); Tue, 13 Aug 2013 02:34:53 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Martin K. Petersen" , Alan Stern , Stuart Foster , James Bottomley Subject: [ 01/17] SCSI: Dont attempt to send extended INQUIRY command if skip_vpd_pages is set Date: Mon, 12 Aug 2013 23:35:47 -0700 Message-Id: <20130813063501.839896135@linuxfoundation.org> X-Mailer: git-send-email 1.8.3.3.825.g36032ce.dirty In-Reply-To: <20130813063501.728847844@linuxfoundation.org> References: <20130813063501.728847844@linuxfoundation.org> User-Agent: quilt/0.60-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: "Martin K. Petersen" commit 7562523e84ddc742fe1f9db8bd76b01acca89f6b upstream. If a device has the skip_vpd_pages flag set we should simply fail the scsi_get_vpd_page() call. Signed-off-by: Martin K. Petersen Acked-by: Alan Stern Tested-by: Stuart Foster Signed-off-by: James Bottomley Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/scsi.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -1025,6 +1025,9 @@ int scsi_get_vpd_page(struct scsi_device { int i, result; + if (sdev->skip_vpd_pages) + goto fail; + /* Ask for all the pages supported by this device */ result = scsi_vpd_inquiry(sdev, buf, 0, buf_len); if (result)