Lines Matching refs:length

41 static void fill_async_readblock(struct hpsb_packet *packet, u64 addr, int length)  in fill_async_readblock()  argument
44 packet->header[3] = length << 16; in fill_async_readblock()
59 static void fill_async_writeblock(struct hpsb_packet *packet, u64 addr, int length) in fill_async_writeblock() argument
62 packet->header[3] = length << 16; in fill_async_writeblock()
65 packet->data_size = length + (length % 4 ? 4 - (length % 4) : 0); in fill_async_writeblock()
69 int length) in fill_async_lock() argument
72 packet->header[3] = (length << 16) | extcode; in fill_async_lock()
74 packet->data_size = length; in fill_async_lock()
78 static void fill_iso_packet(struct hpsb_packet *packet, int length, int channel, in fill_iso_packet() argument
81 packet->header[0] = (length << 16) | (tag << 14) | (channel << 8) in fill_iso_packet()
85 packet->data_size = length; in fill_iso_packet()
101 static void fill_async_stream_packet(struct hpsb_packet *packet, int length, in fill_async_stream_packet() argument
104 packet->header[0] = (length << 16) | (tag << 14) | (channel << 8) in fill_async_stream_packet()
108 packet->data_size = length; in fill_async_stream_packet()
257 u64 addr, size_t length) in hpsb_make_readpacket() argument
261 if (length == 0) in hpsb_make_readpacket()
264 packet = alloc_hpsb_packet(length + (length % 4 ? 4 - (length % 4) : 0)); in hpsb_make_readpacket()
276 if (length == 4) in hpsb_make_readpacket()
279 fill_async_readblock(packet, addr, length); in hpsb_make_readpacket()
285 u64 addr, quadlet_t *buffer, size_t length) in hpsb_make_writepacket() argument
289 if (length == 0) in hpsb_make_writepacket()
292 packet = alloc_hpsb_packet(length + (length % 4 ? 4 - (length % 4) : 0)); in hpsb_make_writepacket()
296 if (length % 4) { /* zero padding bytes */ in hpsb_make_writepacket()
297 packet->data[length >> 2] = 0; in hpsb_make_writepacket()
307 if (length == 4) { in hpsb_make_writepacket()
310 fill_async_writeblock(packet, addr, length); in hpsb_make_writepacket()
312 memcpy(packet->data, buffer, length); in hpsb_make_writepacket()
318 struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer, int length, in hpsb_make_streampacket() argument
323 if (length == 0) in hpsb_make_streampacket()
326 packet = alloc_hpsb_packet(length + (length % 4 ? 4 - (length % 4) : 0)); in hpsb_make_streampacket()
330 if (length % 4) { /* zero padding bytes */ in hpsb_make_streampacket()
331 packet->data[length >> 2] = 0; in hpsb_make_streampacket()
340 fill_async_stream_packet(packet, length, channel, tag, sync); in hpsb_make_streampacket()
342 memcpy(packet->data, buffer, length); in hpsb_make_streampacket()
352 u32 length; in hpsb_make_lockpacket() local
367 length = 4; in hpsb_make_lockpacket()
372 length = 8; in hpsb_make_lockpacket()
379 fill_async_lock(p, addr, extcode, length); in hpsb_make_lockpacket()
389 u32 length; in hpsb_make_lock64packet() local
404 length = 8; in hpsb_make_lock64packet()
411 length = 16; in hpsb_make_lock64packet()
420 fill_async_lock(p, addr, extcode, length); in hpsb_make_lock64packet()
440 int length, int channel, in hpsb_make_isopacket() argument
445 p = alloc_hpsb_packet(length); in hpsb_make_isopacket()
449 fill_iso_packet(p, length, channel, tag, sync); in hpsb_make_isopacket()
462 u64 addr, quadlet_t *buffer, size_t length) in hpsb_read() argument
467 if (length == 0) in hpsb_read()
472 packet = hpsb_make_readpacket(host, node, addr, length); in hpsb_read()
489 if (length == 4) { in hpsb_read()
492 memcpy(buffer, packet->data, length); in hpsb_read()
505 u64 addr, quadlet_t *buffer, size_t length) in hpsb_write() argument
510 if (length == 0) in hpsb_write()
515 packet = hpsb_make_writepacket (host, node, addr, buffer, length); in hpsb_write()
602 quadlet_t *buffer, size_t length, u32 specifier_id, in hpsb_send_gasp() argument
610 HPSB_VERBOSE("Send GASP: channel = %d, length = %Zd", channel, length); in hpsb_send_gasp()
612 length += 8; in hpsb_send_gasp()
614 packet = hpsb_make_streampacket(host, NULL, length, channel, 3, 0); in hpsb_send_gasp()
621 memcpy(&(packet->data[2]), buffer, length - 8); in hpsb_send_gasp()