diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 6a553ea730db..0523cc6d895c 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -401,16 +401,14 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev, | |||
401 | 401 | ||
402 | static int aac_slave_configure(struct scsi_device *sdev) | 402 | static int aac_slave_configure(struct scsi_device *sdev) |
403 | { | 403 | { |
404 | struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata; | ||
404 | if ((sdev->type == TYPE_DISK) && | 405 | if ((sdev->type == TYPE_DISK) && |
405 | (sdev_channel(sdev) != CONTAINER_CHANNEL)) { | 406 | (sdev_channel(sdev) != CONTAINER_CHANNEL) && |
407 | (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))) { | ||
406 | if (expose_physicals == 0) | 408 | if (expose_physicals == 0) |
407 | return -ENXIO; | 409 | return -ENXIO; |
408 | if (expose_physicals < 0) { | 410 | if (expose_physicals < 0) |
409 | struct aac_dev *aac = | 411 | sdev->no_uld_attach = 1; |
410 | (struct aac_dev *)sdev->host->hostdata; | ||
411 | if (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2)) | ||
412 | sdev->no_uld_attach = 1; | ||
413 | } | ||
414 | } | 412 | } |
415 | if (sdev->tagged_supported && (sdev->type == TYPE_DISK) && | 413 | if (sdev->tagged_supported && (sdev->type == TYPE_DISK) && |
416 | (sdev_channel(sdev) == CONTAINER_CHANNEL)) { | 414 | (sdev_channel(sdev) == CONTAINER_CHANNEL)) { |
@@ -419,6 +417,7 @@ static int aac_slave_configure(struct scsi_device *sdev) | |||
419 | unsigned num_lsu = 0; | 417 | unsigned num_lsu = 0; |
420 | unsigned num_one = 0; | 418 | unsigned num_one = 0; |
421 | unsigned depth; | 419 | unsigned depth; |
420 | unsigned cid; | ||
422 | 421 | ||
423 | /* | 422 | /* |
424 | * Firmware has an individual device recovery time typically | 423 | * Firmware has an individual device recovery time typically |
@@ -426,11 +425,15 @@ static int aac_slave_configure(struct scsi_device *sdev) | |||
426 | */ | 425 | */ |
427 | if (sdev->timeout < (45 * HZ)) | 426 | if (sdev->timeout < (45 * HZ)) |
428 | sdev->timeout = 45 * HZ; | 427 | sdev->timeout = 45 * HZ; |
428 | for (cid = 0; cid < aac->maximum_num_containers; ++cid) | ||
429 | if (aac->fsa_dev[cid].valid) | ||
430 | ++num_lsu; | ||
429 | __shost_for_each_device(dev, host) { | 431 | __shost_for_each_device(dev, host) { |
430 | if (dev->tagged_supported && (dev->type == TYPE_DISK) && | 432 | if (dev->tagged_supported && (dev->type == TYPE_DISK) && |
431 | (sdev_channel(dev) == CONTAINER_CHANNEL)) | 433 | (sdev_channel(dev) == CONTAINER_CHANNEL)) { |
432 | ++num_lsu; | 434 | if (!aac->fsa_dev[sdev_id(dev)].valid) |
433 | else | 435 | ++num_lsu; |
436 | } else | ||
434 | ++num_one; | 437 | ++num_one; |
435 | } | 438 | } |
436 | if (num_lsu == 0) | 439 | if (num_lsu == 0) |