always set ecpbase correctly.
authormichael <michael>
Thu, 15 Mar 2007 08:29:53 +0000 (08:29 +0000)
committermichael <michael>
Thu, 15 Mar 2007 08:29:53 +0000 (08:29 +0000)
usb-driver.c

index 7523c1360eeba5c0f94212faa2d93b321f5968ad..1c5b18b2d8f4b3ae3b29f116b8729f73bda1865f 100644 (file)
@@ -360,6 +360,7 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
                                        if (ioctl(parportfd, PPCLAIM) == -1)
                                                return ret;
 
+                                       ecpbase = 0;
                                        pmode = IEEE1284_MODE_COMPAT;
                                        if (ioctl(parportfd, PPNEGOT, &pmode) == -1)
                                                return ret;
@@ -372,6 +373,7 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
                                                pmode = IEEE1284_MODE_ECP;
 
                                                if (ioctl(parportfd, PPNEGOT, &pmode) == -1) {
+                                                       ecpbase = 0;
                                                        pmode = IEEE1284_MODE_COMPAT;
                                                        if (ioctl(parportfd, PPNEGOT, &pmode) == -1)
                                                                return ret;
Impressum, Datenschutz