Lines Matching refs:SDev

155 	Scsi_Device * SDev;  in sd_ioctl()  local
158 SDev = rscsi_disks[DEVICE_NR(dev)].device; in sd_ioctl()
159 if (!SDev) in sd_ioctl()
169 if( !scsi_block_when_processing_errors(SDev) ) in sd_ioctl()
448 Scsi_Device * SDev; in sd_open() local
477 SDev = rscsi_disks[target].device; in sd_open()
478 if (SDev->host->hostt->module) in sd_open()
479 __MOD_INC_USE_COUNT(SDev->host->hostt->module); in sd_open()
482 SDev->access_count++; in sd_open()
485 SDev->allow_revalidate = 1; in sd_open()
487 SDev->allow_revalidate = 0; in sd_open()
513 if (!SDev->online) { in sd_open()
524 if (SDev->removable) in sd_open()
525 if (SDev->access_count==1) in sd_open()
526 if (scsi_block_when_processing_errors(SDev)) in sd_open()
527 scsi_ioctl(SDev, SCSI_IOCTL_DOORLOCK, NULL); in sd_open()
533 SDev->access_count--; in sd_open()
534 if (SDev->host->hostt->module) in sd_open()
535 __MOD_DEC_USE_COUNT(SDev->host->hostt->module); in sd_open()
544 Scsi_Device * SDev; in sd_release() local
547 SDev = rscsi_disks[target].device; in sd_release()
548 if (!SDev) in sd_release()
551 SDev->access_count--; in sd_release()
553 if (SDev->removable) { in sd_release()
554 if (!SDev->access_count) in sd_release()
555 if (scsi_block_when_processing_errors(SDev)) in sd_release()
556 scsi_ioctl(SDev, SCSI_IOCTL_DOORUNLOCK, NULL); in sd_release()
558 if (SDev->host->hostt->module) in sd_release()
559 __MOD_DEC_USE_COUNT(SDev->host->hostt->module); in sd_release()
709 Scsi_Device * SDev; in check_scsidisk_media_change() local
712 SDev = rscsi_disks[target].device; in check_scsidisk_media_change()
714 if (target >= sd_template.dev_max || !SDev) { in check_scsidisk_media_change()
718 if (!SDev->removable) in check_scsidisk_media_change()
727 if (SDev->online == FALSE) { in check_scsidisk_media_change()
729 SDev->changed = 1; in check_scsidisk_media_change()
743 if (scsi_block_when_processing_errors(SDev)) in check_scsidisk_media_change()
744 retval = scsi_ioctl(SDev, SCSI_IOCTL_TEST_UNIT_READY, NULL); in check_scsidisk_media_change()
753 SDev->changed = 1; in check_scsidisk_media_change()
765 retval = SDev->changed; in check_scsidisk_media_change()
767 SDev->changed = 0; in check_scsidisk_media_change()