old_hdr           416 drivers/scsi/sg.c 	struct sg_header *old_hdr = NULL;
old_hdr           435 drivers/scsi/sg.c 		old_hdr = kmalloc(SZ_SG_HEADER, GFP_KERNEL);
old_hdr           436 drivers/scsi/sg.c 		if (!old_hdr)
old_hdr           438 drivers/scsi/sg.c 		if (__copy_from_user(old_hdr, buf, SZ_SG_HEADER)) {
old_hdr           442 drivers/scsi/sg.c 		if (old_hdr->reply_len < 0) {
old_hdr           460 drivers/scsi/sg.c 			req_pack_id = old_hdr->pack_id;
old_hdr           490 drivers/scsi/sg.c 	if (old_hdr == NULL) {
old_hdr           491 drivers/scsi/sg.c 		old_hdr = kmalloc(SZ_SG_HEADER, GFP_KERNEL);
old_hdr           492 drivers/scsi/sg.c 		if (! old_hdr) {
old_hdr           497 drivers/scsi/sg.c 	memset(old_hdr, 0, SZ_SG_HEADER);
old_hdr           498 drivers/scsi/sg.c 	old_hdr->reply_len = (int) hp->timeout;
old_hdr           499 drivers/scsi/sg.c 	old_hdr->pack_len = old_hdr->reply_len; /* old, strange behaviour */
old_hdr           500 drivers/scsi/sg.c 	old_hdr->pack_id = hp->pack_id;
old_hdr           501 drivers/scsi/sg.c 	old_hdr->twelve_byte =
old_hdr           503 drivers/scsi/sg.c 	old_hdr->target_status = hp->masked_status;
old_hdr           504 drivers/scsi/sg.c 	old_hdr->host_status = hp->host_status;
old_hdr           505 drivers/scsi/sg.c 	old_hdr->driver_status = hp->driver_status;
old_hdr           508 drivers/scsi/sg.c 		memcpy(old_hdr->sense_buffer, srp->sense_b,
old_hdr           509 drivers/scsi/sg.c 		       sizeof (old_hdr->sense_buffer));
old_hdr           516 drivers/scsi/sg.c 		old_hdr->result = 0;
old_hdr           521 drivers/scsi/sg.c 		old_hdr->result = EBUSY;
old_hdr           528 drivers/scsi/sg.c 		old_hdr->result = EIO;
old_hdr           531 drivers/scsi/sg.c 		old_hdr->result = (srp->sense_b[0] == 0 && 
old_hdr           535 drivers/scsi/sg.c 		old_hdr->result = EIO;
old_hdr           541 drivers/scsi/sg.c 		if (__copy_to_user(buf, old_hdr, SZ_SG_HEADER)) {
old_hdr           546 drivers/scsi/sg.c 		if (count > old_hdr->reply_len)
old_hdr           547 drivers/scsi/sg.c 			count = old_hdr->reply_len;
old_hdr           555 drivers/scsi/sg.c 		count = (old_hdr->result == 0) ? 0 : -EIO;
old_hdr           560 drivers/scsi/sg.c 	kfree(old_hdr);
old_hdr           611 drivers/scsi/sg.c 	struct sg_header old_hdr;
old_hdr           634 drivers/scsi/sg.c 	if (__copy_from_user(&old_hdr, buf, SZ_SG_HEADER))
old_hdr           637 drivers/scsi/sg.c 	if (old_hdr.reply_len < 0)
old_hdr           656 drivers/scsi/sg.c 		if ((opcode >= 0xc0) && old_hdr.twelve_byte)
old_hdr           664 drivers/scsi/sg.c 	mxsize = (input_size > old_hdr.reply_len) ? input_size : old_hdr.reply_len;
old_hdr           677 drivers/scsi/sg.c 		hp->dxfer_direction = (old_hdr.reply_len > SZ_SG_HEADER) ?
old_hdr           688 drivers/scsi/sg.c 	hp->timeout = old_hdr.reply_len;	/* structure abuse ... */
old_hdr           690 drivers/scsi/sg.c 	hp->pack_id = old_hdr.pack_id;
old_hdr           707 drivers/scsi/sg.c 				   old_hdr.reply_len - (int)SZ_SG_HEADER,