usbutils.c


Log

Author Commit Date CI Message
ckolivas 6ab7b2b3 2014-01-29T10:50:22 Check that we've cleared the pipe error after a clear request, not the err value which is unchanged.
Con Kolivas e2a10dfe 2014-01-25T00:17:45 Do not send a usb reset on a usb read pipe error.
Con Kolivas d551eba0 2014-01-25T00:16:15 Don't replace usb pipe errors with the pipe reset return code.
Kano d9440866 2014-01-18T09:36:51 Modify thread naming to make them easier to identify
Con Kolivas 87f02131 2014-01-11T16:22:30 Check for loss of device in usb read before any other code on the usbdev
Con Kolivas 61bee221 2014-01-08T22:28:00 Fill the appropriate type of usb transfer when we know if it's an interrupt transfer instead of a bulk one.
Con Kolivas ad6afa39 2014-01-08T22:18:02 Use the internal knowledge of the usb epinfo to determine whether we should be doing an interrupt instead of a bulk transfer, and do not send a ZLP if so, and limit read transfer to expected size automatically.
Con Kolivas c644b749 2014-01-05T20:13:02 Provide a way for usb reads to just read the size asked for with a limit bool.
Con Kolivas 0615cc8c 2014-01-03T16:47:51 Don't return an error in usb read if we've managed to get the whole read length we've asked for.
Con Kolivas d66ebfee 2014-01-03T16:46:07 Use correct endpoint order for nanofury devices and read with a short timeout on return loop from send_recv.
Con Kolivas b849a1b9 2014-01-02T22:25:56 Add basic device detection and updated udev rules for nanofury devices.
Con Kolivas 1b7737d8 2013-12-24T08:34:56 Fix BXF being inappropriately dependent on drillbit.
Kano 97a13df4 2013-12-23T06:58:26 Merge remote-tracking branch 'drill/master' into drill
Con Kolivas afe77108 2013-12-21T08:28:23 Change default hashfast timeout to 500ms.
Angus Gratton 85aebc41 2013-12-11T19:29:10 Merge remote-tracking branch 'upstream/master' into merge_385
Con Kolivas daf2c9b9 2013-12-10T06:39:21 Only set LIBUSB_TRANSFER_ADD_ZERO_PACKET for libusb versions we know include support for.
Angus Gratton 5c411228 2013-12-09T15:25:57 Fix compilation clashes with Drillbit & Bitfury driver, allow both to be compiled in at once
Con Kolivas 8b09c083 2013-12-09T13:46:36 Attempt USB device resets on usb read/write errors that will normally cause the device to drop out.
Angus Gratton 73343f38 2013-12-09T11:39:03 Merge remote-tracking branch 'upstream' into merge_upstream Conflicts: usbutils.c
Con Kolivas 138ff949 2013-12-08T12:48:06 Cache the bool value for usb1.1 in _usb_write
Con Kolivas 7ae878aa 2013-12-08T12:44:45 Initialise usb locks within usbutils.c instead of exporting them.
Con Kolivas 509d1a78 2013-12-08T13:21:57 Imitate a transaction translator for all usb1.1 device writes to compensate for variable quality hubs and operating system support.
Con Kolivas b209d9f6 2013-12-08T12:48:06 Cache the bool value for usb1.1 in _usb_write
Con Kolivas d7c5667a 2013-12-08T12:44:45 Initialise usb locks within usbutils.c instead of exporting them.
Con Kolivas 3737d62a 2013-12-08T12:37:25 Rationalise variables passed to usb_bulk_transfer.
Con Kolivas a3ed7abc 2013-12-07T14:56:39 Unlink files opened as semaphores on releasing them.
Angus Gratton 20997344 2013-12-03T18:56:54 Fix bug with drillbit devices not numbering correctly
Con Kolivas 9bcd5ca8 2013-12-02T17:20:02 Having changed C_MAX means we don't calloc enough for usb stats, off by one.
Con Kolivas 0da9c87e 2013-12-01T15:18:16 Deprecate the usb usecps function and just split up transfers equal to the maxpacketsize on usb1.1 devices.
Con Kolivas f3afbe61 2013-12-01T14:19:46 Retry sending after successfully clearing a pipe error.
Con Kolivas 1b18e3cd 2013-12-01T14:10:57 Drop logging of timeout overrun message to verbose level.
Con Kolivas ab7580cc 2013-12-01T00:07:37 Use a much longer callback timeout for USB writes on windows only as a last resort since cancellations work so poorly.
Con Kolivas b68124b0 2013-12-02T17:20:02 Having changed C_MAX means we don't calloc enough for usb stats, off by one.
Con Kolivas 3bc36eb0 2013-12-01T15:18:16 Deprecate the usb usecps function and just split up transfers equal to the maxpacketsize on usb1.1 devices.
Con Kolivas 596e95b0 2013-12-01T14:19:46 Retry sending after successfully clearing a pipe error.
Con Kolivas 9a6ce20e 2013-12-01T14:10:57 Drop logging of timeout overrun message to verbose level.
Con Kolivas 423dd457 2013-12-01T00:07:37 Use a much longer callback timeout for USB writes on windows only as a last resort since cancellations work so poorly.
Angus Gratton e933a560 2013-11-30T22:03:26 Merge remote-tracking branch 'upstream' into merge_383 Conflicts: usbutils.c usbutils.h
Con Kolivas 0aede509 2013-11-30T12:32:34 Revert "Disable USB stats which were not meant to be enabled by default and add extra memory for a memory error when stats are enabled." This reverts commit 693d3916448ddc66f3a109c5e065e99aa8fa9669.
Con Kolivas 6a91027f 2013-11-30T10:14:44 Use sync usb transfers in lowmem mode.
Con Kolivas be1d7a90 2013-11-30T08:52:42 Go back to allowing timeout errors on USB writes to be passed back to the driver without removing the device in case the driver wishes to manage them.
Con Kolivas 7ddb94d6 2013-11-25T23:47:43 A USB control error must be < 0
Con Kolivas d2b7ccbf 2013-11-25T23:13:29 Simplify USB NODEV error checking to success only for writes and control transfers, and success and timeout for reads.
Con Kolivas 999d27ed 2013-11-25T23:05:41 libusb error IO should be fatal as well if it gets through usb read and write.
Con Kolivas 751585c6 2013-11-25T23:01:33 Allow IO errors in usb reads/writes to be ignored up to retry max times.
Con Kolivas 04fab9bf 2013-11-24T09:39:44 Relax the timeouts for the slower usb devices on linux.
Con Kolivas 0e60ca30 2013-11-22T23:21:44 Make usb_detect return the cgpu associated with it to check if it succeeds to decide on whether to increment the device count or not.
Con Kolivas 9ce30b7b 2013-11-22T11:14:21 Zero the read buffer in _usb_read to avoid stale data and only use stack memory instead of using the bulkbuf since it is only used in _usb_read.
Con Kolivas 23aff60d 2013-11-22T10:34:30 Change the processed value not the bufsiz in response to an end of message marker.
Con Kolivas 49ae610b 2013-11-22T10:24:35 Don't lose data beyond the end of message in a usb read.
Con Kolivas 4cb51674 2013-11-22T09:58:30 Only check strlen on end if end exists.
Con Kolivas b8d8ebfa 2013-11-22T09:54:58 Simplify the end of message detection in _usb_read and allow it to return without doing another read if the message is already in the buffer.
Con Kolivas fd2b247a 2013-11-18T10:38:05 There is no need to limit usb write transfers to maxpacketsize and it's harmful for large transfers on slow devices such as wrt routers.
Con Kolivas 693d3916 2013-11-17T23:04:29 Disable USB stats which were not meant to be enabled by default and add extra memory for a memory error when stats are enabled.
Con Kolivas b3b32675 2013-11-17T17:09:29 Set limit and count to integers to not overflow during failed hotplug attempts and then not trying again.
Con Kolivas c29d6014 2013-11-16T14:46:49 Add more information on libusb failure to init telling users to check README file.
Con Kolivas f785ae5d 2013-11-15T17:34:06 Add bxf details to usbutils.
Angus Gratton 998a368f 2013-11-15T09:41:01 Merge remote-tracking branch 'upstream' into new_protocol Conflicts: cgminer.c configure.ac miner.h
Con Kolivas 488b2ba5 2013-11-14T21:25:52 Merge branch 'master' into bxf
Con Kolivas 67c3826b 2013-11-14T10:37:23 Uniquely identify the BF1 and BXF bitfury devices.
Con Kolivas afb710f3 2013-11-14T00:58:21 Use our new zero length packet support directly in windows.
Kano eac185e8 2013-11-11T13:21:41 Klondike support I2C USB layout also - as KLI
Con Kolivas b74af263 2013-11-12T07:40:35 Only limit packetsize on usb out writes.
Kano b99971f4 2013-11-11T13:21:41 Klondike support I2C USB layout also - as KLI
Con Kolivas 8467d448 2013-11-11T07:11:06 Revert "Send a zero length packet at the end of every usb transfer on windows in case libusb internally has batched them into one maxpacket sized." This reverts commit 4e7b7f6f1802df2cd78c84bb93ff64acf51ca075.
Con Kolivas 4e7b7f6f 2013-11-10T17:49:49 Send a zero length packet at the end of every usb transfer on windows in case libusb internally has batched them into one maxpacket sized.
Angus Gratton 278f157e 2013-11-10T09:12:39 Merge remote-tracking branch 'upstream/master' into new_protocol
Con Kolivas 9f74e057 2013-11-09T08:23:23 Use libusb's own zero length packet support unless we have to emulate it on windows since only libusb knows for sure if it's needed.
Con Kolivas 8e5dc21e 2013-11-09T01:46:50 Send zero length packets when terminating a usb write aligned to maxpacketsize.
Con Kolivas 652044d9 2013-11-06T10:01:15 Check length before submitting sync transfers
Con Kolivas b1be5c6d 2013-11-05T19:18:20 Different windows+usb combinations respond with varying levels of reliability wrt timeouts so use a nominal extra 40ms before cancelling transfers that fail to time out on their own.
Con Kolivas 21f18956 2013-11-05T19:11:20 Revert "Use no cancel transfer functions on windows in callback_wait" This reverts commit 8f6acad8ec11fa68e31447e4de9e2ce49c2bf16a.
Con Kolivas 6bc691ad 2013-11-05T15:55:19 Treat usb write timeout errors as unrecoverable.
Con Kolivas 42b3cf19 2013-11-05T15:46:07 Transfer errors are filtered out in usbutils now so no need to look for them in NODEV checks.
Con Kolivas e692cd08 2013-11-05T13:55:06 Do not double up with checking for end of timeout measurements in usb read/write.
Con Kolivas 8f6acad8 2013-11-04T12:01:58 Use no cancel transfer functions on windows in callback_wait
Angus Gratton f066ca68 2013-11-05T10:19:11 Merge branch 'master' of github.com:ckolivas/cgminer into new_protocol Conflicts: configure.ac miner.h usbutils.c usbutils.h
Con Kolivas f4cf0939 2013-11-05T08:36:54 Add a wr_trylock wrapper for pthread rw lock write trylock.
Con Kolivas 251e1a98 2013-11-05T08:20:04 Give AMU a much longer timeout on windows than other icarus devices.
Con Kolivas 8b38d7fe 2013-11-04T16:53:03 Use WRITEIOERR macro check for all usb writes.
Con Kolivas 8fb7a0d1 2013-11-04T08:45:09 Always use a usb read buffer instead of having to explicitly enable it.
Con Kolivas 310aa754 2013-11-03T21:59:34 Discriminate between libusb transfer errors and regular libusb errors and make sure to capture them all.
Con Kolivas d1683fe6 2013-11-03T21:01:50 Always read a full sized transfer for bulk reads.
Con Kolivas fc80e2fe 2013-11-03T20:31:04 Deprecate preferred packet size functions in usbutils since they're unhelpful.
Con Kolivas ea122100 2013-11-03T20:24:34 Why are we reading extra again in usb read when buffering is enabled? Don't do that.
Con Kolivas 38d9c24e 2013-11-03T20:16:45 Copy known transferred amount back to buffer for usb reads instead of requested length.
Con Kolivas b5dfb8f0 2013-11-03T20:15:41 Ignore preferred packet size.
Con Kolivas 0cceaccf 2013-11-03T19:49:00 Treat timeout errors on usb writes as IO errors.
Con Kolivas dfba30b9 2013-11-03T19:41:56 Ignore iManufacturer from bitfury devices to support bluefury as well as redfury.
Con Kolivas 95797821 2013-11-03T19:15:32 Add more debugging info for when usb details don't match.
Con Kolivas 73f6a570 2013-11-03T09:25:28 Look for timeout overruns in usb read/write.
Con Kolivas ccb74239 2013-11-03T09:23:45 Use an int for usb_read/write to identify overruns.
Con Kolivas 1f227462 2013-11-03T09:04:15 Use the callback timeout as a safety mechanism only on windows.
Con Kolivas 4c0b6438 2013-11-02T12:29:08 Instead of using complicated sleeps to emulate characters per second on usb writes, submit only as many characters as can be transferred per usb poll of 1ms, and use timeouts in bulk transfers, cancelling transfers only as a failsafe.
Con Kolivas efc605ff 2013-11-03T19:41:56 Ignore iManufacturer from bitfury devices to support bluefury as well as redfury.
Con Kolivas ef0b7d3b 2013-11-03T19:15:32 Add more debugging info for when usb details don't match.
Con Kolivas 5c9f3036 2013-10-29T22:25:05 Merge branch 'master' into hashfast
Kano 5bd1b560 2013-10-28T07:41:15 usbutils - usb_nodev() allow a driver to drop a device
Con Kolivas a821df6a 2013-10-27T13:41:50 Correctly calculate sleep_estimate in usbutils that may have been preventing usecps from working.
Con Kolivas 4940b719 2013-10-26T22:12:34 Merge branch 'master' into hashfast