From patchwork Thu Oct 15 08:09:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Saxena X-Patchwork-Id: 7403741 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4766D9F302 for ; Thu, 15 Oct 2015 08:15:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6619A20852 for ; Thu, 15 Oct 2015 08:15:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B9AC2084C for ; Thu, 15 Oct 2015 08:15:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750852AbbJOIPk (ORCPT ); Thu, 15 Oct 2015 04:15:40 -0400 Received: from rndsmtp2.avagotech.com ([199.3.246.48]:42975 "EHLO rndsmtp2.avagotech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbbJOIPi (ORCPT ); Thu, 15 Oct 2015 04:15:38 -0400 X-Greylist: delayed 344 seconds by postgrey-1.27 at vger.kernel.org; Thu, 15 Oct 2015 04:15:38 EDT Received: from casmh001.sjs.avagotech.net (casmh001.sjs.avagotech.net [135.141.8.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rndsmtp2.avagotech.com (Postfix) with ESMTPS id 732D712000A; Thu, 15 Oct 2015 01:09:52 -0700 (PDT) Received: from palmhbs0.lsi.com (palmhbs0.lsi.com [128.94.222.181]) by casmh001.sjs.avagotech.net (8.14.4/8.14.4) with ESMTP id t9F89ok3004731; Thu, 15 Oct 2015 01:09:51 -0700 Received: from localhost (dhcp-135-24-192-102.lsi.com [135.24.192.102]) by palmhbs0.lsi.com (8.13.8/8.12.11) with ESMTP id t9F8GgOq029543; Thu, 15 Oct 2015 04:16:43 -0400 From: sumit.saxena@avagotech.com Message-Id: <201510150816.t9F8GgOq029543@palmhbs0.lsi.com> Date: Thu, 15 Oct 2015 13:39:24 +0530 To: linux-scsi@vger.kernel.org, stable@vger.kernel.org, thenzl@redhat.com, martin.petersen@oracle.com, hch@infradead.org, jbottomley@parallels.com, kashyap.desai@avagotech.com, sumit.saxena@avagotech.com, kiran-kumar.kasturi@avagotech.com Subject: [PATCH 01/12] megaraid_sas : Expose TAPE drives unconditionally Cc: uday.lingala@avagotech.com User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Expose non-disk(TAPE drive, CD-ROM) unconditionally. This issue is reported in Redhat Bugzilla [Bug 1254762]. Cc: Signed-off-by: Sumit Saxena Signed-off-by: Kashyap Desai Reviewed-by: Tomas Henzl --- drivers/scsi/megaraid/megaraid_sas_base.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index d2ebcdd..d00d494 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -1743,8 +1743,9 @@ static int megasas_slave_alloc(struct scsi_device *sdev) pd_index = (sdev->channel * MEGASAS_MAX_DEV_PER_CHANNEL) + sdev->id; - if (instance->pd_list[pd_index].driveState == - MR_PD_STATE_SYSTEM) { + if ((instance->pd_list[pd_index].driveState == + MR_PD_STATE_SYSTEM) || + (instance->pd_list[pd_index].driveType != TYPE_DISK)) { return 0; } return -ENXIO;