Re: IDE bug in 2.4.2-ac12?

2001-03-06 Thread Paul Bristow

On Tuesday 06 March 2001 19:13, Konrad Stopsack wrote:
> Hello guys,
>
> I hope you've read my posting "DMA problem with ZIP drive and VIA
> VT82C598MVP / VT82C586B chip" (why does anybody answer?).
> I now tried the 2.4.2-ac12 kernel including the latest VIA 82c586b driver
> (version 3.21), but the effects were almost the same:
> - just when the kernel tried to access to the hard disk during boot, DMA
> errors were occured
> - "hdparm /dev/hda" displayed 9 MB per second (and not 11 MB like without
> ZIP) - /proc/ide/via reported 16 MB transfer rate (and not 33MB like
> without ZIP drive)
> - Kernel 2.4.2-ac12 reports a "ide-floppy: hdd: I/O error, pc = 5a, key = 
> 5, asc = 24, ascq =  0" error, 2.4.2 doesn't
>
> My IDE configuration is:
> /dev/hda: Hard disk  => Primary IDE controller
> /dev/hdc CD-ROM  => Secondary IDE controller
> /dev/hdd: ZIP   => Secondary IDE controller
>
> Could you please tell me whether it's a bug or a feature?

OK.  The ZIP drive can not handle uDMA, so it's normal for the secondary 
controller to drop back.  In my opinion, the primary controller should stay 
at uDMA speed, but it is PC hardware so it is perfectly possible there is 
something cheap that locks them together.  I will bring up ac-12 and check 
the error message...

