diff --git a/ChangeLog b/ChangeLog index 3fcf847ab..069b11fe3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-09-18 m. allan noah + + * backend/fujitsu.[ch], backend/fujitsu-scsi.h: update to v1.0.43, + add model-specific code to init_vpd for M3099, clean some noise + * doc/descriptions/fujitsu.desc: + version number update + 2006-09-18 Stephane Voltz * backend/umax_pp.c backend/umax_pp_mid.c backend/umax_pp.c_low: @@ -23,7 +30,6 @@ * doc/descriptions/fujitsu.desc: version number update - 2006-08-29 Gerhard Jaeger * doc/plustek/Plustek-PARPORT.changes: update. @@ -44,7 +50,7 @@ 2006-08-28 Stephane Voltz * backend/genesys_gl646.c: changes in gl646_init_regs_for_warmup - to add support for HP2400 model. + to add support for HP2400 model. 2006-08-27 Wittawat Yamwong diff --git a/backend/fujitsu-scsi.h b/backend/fujitsu-scsi.h index f65d58505..812e3bfd0 100644 --- a/backend/fujitsu-scsi.h +++ b/backend/fujitsu-scsi.h @@ -153,7 +153,6 @@ static scsiblk inquiryB = { inquiryC, sizeof (inquiryC) }; #define IN_periph_devtype_unknown 0x1f #define get_IN_response_format(in) getbitfield(in + 0x03, 0x07, 0) #define IN_recognized 0x02 -#define get_IN_additional_length(in) in[0x04] #define get_IN_vendor(in, buf) strncpy(buf, (char *)in + 0x08, 0x08) #define get_IN_product(in, buf) strncpy(buf, (char *)in + 0x10, 0x010) #define get_IN_version(in, buf) strncpy(buf, (char *)in + 0x20, 0x04) @@ -171,7 +170,7 @@ static scsiblk inquiryB = { inquiryC, sizeof (inquiryC) }; #define get_IN_duplex_offset(in) getnbyte (in+0x2E, 2) /* the VPD response */ -#define get_IN_page_length(in) getnbyte(in + 0x04, 1) +#define get_IN_page_length(in) in[0x04] #define get_IN_basic_x_res(in) getnbyte(in + 0x05, 2) #define get_IN_basic_y_res(in) getnbyte(in + 0x07, 2) #define get_IN_step_x_res(in) getbitfield(in+0x09, 1, 0) @@ -268,6 +267,8 @@ static scsiblk inquiryB = { inquiryC, sizeof (inquiryC) }; #define get_IN_x_overscan_size(in) getnbyte(in + 0x64, 2) #define get_IN_y_overscan_size(in) getnbyte(in + 0x66, 2) +/* = some scanners need inquiry data manipulated ====================== */ +#define set_IN_page_length(in,val) in[0x04]=val /* ==================================================================== */ static unsigned char test_unit_readyC[] = diff --git a/backend/fujitsu.c b/backend/fujitsu.c index f2ebc805e..6badbcb3c 100644 --- a/backend/fujitsu.c +++ b/backend/fujitsu.c @@ -235,6 +235,8 @@ - fix bug in MS buffer/prepick scsi data block V 1.0.42 2006-08-31, MAN - fix bug in get_hardware_status (#303798) + V 1.0.43 2006-09-19, MAN + - add model-specific code to init_vpd for M3099 SANE FLOW DIAGRAM @@ -295,7 +297,7 @@ #include "fujitsu.h" #define DEBUG 1 -#define BUILD 42 +#define BUILD 43 /* values for SANE_DEBUG_FUJITSU env var: - errors 5 @@ -872,12 +874,28 @@ init_vpd (struct fujitsu *s) buffer, &inLen ); + /* M3099 gives all data, but wrong length */ + if (strstr (s->product_name, "M3099") + && (ret == SANE_STATUS_GOOD || ret == SANE_STATUS_EOF) + && get_IN_page_length (buffer) == 0x19){ + DBG (5, "init_vpd: 3099 repair\n"); + set_IN_page_length(buffer,0x5f); + } + + /* some(all?) versions of 3097 dont have vpd? + else if (strstr (s->product_name, "M3097") + && (ret == SANE_STATUS_GOOD || ret == SANE_STATUS_EOF) + && get_IN_page_length (buffer) == 0x19){ + DBG (5, "init_vpd: 3097 repair\n"); + memcpy(buffer+0x19,buff_VPD_M3097.cmd,buff_VPD_M3097.size); + }*/ + + DBG (5, "init_vpd: length=%0x\n",get_IN_page_length (buffer)); + /* This scanner supports vital product data. * Use this data to set dpi-lists etc. */ if (ret == SANE_STATUS_GOOD || ret == SANE_STATUS_EOF) { - DBG (15, "length=%0x\n",get_IN_page_length (buffer)); - DBG (15, "standard options\n"); s->basic_x_res = get_IN_basic_x_res (buffer); @@ -4824,7 +4842,7 @@ sense_handler (int fd, unsigned char * sensed_data, void *arg) unsigned int eom = get_RS_EOM (sensed_data); unsigned int ili = get_RS_ILI (sensed_data); unsigned int info = get_RS_information (sensed_data); - struct fujitsu * s = arg; + arg = arg; DBG (5, "sense_handler: start\n"); diff --git a/backend/fujitsu.h b/backend/fujitsu.h index 37542c789..089471bd9 100644 --- a/backend/fujitsu.h +++ b/backend/fujitsu.h @@ -360,7 +360,6 @@ struct fujitsu /* --------------------------------------------------------------------- */ /* values which used by the command and data sending functions (scsi/usb)*/ int fd; /* The scanner device file descriptor. */ - /*unsigned char rs_buffer[RS_return_size];*/ size_t datLen; /* --------------------------------------------------------------------- */ diff --git a/doc/descriptions/fujitsu.desc b/doc/descriptions/fujitsu.desc index 6969107a3..7b81956ae 100644 --- a/doc/descriptions/fujitsu.desc +++ b/doc/descriptions/fujitsu.desc @@ -11,7 +11,7 @@ :backend "fujitsu" ; name of backend :url "http://www2.pfeiffer.edu/~anoah/fujitsu/" -:version "1.0.42" ; version of backend +:version "1.0.43" ; version of backend :manpage "sane-fujitsu" ; name of manpage (if it exists) :comment "Backend re-written for SANE release 1.0.18, see sane-fujitsu manpage" :devicetype :scanner ; start of a list of devices....