History log of /haiku/src/add-ons/kernel/drivers/ports/usb_serial/Driver.cpp
Revision Date Author Comments
# 425ac1b6 20-Jun-2023 Alexander von Gluck IV <kallisti5@unixzen.com>

refactor: Swap %Ld for %lld in all format usages

* %Ld is an undocumented alias for %lld in glibc.
* muslc doesn't implement it for this reason.
* While we will likely never drop %Ld support,
lets clean house and set a better example.

Change-Id: Id46dad3104abae483e80cc5c05d1464d3ecd8030
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6636
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 24dba16d 09-May-2013 Jérôme Duval <jerome.duval@gmail.com>

usb_serial: fixes 64 bit warnings


# bd1aad83 13-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

Add some more function return tracing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42155 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7868b8f 10-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Print the speeds even though they are marked as not used (as the baud index
is inside the cflags) since stty for example sets them.
* Turn off debug output by default and fix a warning due to that.
* Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42087 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1a698b25 04-Jan-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Actually check *distinct* configurations. Checking always the first one several times wont make it works
better :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40105 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c5f2df28 03-Jan-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Switched to use USB_cdc.h definitions.
Expanded search in every configuration, not only first. ELSA USB modem for instance
publish two configurations, the first one being a vendor-specific one for
Windows NT.
ACMDevice now don't assume anymore union functional descriptor is always there.
The data interface index can be found also in Call Management (CM) functional
descriptor.

(Style cleanup pending...)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40092 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 95fe58a7 07-Dec-2010 Michael Lotz <mmlr@mlotz.ch>

Clean out backwards compatibility cruft, local copy of USB header, packageing
rules and support files that don't really apply anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39763 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b994a185 07-Dec-2010 Michael Lotz <mmlr@mlotz.ch>

Port of usb_serial to the generic tty module. I don't remember exactly if or how
well this was working, but since it was non-functional on Haiku anyway this
shouldn't hurt.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39762 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 717326c2 25-Sep-2008 François Revol <revol@free.fr>

Add missing api_version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27740 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e5812e91 12-May-2008 Michael Lotz <mmlr@mlotz.ch>

Fix typo that caused a too small buffer to be allocated for device names.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25465 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dbcfdd5c 11-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

Correct the way serial devices are deleted. They are either deleted on removal
when they are not open or they are deleted on free when they are already
removed. This should fix the sudden crashes when you unplugged a device that
might not have been fully closed yet.
Also handle the case of removal correctly and don't use the usb_device anymore
after releasing it by returning from the device removed hook. Calls to the
device just return B_DEV_NOT_READY in that case.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24920 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 400ba068 09-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

Made sure load_driver_symbols() is not used anymore when building for Haiku;
it's a no-op, and I removed the prototype from KernelExport.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24875 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7aa661d4 19-Jan-2008 Michael Lotz <mmlr@mlotz.ch>

Rework of the usb_serial driver:
* Refactored everything to C++ with the different devices as subclasses
* Added proper ACM detection with parsing of the ACM descriptors
* Added device transfer error handling and fixed some concurency issues
* Big cleanup to conform to our style guide

This should make at least ACM stable to use. Commiting this over my K850i with
ACM compliant USB modem and UMTS data connection. Note that support for all
other device classes (Prolific, FTDI and KLSI) is untested but should work the
same as before. Note also that since we currently lack a TTY module this will
only build/work for R5 or Dano with the proper TTY headers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23634 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 24dba16d04b9acd835871de8f9066c8874948e54 09-May-2013 Jérôme Duval <jerome.duval@gmail.com>

usb_serial: fixes 64 bit warnings


# bd1aad8366424364dc13129a995f5ec33bfadfd3 13-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

Add some more function return tracing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42155 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7868b8f1a377a9933bd24ee9265fee56cad151d 10-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Print the speeds even though they are marked as not used (as the baud index
is inside the cflags) since stty for example sets them.
* Turn off debug output by default and fix a warning due to that.
* Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42087 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1a698b259bdcc75b537ad605ec5daa19558ecc1c 04-Jan-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Actually check *distinct* configurations. Checking always the first one several times wont make it works
better :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40105 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c5f2df286e21f263432f1deb39b6ccf6a6ff32c0 03-Jan-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Switched to use USB_cdc.h definitions.
Expanded search in every configuration, not only first. ELSA USB modem for instance
publish two configurations, the first one being a vendor-specific one for
Windows NT.
ACMDevice now don't assume anymore union functional descriptor is always there.
The data interface index can be found also in Call Management (CM) functional
descriptor.

(Style cleanup pending...)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40092 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 95fe58a78df6980c1d4b171f40930029825ef1a6 07-Dec-2010 Michael Lotz <mmlr@mlotz.ch>

Clean out backwards compatibility cruft, local copy of USB header, packageing
rules and support files that don't really apply anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39763 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b994a185080e8f2706d5a153496070f7fe7b4d7e 07-Dec-2010 Michael Lotz <mmlr@mlotz.ch>

Port of usb_serial to the generic tty module. I don't remember exactly if or how
well this was working, but since it was non-functional on Haiku anyway this
shouldn't hurt.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39762 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 717326c22315c578eb2fb1ba03de4eb59beb5b34 25-Sep-2008 François Revol <revol@free.fr>

Add missing api_version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27740 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e5812e917b722704c2f71c4d9b9f2f86b71893a3 12-May-2008 Michael Lotz <mmlr@mlotz.ch>

Fix typo that caused a too small buffer to be allocated for device names.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25465 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dbcfdd5ca72fcd9910b65a9061df902f78b2b3d6 11-Apr-2008 Michael Lotz <mmlr@mlotz.ch>

Correct the way serial devices are deleted. They are either deleted on removal
when they are not open or they are deleted on free when they are already
removed. This should fix the sudden crashes when you unplugged a device that
might not have been fully closed yet.
Also handle the case of removal correctly and don't use the usb_device anymore
after releasing it by returning from the device removed hook. Calls to the
device just return B_DEV_NOT_READY in that case.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24920 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 400ba068e0971623161ea2f939fd5ede8e5af25c 09-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

Made sure load_driver_symbols() is not used anymore when building for Haiku;
it's a no-op, and I removed the prototype from KernelExport.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24875 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7aa661d403eac10eab21bcd0facf01c2bcc03c24 19-Jan-2008 Michael Lotz <mmlr@mlotz.ch>

Rework of the usb_serial driver:
* Refactored everything to C++ with the different devices as subclasses
* Added proper ACM detection with parsing of the ACM descriptors
* Added device transfer error handling and fixed some concurency issues
* Big cleanup to conform to our style guide

This should make at least ACM stable to use. Commiting this over my K850i with
ACM compliant USB modem and UMTS data connection. Note that support for all
other device classes (Prolific, FTDI and KLSI) is untested but should work the
same as before. Note also that since we currently lack a TTY module this will
only build/work for R5 or Dano with the proper TTY headers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23634 a95241bf-73f2-0310-859d-f6bbb57e9c96