> I'm really waiting for your answer - else I might get crazy with this
> problem
>
> :-((
>
> I attached both dmesg and /proc/ide/via, and my old posting.
>
> cu Konrad

-- 
Paul Bristow
http://paulbristow.net/linux/idefloppy.html
Linux ide-floppy maintainer
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: IDE bug in 2.4.2-ac12?

2001-03-06 Thread Paul Bristow

On Tuesday 06 March 2001 19:13, Konrad Stopsack wrote:
 Hello guys,

 I hope you've read my posting "DMA problem with ZIP drive and VIA
 VT82C598MVP / VT82C586B chip" (why does anybody answer?).
 I now tried the 2.4.2-ac12 kernel including the latest VIA 82c586b driver
 (version 3.21), but the effects were almost the same:
 - just when the kernel tried to access to the hard disk during boot, DMA
 errors were occured
 - "hdparm /dev/hda" displayed 9 MB per second (and not 11 MB like without
 ZIP) - /proc/ide/via reported 16 MB transfer rate (and not 33MB like
 without ZIP drive)
 - Kernel 2.4.2-ac12 reports a "ide-floppy: hdd: I/O error, pc = 5a, key = 
 5, asc = 24, ascq =  0" error, 2.4.2 doesn't

 My IDE configuration is:
 /dev/hda: Hard disk  = Primary IDE controller
 /dev/hdc CD-ROM  = Secondary IDE controller
 /dev/hdd: ZIP   = Secondary IDE controller

 Could you please tell me whether it's a bug or a feature?

OK.  The ZIP drive can not handle uDMA, so it's normal for the secondary 
controller to drop back.  In my opinion, the primary controller should stay 
at uDMA speed, but it is PC hardware so it is perfectly possible there is 
something cheap that locks them together.  I will bring up ac-12 and check 
the error message...

 I'm really waiting for your answer - else I might get crazy with this
 problem

 :-((

 I attached both dmesg and /proc/ide/via, and my old posting.

 cu Konrad

-- 
Paul Bristow
http://paulbristow.net/linux/idefloppy.html
Linux ide-floppy maintainer
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



PCMCIA problem loading ide-floppy from ide_cs

2001-01-17 Thread Paul Bristow

Hi,

I am trying to understand the new PCMCIA configuration.  So far I am trying 
to use the kernel PCMCIA driver.  The yenta_socket driver is working fine. 

Using 2.4.0, and cardmgr 3.1.23

When I insert my Iomega Clik drive, cardmgr correctly identifies it as an ATA 
Fixed Disk and loads ide_cs.  ide_cs does the ide_probe and correctly assumes 
that the drive is an ide-floppy.  However at this point it doesn't seem to 
even try to load the module.  KMOD is set to y in .config

If I preload the ide-floppy module everything loads up fine and I can use the 
drive perfectly.  However, when I do a cardctl eject 0, everything screws up. 
The eject command says it works, unlinks ide_cs, but seems to leave 
ide-floppy working!  and yes, I have run depmod -a about a zillion times.

modprobe -nv finds the modules no problem.

Any pointers on where or what is wrong here?

Thanks

-- 

Paul Bristow
ide-floppy maintainer
http://paulbristow.net/linux/idefloppy.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



PCMCIA problem loading ide-floppy from ide_cs

2001-01-17 Thread Paul Bristow

Hi,

I am trying to understand the new PCMCIA configuration.  So far I am trying 
to use the kernel PCMCIA driver.  The yenta_socket driver is working fine. 

Using 2.4.0, and cardmgr 3.1.23

When I insert my Iomega Clik drive, cardmgr correctly identifies it as an ATA 
Fixed Disk and loads ide_cs.  ide_cs does the ide_probe and correctly assumes 
that the drive is an ide-floppy.  However at this point it doesn't seem to 
even try to load the module.  KMOD is set to y in .config

If I preload the ide-floppy module everything loads up fine and I can use the 
drive perfectly.  However, when I do a cardctl eject 0, everything screws up. 
The eject command says it works, unlinks ide_cs, but seems to leave 
ide-floppy working!  and yes, I have run depmod -a about a zillion times.

modprobe -nv finds the modules no problem.

Any pointers on where or what is wrong here?

Thanks

-- 

Paul Bristow
ide-floppy maintainer
http://paulbristow.net/linux/idefloppy.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[PATCH] ide-floppy ATAPI format capability (official)

2001-01-14 Thread Paul Bristow

Hi everyone,

This is Sam Varshavchik's ATAPI format patch, synced in with my update
to the driver.  It requires ide-floppy.c V0.96.  This patch brings the
driver to 0.97.

This patch updates ide-floppy to include ATAPI formatting ioctls.  Like
other devices, we allow O_NDELAY to open a drive without a disk, or with
an unreadable disk, so that we can get the format capacity of the drive
or begin the format.

This has not yet been extensively tested.  Anyone with an LS-120 drive
is welcome to format 1.44MB floppies with it.  You will need Sams floppy
formatting utility which is available at
http://www.email-scan.com/floppy.

Feedback is welcome.

Regards, 

Paul Bristow

Linux IDE-Floppy Maintainer

Patch follows:


--- linux/drivers/ide/ide-floppy-0.96.c Sun Jan 14 23:29:02 2001
+++ linux/drivers/ide/ide-floppy.c  Sun Jan 14 23:49:23 2001
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/ide-floppy.c  Version 0.96Jan 7, 2001
+ * linux/drivers/ide/ide-floppy.c  Version 0.97Jan 14 2001
  *
  * Copyright (C) 1996 - 1999 Gadi Oxman <[EMAIL PROTECTED]>
  * Copyright (C) 2000 - 2001 Paul Bristow <[EMAIL PROTECTED]>
@@ -46,10 +46,34 @@
  * Ver 0.95  Nov  7 00   Brought across to kernel 2.4
  * Ver 0.96  Jan  7 01   Actually in line with release version of 2.4.0
  *   including set_bit patch from Rusty Russel
+ * Ver 0.96.sv Jan 6 01  Sam Varshavchik <[EMAIL PROTECTED]>
+ *   Implement low level formatting.  Reimplemented
+ *   IDEFLOPPY_CAPABILITIES_PAGE, since we need the
srfp
+ *   bit.  My LS-120 drive barfs on
+ *   IDEFLOPPY_CAPABILITIES_PAGE, but maybe it's
just me.
+ *   Compromise by not reporting a failure to get
this
+ *   mode page.  Implemented four IOCTLs in order
to
+ *   implement formatting.  IOCTls begin with
0x4600,
+ *   0x46 is 'F' as in Format.
+ *   Also, O_NDELAY on open will allow the device
to be
+ *   opened without a disk available.  This can be
used to
+ *   open an unformatted disk, or get the device
capacity.
  *   
+ *Jan 9 01   Userland option to select format verify.
+ *   Added PC_SUPPRESS_ERROR flag - some idefloppy
drives
+ *   do not implement IDEFLOPPY_CAPABILITIES_PAGE,
and
+ *   return a sense error.  Suppress error
reporting in
+ *   this particular case in order to avoid
spurious
+ *   errors in syslog.  The culprit is
+ *   idefloppy_get_capability_page(), so move it to
+ *   idefloppy_begin_format() so that it's not used
+ *   unless absolutely necessary.
+ *   If drive does not support format progress
indication
+ *   monitor the dsc bit in the status register.
+ * Ver 0.97  Jan 14 01  Issued release 0.97 for kernel 2.4.0
  */
 
-#define IDEFLOPPY_VERSION "0.96"
+#define IDEFLOPPY_VERSION "0.97"
 
 #include 
 #include 
@@ -136,6 +160,8 @@
 #definePC_DMA_ERROR4   /* 1 when
encountered problem during DMA */
 #definePC_WRITING  5   /* Data
direction */
 
+#definePC_SUPPRESS_ERROR   6   /* Suppress
error reporting */
+
 /*
  * Removable Block Access Capabilities Page
  */
@@ -249,6 +275,7 @@
 *  Last error information
 */
byte sense_key, asc, ascq;
+   int progress_indication;
 
/*
 *  Device information
@@ -257,7 +284,7 @@
idefloppy_capacity_descriptor_t capacity;   /* Last
format capacity */
idefloppy_flexible_disk_page_t flexible_disk_page;  /* Copy
of the flexible disk page */
int wp; /* Write
protect */
-
+   int srfp;   /* Supports format progress
report */
unsigned long flags;/* Status/Action flags :
long for set_bit() */
 } idefloppy_floppy_t;
 
@@ -269,6 +296,7 @@
 #define IDEFLOPPY_USE_READ12   2   /* Use READ12/WRITE12 or
READ10/WRITE10 */
 #define IDEFLOPPY_CLIK_DRIVE  3   /* Avoid commands not
supported in Clik drive */
 #define IDEFLOPPY_POWERBOOK_ZIP   4   /* Kludge for Apple Powerbook
Zip drive */
+#define IDEFLOPPY_FORMAT_IN_PROGRESS   5   /* Format in progress */
 
 /*
  * ATAPI floppy drive packet commands
@@ -299,6 +327,15 @@
 #define MODE_SENSE_SAVED   0x03
 
 /*
+ * IOCTLs used in low-level formatting.
+ */
+
+#defineIDEFLOPPY_IOCTL_FORMAT_SUPPORTED0x4600
+#defineIDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY 0x4601
+#defineIDEFLOPPY_IOCTL_FORMAT_START0x4602
+#define IDEFLOP

[PATCH] ide-floppy in 2.4.0 catches up to 2.2.18

2001-01-14 Thread Paul Bristow

Hi everyone,

This patch is to bring the device support in the ide-floppy driver up to
the same as that in the 2.2.18 kernel.  

Specifically, it adds IOMEGA Clik! drive and Apple Powerbook internal
Zip support.  Starts to tidy up the code using macros for debug and
corrects the use of flags in set_bit functions so the driver should work
correctly on 64 bit architectures.

It should apply cleanly to the release 2.4.0.

The ATAPI format patch as in 2.4.0-ac4 will be in driver 0.97 in about
30 seconds.

This patch has been tested by many people.

Regards,

Paul Bristow

Linux IDE-Floppy Maintainer

http://paulbristow.net/linux/idefloppy.html

Patch follows:

--- linux-2.4.0/drivers/ide/ide-floppy.cSun Jan 14 23:44:42 2001
+++ linux/drivers/ide/ide-floppy.c  Sun Jan 14 23:46:56 2001
@@ -1,7 +1,8 @@
 /*
- * linux/drivers/ide/ide-floppy.c  Version 0.9 Jul   4, 1999
+ * linux/drivers/ide/ide-floppy.c  Version 0.96Jan 7, 2001
  *
  * Copyright (C) 1996 - 1999 Gadi Oxman <[EMAIL PROTECTED]>
+ * Copyright (C) 2000 - 2001 Paul Bristow <[EMAIL PROTECTED]>
  */
 
 /*
@@ -10,6 +11,12 @@
  * The driver currently doesn't have any fancy features, just the bare
  * minimum read/write support.
  *
+ * This driver supports the following IDE floppy drives:
+ *
+ * LS-120 SuperDisk
+ * Iomega Zip 100/250 
+ * Iomega PC Card Clik!/PocketZip
+ *
  * Many thanks to Lode Leroy <[EMAIL PROTECTED]>, who tested so
many
  * ALPHA patches to this driver on an EASYSTOR LS-120 ATAPI floppy
drive.
  *
@@ -29,9 +36,20 @@
  * Ver 0.9   Jul  4 99   Fix a bug which might have caused the number
of
  *bytes requested on each interrupt to be zero.
  *Thanks to <[EMAIL PROTECTED]> for pointing this
out.
+ * Ver 0.91  Dec 11 99   Added IOMEGA Clik! drive support by 
+ *   <[EMAIL PROTECTED]>
+ * Ver 0.92  Oct 22 00   Paul Bristow became official maintainer for
this 
+ *   driver.  Included Powerbook internal zip kludge.
+ * Ver 0.93  Oct 24 00   Fixed bugs for Clik! drive
+ * no disk on insert and
disk change now works
+ * Ver 0.94  Oct 27 00   Tidied up to remove strstr(Clik) everywhere
+ * Ver 0.95  Nov  7 00   Brought across to kernel 2.4
+ * Ver 0.96  Jan  7 01   Actually in line with release version of 2.4.0
+ *   including set_bit patch from Rusty Russel
+ *   
  */
 
-#define IDEFLOPPY_VERSION "0.9"
+#define IDEFLOPPY_VERSION "0.96"
 
 #include 
 #include 
@@ -59,9 +78,10 @@
 /*
  * The following are used to debug the driver.
  */
-#define IDEFLOPPY_DEBUG_LOG0
 #define IDEFLOPPY_DEBUG_INFO   0
 #define IDEFLOPPY_DEBUG_BUGS   1
+/* #define IDEFLOPPY_DEBUG(fmt, args...) printk(KERN_INFO fmt, ## args)
*/
+#define IDEFLOPPY_DEBUG( fmt, args... )
 
 /*
  * Some drives require a longer irq timeout.
@@ -104,7 +124,7 @@
byte *current_position; /* Pointer into the
above buffer */
void (*callback) (ide_drive_t *);   /* Called when this
packet command is completed */
byte pc_buffer[IDEFLOPPY_PC_BUFFER_SIZE];   /* Temporary
buffer */
-   unsigned long flags;/* Status/Action bit
flags: long for set_bit */
+   unsigned long flags;/* Status/Action bit
flags : long for set_bit() */
 } idefloppy_pc_t;
 
 /*
@@ -237,7 +258,7 @@
idefloppy_flexible_disk_page_t flexible_disk_page;  /* Copy
of the flexible disk page */
int wp; /* Write
protect */
 
-   unsigned int flags; /* Status/Action flags
*/
+   unsigned long flags;/* Status/Action flags :
long for set_bit() */
 } idefloppy_floppy_t;
 
 /*
@@ -246,6 +267,8 @@
 #define IDEFLOPPY_DRQ_INTERRUPT0   /* DRQ interrupt
device */
 #define IDEFLOPPY_MEDIA_CHANGED1   /* Media may
have changed */
 #define IDEFLOPPY_USE_READ12   2   /* Use READ12/WRITE12 or
READ10/WRITE10 */
+#define IDEFLOPPY_CLIK_DRIVE  3   /* Avoid commands not
supported in Clik drive */
+#define IDEFLOPPY_POWERBOOK_ZIP   4   /* Kludge for Apple Powerbook
Zip drive */
 
 /*
  * ATAPI floppy drive packet commands
@@ -621,9 +644,7 @@
struct request *rq = hwgroup->rq;
int error;
 
-#if IDEFLOPPY_DEBUG_LOG
-   printk (KERN_INFO "Reached idefloppy_end_request\n");
-#endif /* IDEFLOPPY_DEBUG_LOG */
+  IDEFLOPPY_DEBUG( "Reached idefloppy_end_request\n");
 
switch (uptodate) {
case 0: error = IDEFLOPPY_ERROR_GENERAL; break;
@@ -746,21 +767,19 @@
idefloppy_floppy_t *floppy = drive->driver_data;
 
floppy->sense_key = result->sense_key; floppy->asc =
result->asc; floppy->ascq = result->ascq;
-#if IDEFLOPPY_DEBUG_LOG
-   if (flopp

[PATCH] ide-floppy in 2.4.0 catches up to 2.2.18

2001-01-14 Thread Paul Bristow

Hi everyone,

This patch is to bring the device support in the ide-floppy driver up to
the same as that in the 2.2.18 kernel.  

Specifically, it adds IOMEGA Clik! drive and Apple Powerbook internal
Zip support.  Starts to tidy up the code using macros for debug and
corrects the use of flags in set_bit functions so the driver should work
correctly on 64 bit architectures.

It should apply cleanly to the release 2.4.0.

The ATAPI format patch as in 2.4.0-ac4 will be in driver 0.97 in about
30 seconds.

This patch has been tested by many people.

Regards,

Paul Bristow

Linux IDE-Floppy Maintainer

http://paulbristow.net/linux/idefloppy.html

Patch follows:

--- linux-2.4.0/drivers/ide/ide-floppy.cSun Jan 14 23:44:42 2001
+++ linux/drivers/ide/ide-floppy.c  Sun Jan 14 23:46:56 2001
@@ -1,7 +1,8 @@
 /*
- * linux/drivers/ide/ide-floppy.c  Version 0.9 Jul   4, 1999
+ * linux/drivers/ide/ide-floppy.c  Version 0.96Jan 7, 2001
  *
  * Copyright (C) 1996 - 1999 Gadi Oxman [EMAIL PROTECTED]
+ * Copyright (C) 2000 - 2001 Paul Bristow [EMAIL PROTECTED]
  */
 
 /*
@@ -10,6 +11,12 @@
  * The driver currently doesn't have any fancy features, just the bare
  * minimum read/write support.
  *
+ * This driver supports the following IDE floppy drives:
+ *
+ * LS-120 SuperDisk
+ * Iomega Zip 100/250 
+ * Iomega PC Card Clik!/PocketZip
+ *
  * Many thanks to Lode Leroy [EMAIL PROTECTED], who tested so
many
  * ALPHA patches to this driver on an EASYSTOR LS-120 ATAPI floppy
drive.
  *
@@ -29,9 +36,20 @@
  * Ver 0.9   Jul  4 99   Fix a bug which might have caused the number
of
  *bytes requested on each interrupt to be zero.
  *Thanks to [EMAIL PROTECTED] for pointing this
out.
+ * Ver 0.91  Dec 11 99   Added IOMEGA Clik! drive support by 
+ *   [EMAIL PROTECTED]
+ * Ver 0.92  Oct 22 00   Paul Bristow became official maintainer for
this 
+ *   driver.  Included Powerbook internal zip kludge.
+ * Ver 0.93  Oct 24 00   Fixed bugs for Clik! drive
+ * no disk on insert and
disk change now works
+ * Ver 0.94  Oct 27 00   Tidied up to remove strstr(Clik) everywhere
+ * Ver 0.95  Nov  7 00   Brought across to kernel 2.4
+ * Ver 0.96  Jan  7 01   Actually in line with release version of 2.4.0
+ *   including set_bit patch from Rusty Russel
+ *   
  */
 
-#define IDEFLOPPY_VERSION "0.9"
+#define IDEFLOPPY_VERSION "0.96"
 
 #include linux/config.h
 #include linux/module.h
@@ -59,9 +78,10 @@
 /*
  * The following are used to debug the driver.
  */
-#define IDEFLOPPY_DEBUG_LOG0
 #define IDEFLOPPY_DEBUG_INFO   0
 #define IDEFLOPPY_DEBUG_BUGS   1
+/* #define IDEFLOPPY_DEBUG(fmt, args...) printk(KERN_INFO fmt, ## args)
*/
+#define IDEFLOPPY_DEBUG( fmt, args... )
 
 /*
  * Some drives require a longer irq timeout.
@@ -104,7 +124,7 @@
byte *current_position; /* Pointer into the
above buffer */
void (*callback) (ide_drive_t *);   /* Called when this
packet command is completed */
byte pc_buffer[IDEFLOPPY_PC_BUFFER_SIZE];   /* Temporary
buffer */
-   unsigned long flags;/* Status/Action bit
flags: long for set_bit */
+   unsigned long flags;/* Status/Action bit
flags : long for set_bit() */
 } idefloppy_pc_t;
 
 /*
@@ -237,7 +258,7 @@
idefloppy_flexible_disk_page_t flexible_disk_page;  /* Copy
of the flexible disk page */
int wp; /* Write
protect */
 
-   unsigned int flags; /* Status/Action flags
*/
+   unsigned long flags;/* Status/Action flags :
long for set_bit() */
 } idefloppy_floppy_t;
 
 /*
@@ -246,6 +267,8 @@
 #define IDEFLOPPY_DRQ_INTERRUPT0   /* DRQ interrupt
device */
 #define IDEFLOPPY_MEDIA_CHANGED1   /* Media may
have changed */
 #define IDEFLOPPY_USE_READ12   2   /* Use READ12/WRITE12 or
READ10/WRITE10 */
+#define IDEFLOPPY_CLIK_DRIVE  3   /* Avoid commands not
supported in Clik drive */
+#define IDEFLOPPY_POWERBOOK_ZIP   4   /* Kludge for Apple Powerbook
Zip drive */
 
 /*
  * ATAPI floppy drive packet commands
@@ -621,9 +644,7 @@
struct request *rq = hwgroup-rq;
int error;
 
-#if IDEFLOPPY_DEBUG_LOG
-   printk (KERN_INFO "Reached idefloppy_end_request\n");
-#endif /* IDEFLOPPY_DEBUG_LOG */
+  IDEFLOPPY_DEBUG( "Reached idefloppy_end_request\n");
 
switch (uptodate) {
case 0: error = IDEFLOPPY_ERROR_GENERAL; break;
@@ -746,21 +767,19 @@
idefloppy_floppy_t *floppy = drive-driver_data;
 
floppy-sense_key = result-sense_key; floppy-asc =
result-asc; floppy-ascq = result-ascq;
-#if IDEFLOPPY_DEBUG_LOG
-   if (floppy-failed_pc)
-   printk (KERN_I

[PATCH] ide-floppy ATAPI format capability (official)

2001-01-14 Thread Paul Bristow

Hi everyone,

This is Sam Varshavchik's ATAPI format patch, synced in with my update
to the driver.  It requires ide-floppy.c V0.96.  This patch brings the
driver to 0.97.

This patch updates ide-floppy to include ATAPI formatting ioctls.  Like
other devices, we allow O_NDELAY to open a drive without a disk, or with
an unreadable disk, so that we can get the format capacity of the drive
or begin the format.

This has not yet been extensively tested.  Anyone with an LS-120 drive
is welcome to format 1.44MB floppies with it.  You will need Sams floppy
formatting utility which is available at
http://www.email-scan.com/floppy.

Feedback is welcome.

Regards, 

Paul Bristow

Linux IDE-Floppy Maintainer

Patch follows:


--- linux/drivers/ide/ide-floppy-0.96.c Sun Jan 14 23:29:02 2001
+++ linux/drivers/ide/ide-floppy.c  Sun Jan 14 23:49:23 2001
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/ide-floppy.c  Version 0.96Jan 7, 2001
+ * linux/drivers/ide/ide-floppy.c  Version 0.97Jan 14 2001
  *
  * Copyright (C) 1996 - 1999 Gadi Oxman [EMAIL PROTECTED]
  * Copyright (C) 2000 - 2001 Paul Bristow [EMAIL PROTECTED]
@@ -46,10 +46,34 @@
  * Ver 0.95  Nov  7 00   Brought across to kernel 2.4
  * Ver 0.96  Jan  7 01   Actually in line with release version of 2.4.0
  *   including set_bit patch from Rusty Russel
+ * Ver 0.96.sv Jan 6 01  Sam Varshavchik [EMAIL PROTECTED]
+ *   Implement low level formatting.  Reimplemented
+ *   IDEFLOPPY_CAPABILITIES_PAGE, since we need the
srfp
+ *   bit.  My LS-120 drive barfs on
+ *   IDEFLOPPY_CAPABILITIES_PAGE, but maybe it's
just me.
+ *   Compromise by not reporting a failure to get
this
+ *   mode page.  Implemented four IOCTLs in order
to
+ *   implement formatting.  IOCTls begin with
0x4600,
+ *   0x46 is 'F' as in Format.
+ *   Also, O_NDELAY on open will allow the device
to be
+ *   opened without a disk available.  This can be
used to
+ *   open an unformatted disk, or get the device
capacity.
  *   
+ *Jan 9 01   Userland option to select format verify.
+ *   Added PC_SUPPRESS_ERROR flag - some idefloppy
drives
+ *   do not implement IDEFLOPPY_CAPABILITIES_PAGE,
and
+ *   return a sense error.  Suppress error
reporting in
+ *   this particular case in order to avoid
spurious
+ *   errors in syslog.  The culprit is
+ *   idefloppy_get_capability_page(), so move it to
+ *   idefloppy_begin_format() so that it's not used
+ *   unless absolutely necessary.
+ *   If drive does not support format progress
indication
+ *   monitor the dsc bit in the status register.
+ * Ver 0.97  Jan 14 01  Issued release 0.97 for kernel 2.4.0
  */
 
-#define IDEFLOPPY_VERSION "0.96"
+#define IDEFLOPPY_VERSION "0.97"
 
 #include linux/config.h
 #include linux/module.h
@@ -136,6 +160,8 @@
 #definePC_DMA_ERROR4   /* 1 when
encountered problem during DMA */
 #definePC_WRITING  5   /* Data
direction */
 
+#definePC_SUPPRESS_ERROR   6   /* Suppress
error reporting */
+
 /*
  * Removable Block Access Capabilities Page
  */
@@ -249,6 +275,7 @@
 *  Last error information
 */
byte sense_key, asc, ascq;
+   int progress_indication;
 
/*
 *  Device information
@@ -257,7 +284,7 @@
idefloppy_capacity_descriptor_t capacity;   /* Last
format capacity */
idefloppy_flexible_disk_page_t flexible_disk_page;  /* Copy
of the flexible disk page */
int wp; /* Write
protect */
-
+   int srfp;   /* Supports format progress
report */
unsigned long flags;/* Status/Action flags :
long for set_bit() */
 } idefloppy_floppy_t;
 
@@ -269,6 +296,7 @@
 #define IDEFLOPPY_USE_READ12   2   /* Use READ12/WRITE12 or
READ10/WRITE10 */
 #define IDEFLOPPY_CLIK_DRIVE  3   /* Avoid commands not
supported in Clik drive */
 #define IDEFLOPPY_POWERBOOK_ZIP   4   /* Kludge for Apple Powerbook
Zip drive */
+#define IDEFLOPPY_FORMAT_IN_PROGRESS   5   /* Format in progress */
 
 /*
  * ATAPI floppy drive packet commands
@@ -299,6 +327,15 @@
 #define MODE_SENSE_SAVED   0x03
 
 /*
+ * IOCTLs used in low-level formatting.
+ */
+
+#defineIDEFLOPPY_IOCTL_FORMAT_SUPPORTED0x4600
+#defineIDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY 0x4601
+#defineIDEFLOPPY_IOCTL_FORMAT_START   

ide-floppy [Fwd: Updated ATAPI FORMAT_UNIT patch.]

2001-01-13 Thread Paul Bristow

Dear LKML,

Sam & I have been discussing his patch for formatting 1.44MB floppies in
an LS-120 drive, and we decided to move the discussion out in the open. 
One of my concerns is that we don't take the ide-floppy driver in a
different direction to the other removeable media drives.

For Alan Cox, could you back out Sam's patch for now. It will be back
soon.

[Note to Richard Gooch, I haven't forgotten the devfs support]

Sams patches, and the userspace formatting utility are available at
http://www.email-scan.com/idefloppy/floppy-0.03.tar.gz

Comments, suggestions etc would be welcome.

This is the latest mail from Sam...

Sam Varshavchik wrote:
> 
> On Fri, 12 Jan 2001, Paul Bristow wrote:
> 
> > > There are a couple of things that are new:
> > >
> > > * Ability to open the device even if there's no disk in the drive.  This
> > > is needed by the userspace app to probe the device.  The open path sends a
> > > START UNIT packet to the drive, and it looks like most LS-120 drives
> > > report a sense error if there's no disk present.  After thinking about it,
> > > what I ended up doing is checking if the device is opened with O_EXCL flag
> > > set, if so the open path will ignore a START UNIT failure.  Everything is
> > > still initialized correctly, and I've tested it -- this appears to work
> > > quite well.  I would prefer for the open path to always work without any
> > > monkey business, like you can open /dev/fd even if there's no disk in the
> > > drive.  However, I'm not comfortable with that approach -- I'm pretty sure
> > > lots of stuff in ide and hd drivers depend on open failing if there's no
> > > actual disk present.  I see this approach as the best compromise, since it
> > > only affects the userland format utility, and nothing else.
> >
> > Let's put this suggestion out to the kernel mailing list.  There are
> > lots of other removeable media types out there and users will be
> > terribly confused if they behave differently.
> 
> Ok, but the alternatives are:
> 
> 1) A separate minor device that will open whether or not there's a
> formatted disk in the drive.  I don't like this approach.
> 
> 2) Forget the whole thing.  This means that with some drives you will not
> be able to format completely unformatted floppies, only reformat floppies
> that are already formatted.
> 
> The O_EXCL trick seems the cleanest way to be able to access the device
> when you know what you're doing.  The end result is that there needs to be
> a way to access device with or without formattable media.
> 
> > > * An additional flag bit on the packet structure to suppress logging an
> > > error if the packet fails.  The aforementioned dumb Matsushita drive
> > > returns a sense error in response to IDEFLOPPY_CAPABILITIES_PAGE request.
> > > This packet is only sent by my new code, and although this is not defined
> > > as an optional feature of LS-120 drives, Matsushita does not appear to
> > > implement it.  Something like that normally results in the driver
> > > reporting an I/O error to syslog.  There isn't an actual problem, it's a
> > > spurious error, so I'd rather suppress it instead of having people scream
> > > about I/O errors in syslog.  The new packet flag bit will only be used by
> > > the format code.
> >
> > Hmm, isn't this only useful for debugging, and therefore belongs in
> > IDEFLOPPY_DEBUG instead?
> 
> See below.
> 
> > > * Smarter handling of format progress reporting.  Format progress
> > > reporting is defined as optional in INF-8070.  Something has to be done if
> > > the drive doesn't support it.  After sending FORMAT_UNIT to the drive, if
> > > there's nothing else to be done the device will be closed from userland.
> > > The close path sends an unlock packet to the drive.  However, the drive
> > > has just begun formatting the floppy, and it's going to be busy for a
> > > while.  ide.c will wait for the drive to become available, then give up
> > > and do a bus reset.  No good.
> >
> > Agreed.
> 
> To check whether the device supports format progress reporting you need to
> send a MODE_SENSE packet for the IDEFLOPPY_CAPABILITIES_PAGE.  The deal is
> that IDEFLOPPY_CAPABILITIES_PAGE itself appears to be optional (see last
> paragraph on page 43 of INF-8070).  This explains why this packet is
> rejected by the drive.  As I mentioned before, this error condition
> results in the default error handler reporting an I/O error to syslog,
> unless it's suppressed by that portion of my patch.
> 
> One remote possibility is that I screwed up I

ide-floppy [Fwd: Updated ATAPI FORMAT_UNIT patch.]

2001-01-13 Thread Paul Bristow

Dear LKML,

Sam  I have been discussing his patch for formatting 1.44MB floppies in
an LS-120 drive, and we decided to move the discussion out in the open. 
One of my concerns is that we don't take the ide-floppy driver in a
different direction to the other removeable media drives.

For Alan Cox, could you back out Sam's patch for now. It will be back
soon.

[Note to Richard Gooch, I haven't forgotten the devfs support]

Sams patches, and the userspace formatting utility are available at
http://www.email-scan.com/idefloppy/floppy-0.03.tar.gz

Comments, suggestions etc would be welcome.

This is the latest mail from Sam...

Sam Varshavchik wrote:
 
 On Fri, 12 Jan 2001, Paul Bristow wrote:
 
   There are a couple of things that are new:
  
   * Ability to open the device even if there's no disk in the drive.  This
   is needed by the userspace app to probe the device.  The open path sends a
   START UNIT packet to the drive, and it looks like most LS-120 drives
   report a sense error if there's no disk present.  After thinking about it,
   what I ended up doing is checking if the device is opened with O_EXCL flag
   set, if so the open path will ignore a START UNIT failure.  Everything is
   still initialized correctly, and I've tested it -- this appears to work
   quite well.  I would prefer for the open path to always work without any
   monkey business, like you can open /dev/fd even if there's no disk in the
   drive.  However, I'm not comfortable with that approach -- I'm pretty sure
   lots of stuff in ide and hd drivers depend on open failing if there's no
   actual disk present.  I see this approach as the best compromise, since it
   only affects the userland format utility, and nothing else.
 
  Let's put this suggestion out to the kernel mailing list.  There are
  lots of other removeable media types out there and users will be
  terribly confused if they behave differently.
 
 Ok, but the alternatives are:
 
 1) A separate minor device that will open whether or not there's a
 formatted disk in the drive.  I don't like this approach.
 
 2) Forget the whole thing.  This means that with some drives you will not
 be able to format completely unformatted floppies, only reformat floppies
 that are already formatted.
 
 The O_EXCL trick seems the cleanest way to be able to access the device
 when you know what you're doing.  The end result is that there needs to be
 a way to access device with or without formattable media.
 
   * An additional flag bit on the packet structure to suppress logging an
   error if the packet fails.  The aforementioned dumb Matsushita drive
   returns a sense error in response to IDEFLOPPY_CAPABILITIES_PAGE request.
   This packet is only sent by my new code, and although this is not defined
   as an optional feature of LS-120 drives, Matsushita does not appear to
   implement it.  Something like that normally results in the driver
   reporting an I/O error to syslog.  There isn't an actual problem, it's a
   spurious error, so I'd rather suppress it instead of having people scream
   about I/O errors in syslog.  The new packet flag bit will only be used by
   the format code.
 
  Hmm, isn't this only useful for debugging, and therefore belongs in
  IDEFLOPPY_DEBUG instead?
 
 See below.
 
   * Smarter handling of format progress reporting.  Format progress
   reporting is defined as optional in INF-8070.  Something has to be done if
   the drive doesn't support it.  After sending FORMAT_UNIT to the drive, if
   there's nothing else to be done the device will be closed from userland.
   The close path sends an unlock packet to the drive.  However, the drive
   has just begun formatting the floppy, and it's going to be busy for a
   while.  ide.c will wait for the drive to become available, then give up
   and do a bus reset.  No good.
 
  Agreed.
 
 To check whether the device supports format progress reporting you need to
 send a MODE_SENSE packet for the IDEFLOPPY_CAPABILITIES_PAGE.  The deal is
 that IDEFLOPPY_CAPABILITIES_PAGE itself appears to be optional (see last
 paragraph on page 43 of INF-8070).  This explains why this packet is
 rejected by the drive.  As I mentioned before, this error condition
 results in the default error handler reporting an I/O error to syslog,
 unless it's suppressed by that portion of my patch.
 
 One remote possibility is that I screwed up IDEFLOPPY_CAPABILITIES_PAGE,
 and the drive is rejecting it for that reason.  However, I note that the
 definition of that packet already existed in 0.9, and Gabi's ChangeLog
 mentions that he removed the code for that packet.  I suspect the reason
 was the same -- some drives reject it, causing errors logged to syslog.
 
  My suggestion would be that we ask Alan Cox to reverse the patch he
  applied in ac4 for now, and then put some of these patches up onto the
  mailing list for comment.  The reason is that I would like to get Clik!
  support into 2.4.1, and maybe devfs support too.  If you don't

