Lines Matching defs:csdev
168 struct clariion_dh_data *csdev)
173 if (csdev->buffer[48] != 0) {
180 if (csdev->buffer[4] > 2) {
188 switch (csdev->buffer[28] & 0x0f) {
200 CLARIION_NAME, csdev->buffer[28] & 0x0f);
205 csdev->default_sp = csdev->buffer[5];
206 csdev->lun_state = csdev->buffer[4];
207 csdev->current_sp = csdev->buffer[8];
208 csdev->port = csdev->buffer[7];
321 struct clariion_dh_data *csdev)
323 struct request *rq = get_req(sdev, INQUIRY, csdev->buffer);
329 rq->sense = csdev->sense;
331 rq->sense_len = csdev->senselen = 0;
344 csdev->senselen = rq->sense_len;
354 struct clariion_dh_data *csdev)
360 if (csdev->flags & CLARIION_SHORT_TRESPASS) {
362 if (!(csdev->flags & CLARIION_HONOR_RESERVATIONS))
369 if (!(csdev->flags & CLARIION_HONOR_RESERVATIONS))
376 memcpy(csdev->buffer, page22, len);
378 rq = get_req(sdev, cmd, csdev->buffer);
382 rq->sense = csdev->sense;
384 rq->sense_len = csdev->senselen = 0;
389 err = trespass_endio(sdev, csdev->sense);
451 struct clariion_dh_data *csdev)
456 err = send_inquiry_cmd(sdev, 0, csdev);
457 if (err != SCSI_DH_OK && csdev->senselen) {
460 if (scsi_normalize_sense(csdev->sense, SCSI_SENSE_BUFFERSIZE,
470 sp_model = parse_sp_model(sdev, csdev->buffer);
480 csdev->flags |= CLARIION_SHORT_TRESPASS;
484 CLARIION_NAME, sp_model, csdev->flags);
490 struct clariion_dh_data *csdev)
495 err = send_inquiry_cmd(sdev, 0xC0, csdev);
496 if (err != SCSI_DH_OK && csdev->senselen) {
499 err = scsi_normalize_sense(csdev->sense, SCSI_SENSE_BUFFERSIZE,
514 err = parse_sp_info_reply(sdev, csdev);
522 struct clariion_dh_data *csdev = get_clariion_data(sdev);
525 result = clariion_send_inquiry(sdev, csdev);
529 if (csdev->lun_state == CLARIION_LUN_OWNED)
532 result = send_trespass_cmd(sdev, csdev);
537 csdev->flags&CLARIION_SHORT_TRESPASS?"short":"long" );
540 result = clariion_send_inquiry(sdev, csdev);
547 CLARIION_NAME, csdev->current_sp + 'A',
548 csdev->port, lun_state[csdev->lun_state],
549 csdev->default_sp + 'A');
563 struct clariion_dh_data *csdev = get_clariion_data(sdev);
582 csdev->flags |= CLARIION_SHORT_TRESPASS;
584 csdev->flags &= ~CLARIION_SHORT_TRESPASS;
587 csdev->flags |= CLARIION_HONOR_RESERVATIONS;
589 csdev->flags &= ~CLARIION_HONOR_RESERVATIONS;
596 if (csdev->lun_state != CLARIION_LUN_OWNED)
599 csdev->lun_state = CLARIION_LUN_UNINITIALIZED;
600 result = send_trespass_cmd(sdev, csdev);
605 result = clariion_send_inquiry(sdev, csdev);