Lines Matching refs:device

142 	struct scsi_device *sdev = scmd->device;
196 struct scsi_device *sdev = scmd->device;
243 struct Scsi_Host *shost = scmd->device->host;
259 struct Scsi_Host *shost = scmd->device->host;
297 struct Scsi_Host *host = scmd->device->host;
330 * see whether the host or the device is offline.
365 if (scmd->device == sdev) {
445 "Power-on or device reset occurred\n");
484 struct scsi_device *sdev = scmd->device;
557 if (scmd->device->expecting_cc_ua) {
559 * Because some device does not queue unit
565 scmd->device->expecting_cc_ua = 0;
574 if (scmd->device->sdev_target->expecting_lun_change &&
578 * if the device is in the process of becoming ready, we
584 * if the device is not started, we need to wake
587 if (scmd->device->allow_restart &&
621 if (scmd->device->retry_hwerror)
690 * the device when we got the queue full so we start
737 scsi_handle_queue_ramp_up(scmd->device);
752 /* it is a success, we probed the device and
758 scsi_handle_queue_full(scmd->device);
779 eh_action = scmd->device->host->eh_action;
792 struct Scsi_Host *host = scmd->device->host;
822 struct Scsi_Host *host = scmd->device->host;
864 struct Scsi_Host *host = scmd->device->host;
873 __starget_for_each_device(scsi_target(scmd->device), NULL,
894 struct scsi_host_template *hostt = scmd->device->host->hostt;
901 __scsi_report_device_reset(scmd->device, NULL);
919 * if the device is temporarily unavailable (eg due to a
933 if (scsi_try_to_abort_cmd(scmd->device->host->hostt, scmd) != SUCCESS)
957 struct scsi_device *sdev = scmd->device;
1050 * This function is used to send a scsi command down to a target device
1059 struct scsi_device *sdev = scmd->device;
1077 * change the SCSI device state after we have examined it and before
1167 return scsi_send_eh_cmnd(scmd, NULL, 0, scmd->device->eh_timeout, ~0);
1200 * scsi_eh_get_sense - Get device sense data.
1235 shost = scmd->device->host;
1293 * scsi_eh_tur - Send TUR to device.
1307 scmd->device->eh_timeout, 0);
1347 sdev = scmd->device;
1355 "%s: skip test device, past eh deadline",
1361 finish_cmds = !scsi_device_online(scmd->device) ||
1367 if (scmd->device == sdev) {
1380 * scsi_eh_try_stu - Send START_UNIT to device.
1390 if (scmd->device->allow_restart) {
1395 rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0);
1412 * try revalidating the device, which will end up sending a start unit.
1432 if (scmd->device == sdev && SCSI_SENSE_VALID(scmd) &&
1451 if (scmd->device == sdev &&
1475 * Try a bus device reset. Still, look to see whether we have multiple
1499 if (scmd->device == sdev) {
1517 if (scmd->device == sdev &&
1722 sdev_printk(KERN_INFO, scmd->device, "Device offlined - "
1724 sdev = scmd->device;
1793 * if the device is offline, then we clearly just pass the result back
1796 if (!scsi_device_online(scmd->device)) {
1798 "%s: device offline - report as SUCCESS\n", __func__));
1876 * these commands if there is no device available.
1902 scsi_handle_queue_full(scmd->device);
1905 * tagged queueing device.
1910 * device can't talk to us at the moment. Should only
1913 * device.
1918 scmd->device->sdev_target->expecting_lun_change = 0;
1919 scsi_handle_queue_ramp_up(scmd->device);
1944 sdev_printk(KERN_INFO, scmd->device,
1975 * scsi_eh_lock_door - Prevent medium removal for the specified device
1976 * @sdev: SCSI device to prevent medium removal
2016 * this device. we need to 'reverse' this process.
2025 * onto the head of the SCSI request queue for the device. There
2026 * is no point trying to lock the door of an off-line device.
2037 * will be requests for character device operations, and also for
2075 * scsi_eh_ready_devs - check device ready state and recover if not.
2104 if (scsi_device_online(scmd->device) &&
2113 * If just we got sense for the device (called
2299 * they have observed a device reset on the device being handled.
2335 * scsi_ioctl_reset: explicitly reset a host/bus/target/device