English Amiga Board


Go Back   English Amiga Board > News

 
 
Thread Tools
Old 21 September 2012, 13:39   #41
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
it's the archive loaded here 2012 september 19th...
Gilloo is offline  
AdSense AdSense  
Old 21 September 2012, 18:02   #42
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,925
Anyway, run mungwall to confirm the problem (see previous post), perhaps you have some other version loaded by someone else mount finds it from filesystem.resource or something..
Toni Wilen is offline  
Old 24 September 2012, 23:14   #43
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
hi,
Nothing in filesystem.resource at startup because the pfs3 is always in l: and never in the rdb on my system...
mungwall says noyhing. still the same: guru #8 for the handler uh4: on ks3.1, and guru #3 on ks1.3... ???
Gilloo is offline  
Old 25 September 2012, 10:15   #44
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,925
Can you duplicate it using RAD: mountlist modified to use pfs3 filesystem and trackdisk.device? (Make also sure it says globvec=-1 or it will crash at mount)

How do you exactly mount it?

I guess I still miss something important..
Toni Wilen is offline  
Old 25 September 2012, 20:49   #45
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
Hum, I'm confuse...
the RAD modified as you indicates works perfectly!! (mount/unmount)
It's my usbscsi.device in fault ? the guru #8 is inside the handler (UH4: because my partition UH4: is in pfs3 format) !?
I mount the device with the command c:mount and unmount with the program given last week... strange...
Gilloo is offline  
Old 25 September 2012, 20:59   #46
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,925
Can you log all commands that your device receives during unmount? It should help to pinpoint what and when things go wrong. I can also create serial debug version of pfs3 handler.
Toni Wilen is offline  
Old 25 September 2012, 21:42   #47
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,925
Perhaps it is TD_REMCHANGEINT? PFS3 uses DoIO(), not SendIO() like for example SFS.

Hmm.. Perhaps TD_REMCHANGEINT also always needs to be handled as IO_QUICK, this is not documented anywhere but at least SFS just SendIO()'s it without waiting for any replies.

ADDED: At least KS 3.1 trackdisk.device has special case for TD_REMCHANGEINT, it always handles it as if IOB_QUICK is set.

Last edited by Toni Wilen; 26 September 2012 at 17:09.
Toni Wilen is offline  
Old 26 September 2012, 22:55   #48
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
For original PFS3 I got this
BeginIO 4 CMD_UPDATE
BeginIO 4 CMD_UPDATE
BeginIO 9 TD_MOTOR
BeginIO 21 TD_REMCHANGEINT
BeginIO 9 TD_MOTOR
BeginIO 5 CMD_CLEAR
BeginIO 5 CMD_CLEAR
DevClose "UH4"
then usbscsi.device task ends.

For PFS3_ks13 I got this:
BeginIO 4 CMD_UPDATE
BeginIO 4 CMD_UPDATE
BeginIO 9 TD_MOTOR
BeginIO 9 TD_MOTOR
BeginIO 5 CMD_CLEAR
BeginIO 5 CMD_CLEAR
then crash guru #8 for UH4. At this step my usbscsi.device task is gone... like it would be asynchronous here and synchronous on the original PFS3.
It certainly my code in fault...
Gilloo is offline  
Old 27 September 2012, 16:41   #49
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,925
Do you see matching (same request structure pointer) TD_ADDCHANGEINT when mounting?

EDIT: Also you do see TD_GETGEOMETRY (If it appears, it is used to check DGF_REMOVABLE bit) just before TD_ADDCHANGEINT? (Test both PFS3 versions). Different behavior may be due to different compilation options..
Toni Wilen is offline  
Old 27 September 2012, 18:04   #50
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,925
Log enabled version attached. Note that it writes directly to serial port hardware, serial cable needed, any redirection program won't work.

Here is WinUAE example:

