Lines Matching defs:sdev
804 struct scsi_device *sdev;
865 sdev = __scsi_add_device(shost, 0, 0, sbp2_lun2int(lu->lun), lu);
870 * unusable sdev. As a workaround we check for this and retry the
875 if (IS_ERR(sdev))
881 scsi_remove_device(sdev);
882 scsi_device_put(sdev);
888 scsi_device_put(sdev);
1219 struct scsi_device *sdev;
1226 sdev = scsi_device_lookup(shost, 0, 0, sbp2_lun2int(lu->lun));
1227 if (sdev) {
1228 scsi_remove_device(sdev);
1229 scsi_device_put(sdev);
1493 static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
1495 struct sbp2_logical_unit *lu = sdev->hostdata;
1501 sdev->allow_restart = 1;
1507 blk_queue_update_dma_alignment(sdev->request_queue, 4 - 1);
1510 sdev->inquiry_len = 36;
1515 static int sbp2_scsi_slave_configure(struct scsi_device *sdev)
1517 struct sbp2_logical_unit *lu = sdev->hostdata;
1519 sdev->use_10_for_rw = 1;
1522 sdev->manage_system_start_stop = 1;
1523 sdev->manage_runtime_start_stop = 1;
1524 sdev->manage_shutdown = 1;
1527 if (sdev->type == TYPE_ROM)
1528 sdev->use_10_for_ms = 1;
1530 if (sdev->type == TYPE_DISK &&
1532 sdev->skip_ms_page_8 = 1;
1535 sdev->fix_capacity = 1;
1538 sdev->start_stop_pwr_cond = 1;
1541 blk_queue_max_hw_sectors(sdev->request_queue, 128 * 1024 / 512);
1571 struct scsi_device *sdev = to_scsi_device(dev);
1574 if (!sdev)
1577 lu = sdev->hostdata;