Re: has anyone patched NVIDIA_kernel to work with 2.4.0?

2001-01-11 Thread Paul Bristow

On Thursday 11 January 2001 09:06, [EMAIL PROTECTED] wrote:
> Between 2.4.0-test10 and 2.4.0 enough stuff changed that I can't get
> the OpenGL NVIDIA_kernel module compiled and linked properly.  Has
> anyone else taken a shot at this?

This was on linuxgames.com: does this not work?  I haven't had time to try 
yet...

Unofficial NVIDIA Driver 2.4.0 Patch - Friday Jan 05 08:58:54 2001 - Updated 
by Crusader

phantomlord pointed out in our comments that the Christian "phoenix" Zander 
has produced a patch for NVIDIA's Linux kernel driver for use in conjunction 
with the recently released 2.4.0 kernel (phoenix wrote this code for the 
2.4.0 prerelease, but the patch should work with the final kernel tree 
without issues). Please note that this is an unofficial (and unsupported) 
solution, and that NVIDIA will likely release a new official driver version 
for use with the 2.4.x series shortly.

NVdriver Kernel Module Patch for Linux 2.4.0:
http://www.linuxgames.com/misc/patch-2.4.0-PR

-- 
Paul Bristow
http://paulbristow.net
ICQ#11965223
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: has anyone patched NVIDIA_kernel to work with 2.4.0?

