Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1991, 1992, 1993 Microsoft Corporation
  3. Module Name:
  4. error.c
  5. Abstract:
  6. This module contains the code that is very specific to error
  7. operations in the serial driver
  8. Author:
  9. Anthony V. Ercolano 26-Sep-1991
  10. Environment:
  11. Kernel mode
  12. Revision History :
  13. --*/
  14. #include "precomp.h"
  15. VOID
  16. SerialCommError(
  17. IN PKDPC Dpc,
  18. IN PVOID DeferredContext,
  19. IN PVOID SystemContext1,
  20. IN PVOID SystemContext2
  21. )
  22. /*++
  23. Routine Description:
  24. This routine is invoked at dpc level to in response to
  25. a comm error. All comm errors kill all read and writes
  26. Arguments:
  27. Dpc - Not Used.
  28. DeferredContext - Really points to the device object.
  29. SystemContext1 - Not Used.
  30. SystemContext2 - Not Used.
  31. Return Value:
  32. None.
  33. --*/
  34. {
  35. PSERIAL_DEVICE_EXTENSION Extension = DeferredContext;
  36. UNREFERENCED_PARAMETER(SystemContext1);
  37. UNREFERENCED_PARAMETER(SystemContext2);
  38. SerialDump(SERTRACECALLS, ("SERIAL: SerialCommError\n"));
  39. SerialKillAllReadsOrWrites(
  40. Extension->DeviceObject,
  41. &Extension->WriteQueue,
  42. &Extension->CurrentWriteIrp
  43. );
  44. SerialKillAllReadsOrWrites(
  45. Extension->DeviceObject,
  46. &Extension->ReadQueue,
  47. &Extension->CurrentReadIrp
  48. );
  49. SerialDpcEpilogue(Extension, Dpc);
  50. }