kopia lustrzana https://gitlab.com/sane-project/website
				
				
				
			
		
			
	
	
		
			123 wiersze
		
	
	
		
			4.6 KiB
		
	
	
	
		
			HTML
		
	
	
		
		
			
		
	
	
			123 wiersze
		
	
	
		
			4.6 KiB
		
	
	
	
		
			HTML
		
	
	
| 
								 | 
							
								<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
							 | 
						||
| 
								 | 
							
								                      "http://www.w3.org/TR/REC-html40/loose.dtd">
							 | 
						||
| 
								 | 
							
								<HTML>
							 | 
						||
| 
								 | 
							
								<HEAD>
							 | 
						||
| 
								 | 
							
								<TITLE>sane-devel: umax_pp_low: ppdev</TITLE>
							 | 
						||
| 
								 | 
							
								<META NAME="Author" CONTENT="Tim Waugh (twaugh@redhat.com)">
							 | 
						||
| 
								 | 
							
								<META NAME="Subject" CONTENT="umax_pp_low: ppdev">
							 | 
						||
| 
								 | 
							
								</HEAD>
							 | 
						||
| 
								 | 
							
								<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
							 | 
						||
| 
								 | 
							
								<H1>umax_pp_low: ppdev</H1>
							 | 
						||
| 
								 | 
							
								<!-- received="Wed Jun  6 01:38:14 2001" -->
							 | 
						||
| 
								 | 
							
								<!-- isoreceived="20010606083814" -->
							 | 
						||
| 
								 | 
							
								<!-- sent="Wed, 6 Jun 2001 09:41:46 +0100" -->
							 | 
						||
| 
								 | 
							
								<!-- isosent="20010606084146" -->
							 | 
						||
| 
								 | 
							
								<!-- name="Tim Waugh" -->
							 | 
						||
| 
								 | 
							
								<!-- email="twaugh@redhat.com" -->
							 | 
						||
| 
								 | 
							
								<!-- subject="umax_pp_low: ppdev" -->
							 | 
						||
| 
								 | 
							
								<!-- id="20010606094146.E26782@redhat.com" -->
							 | 
						||
| 
								 | 
							
								<STRONG>From:</STRONG> Tim Waugh (<A HREF="mailto:twaugh@redhat.com?Subject=Re:%20umax_pp_low:%20ppdev&In-Reply-To=<20010606094146.E26782@redhat.com>"><EM>twaugh@redhat.com</EM></A>)<BR>
							 | 
						||
| 
								 | 
							
								<STRONG>Date:</STRONG> Wed Jun 06 2001 - 01:41:46 PDT
							 | 
						||
| 
								 | 
							
								<P>
							 | 
						||
| 
								 | 
							
								<!-- next="start" -->
							 | 
						||
| 
								 | 
							
								<LI><STRONG>Next message:</STRONG> <A HREF="0100.html">Henning Meier-Geinitz: "Re: size of xcam (was Re: Compiling on OS/2)"</A>
							 | 
						||
| 
								 | 
							
								<UL>
							 | 
						||
| 
								 | 
							
								<LI><STRONG>Previous message:</STRONG> <A HREF="0098.html">Stefan Nilsen: "HP Scanjet 2200C (USB) - Any info?"</A>
							 | 
						||
| 
								 | 
							
								<!-- nextthread="start" -->
							 | 
						||
| 
								 | 
							
								<LI><STRONG>Next in thread:</STRONG> <A HREF="0110.html">stef: "Re: umax_pp_low: ppdev"</A>
							 | 
						||
| 
								 | 
							
								<LI><STRONG>Reply:</STRONG> <A HREF="0110.html">stef: "Re: umax_pp_low: ppdev"</A>
							 | 
						||
| 
								 | 
							
								<!-- reply="end" -->
							 | 
						||
| 
								 | 
							
								<LI><STRONG>Messages sorted by:</STRONG> 
							 | 
						||
| 
								 | 
							
								<A HREF="date.html#99">[ date ]</A>
							 | 
						||
| 
								 | 
							
								<A HREF="index.html#99">[ thread ]</A>
							 | 
						||
| 
								 | 
							
								<A HREF="subject.html#99">[ subject ]</A>
							 | 
						||
| 
								 | 
							
								<A HREF="author.html#99">[ author ]</A>
							 | 
						||
| 
								 | 
							
								</UL>
							 | 
						||
| 
								 | 
							
								<HR NOSHADE><P>
							 | 
						||
| 
								 | 
							
								<!-- body="start" -->
							 | 
						||
| 
								 | 
							
								<P>
							 | 
						||
