Lines Matching +full:de +full:- +full:activated

1 // SPDX-License-Identifier: GPL-2.0-or-later
8 * Copyright (C) 2008 Hannes Reinecke <hare@suse.de>
23 #define HP_SW_PATH_UNINITIALIZED -1
37 * tur_done - Handle TEST UNIT READY return status
48 switch (sshdr->sense_key) { in tur_done()
53 if (sshdr->asc == 0x04 && sshdr->ascq == 2) { in tur_done()
55 * LUN not ready - Initialization command required in tur_done()
59 h->path_state = HP_SW_PATH_PASSIVE; in tur_done()
67 HP_SW_NAME, sshdr->sense_key, sshdr->asc, in tur_done()
68 sshdr->ascq); in tur_done()
75 * hp_sw_tur - Send TEST UNIT READY
98 h->path_state = HP_SW_PATH_ACTIVE; in hp_sw_tur()
114 * hp_sw_start_stop - Send START STOP UNIT command
123 struct scsi_device *sdev = h->sdev; in hp_sw_start_stop()
148 * LUN not ready - manual intervention required in hp_sw_start_stop()
150 * Switch-over in progress, retry. in hp_sw_start_stop()
152 if (--retry_cnt) in hp_sw_start_stop()
171 struct hp_sw_dh_data *h = sdev->handler_data; in hp_sw_prep_fn()
173 if (h->path_state != HP_SW_PATH_ACTIVE) { in hp_sw_prep_fn()
174 req->rq_flags |= RQF_QUIET; in hp_sw_prep_fn()
182 * hp_sw_activate - Activate a path
183 * @sdev: sdev on the path to be activated
195 struct hp_sw_dh_data *h = sdev->handler_data; in hp_sw_activate()
199 if (ret == SCSI_DH_OK && h->path_state == HP_SW_PATH_PASSIVE) in hp_sw_activate()
215 h->path_state = HP_SW_PATH_UNINITIALIZED; in hp_sw_bus_attach()
216 h->retries = HP_SW_RETRIES; in hp_sw_bus_attach()
217 h->sdev = sdev; in hp_sw_bus_attach()
222 if (h->path_state == HP_SW_PATH_UNINITIALIZED) { in hp_sw_bus_attach()
228 HP_SW_NAME, h->path_state == HP_SW_PATH_ACTIVE? in hp_sw_bus_attach()
231 sdev->handler_data = h; in hp_sw_bus_attach()
240 kfree(sdev->handler_data); in hp_sw_bus_detach()
241 sdev->handler_data = NULL; in hp_sw_bus_detach()