2001-01-11 Thread Paul Bristow

On Thursday 11 January 2001 09:06, [EMAIL PROTECTED] wrote:
 Between 2.4.0-test10 and 2.4.0 enough stuff changed that I can't get
 the OpenGL NVIDIA_kernel module compiled and linked properly.  Has
 anyone else taken a shot at this?

This was on linuxgames.com: does this not work?  I haven't had time to try 
yet...

Unofficial NVIDIA Driver 2.4.0 Patch - Friday Jan 05 08:58:54 2001 - Updated 
by Crusader

phantomlord pointed out in our comments that the Christian "phoenix" Zander 
has produced a patch for NVIDIA's Linux kernel driver for use in conjunction 
with the recently released 2.4.0 kernel (phoenix wrote this code for the 
2.4.0 prerelease, but the patch should work with the final kernel tree 
without issues). Please note that this is an unofficial (and unsupported) 
solution, and that NVIDIA will likely release a new official driver version 
for use with the 2.4.x series shortly.

NVdriver Kernel Module Patch for Linux 2.4.0:
http://www.linuxgames.com/misc/patch-2.4.0-PR

-- 
Paul Bristow
http://paulbristow.net
ICQ#11965223
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[PATCH] 2.4.0 MAINTAINERS for ide-floppy updates