Code:
50-045 [673 221-193]: PFS3 starting...
50-046 [673 225-209]: Waiting for Start-up packet...
50-048 [673 224-242]: Mounting...
50-050 [673 061-253]: ENTER: Initialize.
50-050 [673 226-272]: Opening device...
50-051 [673 038-290]: trackdisk.device.
50-052 [673 222-308]: ENTER: InitLRU.
50-054 [674 219-014]: EXIT: initialize.
50-055 [674 044-031]: Mount done...
50-057 [674 079-047]: ENTER: UpdateChangeCount.
50-059 [674 046-072]: ENTER: NewVolume.
50-059 [674 225-091]: ENTER: GetCurrentRoot.
50-061 [674 051-113]: ENTER: UpdateChangeCount.
51-158 [729 221-070]: ENTER: DiskInsertSequence.
51-160 [729 226-096]: ENTER: MakeVolumeData.
51-193 [730 222-301]: EXIT: MakeVolumeData.
51-195 [731 224-012]: ENTER: AllocLRU.
51-225 [732 222-171]: EXIT: DiskInsertSequence.
51-227 [732 226-203]: EXIT: NewVolume.
51-228 [732 133-221]: ENTER: Lock.
51-229 [732 036-233]: ENTER: GetFullPath.
51-230 [732 039-253]: ENTER: UpdateChangeCount.
51-232 [732 224-281]: ENTER: MakeListEntry.
51-233 [732 223-302]: ENTER: AllocLRU.
51-235 [733 225-024]: ENTER: AllocLRU.
51-237 [733 226-056]: EXIT: LoadDirBlock.
52-114 [777 222-004]: ENTER: UpdateDisk.
52-115 [777 226-023]: ENTER: AllocReservedBlock.
52-694 [805 226-304]: EXIT: UpdateDisk.

action_die received:

57-290 [1035 224-183]: ENTER: dd_info.
57-291 [1035 226-203]: ENTER: DiskRemoveSequence.
57-292 [1035 219-231]: ENTER: Free volume resources.
57-294 [1035 047-260]: ENTER: FreeUnusedResources.
57-296 [1035 226-291]: EXIT: FreeVolumeResources.
57-299 [1036 226-011]: EXIT: DiskRemoveSequence.

action_die processing:

57-301 [1036 226-045]: ENTER: dd_Quit.
57-302 [1036 051-060]: ENTER: UpdateDisk.
57-303 [1036 037-079]: EXIT: UpdateDisk.
57-304 [1036 036-097]: Removing volume...
57-305 [1036 037-116]: Uninstalling ResetHandler...
57-307 [1036 225-146]: Uninstalling DiskChangeHandler...
57-309 [1036 223-183]: Answering queued packets.
57-311 [1036 100-208]: Answering queued notifications.
57-313 [1036 093-240]: Forbid()...
57-315 [1036 081-253]: Freeing timer request.
57-316 [1036 149-281]: Freeing device request.
57-317 [1036 224-305]: Freeing ports.
57-319 [1037 226-011]: Freeing misc structures.
57-321 [1037 225-044]: Permit().
57-322 [1037 060-053]: All locks freed..
57-323 [1037 220-072]: EXIT: dd_Quit.

Last edited by Toni Wilen; 27 September 2012 at 21:58.
Toni Wilen is offline  
Old 27 September 2012, 21:54   #51
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
hey, this debug version is working without any guru... in 1.3 and 3.1 !
I want this one ! kiitos!
Gilloo is offline  
Old 27 September 2012, 22:01   #52
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,925
Ah! I think I found the real problem. It is actually bug in original PFS3 but only if it has removable support compiled in (I guess it is only included in "floppypfs", not in normal pfs3) and driver TD_GETGEOMETRY reports no DGF_REMOVABLE flag.

Does attached non-debug version still work?

Last edited by Toni Wilen; 28 September 2012 at 18:23.
Toni Wilen is offline  
Old 27 September 2012, 23:44   #53
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
This version works fine ! (will try it on my true 68000 on sunday...)
kiitos

my usbscsi.device is coded with that for TD_GEOMETRY:
d->ms_Geometry.dg_Flags = DGF_REMOVABLE ;
because a usb device can be hot unplugged... even if the media rests inside

in fact, the true trace is like that:
BeginIO 4 CMD_UPDATE "UH2"
BeginIO 4 CMD_UPDATE 'UH3"
BeginIO 9 TD_MOTOR "UH2"
BeginIO 9 TD_MOTOR "UH3"
BeginIO 5 CMD_CLEAR "UH2"
BeginIO 5 CMD_CLEAR "UH3"
and UH4 does nothing after ACTION_DIE, except a guru in the previous version.
UH2 and UH3 are FFS handlers, the original PFS3 doesn't claim CMD_UPDATE, TD_MOTOR, CMD_CLEAR after ACTION_DIE.

Last edited by Gilloo; 28 September 2012 at 12:15. Reason: completing...
Gilloo is offline  
Old 28 September 2012, 11:55   #54
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,925
Thanks. It finally makes sense..

PFS3 has following code, standard PFS3 does not have TRACKDISK define:

