Lines Matching refs:comm
430 ps2_packet_ok(struct PS2SynapticsHwInfo *synhw, struct CommData *comm)
432 unsigned char *buf = comm->protoBuf;
461 struct CommData *comm)
467 while ((c = XisbRead(comm->buffer)) >= 0) {
471 if ((c == 0x00) && (comm->lastByte == 0xAA)) {
479 comm->lastByte = u;
488 comm->protoBuf[comm->protoBufTail++] = u;
492 if (comm->protoBufTail >= 6) {
493 if (!ps2_packet_ok(synhw, comm)) {
496 for (i = 0; i < comm->protoBufTail - 1; i++)
497 comm->protoBuf[i] = comm->protoBuf[i + 1];
498 comm->protoBufTail--;
499 comm->outOfSync++;
500 if (comm->outOfSync > MAX_UNSYNC_PACKETS) {
501 comm->outOfSync = 0;
509 if (comm->protoBufTail >= 6) { /* Full packet received */
510 if (comm->outOfSync > 0) {
511 comm->outOfSync = 0;
514 comm->protoBufTail = 0;
525 struct CommData *comm, struct SynapticsHwState *hwRet)
527 unsigned char *buf = comm->protoBuf;
528 struct SynapticsHwState *hw = comm->hwState;
544 if (!ps2_synaptics_get_packet(pInfo, synhw, proto_ops, comm))
657 struct CommData *comm, struct SynapticsHwState *hwRet)
659 return PS2ReadHwStateProto(pInfo, &psaux_proto_operations, comm, hwRet);