Lines Matching defs:sdev
275 * @sdev: The scsi device corresponding to the disk
295 static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
381 * @sdev: SCSI device we are considering
388 static int aac_slave_configure(struct scsi_device *sdev)
390 struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata;
398 chn = aac_logical_to_phys(sdev_channel(sdev));
399 tid = sdev_id(sdev);
415 if (aac->jbod && (sdev->type == TYPE_DISK))
416 sdev->removable = 1;
418 if (sdev->type == TYPE_DISK
419 && sdev_channel(sdev) != CONTAINER_CHANNEL
420 && (!aac->jbod || sdev->inq_periph_qual)
421 && (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))) {
427 sdev->no_uld_attach = 1;
430 if (sdev->tagged_supported
431 && sdev->type == TYPE_DISK
432 && (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))
433 && !sdev->no_uld_attach) {
436 struct Scsi_Host *host = sdev->host;
450 && (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))
466 if (sdev_channel(sdev) != NATIVE_CHANNEL)
479 if (strncmp(sdev->vendor, "ATA", 3) == 0)
492 blk_queue_rq_timeout(sdev->request_queue, timeout * HZ);
500 scsi_change_queue_depth(sdev, depth);
502 sdev->tagged_supported = 1;
509 * @sdev: SCSI device we are considering
516 static int aac_change_queue_depth(struct scsi_device *sdev, int depth)
518 struct aac_dev *aac = (struct aac_dev *)(sdev->host->hostdata);
521 chn = aac_logical_to_phys(sdev_channel(sdev));
522 tid = sdev_id(sdev);
527 if (sdev->tagged_supported && (sdev->type == TYPE_DISK) &&
528 (sdev_channel(sdev) == CONTAINER_CHANNEL)) {
530 struct Scsi_Host *host = sdev->host;
547 return scsi_change_queue_depth(sdev, depth);
549 scsi_change_queue_depth(sdev, aac->hba_map[chn][tid].qd_limit);
551 scsi_change_queue_depth(sdev, 1);
553 return sdev->queue_depth;
558 struct scsi_device *sdev = to_scsi_device(dev);
559 struct aac_dev *aac = (struct aac_dev *)(sdev->host->hostdata);
560 if (sdev_channel(sdev) != CONTAINER_CHANNEL)
561 return snprintf(buf, PAGE_SIZE, sdev->no_uld_attach
563 ((aac->jbod && (sdev->type == TYPE_DISK)) ? "JBOD\n" : ""));
565 get_container_type(aac->fsa_dev[sdev_id(sdev)].type));
579 struct scsi_device *sdev = to_scsi_device(dev);
580 struct aac_dev *aac = (struct aac_dev *)(sdev->host->hostdata);
585 if (sdev_channel(sdev) == CONTAINER_CHANNEL)
586 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;