• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/firewire/

Lines Matching defs:packet

292 	", reset packet generation = "	__stringify(QUIRK_RESET_PACKET)
410 [0xa] = "async stream packet", [0xb] = "Lk resp",
415 [0x0] = "phy config packet", [0x1] = "link-on packet",
416 [0x2] = "self-id packet", [0x3] = "-reserved-",
714 * write ack_complete status at PHY packet reception.
721 * The OHCI bus reset handler synthesizes a PHY packet with
763 * packet split across this and the next buffer. We
764 * reuse the page for reassembling the split packet.
794 /* move the next packet to the start of the buffer */
1077 struct fw_packet *packet;
1081 * This function apppends a packet to the DMA queue for transmission.
1083 * generation handling and locking around packet queue manipulation.
1086 struct fw_packet *packet)
1098 packet->ack = RCODE_SEND_ERROR;
1103 d[0].res_count = cpu_to_le16(packet->timestamp);
1108 * accordingly. If header_length is 8, it's a PHY packet, to
1113 switch (packet->header_length) {
1116 header[0] = cpu_to_le32((packet->header[0] & 0xffff) |
1117 (packet->speed << 16));
1118 header[1] = cpu_to_le32((packet->header[1] & 0xffff) |
1119 (packet->header[0] & 0xffff0000));
1120 header[2] = cpu_to_le32(packet->header[2]);
1122 tcode = (packet->header[0] >> 4) & 0x0f;
1124 header[3] = cpu_to_le32(packet->header[3]);
1126 header[3] = (__force __le32) packet->header[3];
1128 d[0].req_count = cpu_to_le16(packet->header_length);
1133 (packet->speed << 16));
1134 header[1] = cpu_to_le32(packet->header[0]);
1135 header[2] = cpu_to_le32(packet->header[1]);
1138 if (is_ping_packet(packet->header))
1143 header[0] = cpu_to_le32((packet->header[0] & 0xffff) |
1144 (packet->speed << 16));
1145 header[1] = cpu_to_le32(packet->header[0] & 0xffff0000);
1151 packet->ack = RCODE_SEND_ERROR;
1156 driver_data->packet = packet;
1157 packet->driver_data = driver_data;
1159 if (packet->payload_length > 0) {
1161 dma_map_single(ohci->card.device, packet->payload,
1162 packet->payload_length, DMA_TO_DEVICE);
1164 packet->ack = RCODE_SEND_ERROR;
1167 packet->payload_bus = payload_bus;
1168 packet->payload_mapped = true;
1170 d[2].req_count = cpu_to_le16(packet->payload_length);
1183 if (ohci->generation != packet->generation ||
1185 if (packet->payload_mapped)
1187 packet->payload_length, DMA_TO_DEVICE);
1188 packet->ack = RCODE_GENERATION;
1207 struct fw_packet *packet;
1216 packet = driver_data->packet;
1217 if (packet == NULL)
1218 /* This packet was cancelled, just continue. */
1221 if (packet->payload_mapped)
1222 dma_unmap_single(ohci->card.device, packet->payload_bus,
1223 packet->payload_length, DMA_TO_DEVICE);
1226 packet->timestamp = le16_to_cpu(last->res_count);
1228 log_ar_at_event('T', packet->speed, packet->header, evt);
1233 packet->ack = RCODE_CANCELLED;
1238 * The packet was flushed should give same error as
1241 packet->ack = RCODE_GENERATION;
1249 packet->ack = RCODE_NO_ACK;
1259 packet->ack = evt - 0x10;
1263 packet->ack = RCODE_SEND_ERROR;
1267 packet->callback(packet, &ohci->card, packet->ack);
1279 struct fw_packet *packet, u32 csr)
1284 tcode = HEADER_GET_TCODE(packet->header[0]);
1286 length = HEADER_GET_DATA_LENGTH(packet->header[3]);
1292 fw_fill_response(&response, packet->header,
1295 fw_fill_response(&response, packet->header,
1298 fw_fill_response(&response, packet->header, RCODE_COMPLETE,
1306 struct fw_packet *packet, u32 csr)
1313 tcode = HEADER_GET_TCODE(packet->header[0]);
1314 length = HEADER_GET_DATA_LENGTH(packet->header[3]);
1315 payload = packet->payload;
1316 ext_tcode = HEADER_GET_EXTENDED_TCODE(packet->header[3]);
1326 fw_fill_response(&response, packet->header,
1340 fw_fill_response(&response, packet->header,
1347 fw_fill_response(&response, packet->header, RCODE_BUSY, NULL, 0);
1353 static void handle_local_request(struct context *ctx, struct fw_packet *packet)
1358 packet->ack = ACK_PENDING;
1359 packet->callback(packet, &ctx->ohci->card, packet->ack);
1364 HEADER_GET_OFFSET_HIGH(packet->header[1]) << 32) |
1365 packet->header[2];
1370 handle_local_rom(ctx->ohci, packet, csr);
1376 handle_local_lock(ctx->ohci, packet, csr);
1380 fw_core_handle_request(&ctx->ohci->card, packet);
1382 fw_core_handle_response(&ctx->ohci->card, packet);
1387 packet->ack = ACK_COMPLETE;
1388 packet->callback(packet, &ctx->ohci->card, packet->ack);
1392 static void at_context_transmit(struct context *ctx, struct fw_packet *packet)
1399 if (HEADER_GET_DESTINATION(packet->header[0]) == ctx->ohci->node_id &&
1400 ctx->ohci->generation == packet->generation) {
1402 handle_local_request(ctx, packet);
1406 ret = at_context_queue_packet(ctx, packet);
1410 packet->callback(packet, &ctx->ohci->card, packet->ack);
1979 static void ohci_send_request(struct fw_card *card, struct fw_packet *packet)
1983 at_context_transmit(&ohci->at_request_ctx, packet);
1986 static void ohci_send_response(struct fw_card *card, struct fw_packet *packet)
1990 at_context_transmit(&ohci->at_response_ctx, packet);
1993 static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
1997 struct driver_data *driver_data = packet->driver_data;
2002 if (packet->ack != 0)
2005 if (packet->payload_mapped)
2006 dma_unmap_single(ohci->card.device, packet->payload_bus,
2007 packet->payload_length, DMA_TO_DEVICE);
2009 log_ar_at_event('T', packet->speed, packet->header, 0x20);
2010 driver_data->packet = NULL;
2011 packet->ack = RCODE_CANCELLED;
2012 packet->callback(packet, &ohci->card, packet->ack);
2522 struct fw_iso_packet *packet,
2534 p = packet;
2615 struct fw_iso_packet *packet,
2629 packet_count = packet->header_length / ctx->base.header_size;
2636 payload_per_buffer = packet->payload_length / packet_count;
2648 if (packet->skip && i == 0)
2681 if (packet->interrupt && i == packet_count - 1)
2691 struct fw_iso_packet *packet,
2701 rest = packet->payload_length;
2716 if (packet->skip && i == 0)
2718 if (packet->interrupt && i == z - 1)
2743 struct fw_iso_packet *packet,
2754 ret = queue_iso_transmit(ctx, packet, buffer, payload);
2757 ret = queue_iso_packet_per_buffer(ctx, packet, buffer, payload);
2760 ret = queue_iso_buffer_fill(ctx, packet, buffer, payload);