Discussion:
Deprecating / Removing floppy drive support
Eitan Adler
2017-12-03 02:18:08 UTC
Permalink
Hi all,

I'd like to remove floppy drive support from FreeBSD:

- The physical media is no longer produced
- Computers produced in the last 10-15 years don't have a floppy drive reader
- There are still a few open bug reports relating to floppies(!)
- Its several thousand lines of code that could be removed

Is there any reason to continue supporting floppy drives in FreeBSD 12.0+?
--
Eitan Adler
Warner Losh
2017-12-03 03:09:25 UTC
Permalink
Post by Eitan Adler
Hi all,
- The physical media is no longer produced
There's still one company producing 3.5" floppies, though it's in super low
volume. And the media is still readily available.
Post by Eitan Adler
- Computers produced in the last 10-15 years don't have a floppy drive reader
More like 8 years, but regardless of the actual year, that's also a weak
argument.
Post by Eitan Adler
- There are still a few open bug reports relating to floppies(!)
That would show it's still in use.
Post by Eitan Adler
- Its several thousand lines of code that could be removed
Clang is much more than that.
Post by Eitan Adler
Is there any reason to continue supporting floppy drives in FreeBSD 12.0+?
That's a backwards question to project.

However, to make your argument legit:

Floppy support has been decaying for years. It hasn't worked well since
FreeBSD 6, and was completely broken sometime after FreeBSD 10 was
branched. We lost support for having two floppies on the same bus around
FreeBSD 7. And using fdcontrol to set the format became tricking between
FreeBSD 8 and 9. Floppies written today contain garbage due to ISA DMA
breakages post FreeBSD 10. They simply don't work at all in 11, and nobody
has stepped up to fix them. (I tried last summer, and gave up and got a
kyroflux.com board instead). Floppies used to be important, but not any
more. We've lost the only platform that required one to boot off floppies
(pc98) and the older x86 that required it doesn't run FreeBSD anymore
anyway. We never supported fdc on non x86 platforms, so those aren't a
consideration.

We do have some floppy support in umass, but that should stay since USB
floppy drives are still a thing.

Normally, I'd argue we might want to have a release where it's deprecated,
but it already was unusable in 11, and barely usable in 10 and has been a
shadow of its former self for much longer than that.

Warner
A. Wilcox
2017-12-03 03:34:01 UTC
Permalink
Post by Warner Losh
the older x86 that required it doesn't run FreeBSD anymore
anyway.
is this an official acknowledgement of the PR that I attempted to file
before I even changed my name[1] but was shooed away because "it works
in qemu"?

n.b. printf never succeeded even at the beginning of init386; at that
point my day job was far too pressing to continue tinkering for a while.
Of course, I gave up completely after being called an idiot for even
trying[2].

Not that such an acknowledgement would make me /happy/ (on the contrary,
my last FreeBSD computer is a Pentium II that is still clinging to
9-stable because 10 and 11 don't boot on it; haven't tried 12), but at
least the project seems(?) to be ready to acknowledge that the hardware
notes for x86 are a bold face lie[3] and that FreeBSD does *not* support
chips that don't have SSE any more.

--arw


[1]:
https://lists.freebsd.org/pipermail/freebsd-current/2015-February/054659.html
[2]: https://www.mail-archive.com/***@fug.com.br/msg76535.html
[3]: https://www.freebsd.org/releases/11.1R/hardware.html#proc
--
A. Wilcox (awilfox)
Open-source programmer (C, C++, Python)
https://code.foxkit.us/u/awilfox/
Eitan Adler
2017-12-03 03:13:09 UTC
Permalink
Post by Eitan Adler
Hi all,
To clarify: this proposed removing fdc, related utilities, boot
support. It does not touch USB floppy drives.

https://reviews.freebsd.org/differential/diff/36131/ is an untested
*first draft* of the proposed change.
--
Eitan Adler
Cy Schubert
2017-12-03 03:31:25 UTC
Permalink
In message <CANCZdfoukb=-YxU6Jp-***@mail.gmail.c
om>
Post by Warner Losh
Post by Eitan Adler
Hi all,
- The physical media is no longer produced
There's still one company producing 3.5" floppies, though it's in super low
volume. And the media is still readily available.
I can still buy them here in Victoria, BC. They're still floating around at
$JOB.
Post by Warner Losh
Post by Eitan Adler
- Computers produced in the last 10-15 years don't have a floppy drive
reader
More like 8 years, but regardless of the actual year, that's also a weak
argument.
Agreed.
Post by Warner Losh
Post by Eitan Adler
- There are still a few open bug reports relating to floppies(!)
That would show it's still in use.
I'd be willing to tackle them once I've worked through my current stack of
projects.
Post by Warner Losh
Post by Eitan Adler
- Its several thousand lines of code that could be removed
Clang is much more than that.
Post by Eitan Adler
Is there any reason to continue supporting floppy drives in FreeBSD 12.0+?
That's a backwards question to project.
Floppy support has been decaying for years. It hasn't worked well since
FreeBSD 6, and was completely broken sometime after FreeBSD 10 was
branched. We lost support for having two floppies on the same bus around
FreeBSD 7. And using fdcontrol to set the format became tricking between
FreeBSD 8 and 9. Floppies written today contain garbage due to ISA DMA
breakages post FreeBSD 10. They simply don't work at all in 11, and nobody
has stepped up to fix them. (I tried last summer, and gave up and got a
kyroflux.com board instead). Floppies used to be important, but not any
more. We've lost the only platform that required one to boot off floppies
(pc98) and the older x86 that required it doesn't run FreeBSD anymore
anyway. We never supported fdc on non x86 platforms, so those aren't a
consideration.
We do have some floppy support in umass, but that should stay since USB
floppy drives are still a thing.
bms@ has given me USB floppy formatting code which I'd planned to merge
into fdformat but considering the underlying devices are so very different
it would be a difficult marriage. I'd be willing to support a ufdformat
instead.
Post by Warner Losh
Normally, I'd argue we might want to have a release where it's deprecated,
but it already was unusable in 11, and barely usable in 10 and has been a
shadow of its former self for much longer than that.
The reason to keep some form of floppy support, eder fd or ufd is for the
purpose of copying (dd) floppy media into image files for use with
virtualbox or bhyve VMs. -- (One could say the same for CD and DVD drives.
My new laptop at $JOB has no CD/DVD drive.) I digress. I think the ability
to copy media to image files for VMs might be a reason to keep some form of
support fd or ufd.
--
Cheers,
Cy Schubert <***@cschubert.com>
FreeBSD UNIX: <***@FreeBSD.org> Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
Warner Losh
2017-12-03 04:47:55 UTC
Permalink
into fdformat but considering the underlying devices are so very different
Post by Cy Schubert
it would be a difficult marriage. I'd be willing to support a ufdformat
instead.
I'm keen on getting that into the tree. I have a ufd device and a need to
use it from time to time. If nothing else, I can be a reviewer of the code.
Is ufd working for you?
Post by Cy Schubert
Post by Warner Losh
Normally, I'd argue we might want to have a release where it's
deprecated,
Post by Warner Losh
but it already was unusable in 11, and barely usable in 10 and has been a
shadow of its former self for much longer than that.
The reason to keep some form of floppy support, eder fd or ufd is for the
purpose of copying (dd) floppy media into image files for use with
virtualbox or bhyve VMs. -- (One could say the same for CD and DVD drives.
My new laptop at $JOB has no CD/DVD drive.) I digress. I think the ability
to copy media to image files for VMs might be a reason to keep some form of
support fd or ufd.
I'm not sure I understand what you're saying here...

Warner
Cy Schubert
2017-12-03 06:16:15 UTC
Permalink
In message <CANCZdfrYdQTtjZJ_+jSVr25wjAZXd-+***@mail.gmail.c
om>
--001a1144e7002bf7b0055f684ec8
Content-Type: text/plain; charset="UTF-8"
into fdformat but considering the underlying devices are so very different
Post by Cy Schubert
it would be a difficult marriage. I'd be willing to support a ufdformat
instead.
I'm keen on getting that into the tree. I have a ufd device and a need to
use it from time to time. If nothing else, I can be a reviewer of the code.
Is ufd working for you?
It does work. My todo was to merge ufdformat into fdformat but as I said
they are different enough that I need to work out how best to merge them.
Having said that, now that there's discussion of removing fdc(4) maybe it's
best to simply use ufdformat separately from fdformat that when we have the
inclination to remove fdc(4), which may be very soon now -- it would be
much less messy. I'm open to either option.
Post by Cy Schubert
Post by Warner Losh
Normally, I'd argue we might want to have a release where it's
deprecated,
Post by Warner Losh
but it already was unusable in 11, and barely usable in 10 and has been a
shadow of its former self for much longer than that.
The reason to keep some form of floppy support, eder fd or ufd is for the
purpose of copying (dd) floppy media into image files for use with
virtualbox or bhyve VMs. -- (One could say the same for CD and DVD drives.
My new laptop at $JOB has no CD/DVD drive.) I digress. I think the ability
to copy media to image files for VMs might be a reason to keep some form of
support fd or ufd.
I'm not sure I understand what you're saying here...
What I'm saying is that maintaining some form of fdc support whether it be
in fdc(4) or a USB floppy the ability to dd floppy images for subsequent
use in a VM would be desirable. I'm thinking of one example brought to my
attention about a month ago where a person I know needed to copy old floppy
disks to images on his hard drive in order to install an old sewing machine
application in a virtualbox VM running Windows.

Tangentially speaking, we could make the same case for CD and DVD drives
not too many years from now...

