X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/blobdiff_plain/28e7c3682ecc8082cd0b96c632860320be5cc71b..54fc45085ee9d68eb1f30e286e604f572b77ffee:/usb-driver.c diff --git a/usb-driver.c b/usb-driver.c index 33268f0..209e155 100644 --- a/usb-driver.c +++ b/usb-driver.c @@ -307,8 +307,14 @@ int pp_transfer(WD_TRANSFER *tr, int fd, unsigned int request, unsigned char *wd ret = -1; break; } + } else if ((port == ecpbase + PP_ECP_CFGA) && ecpbase) { + DPRINTF("ECP_CFGA port\n"); + } else if ((port == ecpbase + PP_ECP_CFGB) && ecpbase) { + DPRINTF("ECP_CFGB port\n"); + } else if ((port == ecpbase + PP_ECP_ECR) && ecpbase) { + DPRINTF("ECP_ECR port\n"); } else { - DPRINTF("access to unsupported address range (probably ECP)!\n"); + DPRINTF("access to unsupported address range!\n"); ret = 0; } @@ -390,9 +396,9 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) { if (ioctl(parportfd, PPNEGOT, &pmode) == -1) return ret; - if (cr->Card.dwItems > 1 && cr->Card.Item[1].I.IO.dwBytes) { + if (cr->Card.dwItems > 1 && cr->Card.Item[1].I.IO.dwAddr) { DPRINTF("ECP mode requested\n"); - ecpbase = cr->Card.Item[1].I.IO.dwBytes; + ecpbase = (unsigned long)cr->Card.Item[1].I.IO.dwAddr; /* TODO: Implement ECP mode */ #if 0 pmode = IEEE1284_MODE_ECP;