1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-01 18:55:36 +00:00
Commit Graph

222 Commits

Author SHA1 Message Date
ckolivas
b59c33800b Implement cgminer specific cgsem semaphores to imitate unnamed semaphore behaviour on osx which does not support them. 2013-06-06 13:08:00 +10:00
Con Kolivas
62585778e7 Set cgusb->buffer to NULL when doing usb_buffer_disable. 2013-06-05 21:27:57 +10:00
Kano
58bb4d486d usb_ftdi_set_latency LOG_ERRs if called incorrectly 2013-06-05 01:44:50 +10:00
Kano
f366d53f3c add usb_ftdi_set_latency 2013-06-05 01:37:16 +10:00
Kano
4368a04fce usbutils optional read buffering 2013-06-05 01:07:16 +10:00
Kano
4d749ff44b restore max code - since timeout is unsigned 2013-06-04 13:43:23 +10:00
Kano
cab2dd92ab compile warning - remove unused max 2013-06-04 13:30:05 +10:00
Kano
1c64f3b621 usb set FTDI latency higher to minimise status bytes 2013-06-04 13:17:57 +10:00
Con Kolivas
8ecf929944 Check for zero timeout on _usb_write. 2013-06-04 00:08:59 +10:00
Con Kolivas
2887147444 Check for zero timeout in usb read. 2013-06-03 23:55:55 +10:00
Con Kolivas
27628cdda9 Define a minimum polling time based on frequency of mandatory updates of ftdi responses at 40ms. 2013-06-03 23:38:54 +10:00
Con Kolivas
97a92b26ca Sleep right up to the timeout instead of the first half if we find ourselves polling in _usb_read 2013-06-03 23:33:31 +10:00
Con Kolivas
3d631b7cbb Enforce half timeout sized sleeps in usb_read if we find the device is not respecting libusb timeouts to avoid polling frequently. 2013-06-03 23:15:59 +10:00
Kano
8c1366113c usbutils semun use proper def for linux which fixes OSX also 2013-06-01 07:53:29 +10:00
Con Kolivas
eec1a86af0 Update copyrights of modified files. 2013-05-30 22:53:07 +10:00
Con Kolivas
56a20e0125 Make usb_ftdi_cts use the _usb_transfer_read function. 2013-05-30 16:47:09 +10:00
Kano
74d7f55648 usbutils automatically track IO errors 2013-05-30 16:00:41 +10:00
Kano
3f4b717ac2 usbutils allow a short wait for resources to be released 2013-05-30 15:44:33 +10:00
Kano
5869539e67 correct semaphore timeout comment 2013-05-30 15:02:52 +10:00
Con Kolivas
cc04d3abc7 Use a counting semaphore to signal the usb resource thread that it has work to do. 2013-05-30 11:01:29 +10:00
ckolivas
641883a572 Check for no usb device in usb_ftdi_cts 2013-05-29 16:35:34 +10:00
ckolivas
f3093803d1 Check for valid usbdev in _usb_read in case the device has been unplugged. 2013-05-29 16:29:49 +10:00
Con Kolivas
fa059b3cba usb_transfer_read should also not play with the endianness. 2013-05-29 00:39:16 +10:00
Con Kolivas
0177b41010 Use the USB wrappers for avalon, telling usbutils that we want the raw data. 2013-05-29 00:33:56 +10:00
Con Kolivas
876e7e5893 Merge branch 'icarus-dev' into usbdev
Conflicts:
	usbutils.h
