Lines Matching defs:sdev
277 * @sdev: The scsi device corresponding to the disk
297 static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
383 * @sdev: SCSI device we are considering
390 static int aac_slave_configure(struct scsi_device *sdev)
392 struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata;
400 chn = aac_logical_to_phys(sdev_channel(sdev));
401 tid = sdev_id(sdev);
417 if (aac->jbod && (sdev->type == TYPE_DISK))
418 sdev->removable = 1;
420 if (sdev->type == TYPE_DISK
421 && sdev_channel(sdev) != CONTAINER_CHANNEL
422 && (!aac->jbod || sdev->inq_periph_qual)
423 && (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))) {
429 sdev->no_uld_attach = 1;
432 if (sdev->tagged_supported
433 && sdev->type == TYPE_DISK
434 && (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))
435 && !sdev->no_uld_attach) {
438 struct Scsi_Host *host = sdev->host;
452 && (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))
468 if (sdev_channel(sdev) != NATIVE_CHANNEL)
481 if (strncmp(sdev->vendor, "ATA", 3) == 0)
494 blk_queue_rq_timeout(sdev->request_queue, timeout * HZ);
502 scsi_change_queue_depth(sdev, depth);
504 sdev->tagged_supported = 1;
511 * @sdev: SCSI device we are considering
518 static int aac_change_queue_depth(struct scsi_device *sdev, int depth)
520 struct aac_dev *aac = (struct aac_dev *)(sdev->host->hostdata);
523 chn = aac_logical_to_phys(sdev_channel(sdev));
524 tid = sdev_id(sdev);
529 if (sdev->tagged_supported && (sdev->type == TYPE_DISK) &&
530 (sdev_channel(sdev) == CONTAINER_CHANNEL)) {
532 struct Scsi_Host *host = sdev->host;
549 return scsi_change_queue_depth(sdev, depth);
551 scsi_change_queue_depth(sdev, aac->hba_map[chn][tid].qd_limit);
553 scsi_change_queue_depth(sdev, 1);
555 return sdev->queue_depth;
560 struct scsi_device *sdev = to_scsi_device(dev);
561 struct aac_dev *aac = (struct aac_dev *)(sdev->host->hostdata);
562 if (sdev_channel(sdev) != CONTAINER_CHANNEL)
563 return snprintf(buf, PAGE_SIZE, sdev->no_uld_attach
565 ((aac->jbod && (sdev->type == TYPE_DISK)) ? "JBOD\n" : ""));
567 get_container_type(aac->fsa_dev[sdev_id(sdev)].type));
581 struct scsi_device *sdev = to_scsi_device(dev);
582 struct aac_dev *aac = (struct aac_dev *)(sdev->host->hostdata);
587 if (sdev_channel(sdev) == CONTAINER_CHANNEL)
588 memcpy(sn, aac->fsa_dev[sdev_id(sdev)].identifier, sizeof(sn));
614 static int aac_ioctl(struct scsi_device *sdev, unsigned int cmd,
618 struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;