public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ide-floppy & devfs - /dev entry not created if drive is empty
@ 2002-08-18 18:56 Stanislav Brabec
  2002-08-20  0:04 ` Kevin P. Fleming
  0 siblings, 1 reply; 7+ messages in thread
From: Stanislav Brabec @ 2002-08-18 18:56 UTC (permalink / raw)
  To: Paul Bristow; +Cc: linux-kernel

Hallo Paul Bristow,

I have tested ide-floppy on my Linux 2.4.19 with ATAPI ZIP 100. I am
using devfs.

I found following problem:

If module ide-floppy is loaded and no disc is present in the drive,
/dev/ide/host0/bus1/target1/lun0/disc entry is not created. Later
inserted media cannot be checked in any way, because no /dev entry
exists.

Older kernels have also this behavior.

Fix: Create .../disc entry in all cases, even if no disc is present.

-- 
Stanislav Brabec
http://www.penguin.cz/~utx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ide-floppy & devfs - /dev entry not created if drive is empty
  2002-08-18 18:56 ide-floppy & devfs - /dev entry not created if drive is empty Stanislav Brabec
@ 2002-08-20  0:04 ` Kevin P. Fleming
  2002-08-20  0:45   ` Andre Hedrick
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin P. Fleming @ 2002-08-20  0:04 UTC (permalink / raw)
  To: Stanislav Brabec; +Cc: Paul Bristow, linux-kernel

There are patches at http://members.cox.net/kpfleming/ide-floppy to 
resolve this.

Stanislav Brabec wrote:
> Hallo Paul Bristow,
> 
> I have tested ide-floppy on my Linux 2.4.19 with ATAPI ZIP 100. I am
> using devfs.
> 
> I found following problem:
> 
> If module ide-floppy is loaded and no disc is present in the drive,
> /dev/ide/host0/bus1/target1/lun0/disc entry is not created. Later
> inserted media cannot be checked in any way, because no /dev entry
> exists.
> 
> Older kernels have also this behavior.
> 
> Fix: Create .../disc entry in all cases, even if no disc is present.
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ide-floppy & devfs - /dev entry not created if drive is empty
  2002-08-20  0:04 ` Kevin P. Fleming
@ 2002-08-20  0:45   ` Andre Hedrick
  2002-08-20  1:12     ` Kevin P. Fleming
  0 siblings, 1 reply; 7+ messages in thread
From: Andre Hedrick @ 2002-08-20  0:45 UTC (permalink / raw)
  To: Kevin P. Fleming; +Cc: Stanislav Brabec, Paul Bristow, linux-kernel


Patch is welcome here.

Drop it on AC and myself please. 

On Mon, 19 Aug 2002, Kevin P. Fleming wrote:

> There are patches at http://members.cox.net/kpfleming/ide-floppy to 
> resolve this.
> 
> Stanislav Brabec wrote:
> > Hallo Paul Bristow,
> > 
> > I have tested ide-floppy on my Linux 2.4.19 with ATAPI ZIP 100. I am
> > using devfs.
> > 
> > I found following problem:
> > 
> > If module ide-floppy is loaded and no disc is present in the drive,
> > /dev/ide/host0/bus1/target1/lun0/disc entry is not created. Later
> > inserted media cannot be checked in any way, because no /dev entry
> > exists.
> > 
> > Older kernels have also this behavior.
> > 
> > Fix: Create .../disc entry in all cases, even if no disc is present.
> > 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

Andre Hedrick
LAD Storage Consulting Group


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ide-floppy & devfs - /dev entry not created if drive is empty
  2002-08-20  0:45   ` Andre Hedrick
@ 2002-08-20  1:12     ` Kevin P. Fleming
  2002-08-20  1:19       ` Andre Hedrick
  2002-08-20 11:09       ` Stanislav Brabec
  0 siblings, 2 replies; 7+ messages in thread
From: Kevin P. Fleming @ 2002-08-20  1:12 UTC (permalink / raw)
  To: Andre Hedrick; +Cc: Stanislav Brabec, Paul Bristow, linux-kernel

I'll let Paul handle this, since he is the ide-floppy maintainer and has 
some other changes he wants to make. If you do not get anything from him 
in a week or so, please let me know and I'll updates the patches to the 
latest -ac kernel and send them.