Code:
static BOOL TestRemovability(globaldata *g)
{
#ifdef TRACKDISK

  struct DriveGeometry *geom = g->geom;
  struct IOExtTD *request = g->request;
  BOOL result;

	if(g->trackdisk)
	{
		request->iotd_Req.io_Data = g->geom;
		request->iotd_Req.io_Command = TD_GETGEOMETRY;
		request->iotd_Req.io_Length = sizeof(struct DriveGeometry);

		if(DoIO((struct IORequest *)request) == NULL)
			result = geom->dg_Flags & DGF_REMOVABLE;
		else
			result = 1;     /* trackdisk assumed to be removable */
	}
	else
	{
	  struct DosEnvec *env = g->dosenvec;

		if( (env->de_Surfaces <= 2) && (env->de_LowCyl == 0) )
			result = 1;     /* to accomodate things like the diskspare.device */
		else
			result = 0;     /* disk is assumed to be NOT removable by default */
	}

	return(result);

#else
	return 1;           /* to accomodate SyQuest, Floptical etc */
#endif
}
I enabled TRACKDISK so that floppy changes also work (This define is required because it is also used in other parts of code). But g->trackdisk is only true if device is trackdisk.device (or diskspare) -> code falls back to that DosEnvec check that I assume returns false when using your usb device?

If false is returned: no ADDCHANGEINT but REMCHANGEINT with NULL io request is still called during ACTION_DIE -> crash.

In next and hopefully final version TestRemovability() will always return true which should fix this problem.
Toni Wilen is offline  
Old 28 September 2012, 18:27   #55
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,925
Update attached. Aminet update will be done later after some more testing.

Also includes following updates:
- keyboard reset handler hang fixed (This was not my bug!)
- 1.x C:Info does not report "no disk in drive" anymore.

Last edited by Toni Wilen; 14 April 2013 at 12:08.
Toni Wilen is offline  
Old 01 October 2012, 10:43   #56
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
Many thanks Toni!

Can you also modify errors messages: there is not the name of the device in cause.
I have also noticed that the 'retry' doesn't really work: on read/write error, the handler seems to not retry... (I don't see the command on the device side!)
Gilloo is offline  
Old 01 October 2012, 11:50   #57
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,925
Quote:
Originally Posted by Gilloo View Post
Many thanks Toni!

Can you also modify errors messages: there is not the name of the device in cause.
Examples? How to duplicate?

Quote:
I have also noticed that the 'retry' doesn't really work: on read/write error, the handler seems to not retry... (I don't see the command on the device side!)
(I assume you mean under 2.0+ because under 1.x all requesters are canceled automatically, there is no requester wrapper)

Does original version do the same? Do you get TD_CHANGESTATE, TD_PROTSTATUS IO commands after canceling? Retry code looks fine.
Toni Wilen is offline  
Old 01 October 2012, 12:50   #58
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
Effectively it is in the original PFS3
To get these errors, it's complex: you need a device unable to process big size transfers, i.e. limited to 8kB, and don't precise it in the mountlist. If the handler need to read 16kB, boom :
Error 42 cannot read bloc n
Retry Cancel
but the bloc n is never read anymore...
Gilloo is offline  
Old 01 October 2012, 20:53   #59
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,925
That is not good enough test case, sorry

Does it also happen if you hack your driver to always return some error when for example writing? Do you get _any_ io commands after clicking retry?

Retry does nothing if PFS3 detects missing media, media was changed or media isn't pfs3 formatted. (It checks pfs3 superblock contents after each retry, any kind of error = retry does nothing)

Quote:
Can you also modify errors messages: there is not the name of the device in cause.
Perhaps later.
Toni Wilen is offline  
Old 11 October 2012, 13:46   #60
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
Heeeee, so bad, I confused libusb and libusbx.
libusb seems to be not supported anymore...
so I must remap and re-work all the interface to be libusbx-win32 compatible.
Tsssss win-world is not fun
Gilloo is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
ANAIIS 1.09 (30 Sep 2013) Gilloo News 22 30 April 2014 16:38
Flashback 2012 Demoscene computer party 9th - 10th & 11th June 2012 - C64 - AMIGA - P reload News 0 24 April 2012 18:01
ANAIIS 1.03 - Poppy fixes. Gilloo News 15 17 April 2012 10:56
ANAIIS 1.02 - Summer fixes Gilloo News 7 05 January 2012 01:04
FAT95 (and ANAIIS) Gilloo support.Hardware 0 19 September 2011 15:53

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:03.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.27026 seconds with 12 queries