Lines Matching refs:old_hdr

410 	struct sg_header __user *old_hdr = buf;  in get_sg_io_pack_id()  local
415 if (get_user(reply_len, &old_hdr->reply_len)) in get_sg_io_pack_id()
419 return get_user(*pack_id, &old_hdr->pack_id); in get_sg_io_pack_id()
449 struct sg_header *old_hdr; in sg_read() local
485 old_hdr = kzalloc(SZ_SG_HEADER, GFP_KERNEL); in sg_read()
486 if (!old_hdr) in sg_read()
489 old_hdr->reply_len = (int) hp->timeout; in sg_read()
490 old_hdr->pack_len = old_hdr->reply_len; /* old, strange behaviour */ in sg_read()
491 old_hdr->pack_id = hp->pack_id; in sg_read()
492 old_hdr->twelve_byte = in sg_read()
494 old_hdr->target_status = hp->masked_status; in sg_read()
495 old_hdr->host_status = hp->host_status; in sg_read()
496 old_hdr->driver_status = hp->driver_status; in sg_read()
499 old_hdr->driver_status = DRIVER_SENSE; in sg_read()
500 memcpy(old_hdr->sense_buffer, srp->sense_b, in sg_read()
501 sizeof (old_hdr->sense_buffer)); in sg_read()
509 old_hdr->result = 0; in sg_read()
514 old_hdr->result = EBUSY; in sg_read()
521 old_hdr->result = EIO; in sg_read()
524 old_hdr->result = (srp->sense_b[0] == 0 && in sg_read()
528 old_hdr->result = EIO; in sg_read()
534 if (copy_to_user(buf, old_hdr, SZ_SG_HEADER)) { in sg_read()
539 if (count > old_hdr->reply_len) in sg_read()
540 count = old_hdr->reply_len; in sg_read()
548 count = (old_hdr->result == 0) ? 0 : -EIO; in sg_read()
553 kfree(old_hdr); in sg_read()
607 struct sg_header old_hdr; in sg_write() local
628 if (copy_from_user(&old_hdr, buf, SZ_SG_HEADER)) in sg_write()
631 if (old_hdr.reply_len < 0) in sg_write()
652 if ((opcode >= 0xc0) && old_hdr.twelve_byte) in sg_write()
660 mxsize = (input_size > old_hdr.reply_len) ? input_size : old_hdr.reply_len; in sg_write()
673 hp->dxfer_direction = (old_hdr.reply_len > SZ_SG_HEADER) ? in sg_write()
684 hp->timeout = old_hdr.reply_len; /* structure abuse ... */ in sg_write()
686 hp->pack_id = old_hdr.pack_id; in sg_write()
703 old_hdr.reply_len - (int)SZ_SG_HEADER, in sg_write()