Lines Matching refs:sghp
5042 struct sg_header *sghp = (struct sg_header *)(buff - OFF); in do_sg_io() local
5045 sghp->pack_len = 0; in do_sg_io()
5046 sghp->reply_len = SG_HSZ + *(((int *)buff) + 1); in do_sg_io()
5047 sghp->pack_id = 0; in do_sg_io()
5048 sghp->twelve_byte = 0; in do_sg_io()
5049 sghp->other_flags = 0; in do_sg_io()
5051 sghp->sense_buffer[0] = 0; in do_sg_io()
5057 sghp->reply_len); in do_sg_io()
5059 res = write(sg_fd, (const void *)sghp, in do_sg_io()
5067 res = read(sg_fd, (void *)sghp, sghp->reply_len); in do_sg_io()
5075 res = sg_err_category(sghp->target_status, sghp->host_status, in do_sg_io()
5076 sghp->driver_status, sghp->sense_buffer, in do_sg_io()
5085 sg_chk_n_print("read from sg", sghp->target_status, in do_sg_io()
5086 sghp->host_status, sghp->driver_status, in do_sg_io()
5087 sghp->sense_buffer, SG_MAX_SENSE); in do_sg_io()
5092 if (0 != sghp->sense_buffer[0]) { in do_sg_io()
5097 printf("%02x ", (int)sghp->sense_buffer[k]); in do_sg_io()
5101 } else if (0 != sghp->result) { in do_sg_io()
5103 printf("read from sg, bad result=%d\n", sghp->result); in do_sg_io()