public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Moore <eric.moore@lsi.com>
To: linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com
Subject: [PATCH 1/2] fusion :  shost max_id not set in VMWare guest os
Date: Mon, 19 Mar 2007 10:30:43 -0600	[thread overview]
Message-ID: <20070319163043.GA28055@lsil.com> (raw)

[PATCH 1/2] fusion :  shost max_id not set in VMWare guest os

In vmware guest os with emulated LSI 53c1030, the port facts config page is
not having MaxDevices initialized to 16 devices. Instead its set to zero.
Thereforewhen driver loads, no devices are scanned for from scsi_scan_host.
Prior to the3.04.04 driver, shost max_id was set to hard coded value MPT_MAX_SCSI_DEVICES. After that release, support for greater than 255 targets was added, and the driver was taking the target count from the port facts instead.  With this patch we will restore the hard coded values for SPI, but at the same time use the settingsneeded for SAS and Fibre Channel.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>


diff -uarpN b/drivers/message/fusion/mptbase.c a/drivers/message/fusion/mptbase.c
--- b/drivers/message/fusion/mptbase.c	2007-03-15 18:20:01.000000000 -0600
+++ a/drivers/message/fusion/mptbase.c	2007-03-18 12:05:54.000000000 -0600
@@ -2570,8 +2570,19 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn
 	pfacts->MaxPersistentIDs = le16_to_cpu(pfacts->MaxPersistentIDs);
 	pfacts->MaxLanBuckets = le16_to_cpu(pfacts->MaxLanBuckets);
 
-	max_id = (ioc->bus_type == SAS) ? pfacts->PortSCSIID :
-	    pfacts->MaxDevices;
+	switch (ioc->bus_type) {
+	case SAS:
+		max_id = pfacts->PortSCSIID;
+		break;
+	case FC:
+		max_id = pfacts->MaxDevices;
+		break;
+	case SPI:
+	default:
+		max_id = MPT_MAX_SCSI_DEVICES;
+		break;
+	}
+
 	ioc->devices_per_bus = (max_id > 255) ? 256 : max_id;
 	ioc->number_of_buses = (ioc->devices_per_bus < 256) ? 1 : max_id/256;
 

             reply	other threads:[~2007-03-19 16:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-19 16:30 Eric Moore [this message]
2007-03-19 17:06 ` [PATCH 1/2] fusion : shost max_id not set in VMWare guest os Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2007-09-09 22:58 devzero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070319163043.GA28055@lsil.com \
    --to=eric.moore@lsi.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox