Commit cb1042f2 authored by Salyzyn, Mark's avatar Salyzyn, Mark Committed by James Bottomley

[SCSI] aacraid: add Voodoo Lite class of cards.

The cards being added are supported in a limited sense already through
family matching, but we needed to add some functionality to the driver
to expose selectively the physical drives. These Physical drives are
specifically marked to not be part of any array and thus are declared
JBODs (Just a Bunch Of Drives) for generic SCSI access.

We report that this is the second patch in a set of two, but merely
depends on the stand-alone functionality of the first patch which adds
in that case the ability to report a driver feature flag via sysfs. We
leverage that functionality by reporting that this driver now supports
this new JBOD feature for the controller so that the array management
applications may react accordingly and guide the user as they manage
the controller.
Signed-off-by: default avatarMark Salyzyn <aacraid@adaptec.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 2ca39c48
...@@ -56,6 +56,10 @@ Supported Cards/Chipsets ...@@ -56,6 +56,10 @@ Supported Cards/Chipsets
9005:0285:9005:02d1 Adaptec 5405 (Voodoo40) 9005:0285:9005:02d1 Adaptec 5405 (Voodoo40)
9005:0285:15d9:02d2 SMC AOC-USAS-S8i-LP 9005:0285:15d9:02d2 SMC AOC-USAS-S8i-LP
9005:0285:15d9:02d3 SMC AOC-USAS-S8iR-LP 9005:0285:15d9:02d3 SMC AOC-USAS-S8iR-LP
9005:0285:9005:02d4 Adaptec 2045 (Voodoo04 Lite)
9005:0285:9005:02d5 Adaptec 2405 (Voodoo40 Lite)
9005:0285:9005:02d6 Adaptec 2445 (Voodoo44 Lite)
9005:0285:9005:02d7 Adaptec 2805 (Voodoo80 Lite)
1011:0046:9005:0364 Adaptec 5400S (Mustang) 1011:0046:9005:0364 Adaptec 5400S (Mustang)
9005:0287:9005:0800 Adaptec Themisto (Jupiter) 9005:0287:9005:0800 Adaptec Themisto (Jupiter)
9005:0200:9005:0200 Adaptec Themisto (Jupiter) 9005:0200:9005:0200 Adaptec Themisto (Jupiter)
......
...@@ -1339,6 +1339,8 @@ int aac_get_adapter_info(struct aac_dev* dev) ...@@ -1339,6 +1339,8 @@ int aac_get_adapter_info(struct aac_dev* dev)
} }
dev->cache_protected = 0; dev->cache_protected = 0;
dev->jbod = ((dev->supplement_adapter_info.FeatureBits &
AAC_FEATURE_JBOD) != 0);
dev->nondasd_support = 0; dev->nondasd_support = 0;
dev->raid_scsi_mode = 0; dev->raid_scsi_mode = 0;
if(dev->adapter_info.options & AAC_OPT_NONDASD) if(dev->adapter_info.options & AAC_OPT_NONDASD)
...@@ -1923,7 +1925,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) ...@@ -1923,7 +1925,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
} }
} }
} else { /* check for physical non-dasd devices */ } else { /* check for physical non-dasd devices */
if ((dev->nondasd_support == 1) || expose_physicals) { if (dev->nondasd_support || expose_physicals ||
dev->jbod) {
if (dev->in_reset) if (dev->in_reset)
return -1; return -1;
return aac_send_srb_fib(scsicmd); return aac_send_srb_fib(scsicmd);
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
#ifndef AAC_DRIVER_BUILD #ifndef AAC_DRIVER_BUILD
# define AAC_DRIVER_BUILD 2454 # define AAC_DRIVER_BUILD 2455
# define AAC_DRIVER_BRANCH "-ms" # define AAC_DRIVER_BRANCH "-ms"
#endif #endif
#define MAXIMUM_NUM_CONTAINERS 32 #define MAXIMUM_NUM_CONTAINERS 32
...@@ -866,6 +866,7 @@ struct aac_supplement_adapter_info ...@@ -866,6 +866,7 @@ struct aac_supplement_adapter_info
__le32 ReservedGrowth[1]; __le32 ReservedGrowth[1];
}; };
#define AAC_FEATURE_FALCON cpu_to_le32(0x00000010) #define AAC_FEATURE_FALCON cpu_to_le32(0x00000010)
#define AAC_FEATURE_JBOD cpu_to_le32(0x08000000)
#define AAC_OPTION_MU_RESET cpu_to_le32(0x00000001) #define AAC_OPTION_MU_RESET cpu_to_le32(0x00000001)
#define AAC_OPTION_IGNORE_RESET cpu_to_le32(0x00000002) #define AAC_OPTION_IGNORE_RESET cpu_to_le32(0x00000002)
#define AAC_SIS_VERSION_V3 3 #define AAC_SIS_VERSION_V3 3
...@@ -1012,6 +1013,7 @@ struct aac_dev ...@@ -1012,6 +1013,7 @@ struct aac_dev
* lets break them out so we don't have to do an AND to check them * lets break them out so we don't have to do an AND to check them
*/ */
u8 nondasd_support; u8 nondasd_support;
u8 jbod;
u8 cache_protected; u8 cache_protected;
u8 dac_support; u8 dac_support;
u8 raid_scsi_mode; u8 raid_scsi_mode;
...@@ -1777,6 +1779,8 @@ extern struct aac_common aac_config; ...@@ -1777,6 +1779,8 @@ extern struct aac_common aac_config;
#define AifEnExpEvent 23 /* Firmware Event Log */ #define AifEnExpEvent 23 /* Firmware Event Log */
#define AifExeFirmwarePanic 3 /* Firmware Event Panic */ #define AifExeFirmwarePanic 3 /* Firmware Event Panic */
#define AifHighPriority 3 /* Highest Priority Event */ #define AifHighPriority 3 /* Highest Priority Event */
#define AifEnAddJBOD 30 /* JBOD created */
#define AifEnDeleteJBOD 31 /* JBOD deleted */
#define AifCmdJobProgress 2 /* Progress report */ #define AifCmdJobProgress 2 /* Progress report */
#define AifJobCtrZero 101 /* Array Zero progress */ #define AifJobCtrZero 101 /* Array Zero progress */
......
...@@ -901,7 +901,31 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr) ...@@ -901,7 +901,31 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
case AifEnConfigChange: case AifEnConfigChange:
break; break;
case AifEnAddJBOD:
case AifEnDeleteJBOD:
container = le32_to_cpu(((__le32 *)aifcmd->data)[1]);
if ((container >> 28))
break;
channel = (container >> 24) & 0xF;
if (channel >= dev->maximum_num_channels)
break;
id = container & 0xFFFF;
if (id >= dev->maximum_num_physicals)
break;
lun = (container >> 16) & 0xFF;
channel = aac_phys_to_logical(channel);
device_config_needed =
(((__le32 *)aifcmd->data)[0] ==
cpu_to_le32(AifEnAddJBOD)) ? ADD : DELETE;
break;
case AifEnEnclosureManagement: case AifEnEnclosureManagement:
/*
* If in JBOD mode, automatic exposure of new
* physical target to be suppressed until configured.
*/
if (dev->jbod)
break;
switch (le32_to_cpu(((__le32 *)aifcmd->data)[3])) { switch (le32_to_cpu(((__le32 *)aifcmd->data)[3])) {
case EM_DRIVE_INSERTION: case EM_DRIVE_INSERTION:
case EM_DRIVE_REMOVAL: case EM_DRIVE_REMOVAL:
......
...@@ -404,6 +404,7 @@ static int aac_slave_configure(struct scsi_device *sdev) ...@@ -404,6 +404,7 @@ static int aac_slave_configure(struct scsi_device *sdev)
struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata; struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata;
if ((sdev->type == TYPE_DISK) && if ((sdev->type == TYPE_DISK) &&
(sdev_channel(sdev) != CONTAINER_CHANNEL) && (sdev_channel(sdev) != CONTAINER_CHANNEL) &&
(!aac->jbod || sdev->inq_periph_qual) &&
(!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))) { (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))) {
if (expose_physicals == 0) if (expose_physicals == 0)
return -ENXIO; return -ENXIO;
...@@ -411,7 +412,8 @@ static int aac_slave_configure(struct scsi_device *sdev) ...@@ -411,7 +412,8 @@ static int aac_slave_configure(struct scsi_device *sdev)
sdev->no_uld_attach = 1; sdev->no_uld_attach = 1;
} }
if (sdev->tagged_supported && (sdev->type == TYPE_DISK) && if (sdev->tagged_supported && (sdev->type == TYPE_DISK) &&
(sdev_channel(sdev) == CONTAINER_CHANNEL)) { (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2)) &&
!sdev->no_uld_attach) {
struct scsi_device * dev; struct scsi_device * dev;
struct Scsi_Host *host = sdev->host; struct Scsi_Host *host = sdev->host;
unsigned num_lsu = 0; unsigned num_lsu = 0;
...@@ -430,8 +432,11 @@ static int aac_slave_configure(struct scsi_device *sdev) ...@@ -430,8 +432,11 @@ static int aac_slave_configure(struct scsi_device *sdev)
++num_lsu; ++num_lsu;
__shost_for_each_device(dev, host) { __shost_for_each_device(dev, host) {
if (dev->tagged_supported && (dev->type == TYPE_DISK) && if (dev->tagged_supported && (dev->type == TYPE_DISK) &&
(sdev_channel(dev) == CONTAINER_CHANNEL)) { (!aac->raid_scsi_mode ||
if (!aac->fsa_dev[sdev_id(dev)].valid) (sdev_channel(sdev) != 2)) &&
!dev->no_uld_attach) {
if ((sdev_channel(dev) != CONTAINER_CHANNEL)
|| !aac->fsa_dev[sdev_id(dev)].valid)
++num_lsu; ++num_lsu;
} else } else
++num_one; ++num_one;
...@@ -804,6 +809,8 @@ static ssize_t aac_show_flags(struct class_device *class_dev, char *buf) ...@@ -804,6 +809,8 @@ static ssize_t aac_show_flags(struct class_device *class_dev, char *buf)
if (dev->raw_io_interface && dev->raw_io_64) if (dev->raw_io_interface && dev->raw_io_64)
len += snprintf(buf + len, PAGE_SIZE - len, len += snprintf(buf + len, PAGE_SIZE - len,
"SAI_READ_CAPACITY_16\n"); "SAI_READ_CAPACITY_16\n");
if (dev->jbod)
len += snprintf(buf + len, PAGE_SIZE - len, "SUPPORTED_JBOD\n");
return len; return len;
} }
...@@ -1157,7 +1164,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, ...@@ -1157,7 +1164,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
* all containers are on the virtual channel 0 (CONTAINER_CHANNEL) * all containers are on the virtual channel 0 (CONTAINER_CHANNEL)
* physical channels are address by their actual physical number+1 * physical channels are address by their actual physical number+1
*/ */
if ((aac->nondasd_support == 1) || expose_physicals) if (aac->nondasd_support || expose_physicals || aac->jbod)
shost->max_channel = aac->maximum_num_channels; shost->max_channel = aac->maximum_num_channels;
else else
shost->max_channel = 0; shost->max_channel = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment