From patchwork Wed Jul 4 04:24:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 1154041 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 992F8DFF0F for ; Wed, 4 Jul 2012 04:27:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933221Ab2GDE1L (ORCPT ); Wed, 4 Jul 2012 00:27:11 -0400 Received: from mail.linux-iscsi.org ([67.23.28.174]:33755 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750987Ab2GDE05 (ORCPT ); Wed, 4 Jul 2012 00:26:57 -0400 Received: from linux-iscsi.org (localhost [127.0.0.1]) by linux-iscsi.org (Postfix) with ESMTP id 0875622D9DB; Wed, 4 Jul 2012 04:24:35 +0000 (UTC) From: "Nicholas A. Bellinger" To: target-devel Cc: linux-scsi , lf-virt , kvm-devel , Stefan Hajnoczi , Zhi Yong Wu , Anthony Liguori , Paolo Bonzini , "Michael S. Tsirkin" , Christoph Hellwig , Jens Axboe , Hannes Reinecke , Nicholas Bellinger Subject: [PATCH 6/6] virtio-scsi: Set shost->max_id=1 for tcm_vhost WWPNs Date: Wed, 4 Jul 2012 04:24:06 +0000 Message-Id: <1341375846-27882-7-git-send-email-nab@linux-iscsi.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1341375846-27882-1-git-send-email-nab@linux-iscsi.org> References: <1341375846-27882-1-git-send-email-nab@linux-iscsi.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Nicholas Bellinger This is currently required for connecting to tcm_vhost in order to prevent the client LUN scan from detecting the same tcm_vhost WWPN on multiple target IDs. Cc: Paolo Bonzini Cc: Stefan Hajnoczi Cc: Zhi Yong Wu Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-by: Nicholas Bellinger --- drivers/scsi/virtio_scsi.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 391b30d..8711951 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -475,7 +475,10 @@ static int __devinit virtscsi_probe(struct virtio_device *vdev) shost->cmd_per_lun = min_t(u32, cmd_per_lun, shost->can_queue); shost->max_sectors = virtscsi_config_get(vdev, max_sectors) ?: 0xFFFF; shost->max_lun = virtscsi_config_get(vdev, max_lun) + 1; - shost->max_id = virtscsi_config_get(vdev, max_target) + 1; + /* + * Currently required for tcm_vhost to function.. + */ + shost->max_id = 1; shost->max_channel = 0; shost->max_cmd_len = VIRTIO_SCSI_CDB_SIZE; err = scsi_add_host(shost, &vdev->dev);