Author Topic: USB32 USBMSD problem of re-read diskette  (Read 17233 times)

Igor

  • Full Member
  • ***
  • Posts: 100
  • Karma: +12/-0
    • View Profile
USB32 USBMSD problem of re-read diskette
« on: January 21, 2023, 02:43:35 pm »
The problem is partially solved by replacing the USBMSD driver with a similar one of the 16-bit version. At the same time, USB2 disk2 work and do not operate USB3 discs.
Provided to replace the diskette in the drive is determined and re-read correctly and all functions also work correctly - recording, reading, formatting, which unambiguously indicates a problem in the USBMSD driver from AN.
To my regret, AN, after my appeal, did not show interest in solving the problem, despite the ticket issued according to their requirements. They referred to the fact that everything works for them.

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: USB32 USBMSD problem of re-read diskette
« Reply #1 on: January 21, 2023, 05:11:05 pm »
As can be seen in this video:

https://www.youtube.com/watch?v=9vXKvku6y5A

the presenter stated that none of his 3 USB floppy drives would work with ArcaOS (I assume 5.0.x), so that answers the "everything works for us".

I assume that with the "USBMSD driver of the 16-bit version" you mean the USBMSD.ADD from my USB driver set.
Yes, I can tell you that it needed quite a few fixes to redetermine the inserted floppy media. And I know that it works with my updated driver because I have a USB floppy drive to test with.

I am pretty sure that AN never picked up these fixes and they never will.

Lewis Rosenthal

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +6/-0
    • View Profile
    • Tales from the Trenches of IT
Re: USB32 USBMSD problem of re-read diskette
« Reply #2 on: January 21, 2023, 09:06:48 pm »
Hi, guys...

Test system here:

ThinkPad T560
Lenovo Docking Station (17EF:1010 (HS hub with single TT) Lenovo ThinkPad Ultra Dock Hub)
ArcaOS 5.0.7
USB stack 12.14 / USBMSD.ADD /FLOPPIES:1
Teac FD-05PUW (0644:0000 (MSD)-(UFI)-(CBI-I) FS TEAC Corp. Floppy)

Device hot plugs. Insert media; able to read, able to write; eject media; insert different media; able to read, able to write.

Same system, but swap out the Teac drive with:

IBM USB portable FDD (057B:0000 (MSD)-(UFI)-(CBI-I) FS Y-E Data, Inc. FlashBuster-)

Same result. Disks insert, readable, writable, eject, replace with different disks, reading/writing still possible.

The only thing I didn't test was formatting. Okay, testing... Formatting works as expected (in the IBM drive, at least).

