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