2001-01-09 Thread Paul Bristow

Linus, Alan,

Could you please apply this patch to the MAINTAINERS file so that the
2.4.x
IDE-FLOPPY maintainer is correctly identified as me and not Gadi any
more.
This change happened at 2.2.18 for the 2.2.x tree.

I am discussing with Sam the previous patch that Alan applied in
2.4.0-ac4 for 1.44M floppy formatting in LS-120 drives.

Regards,

-- 

Paul

Email:  [EMAIL PROTECTED]
Web:http://paulbristow.net
ICQ:11965223


Patch follows

diff -ur linux-2.4.0/MAINTAINERS linux/MAINTAINERS
--- linux-2.4.0/MAINTAINERS Sun Dec 31 18:31:15 2000
+++ linux/MAINTAINERS   Tue Jan  9 23:20:48 2001
@@ -594,9 +594,16 @@
 W: http://www.kernel.dk
 S: Maintained
 
-IDE/ATAPI TAPE/FLOPPY DRIVERS
+IDE/ATAPI TAPE DRIVERS
 P: Gadi Oxman
 M: Gadi Oxman <[EMAIL PROTECTED]>
+L: [EMAIL PROTECTED]
+S: Maintained
+
+IDE/ATAPI FLOPPY DRIVERS
+P:     Paul Bristow
+M:     Paul Bristow <[EMAIL PROTECTED]>
+W: http://paulbristow.net/linux/idefloppy.html
 L: [EMAIL PROTECTED]
 S: Maintained
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[PATCH] 2.4.0 MAINTAINERS for ide-floppy updates

