Lines Matching refs:mei_hdr
1769 struct mei_msg_hdr *mei_hdr; in mei_msg_hdr_init() local
1783 hdr_len = sizeof(*mei_hdr); in mei_msg_hdr_init()
1796 mei_hdr = kzalloc(hdr_len, GFP_KERNEL); in mei_msg_hdr_init()
1797 if (!mei_hdr) in mei_msg_hdr_init()
1800 mei_hdr->host_addr = mei_cl_host_addr(cb->cl); in mei_msg_hdr_init()
1801 mei_hdr->me_addr = mei_cl_me_id(cb->cl); in mei_msg_hdr_init()
1802 mei_hdr->internal = cb->internal; in mei_msg_hdr_init()
1803 mei_hdr->extended = is_ext; in mei_msg_hdr_init()
1808 meta = (struct mei_ext_meta_hdr *)mei_hdr->extension; in mei_msg_hdr_init()
1824 mei_hdr->length = hdr_len - sizeof(*mei_hdr); in mei_msg_hdr_init()
1825 return mei_hdr; in mei_msg_hdr_init()
1843 struct mei_msg_hdr *mei_hdr = NULL; in mei_cl_irq_write() local
1887 mei_hdr = mei_msg_hdr_init(cb); in mei_cl_irq_write()
1888 if (IS_ERR(mei_hdr)) { in mei_cl_irq_write()
1889 rets = PTR_ERR(mei_hdr); in mei_cl_irq_write()
1890 mei_hdr = NULL; in mei_cl_irq_write()
1894 hdr_len = sizeof(*mei_hdr) + mei_hdr->length; in mei_cl_irq_write()
1902 mei_hdr->msg_complete = 1; in mei_cl_irq_write()
1904 mei_hdr->dma_ring = 1; in mei_cl_irq_write()
1908 mei_hdr->msg_complete = 1; in mei_cl_irq_write()
1917 kfree(mei_hdr); in mei_cl_irq_write()
1920 mei_hdr->length += data_len; in mei_cl_irq_write()
1922 if (mei_hdr->dma_ring && buf->data) in mei_cl_irq_write()
1924 rets = mei_write_message(dev, mei_hdr, hdr_len, data, data_len); in mei_cl_irq_write()
1940 if (mei_hdr->msg_complete) in mei_cl_irq_write()
1943 kfree(mei_hdr); in mei_cl_irq_write()
1947 kfree(mei_hdr); in mei_cl_irq_write()
1969 struct mei_msg_hdr *mei_hdr = NULL; in mei_cl_write() local
2012 mei_hdr = mei_msg_hdr_init(cb); in mei_cl_write()
2013 if (IS_ERR(mei_hdr)) { in mei_cl_write()
2014 rets = PTR_ERR(mei_hdr); in mei_cl_write()
2015 mei_hdr = NULL; in mei_cl_write()
2019 hdr_len = sizeof(*mei_hdr) + mei_hdr->length; in mei_cl_write()
2045 mei_hdr->msg_complete = 1; in mei_cl_write()
2047 mei_hdr->dma_ring = 1; in mei_cl_write()
2051 mei_hdr->msg_complete = 1; in mei_cl_write()
2061 mei_hdr->length += data_len; in mei_cl_write()
2063 if (mei_hdr->dma_ring && buf->data) in mei_cl_write()
2065 rets = mei_write_message(dev, mei_hdr, hdr_len, data, data_len); in mei_cl_write()
2080 if (mei_hdr->msg_complete) in mei_cl_write()
2122 kfree(mei_hdr); in mei_cl_write()