Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 832 of file 8390.c.
Referenced by NICWritePacket().
{ USHORT Tmp; /* Avoid transfers to odd addresses */ if (Target & 0x01) { /* Read one word */ NICReadDataAlign(Adapter, &Tmp, Target - 1, 0x02); /* Merge LSB with the new byte which become the new MSB */ Tmp = (Tmp & 0x00FF) | (*Source << 8); /* Finally write the value back */ NICWriteDataAlign(Adapter, Target - 1, &Tmp, 0x02); /* Update pointers */ Source = (PUCHAR) ((ULONG_PTR) Source + 1); Target += 1; Length--; } if (Length & 0x01) { /* Transfer as many words as we can without exceeding the transfer length */ Tmp = Length & 0xFFFE; NICWriteDataAlign(Adapter, Target, (PUSHORT)Source, Tmp); Source += Tmp; Target += Tmp; /* Read one word */ NICReadDataAlign(Adapter, &Tmp, Target, 0x02); /* Merge MSB with the new byte which become the new LSB */ Tmp = (Tmp & 0xFF00) | (*Source); /* Finally write the value back */ NICWriteDataAlign(Adapter, Target, &Tmp, 0x02); } else /* Transfer the rest of the data */ NICWriteDataAlign(Adapter, Target, (PUSHORT)Source, Length); }