2001-01-09 Thread Paul Bristow

Linus, Alan,

Could you please apply this patch to the MAINTAINERS file so that the
2.4.x
IDE-FLOPPY maintainer is correctly identified as me and not Gadi any
more.
This change happened at 2.2.18 for the 2.2.x tree.

I am discussing with Sam the previous patch that Alan applied in
2.4.0-ac4 for 1.44M floppy formatting in LS-120 drives.

Regards,

-- 

Paul

Email:  [EMAIL PROTECTED]
Web:http://paulbristow.net
ICQ:11965223


Patch follows

diff -ur linux-2.4.0/MAINTAINERS linux/MAINTAINERS
--- linux-2.4.0/MAINTAINERS Sun Dec 31 18:31:15 2000
+++ linux/MAINTAINERS   Tue Jan  9 23:20:48 2001
@@ -594,9 +594,16 @@
 W: http://www.kernel.dk
 S: Maintained
 
-IDE/ATAPI TAPE/FLOPPY DRIVERS
+IDE/ATAPI TAPE DRIVERS
 P: Gadi Oxman
 M: Gadi Oxman [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
+S: Maintained
+
+IDE/ATAPI FLOPPY DRIVERS
+P: Paul Bristow
+M: Paul Bristow [EMAIL PROTECTED]
+W: http://paulbristow.net/linux/idefloppy.html
 L: [EMAIL PROTECTED]
 S: Maintained
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[PATCH] 2.2.18pre17 updates to IDE-floppy driver

2000-10-22 Thread Paul Bristow

Andre, Alan, others,

As agreed with Gadi and Andre I have taken over the ide-floppy driver
maintainence from Gadi Oxman (thanks for all your work so far Gadi!). 
Anyone with outstanding patches/suggestions etc could you send them to
me?

Please find attached the patch to update the IDE-Floppy driver to
include IOMEGA Clik! (or PocketZip) support.  This patch applies cleanly
to 2.2.17 and 2.2.18pre17.  Details on how to use the Clik! drive with
this patch are available at http://paulbristow.net/linux/clik.html

This updated driver has been tested as a module and compiled in, and the
Clik! mods did not break my LS-120 drive. 

I also include a patch to the CREDITS and MAINTAINERS file so people
know where to reach me.

Now to get it working in 2.4...

Regards,

-- 

Paul

Email: [EMAIL PROTECTED] 
(NOTE: change from [EMAIL PROTECTED] as mail.com unreliable)
Web: http://paulbristow.net
ICQ: #11965223

diff -u -b --exclude='*.o' --exclude='.*' --exclude='*.a' --exclude=System.map 
linux-2.2.17/CREDITS linux-2.2.17-pb/CREDITS
--- linux-2.2.17/CREDITSMon Sep  4 19:39:15 2000
+++ linux-2.2.17-pb/CREDITS Sun Oct 22 15:56:46 2000
@@ -290,6 +290,11 @@
 S: Lancaster, LA1 4DN
 S: UK, England
 
+N: Paul Bristow
+E: [EMAIL PROTECTED]
+W: http://paulbristow.net/linux
+D: ide-floppy maintainer
+
 N: Andries Brouwer
 E: [EMAIL PROTECTED]
 D: random Linux hacker
Common subdirectories: linux-2.2.17/Documentation and linux-2.2.17-pb/Documentation
diff -u -b --exclude='*.o' --exclude='.*' --exclude='*.a' --exclude=System.map 
linux-2.2.17/MAINTAINERS linux-2.2.17-pb/MAINTAINERS
--- linux-2.2.17/MAINTAINERSMon Sep  4 19:39:16 2000
+++ linux-2.2.17-pb/MAINTAINERS Sun Oct 22 19:55:27 2000
@@ -446,12 +446,19 @@
 L: [EMAIL PROTECTED]
 S: Maintained
 
-IDE/ATAPI TAPE/FLOPPY DRIVERS
+IDE/ATAPI TAPE DRIVERS
 P: Gadi Oxman
 M: Gadi Oxman <[EMAIL PROTECTED]>
 L: [EMAIL PROTECTED]
 S: Maintained
 
+IDE/ATAPI FLOPPY DRIVERS
+P:     Paul Bristow
+M:     Paul Bristow <[EMAIL PROTECTED]>
+W:  http://paulbristow.net/linux
+L: [EMAIL PROTECTED]
+S: Maintained
+
 IP FIREWALL
 P: Paul Russell
 M: [EMAIL PROTECTED]
Common subdirectories: linux-2.2.17/arch and linux-2.2.17-pb/arch
Common subdirectories: linux-2.2.17/drivers and linux-2.2.17-pb/drivers
Common subdirectories: linux-2.2.17/fs and linux-2.2.17-pb/fs
Common subdirectories: linux-2.2.17/include and linux-2.2.17-pb/include
Common subdirectories: linux-2.2.17/init and linux-2.2.17-pb/init
Common subdirectories: linux-2.2.17/ipc and linux-2.2.17-pb/ipc
Common subdirectories: linux-2.2.17/kernel and linux-2.2.17-pb/kernel
Common subdirectories: linux-2.2.17/lib and linux-2.2.17-pb/lib
Common subdirectories: linux-2.2.17/mm and linux-2.2.17-pb/mm
Common subdirectories: linux-2.2.17/modules and linux-2.2.17-pb/modules
Common subdirectories: linux-2.2.17/net and linux-2.2.17-pb/net
Common subdirectories: linux-2.2.17/scripts and linux-2.2.17-pb/scripts
Binary files linux-2.2.17/vmlinux and linux-2.2.17-pb/vmlinux differ


--- linux-2.2.17/drivers/block/ide-floppy.c Mon Sep  4 19:39:16 2000
+++ linux-2.2.17-pb/drivers/block/ide-floppy.c  Sun Oct 22 20:30:10 2000
@@ -2,6 +2,7 @@
  * linux/drivers/block/ide-floppy.cVersion 0.9 Jul   4, 1999
  *
  * Copyright (C) 1996 - 1999 Gadi Oxman <[EMAIL PROTECTED]>
+ * Copyright (C) 2000    Paul Bristow <[EMAIL PROTECTED]>
  */
 
 /*
@@ -29,9 +30,14 @@
  * Ver 0.9   Jul  4 99   Fix a bug which might have caused the number of
  *bytes requested on each interrupt to be zero.
  *Thanks to <[EMAIL PROTECTED]> for pointing this out.
+ * Ver 0.91  Dec 11 99   Added IOMEGA Clik! drive support by 
+ *   <[EMAIL PROTECTED]>
+ * Ver 0.92  Oct 22 00   Paul Bristow became official maintainer for this i
+ *   driver.  Included Powerbook internal zip kludge.
+ *   
  */
 
-#define IDEFLOPPY_VERSION "0.9"
+#define IDEFLOPPY_VERSION "0.92"
 
 #include 
 #include 
@@ -60,6 +66,7 @@
  */
 #include "ide.h"
 
+
 /*
  * The following are used to debug the driver.
  */
@@ -1205,6 +1212,15 @@
idefloppy_flexible_disk_page_t *page;
    int capacity, lba_capacity;
 
+/* Inserted by Paul Bristow
+ *  The IOMEGA Clik! drive does not support this command
+ *  so I removed it and fake the important parameters.  
+ *  This does not appear to have any major side effects,
+ *  so I hope everything is OK.
+ */
+if (!strstr(drive->id->model,"Clik")) {
+
+
idefloppy_create_mode_sense_cmd (, IDEFLOPPY_FLEXIBLE_DISK_PAGE, 
MODE_SENSE_CURRENT);
if (idefloppy_queue_pc_tail (drive,)) {
printk (KERN_ERR "ide-floppy: Can't get flexible disk page 
parameters\n");
@@ -1235,6 +1251,16 @@

[PATCH] 2.2.18pre17 updates to IDE-floppy driver

2000-10-22 Thread Paul Bristow

Andre, Alan, others,

As agreed with Gadi and Andre I have taken over the ide-floppy driver
maintainence from Gadi Oxman (thanks for all your work so far Gadi!). 
Anyone with outstanding patches/suggestions etc could you send them to
me?

Please find attached the patch to update the IDE-Floppy driver to
include IOMEGA Clik! (or PocketZip) support.  This patch applies cleanly
to 2.2.17 and 2.2.18pre17.  Details on how to use the Clik! drive with
this patch are available at http://paulbristow.net/linux/clik.html

This updated driver has been tested as a module and compiled in, and the
Clik! mods did not break my LS-120 drive. 

I also include a patch to the CREDITS and MAINTAINERS file so people
know where to reach me.

Now to get it working in 2.4...

Regards,

-- 

Paul

Email: [EMAIL PROTECTED] 
(NOTE: change from [EMAIL PROTECTED] as mail.com unreliable)
Web: http://paulbristow.net
ICQ: #11965223

diff -u -b --exclude='*.o' --exclude='.*' --exclude='*.a' --exclude=System.map 
linux-2.2.17/CREDITS linux-2.2.17-pb/CREDITS
--- linux-2.2.17/CREDITSMon Sep  4 19:39:15 2000
+++ linux-2.2.17-pb/CREDITS Sun Oct 22 15:56:46 2000
@@ -290,6 +290,11 @@
 S: Lancaster, LA1 4DN
 S: UK, England
 
+N: Paul Bristow
+E: [EMAIL PROTECTED]
+W: http://paulbristow.net/linux
+D: ide-floppy maintainer
+
 N: Andries Brouwer
 E: [EMAIL PROTECTED]
 D: random Linux hacker
Common subdirectories: linux-2.2.17/Documentation and linux-2.2.17-pb/Documentation
diff -u -b --exclude='*.o' --exclude='.*' --exclude='*.a' --exclude=System.map 
linux-2.2.17/MAINTAINERS linux-2.2.17-pb/MAINTAINERS
--- linux-2.2.17/MAINTAINERSMon Sep  4 19:39:16 2000
+++ linux-2.2.17-pb/MAINTAINERS Sun Oct 22 19:55:27 2000
@@ -446,12 +446,19 @@
 L: [EMAIL PROTECTED]
 S: Maintained
 
-IDE/ATAPI TAPE/FLOPPY DRIVERS
+IDE/ATAPI TAPE DRIVERS
 P: Gadi Oxman
 M: Gadi Oxman [EMAIL PROTECTED]
 L: [EMAIL PROTECTED]
 S: Maintained
 
+IDE/ATAPI FLOPPY DRIVERS
+P: Paul Bristow
+M: Paul Bristow [EMAIL PROTECTED]
+W:  http://paulbristow.net/linux
+L: [EMAIL PROTECTED]
+S: Maintained
+
 IP FIREWALL
 P: Paul Russell
 M: [EMAIL PROTECTED]
Common subdirectories: linux-2.2.17/arch and linux-2.2.17-pb/arch
Common subdirectories: linux-2.2.17/drivers and linux-2.2.17-pb/drivers
Common subdirectories: linux-2.2.17/fs and linux-2.2.17-pb/fs
Common subdirectories: linux-2.2.17/include and linux-2.2.17-pb/include
Common subdirectories: linux-2.2.17/init and linux-2.2.17-pb/init
Common subdirectories: linux-2.2.17/ipc and linux-2.2.17-pb/ipc
Common subdirectories: linux-2.2.17/kernel and linux-2.2.17-pb/kernel
Common subdirectories: linux-2.2.17/lib and linux-2.2.17-pb/lib
Common subdirectories: linux-2.2.17/mm and linux-2.2.17-pb/mm
Common subdirectories: linux-2.2.17/modules and linux-2.2.17-pb/modules
Common subdirectories: linux-2.2.17/net and linux-2.2.17-pb/net
Common subdirectories: linux-2.2.17/scripts and linux-2.2.17-pb/scripts
Binary files linux-2.2.17/vmlinux and linux-2.2.17-pb/vmlinux differ


--- linux-2.2.17/drivers/block/ide-floppy.c Mon Sep  4 19:39:16 2000
+++ linux-2.2.17-pb/drivers/block/ide-floppy.c  Sun Oct 22 20:30:10 2000
@@ -2,6 +2,7 @@
  * linux/drivers/block/ide-floppy.cVersion 0.9 Jul   4, 1999
  *
  * Copyright (C) 1996 - 1999 Gadi Oxman [EMAIL PROTECTED]
+ * Copyright (C) 2000Paul Bristow [EMAIL PROTECTED]
  */
 
 /*
@@ -29,9 +30,14 @@
  * Ver 0.9   Jul  4 99   Fix a bug which might have caused the number of
  *bytes requested on each interrupt to be zero.
  *Thanks to [EMAIL PROTECTED] for pointing this out.
+ * Ver 0.91  Dec 11 99   Added IOMEGA Clik! drive support by 
+ *   [EMAIL PROTECTED]
+ * Ver 0.92  Oct 22 00   Paul Bristow became official maintainer for this i
+ *   driver.  Included Powerbook internal zip kludge.
+ *   
  */
 
-#define IDEFLOPPY_VERSION "0.9"
+#define IDEFLOPPY_VERSION "0.92"
 
 #include linux/config.h
 #include linux/module.h
@@ -60,6 +66,7 @@
  */
 #include "ide.h"
 
+
 /*
  * The following are used to debug the driver.
  */
@@ -1205,6 +1212,15 @@
idefloppy_flexible_disk_page_t *page;
int capacity, lba_capacity;
 
+    /* Inserted by Paul Bristow
+ *  The IOMEGA Clik! drive does not support this command
+ *  so I removed it and fake the important parameters.  
+ *  This does not appear to have any major side effects,
+ *  so I hope everything is OK.
+ */
+if (!strstr(drive-id-model,"Clik")) {
+
+
idefloppy_create_mode_sense_cmd (pc, IDEFLOPPY_FLEXIBLE_DISK_PAGE, 
MODE_SENSE_CURRENT);
if (idefloppy_queue_pc_tail (drive,pc)) {
printk (KERN_ERR "ide-floppy: Can't get flexible disk page 
parameters\n");
@@ -1235,6 +1251,16 @@