Personally, I don't care much (well maybe just a little) if fdc(4) itself
is removed however I think we need some kind of support, which USB fd can
supply if or when fdc(4) is removed. Maybe we should deprecate in 12 and
remove in 13?
--
Cheers,
Cy Schubert <***@cschubert.com>
FreeBSD UNIX: <***@FreeBSD.org> Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
Hans Petter Selasky
2017-12-03 08:38:41 UTC
Permalink
Post by Cy Schubert
om>
--001a1144e7002bf7b0055f684ec8
Content-Type: text/plain; charset="UTF-8"
into fdformat but considering the underlying devices are so very different
Post by Cy Schubert
it would be a difficult marriage. I'd be willing to support a ufdformat
instead.
I'm keen on getting that into the tree. I have a ufd device and a need to
use it from time to time. If nothing else, I can be a reviewer of the code.
Is ufd working for you?
It does work. My todo was to merge ufdformat into fdformat but as I said
they are different enough that I need to work out how best to merge them.
Having said that, now that there's discussion of removing fdc(4) maybe it's
best to simply use ufdformat separately from fdformat that when we have the
inclination to remove fdc(4), which may be very soon now -- it would be
much less messy. I'm open to either option.
Post by Cy Schubert
Post by Warner Losh
Normally, I'd argue we might want to have a release where it's
deprecated,
Post by Warner Losh
but it already was unusable in 11, and barely usable in 10 and has been a
shadow of its former self for much longer than that.
The reason to keep some form of floppy support, eder fd or ufd is for the
purpose of copying (dd) floppy media into image files for use with
virtualbox or bhyve VMs. -- (One could say the same for CD and DVD drives.
My new laptop at $JOB has no CD/DVD drive.) I digress. I think the ability
to copy media to image files for VMs might be a reason to keep some form of
support fd or ufd.
I'm not sure I understand what you're saying here...
What I'm saying is that maintaining some form of fdc support whether it be
in fdc(4) or a USB floppy the ability to dd floppy images for subsequent
use in a VM would be desirable. I'm thinking of one example brought to my
attention about a month ago where a person I know needed to copy old floppy
disks to images on his hard drive in order to install an old sewing machine
application in a virtualbox VM running Windows.
Tangentially speaking, we could make the same case for CD and DVD drives
not too many years from now...
Personally, I don't care much (well maybe just a little) if fdc(4) itself
is removed however I think we need some kind of support, which USB fd can
supply if or when fdc(4) is removed. Maybe we should deprecate in 12 and
remove in 13?
Hi,

I think as long as you can read and write USB floppy drives under
FreeBSD, this change is OK. Even though floppies are old-tech they are
still important:

https://news.slashdot.org/story/16/05/25/2054255/us-military-uses-8-inch-floppy-disks-to-coordinate-nuclear-force-operations

And from time to time we see criminal cases popping up with crazy people
using old C64's with floppy disks. I would feel bad if removing support
for floppies from FreeBSD would mean you would depend on a Windows
installation to read such disks.

Further, keep this change two-step. First remove the code from GENERIC.
Then wait a year and see if anyone complains. Then delete the source code.

--HPS

--HPS
Poul-Henning Kamp
2017-12-03 10:27:57 UTC
Permalink
--------
Post by Hans Petter Selasky
I think as long as you can read and write USB floppy drives under
FreeBSD, this change is OK. Even though floppies are old-tech they are
https://news.slashdot.org/story/16/05/25/2054255/us-military-uses-8-inch-floppy-disks-to-coordinate-nuclear-force-operations
Incidentally FreeBSD is/was the only modern OS which could still read 8" floppies.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
***@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
Gary Jennejohn
2017-12-03 11:00:28 UTC
Permalink
On Sun, 03 Dec 2017 10:27:57 +0000
Post by Poul-Henning Kamp
--------
Post by Hans Petter Selasky
I think as long as you can read and write USB floppy drives under
FreeBSD, this change is OK. Even though floppies are old-tech they are
https://news.slashdot.org/story/16/05/25/2054255/us-military-uses-8-inch-floppy-disks-to-coordinate-nuclear-force-operations
Incidentally FreeBSD is/was the only modern OS which could
still read 8" floppies.
Really? I still have an 8" drive and floppies laying around. But try
to find a controller for a modern computer which doesn't even have one
for a 3-1/2" floppy drive..
--
Gary Jennejohn
Poul-Henning Kamp
2017-12-03 11:21:31 UTC
Permalink
--------
Post by Gary Jennejohn
On Sun, 03 Dec 2017 10:27:57 +0000
Post by Poul-Henning Kamp
Incidentally FreeBSD is/was the only modern OS which could
still read 8" floppies.
Really? I still have an 8" drive and floppies laying around. But try
to find a controller for a modern computer which doesn't even have one
for a 3-1/2" floppy drive..
I'm not saying it is worth it, there are better data-preservation tools
than FreeBSD for this. Check out the "Kryoflux" for instance.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
***@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
Alex Kozlov
2017-12-03 11:33:41 UTC
Permalink
Post by Gary Jennejohn
On Sun, 03 Dec 2017 10:27:57 +0000
Post by Poul-Henning Kamp
Incidentally FreeBSD is/was the only modern OS which could
still read 8" floppies.
Well, with proper* cable you can connect 8" drive to fdc and read
it pretty much on any OS that supports floppies.

*) http://www.retrotechnology.com/herbs_stuff/34_to_50.txt
Post by Gary Jennejohn
Really? I still have an 8" drive and floppies laying around. But try
to find a controller for a modern computer which doesn't even have one
for a 3-1/2" floppy drive..
I've tried to transfer 8" floppies a few years ago, it had not worked well.
I think it was 9-stable. In the end I bought kryoflux controller.
--
Alex
Poul-Henning Kamp
2017-12-03 11:56:27 UTC
Permalink
--------
Post by Alex Kozlov
Post by Gary Jennejohn
On Sun, 03 Dec 2017 10:27:57 +0000
Post by Poul-Henning Kamp
Incidentally FreeBSD is/was the only modern OS which could
still read 8" floppies.
Well, with proper* cable you can connect 8" drive to fdc and read
it pretty much on any OS that supports floppies.
Uhm... no ?

Very few OS's have had 8" format compatible settings since CP/M
and even fewer handle the track46 pin correctly on write.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
***@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
Alex Kozlov
2017-12-03 12:18:21 UTC
Permalink
Post by Poul-Henning Kamp
--------
Post by Alex Kozlov
Post by Gary Jennejohn
On Sun, 03 Dec 2017 10:27:57 +0000
Post by Poul-Henning Kamp
Incidentally FreeBSD is/was the only modern OS which could
still read 8" floppies.
Well, with proper* cable you can connect 8" drive to fdc and read
it pretty much on any OS that supports floppies.
Uhm... no ?
Very few OS's have had 8" format compatible settings since CP/M
and even fewer handle the track46 pin correctly on write.
I'd done it in dos, I read about successful setups for Linux and
Windows(older). Anecdotally, I was not able to do it in FreeBSD.
--
Alex
Willem Jan Withagen
2017-12-04 09:26:17 UTC
Permalink
Post by Alex Kozlov
Post by Poul-Henning Kamp
--------
Post by Alex Kozlov
Post by Gary Jennejohn
On Sun, 03 Dec 2017 10:27:57 +0000
Post by Poul-Henning Kamp
Incidentally FreeBSD is/was the only modern OS which could
still read 8" floppies.
Well, with proper* cable you can connect 8" drive to fdc and read
it pretty much on any OS that supports floppies.
Uhm... no ?
Very few OS's have had 8" format compatible settings since CP/M
and even fewer handle the track46 pin correctly on write.
I'd done it in dos, I read about successful setups for Linux and
Windows(older). Anecdotally, I was not able to do it in FreeBSD.
Never too late to learn....

I still think I have my (from 1982) 8" disks around with a ported CP/M
system to a TRS-80 like system... But ever since the Intel ASM/CPM
developement stack died on the University they have been lying round for
nostalgic reasons. And the hardware got dumped with the last move about
12 years ago.

But it never ever occured to me that FreeBSD would be able to do 8", if
alone for the controller. But now I learn that it could have worked...
Cool :)

--WjW
Alex Kozlov
2017-12-04 10:38:44 UTC
Permalink
Post by Willem Jan Withagen
Post by Alex Kozlov
Post by Poul-Henning Kamp
Post by Alex Kozlov
Post by Gary Jennejohn
On Sun, 03 Dec 2017 10:27:57 +0000
Post by Poul-Henning Kamp
Incidentally FreeBSD is/was the only modern OS which could
still read 8" floppies.
Well, with proper* cable you can connect 8" drive to fdc and read
it pretty much on any OS that supports floppies.
Uhm... no ?
Very few OS's have had 8" format compatible settings since CP/M
and even fewer handle the track46 pin correctly on write.
I'd done it in dos, I read about successful setups for Linux and
Windows(older). Anecdotally, I was not able to do it in FreeBSD.
Never too late to learn....
I still think I have my (from 1982) 8" disks around with a ported CP/M
system to a TRS-80 like system... But ever since the Intel ASM/CPM
developement stack died on the University they have been lying round for
nostalgic reasons. And the hardware got dumped with the last move about
12 years ago.
But it never ever occured to me that FreeBSD would be able to do 8", if
alone for the controller. But now I learn that it could have worked...
Cool :)
Theoretically, it should work. In practice, as bde@ suggested, you may need
to use UP i386 kernel and perhaps downgrade to earlier version of FreeBSD.
Also you need to somehow acquire 34-to-50 cable or adaptor*. I made mine,
so perhaps that why I failed :)
You don't need to worry about tg43 signal if you don't plan to write on these
floppies.

In the end, after burning weekend on this little project, I realized that I
risk to burn much more time, so I just ordered kryoflux.

*) something like this Loading Image...
--
Alex
Willem Jan Withagen
2017-12-04 11:34:06 UTC
Permalink
Post by Alex Kozlov
Post by Willem Jan Withagen
Post by Alex Kozlov
Post by Poul-Henning Kamp
Post by Alex Kozlov
Post by Gary Jennejohn
On Sun, 03 Dec 2017 10:27:57 +0000
Post by Poul-Henning Kamp
Incidentally FreeBSD is/was the only modern OS which could
still read 8" floppies.
Well, with proper* cable you can connect 8" drive to fdc and read
it pretty much on any OS that supports floppies.
Uhm... no ?
Very few OS's have had 8" format compatible settings since CP/M
and even fewer handle the track46 pin correctly on write.
I'd done it in dos, I read about successful setups for Linux and
Windows(older). Anecdotally, I was not able to do it in FreeBSD.
Never too late to learn....
I still think I have my (from 1982) 8" disks around with a ported CP/M
system to a TRS-80 like system... But ever since the Intel ASM/CPM
developement stack died on the University they have been lying round for
nostalgic reasons. And the hardware got dumped with the last move about
12 years ago.
But it never ever occured to me that FreeBSD would be able to do 8", if
alone for the controller. But now I learn that it could have worked...
Cool :)
to use UP i386 kernel and perhaps downgrade to earlier version of FreeBSD.
Also you need to somehow acquire 34-to-50 cable or adaptor*. I made mine,
so perhaps that why I failed :)
You don't need to worry about tg43 signal if you don't plan to write on these
floppies.
In the end, after burning weekend on this little project, I realized that I
risk to burn much more time, so I just ordered kryoflux.
*) something like this http://www.classiccmp.org/dunfield/img54306/h/c8ssc.jpg
Like I said. I'm keeping mine for nostalgic reason....
Don't have the drive any longer.

Dare I say that I even have hard sectored 8" disks, when the start of
block is actually indicated by a series of punched holes 8-)

