Lines Matching refs:csdev
149 struct clariion_dh_data *csdev) in parse_sp_info_reply() argument
154 if (csdev->buffer[48] != 0) { in parse_sp_info_reply()
161 if (csdev->buffer[4] > 2) { in parse_sp_info_reply()
169 switch (csdev->buffer[28] & 0x0f) { in parse_sp_info_reply()
181 CLARIION_NAME, csdev->buffer[28] & 0x0f); in parse_sp_info_reply()
186 csdev->default_sp = csdev->buffer[5]; in parse_sp_info_reply()
187 csdev->lun_state = csdev->buffer[4]; in parse_sp_info_reply()
188 csdev->current_sp = csdev->buffer[8]; in parse_sp_info_reply()
189 csdev->port = csdev->buffer[7]; in parse_sp_info_reply()
190 if (csdev->lun_state == CLARIION_LUN_OWNED) in parse_sp_info_reply()
194 if (csdev->default_sp == csdev->current_sp) in parse_sp_info_reply()
249 struct clariion_dh_data *csdev) in send_trespass_cmd() argument
258 if (csdev->flags & CLARIION_SHORT_TRESPASS) { in send_trespass_cmd()
260 if (!(csdev->flags & CLARIION_HONOR_RESERVATIONS)) in send_trespass_cmd()
269 if (!(csdev->flags & CLARIION_HONOR_RESERVATIONS)) in send_trespass_cmd()
277 memcpy(csdev->buffer, page22, len); in send_trespass_cmd()
279 err = scsi_execute(sdev, cdb, DMA_TO_DEVICE, csdev->buffer, len, NULL, in send_trespass_cmd()
358 struct clariion_dh_data *csdev) in clariion_std_inquiry() argument
373 csdev->flags |= CLARIION_SHORT_TRESPASS; in clariion_std_inquiry()
377 CLARIION_NAME, sp_model, csdev->flags); in clariion_std_inquiry()
383 struct clariion_dh_data *csdev) in clariion_send_inquiry() argument
387 if (!scsi_get_vpd_page(sdev, 0xC0, csdev->buffer, in clariion_send_inquiry()
389 err = parse_sp_info_reply(sdev, csdev); in clariion_send_inquiry()
397 struct clariion_dh_data *csdev = sdev->handler_data; in clariion_activate() local
400 result = clariion_send_inquiry(sdev, csdev); in clariion_activate()
404 if (csdev->lun_state == CLARIION_LUN_OWNED) in clariion_activate()
407 result = send_trespass_cmd(sdev, csdev); in clariion_activate()
412 csdev->flags&CLARIION_SHORT_TRESPASS?"short":"long" ); in clariion_activate()
415 result = clariion_send_inquiry(sdev, csdev); in clariion_activate()
422 CLARIION_NAME, csdev->current_sp + 'A', in clariion_activate()
423 csdev->port, lun_state[csdev->lun_state], in clariion_activate()
424 csdev->default_sp + 'A'); in clariion_activate()
438 struct clariion_dh_data *csdev = sdev->handler_data; in clariion_set_params() local
457 csdev->flags |= CLARIION_SHORT_TRESPASS; in clariion_set_params()
459 csdev->flags &= ~CLARIION_SHORT_TRESPASS; in clariion_set_params()
462 csdev->flags |= CLARIION_HONOR_RESERVATIONS; in clariion_set_params()
464 csdev->flags &= ~CLARIION_HONOR_RESERVATIONS; in clariion_set_params()
471 if (csdev->lun_state != CLARIION_LUN_OWNED) in clariion_set_params()
474 csdev->lun_state = CLARIION_LUN_UNINITIALIZED; in clariion_set_params()
475 result = send_trespass_cmd(sdev, csdev); in clariion_set_params()
480 result = clariion_send_inquiry(sdev, csdev); in clariion_set_params()