| 
								 | 
							
								In umax_pp_low, the following code is wrong:
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								<P>          /* me check if parport is does ECP */
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								          mode = IEEE1284_MODE_ECP;
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								          if (ioctl (fd, PPSETMODE, &mode))
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								            {
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								              DBG (16, "umax_pp: port '%s' hasn't ECP\n", parport_name);
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								<P>That isn't checking what the port can do at all, but what the driver
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								will let you do.  The successful PPSETMODE just means that the next
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								write() you do will cause the driver to write the data out using ECP.
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								<P>The only circumstance under which it might fail really is that
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								<P>(a) the port doesn't have hardware ECP support, _AND_
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								(b) the kernel's IEEE 1284 implementation wasn't configured when you
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								    built it
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								<P>Then:
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								<P>          /* we try to set EPP 1.7 first */
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								          mode = IEEE1284_MODE_EPPSL;
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								          if (ioctl (fd, PPSETMODE, &mode))
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								<P>The comment is wrong.
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								<P>If you want to find out what the _hardware_ can do, you want to use
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								the PPGETMODES ioctl (and treat errors as 'not telling you').
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								<P>Tim.
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								*/
							 | 
						||
| 
								 | 
							
								<BR>
							 | 
						||
| 
								 | 
							
								<P>
							 | 
						||
| 
								 | 
							
								<BR><HR NOSHADE>
							 | 
						||
| 
								 | 
							
								<UL>
							 | 
						||
| 
								 | 
							
								<LI>application/pgp-signature attachment: <A HREF="att-0099/01-part">stored</A>
							 | 
						||
| 
								 | 
							
								</UL>
							 | 
						||
| 
								 | 
							
								<!-- attachment="01-part" -->
							 | 
						||
| 
								 | 
							
								<P><PRE>
							 | 
						||
| 
								 | 
							
								--
							 | 
						||
| 
								 | 
							
								Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
							 | 
						||
| 
								 | 
							
								To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20umax_pp_low:%20ppdev&In-Reply-To=<20010606094146.E26782@redhat.com>">majordomo@mostang.com</A>
							 | 
						||
| 
								 | 
							
								</PRE>
							 | 
						||
| 
								 | 
							
								<P><!-- body="end" -->
							 | 
						||
| 
								 | 
							
								<HR NOSHADE>
							 | 
						||
| 
								 | 
							
								<UL>
							 | 
						||
| 
								 | 
							
								<!-- next="start" -->
							 | 
						||
| 
								 | 
							
								<LI><STRONG>Next message:</STRONG> <A HREF="0100.html">Henning Meier-Geinitz: "Re: size of xcam (was Re: Compiling on OS/2)"</A>
							 | 
						||
| 
								 | 
							
								<LI><STRONG>Previous message:</STRONG> <A HREF="0098.html">Stefan Nilsen: "HP Scanjet 2200C (USB) - Any info?"</A>
							 | 
						||
| 
								 | 
							
								<!-- nextthread="start" -->
							 | 
						||
| 
								 | 
							
								<LI><STRONG>Next in thread:</STRONG> <A HREF="0110.html">stef: "Re: umax_pp_low: ppdev"</A>
							 | 
						||
| 
								 | 
							
								<LI><STRONG>Reply:</STRONG> <A HREF="0110.html">stef: "Re: umax_pp_low: ppdev"</A>
							 | 
						||
| 
								 | 
							
								<!-- reply="end" -->
							 | 
						||
| 
								 | 
							
								<LI><STRONG>Messages sorted by:</STRONG> 
							 | 
						||
| 
								 | 
							
								<A HREF="date.html#99">[ date ]</A>
							 | 
						||
| 
								 | 
							
								<A HREF="index.html#99">[ thread ]</A>
							 | 
						||
| 
								 | 
							
								<A HREF="subject.html#99">[ subject ]</A>
							 | 
						||
| 
								 | 
							
								<A HREF="author.html#99">[ author ]</A>
							 | 
						||
| 
								 | 
							
								</UL>
							 | 
						||
| 
								 | 
							
								<!-- trailer="footer" -->
							 | 
						||
| 
								 | 
							
								<HR NOSHADE>
							 | 
						||
| 
								 | 
							
								<P>
							 | 
						||
| 
								 | 
							
								<SMALL>
							 | 
						||
| 
								 | 
							
								<EM>
							 | 
						||
| 
								 | 
							
								This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A> 
							 | 
						||
| 
								 | 
							
								: <EM>Wed Jun 06 2001 - 01:41:08 PDT</EM>
							 | 
						||
| 
								 | 
							
								</EM>
							 | 
						||
| 
								 | 
							
								</SMALL>
							 | 
						||
| 
								 | 
							
								</BODY>
							 | 
						||
| 
								 | 
							
								</HTML>
							 |