--WjW
Bob Bishop
2017-12-04 10:42:34 UTC
Permalink
Hi,
Post by Willem Jan Withagen
Post by Alex Kozlov
Post by Poul-Henning Kamp
--------
Post by Alex Kozlov
Post by Gary Jennejohn
On Sun, 03 Dec 2017 10:27:57 +0000
Post by Poul-Henning Kamp
Incidentally FreeBSD is/was the only modern OS which could
still read 8" floppies.
Well, with proper* cable you can connect 8" drive to fdc and read
it pretty much on any OS that supports floppies.
Uhm... no ?
Very few OS's have had 8" format compatible settings since CP/M
and even fewer handle the track46 pin correctly on write.
I'd done it in dos, I read about successful setups for Linux and
Windows(older). Anecdotally, I was not able to do it in FreeBSD.
Never too late to learn....
I still think I have my (from 1982) 8" disks around with a ported CP/M system to a TRS-80 like system... But ever since the Intel ASM/CPM developement stack died on the University they have been lying round for nostalgic reasons. And the hardware got dumped with the last move about 12 years ago.
But it never ever occured to me that FreeBSD would be able to do 8", if alone for the controller. But now I learn that it could have worked...
Cool :)
IIRC (it has been a while), the interfaces (h/w and protocol) to 8” drives varied somewhat by manufacturer. And yes, I do have at least one drive, blank media and an alignment disk in the archive.
Post by Willem Jan Withagen
--WjW
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
--
Bob Bishop
***@gid.co.uk
Alex Kozlov
2017-12-03 11:54:24 UTC
Permalink
Post by Cy Schubert
Post by Warner Losh
I'm keen on getting that into the tree. I have a ufd device and a need to
use it from time to time. If nothing else, I can be a reviewer of the code.
Is ufd working for you?
It does work. My todo was to merge ufdformat into fdformat but as I said
they are different enough that I need to work out how best to merge them.
Having said that, now that there's discussion of removing fdc(4) maybe it's
best to simply use ufdformat separately from fdformat that when we have the
inclination to remove fdc(4), which may be very soon now -- it would be
much less messy. I'm open to either option.
If you talk about https://people.freebsd.org/~bms/dump/ufdformat/
it's easier to just import it as ufdformat. The code above is very wip though.
Post by Cy Schubert
Personally, I don't care much (well maybe just a little) if fdc(4) itself
is removed however I think we need some kind of support, which USB fd can
supply if or when fdc(4) is removed. Maybe we should deprecate in 12 and
remove in 13?
As I understand, plan it to remove fdc(4) aka NEC765/i8272 controller
device driver and userland utilites that depends on it, usb floppy uses
umass UFI which will stay.
--
Alex
Rodney W. Grimes
2017-12-03 16:55:18 UTC
Permalink
Post by Hans Petter Selasky
Post by Cy Schubert
om>
--001a1144e7002bf7b0055f684ec8
Content-Type: text/plain; charset="UTF-8"
into fdformat but considering the underlying devices are so very different
Post by Cy Schubert
it would be a difficult marriage. I'd be willing to support a ufdformat
instead.
I'm keen on getting that into the tree. I have a ufd device and a need to
use it from time to time. If nothing else, I can be a reviewer of the code.
Is ufd working for you?
It does work. My todo was to merge ufdformat into fdformat but as I said
they are different enough that I need to work out how best to merge them.
Having said that, now that there's discussion of removing fdc(4) maybe it's
best to simply use ufdformat separately from fdformat that when we have the
inclination to remove fdc(4), which may be very soon now -- it would be
much less messy. I'm open to either option.
Post by Cy Schubert
Post by Warner Losh
Normally, I'd argue we might want to have a release where it's
deprecated,
Post by Warner Losh
but it already was unusable in 11, and barely usable in 10 and has been a
shadow of its former self for much longer than that.
The reason to keep some form of floppy support, eder fd or ufd is for the
purpose of copying (dd) floppy media into image files for use with
virtualbox or bhyve VMs. -- (One could say the same for CD and DVD drives.
My new laptop at $JOB has no CD/DVD drive.) I digress. I think the ability
to copy media to image files for VMs might be a reason to keep some form of
support fd or ufd.
I'm not sure I understand what you're saying here...
What I'm saying is that maintaining some form of fdc support whether it be
in fdc(4) or a USB floppy the ability to dd floppy images for subsequent
use in a VM would be desirable. I'm thinking of one example brought to my
attention about a month ago where a person I know needed to copy old floppy
disks to images on his hard drive in order to install an old sewing machine
application in a virtualbox VM running Windows.
Tangentially speaking, we could make the same case for CD and DVD drives
not too many years from now...
Personally, I don't care much (well maybe just a little) if fdc(4) itself
is removed however I think we need some kind of support, which USB fd can
supply if or when fdc(4) is removed. Maybe we should deprecate in 12 and
remove in 13?
Hi,
I think as long as you can read and write USB floppy drives under
FreeBSD, this change is OK. Even though floppies are old-tech they are
https://news.slashdot.org/story/16/05/25/2054255/us-military-uses-8-inch-floppy-disks-to-coordinate-nuclear-force-operations
And from time to time we see criminal cases popping up with crazy people
using old C64's with floppy disks. I would feel bad if removing support
for floppies from FreeBSD would mean you would depend on a Windows
installation to read such disks.
Further, keep this change two-step. First remove the code from GENERIC.
Then wait a year and see if anyone complains. Then delete the source code.
--HPS
I was gona keep quiet on this, but, well, I just cant now. If you remove
the entry from GENERIC no one well complain, the more likely case is they
well just compile a customer kernel and do there work. So using this as
a "is anyone using it" is a straw man.

That being said, even an old crusty fart like me only has had to deal
with a 1.44 MB floppy in nearly a year, but I was very glad that I COULD
deal with it using my prefered OS.

Now I have lots of hardware around so it was not hard for me to find
a TEAC 1.44 drive and hook it to my forensics motherboard and deal
with the image, maybe it is good I am stuck on 5.4 with that system
as it sounds like someone has broken yet another part of FreeBSD
in the name of some progress.

**RANT ON**

Data point: OpenBSD still supports install from floppies.. so
my guess is that OpenBSD has been able to keep this code running,
it is a "Sad State of Affairs" that FreeBSD with 300+ developers
can not manage the same. As Eitan pointed out, its only a 1000
lines so of code. Really now, we can manage to keep the mass
of clang and zfs running, but we can not keep a 1000 line fdc.c
running?

I further know of someone who just told me they completed
a converson of a stack of old 1.44MB floppies and 100MB
zip disks to image files, and I am pretty sure that person
is running 11.1 on a laptop, so this was probably done
with the USB fd code, so I suppose we do have some form
of support. It is possible that person netbooted an
older desktop to do the work, as he does have those types
of abilities.

**DOUBLE RANT**

Having been gone from the project for a long time and
looking at it from the outside my observation is that
FreeBSD is a lot of new toys that work fairly well and
a collection of rotting bits that get the axe every few
years.

Each and everytime I have tried to move my collection
of systems forward I have run into yet another thing that
has simply been killed cause no one maintained it, broken
cause someone added/changed something else and allowed it
to sit and rot tell it was axed cause it was broken.

If we, that is FreeBSD, continue on this path I can promise
you our PR data base today well look like a mud puddle
comparied to the ocean we shall create.

Rather than spend time running around the tree finding
rotting code to delete there needs to be a serious
effort running around the tree FIXING the code that has
rotted cause some new fangled thing borked it.

** END RANTS**
--
Rod Grimes ***@freebsd.org
Rebecca Cran
2017-12-03 17:17:34 UTC
Permalink
Post by Rodney W. Grimes
That being said, even an old crusty fart like me only has had to deal
with a 1.44 MB floppy in nearly a year, but I was very glad that I COULD
deal with it using my prefered OS.
It looks like some software licensing still used them as recently as 2014 (I personally had to use floppy disks at work back in 2009 to transfer our FLEXlm licenses): https://docops.ca.com/ca-plex/7-2-1/en/using/how-to-use-group-model-and-local-model-licensing-in-ca-plex/how-to-make-a-floppy-disk-license-transfer


Rebecca Cran
Mark Linimon
2017-12-03 17:27:55 UTC
Permalink
my observation is that FreeBSD is a lot of new toys that work fairly
well and a collection of rotting bits that get the axe every few
years.
Having spent 10+ years triaging PRs I can tell you for certain that
there are large parts of the src tree* that no one works on. (For
instance, if we use "bin" as a rough proxy for "userland", there are
1668 userland PRs.)

I had a breakdown of kern PRs into "subsystems" which I kept going for
a few years, but it bitrotted (was GNATS-specific). It never really
got any uptake, but I found it educational anyways:

https://people.freebsd.org/~linimon/studies/prs/prs_for_all_groups.html

For instance, it led me to believe that large chunks of "libraries" and
"audio" were not actively maintained.

But beside from features missing from the tools, we have a large, open,
problem with "someone needs to take ownership of the xyz code".

I would be happy to hear constructive ideas. (Readers should be warned
that based on past experience I no longer believe that "well, someone
should just do that" leads anywhere.)

obdisclaimer: I am not trying to discourage the people who currently
actively work on maintenance by pointing to the overall numbers; in fact,
I appreciate their efforts. I just want to know how we can clone them.

mcl

* The ports tree does a little better by assigning maintainers. It
turns out that most, but not all, of the key components have at least
a putative maintainer listed. It's good but insufficient.
Alfred Perlstein
2017-12-29 23:09:57 UTC
Permalink
Post by Mark Linimon
my observation is that FreeBSD is a lot of new toys that work fairly
well and a collection of rotting bits that get the axe every few
years.
Having spent 10+ years triaging PRs I can tell you for certain that
there are large parts of the src tree* that no one works on. (For
instance, if we use "bin" as a rough proxy for "userland", there are
1668 userland PRs.)
I had a breakdown of kern PRs into "subsystems" which I kept going for
a few years, but it bitrotted (was GNATS-specific). It never really
https://people.freebsd.org/~linimon/studies/prs/prs_for_all_groups.html
For instance, it led me to believe that large chunks of "libraries" and
"audio" were not actively maintained.
But beside from features missing from the tools, we have a large, open,
problem with "someone needs to take ownership of the xyz code".
I would be happy to hear constructive ideas. (Readers should be warned
that based on past experience I no longer believe that "well, someone
should just do that" leads anywhere.)
obdisclaimer: I am not trying to discourage the people who currently
actively work on maintenance by pointing to the overall numbers; in fact,
I appreciate their efforts. I just want to know how we can clone them.
mcl
* The ports tree does a little better by assigning maintainers. It
turns out that most, but not all, of the key components have at least
a putative maintainer listed. It's good but insufficient.
I understand how frustrated folks can be that there are PRs, quite a few
with patches, out there that are not being addressed or merged.

That said, accessibility is always going to gate contributions and
engagement of users.

Accessibility can be fixed by a number means:

1) reduce the test / compile cycle.
2) replacing obsolete or seldom used tooling with modern industry
standard tooling.
3) lowering the barrier to entry.
4) giving contributors an experience that prepares them for cross
functional work.

These really are all actually a single point that one should focus on.

If a project decides to use a bag of tools that is extremely specific to
itself or not widely used anymore it really has only itself to blame for
lack of participation of its users.  It is up the project to realize
that its infra is lagging behind the industry and work towards bringing
it in line with the previous stated accessibility fixes to bring in new
and engaged folks interested in work as well as keep its current base of
workers interested in continuing to work.


-Alfred
Cy Schubert
2017-12-03 20:05:35 UTC
Permalink
In message <***@pdx.rh.CN85.dnsmgr.net>, "Rodney W.
Gri
Post by Hans Petter Selasky
l.c
Post by Hans Petter Selasky
Post by Cy Schubert
om>
--001a1144e7002bf7b0055f684ec8
Content-Type: text/plain; charset="UTF-8"
into fdformat but considering the underlying devices are so very differe
nt
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
it would be a difficult marriage. I'd be willing to support a ufdformat
instead.
I'm keen on getting that into the tree. I have a ufd device and a need t
o
Post by Hans Petter Selasky
Post by Cy Schubert
use it from time to time. If nothing else, I can be a reviewer of the co
de.
Post by Hans Petter Selasky
Post by Cy Schubert
Is ufd working for you?
It does work. My todo was to merge ufdformat into fdformat but as I said
they are different enough that I need to work out how best to merge them.
Having said that, now that there's discussion of removing fdc(4) maybe it
's
Post by Hans Petter Selasky
Post by Cy Schubert
best to simply use ufdformat separately from fdformat that when we have t
he
Post by Hans Petter Selasky
Post by Cy Schubert
inclination to remove fdc(4), which may be very soon now -- it would be
much less messy. I'm open to either option.
Post by Cy Schubert
Post by Warner Losh
Normally, I'd argue we might want to have a release where it's
deprecated,
Post by Warner Losh
but it already was unusable in 11, and barely usable in 10 and has bee
n a
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
Post by Warner Losh
shadow of its former self for much longer than that.
The reason to keep some form of floppy support, eder fd or ufd is for t
he
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
purpose of copying (dd) floppy media into image files for use with
virtualbox or bhyve VMs. -- (One could say the same for CD and DVD driv
es.
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
My new laptop at $JOB has no CD/DVD drive.) I digress. I think the abil
ity
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
to copy media to image files for VMs might be a reason to keep some for
m of
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
support fd or ufd.
I'm not sure I understand what you're saying here...
What I'm saying is that maintaining some form of fdc support whether it b
e
Post by Hans Petter Selasky
Post by Cy Schubert
in fdc(4) or a USB floppy the ability to dd floppy images for subsequent
use in a VM would be desirable. I'm thinking of one example brought to my
attention about a month ago where a person I know needed to copy old flop
py
Post by Hans Petter Selasky
Post by Cy Schubert
disks to images on his hard drive in order to install an old sewing machi
ne
Post by Hans Petter Selasky
Post by Cy Schubert
application in a virtualbox VM running Windows.
Tangentially speaking, we could make the same case for CD and DVD drives
not too many years from now...
Personally, I don't care much (well maybe just a little) if fdc(4) itself
is removed however I think we need some kind of support, which USB fd can
supply if or when fdc(4) is removed. Maybe we should deprecate in 12 and
remove in 13?
Hi,
I think as long as you can read and write USB floppy drives under
FreeBSD, this change is OK. Even though floppies are old-tech they are
https://news.slashdot.org/story/16/05/25/2054255/us-military-uses-8-inch-fl
oppy-disks-to-coordinate-nuclear-force-operations
Post by Hans Petter Selasky
And from time to time we see criminal cases popping up with crazy people
using old C64's with floppy disks. I would feel bad if removing support
for floppies from FreeBSD would mean you would depend on a Windows
installation to read such disks.
Further, keep this change two-step. First remove the code from GENERIC.
Then wait a year and see if anyone complains. Then delete the source code.
--HPS
I was gona keep quiet on this, but, well, I just cant now. If you remove
the entry from GENERIC no one well complain, the more likely case is they
well just compile a customer kernel and do there work. So using this as
a "is anyone using it" is a straw man.
That being said, even an old crusty fart like me only has had to deal
with a 1.44 MB floppy in nearly a year, but I was very glad that I COULD
deal with it using my prefered OS.
Now I have lots of hardware around so it was not hard for me to find
a TEAC 1.44 drive and hook it to my forensics motherboard and deal
with the image, maybe it is good I am stuck on 5.4 with that system
as it sounds like someone has broken yet another part of FreeBSD
in the name of some progress.
**RANT ON**
Data point: OpenBSD still supports install from floppies.. so
my guess is that OpenBSD has been able to keep this code running,
it is a "Sad State of Affairs" that FreeBSD with 300+ developers
can not manage the same. As Eitan pointed out, its only a 1000
lines so of code. Really now, we can manage to keep the mass
of clang and zfs running, but we can not keep a 1000 line fdc.c
running?
I further know of someone who just told me they completed
a converson of a stack of old 1.44MB floppies and 100MB
zip disks to image files, and I am pretty sure that person
is running 11.1 on a laptop, so this was probably done
with the USB fd code, so I suppose we do have some form
of support. It is possible that person netbooted an
older desktop to do the work, as he does have those types
of abilities.
**DOUBLE RANT**
Having been gone from the project for a long time and
looking at it from the outside my observation is that
FreeBSD is a lot of new toys that work fairly well and
a collection of rotting bits that get the axe every few
years.
Each and everytime I have tried to move my collection
of systems forward I have run into yet another thing that
has simply been killed cause no one maintained it, broken
cause someone added/changed something else and allowed it
to sit and rot tell it was axed cause it was broken.
If we, that is FreeBSD, continue on this path I can promise
you our PR data base today well look like a mud puddle
comparied to the ocean we shall create.
Rather than spend time running around the tree finding
rotting code to delete there needs to be a serious
effort running around the tree FIXING the code that has
rotted cause some new fangled thing borked it.
** END RANTS**
I've spent some time thinking about this while cleaning up the yard of old
leaves today. All three of my machines downstairs still have fdc(4)
controllers and take a poke at it.

USB floppy does also work. The ufdformat USB floppy format (not yet
committed, thank you bms@) also works in 12 (it didn't in 7 due to borked
USB in 7). I've yet to decide whether to commit it as is or merge it into
the existing fdformat.
--
Cheers,
Cy Schubert <***@cschubert.com>
FreeBSD UNIX: <***@FreeBSD.org> Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
Warner Losh
2017-12-03 20:21:05 UTC
Permalink
Post by Eitan Adler
Gri
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
In message <CANCZdfrYdQTtjZJ_+jSVr25wjAZXd-+
l.c
Post by Hans Petter Selasky
Post by Cy Schubert
om>
--001a1144e7002bf7b0055f684ec8
Content-Type: text/plain; charset="UTF-8"
On Sat, Dec 2, 2017 at 8:31 PM, Cy Schubert <
merge
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
into fdformat but considering the underlying devices are so very
differe
Post by Hans Petter Selasky
nt
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
it would be a difficult marriage. I'd be willing to support a
ufdformat
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
instead.
I'm keen on getting that into the tree. I have a ufd device and a
need t
Post by Hans Petter Selasky
o
Post by Hans Petter Selasky
Post by Cy Schubert
use it from time to time. If nothing else, I can be a reviewer of
the co
Post by Hans Petter Selasky
de.
Post by Hans Petter Selasky
Post by Cy Schubert
Is ufd working for you?
It does work. My todo was to merge ufdformat into fdformat but as I
said
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
they are different enough that I need to work out how best to merge
them.
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
Having said that, now that there's discussion of removing fdc(4)
maybe it
Post by Hans Petter Selasky
's
Post by Hans Petter Selasky
Post by Cy Schubert
best to simply use ufdformat separately from fdformat that when we
have t
Post by Hans Petter Selasky
he
Post by Hans Petter Selasky
Post by Cy Schubert
inclination to remove fdc(4), which may be very soon now -- it would
be
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
much less messy. I'm open to either option.
Post by Cy Schubert
Post by Warner Losh
Normally, I'd argue we might want to have a release where it's
deprecated,
Post by Warner Losh
but it already was unusable in 11, and barely usable in 10 and
has bee
Post by Hans Petter Selasky
n a
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
Post by Warner Losh
shadow of its former self for much longer than that.
The reason to keep some form of floppy support, eder fd or ufd is
for t
Post by Hans Petter Selasky
he
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
purpose of copying (dd) floppy media into image files for use with
virtualbox or bhyve VMs. -- (One could say the same for CD and DVD
driv
Post by Hans Petter Selasky
es.
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
My new laptop at $JOB has no CD/DVD drive.) I digress. I think the
abil
Post by Hans Petter Selasky
ity
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
to copy media to image files for VMs might be a reason to keep
some for
Post by Hans Petter Selasky
m of
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
support fd or ufd.
I'm not sure I understand what you're saying here...
What I'm saying is that maintaining some form of fdc support whether
it b
Post by Hans Petter Selasky
e
Post by Hans Petter Selasky
Post by Cy Schubert
in fdc(4) or a USB floppy the ability to dd floppy images for
subsequent
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
use in a VM would be desirable. I'm thinking of one example brought
to my
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
attention about a month ago where a person I know needed to copy old
flop
Post by Hans Petter Selasky
py
Post by Hans Petter Selasky
Post by Cy Schubert
disks to images on his hard drive in order to install an old sewing
machi
Post by Hans Petter Selasky
ne
Post by Hans Petter Selasky
Post by Cy Schubert
application in a virtualbox VM running Windows.
Tangentially speaking, we could make the same case for CD and DVD
drives
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
not too many years from now...
Personally, I don't care much (well maybe just a little) if fdc(4)
itself
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
is removed however I think we need some kind of support, which USB
fd can
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
supply if or when fdc(4) is removed. Maybe we should deprecate in 12
and
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
remove in 13?
Hi,
I think as long as you can read and write USB floppy drives under
FreeBSD, this change is OK. Even though floppies are old-tech they are
https://news.slashdot.org/story/16/05/25/2054255/us-
military-uses-8-inch-fl
Post by Hans Petter Selasky
oppy-disks-to-coordinate-nuclear-force-operations
Post by Hans Petter Selasky
And from time to time we see criminal cases popping up with crazy
people
Post by Hans Petter Selasky
Post by Hans Petter Selasky
using old C64's with floppy disks. I would feel bad if removing support
for floppies from FreeBSD would mean you would depend on a Windows
installation to read such disks.
Further, keep this change two-step. First remove the code from GENERIC.
Then wait a year and see if anyone complains. Then delete the source
code.
Post by Hans Petter Selasky
Post by Hans Petter Selasky
--HPS
I was gona keep quiet on this, but, well, I just cant now. If you remove
the entry from GENERIC no one well complain, the more likely case is they
well just compile a customer kernel and do there work. So using this as
a "is anyone using it" is a straw man.
That being said, even an old crusty fart like me only has had to deal
with a 1.44 MB floppy in nearly a year, but I was very glad that I COULD
deal with it using my prefered OS.
Now I have lots of hardware around so it was not hard for me to find
a TEAC 1.44 drive and hook it to my forensics motherboard and deal
with the image, maybe it is good I am stuck on 5.4 with that system
as it sounds like someone has broken yet another part of FreeBSD
in the name of some progress.
**RANT ON**
Data point: OpenBSD still supports install from floppies.. so
my guess is that OpenBSD has been able to keep this code running,
it is a "Sad State of Affairs" that FreeBSD with 300+ developers
can not manage the same. As Eitan pointed out, its only a 1000
lines so of code. Really now, we can manage to keep the mass
of clang and zfs running, but we can not keep a 1000 line fdc.c
running?
The floppy driver itself is fine. It relies, however, on ISADMA working. It
got broken and nobody noticed. Also, FreeBSD has SMP while OpenBSD does
not, so that's been a much larger code velocity over all.
Post by Eitan Adler
Post by Hans Petter Selasky
I further know of someone who just told me they completed
a converson of a stack of old 1.44MB floppies and 100MB
zip disks to image files, and I am pretty sure that person
is running 11.1 on a laptop, so this was probably done
with the USB fd code, so I suppose we do have some form
of support. It is possible that person netbooted an
older desktop to do the work, as he does have those types
of abilities.
Reading works OK. It's writing that fails. So this datapoint is consistent
with my experience. There's other issues that need to be fixed apart from
ISADMA, but those are minor in comparison.
Post by Eitan Adler
Post by Hans Petter Selasky
**DOUBLE RANT**
Having been gone from the project for a long time and
looking at it from the outside my observation is that
FreeBSD is a lot of new toys that work fairly well and
a collection of rotting bits that get the axe every few
years.
Each and everytime I have tried to move my collection
of systems forward I have run into yet another thing that
has simply been killed cause no one maintained it, broken
cause someone added/changed something else and allowed it
to sit and rot tell it was axed cause it was broken.
If we, that is FreeBSD, continue on this path I can promise
you our PR data base today well look like a mud puddle
comparied to the ocean we shall create.
Rather than spend time running around the tree finding
rotting code to delete there needs to be a serious
effort running around the tree FIXING the code that has
rotted cause some new fangled thing borked it.
The trouble is that the skillsets necessary to fix the rotting code
generally only exist in a small number of people, while just about anybody
can wield an axe.

