kopia lustrzana https://gitlab.com/sane-project/backends
Bugfix for firmware download by Paul Smedley
rodzic
3a78258ac5
commit
00e6616499
|
@ -1,3 +1,8 @@
|
||||||
|
2006-08-31 Oliver Schwartz <oliverschwartz@users.sf.net>
|
||||||
|
|
||||||
|
* backend/snapscan-scsi.c: Bugfix for firmware download
|
||||||
|
from Paul Smedley
|
||||||
|
|
||||||
2006-08-31 m. allan noah <anoah AT pfeiffer DOT edu>
|
2006-08-31 m. allan noah <anoah AT pfeiffer DOT edu>
|
||||||
|
|
||||||
* backend/fujitsu.c: update to v1.0.42,
|
* backend/fujitsu.c: update to v1.0.42,
|
||||||
|
|
|
@ -1447,7 +1447,7 @@ static SANE_Status download_firmware(SnapScan_Scanner * pss)
|
||||||
{
|
{
|
||||||
cdbLength = 10;
|
cdbLength = 10;
|
||||||
DBG(DL_INFO, "Downloading %s\n", firmware);
|
DBG(DL_INFO, "Downloading %s\n", firmware);
|
||||||
fd = fopen(firmware,"r");
|
fd = fopen(firmware,"rb");
|
||||||
if(fd == NULL)
|
if(fd == NULL)
|
||||||
{
|
{
|
||||||
DBG (0, "Cannot open firmware file %s.\n", firmware);
|
DBG (0, "Cannot open firmware file %s.\n", firmware);
|
||||||
|
@ -1533,6 +1533,9 @@ static SANE_Status download_firmware(SnapScan_Scanner * pss)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.58 2006/09/03 10:00:11 oliver-guest
|
||||||
|
* Bugfix for firmware download by Paul Smedley
|
||||||
|
*
|
||||||
* Revision 1.57 2006/03/20 18:20:10 oliver-guest
|
* Revision 1.57 2006/03/20 18:20:10 oliver-guest
|
||||||
* Limit inquiry length to 120 bytes if firmware is not yet loaded
|
* Limit inquiry length to 120 bytes if firmware is not yet loaded
|
||||||
*
|
*
|
||||||
|
|
|
@ -966,8 +966,15 @@ SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pss->pdev->bus == USB)
|
||||||
|
{
|
||||||
|
if (sanei_usb_get_vendor_product(pss->fd, &pss->usb_vendor, &pss->usb_product) != SANE_STATUS_GOOD)
|
||||||
|
{
|
||||||
|
pss->usb_vendor = 0;
|
||||||
|
pss->usb_product = 0;
|
||||||
|
}
|
||||||
/* Download Firmware for USB scanners */
|
/* Download Firmware for USB scanners */
|
||||||
if ( (pss->pdev->bus == USB) && (pss->hwst & 0x02) )
|
if (pss->hwst & 0x02)
|
||||||
{
|
{
|
||||||
char vendor[8];
|
char vendor[8];
|
||||||
char model[17];
|
char model[17];
|
||||||
|
@ -997,6 +1004,7 @@ SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h)
|
||||||
status = inquiry (pss);
|
status = inquiry (pss);
|
||||||
CHECK_STATUS (status, me, "inquiry after firmware upload");
|
CHECK_STATUS (status, me, "inquiry after firmware upload");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
close_scanner(pss);
|
close_scanner(pss);
|
||||||
|
|
||||||
status = alloc_gamma_tables (pss);
|
status = alloc_gamma_tables (pss);
|
||||||
|
@ -1655,9 +1663,7 @@ SANE_Status sane_start (SANE_Handle h)
|
||||||
status = download_halftone_matrices(pss);
|
status = download_halftone_matrices(pss);
|
||||||
CHECK_STATUS (status, me, "download_halftone_matrices");
|
CHECK_STATUS (status, me, "download_halftone_matrices");
|
||||||
|
|
||||||
if (pss->val[OPT_QUALITY_CAL].b &&
|
if (pss->val[OPT_QUALITY_CAL].b && (pss->usb_vendor == USB_VENDOR_EPSON))
|
||||||
((pss->pdev->model == PERFECTION2480) ||
|
|
||||||
(pss->pdev->model == PERFECTION3490)))
|
|
||||||
{
|
{
|
||||||
status = calibrate(pss);
|
status = calibrate(pss);
|
||||||
if (status != SANE_STATUS_GOOD)
|
if (status != SANE_STATUS_GOOD)
|
||||||
|
@ -1688,9 +1694,7 @@ SANE_Status sane_start (SANE_Handle h)
|
||||||
pss->bytes_per_line/pss->ms_per_line);
|
pss->bytes_per_line/pss->ms_per_line);
|
||||||
|
|
||||||
|
|
||||||
if (pss->val[OPT_QUALITY_CAL].b &&
|
if (pss->val[OPT_QUALITY_CAL].b && (pss->usb_vendor != USB_VENDOR_EPSON))
|
||||||
((pss->pdev->model != PERFECTION2480) &&
|
|
||||||
(pss->pdev->model != PERFECTION3490)))
|
|
||||||
{
|
{
|
||||||
status = calibrate(pss);
|
status = calibrate(pss);
|
||||||
if (status != SANE_STATUS_GOOD)
|
if (status != SANE_STATUS_GOOD)
|
||||||
|
@ -1930,6 +1934,9 @@ SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int * fd)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.68 2006/09/03 10:00:11 oliver-guest
|
||||||
|
* Bugfix for firmware download by Paul Smedley
|
||||||
|
*
|
||||||
* Revision 1.67 2006/01/10 19:32:16 oliver-guest
|
* Revision 1.67 2006/01/10 19:32:16 oliver-guest
|
||||||
* Added 12 bit gamma tables for Epson Stylus CX-1500
|
* Added 12 bit gamma tables for Epson Stylus CX-1500
|
||||||
*
|
*
|
||||||
|
|
Ładowanie…
Reference in New Issue