Oh, there is one non-ide-floppy patch, this cleans up a small part of 
ide-probe and ensures that ide-floppy devices are marked as removable 
devices. Last kernel I applied it to was 2.4.20-pre2-ac1, it may have 
problems with the newer ones if you've worked on ide-probe.

diff -X dontdiff -urN linux/drivers/ide/ide-probe.c 
linux-probe/drivers/ide/ide-probe.c
--- linux/drivers/ide/ide-probe.c	Thu Jun  6 10:00:50 2002
+++ linux-probe/drivers/ide/ide-probe.c	Thu Jun  6 10:37:41 2002
@@ -130,31 +130,40 @@
  			goto err_misc;
  		}
  #endif /* CONFIG_BLK_DEV_PDC4030 */
+		/*
+		 * Handle drive type overrides for "unusual" devices
+		 */
  		switch (type) {
-			case ide_floppy:
-				if (!strstr(id->model, "CD-ROM")) {
-					if (!strstr(id->model, "oppy") &&
-					    !strstr(id->model, "poyp") &&
-					    !strstr(id->model, "ZIP"))
-						printk("cdrom or floppy?, assuming ");
-					if (drive->media != ide_cdrom) {
-						printk ("FLOPPY");
-						break;
-					}
-				}
+		case ide_floppy:
+			if (strstr(id->model, "CD-ROM")) {
+				type = ide_cdrom;
+				break;
+			}
+			if (!strstr(id->model, "oppy") &&
+			    !strstr(id->model, "poyp") &&
+			    !strstr(id->model, "ZIP"))
+				printk("cdrom or floppy?, assuming ");
+			if (drive->media == ide_cdrom)
  				type = ide_cdrom;	/* Early cdrom models used zero */
-			case ide_cdrom:
-				drive->removable = 1;
+			break;
  #ifdef CONFIG_PPC
+		case ide_cdrom:
  				/* kludge for Apple PowerBook internal zip */
-				if (!strstr(id->model, "CD-ROM") &&
-				    strstr(id->model, "ZIP")) {
-					printk ("FLOPPY");
-					type = ide_floppy;
-					break;
-				}
+			if (!strstr(id->model, "CD-ROM") &&
+			    strstr(id->model, "ZIP")) {
+				type = ide_floppy;
+				break;
+			}
  #endif
+		}
+		switch (type) {
+ 			case ide_floppy:
+ 				printk ("FLOPPY");
+ 				drive->removable = 1;
+ 				break;
+ 			case ide_cdrom:
  				printk ("CD/DVD-ROM");
+ 				drive->removable = 1;
  				break;
  			case ide_tape:
  				printk ("TAPE");


Andre Hedrick wrote:
> Patch is welcome here.
> 
> Drop it on AC and myself please. 
> 
> On Mon, 19 Aug 2002, Kevin P. Fleming wrote:
> 
> 
>>There are patches at http://members.cox.net/kpfleming/ide-floppy to 
>>resolve this.
>>
>>Stanislav Brabec wrote:
>>
>>>Hallo Paul Bristow,
>>>
>>>I have tested ide-floppy on my Linux 2.4.19 with ATAPI ZIP 100. I am
>>>using devfs.
>>>
>>>I found following problem:
>>>
>>>If module ide-floppy is loaded and no disc is present in the drive,
>>>/dev/ide/host0/bus1/target1/lun0/disc entry is not created. Later
>>>inserted media cannot be checked in any way, because no /dev entry
>>>exists.
>>>
>>>Older kernels have also this behavior.
>>>
>>>Fix: Create .../disc entry in all cases, even if no disc is present.
>>>
>>
>>-
>>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>the body of a message to majordomo@vger.kernel.org
>>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>Please read the FAQ at  http://www.tux.org/lkml/
>>
> 
> 
> Andre Hedrick
> LAD Storage Consulting Group
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ide-floppy & devfs - /dev entry not created if drive is empty
  2002-08-20  1:12     ` Kevin P. Fleming
@ 2002-08-20  1:19       ` Andre Hedrick
  2002-08-20 11:09       ` Stanislav Brabec
  1 sibling, 0 replies; 7+ messages in thread
From: Andre Hedrick @ 2002-08-20  1:19 UTC (permalink / raw)
  To: Kevin P. Fleming; +Cc: Stanislav Brabec, Paul Bristow, linux-kernel


Thanks Kevin!

Regardless we do it now, I have been held off for to long to clean house.

AC and I are on a major role.  AC is putting the final touchs on the my
original modular chipset solution.  He is doing the kernel correctness
while I keep the within the limits of the hardware.  The converse is as I
go broad in design and intentionally bloat code to show common calls, AC
is able to finish the slice and final code reductions as togather we purge
the history of bloating.  AC gets the reason for my bloat direction and on
occassion I beat him to the punch on the net bloat reduction solution.

Cheers,


Andre Hedrick
LAD Storage Consulting Group



On Mon, 19 Aug 2002, Kevin P. Fleming wrote:

> I'll let Paul handle this, since he is the ide-floppy maintainer and has 
> some other changes he wants to make. If you do not get anything from him 
> in a week or so, please let me know and I'll updates the patches to the 
> latest -ac kernel and send them.
> 
> Oh, there is one non-ide-floppy patch, this cleans up a small part of 
> ide-probe and ensures that ide-floppy devices are marked as removable 
> devices. Last kernel I applied it to was 2.4.20-pre2-ac1, it may have 
> problems with the newer ones if you've worked on ide-probe.
> 
> diff -X dontdiff -urN linux/drivers/ide/ide-probe.c 
> linux-probe/drivers/ide/ide-probe.c
> --- linux/drivers/ide/ide-probe.c	Thu Jun  6 10:00:50 2002
> +++ linux-probe/drivers/ide/ide-probe.c	Thu Jun  6 10:37:41 2002
> @@ -130,31 +130,40 @@
>   			goto err_misc;
>   		}
>   #endif /* CONFIG_BLK_DEV_PDC4030 */
> +		/*
> +		 * Handle drive type overrides for "unusual" devices
> +		 */
>   		switch (type) {
> -			case ide_floppy:
> -				if (!strstr(id->model, "CD-ROM")) {
> -					if (!strstr(id->model, "oppy") &&
> -					    !strstr(id->model, "poyp") &&
> -					    !strstr(id->model, "ZIP"))
> -						printk("cdrom or floppy?, assuming ");
> -					if (drive->media != ide_cdrom) {
> -						printk ("FLOPPY");
> -						break;
> -					}
> -				}
> +		case ide_floppy:
> +			if (strstr(id->model, "CD-ROM")) {
> +				type = ide_cdrom;
> +				break;
> +			}
> +			if (!strstr(id->model, "oppy") &&
> +			    !strstr(id->model, "poyp") &&
> +			    !strstr(id->model, "ZIP"))
> +				printk("cdrom or floppy?, assuming ");
> +			if (drive->media == ide_cdrom)
>   				type = ide_cdrom;	/* Early cdrom models used zero */
> -			case ide_cdrom:
> -				drive->removable = 1;
> +			break;
>   #ifdef CONFIG_PPC
> +		case ide_cdrom:
>   				/* kludge for Apple PowerBook internal zip */
> -				if (!strstr(id->model, "CD-ROM") &&
> -				    strstr(id->model, "ZIP")) {
> -					printk ("FLOPPY");
> -					type = ide_floppy;
> -					break;
> -				}
> +			if (!strstr(id->model, "CD-ROM") &&
> +			    strstr(id->model, "ZIP")) {
> +				type = ide_floppy;
> +				break;
> +			}
>   #endif
> +		}
> +		switch (type) {
> + 			case ide_floppy:
> + 				printk ("FLOPPY");
> + 				drive->removable = 1;
> + 				break;
> + 			case ide_cdrom:
>   				printk ("CD/DVD-ROM");
> + 				drive->removable = 1;
>   				break;
>   			case ide_tape:
>   				printk ("TAPE");
> 
> 
> Andre Hedrick wrote:
> > Patch is welcome here.
> > 
> > Drop it on AC and myself please. 
> > 
> > On Mon, 19 Aug 2002, Kevin P. Fleming wrote:
> > 
> > 
> >>There are patches at http://members.cox.net/kpfleming/ide-floppy to 
> >>resolve this.
> >>
> >>Stanislav Brabec wrote:
> >>
> >>>Hallo Paul Bristow,
> >>>
> >>>I have tested ide-floppy on my Linux 2.4.19 with ATAPI ZIP 100. I am
> >>>using devfs.
> >>>
> >>>I found following problem:
> >>>
> >>>If module ide-floppy is loaded and no disc is present in the drive,
> >>>/dev/ide/host0/bus1/target1/lun0/disc entry is not created. Later
> >>>inserted media cannot be checked in any way, because no /dev entry
> >>>exists.
> >>>
> >>>Older kernels have also this behavior.
> >>>
> >>>Fix: Create .../disc entry in all cases, even if no disc is present.
> >>>
> >>
> >>-
> >>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> >>the body of a message to majordomo@vger.kernel.org
> >>More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>Please read the FAQ at  http://www.tux.org/lkml/
> >>
> > 
> > 
> > Andre Hedrick
> > LAD Storage Consulting Group
> > 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ide-floppy & devfs - /dev entry not created if drive is empty
  2002-08-20  1:12     ` Kevin P. Fleming
  2002-08-20  1:19       ` Andre Hedrick
@ 2002-08-20 11:09       ` Stanislav Brabec
  2002-08-20 17:02         ` Kevin P. Fleming
  1 sibling, 1 reply; 7+ messages in thread
From: Stanislav Brabec @ 2002-08-20 11:09 UTC (permalink / raw)
  To: Kevin P. Fleming; +Cc: Andre Hedrick, Paul Bristow, linux-kernel

Stanislav Brabec wrote:
>If module ide-floppy is loaded and no disc is present in the drive,
>/dev/ide/host0/bus1/target1/lun0/disc entry is not created. Later
>inserted media cannot be checked in any way, because no /dev entry
>exists.
>
Kevin P. Fleming wrote:
> diff -X dontdiff -urN linux/drivers/ide/ide-probe.c
> linux-probe/drivers/ide/ide-probe.c

Does anybody know, whether this problem was present on LS-120/240,
IOMEGA PocketZip and JAZ devices and is fixed now?

-- 
Stanislav Brabec
http://www.penguin.cz/~utx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ide-floppy & devfs - /dev entry not created if drive is empty
  2002-08-20 11:09       ` Stanislav Brabec
@ 2002-08-20 17:02         ` Kevin P. Fleming
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin P. Fleming @ 2002-08-20 17:02 UTC (permalink / raw)
  To: Stanislav Brabec; +Cc: Andre Hedrick, Paul Bristow, linux-kernel

This problem is present on all devices supported by the ide-floppy 
driver. It won't be fixed until the ide-probe patch makes it into the 
official kernel. At that point the /dev/discs/... entry for the drive 
will appear at boot time even without media present in the drive.

However, without my other media change handling patches, the partition 
entries inside the /dev/discs/... directory for the floppy drive will 
not stay in sync terribly well when you make media changes.

Stanislav Brabec wrote:
> Stanislav Brabec wrote:
> 
>>If module ide-floppy is loaded and no disc is present in the drive,
>>/dev/ide/host0/bus1/target1/lun0/disc entry is not created. Later
>>inserted media cannot be checked in any way, because no /dev entry
>>exists.
>>
> 
> Kevin P. Fleming wrote:
> 
>>diff -X dontdiff -urN linux/drivers/ide/ide-probe.c
>>linux-probe/drivers/ide/ide-probe.c
> 
> 
> Does anybody know, whether this problem was present on LS-120/240,
> IOMEGA PocketZip and JAZ devices and is fixed now?
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-08-20 16:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-18 18:56 ide-floppy & devfs - /dev entry not created if drive is empty Stanislav Brabec
2002-08-20  0:04 ` Kevin P. Fleming
2002-08-20  0:45   ` Andre Hedrick
2002-08-20  1:12     ` Kevin P. Fleming
2002-08-20  1:19       ` Andre Hedrick
2002-08-20 11:09       ` Stanislav Brabec
2002-08-20 17:02         ` Kevin P. Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox