* floppy driver bug: write-protect
@ 1998-11-16 1:27 Brad Midgley
1999-01-15 2:18 ` David A. Gatwood
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Brad Midgley @ 1998-11-16 1:27 UTC (permalink / raw)
To: linuxppc-dev
is this a known bug?
on intel linux, if you try to mount a write-protected floppy disk
read-write, the mount succeeds but is demoted to read-only.
the current pmac kernel will mount the disk read-write and will allow
"writes" to the disk. the writes even appear to succeed and the mounted
filesystem returns really strange results when you look at it (it's
caching the "writes" and everything seems normal until uncached data has
to be loaded from the disk!)
is it known how to query the drive for the write-protect status? does this
problem affect any other removable media?
brad
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: floppy driver bug: write-protect
1998-11-16 1:27 floppy driver bug: write-protect Brad Midgley
@ 1999-01-15 2:18 ` David A. Gatwood
1999-01-15 3:30 ` Brad Midgley
1999-01-15 3:31 ` Paul Mackerras
2 siblings, 0 replies; 5+ messages in thread
From: David A. Gatwood @ 1999-01-15 2:18 UTC (permalink / raw)
To: Brad Midgley; +Cc: linuxppc-dev
On Sun, 15 Nov 1998, Brad Midgley wrote:
> is this a known bug?
>
> on intel linux, if you try to mount a write-protected floppy disk
> read-write, the mount succeeds but is demoted to read-only.
>
> the current pmac kernel will mount the disk read-write and will allow
> "writes" to the disk. the writes even appear to succeed and the mounted
> filesystem returns really strange results when you look at it (it's
> caching the "writes" and everything seems normal until uncached data has
> to be loaded from the disk!)
>
> is it known how to query the drive for the write-protect status? does this
> problem affect any other removable media?
Wow, so you guys have that problem, too, eh? MkLinux's floppy driver does
the same thing. It's given me fits trying to find something in LinuxPPC
to demote it to read-only. Guess that's why I didn't find anything!!!
:-)
If anybody figures out how to fix this (no doubt the same fix, roughly,
for both), please let me know. I've gotten as far as forcing the device
read-only, but that flag is ignored by at least umsdos filesystem support,
not sure what else.... :-(
Later,
David
David A. Gatwood Visit globegate's internet
dgatwood@globegate.utm.edu talker, Deep Space 36
http://globegate.utm.edu telnet globegate.utm.edu:9624
-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++ ++>$ UBLAS*++ ++>$
P+?>$ L++ +>$ !E--- W++ +>$ N++(++ +)>++ +$ !o? K-? !w--- !O
M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t++ +>$ 5+>++ ++$ !X- !R tv+>$
b++>$ !DI !D- G++(++ +)>$ e>++ ++ h--! r--- !y-
------END GEEK CODE BLOCK------
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: floppy driver bug: write-protect
1998-11-16 1:27 floppy driver bug: write-protect Brad Midgley
1999-01-15 2:18 ` David A. Gatwood
@ 1999-01-15 3:30 ` Brad Midgley
1999-01-15 3:31 ` Paul Mackerras
2 siblings, 0 replies; 5+ messages in thread
From: Brad Midgley @ 1999-01-15 3:30 UTC (permalink / raw)
To: linuxppc-dev
This message was stuck in a mail queue since november!! (it was my own
sysadmin's fault :)
so when I say the current pmac kernel I really mean the pmac kernel of
November 15, 1998.
argh, i just checked and this bug is present in vger-pre5.
brad
>
> is this a known bug?
>
> on intel linux, if you try to mount a write-protected floppy disk
> read-write, the mount succeeds but is demoted to read-only.
>
> the current pmac kernel will mount the disk read-write and will allow
> "writes" to the disk. the writes even appear to succeed and the mounted
> filesystem returns really strange results when you look at it (it's
> caching the "writes" and everything seems normal until uncached data has
> to be loaded from the disk!)
>
> is it known how to query the drive for the write-protect status? does this
> problem affect any other removable media?
>
> brad
>
>
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: floppy driver bug: write-protect
1998-11-16 1:27 floppy driver bug: write-protect Brad Midgley
1999-01-15 2:18 ` David A. Gatwood
1999-01-15 3:30 ` Brad Midgley
@ 1999-01-15 3:31 ` Paul Mackerras
1999-01-15 18:34 ` David A. Gatwood
2 siblings, 1 reply; 5+ messages in thread
From: Paul Mackerras @ 1999-01-15 3:31 UTC (permalink / raw)
To: brad; +Cc: linuxppc-dev
Brad Midgley <brad@pht.com> wrote:
> is this a known bug?
well, I didn't know about it. :-)
> on intel linux, if you try to mount a write-protected floppy disk
> read-write, the mount succeeds but is demoted to read-only.
Do you have access to an intel-linux box? Could you do an strace on
the mount command on a write-protected floppy and see whether mount
does two mount system calls (the first failing with EROFS), or if it
does some other ioctl to check whether the disk is write-protected?
> the current pmac kernel will mount the disk read-write and will allow
> "writes" to the disk. the writes even appear to succeed and the mounted
OK, I need to check the write-protect status in the floppy_write
routine in swim3.c.
I have recently looked at the floppy driver source code in MkLinux,
which looks like it is derived from macos sources. It looks like
there are a few tweaks which I need to do to the Linux/PPC driver.
Paul.
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: floppy driver bug: write-protect
1999-01-15 3:31 ` Paul Mackerras
@ 1999-01-15 18:34 ` David A. Gatwood
0 siblings, 0 replies; 5+ messages in thread
From: David A. Gatwood @ 1999-01-15 18:34 UTC (permalink / raw)
To: Paul.Mackerras; +Cc: brad, linuxppc-dev
On Fri, 15 Jan 1999, Paul Mackerras wrote:
> OK, I need to check the write-protect status in the floppy_write
> routine in swim3.c.
>
> I have recently looked at the floppy driver source code in MkLinux,
> which looks like it is derived from macos sources. It looks like
> there are a few tweaks which I need to do to the Linux/PPC driver.
MkLinux's driver is based on a Copland driver with a Mach Driver
interwoven and some shim code. Needs massive cleanup, but basically works
as long as you don't have more than one floppy drive. Also a little
trouble with writing large chunks of data (not sure why).
Thanks for the info on how the write protect is supposed to work. I put
some checks for write protect on write, but making the mount fail is a
much more logical solution.
Later,
David
David A. Gatwood Visit globegate's internet
dgatwood@globegate.utm.edu talker, Deep Space 36
http://globegate.utm.edu telnet globegate.utm.edu:9624
-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++ ++>$ UBLAS*++ ++>$
P+?>$ L++ +>$ !E--- W++ +>$ N++(++ +)>++ +$ !o? K-? !w--- !O
M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t++ +>$ 5+>++ ++$ !X- !R tv+>$
b++>$ !DI !D- G++(++ +)>$ e>++ ++ h--! r--- !y-
------END GEEK CODE BLOCK------
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1999-01-15 18:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-11-16 1:27 floppy driver bug: write-protect Brad Midgley
1999-01-15 2:18 ` David A. Gatwood
1999-01-15 3:30 ` Brad Midgley
1999-01-15 3:31 ` Paul Mackerras
1999-01-15 18:34 ` David A. Gatwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).