/* The HP Active/Passive firmware is pretty simple; the passive path reports NOT READY with sense codes 0x04/0x02; a START STOP UNIT command will then activate the passive path (and deactivate the previously active one).  */
static int hp_sw_activate(struct scsi_device *sdev, activate_complete fn, void *data)
/* The HP Active/Passive firmware is pretty simple; the passive path reports NOT READY with sense codes 0x04/0x02; a START STOP UNIT command will then activate the passive path (and deactivate the previously active one).  */
static int hp_sw_activate(struct scsi_device *sdev, activate_complete fn, void *data)
{
	int ret = SCSI_DH_OK;
	struct hp_sw_dh_data *h = get_hp_sw_data(sdev);
	ret = hp_sw_tur(sdev, h);
	if (ret == SCSI_DH_OK && h->path_state == HP_SW_PATH_PASSIVE) {
		h->retry_cnt = h->retries;
		h->callback_fn = fn;
		h->callback_data = data;
		ret = hp_sw_start_stop(h);
		if (ret == SCSI_DH_OK)
			return 0;
		h->callback_fn = h->callback_data = NULL;
	}
	if (fn)
		fn(data, ret);
	return 0;
}