And lots of people do fix things, but people don't notice so much because
(a) they are still working and (b) the fixes tend to be in relatively close
proximity to the breakage. It's only when they don't that it becomes an
issue.
Post by Eitan Adler
Post by Hans Petter Selasky
** END RANTS**
I've spent some time thinking about this while cleaning up the yard of old
leaves today. All three of my machines downstairs still have fdc(4)
controllers and take a poke at it.
USB floppy does also work. The ufdformat USB floppy format (not yet
USB in 7). I've yet to decide whether to commit it as is or merge it into
the existing fdformat.
I'd commit it as is (ufdformat). It's functionality is quite a bit
different because the CDBs are much less expressive than the full NEC 765
chip supports (which is itself a subset of what you can do on a floppy, but
I digress).

Warner
Bruce Evans
2017-12-03 23:40:54 UTC
Permalink
Post by Warner Losh
Post by Cy Schubert
Gri
The inner quoting is more broken than usual (split in the middle of
rgrimes' name).
Post by Warner Losh
Post by Cy Schubert
Post by Rodney W. Grimes
**RANT ON**
Data point: OpenBSD still supports install from floppies.. so
my guess is that OpenBSD has been able to keep this code running,
it is a "Sad State of Affairs" that FreeBSD with 300+ developers
can not manage the same. As Eitan pointed out, its only a 1000
lines so of code. Really now, we can manage to keep the mass
of clang and zfs running, but we can not keep a 1000 line fdc.c
running?
Actually 5000+ lines of code: at least:
- 2835 lines in dev/fdc
- 195 lines in sys/fdcio.h
- 335 lines in man4/fdc.4
- 2578 lines in fdcontrol, fdformat, fdread and fdwrite
Post by Warner Losh
The floppy driver itself is fine. It relies, however, on ISADMA working. It
got broken and nobody noticed. Also, FreeBSD has SMP while OpenBSD does
not, so that's been a much larger code velocity over all.
Reading works OK. It's writing that fails. So this datapoint is consistent
with my experience. There's other issues that need to be fixed apart from
ISADMA, but those are minor in comparison.
ISADMA worked for writing by fdformat and cp of 1 floppy under -current here.
I used a UP i386 system with 1GB. If the bug only affects SMP, and64 or
large memory, then it is easy to work around by not using these. Memory
above 4GB is especially easy to avoid using a boot option.
Post by Warner Losh
Post by Cy Schubert
I've spent some time thinking about this while cleaning up the yard of old
leaves today. All three of my machines downstairs still have fdc(4)
controllers and take a poke at it.
USB floppy does also work. The ufdformat USB floppy format (not yet
USB in 7). I've yet to decide whether to commit it as is or merge it into
the existing fdformat.
I'd commit it as is (ufdformat). It's functionality is quite a bit
different because the CDBs are much less expressive than the full NEC 765
chip supports (which is itself a subset of what you can do on a floppy, but
I digress).
So usb floppy drives can't even duplicate fdformat's functionality?
There is also hard to replace functionality in other utilites.

Bruce
Warner Losh
2017-12-04 00:03:43 UTC
Permalink
Post by Bruce Evans
Post by Warner Losh
Post by Cy Schubert
W.
Gri
The inner quoting is more broken than usual (split in the middle of
rgrimes' name).
The googles are hating me... That is to say gmail does this automatically,
and apparently with malice of forethought when rgrimes is involved.

**RANT ON**
Post by Bruce Evans
Post by Warner Losh
Post by Cy Schubert
Post by Rodney W. Grimes
Data point: OpenBSD still supports install from floppies.. so
my guess is that OpenBSD has been able to keep this code running,
it is a "Sad State of Affairs" that FreeBSD with 300+ developers
can not manage the same. As Eitan pointed out, its only a 1000
lines so of code. Really now, we can manage to keep the mass
of clang and zfs running, but we can not keep a 1000 line fdc.c
running?
- 2835 lines in dev/fdc
- 195 lines in sys/fdcio.h
- 335 lines in man4/fdc.4
- 2578 lines in fdcontrol, fdformat, fdread and fdwrite
The floppy driver itself is fine. It relies, however, on ISADMA working. It
Post by Warner Losh
got broken and nobody noticed. Also, FreeBSD has SMP while OpenBSD does
not, so that's been a much larger code velocity over all.
Reading works OK. It's writing that fails. So this datapoint is consistent
with my experience. There's other issues that need to be fixed apart from
ISADMA, but those are minor in comparison.
ISADMA worked for writing by fdformat and cp of 1 floppy under -current here.
I used a UP i386 system with 1GB. If the bug only affects SMP, and64 or
large memory, then it is easy to work around by not using these. Memory
above 4GB is especially easy to avoid using a boot option.
I may have been booting a MP kernel when I tried. I'll have to give it
another try. Just to confirm, this was a FreeBSD/i386 kernel, not a
FreeBSD/amd64 kernel, right? And was this for a 5.25" drive or 3.5" drive?
I know both on the same controller cannot work due to some unfortunate
assumptions in the code that looked hard to change...

If the code is actually working today, for both read and write, then that
changes my attitude, though not by a huge amount... Working code for old
devices is almost never removed from the tree unless the device has lost
all relevance (a hard case to be made here, since people still use them
more often than many of the other things in the tree).

I've spent some time thinking about this while cleaning up the yard of old
Post by Bruce Evans
Post by Warner Losh
Post by Cy Schubert
leaves today. All three of my machines downstairs still have fdc(4)
controllers and take a poke at it.
USB floppy does also work. The ufdformat USB floppy format (not yet
USB in 7). I've yet to decide whether to commit it as is or merge it into
the existing fdformat.
I'd commit it as is (ufdformat). It's functionality is quite a bit
different because the CDBs are much less expressive than the full NEC 765
chip supports (which is itself a subset of what you can do on a floppy, but
I digress).
So usb floppy drives can't even duplicate fdformat's functionality?
There is also hard to replace functionality in other utilites.
The problem is that USB floppy definition is only for 3.5" 1.44MB
diskettes. Well, to be honest, that's not entirely true, it also supports
720k DD 3.5" diskette and a total oddball 1.25MB HD diskette (77 tracks, 8
sectors, 1024 bytes per sector). See table 35 in
http://www.usb.org/developers/docs/devclass_docs/usbmass-ufi10.pdf if you
want the details. I was disappointed that 5.25" wasn't supported at all in
the specification, or there wasn't some generic way to specify things when
I was looking at this for some rx50 work I did earlier this year..

Warner
Bruce Evans
2017-12-04 01:31:43 UTC
Permalink
Post by Warner Losh
Post by Bruce Evans
Post by Warner Losh
W.
Gri
The inner quoting is more broken than usual (split in the middle of
rgrimes' name).
The googles are hating me... That is to say gmail does this automatically,
and apparently with malice of forethought when rgrimes is involved.
:-)
Post by Warner Losh
Post by Bruce Evans
...
The floppy driver itself is fine. It relies, however, on ISADMA working. It
Post by Warner Losh
got broken and nobody noticed. Also, FreeBSD has SMP while OpenBSD does
not, so that's been a much larger code velocity over all.
Reading works OK. It's writing that fails. So this datapoint is consistent
with my experience. There's other issues that need to be fixed apart from
ISADMA, but those are minor in comparison.
ISADMA worked for writing by fdformat and cp of 1 floppy under -current here.
I used a UP i386 system with 1GB. If the bug only affects SMP, and64 or
large memory, then it is easy to work around by not using these. Memory
above 4GB is especially easy to avoid using a boot option.
I may have been booting a MP kernel when I tried. I'll have to give it
another try. Just to confirm, this was a FreeBSD/i386 kernel, not a
FreeBSD/amd64 kernel, right? And was this for a 5.25" drive or 3.5" drive?
I know both on the same controller cannot work due to some unfortunate
assumptions in the code that looked hard to change...
Yes, it was i386. In fact, I have no amd64 system that supports fd drives,
so I can't test this. Cy just tested it and found amd64 failing and i386
working.

It was for a 3.5" drive. I can almost test the combination. I have a
system for debugging/keeping old hardware with a 3.5" drive and an 5.25"
drive. Unfortunately, the 5.25" drive broke 16-17 years ago (it is
detected by has seek problems after breaking it doing too many seeks
trying to recover from i/o errors for attempted recovery of disks 16-17
years ago).
Post by Warner Losh
If the code is actually working today, for both read and write, then that
changes my attitude, though not by a huge amount... Working code for old
devices is almost never removed from the tree unless the device has lost
all relevance (a hard case to be made here, since people still use them
more often than many of the other things in the tree).
Lots of drivers probably have broken DMA or just broken addressing at the
4GB boundary, but are still in the tree and work perfectly on i386 without
PAE or amd64 with reduced memory, but are less useful than the fd driver
since they have backwards-compatible replacements for both hardware and
software. There is no need to handle old media for devices like NICs,
but backwards compatibility requires supporting lower speeds.
Post by Warner Losh
...
Post by Bruce Evans
So usb floppy drives can't even duplicate fdformat's functionality?
There is also hard to replace functionality in other utilites.
The problem is that USB floppy definition is only for 3.5" 1.44MB
diskettes. Well, to be honest, that's not entirely true, it also supports
720k DD 3.5" diskette and a total oddball 1.25MB HD diskette (77 tracks, 8
sectors, 1024 bytes per sector). See table 35 in
http://www.usb.org/developers/docs/devclass_docs/usbmass-ufi10.pdf if you
want the details. I was disappointed that 5.25" wasn't supported at all in
the specification, or there wasn't some generic way to specify things when
I was looking at this for some rx50 work I did earlier this year..
I thought that you meant funky formatting used by some copy protection
schemes. I have a (working) WDC fd controller and double density
drives on a 35-year old system that can do slightly more/different
formatting than the NEC controller, but no disks with copy protection
except the natural protection of obscure formats.