2013-05-29 00:01:54 +10:00
Con Kolivas
772b354ea9 Remove unneeded function and checks in avalon write code. 2013-05-28 23:59:07 +10:00
Kano
05cbbd99bb CMR handle baud options 2013-05-28 23:56:30 +10:00
Kano
df8566a78c usb/ica add more (incomplete) CMR settings 2013-05-28 22:44:03 +10:00
Con Kolivas
adb2ea672d libusb_control_transfer are meant to be endian specific, but host endianness so no conversion is needed. 2013-05-28 20:50:53 +10:00
Kano
6041be6142 Reuse old MTX Handle 2013-05-28 17:07:49 +10:00
Kano
5b7e435f60 usbutils check all memory allocation 2013-05-28 10:46:48 +10:00
Kano
2f94ec8025 usb separate thread for resource locking and modified windows locking code 2013-05-27 23:30:18 +10:00
Con Kolivas
a32e521d0a Implement avalon_ready and avalon_wait_ready functions for when usb is ready to receive commands. 2013-05-27 17:17:42 +10:00
Con Kolivas
269a8de977 First pass rewriting serialdev into direct usb dev for avalon driver. 2013-05-27 15:43:22 +10:00
Con Kolivas
8fea60f384 Define a cts equivalent for direct usb and use it for avalon driver full. 2013-05-27 15:01:13 +10:00
Kano
6c952105ed usbutils ensure it compiles without stats 2013-05-26 10:49:42 +10:00
Kano
aa9bf2cbb9 usbutils include transfer mode in usbstats 2013-05-26 10:33:47 +10:00
Kano
b1b93054cd usbutils handle bulk_transfer partial writes 2013-05-26 08:34:06 +10:00
Kano
ab080fa681 usbutils make all windows timeouts 999ms 2013-05-23 15:50:07 +10:00
Kano
2baa5b9c22 usb add another Cairnsmore1 USB chip 2013-05-23 11:45:12 +10:00
Kano
511bbb050c CMR usb config guess 2013-05-22 23:49:08 +10:00
Kano
87d994b6ea usb add transfer_read and commented out in icarus 2013-05-22 23:22:00 +10:00
Kano
6a0b48a650 usbutils allow unrounded control transfers 2013-05-20 22:37:52 +10:00
Kano
0c3f00c567 icarus ICA initialisation 2013-05-20 21:58:04 +10:00
Kano
56a96b4138 icarus AMU config transfers 2013-05-20 00:48:15 +10:00
Kano
e43f265a60 usbutils name latency correctly 2013-05-19 19:09:13 +10:00
Con Kolivas
546be35cc7 Merge branch 'icarus-dev' of github.com:ckolivas/cgminer into icarus-dev 2013-05-18 13:16:17 +10:00
Kano
5e588d87f4 icarus test nodev everywhere 2013-05-18 01:56:00 +10:00
Kano
250e435313 usbutils/icarus separate FTDI transfer values and more debug 2013-05-18 01:39:56 +10:00
Kano
8f4547da99 usbutils add rest of icarus 2013-05-17 22:05:53 +10:00
Con Kolivas
22e677f4d6 Merge branch 'icarus-dev' of github.com:ckolivas/cgminer into icarus-dev 2013-05-17 21:25:38 +10:00
Con Kolivas
e128f90ef1 Merge branch 'master' of github.com:ckolivas/cgminer 2013-05-17 21:13:36 +10:00
Kano
05a385ccfc usbutils new command for icarus 2013-05-17 13:49:41 +10:00
Kano
e89c921ab0 usb add a numeric sub-indentity for each name 2013-05-16 22:16:15 +10:00
Kano
2631b55ee2 usbutils - make FTDI handling automatic 2013-05-16 21:38:55 +10:00
Kano
92e5ee9d66 fix duplicate name 2013-05-16 19:41:53 +10:00
Kano
2a0b712ed5 usbutils set Black Arrow Lancelot's as BAL and match the lot->llt name 2013-05-16 19:39:40 +10:00
Kano
28f4fc64fd usbutils identify Icarus devices 2013-05-16 19:33:30 +10:00
Con Kolivas
0a15beb742 libusb_control_transfer 16 bit words are endian specific. 2013-05-16 12:39:18 +10:00
Kano
6493554acb usb_applog separate amt display 2013-05-15 17:39:25 +10:00
Kano
05dd48ace1 usbutils/mmq fixed size usb_read default to wait for all data 2013-05-09 06:50:51 +10:00
Kano
f518f33674 usbutils optional (disabled by default) dev debug 2013-05-09 06:49:48 +10:00
Con Kolivas
8e117050e3 Avalon usb interface should be 0. 2013-05-09 06:44:32 +10:00
Con Kolivas
4a39f03919 Add more debug for failure to USB init. 2013-05-09 06:43:56 +10:00
Kano
56a45778f8 usbutils correct applog typing 2013-05-02 23:02:35 +10:00
Kano
d3d90e65fa usbutils remove_in_use break 2013-04-29 00:24:46 +10:00
Kano
bfdbec1d87 usbutils remove_in_use yet again 2013-04-29 00:11:12 +10:00
Kano
d436beb7e2 usbutils remove_in_use missing prev 2013-04-29 00:04:35 +10:00
Kano
2ae4840c72 usbutils missing add_in_use 2013-04-28 23:11:41 +10:00
Kano
2c97b8b8bc usb_init() allow it to ignore a device and show no message 2013-04-28 19:00:25 +10:00
Kano
95f467b27f usbutils don't even attempt to detect a device we already have 2013-04-28 17:47:28 +10:00
Kano
a436ede673 usbutils correct BFL name 2013-04-28 13:28:52 +10:00
Kano
ebfa56db02 usbutils allow device selection to specify expected Manufacturer/Product strings 2013-04-28 12:49:32 +10:00
Kano
bd4d04b260 bflsc add volt stats 2013-04-27 00:07:42 +10:00
Con Kolivas
3ab81ee6ce Use cgtime in usbutils.c 2013-04-21 19:14:52 +10:00
Kano
b7b5b9ded2 usbutils more stats for bflsc 2013-04-07 07:46:45 +10:00
Kano
8dd1ed2454 usbutils extra message requirements 2013-03-31 21:58:48 +11:00
Kano
cef96ddb8c usbutils.c usb_cmdname() usb_cmds -> string name 2013-03-30 01:21:02 +11:00
Kano
e88652bc56 BFL FPGA Windows timeout set to 999ms 2013-03-29 21:33:57 +11:00
Kano
956d444054 avalon usbutils requirements 2013-03-21 15:25:10 +11:00
Kano
e07d21be8f usbutils use it's own internal read buffer 2013-03-17 15:28:24 +11:00
Kano
b29828e8da usbutils allow read termination match to be a string 2013-03-16 21:54:34 +11:00
Kano
c63ae9d981 usbutils spelling :) 2013-03-16 16:02:43 +11:00
Kano
2ce62f3d94 add a dummy ztex to usbutils so cgminer -n lists ztex also 2013-03-15 15:47:50 +11:00
Kano
a6f17cbf95 USB device list - convert some common error numbers to messages 2013-03-15 02:19:42 +11:00
Kano
26341bbf75 USB -n 'known' text only without ---usb-list-all 2013-03-15 00:30:48 +11:00
Kano
b21747b978 USB modify -n and --usb-dump to only show known devices or use new --usb-list-all option to see all 2013-03-15 00:02:17 +11:00
Kano
154e4f4b61 usbutils allow call of usb_all() from other code 2013-03-13 11:04:05 +11:00
Kano
6acda9373b --usb-dump display brief dump if value = 0 2013-03-11 11:27:35 +11:00
Kano
3f50e878a2 USB add --usb options to limit USB device selection v0.1 2013-03-11 10:58:28 +11:00
Kano
30e7040f11 usb_cleanup() without locking 2013-03-09 13:56:52 +11:00
Kano
540f3e89bc Setup BFLSC support 2013-03-07 00:00:31 +11:00
Kano
cb49f3cbb7 usbutils.c copy full size to 'Last Command' 2013-03-06 00:24:02 +11:00
Kano
f1ab8ea9e7 Release MMQ device only once (not 4 times) 2013-03-04 21:18:42 +11:00
Kano
aed1e516db usb_cleanup() use correct locking mechanism 2013-03-04 10:16:44 +11:00
Kano
e35e8ae135 Implement and use usb_cleanup() on shutdown or restart 2013-03-04 09:45:07 +11:00
Kano
b9c19a9353 remove empty #ifdef 2013-02-08 02:20:04 +11:00
Kano
bc5755233c call a separate get_devices() with locking, as required 2013-02-08 02:12:09 +11:00
Kano
1c69417def usbutils - avoid free cgusb twice 2013-02-08 01:44:43 +11:00
Kano
983fe2b0c0 usbutils hotplug v0.1 2013-02-08 01:42:36 +11:00
Kano
7abf30b2c0 distinguish between drv and it's id enum now called drv_id 2013-02-03 22:51:05 +11:00
Kano
05157e0802 USB in linux use the expected kernel config to check and detach - and set the configuration in linux also 2013-02-02 20:14:44 +11:00
Kano
128e3270fb USB system wide device locking on windows 2013-02-02 20:14:43 +11:00
Kano
16fa090013 usbutils stats_initialised not set 2013-02-02 20:14:41 +11:00
Kano
028da16bf8 usbutils free found if not used 2013-02-02 20:14:41 +11:00
Kano
8297304089 USB device locking NOOP for windows (for now) 2013-02-02 20:14:41 +11:00
Kano
cb3e3ebfac USB system wide device locking on linux 2013-02-02 20:14:40 +11:00
Kano
59c73ae59a USB usb_init() consistent err/warning/debug messages 2013-02-02 20:14:38 +11:00
Kano
a59b0c0355 usbutils.c use correct config from found (not 0) 2013-02-02 20:14:38 +11:00
Kano
7fbc3770b4 USB move usbdev info that needs to stay around into usbinfo 2013-02-02 20:14:36 +11:00
Kano
baf3aca88c usbutils.c release_cgpu() sets nodev 2013-02-02 20:14:33 +11:00
Kano
ea807cf0c7 USB BFL transfer is only 64 bytes in a USB1.1 socket 2013-02-02 20:14:31 +11:00
Kano
34bcc1c66d USB automatically handle losing the device and report nodev in the API 2013-02-02 20:14:29 +11:00
Kano
f9e04a3c5b device_drv - allow .name to be changed before add_cgpu() 2013-02-02 20:14:23 +11:00
Kano
a344deb6ac rename device_api -> device_drv and all related api -> drv and add a device_drv->drv enum for identifying which driver each is 2013-02-02 20:14:19 +11:00
Kano
211b0f4ea1 BFL USB longer timeout 2013-01-02 21:18:08 +11:00
Kano
b099615246 BFL report USB device numbers for init errors and allow faster 'reinit' 2012-12-31 13:04:53 +11:00
Kano
cbf6c71648 BFL libusb driver 2012-12-31 08:54:02 +11:00
Kano
440edfc49f usb display message when device is in use/another cgminer 2012-12-10 20:14:36 +11:00
Kano
e6efec46e9 usbutils.c uninitialised usbstat for non-primary mmqs 2012-12-10 10:42:02 +11:00
Kano
3a91d8eb61 usbutils.c remove compiler warning 2012-12-04 11:21:49 +11:00
Kano
152e7e36a2 mmq usb v0.4 + api usb stats 2012-12-02 21:48:37 +11:00