]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC: r285909, r285913 (partial)
authormarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 27 Dec 2015 20:49:36 +0000 (20:49 +0000)
committermarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 27 Dec 2015 20:49:36 +0000 (20:49 +0000)
commitbc7b11160fc9ff5a71833d4417c52ee7a598211a
treede84430596756039d7614a4f3dacb1ffe0a36089
parente41d2e6ce9869d3ac319901098fc0cf27cbcb52c
MFC: r285909, r285913 (partial)

- Probe UICLASS_CDC/UISUBCLASS_ABSTRACT_CONTROL_MODEL/0xff again. This
  variant of Microsoft RNDIS, i. e. their unofficial version of CDC ACM,
  has been disabled in r261544 (r262362 in stable/9) for resolving a
  conflict with umodem(4). Eventually, in r275790 (r276244 in stable/9)
  that problem was dealt with in the right way. However, r275790 failed
  to put probing of RNDIS devices in question back.
- Initialize the device prior to querying it, as required by the RNDIS
  specification. Otherwise already determining the MAC address may fail
  rightfully.
- On detach, halt the device again.
- Use UCDC_SEND_ENCAPSULATED_{COMMAND,RESPONSE}. While these macros are
  resolving to the same values as UR_{CLEAR_FEATURE,GET_STATUS}, the
  former set is way more appropriate in this context.
- Report unknown - rather: unimplemented - events unconditionally and
  not just in debug mode. This ensures that we'll get some hint of what
  is going wrong instead of the driver silently failing.
- Deal with the Microsoft ActiveSync requirement of using an input buffer
  the size of the expected reply or larger - except for variably sized
  replies - when querying a device.
- Fix some pointless NULL checks, style bugs etc.

This changes allow urndis(4) to communicate with a Microsoft-certified
USB RNDIS test token.

git-svn-id: svn://svn.freebsd.org/base/stable/9@292793 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/usb/net/if_urndis.c