Bruce
Adrian Chadd
2017-12-03 23:48:03 UTC
Permalink
[snip snip]

If someone wants to support it, and it doesn't make things in other
places harder ... why not do it!

It at least keeps our APIs honest..


-adrian
Warner Losh
2017-12-04 00:11:48 UTC
Permalink
Post by Adrian Chadd
[snip snip]
If someone wants to support it, and it doesn't make things in other
places harder ... why not do it!
It at least keeps our APIs honest..
If it actually works on real hardware, something we have conflicting
reports on at the moment...

And we seem to be short of the 'someone' that would be able to take up the
banner of wanting to support it, having the skill to support it and
demonstrating the time is there by fixing bugs...

Warner
Cy Schubert
2017-12-04 00:23:26 UTC
Permalink
Post by Bruce Evans
Post by Warner Losh
Post by Cy Schubert
W.
Gri
The inner quoting is more broken than usual (split in the middle of
rgrimes' name).
Post by Warner Losh
Post by Cy Schubert
Post by Rodney W. Grimes
**RANT ON**
Data point: OpenBSD still supports install from floppies.. so
my guess is that OpenBSD has been able to keep this code running,
it is a "Sad State of Affairs" that FreeBSD with 300+ developers
can not manage the same. As Eitan pointed out, its only a 1000
lines so of code. Really now, we can manage to keep the mass
of clang and zfs running, but we can not keep a 1000 line fdc.c
running?
- 2835 lines in dev/fdc
- 195 lines in sys/fdcio.h
- 335 lines in man4/fdc.4
- 2578 lines in fdcontrol, fdformat, fdread and fdwrite
Post by Warner Losh
The floppy driver itself is fine. It relies, however, on ISADMA working. It
got broken and nobody noticed. Also, FreeBSD has SMP while OpenBSD does
not, so that's been a much larger code velocity over all.
Reading works OK. It's writing that fails. So this datapoint is consistent
with my experience. There's other issues that need to be fixed apart from
ISADMA, but those are minor in comparison.
ISADMA worked for writing by fdformat and cp of 1 floppy under -current here.
I used a UP i386 system with 1GB. If the bug only affects SMP, and64 or
large memory, then it is easy to work around by not using these. Memory
above 4GB is especially easy to avoid using a boot option.
The following on a my amd64 testbed while writing.

bob# dmesg
g_vfs_done():fd0[READ(offset=184320, length=512)]error = 5
bob# uname -a
FreeBSD bob 12.0-CURRENT FreeBSD 12.0-CURRENT #10 r326456M: Sat Dec 2
00:54:10 PST 2017 ***@bob:/export/obj/opt/src/svn-current/amd64.amd64/s
ys/BREAK amd64
bob# sysctl hw.realmem
hw.realmem: 5368709120
bob#

You are right Bruce. Using the same machine but with FreeBSD-12 i386 it
works perfectly.

bob# uname -a
FreeBSD bob 12.0-CURRENT FreeBSD 12.0-CURRENT #8 r326456M: Sat Dec 2
07:42:12 PST 2017 ***@bob:/export/obj/opt/src/svn-current/i386.i386/sys
/BREAK i386
bob#

I think the todo here is either a) fix fdc(4) to work on amd64 or b) remove
fdc(4) from GENERIC on amd64.
Post by Bruce Evans
Post by Warner Losh
Post by Cy Schubert
I've spent some time thinking about this while cleaning up the yard of old
leaves today. All three of my machines downstairs still have fdc(4)
controllers and take a poke at it.
USB floppy does also work. The ufdformat USB floppy format (not yet
USB in 7). I've yet to decide whether to commit it as is or merge it into
the existing fdformat.
I'd commit it as is (ufdformat). It's functionality is quite a bit
different because the CDBs are much less expressive than the full NEC 765
chip supports (which is itself a subset of what you can do on a floppy, but
I digress).
So usb floppy drives can't even duplicate fdformat's functionality?
There is also hard to replace functionality in other utilites.
Not at the moment but I plan on committing a USB version of fdformat when
it passes review. It works perfectly using a TEAC FD-05PUW 3000.
--
Cheers,
Cy Schubert <***@cschubert.com>
FreeBSD UNIX: <***@FreeBSD.org> Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
Cy Schubert
2017-12-04 00:23:33 UTC
Permalink
In message <CANCZdfq+iRDJeNFP9hKZXrDmcZZPn4jqzYZDpspiohJ+***@mail.gmail.c
om>
--001a113dbf6a68e17b055f7557cd
Content-Type: text/plain; charset="UTF-8"
Post by Eitan Adler
W.
Gri
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
In message <CANCZdfrYdQTtjZJ_+jSVr25wjAZXd-+
l.c
Post by Hans Petter Selasky
Post by Cy Schubert
om>
--001a1144e7002bf7b0055f684ec8
Content-Type: text/plain; charset="UTF-8"
On Sat, Dec 2, 2017 at 8:31 PM, Cy Schubert <
merge
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
into fdformat but considering the underlying devices are so very
differe
Post by Hans Petter Selasky
nt
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
it would be a difficult marriage. I'd be willing to support a
ufdformat
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
instead.
I'm keen on getting that into the tree. I have a ufd device and a
need t
Post by Hans Petter Selasky
o
Post by Hans Petter Selasky
Post by Cy Schubert
use it from time to time. If nothing else, I can be a reviewer of
the co
Post by Hans Petter Selasky
de.
Post by Hans Petter Selasky
Post by Cy Schubert
Is ufd working for you?
It does work. My todo was to merge ufdformat into fdformat but as I
said
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
they are different enough that I need to work out how best to merge
them.
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
Having said that, now that there's discussion of removing fdc(4)
maybe it
Post by Hans Petter Selasky
's
Post by Hans Petter Selasky
Post by Cy Schubert
best to simply use ufdformat separately from fdformat that when we
have t
Post by Hans Petter Selasky
he
Post by Hans Petter Selasky
Post by Cy Schubert
inclination to remove fdc(4), which may be very soon now -- it would
be
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
much less messy. I'm open to either option.
Post by Cy Schubert
Post by Warner Losh
Normally, I'd argue we might want to have a release where it's
deprecated,
Post by Warner Losh
but it already was unusable in 11, and barely usable in 10 and
has bee
Post by Hans Petter Selasky
n a
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
Post by Warner Losh
shadow of its former self for much longer than that.
The reason to keep some form of floppy support, eder fd or ufd is
for t
Post by Hans Petter Selasky
he
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
purpose of copying (dd) floppy media into image files for use with
virtualbox or bhyve VMs. -- (One could say the same for CD and DVD
driv
Post by Hans Petter Selasky
es.
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
My new laptop at $JOB has no CD/DVD drive.) I digress. I think the
abil
Post by Hans Petter Selasky
ity
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
to copy media to image files for VMs might be a reason to keep
some for
Post by Hans Petter Selasky
m of
Post by Hans Petter Selasky
Post by Cy Schubert
Post by Cy Schubert
support fd or ufd.
I'm not sure I understand what you're saying here...
What I'm saying is that maintaining some form of fdc support whether
it b
Post by Hans Petter Selasky
e
Post by Hans Petter Selasky
Post by Cy Schubert
in fdc(4) or a USB floppy the ability to dd floppy images for
subsequent
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
use in a VM would be desirable. I'm thinking of one example brought
to my
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
attention about a month ago where a person I know needed to copy old
flop
Post by Hans Petter Selasky
py
Post by Hans Petter Selasky
Post by Cy Schubert
disks to images on his hard drive in order to install an old sewing
machi
Post by Hans Petter Selasky
ne
Post by Hans Petter Selasky
Post by Cy Schubert
application in a virtualbox VM running Windows.
Tangentially speaking, we could make the same case for CD and DVD
drives
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
not too many years from now...
Personally, I don't care much (well maybe just a little) if fdc(4)
itself
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
is removed however I think we need some kind of support, which USB
fd can
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
supply if or when fdc(4) is removed. Maybe we should deprecate in 12
and
Post by Hans Petter Selasky
Post by Hans Petter Selasky
Post by Cy Schubert
remove in 13?
Hi,
I think as long as you can read and write USB floppy drives under
FreeBSD, this change is OK. Even though floppies are old-tech they are
https://news.slashdot.org/story/16/05/25/2054255/us-
military-uses-8-inch-fl
Post by Hans Petter Selasky
oppy-disks-to-coordinate-nuclear-force-operations
Post by Hans Petter Selasky
And from time to time we see criminal cases popping up with crazy
people
Post by Hans Petter Selasky
Post by Hans Petter Selasky
using old C64's with floppy disks. I would feel bad if removing support
for floppies from FreeBSD would mean you would depend on a Windows
installation to read such disks.
Further, keep this change two-step. First remove the code from GENERIC.
Then wait a year and see if anyone complains. Then delete the source
code.
Post by Hans Petter Selasky
Post by Hans Petter Selasky
--HPS
I was gona keep quiet on this, but, well, I just cant now. If you remove
the entry from GENERIC no one well complain, the more likely case is they
well just compile a customer kernel and do there work. So using this as
a "is anyone using it" is a straw man.
That being said, even an old crusty fart like me only has had to deal
with a 1.44 MB floppy in nearly a year, but I was very glad that I COULD
deal with it using my prefered OS.
Now I have lots of hardware around so it was not hard for me to find
a TEAC 1.44 drive and hook it to my forensics motherboard and deal
with the image, maybe it is good I am stuck on 5.4 with that system
as it sounds like someone has broken yet another part of FreeBSD
in the name of some progress.
**RANT ON**
Data point: OpenBSD still supports install from floppies.. so
my guess is that OpenBSD has been able to keep this code running,
it is a "Sad State of Affairs" that FreeBSD with 300+ developers
can not manage the same. As Eitan pointed out, its only a 1000
lines so of code. Really now, we can manage to keep the mass
of clang and zfs running, but we can not keep a 1000 line fdc.c
running?
The floppy driver itself is fine. It relies, however, on ISADMA working. It
got broken and nobody noticed. Also, FreeBSD has SMP while OpenBSD does
not, so that's been a much larger code velocity over all.
Post by Eitan Adler
Post by Hans Petter Selasky
I further know of someone who just told me they completed
a converson of a stack of old 1.44MB floppies and 100MB
zip disks to image files, and I am pretty sure that person
is running 11.1 on a laptop, so this was probably done
with the USB fd code, so I suppose we do have some form
of support. It is possible that person netbooted an
older desktop to do the work, as he does have those types
of abilities.
Reading works OK. It's writing that fails. So this datapoint is consistent
with my experience. There's other issues that need to be fixed apart from
ISADMA, but those are minor in comparison.
I noticed that. Took a break from outside chores to quickly test:

