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()
50 if (sshdr->asc == 0x04 && sshdr->ascq == 2) { in tur_done()
52 * LUN not ready - Initialization command required in tur_done()
56 h->path_state = HP_SW_PATH_PASSIVE; in tur_done()
64 HP_SW_NAME, sshdr->sense_key, sshdr->asc, in tur_done()
65 sshdr->ascq); in tur_done()
72 * hp_sw_tur - Send TEST UNIT READY
108 h->path_state = HP_SW_PATH_ACTIVE; in hp_sw_tur()
121 * hp_sw_start_stop - Send START STOP UNIT command
130 struct scsi_device *sdev = h->sdev; in hp_sw_start_stop()
137 * LUN not ready - manual intervention required in hp_sw_start_stop()
139 * Switch-over in progress, retry. in hp_sw_start_stop()
188 struct hp_sw_dh_data *h = sdev->handler_data; in hp_sw_prep_fn()
190 if (h->path_state != HP_SW_PATH_ACTIVE) { in hp_sw_prep_fn()
191 req->rq_flags |= RQF_QUIET; in hp_sw_prep_fn()
199 * hp_sw_activate - Activate a path
200 * @sdev: sdev on the path to be activated
212 struct hp_sw_dh_data *h = sdev->handler_data; in hp_sw_activate()
216 if (ret == SCSI_DH_OK && h->path_state == HP_SW_PATH_PASSIVE) in hp_sw_activate()
232 h->path_state = HP_SW_PATH_UNINITIALIZED; in hp_sw_bus_attach()
233 h->retries = HP_SW_RETRIES; in hp_sw_bus_attach()
234 h->sdev = sdev; in hp_sw_bus_attach()
239 if (h->path_state == HP_SW_PATH_UNINITIALIZED) { in hp_sw_bus_attach()
245 HP_SW_NAME, h->path_state == HP_SW_PATH_ACTIVE? in hp_sw_bus_attach()
248 sdev->handler_data = h; in hp_sw_bus_attach()
257 kfree(sdev->handler_data); in hp_sw_bus_detach()
258 sdev->handler_data = NULL; in hp_sw_bus_detach()