I fail to see what is wrong, sorry.
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE, CWTS
Managing Member
Arca Noae, LLC                               www.arcanoae.com

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: USB32 USBMSD problem of re-read diskette
« Reply #3 on: January 22, 2023, 01:59:46 pm »
I think I can tell you what`s wrong: a few years ago, you (Lewis), sent me a Mitsumi USB floppy drive to test.
And that drive did NOT work with the USBMSD.ADD back at the time. Seemingly, there are drives that are more sophisticated, there are even drives that can actually eject a diskette via a command (instead of a mechanical eject), there are drives that have a "diskette change" signal and therefore do not need to be polled for a change but this "cheapo" drive would not do.
After quite some fiddling I found out how to properly interpret the "sense codes" that the USB floppy drive sends back. I then based the media (re)determination on the "proper" sense codes to react upon. Additionally, had to add some logic when and how to reattempt reading from media.
So, as so often with USB, not every USB floppy drive is equal.
That also solved the problem that it is no longer required to have a diskette already inserted when attaching the USB floppy drive to have the diskette propery be detected if you want to access it later on. Plus the desperate attempts of the OS to read from a USB floppy diskette ad infinitum whenever the "Drives" object is opened (and no diskette is inserted in the floppy drive).
Again look at the video: that guy is saying that he tried with 3 different USB floppy drives and none would work.

https://youtu.be/9vXKvku6y5A?t=601
« Last Edit: January 22, 2023, 03:38:57 pm by Lars »

Igor

  • Full Member
  • ***
  • Posts: 100
  • Karma: +12/-0
    • View Profile
Re: USB32 USBMSD problem of re-read diskette
« Reply #4 on: January 22, 2023, 03:07:32 pm »
Hi, Lewis!

Hi, guys...
...
I fail to see what is wrong, sorry.

I completely believe that you do not see what is wrong. I understand perfectly well that everything works for you and does not question your messages.

However, I have a device that works with Windows 7, works with another driver and does not work with your driver.

I propose to make tests for your instructions for you, send additional logs.

P.S. A long time ago (more than 20 years ago) in a distant galaxy... I worked as a programmer in large projects of American companies. If I answered the customer to the claim that I have the software I developed work properly, I would have lost my job :(

Igor

  • Full Member
  • ***
  • Posts: 100
  • Karma: +12/-0
    • View Profile
Re: USB32 USBMSD problem of re-read diskette
« Reply #5 on: January 22, 2023, 03:11:17 pm »
I assume that with the "USBMSD driver of the 16-bit version" you mean the USBMSD.ADD from my USB driver set.
I spoke incorrectly about the 16-bit version. I really meant your version of the driver. The bit has nothing to do with this.

Michael

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
Re: USB32 USBMSD problem of re-read diskette
« Reply #6 on: January 22, 2023, 03:54:42 pm »
Unfortunately, mine doesn't work under Arcaos either. I also use a ThinkPad T560 with a docking station, although the USB ports in this combination on the dock do not work anyway.
Unfortunately I cannot use Lars drivers because there is no USB 2.0.

Lewis Rosenthal

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +6/-0
    • View Profile
    • Tales from the Trenches of IT
Re: USB32 USBMSD problem of re-read diskette
« Reply #7 on: January 22, 2023, 04:11:48 pm »
Igor: You and I seem to have the same floppy drive (Teac USB ID 0644:0000). David also has one of these. Considering that David's and my drive work and yours does not, I would have to say that this is likely not something related to the USB stack (yes, I get that Lars' USBMSD driver works), but rather something unique to these systems where the drives are not working (and/or where the AN stack performs additional error checking which perhaps Lars' driver does not - and that is just a WAG on my part).

Michael: Have you opened a ticket with Arca Noae and provided a testlog for one of your drives which does not work? Are you also saying that the ports in your dock do not work? This could point to a number of other issues beyond software.
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE, CWTS
Managing Member
Arca Noae, LLC                               www.arcanoae.com

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: USB32 USBMSD problem of re-read diskette
« Reply #8 on: January 22, 2023, 05:34:15 pm »
So you are saying, the AN USBMSD driver does better error checking than my driver and that's why it will not work practically whereas my driver does no error checking and that's why it works ?

That does not seem to make a lot of sense to me ...

By the way: I added a LOT of error checking to the driver. It is not on the same level as it was delivered by IBM as part of their DDK.

To me it rather looks like David is seeing problems where there aren't any.

Lewis Rosenthal

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +6/-0
    • View Profile
    • Tales from the Trenches of IT
Re: USB32 USBMSD problem of re-read diskette
« Reply #9 on: January 22, 2023, 06:38:34 pm »
Lars, I mean no disrespect, and do not mean to imply that one driver performs more or better checking than the other, but perhaps *different* checking.

I'll have to look at Igor's testlog output again, but all I can say right now is that we have what should be the same hardware, and yet, mine works and his does not. I'm confident that your stack would work for my drive, as well. So, I'm only positing that there may be other factors at play instead of an actual software defect.

Thanks for all you do, my friend. ;)
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE, CWTS
Managing Member
Arca Noae, LLC                               www.arcanoae.com

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5084
  • Karma: +117/-1
    • View Profile
Re: USB32 USBMSD problem of re-read diskette
« Reply #10 on: January 22, 2023, 07:16:06 pm »
Wonder whether the hardware could be different even with the same USB ID? I could imagine a hardware change happening without an ID change.

Michael

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
Re: USB32 USBMSD problem of re-read diskette
« Reply #11 on: January 22, 2023, 07:26:59 pm »
Hello Lewis,

with regard to the disk drive, I will still wait for a result for Igor. I looked at the ticket and he describes the exact same problem as I have.

Because of the USB connections at the docking station, I will open a ticket as soon as I have time.

All in all, I would also like to express my thanks for the great work that is still done for OS/2 - whether non -profit and commercial.

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: USB32 USBMSD problem of re-read diskette
« Reply #12 on: January 23, 2023, 01:45:55 pm »
Hallo Igor, Michael,

this is an excerpt of the readme for USBMSD.ADD in its original IBM version 10.162 which was the base for further development for both drivers, that from AN as well as my driver set:

Code: [Select]
2.7 Known Limitations
=====================
 
2.7.1  Only USB Memory Keys sized 16MB or larger are supported.
 
2.7.2  IBM 32MB USB Memory Key and Iomega PocketZip USB drive cannot be
       suspended/resumed properly. These devices must be ejected and
       then detached before you start the suspend mode.
       
2.7.3  Eject must be executed for the USB removable drive prior detaching
       (switching off) it from working system. This is necessary for correct
       drive operation after re-attaching the drive.
 
2.7.4  Some USB floppy disk drives (i.e. IBM USB Portable Diskette Drive,
       ASM P/N 06P5222, FRU P/N 06P5223) are known to become inaccessible
       if there was no diskette in the drive during boot/attach time.
       To avoid this, a diskette should remain in the drive while the system
       is booting or while the drive is being attached.
 
2.7.5  Removable device monitoring utility works only under OS/2 Warp 4 
       with Convenience Pack 2 installed and OS/2 Warp Server for e-business 
       with Convenience Pack 2 installed. USB Basic support must be upgaded
       to the latest version before installing the removable device monitoring 
       utility.

Are you experiencing the effects described in 2.7.4 ?
If yes, I would suspect that AN has rebased their development of USBMSD.ADD on the original DDK source code (apart from adding support for superspeed media which was mentioned somewhere).
Properly handling USB floppy drives need changes to the DDK source code to work properly.

If not, there is another potential for problems if the USB floppy disk drive is the same but the USB host controller HW/FW is different.
As far as I remember from the XHCI spec, a few of the things that Host Controller Driver SW had to implement in SW for UHCI/OHCI/EHCI is now executed totally autonomously by the Host Controller HW/FW. So, if the host controller HW/FW differs, then things might fail even though the USB floppy drive is the very same.

When I attach my USB (1.x) floppy drive under Windows 11, it is never able to detect (left alone use) it. It always plays the "attach sound" and then Windows 11 reports that it could not read descriptor info (which is about the very first thing that needs to be done, before anything else). Since for XHCI, some things are done completely in HW/FW, no SW on planet earth can work around that problem. My Windows 11 notebook has USB 3 only (but I suppose it has some rate matching hub to be able to use USB 1.x and USB 2 devices).

My OS/2 bare metal machine is older, has an AMD CPU and chipset, still has USB 2 (and USB 3) support and will happily accept the USB floppy drive. But I am using USB 2 and not USB 3.



« Last Edit: January 23, 2023, 01:58:34 pm by Lars »

Lewis Rosenthal

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +6/-0
    • View Profile
    • Tales from the Trenches of IT
Re: USB32 USBMSD problem of re-read diskette
« Reply #13 on: January 23, 2023, 03:08:46 pm »
Hi, Lars...

I happen to have an IBM FRU 02P5223 right here, and it works perfectly well attached to the same T560 USB3 port in the dock as my Teac, with or without media inserted at time of connection. This information from the DDK is considerably outdated, and of little to no relevance to the 32-bit AN driver..

David completed extensive reworking of USBMSD.ADD in the 12.04 release of the AN stack (March, 2020) when he converted it (USBMSD.ADD) to 32-bit. There was a lot of broken stuff in the IBM code (including at least one null pointer). Frankly, it's rather amazing that the IBM code worked as well as it did.
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE, CWTS
Managing Member
Arca Noae, LLC                               www.arcanoae.com

Igor

  • Full Member
  • ***
  • Posts: 100
  • Karma: +12/-0
    • View Profile
Re: USB32 USBMSD problem of re-read diskette
« Reply #14 on: January 23, 2023, 03:24:41 pm »

Code: [Select]
2.7.4  Some USB floppy disk drives (i.e. IBM USB Portable Diskette Drive,
       ASM P/N 06P5222, FRU P/N 06P5223) are known to become inaccessible
       if there was no diskette in the drive during boot/attach time.
       To avoid this, a diskette should remain in the drive while the system
       is booting or while the drive is being attached.
 

Are you experiencing the effects described in 2.7.4 ?
 

Not certainly in that way. Even if the diskette was inserted at the time of loading the system does not work correctly when changing the diskette.
If the diskette is replaced by the driver AN does not notice this and when trying to record it saves on the new FAT disk with the one that was in the drive at the time of boot.
Additionally, I want to indicate that I use exclusively USB2.0 to connect a USB drive.