Lines Matching refs:h

106 static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)  in hp_sw_tur()  argument
122 req->sense = h->sense; in hp_sw_tur()
129 ret = tur_done(sdev, h->sense); in hp_sw_tur()
137 h->path_state = HP_SW_PATH_ACTIVE; in hp_sw_tur()
145 h->path_state = HP_SW_PATH_PASSIVE; in hp_sw_tur()
197 struct hp_sw_dh_data *h = req->end_io_data; in start_stop_endio() local
202 sdev_printk(KERN_WARNING, h->sdev, in start_stop_endio()
210 err = start_done(h->sdev, h->sense); in start_stop_endio()
213 if (--h->retry_cnt) { in start_stop_endio()
215 err = hp_sw_start_stop(h); in start_stop_endio()
224 if (h->callback_fn) { in start_stop_endio()
225 h->callback_fn(h->callback_data, err); in start_stop_endio()
226 h->callback_fn = h->callback_data = NULL; in start_stop_endio()
238 static int hp_sw_start_stop(struct hp_sw_dh_data *h) in hp_sw_start_stop() argument
242 req = blk_get_request(h->sdev->request_queue, WRITE, GFP_ATOMIC); in hp_sw_start_stop()
253 req->sense = h->sense; in hp_sw_start_stop()
256 req->end_io_data = h; in hp_sw_start_stop()
264 struct hp_sw_dh_data *h = sdev->handler_data; in hp_sw_prep_fn() local
267 if (h->path_state != HP_SW_PATH_ACTIVE) { in hp_sw_prep_fn()
289 struct hp_sw_dh_data *h = sdev->handler_data; in hp_sw_activate() local
291 ret = hp_sw_tur(sdev, h); in hp_sw_activate()
293 if (ret == SCSI_DH_OK && h->path_state == HP_SW_PATH_PASSIVE) { in hp_sw_activate()
294 h->retry_cnt = h->retries; in hp_sw_activate()
295 h->callback_fn = fn; in hp_sw_activate()
296 h->callback_data = data; in hp_sw_activate()
297 ret = hp_sw_start_stop(h); in hp_sw_activate()
300 h->callback_fn = h->callback_data = NULL; in hp_sw_activate()
310 struct hp_sw_dh_data *h; in hp_sw_bus_attach() local
313 h = kzalloc(sizeof(*h), GFP_KERNEL); in hp_sw_bus_attach()
314 if (!h) in hp_sw_bus_attach()
316 h->path_state = HP_SW_PATH_UNINITIALIZED; in hp_sw_bus_attach()
317 h->retries = HP_SW_RETRIES; in hp_sw_bus_attach()
318 h->sdev = sdev; in hp_sw_bus_attach()
320 ret = hp_sw_tur(sdev, h); in hp_sw_bus_attach()
321 if (ret != SCSI_DH_OK || h->path_state == HP_SW_PATH_UNINITIALIZED) in hp_sw_bus_attach()
325 HP_SW_NAME, h->path_state == HP_SW_PATH_ACTIVE? in hp_sw_bus_attach()
328 sdev->handler_data = h; in hp_sw_bus_attach()
331 kfree(h); in hp_sw_bus_attach()