^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) * Many thanks to Lode Leroy <Lode.Leroy@www.ibase.be>, who tested so many
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * ALPHA patches to this driver on an EASYSTOR LS-120 ATAPI floppy drive.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Ver 0.1 Oct 17 96 Initial test version, mostly based on ide-tape.c.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Ver 0.2 Oct 31 96 Minor changes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Ver 0.3 Dec 2 96 Fixed error recovery bug.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * Ver 0.4 Jan 26 97 Add support for the HDIO_GETGEO ioctl.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * Ver 0.5 Feb 21 97 Add partitions support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) * Use the minimum of the LBA and CHS capacities.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) * Avoid hwgroup->rq == NULL on the last irq.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) * Fix potential null dereferencing with DEBUG_LOG.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) * Ver 0.8 Dec 7 97 Increase irq timeout from 10 to 50 seconds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) * Add media write-protect detection.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) * Issue START command only if TEST UNIT READY fails.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) * Add work-around for IOMEGA ZIP revision 21.D.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) * Remove idefloppy_get_capabilities().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) * Ver 0.9 Jul 4 99 Fix a bug which might have caused the number of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) * bytes requested on each interrupt to be zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) * Thanks to <shanos@es.co.nz> for pointing this out.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) * Ver 0.9.sv Jan 6 01 Sam Varshavchik <mrsam@courier-mta.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) * Implement low level formatting. Reimplemented
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) * IDEFLOPPY_CAPABILITIES_PAGE, since we need the srfp
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) * bit. My LS-120 drive barfs on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) * IDEFLOPPY_CAPABILITIES_PAGE, but maybe it's just me.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) * Compromise by not reporting a failure to get this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) * mode page. Implemented four IOCTLs in order to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) * implement formatting. IOCTls begin with 0x4600,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) * 0x46 is 'F' as in Format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) * Jan 9 01 Userland option to select format verify.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) * Added PC_SUPPRESS_ERROR flag - some idefloppy drives
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) * do not implement IDEFLOPPY_CAPABILITIES_PAGE, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) * return a sense error. Suppress error reporting in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) * this particular case in order to avoid spurious
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) * errors in syslog. The culprit is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) * idefloppy_get_capability_page(), so move it to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) * idefloppy_begin_format() so that it's not used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) * unless absolutely necessary.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) * If drive does not support format progress indication
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) * monitor the dsc bit in the status register.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) * Also, O_NDELAY on open will allow the device to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) * opened without a disk available. This can be used to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) * open an unformatted disk, or get the device capacity.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) * Ver 0.91 Dec 11 99 Added IOMEGA Clik! drive support by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) * <paul@paulbristow.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) * Ver 0.92 Oct 22 00 Paul Bristow became official maintainer for this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) * driver. Included Powerbook internal zip kludge.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) * Ver 0.93 Oct 24 00 Fixed bugs for Clik! drive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) * no disk on insert and disk change now works
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) * Ver 0.94 Oct 27 00 Tidied up to remove strstr(Clik) everywhere
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) * Ver 0.95 Nov 7 00 Brought across to kernel 2.4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) * Ver 0.96 Jan 7 01 Actually in line with release version of 2.4.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) * including set_bit patch from Rusty Russell
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) * Ver 0.97 Jul 22 01 Merge 0.91-0.96 onto 0.9.sv for ac series
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) * Ver 0.97.sv Aug 3 01 Backported from 2.4.7-ac3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) * Ver 0.98 Oct 26 01 Split idefloppy_transfer_pc into two pieces to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) * fix a lost interrupt problem. It appears the busy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) * bit was being deasserted by my IOMEGA ATAPI ZIP 100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) * drive before the drive was actually ready.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) * Ver 0.98a Oct 29 01 Expose delay value so we can play.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) * Ver 0.99 Feb 24 02 Remove duplicate code, modify clik! detection code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) * to support new PocketZip drives
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) */