kopia lustrzana https://gitlab.com/sane-project/backends
Detect GL660+GL646 on USB2 also. Fixed Mustek MA1017 scanner freeze problem.
rodzic
1cb426ee47
commit
04e08cc9ef
|
@ -1,3 +1,8 @@
|
||||||
|
2004-05-23 Henning Meier-Geinitz <henning@meier-geinitz.de>
|
||||||
|
|
||||||
|
* tools/check-usb-scanner.c: Detect GL660+GL646 on USB2 also.
|
||||||
|
Fixed Mustek MA1017 scanner freeze problem.
|
||||||
|
|
||||||
2004-05-21 Gerhard Jaeger <gerhard@gjaeger.de>
|
2004-05-21 Gerhard Jaeger <gerhard@gjaeger.de>
|
||||||
|
|
||||||
* sanei/sanei_pp.c: fixed compilation problem on HP-UX.
|
* sanei/sanei_pp.c: fixed compilation problem on HP-UX.
|
||||||
|
|
|
@ -479,6 +479,10 @@ check_ma1017 (struct usb_device *dev)
|
||||||
finish_interface (handle);
|
finish_interface (handle);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
/* Read one byte again to work around a bug in the MA-1017 chipset that
|
||||||
|
appears when an odd number of bytes is read or written. */
|
||||||
|
result = usb_bulk_write (handle, 0x01, req, 2, 1000);
|
||||||
|
result = usb_bulk_read (handle, 0x82, &res, 1, 1000);
|
||||||
finish_interface (handle);
|
finish_interface (handle);
|
||||||
return "MA-1017";
|
return "MA-1017";
|
||||||
}
|
}
|
||||||
|
@ -1390,12 +1394,10 @@ check_gl660_gl646 (struct usb_device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((dev->config[0].interface[0].altsetting[0].endpoint[0].
|
if ((dev->config[0].interface[0].altsetting[0].endpoint[0].bEndpointAddress != 0x81)
|
||||||
bEndpointAddress != 0x81)
|
|| (dev->config[0].interface[0].altsetting[0].endpoint[0].bmAttributes != 0x02)
|
||||||
|| (dev->config[0].interface[0].altsetting[0].endpoint[0].
|
|| ((dev->config[0].interface[0].altsetting[0].endpoint[0].wMaxPacketSize != 0x40) &&
|
||||||
bmAttributes != 0x02)
|
(dev->config[0].interface[0].altsetting[0].endpoint[0].wMaxPacketSize != 0x200))
|
||||||
|| (dev->config[0].interface[0].altsetting[0].endpoint[0].
|
|
||||||
wMaxPacketSize != 0x40)
|
|
||||||
|| (dev->config[0].interface[0].altsetting[0].endpoint[0].bInterval !=
|
|| (dev->config[0].interface[0].altsetting[0].endpoint[0].bInterval !=
|
||||||
0x0))
|
0x0))
|
||||||
{
|
{
|
||||||
|
@ -1403,21 +1405,17 @@ check_gl660_gl646 (struct usb_device *dev)
|
||||||
printf
|
printf
|
||||||
(" this is not a GL660+GL646 (bEndpointAddress = 0x%x, bmAttributes = 0x%x, "
|
(" this is not a GL660+GL646 (bEndpointAddress = 0x%x, bmAttributes = 0x%x, "
|
||||||
"wMaxPacketSize = 0x%x, bInterval = 0x%x)\n",
|
"wMaxPacketSize = 0x%x, bInterval = 0x%x)\n",
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[0].
|
dev->config[0].interface[0].altsetting[0].endpoint[0].bEndpointAddress,
|
||||||
bEndpointAddress,
|
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[0].bmAttributes,
|
dev->config[0].interface[0].altsetting[0].endpoint[0].bmAttributes,
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[0].
|
dev->config[0].interface[0].altsetting[0].endpoint[0].wMaxPacketSize,
|
||||||
wMaxPacketSize,
|
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[0].bInterval);
|
dev->config[0].interface[0].altsetting[0].endpoint[0].bInterval);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((dev->config[0].interface[0].altsetting[0].endpoint[1].
|
if ((dev->config[0].interface[0].altsetting[0].endpoint[1].bEndpointAddress != 0x02)
|
||||||
bEndpointAddress != 0x02)
|
|| (dev->config[0].interface[0].altsetting[0].endpoint[1].bmAttributes != 0x02)
|
||||||
|| (dev->config[0].interface[0].altsetting[0].endpoint[1].
|
|| ((dev->config[0].interface[0].altsetting[0].endpoint[1].wMaxPacketSize != 0x40) &&
|
||||||
bmAttributes != 0x02)
|
(dev->config[0].interface[0].altsetting[0].endpoint[0].wMaxPacketSize != 0x200))
|
||||||
|| (dev->config[0].interface[0].altsetting[0].endpoint[1].
|
|
||||||
wMaxPacketSize != 0x40)
|
|
||||||
|| (dev->config[0].interface[0].altsetting[0].endpoint[1].bInterval !=
|
|| (dev->config[0].interface[0].altsetting[0].endpoint[1].bInterval !=
|
||||||
0))
|
0))
|
||||||
{
|
{
|
||||||
|
@ -1425,21 +1423,17 @@ check_gl660_gl646 (struct usb_device *dev)
|
||||||
printf
|
printf
|
||||||
(" this is not a GL660+GL646 (bEndpointAddress = 0x%x, bmAttributes = 0x%x, "
|
(" this is not a GL660+GL646 (bEndpointAddress = 0x%x, bmAttributes = 0x%x, "
|
||||||
"wMaxPacketSize = 0x%x, bInterval = 0x%x)\n",
|
"wMaxPacketSize = 0x%x, bInterval = 0x%x)\n",
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[1].
|
dev->config[0].interface[0].altsetting[0].endpoint[1].bEndpointAddress,
|
||||||
bEndpointAddress,
|
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[1].bmAttributes,
|
dev->config[0].interface[0].altsetting[0].endpoint[1].bmAttributes,
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[1].
|
dev->config[0].interface[0].altsetting[0].endpoint[1].wMaxPacketSize,
|
||||||
wMaxPacketSize,
|
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[1].bInterval);
|
dev->config[0].interface[0].altsetting[0].endpoint[1].bInterval);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((dev->config[0].interface[0].altsetting[0].endpoint[2].
|
if ((dev->config[0].interface[0].altsetting[0].endpoint[2].bEndpointAddress != 0x83)
|
||||||
bEndpointAddress != 0x83)
|
|| (dev->config[0].interface[0].altsetting[0].endpoint[2].bmAttributes != 0x03)
|
||||||
|| (dev->config[0].interface[0].altsetting[0].endpoint[2].
|
|| ((dev->config[0].interface[0].altsetting[0].endpoint[2].wMaxPacketSize != 0x1) &&
|
||||||
bmAttributes != 0x03)
|
(dev->config[0].interface[0].altsetting[0].endpoint[0].wMaxPacketSize != 0x200))
|
||||||
|| (dev->config[0].interface[0].altsetting[0].endpoint[2].
|
|
||||||
wMaxPacketSize != 0x1)
|
|
||||||
|| (dev->config[0].interface[0].altsetting[0].endpoint[2].bInterval !=
|
|| (dev->config[0].interface[0].altsetting[0].endpoint[2].bInterval !=
|
||||||
8))
|
8))
|
||||||
{
|
{
|
||||||
|
@ -1447,11 +1441,9 @@ check_gl660_gl646 (struct usb_device *dev)
|
||||||
printf
|
printf
|
||||||
(" this is not a GL660+GL646 (bEndpointAddress = 0x%x, bmAttributes = 0x%x, "
|
(" this is not a GL660+GL646 (bEndpointAddress = 0x%x, bmAttributes = 0x%x, "
|
||||||
"wMaxPacketSize = 0x%x, bInterval = 0x%x)\n",
|
"wMaxPacketSize = 0x%x, bInterval = 0x%x)\n",
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[2].
|
dev->config[0].interface[0].altsetting[0].endpoint[2].bEndpointAddress,
|
||||||
bEndpointAddress,
|
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[2].bmAttributes,
|
dev->config[0].interface[0].altsetting[0].endpoint[2].bmAttributes,
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[2].
|
dev->config[0].interface[0].altsetting[0].endpoint[2].wMaxPacketSize,
|
||||||
wMaxPacketSize,
|
|
||||||
dev->config[0].interface[0].altsetting[0].endpoint[2].bInterval);
|
dev->config[0].interface[0].altsetting[0].endpoint[2].bInterval);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue