Lines Matching defs:sdev

84 static void zfcp_erp_action_dismiss_lun(struct scsi_device *sdev)
86 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
94 struct scsi_device *sdev;
100 __shost_for_each_device(sdev, port->adapter->scsi_host)
101 if (sdev_to_zfcp(sdev)->port == port)
102 zfcp_erp_action_dismiss_lun(sdev);
123 struct zfcp_port *port, struct scsi_device *sdev)
130 zsdev = sdev_to_zfcp(sdev);
164 struct scsi_device *sdev)
172 zfcp_sdev = sdev_to_zfcp(sdev);
217 struct scsi_device *sdev)
230 zfcp_sdev = sdev_to_zfcp(sdev);
232 if (scsi_device_get(sdev))
238 WARN_ON_ONCE(erp_action->sdev != sdev);
252 WARN_ON_ONCE(erp_action->sdev != NULL);
263 WARN_ON_ONCE(erp_action->sdev != NULL);
284 struct scsi_device *sdev,
290 need = zfcp_erp_handle_failed(want, adapter, port, sdev);
301 need = zfcp_erp_required_act(want, adapter, port, sdev);
305 act = zfcp_erp_setup_act(need, act_status, adapter, port, sdev);
315 zfcp_dbf_rec_trig(dbftag, adapter, port, sdev, want, need);
453 static void zfcp_erp_lun_block(struct scsi_device *sdev, int clear_mask)
455 zfcp_erp_clear_lun_status(sdev,
459 static void _zfcp_erp_lun_reopen(struct scsi_device *sdev, int clear,
462 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
465 zfcp_erp_lun_block(sdev, clear);
468 zfcp_sdev->port, sdev, dbftag, act_status);
473 * @sdev: SCSI device / LUN to be reopened
479 void zfcp_erp_lun_reopen(struct scsi_device *sdev, int clear, char *dbftag)
482 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
487 _zfcp_erp_lun_reopen(sdev, clear, dbftag, 0);
493 * @sdev: SCSI device / LUN to shut down.
497 void zfcp_erp_lun_shutdown(struct scsi_device *sdev, int clear, char *dbftag)
500 zfcp_erp_lun_reopen(sdev, clear | flags, dbftag);
505 * @sdev: SCSI device / LUN to shut down.
513 void zfcp_erp_lun_shutdown_wait(struct scsi_device *sdev, char *dbftag)
516 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
522 _zfcp_erp_lun_reopen(sdev, clear, dbftag, ZFCP_STATUS_ERP_NO_REF);
549 static void zfcp_erp_lun_unblock(struct scsi_device *sdev)
551 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
555 zfcp_dbf_rec_run("erlubl1", &sdev_to_zfcp(sdev)->erp_action);
672 struct scsi_device *sdev;
675 __shost_for_each_device(sdev, port->adapter->scsi_host)
676 if (sdev_to_zfcp(sdev)->port == port)
677 _zfcp_erp_lun_reopen(sdev, clear, dbftag, 0);
694 _zfcp_erp_lun_reopen(act->sdev, 0, "ersff_4", 0);
1118 static void zfcp_erp_lun_strategy_clearstati(struct scsi_device *sdev)
1120 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
1153 struct scsi_device *sdev = erp_action->sdev;
1154 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
1158 zfcp_erp_lun_strategy_clearstati(sdev);
1184 struct scsi_device *sdev, enum zfcp_erp_act_result result)
1186 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
1191 zfcp_erp_lun_unblock(sdev);
1199 (unsigned long long)zfcp_scsi_dev_lun(sdev),
1201 zfcp_erp_set_lun_status(sdev,
1214 zfcp_erp_lun_block(sdev, 0);
1297 struct scsi_device *sdev = erp_action->sdev;
1302 result = zfcp_erp_strategy_check_lun(sdev, result);
1338 struct scsi_device *sdev = act->sdev;
1363 zfcp_sdev = sdev_to_zfcp(sdev);
1365 _zfcp_erp_lun_reopen(sdev,
1391 zfcp_sdev = sdev_to_zfcp(erp_action->sdev);
1419 struct scsi_device *sdev;
1434 __shost_for_each_device(sdev, shost) {
1435 struct zfcp_scsi_dev *zsdev = sdev_to_zfcp(sdev);
1438 if (sdev->sdev_state == SDEV_DEL ||
1439 sdev->sdev_state == SDEV_CANCEL)
1473 struct scsi_device *sdev = act->sdev;
1478 scsi_device_put(sdev);
1696 struct scsi_device *sdev;
1718 __shost_for_each_device(sdev, adapter->scsi_host)
1719 atomic_or(common_mask, &sdev_to_zfcp(sdev)->status);
1733 struct scsi_device *sdev;
1762 __shost_for_each_device(sdev, adapter->scsi_host) {
1763 atomic_andnot(common_mask, &sdev_to_zfcp(sdev)->status);
1765 atomic_set(&sdev_to_zfcp(sdev)->erp_counter, 0);
1779 struct scsi_device *sdev;
1789 __shost_for_each_device(sdev, port->adapter->scsi_host)
1790 if (sdev_to_zfcp(sdev)->port == port)
1792 &sdev_to_zfcp(sdev)->status);
1805 struct scsi_device *sdev;
1819 __shost_for_each_device(sdev, port->adapter->scsi_host)
1820 if (sdev_to_zfcp(sdev)->port == port) {
1822 &sdev_to_zfcp(sdev)->status);
1824 atomic_set(&sdev_to_zfcp(sdev)->erp_counter, 0);
1831 * @sdev: SCSI device / lun to set the status bits
1834 void zfcp_erp_set_lun_status(struct scsi_device *sdev, u32 mask)
1836 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
1843 * @sdev: SCSi device / lun to clear the status bits
1846 void zfcp_erp_clear_lun_status(struct scsi_device *sdev, u32 mask)
1848 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);