⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 paride.txt

📁 嵌入式系统设计与实例开发实验教材二源码 多线程应用程序设计 串行端口程序设计 AD接口实验 CAN总线通信实验 GPS通信实验 Linux内核移植与编译实验 IC卡读写实验 SD驱动使
💻 TXT
📖 第 1 页 / 共 2 页
字号:
individual co-ordinates when you load the driver.For example, if you had two no-name CD-ROM drives both using theKingByte KBIC-951A adapter, one on port 0x378 and the other on 0x3bcyou could give the following command:	# insmod pcd drive0=0x378,1 drive1=0x3bc,1For most adapters, giving a port address and protocol number is sufficient,but check the source files in linux/drivers/block/paride for more information.  (Hopefully someone will write some man pages one day !).As another example, here's what happens when PARPORT is installed, anda SyQuest EZ-135 is attached to port 0x378:	# insmod paride	paride: version 1.0 installed	# insmod epat	paride: epat registered as protocol 0	# insmod pd	pd: pd version 1.0, major 45, cluster 64, nice 0	pda: Sharing parport1 at 0x378	pda: epat 1.0, Shuttle EPAT chip c3 at 0x378, mode 5 (EPP-32), delay 1	pda: SyQuest EZ135A, 262144 blocks [128M], (512/16/32), removable media	 pda: pda1Note that the last line is the output from the generic partition tablescanner - in this case it reports that it has found a disk with one partition.2.3  Using a PARIDE deviceOnce the drivers have been loaded, you can access PARIDE devices in thesame way as their traditional counterparts.  You will probably need tocreate the device "special files".  Here is a simple script that you cancut to a file and execute:#!/bin/bash## mkd -- a script to create the device special files for the PARIDE subsystem#function mkdev {  mknod $1 $2 $3 $4 ; chmod 0660 $1 ; chown root:disk $1}#function pd {  D=$( printf \\$( printf "x%03x" $[ $1 + 97 ] ) )  mkdev pd$D b 45 $[ $1 * 16 ]  for P in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  do mkdev pd$D$P b 45 $[ $1 * 16 + $P ]  done}#cd /dev#for u in 0 1 2 3 ; do pd $u ; donefor u in 0 1 2 3 ; do mkdev pcd$u b 46 $u ; done for u in 0 1 2 3 ; do mkdev pf$u  b 47 $u ; done for u in 0 1 2 3 ; do mkdev pt$u  c 96 $u ; done for u in 0 1 2 3 ; do mkdev npt$u c 96 $[ $u + 128 ] ; done for u in 0 1 2 3 ; do mkdev pg$u  c 97 $u ; done ## end of mkdWith the device files and drivers in place, you can access PARIDE deviceslike any other Linux device.   For example, to mount a CD-ROM in pcd0, use:	mount /dev/pcd0 /cdromIf you have a fresh Avatar Shark cartridge, and the drive is pda, youmight do something like:	fdisk /dev/pda		-- make a new partition table with				   partition 1 of type 83	mke2fs /dev/pda1	-- to build the file system	mkdir /shark		-- make a place to mount the disk	mount /dev/pda1 /sharkDevices like the Imation superdisk work in the same way, except thatthey do not have a partition table.  For example to make a 120MBfloppy that you could share with a DOS system:	mkdosfs /dev/pf0	mount /dev/pf0 /mnt2.4  The pf driverThe pf driver is intended for use with parallel port ATAPI diskdevices.  The most common devices in this category are PD drivesand LS-120 drives.  Traditionally, media for these devices are notpartitioned.  Consequently, the pf driver does not support partitionedmedia.  This may be changed in a future version of the driver. 2.5  Using the pt driverThe pt driver for parallel port ATAPI tape drives is a minimal driver.It does not yet support many of the standard tape ioctl operations. For best performance, a block size of 32KB should be used.  You willprobably want to set the parallel port delay to 0, if you can.2.6  Using the pg driverThe pg driver can be used in conjunction with the cdrecord programto create CD-ROMs.  Please get cdrecord version 1.6.1 or laterfrom ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ .  To record CD-R media your parallel port should ideally be set to EPP mode, and the "port delay" should be set to 0.  With those settings it is possible to record at 2x speed without any buffer underruns.  If you cannot get the driver to workin EPP mode, try to use "bidirectional" or "PS/2" mode and 1x speeds only.3. Troubleshooting3.1  Use EPP mode if you canThe most common problems that people report with the PARIDE driversconcern the parallel port CMOS settings.  At this time, none of thePARIDE protocol modules support ECP mode, or any ECP combination modes.If you are able to do so, please set your parallel port into EPP modeusing your CMOS setup procedure.3.2  Check the port delaySome parallel ports cannot reliably transfer data at full speed.  Tooffset the errors, the PARIDE protocol modules introduce a "portdelay" between each access to the i/o ports.  Each protocol setsa default value for this delay.  In most cases, the user can overridethe default and set it to 0 - resulting in somewhat higher transferrates.  In some rare cases (especially with older 486 systems) thedefault delays are not long enough.  if you experience corrupt datatransfers, or unexpected failures, you may wish to increase theport delay.   The delay can be programmed using the "driveN" parametersto each of the high-level drivers.  Please see the notes above, orread the comments at the beginning of the driver source files inlinux/drivers/block/paride.3.3  Some drives need a printer resetThere appear to be a number of "noname" external drives on the marketthat do not always power up correctly.  We have noticed this with somedrives based on OnSpec and older Freecom adapters.  In these rare cases,the adapter can often be reinitialised by issuing a "printer reset" onthe parallel port.  As the reset operation is potentially disruptive in multiple device environments, the PARIDE drivers will not do it automatically.  You can however, force a printer reset by doing:	insmod lp reset=1	rmmod lpIf you have one of these marginal cases, you should probably buildyour paride drivers as modules, and arrange to do the printer resetbefore loading the PARIDE drivers. 3.4  Use the verbose option and dmesg if you need helpWhile a lot of testing has gone into these drivers to make them workas smoothly as possible, problems will arise.  If you do have problems,please check all the obvious things first:  does the drive work inDOS with the manufacturer's drivers ?  If that doesn't yield any usefulclues, then please make sure that only one drive is hooked to your system,and that either (a) PARPORT is enabled or (b) no other device driveris using your parallel port (check in /proc/ioports).  Then, load theappropriate drivers (you can load several protocol modules if you want)as in:	# insmod paride	# insmod epat	# insmod bpck	# insmod kbic	...	# insmod pd verbose=1(using the correct driver for the type of device you have, of course).The verbose=1 parameter will cause the drivers to log a trace of theiractivity as they attempt to locate your drive.Use 'dmesg' to capture a log of all the PARIDE messages (any messagesbeginning with paride:, a protocol module's name or a driver's name) andinclude that with your bug report.  You can submit a bug report in oneof two ways.  Either send it directly to the author of the PARIDE suite,by e-mail to grant@torque.net, or join the linux-parport mailing listand post your report there.3.5  For more information or helpYou can join the linux-parport mailing list by sending a mail messageto 		linux-parport-request@torque.netwith the single word 		subscribein the body of the mail message (not in the subject line).   Please besure that your mail program is correctly set up when you do this,  asthe list manager is a robot that will subscribe you using the replyaddress in your mail headers.  REMOVE any anti-spam gimmicks you mayhave in your mail headers, when sending mail to the list server.You might also find some useful information on the linux-parportweb pages (although they are not always up to date) at	http://www.torque.net/parport/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -