Commit 0601f361cc40569ab799bafacb0bd8e8d14a509c

Con Kolivas 2013-03-02T21:23:01

Merge pull request #392 from kanoi/main USB linux rules for libusb to give privs to non-root users + FPGA-README Zadig hints + ZTX bug set missing drv_id

diff --git a/FPGA-README b/FPGA-README
index b14b076..4dfed2a 100644
--- a/FPGA-README
+++ b/FPGA-README
@@ -21,11 +21,32 @@ The best solution for this is to use a tool called Zadig to set the driver:
 This allows you set the driver for the device to be WinUSB which is usually
 required to make it work if you're having problems
 
+With Zaidg, you may need to run it as administrator and if your device is
+plugged in but you cannot see it, use the Menu: Options -> List All Devices
+
 You must also make sure you are using the latest libusb-1.0.dll supplied
 with cgminer (not the libusbx version)
 
 -
 
+When mining on linux, but not using 'sudo' and not logged into 'root' you
+may get a USB priviledge error (-3), so you may also need to do the following:
+
+Create /etc/udev/rules.d/01-cgminer.rules
+With:
+ ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+ ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0003", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+
+And also:
+ sudo usermod -G plugdev -a `whoami`
+
+Then reboot ...
+
+If your linux distro doesn't have the 'plugdev' group, you can create it like:
+ sudo groupadd plugdev
+
+-
+
 There is a hidden option in cgminer to dump out a lot of information
 about USB that will help the developers to assist you if you are having
 problems:
diff --git a/driver-ztex.c b/driver-ztex.c
index 27b8c26..13b70be 100644
--- a/driver-ztex.c
+++ b/driver-ztex.c
@@ -398,6 +398,7 @@ static void ztex_disable(struct thr_info *thr)
 }
 
 struct device_drv ztex_drv = {
+	.drv_id = DRIVER_ZTEX,
 	.dname = "ztex",
 	.name = "ZTX",
 	.drv_detect = ztex_detect,