Lines Matching defs:sdev
102 * @sdev: SCSI device
109 struct scsi_device *sdev)
123 if (sdev->scsi_level < SCSI_2) {
129 if (scsi_device_wide(sdev))
132 if (scsi_device_sync(sdev)) {
134 if (!scsi_device_dt(sdev))
137 if (!scsi_device_ius(sdev) &&
138 !scsi_device_qas(sdev))
142 if (scsi_device_qas(sdev)) {
146 scsi_device_qas(sdev), id));
149 if (sdev->type == TYPE_TAPE &&
150 scsi_device_ius(sdev))
170 if (!sdev->tagged_supported)
213 spi_min_period(scsi_target(sdev)) = factor;
214 spi_max_offset(scsi_target(sdev)) = offset;
215 spi_max_width(scsi_target(sdev)) = width;
318 * @sdev: SCSI device
329 struct scsi_device *sdev)
335 if (sdev->inq_periph_qual != 0)
341 vtarget->type = sdev->type;
343 if ((sdev->type == TYPE_PROCESSOR) && (hd->ioc->spi_data.Saf_Te)) {
348 }else if ((sdev->type == TYPE_PROCESSOR) &&
350 if (sdev->inquiry_len > 49 ) {
351 if (sdev->inquiry[44] == 'S' &&
352 sdev->inquiry[45] == 'A' &&
353 sdev->inquiry[46] == 'F' &&
354 sdev->inquiry[47] == '-' &&
355 sdev->inquiry[48] == 'T' &&
356 sdev->inquiry[49] == 'E' ) {
362 mptspi_setTargetNegoParms(hd, vtarget, sdev);
684 struct scsi_device *sdev)
686 VirtTarget *vtarget = scsi_target(sdev)->hostdata;
690 if (sdev->channel == 0 &&
691 mptspi_is_raid(hd, sdev->id))
695 if (sdev->channel == 1 &&
697 starget_printk(KERN_ERR, scsi_target(sdev), MYIOC_s_FMT
702 hd->spi_pending |= (1 << sdev->id);
703 spi_dv_device(sdev);
704 hd->spi_pending &= ~(1 << sdev->id);
706 if (sdev->channel == 1 &&
708 starget_printk(KERN_ERR, scsi_target(sdev), MYIOC_s_FMT
711 mptspi_read_parameters(sdev->sdev_target);
712 spi_display_xfer_agreement(sdev->sdev_target);
713 mptspi_read_parameters(sdev->sdev_target);
716 static int mptspi_slave_alloc(struct scsi_device *sdev)
718 MPT_SCSI_HOST *hd = shost_priv(sdev->host);
724 if (sdev->channel == 1 &&
725 mptscsih_is_phys_disk(ioc, 0, sdev->id) == 0)
735 vdevice->lun = sdev->lun;
736 sdev->hostdata = vdevice;
738 starget = scsi_target(sdev);
743 if (sdev->channel == 1)
744 sdev->no_uld_attach = 1;
749 static int mptspi_slave_configure(struct scsi_device *sdev)
751 struct _MPT_SCSI_HOST *hd = shost_priv(sdev->host);
752 VirtTarget *vtarget = scsi_target(sdev)->hostdata;
755 mptspi_initTarget(hd, vtarget, sdev);
757 ret = mptscsih_slave_configure(sdev);
764 sdev->id, spi_min_period(scsi_target(sdev)),
765 spi_max_offset(scsi_target(sdev)),
766 spi_max_width(scsi_target(sdev))));
768 if ((sdev->channel == 1 ||
769 !(mptspi_is_raid(hd, sdev->id))) &&
770 !spi_initial_dv(sdev->sdev_target))
771 mptspi_dv_device(hd, sdev);
802 static void mptspi_slave_destroy(struct scsi_device *sdev)
804 struct scsi_target *starget = scsi_target(sdev);
806 VirtDevice *vdevice = sdev->hostdata;
820 mptscsih_slave_destroy(sdev);
863 struct scsi_device *sdev;
908 sdev = scsi_device_lookup_by_target(starget, i);
909 if (sdev && sdev->type == TYPE_TAPE) {
910 sdev_printk(KERN_DEBUG, sdev, MYIOC_s_FMT
1117 struct scsi_device *sdev;
1128 shost_for_each_device(sdev,shost) {
1129 struct scsi_target *starget = scsi_target(sdev);
1133 if (sdev->channel != 1)
1143 mptspi_dv_device(hd, sdev);
1261 struct scsi_device *sdev;
1270 shost_for_each_device(sdev, ioc->sh) {
1271 if (hd->spi_pending & (1 << sdev->id))
1273 starget = scsi_target(sdev);
1281 shost_for_each_device(sdev, ioc->sh)
1282 mptspi_dv_device(hd, sdev);