Lines Matching refs:buf

13 	u8 *buf;
16 buf = kzalloc(12, GFP_KERNEL);
17 if (buf == NULL)
20 buf[0] = 0x00; /* AV/C CONTROL */
21 buf[1] = 0x08 | (0x07 & subunit_id); /* AUDIO SUBUNIT ID */
22 buf[2] = 0xb8; /* FUNCTION BLOCK */
23 buf[3] = 0x80; /* type is 'selector'*/
24 buf[4] = 0xff & fb_id; /* function block id */
25 buf[5] = 0x10; /* control attribute is CURRENT */
26 buf[6] = 0x02; /* selector length is 2 */
27 buf[7] = 0xff & num; /* input function block plug number */
28 buf[8] = 0x01; /* control selector is SELECTOR_CONTROL */
30 err = fcp_avc_transaction(unit, buf, 12, buf, 12,
37 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
39 else if (buf[0] == 0x0a) /* REJECTED */
44 kfree(buf);
51 u8 *buf;
54 buf = kzalloc(12, GFP_KERNEL);
55 if (buf == NULL)
58 buf[0] = 0x01; /* AV/C STATUS */
59 buf[1] = 0x08 | (0x07 & subunit_id); /* AUDIO SUBUNIT ID */
60 buf[2] = 0xb8; /* FUNCTION BLOCK */
61 buf[3] = 0x80; /* type is 'selector'*/
62 buf[4] = 0xff & fb_id; /* function block id */
63 buf[5] = 0x10; /* control attribute is CURRENT */
64 buf[6] = 0x02; /* selector length is 2 */
65 buf[7] = 0xff; /* input function block plug number */
66 buf[8] = 0x01; /* control selector is SELECTOR_CONTROL */
68 err = fcp_avc_transaction(unit, buf, 12, buf, 12,
75 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
77 else if (buf[0] == 0x0a) /* REJECTED */
79 else if (buf[0] == 0x0b) /* IN TRANSITION */
84 *num = buf[7];
87 kfree(buf);
92 avc_bridgeco_fill_extension_addr(u8 *buf, u8 *addr)
94 buf[1] = addr[0];
95 memcpy(buf + 4, addr + 1, 5);
99 avc_bridgeco_fill_plug_info_extension_command(u8 *buf, u8 *addr,
102 buf[0] = 0x01; /* AV/C STATUS */
103 buf[2] = 0x02; /* AV/C GENERAL PLUG INFO */
104 buf[3] = 0xc0; /* BridgeCo extension */
105 avc_bridgeco_fill_extension_addr(buf, addr);
106 buf[9] = itype; /* info type */
113 u8 *buf;
116 buf = kzalloc(12, GFP_KERNEL);
117 if (buf == NULL)
121 avc_bridgeco_fill_plug_info_extension_command(buf, addr, 0x00);
123 err = fcp_avc_transaction(unit, buf, 12, buf, 12,
130 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
132 else if (buf[0] == 0x0a) /* REJECTED */
134 else if (buf[0] == 0x0b) /* IN TRANSITION */
139 *type = buf[10];
142 kfree(buf);
148 u8 *buf, unsigned int len)
153 avc_bridgeco_fill_plug_info_extension_command(buf, addr, 0x03);
155 err = fcp_avc_transaction(unit, buf, 12, buf, 256,
162 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
164 else if (buf[0] == 0x0a) /* REJECTED */
166 else if (buf[0] == 0x0b) /* IN TRANSITION */
172 memmove(buf, buf + 10, err - 10);
182 u8 *buf;
186 buf = kzalloc(12, GFP_KERNEL);
187 if (buf == NULL)
191 avc_bridgeco_fill_plug_info_extension_command(buf, addr, 0x07);
192 buf[10] = 0xff & ++id; /* section id */
194 err = fcp_avc_transaction(unit, buf, 12, buf, 12,
201 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
203 else if (buf[0] == 0x0a) /* REJECTED */
205 else if (buf[0] == 0x0b) /* IN TRANSITION */
210 *type = buf[11];
213 kfree(buf);
221 u8 *buf;
223 buf = kzalloc(18, GFP_KERNEL);
224 if (buf == NULL)
228 avc_bridgeco_fill_plug_info_extension_command(buf, addr, 0x05);
230 err = fcp_avc_transaction(unit, buf, 16, buf, 16,
237 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
239 else if (buf[0] == 0x0a) /* REJECTED */
241 else if (buf[0] == 0x0b) /* IN TRANSITION */
246 memcpy(input, buf + 10, 5);
249 kfree(buf);
254 u8 addr[AVC_BRIDGECO_ADDR_BYTES], u8 *buf,
260 if ((buf == NULL) || (*len < 12)) {
265 buf[0] = 0x01; /* AV/C STATUS */
266 buf[2] = 0x2f; /* AV/C STREAM FORMAT SUPPORT */
267 buf[3] = 0xc1; /* Bridgeco extension - List Request */
268 avc_bridgeco_fill_extension_addr(buf, addr);
269 buf[10] = 0xff & eid; /* Entry ID */
271 err = fcp_avc_transaction(unit, buf, 12, buf, *len,
278 else if (buf[0] == 0x08) /* NOT IMPLEMENTED */
280 else if (buf[0] == 0x0a) /* REJECTED */
282 else if (buf[0] == 0x0b) /* IN TRANSITION */
284 else if (buf[10] != eid)
290 memmove(buf, buf + 11, err - 11);