g_vfs_done():fd0[READ(offset=184320, length=512)]error = 5
Post by Eitan Adler
Post by Hans Petter Selasky
**DOUBLE RANT**
Having been gone from the project for a long time and
looking at it from the outside my observation is that
FreeBSD is a lot of new toys that work fairly well and
a collection of rotting bits that get the axe every few
years.
Each and everytime I have tried to move my collection
of systems forward I have run into yet another thing that
has simply been killed cause no one maintained it, broken
cause someone added/changed something else and allowed it
to sit and rot tell it was axed cause it was broken.
If we, that is FreeBSD, continue on this path I can promise
you our PR data base today well look like a mud puddle
comparied to the ocean we shall create.
Rather than spend time running around the tree finding
rotting code to delete there needs to be a serious
effort running around the tree FIXING the code that has
rotted cause some new fangled thing borked it.
The trouble is that the skillsets necessary to fix the rotting code
generally only exist in a small number of people, while just about anybody
can wield an axe.
And, not everybody has the hardware available to test. Sure one can use
qemu but it's not the same as real hardware.
And lots of people do fix things, but people don't notice so much because
(a) they are still working and (b) the fixes tend to be in relatively close
proximity to the breakage. It's only when they don't that it becomes an
issue.
Agreed.
Post by Eitan Adler
Post by Hans Petter Selasky
** END RANTS**
I've spent some time thinking about this while cleaning up the yard of old
leaves today. All three of my machines downstairs still have fdc(4)
controllers and take a poke at it.
USB floppy does also work. The ufdformat USB floppy format (not yet
USB in 7). I've yet to decide whether to commit it as is or merge it into
the existing fdformat.
I'd commit it as is (ufdformat). It's functionality is quite a bit
different because the CDBs are much less expressive than the full NEC 765
chip supports (which is itself a subset of what you can do on a floppy, but
I digress).
I'll try to post it on phab tonight.
--
Cheers,
Cy Schubert <***@cschubert.com>
FreeBSD UNIX: <***@FreeBSD.org> Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
Cy Schubert
2017-12-04 00:35:15 UTC
Permalink
In message <CANCZdfq=8VoHDG-_KFGoUc9v5vDH8fTgXP9-***@mail.gmail.c
om>
--001a11418b8c855b04055f789009
Content-Type: text/plain; charset="UTF-8"
Post by Adrian Chadd
[snip snip]
If someone wants to support it, and it doesn't make things in other
places harder ... why not do it!
It at least keeps our APIs honest..
If it actually works on real hardware, something we have conflicting
reports on at the moment...
And we seem to be short of the 'someone' that would be able to take up the
banner of wanting to support it, having the skill to support it and
demonstrating the time is there by fixing bugs...
Bruce was partially right. It does work on i386. My test on an i386 MP
kernel worked.

Just a guess, as I haven't really looked at it, I'm willing to bet the
controller expects to use addresses below 4 GB.
--
Cheers,
Cy Schubert <***@cschubert.com>
FreeBSD UNIX: <***@FreeBSD.org> Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
Warner Losh
2017-12-04 00:56:04 UTC
Permalink
Post by Cy Schubert
In message <CANCZdfq=8VoHDG-_KFGoUc9v5vDH8fTgXP9-
om>
--001a11418b8c855b04055f789009
Content-Type: text/plain; charset="UTF-8"
Post by Adrian Chadd
[snip snip]
If someone wants to support it, and it doesn't make things in other
places harder ... why not do it!
It at least keeps our APIs honest..
If it actually works on real hardware, something we have conflicting
reports on at the moment...
And we seem to be short of the 'someone' that would be able to take up
the
banner of wanting to support it, having the skill to support it and
demonstrating the time is there by fixing bugs...
Bruce was partially right. It does work on i386. My test on an i386 MP
kernel worked.
Just a guess, as I haven't really looked at it, I'm willing to bet the
controller expects to use addresses below 4 GB.
The Floppy controller doesn't grok anything about addresses. The ISA DMA
chip (8237A) doesn't grok anything about 16MB. The floppy is hard wired to
channel 2 of the DMA controller and can only do 8-bit transfers. And it's
slow (maybe 400kB/s). It's so limited that it spawned creation of VLB and
then PCI.

One cause of problems is that fdc passes the raw address of the BIO that
generated the I/O down to isa_dma. Once there, there's a range check to
make sure that it's a cool address, and if not it bounces it into
dma_bouncebuf[] which is contig malloc'd early in an attempt to get that
elusive below 16MB memory (it panics it if can't get it). There was talk
about tweaks to the isa_dma interface to allow drivers to specify the
memory to use and using a hard-coded 64k array in the floppy driver to
ensure it is below 16MB (with linker script hacks, if necessary). That talk
never went anywhere, though. Also, if contigmalloc is broken such that it
no longer really honors the constraints in the arguments, the isa_dma code
has no checks for that either location or aligment (both of which would be
fatal to proper floppy operation). This would explain why it works for bde
and not for me or others I've chatted with about the deal. Adding sanity
checks here would be a good first start, I think, to making things less
insane. An even better start would be to just pre-allocate DMA channel 2
with 64k, aligned 64k in isa_dma and hack the code to use this. The other
channels... No One will ever use them anymore... Just a thought... Memory
is no longer so dear that this would be an issue.

Warner
Adrian Chadd
2017-12-04 01:33:48 UTC
Permalink
Hi,

Wait, why's it not using bounce buffers? And hm, are we really running
out of the 16MB lower memory for doing that bouncing?



-adrian
Rodney W. Grimes
2017-12-04 00:50:09 UTC
Permalink
[ Charset UTF-8 unsupported, converting... ]
Post by Warner Losh
Post by Adrian Chadd
[snip snip]
If someone wants to support it, and it doesn't make things in other
places harder ... why not do it!
It at least keeps our APIs honest..
If it actually works on real hardware, something we have conflicting
reports on at the moment...
I have the hardware, it may take me 48 hours to get a machine set
up and running, but I shall at least do that much. I know I have
plenty of 1.44MB drives, the 5.25 drives are gona be in my junk
storage and may need some work to rescue.

I have just gone and touched 2 P4 motherboards with floppy controllers,
and 2 complete machines that should be P4 or similiar AMD.

I think I can net boot my data recovery/forensics system, which
has floppy and net booted I can run 10/11 or 12 i386 and amd on it.

So basically I should be able to get us some additional data points
in short order.
Post by Warner Losh
And we seem to be short of the 'someone' that would be able to take up the
banner of wanting to support it, having the skill to support it and
demonstrating the time is there by fixing bugs...
That is true.
--
Rod Grimes ***@freebsd.org
Warner Losh
2017-12-04 01:01:46 UTC
Permalink
On Sun, Dec 3, 2017 at 5:50 PM, Rodney W. Grimes <
Post by Rodney W. Grimes
I think I can net boot my data recovery/forensics system, which
has floppy and net booted I can run 10/11 or 12 i386 and amd on it.
So basically I should be able to get us some additional data points
in short order.
True. We should add additional sanity / hacks to isa_dma as well. It may be
that some folks it works for, and some it fails for due to bugs in
contigmalloc that have gone undetected, or at least uncorrected.

I have an older DELL system that I may bring up, if there's enough memory
in it to run -current. It's the least obnoxious of the old hardware that I
have knocking around. But it may be gated by finding working PATA disks
and/or that PATA <-> SD adapter I have somewhere...

Warner
Cy Schubert
2017-12-04 01:14:02 UTC
Permalink
In message <CANCZdfrY-v7rcF5_L+0QVfzKqMvWzfQOUqQNwZZvkDhh-***@mail.gmail.c
om>
--94eb2c11880a3c31df055f794380
Content-Type: text/plain; charset="UTF-8"
On Sun, Dec 3, 2017 at 5:50 PM, Rodney W. Grimes <
Post by Rodney W. Grimes
I think I can net boot my data recovery/forensics system, which
has floppy and net booted I can run 10/11 or 12 i386 and amd on it.
So basically I should be able to get us some additional data points
in short order.
True. We should add additional sanity / hacks to isa_dma as well. It may be
that some folks it works for, and some it fails for due to bugs in
contigmalloc that have gone undetected, or at least uncorrected.
I have an older DELL system that I may bring up, if there's enough memory
in it to run -current. It's the least obnoxious of the old hardware that I
have knocking around. But it may be gated by finding working PATA disks
and/or that PATA <-> SD adapter I have somewhere...
And of course my sandbox which has everything from 10 through 12, i386 and
amd64 installed.
--
Cheers,
Cy Schubert <***@cschubert.com>
FreeBSD UNIX: <***@FreeBSD.org> Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
Cy Schubert
2017-12-04 18:07:28 UTC
Permalink
My test showed that MP i386 works as well. Amd64 is broken.

---
Sent using a tiny phone keyboard.
Apologies for any typos and autocorrect.
This old phone only supports top post. Apologies.

Cy Schubert
<***@cschubert.com> or <***@freebsd.org>
The need of the many outweighs the greed of the few.
---

-----Original Message-----
From: Alex Kozlov
Sent: 04/12/2017 02:45
To: Willem Jan Withagen
Cc: ***@freebsd.org
Subject: Re: Deprecating / Removing floppy drive support
Post by Willem Jan Withagen
Post by Alex Kozlov
Post by Poul-Henning Kamp
Post by Alex Kozlov
Post by Gary Jennejohn
On Sun, 03 Dec 2017 10:27:57 +0000
Post by Poul-Henning Kamp
Incidentally FreeBSD is/was the only modern OS which could
still read 8" floppies.
Well, with proper* cable you can connect 8" drive to fdc and read
it pretty much on any OS that supports floppies.
Uhm... no ?
Very few OS's have had 8" format compatible settings since CP/M
and even fewer handle the track46 pin correctly on write.
I'd done it in dos, I read about successful setups for Linux and
Windows(older). Anecdotally, I was not able to do it in FreeBSD.
Never too late to learn....
I still think I have my (from 1982) 8" disks around with a ported CP/M
system to a TRS-80 like system... But ever since the Intel ASM/CPM
developement stack died on the University they have been lying round for
nostalgic reasons. And the hardware got dumped with the last move about
12 years ago.
But it never ever occured to me that FreeBSD would be able to do 8", if
alone for the controller. But now I learn that it could have worked...
Cool :)
Theoretically, it should work. In practice, as bde@ suggested, you may need
to use UP i386 kernel and perhaps downgrade to earlier version of FreeBSD.
Also you need to somehow acquire 34-to-50 cable or adaptor*. I made mine,
so perhaps that why I failed :)
You don't need to worry about tg43 signal if you don't plan to write on these
floppies.

