[PARPORT] Re: IOmega driver bug


Riley Williams (rhw@bigfoot.com)
Mon, 12 Jan 1998 03:25:36 +0000 (GMT)


Hi there.

>> Can I report what appears to be a problem with the latest
>> IOmega driver?

>> I was using the driver supplied with kernel 2.0.33 quite
>> happily, although it limited the transfer to the Parallel
>> ZipDrive to around 25k a second.

> Sounds like SPP mode.

>> I 'upgraded' to the latest drivers, PPA 1.40, and found that I
>> was getting all sorts of errors when mounting ZipDisks, with
>> no consistency between the messages from one mount to the
>> next, even for the same disk. I even managed to corrupt a
>> friend's ZipDisk when trying to mount it ReadOnly !!!

> *raise one eyebrow*

Precicely my opinion...

>> I have carried out some basic investigations regarding this,
>> and found that the problems occurred when my BIOS had the
>> parallel port set to EPP mode - the problems went away when I
>> changed the setting to ECP mode, and with that setting, I get
>> a transfer rate of around 110k a second.

> I sort of guessed it was an EPP problem as it occured when you
> upgraded to ppa-1.40. The old driver in the 2.0.x kernel does
> not support this.

> Actually in ECP mode, the ppa driver uses the PS/2 sub-mode
> (byte reads) with a hand tuned assembler code loop for maximum
> speed. (the assembler loop only applies for SPP and PS/2
> modes).

Although I have a lot of programming experience, virtually none of
it involved actual hardware programming so this is all new to me.
As a result, I'm definately interested in the above...

>> The above-mentioned friend is quite happily using the same
>> drivers (indeed, the same kernel - we transferred his kernel
>> image to my machine and rebooted under it with no change in
>> the situation), and gets no problems in EPP mode, which makes
>> me suspect there's more than one EPP chipset, and mine is one
>> the current driver doesn't handle correctly.

> See .sig below for my comments on parallel port chipsets.

Lemme see...

> Just when you thought you have seen every possible parallel
> port chipset there is, some manufacturer comes out with a new
> quirk. Just to make things worse, every mainboard manufacturer
> on the planet decides to use it.

Guess who agrees with you...

> A quick fix is to find the line in ppa.h where it does:

> ============================
> #ifndef CONFIG_SCSI_PPA_HAVE_PEDANTIC
> #define CONFIG_SCSI_PPA_HAVE_PEDANTIC 3
> #endif
> ============================

> and change it to

> ============================
> #undef CONFIG_SCSI_PPA_HAVE_PEDANTIC
> #define CONFIG_SCSI_PPA_HAVE_PEDANTIC 4
> ============================

Done...will see what difference it makes after a good night's
sleep...too tired to do a kernel recompile/install right now...

> There are some PCI/ISA chipsets which do not support word (4
> byte wide) writes to the ISA bus and cause all sorts of timing
> issues. This affects approx 5% of the people out there but the
> improvement when it works is approx +50% transfer rate.

Nods...sounds typical...

>> I'm no expert on debugging hardware problems, but am willing
>> to act as a test site for this chipset if somebody's willing
>> to provide directions on what to do. As a starter, here's some
>> details of my configuration:

> *snip*

>> 4. /usr/src/linux/.config (apologies for the spam):

> No problem.

Spam not repeated...

>> 5. Startup messages (again, apologies for the spam...):

> I find that "dmesg" always has a lot of useful stuff, the
> driver coders (such as myself) can often nail down the problem
> from this.

I rather suspected as much...

> *snip*

>> ppa: Version 1.40
>> ppa: Probing port 03bc
>> ppa: Probing port 0378
>> ppa: SPP port present
>> ppa: ECP with a 16 byte FIFO present
>> ppa: Passed Intel bug check.
>> ppa: Probing port 0278

> Obviously the drive wasn't plugged in. The messages here would
> have been "most interesting".

My BIOS has three possible parallel port modes, and can set the
on-board parallel port for either 0x378 or 0x278 only. The
following is the relevant section of dmesg in each of the modes on
0x378 with the ZipDrive plugged in...

BIOS = ECP

Q> ppa: Version 1.40
Q> ppa: Probing port 03bc
Q> ppa: Probing port 0378
Q> ppa: SPP port present
Q> ppa: ECP with a 16 byte FIFO present
Q> ppa: PS/2 bidirectional port present
Q> ppa: Passed Intel bug check.
Q> ppa: Found device at ID 6, Attempting to use EPP 32 bit
Q> ppa: Found device at ID 6, Attempting to use PS/2
Q> ppa: Communication established with ID 6 using PS/2
Q> ppa: Probing port 0278
Q> scsi0 : Iomega parport ZIP drive
Q> scsi : 1 host.
Q> Vendor: IOMEGA Model: ZIP 100 Rev: D.09
Q> Type: Direct-Access ANSI SCSI revision: 02
Q> Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
Q> scsi : detected 1 SCSI disk total.
Q> sda : READ CAPACITY failed.
Q> sda : status = 0, message = 00, host = 0, driver = 28
Q> sda : extended sense code = 2
Q> sda : block size assumed to be 512 bytes, disk size 1GB.

