aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/linit.c
diff options
context:
space:
mode:
authorMark Salyzyn <Mark_Salyzyn@adaptec.com>2008-04-30 15:47:35 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-05-02 14:06:09 -0400
commita4576b5da671563187ac388e36e1d077bd20e43a (patch)
tree0bfc4ebe89f11445126c2815701afd4ffca7cd4f /drivers/scsi/aacraid/linit.c
parente2efe7aa24dc7b430d2ea109fa117bd3c60ae8e6 (diff)
[SCSI] aacraid: Fix jbod operations scan issues
As JBOD devices (really just Simple Single Drive Volumes exported to the SCSI channel) are managed, they fail to update correctly when the driver triggers a SCSI scan. In addition, the ability to change multiple arrays or JBODs at the same time was resulting in dropped scans, set up a mechanism to issue a list of single target scans on a single configuration change notification from the Firmware. Performed some additional sundry cosmetic code style cleanups. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r--drivers/scsi/aacraid/linit.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index c109f63f8279..c444527ae2fa 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -401,6 +401,8 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
401static int aac_slave_configure(struct scsi_device *sdev) 401static int aac_slave_configure(struct scsi_device *sdev)
402{ 402{
403 struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata; 403 struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata;
404 if (aac->jbod && (sdev->type == TYPE_DISK))
405 sdev->removable = 1;
404 if ((sdev->type == TYPE_DISK) && 406 if ((sdev->type == TYPE_DISK) &&
405 (sdev_channel(sdev) != CONTAINER_CHANNEL) && 407 (sdev_channel(sdev) != CONTAINER_CHANNEL) &&
406 (!aac->jbod || sdev->inq_periph_qual) && 408 (!aac->jbod || sdev->inq_periph_qual) &&
@@ -1106,7 +1108,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
1106 aac->pdev = pdev; 1108 aac->pdev = pdev;
1107 aac->name = aac_driver_template.name; 1109 aac->name = aac_driver_template.name;
1108 aac->id = shost->unique_id; 1110 aac->id = shost->unique_id;
1109 aac->cardtype = index; 1111 aac->cardtype = index;
1110 INIT_LIST_HEAD(&aac->entry); 1112 INIT_LIST_HEAD(&aac->entry);
1111 1113
1112 aac->fibs = kmalloc(sizeof(struct fib) * (shost->can_queue + AAC_NUM_MGT_FIB), GFP_KERNEL); 1114 aac->fibs = kmalloc(sizeof(struct fib) * (shost->can_queue + AAC_NUM_MGT_FIB), GFP_KERNEL);
@@ -1146,19 +1148,19 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
1146 goto out_deinit; 1148 goto out_deinit;
1147 1149
1148 /* 1150 /*
1149 * Lets override negotiations and drop the maximum SG limit to 34 1151 * Lets override negotiations and drop the maximum SG limit to 34
1150 */ 1152 */
1151 if ((aac_drivers[index].quirks & AAC_QUIRK_34SG) && 1153 if ((aac_drivers[index].quirks & AAC_QUIRK_34SG) &&
1152 (shost->sg_tablesize > 34)) { 1154 (shost->sg_tablesize > 34)) {
1153 shost->sg_tablesize = 34; 1155 shost->sg_tablesize = 34;
1154 shost->max_sectors = (shost->sg_tablesize * 8) + 112; 1156 shost->max_sectors = (shost->sg_tablesize * 8) + 112;
1155 } 1157 }
1156 1158
1157 if ((aac_drivers[index].quirks & AAC_QUIRK_17SG) && 1159 if ((aac_drivers[index].quirks & AAC_QUIRK_17SG) &&
1158 (shost->sg_tablesize > 17)) { 1160 (shost->sg_tablesize > 17)) {
1159 shost->sg_tablesize = 17; 1161 shost->sg_tablesize = 17;
1160 shost->max_sectors = (shost->sg_tablesize * 8) + 112; 1162 shost->max_sectors = (shost->sg_tablesize * 8) + 112;
1161 } 1163 }
1162 1164
1163 error = pci_set_dma_max_seg_size(pdev, 1165 error = pci_set_dma_max_seg_size(pdev,
1164 (aac->adapter_info.options & AAC_OPT_NEW_COMM) ? 1166 (aac->adapter_info.options & AAC_OPT_NEW_COMM) ?
@@ -1174,7 +1176,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
1174 else 1176 else
1175 aac->printf_enabled = 0; 1177 aac->printf_enabled = 0;
1176 1178
1177 /* 1179 /*
1178 * max channel will be the physical channels plus 1 virtual channel 1180 * max channel will be the physical channels plus 1 virtual channel
1179 * all containers are on the virtual channel 0 (CONTAINER_CHANNEL) 1181 * all containers are on the virtual channel 0 (CONTAINER_CHANNEL)
1180 * physical channels are address by their actual physical number+1 1182 * physical channels are address by their actual physical number+1