In the end, after burning weekend on this little project, I realized that I
risk to burn much more time, so I just ordered kryoflux.

*) something like this http://www.classiccmp.org/dunfield/img54306/h/c8ssc.jpg
--
Alex
_______________________________________________
freebsd-***@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-***@freebsd.org"
Warner Losh
2017-12-04 18:11:28 UTC
Permalink
Post by Cy Schubert
My test showed that MP i386 works as well. Amd64 is broken.
What's the pathology on amd64?

Warner
Cy Schubert
2017-12-04 18:13:52 UTC
Permalink
I have one of those, used to boot an IBM 3274 controller.

---
Sent using a tiny phone keyboard.
Apologies for any typos and autocorrect.
This old phone only supports top post. Apologies.

Cy Schubert
<***@cschubert.com> or <***@freebsd.org>
The need of the many outweighs the greed of the few.
---

-----Original Message-----
From: Willem Jan Withagen
Sent: 04/12/2017 03:34
To: Alex Kozlov
Cc: ***@freebsd.org
Subject: Re: Deprecating / Removing floppy drive support
Post by Alex Kozlov
Post by Willem Jan Withagen
Post by Alex Kozlov
Post by Poul-Henning Kamp
Post by Alex Kozlov
Post by Gary Jennejohn
On Sun, 03 Dec 2017 10:27:57 +0000
Post by Poul-Henning Kamp
Incidentally FreeBSD is/was the only modern OS which could
still read 8" floppies.
Well, with proper* cable you can connect 8" drive to fdc and read
it pretty much on any OS that supports floppies.
Uhm... no ?
Very few OS's have had 8" format compatible settings since CP/M
and even fewer handle the track46 pin correctly on write.
I'd done it in dos, I read about successful setups for Linux and
Windows(older). Anecdotally, I was not able to do it in FreeBSD.
Never too late to learn....
I still think I have my (from 1982) 8" disks around with a ported CP/M
system to a TRS-80 like system... But ever since the Intel ASM/CPM
developement stack died on the University they have been lying round for
nostalgic reasons. And the hardware got dumped with the last move about
12 years ago.
But it never ever occured to me that FreeBSD would be able to do 8", if
alone for the controller. But now I learn that it could have worked...
Cool :)
to use UP i386 kernel and perhaps downgrade to earlier version of FreeBSD.
Also you need to somehow acquire 34-to-50 cable or adaptor*. I made mine,
so perhaps that why I failed :)
You don't need to worry about tg43 signal if you don't plan to write on these
floppies.
In the end, after burning weekend on this little project, I realized that I
risk to burn much more time, so I just ordered kryoflux.
*) something like this http://www.classiccmp.org/dunfield/img54306/h/c8ssc.jpg
Like I said. I'm keeping mine for nostalgic reason....
Don't have the drive any longer.

Dare I say that I even have hard sectored 8" disks, when the start of
block is actually indicated by a series of punched holes 8-)

--WjW
_______________________________________________
freebsd-***@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-***@freebsd.org"
Cy Schubert
2017-12-04 20:23:12 UTC
Permalink
In message <CANCZdfqzHLme1AMUO0Z_+***@mail.gmail.c
om>
--089e0825fdccb5682d055f87a50b
Content-Type: text/plain; charset="UTF-8"
Post by Cy Schubert
My test showed that MP i386 works as well. Amd64 is broken.
What's the pathology on amd64?
Not really much except for I/O error.

g_vfs_done():fd0[READ(offset=184320, length=512)]error = 5

I can dig into it unless someone else beats me to it.
--
Cheers,
Cy Schubert <***@cschubert.com>
FreeBSD UNIX: <***@FreeBSD.org> Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
Warner Losh
2017-12-04 20:54:00 UTC
Permalink
Post by Cy Schubert
mail.gmail.c
om>
--089e0825fdccb5682d055f87a50b
Content-Type: text/plain; charset="UTF-8"
Post by Cy Schubert
My test showed that MP i386 works as well. Amd64 is broken.
What's the pathology on amd64?
Not really much except for I/O error.
g_vfs_done():fd0[READ(offset=184320, length=512)]error = 5
I can dig into it unless someone else beats me to it.
OK. EIO is 5. The only EIO I see in the driver is where we've had too many
retries.

Set debug.fdc=-1 and see what you get for the error.

If isa_dma_init can't get lomem, it returns 0 which will cause the driver
to not attach, which isn't what we're seeing.

However, if configmalloc() bogusly returns an address too large, we don't
check for that in isa_dma.c. I don't think that's the bug, since I'd expect
different pathology.

diff --git a/sys/x86/isa/isa_dma.c b/sys/x86/isa/isa_dma.c
index 58601f85ae2..5c314863718 100644
--- a/sys/x86/isa/isa_dma.c
+++ b/sys/x86/isa/isa_dma.c
@@ -107,6 +107,12 @@ isa_dma_init(int chan, u_int bouncebufsize, int flag)
if (buf == NULL) {
buf = contigmalloc(bouncebufsize, M_DEVBUF, flag, 0ul,
0xfffffful,
1ul, chan & 4 ? 0x20000ul : 0x10000ul);
+ if (buf != NULL &&
+ isa_dmarangecheck(buf, bouncebufsize, chan) != 0) {
+ printf("isa_dma_init: %p failed range check\n",
buf);
+ contigfree(buf, bouncebufsize, M_DEVBUF);
+ buf = NULL;
+ }
contig = 1;
}

But EIO suggests we're timing out or getting repeated errors on the
command, and debug.fdc will get to the bottom of that. Might be nice to
have isa_dma_init print out the buffer it gets always, just to rule out
badness. I don't know if I have a box that can run amd64, but has a floppy
anymore... I'll have to check my boneyard.

Anyway, good luck.

Warner
Cy Schubert
2018-02-17 21:43:22 UTC
Permalink
In message <***@pdx.rh.CN85.dnsmgr.net>,
"Rodney W. Gri
[...]
Agreed. I also agree scripts that expect wide output without ww are??
broken. However Linux ps, at least Red Hat, behaves the same. I believe
??
the change was made to be more Linux compatible and allow greater??
portability.
What do people think should be done?
That's a tough one. Break Linux compatibility or break BSD??
compatibility?
Generally Linux users use ps -ef which we don't support and columns are
??
different so, Linux compatibility is... well just isn't.
My vote is to revert and have an environment variable with defaults,??
e.g., PS=--linux or something similar.
Linux compatibility is good and desirable, right up to the point where
it stomps on BSD compatibility. ??I think we should revert to historic
behavior.
I'm agnostic about whether an env var is a good idea or not. ??I use the
env vars for LESS and TOP and love the idea, but hate hate hate the
names (I've fought with conflicts on the too-common name TOP multiple
times over the years, most recently just last week my env var TOP
confused some makefile that had a TOP var in it). ??Could the var be
named something like PS_OPTS?
Sure. I'm ok even if there is no Linux compatibility. If we choose an
environment variable, I'm ok with any name as long as it makes sense.
However Solaris had (I haven't used Solaris since Solaris 9) /usr/ucb
for BSD compatible utilities. Should we consider something similar for
linux compatibility?
We already ahve the whole linuxlator thing, if they want a linux
ps cant they just.. um actually use a linux ps from /compat/linux?
I know ps grovels around in a lot of internals but this would,
imho, be the route to persue a "linux compatible" ps output.
Except for linuxy scripts that might be in ports or apps ported to
FreeBSD.

To argue against myself, that's what porting is. Either way, revert
back to BSD compatibility.
--
Cheers,
Cy Schubert <***@cschubert.com>
FreeBSD UNIX: <***@FreeBSD.org> Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
Mark Millard via freebsd-arch
2018-02-18 15:59:28 UTC
Permalink
Rodney W. Grimes freebsd-rwg at pdx.rh.CN85.dnsmgr.net wrote on
We already ahve the whole linuxlator thing, if they want a linux
ps cant they just.. um actually use a linux ps from /compat/linux?
I know ps grovels around in a lot of internals but this would,
imho, be the route to persue a "linux compatible" ps output.
How many processor architectures for FreeBSD does the "linuxlator"
cover vs. not cover? Which ones?

(Not that I'm after linux compatible command variants. I just use
powerpc64, powerpc, arm64, and armv7 --in addition to amd64.)

===
Mark Millard
marklmi at yahoo.com
( markmi at dsl-only.net is
going away in 2018-Feb, late)
Ed Maste
2018-02-20 03:01:41 UTC
Permalink
On 18 February 2018 at 10:59, Mark Millard via freebsd-arch
Post by Mark Millard via freebsd-arch
How many processor architectures for FreeBSD does the "linuxlator"
cover vs. not cover? Which ones?
Today the Linuxulator will run i386 Linux binaries on i386, and both
i386 and x86_64 Linux binaries on amd64.

Loading...