Lines Matching refs:csdev
136 struct clariion_dh_data *csdev) in parse_sp_info_reply() argument
141 if (csdev->buffer[48] != 0) { in parse_sp_info_reply()
148 if (csdev->buffer[4] > 2) { in parse_sp_info_reply()
156 switch (csdev->buffer[28] & 0x0f) { in parse_sp_info_reply()
168 CLARIION_NAME, csdev->buffer[28] & 0x0f); in parse_sp_info_reply()
173 csdev->default_sp = csdev->buffer[5]; in parse_sp_info_reply()
174 csdev->lun_state = csdev->buffer[4]; in parse_sp_info_reply()
175 csdev->current_sp = csdev->buffer[8]; in parse_sp_info_reply()
176 csdev->port = csdev->buffer[7]; in parse_sp_info_reply()
177 if (csdev->lun_state == CLARIION_LUN_OWNED) in parse_sp_info_reply()
181 if (csdev->default_sp == csdev->current_sp) in parse_sp_info_reply()
236 struct clariion_dh_data *csdev) in send_trespass_cmd() argument
245 if (csdev->flags & CLARIION_SHORT_TRESPASS) { in send_trespass_cmd()
247 if (!(csdev->flags & CLARIION_HONOR_RESERVATIONS)) in send_trespass_cmd()
256 if (!(csdev->flags & CLARIION_HONOR_RESERVATIONS)) in send_trespass_cmd()
264 memcpy(csdev->buffer, page22, len); in send_trespass_cmd()
266 err = scsi_execute(sdev, cdb, DMA_TO_DEVICE, csdev->buffer, len, NULL, in send_trespass_cmd()
345 struct clariion_dh_data *csdev) in clariion_std_inquiry() argument
360 csdev->flags |= CLARIION_SHORT_TRESPASS; in clariion_std_inquiry()
364 CLARIION_NAME, sp_model, csdev->flags); in clariion_std_inquiry()
370 struct clariion_dh_data *csdev) in clariion_send_inquiry() argument
374 if (!scsi_get_vpd_page(sdev, 0xC0, csdev->buffer, in clariion_send_inquiry()
376 err = parse_sp_info_reply(sdev, csdev); in clariion_send_inquiry()
384 struct clariion_dh_data *csdev = sdev->handler_data; in clariion_activate() local
387 result = clariion_send_inquiry(sdev, csdev); in clariion_activate()
391 if (csdev->lun_state == CLARIION_LUN_OWNED) in clariion_activate()
394 result = send_trespass_cmd(sdev, csdev); in clariion_activate()
399 csdev->flags&CLARIION_SHORT_TRESPASS?"short":"long" ); in clariion_activate()
402 result = clariion_send_inquiry(sdev, csdev); in clariion_activate()
409 CLARIION_NAME, csdev->current_sp + 'A', in clariion_activate()
410 csdev->port, lun_state[csdev->lun_state], in clariion_activate()
411 csdev->default_sp + 'A'); in clariion_activate()
425 struct clariion_dh_data *csdev = sdev->handler_data; in clariion_set_params() local
444 csdev->flags |= CLARIION_SHORT_TRESPASS; in clariion_set_params()
446 csdev->flags &= ~CLARIION_SHORT_TRESPASS; in clariion_set_params()
449 csdev->flags |= CLARIION_HONOR_RESERVATIONS; in clariion_set_params()
451 csdev->flags &= ~CLARIION_HONOR_RESERVATIONS; in clariion_set_params()
458 if (csdev->lun_state != CLARIION_LUN_OWNED) in clariion_set_params()
461 csdev->lun_state = CLARIION_LUN_UNINITIALIZED; in clariion_set_params()
462 result = send_trespass_cmd(sdev, csdev); in clariion_set_params()
467 result = clariion_send_inquiry(sdev, csdev); in clariion_set_params()