From patchwork Tue Sep 20 22:10:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 115634 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 5F246B6F94 for ; Wed, 21 Sep 2011 08:10:41 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752191Ab1ITWKi (ORCPT ); Tue, 20 Sep 2011 18:10:38 -0400 Received: from mga11.intel.com ([192.55.52.93]:3865 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751810Ab1ITWKg (ORCPT ); Tue, 20 Sep 2011 18:10:36 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 20 Sep 2011 15:10:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.68,413,1312182000"; d="scan'208";a="53758218" Received: from dwillia2-linux.jf.intel.com (HELO dwillia2-linux.localdomain) ([10.23.45.73]) by fmsmga001.fm.intel.com with ESMTP; 20 Sep 2011 15:10:19 -0700 Received: from localhost6.localdomain6 (localhost.localdomain [127.0.0.1]) by dwillia2-linux.localdomain (Postfix) with ESMTP id E007F5001BF; Tue, 20 Sep 2011 15:10:19 -0700 (PDT) Subject: [PATCH 1/5] libsas: disable scanning lun > 0 on ata devices To: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org From: Dan Williams Cc: Luben Tuikov , jgarzik@pobox.com, JBottomley@parallels.com, Jack Wang , Xiangliang Yu , Mark Salyzyn , Darrick Wong Date: Tue, 20 Sep 2011 15:10:19 -0700 Message-ID: <20110920221008.1094.34064.stgit@localhost6.localdomain6> In-Reply-To: <20110920220819.1094.12265.stgit@localhost6.localdomain6> References: <20110920220819.1094.12265.stgit@localhost6.localdomain6> User-Agent: StGit/0.15-7-g9bfb-dirty MIME-Version: 1.0 Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Currently mvsas and pm8001 have custom ->slave_alloc implementations to achieve this. Uplevel it for all libsas drivers as isci encounters problems with atapi devices when scanning past lun0. Just do what Darrick suggested [1], and limit the scan for ata devices. [1] http://marc.info/?l=linux-scsi&m=116604101119861&w=2 Cc: Darrick Wong Cc: Xiangliang Yu Cc: Jack Wang Cc: Mark Salyzyn Cc: Luben Tuikov Signed-off-by: Dan Williams Signed-off-by: Dan Williams Acked-by: Jeff Garzik --- drivers/scsi/scsi_transport_sas.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index c6fcf76..9d9330a 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -1545,8 +1545,14 @@ int sas_rphy_add(struct sas_rphy *rphy) if (identify->device_type == SAS_END_DEVICE && rphy->scsi_target_id != -1) { - scsi_scan_target(&rphy->dev, 0, - rphy->scsi_target_id, SCAN_WILD_CARD, 0); + int lun; + + if (identify->target_port_protocols & SAS_PROTOCOL_SSP) + lun = SCAN_WILD_CARD; + else + lun = 0; + + scsi_scan_target(&rphy->dev, 0, rphy->scsi_target_id, lun, 0); } return 0;