BIOS = ECP/EPP

Q> ppa: Version 1.40
Q> ppa: Probing port 03bc
Q> ppa: Probing port 0378
Q> ppa: SPP port present
Q> ppa: ECP with a 16 byte FIFO present
Q> ppa: PS/2 bidirectional port present
Q> ppa: Passed Intel bug check.
Q> ppa: EPP 1.9 with software direction protocol
Q> ppa: Found device at ID 6, Attempting to use EPP 32 bit
Q> ppa: Communication established with ID 6 using EPP 32 bit
Q> ppa: Probing port 0278
Q> scsi0 : Iomega parport ZIP drive
Q> scsi : 1 host.
Q> Vendor: IOMEGA Model: ZIP 100 Rev: D009
Q> Type: Direct-Access ANSI SCSI revision: 02
Q> Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
Q> scsi : detected 1 SCSI disk total.
Q> sda : READ CAPACITY failed.
Q> sda : status = 0, message = 00, host = 0, driver = 28
Q> sda : extended sense code = 2
Q> sda : block size assumed to be 512 bytes, disk size 1GB.

BIOS = EPP/SPP

Q> ppa: Version 1.40
Q> ppa: Probing port 03bc
Q> ppa: Probing port 0378
Q> ppa: SPP port present
Q> ppa: PS/2 bidirectional port present
Q> ppa: EPP 1.9 with software direction protocol
Q> ppa: Found device at ID 6, Attempting to use EPP 32 bit
Q> ppa: Communication established with ID 6 using EPP 32 bit
Q> ppa: Probing port 0278
Q> scsi0 : Iomega parport ZIP drive
Q> scsi : 1 host.
Q> Vendor: IOMEGA Model: ZIP 100 D Rev: D.99
Q> Type: Direct-Access ANSI SCSI revision: 02
Q> Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
Q> scsi : detected 1 SCSI disk total.
Q> sda : READ CAPACITY failed.
Q> sda : status = 0, message = 00, host = 0, driver = 28
Q> sda : extended sense code = 2
Q> sda : block size assumed to be 512 bytes, disk size 1GB.

Of these, with the driver as received, only the ECP setting
worked...

If you want the full dmesg dumps, grab the following file, only 2k...

   ftp://ftp.mirrors.ml.org/pub/rhw/dmesg.tgz

I'm not going to spam this list with three copies of those lists...

> *snip*

>> Partition check:
>> hda: hda1 hda3 hda4 < hda5 >
>> hdc: [PTBL] [1023/64/63] hdc1 hdc2 hdc3 hdc4 < hdc5 hdc6 hdc7
>> hdc8 hdc9 >

> Side comment: This is the biggest partition set I have seen on
> a linux box (8 usable partitions). Are you using these for
> /tmp,/var,...

> It would be the first time I have heard/seen this done on a
> linux box. Just currious.

Here's my /etc/fstab for your reference...

Q> /dev/hda1 / ext2 defaults 1 1
Q> /dev/hda3 /dos/c vfat defaults,umask=0
Q> /dev/hda5 /backups ext2 defaults,ro 1 2

Q> /dev/hdc1 /tmp ext2 defaults 1 2
Q> /dev/hdc2 /root ext2 defaults 1 2
Q> /dev/hdc5 /home ext2 defaults,usrquota 1 2
Q> /dev/hdc6 /usr ext2 defaults 1 2
Q> /dev/hdc7 /usr/src ext2 defaults 1 2
Q> /dev/hdc8 /usr/doc ext2 defaults 1 2
Q> /dev/hdc9 /home/ftp ext2 defaults,usrquota 1 2

Q> /dev/hdc3 swap swap defaults

Q> /dev/cdrom /cdrom iso9660 noauto,user,ro

Q> /dev/fd0 /fd0 auto noauto,user

Q> /dev/sda1 /zip auto noauto,user
Q> /dev/sda2 /zip auto noauto,user
Q> /dev/sda3 /zip auto noauto,user
Q> /dev/sda4 /zip auto noauto,user

Q> /proc /proc proc defaults

As you can see, one of those eight partitions is a swap partition,
so only seven in use for Linux itself...

Also of possible interest is the four partitions mounted on /zip
which work because I always mount them via their partition ID, so
can happily list them all with the same mountpoint. It means that
I can then forget about which partition was mounted in subsequent
commands...

> If the PEDANTIC option does not fix the problem, drop me an
> email and I will see what I can do for you.

I'll try it in the morning, too tired just now...but expect
another email with details...

Best wishes from Riley.

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:17:19 EST