CTPCI and USB card

Discuss CT60/CT63, CTPCI, SuperVidel and EtherNAT hardware here.

Moderators: Mug UK, [ProToS], lp, moondog/.tSCc., Moderator Team

mikro
Atari God
Atari God
Posts: 1425
Joined: Sat Sep 10, 2005 11:11 am
Location: Burnie, Tasmania
Contact:

Re: CTPCI and USB card

Postby mikro » Tue Oct 03, 2017 10:07 am

You are gonna love me for this. ;-) Last seven kernels to test. I have numbered them from 1 to 7 where 1 is the oldest and 7 newest.

From this set we need to find the bad guy. I recommend following procedure for testing:

1. (7)
2. If (7) works, that means c17 is the first bad guy. Just to be sure, verify also that (6) works.
3. Else (1)
4. If (1) doesn't work, that's good news -- we have found the bad guy. For sure test (2) to verify it's still bad.
5. Else continue in whatever direction: (2), (3), ... (6) or (6), (5), ... (2).

When you find the bad guy, always verify also the next in order is bad and make sure that the previous in order was good (or vice versa, depending on the ordering).
You do not have the required permissions to view the files attached to this post.

Kroll
Captain Atari
Captain Atari
Posts: 381
Joined: Fri Mar 09, 2012 10:07 am

Re: CTPCI and USB card

Postby Kroll » Tue Oct 03, 2017 11:28 am

I do not know if it's good or bad news. Unfortunately, none of the above works and is practically the same (see photo).
No activated additional partitions and drive q:/ is not visible

Photo-0073.jpg


To be sure that nothing else happened, I copied again the last usb_3f401cdb.zip and this one works

What do you think about ? Is it bad news ?
You do not have the required permissions to view the files attached to this post.

mikro
Atari God
Atari God
Posts: 1425
Joined: Sat Sep 10, 2005 11:11 am
Location: Burnie, Tasmania
Contact:

Re: CTPCI and USB card

Postby mikro » Tue Oct 03, 2017 12:06 pm

It's normal news. :) That means that 3f401cdb is the last working revision.

Interestingly, commit a7f4a4f0 is just a fix in code handling an error (!):

Code: Select all

long usb_new_device(struct usb_device *dev)
{
   DEBUG(("usb_new_device: "));
   long addr, err;
   long tmp;
   unsigned char tmpbuf[USB_BUFSIZ];
 
   /* We still haven't set the Address yet */
   addr = dev->devnum;
   dev->devnum = 0;
   
   [...]

   /* This is a Windows scheme of initialization sequence, with double
    * reset of the device (Linux uses the same sequence)
    * Some equipment is said to work only with such init sequence; this
    * patch is based on the work by Alan Stern:
    * http://sourceforge.net/mailarchive/forum.php?
    * thread_id=5729457&forum_id=5398
    */
   struct usb_device_descriptor *desc;
   long port = -1;
   struct usb_device *parent = dev->parent;
   unsigned short portstatus;

   /* send 64-byte GET-DEVICE-DESCRIPTOR request.  Since the descriptor is
    * only 18 bytes long, this will terminate with a short packet.  But if
    * the maxpacket size is 8 or 16 the device may be waiting to transmit
    * some more, or keeps on retransmitting the 8 byte header. */

   desc = (struct usb_device_descriptor *)tmpbuf;
   dev->descriptor.bMaxPacketSize0 = 64;       /* Start off at 64 bytes  */
   /* Default to 64 byte max packet size */
   dev->maxpacketsize = PACKET_SIZE_64;
   dev->epmaxpacketin[0] = 64;
   dev->epmaxpacketout[0] = 64;

   err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, desc, 64);
   if (err < 0) {
      DEBUG(("usb_new_device: usb_get_descriptor() failed"));
      dev->devnum = addr; // <---------- this line has been added!
      return 1;
   }


I.e. it basically says that if getting the device descriptor failed, set some structure and return. So I'd assume previous versions shouldn't work and yet 3f401cdb does. Let's be totally paranoid and try the attached version, it's one revision less but with totally useless change (changing default CPU for storage.udd & netusbee.ucd from 060 to 000). If *that* doesn't work, that... that will be interesting. ;)
You do not have the required permissions to view the files attached to this post.

Kroll
Captain Atari
Captain Atari
Posts: 381
Joined: Fri Mar 09, 2012 10:07 am

Re: CTPCI and USB card

Postby Kroll » Tue Oct 03, 2017 12:31 pm

I have just tested, and not working, but after the run loader.prg on the screen there is aditional information
pid 5 (hubd): pipesize for pipe FFFFFF00 is zero
pid 5 (hubd): pipesize for pipe FFFFFF80 is zero

Similar information I had on the screen for the first compilation of the previous seven tested

mikro
Atari God
Atari God
Posts: 1425
Joined: Sat Sep 10, 2005 11:11 am
Location: Burnie, Tasmania
Contact:

Re: CTPCI and USB card

Postby mikro » Tue Oct 03, 2017 12:39 pm

Most intriguing. Maybe you have discovered quite interesting bug in the m68000 library. Let's see what happens with this one. This is literally the same as 3f401cdb.
You do not have the required permissions to view the files attached to this post.

Kroll
Captain Atari
Captain Atari
Posts: 381
Joined: Fri Mar 09, 2012 10:07 am

Re: CTPCI and USB card

Postby Kroll » Tue Oct 03, 2017 12:56 pm

mikro wrote:Most intriguing. Maybe you have discovered quite interesting bug in the m68000 library. Let's see what happens with this one. This is literally the same as 3f401cdb.


Wow, it is working (look at photo),
Photo-0075.jpg


Does that mean we are close to solving a problem with mass storage in Netusbee ? :D
You do not have the required permissions to view the files attached to this post.

mikro
Atari God
Atari God
Posts: 1425
Joined: Sat Sep 10, 2005 11:11 am
Location: Burnie, Tasmania
Contact:

Re: CTPCI and USB card

Postby mikro » Tue Oct 03, 2017 9:25 pm

No, that means we have a rather interesting problem to solve. ;-) (btw thanks for accepting the builds in such raw form, it saves me heaps of time)

I'm attaching two of our well known friends, usb-5f968c56 (working one) and usb-1adba0e0 (not working one). This is for a) verifying I didn't make a stupid typo or something similar yesterday b) get some debug outputs.

So, try to boot the kernel, press shift, set the debug level to "DEBUG", continue. Don't freak out with many debug messages. ;-) Then run the loader as:

./loader.prg > usb-XXXXXXXX.log (don't remember whether it's standard output or error, if you still see messages after this command, try ./loader 2> usb-XXXXXXXX.log)

Do for both, send me the logs. This should reveal the nature of this bug (whether 68000 code makes it slower = some timeout isn't met or it's something more serious).
You do not have the required permissions to view the files attached to this post.

Kroll
Captain Atari
Captain Atari
Posts: 381
Joined: Fri Mar 09, 2012 10:07 am

Re: CTPCI and USB card

Postby Kroll » Tue Oct 03, 2017 10:18 pm

mikro wrote:No, that means we have a rather interesting problem to solve. ;-) (btw thanks for accepting the builds in such raw form, it saves me heaps of time)

I'm attaching two of our well known friends, usb-5f968c56 (working one) and usb-1adba0e0 (not working one). This is for a) verifying I didn't make a stupid typo or something similar yesterday b) get some debug outputs.

So, try to boot the kernel, press shift, set the debug level to "DEBUG", continue. Don't freak out with many debug messages. ;-) Then run the loader as:


Sorry for being a trivial question, but after entering Freemint boot menu :, I have options
7 Debug / trace level, which should set:

0 - (none)
1 - ALERT
2 - ALERT, DEBUG
3 - ALERT, DEBUG, TRACE
4 - ALERT, DEBUG, TRACE, TRACELOW

8 - Debug output dev.

0- PRN: printer
1- Aux: modem
2 - CON: conole
3 - MID: midi
4 - KBD: keyboard
5 - RAW:: raw console

Memory Protection should be Yes ?

mikro
Atari God
Atari God
Posts: 1425
Joined: Sat Sep 10, 2005 11:11 am
Location: Burnie, Tasmania
Contact:

Re: CTPCI and USB card

Postby mikro » Tue Oct 03, 2017 10:35 pm

Set 2 - ALERT, DEBUG (trace is worth trying but perhaps you'll be flooded with too many useless messages; try 2 first)

Debug device - console (2 again).

User avatar
viking272
Captain Atari
Captain Atari
Posts: 294
Joined: Mon Oct 13, 2008 12:50 pm
Location: west of London, UK

Re: CTPCI and USB card

Postby viking272 » Thu Jan 18, 2018 10:55 pm

How did the testing work out in this scenario?

mikro
Atari God
Atari God
Posts: 1425
Joined: Sat Sep 10, 2005 11:11 am
Location: Burnie, Tasmania
Contact:

Re: CTPCI and USB card

Postby mikro » Fri Jan 19, 2018 12:47 am

You're right, this deserves some conclusion.

The first thing is to name the problem precisely, there are three separate problems:

  • CTPCI+USB keyboard/mouse (beginning of this thread)
  • CTPCI+network card (viewtopic.php?f=97&t=31641)
  • 060+NetUSBee (later in this thread)
The first two issues are fortunately connected to the same problem, addition of the PCI BIOS wrapper to the kernel.

After a countless number of tests Kroll had done for me I was able to pinpoint the issue with the 3d problem, two issues to be precise. Related discussion in the mailing list and my conclusion.

I'd decided to focus on the 3rd problem (the netusbee one) first but got stuck. The issue with the stack was easy to solve (already committed) but the other one... I tried to use the formula for 68000 builds to get precise timing, nope, didn't work. No idea why because the formula is right, it produces the same results as the 020+ asm code and yet it fails miserably. After that I had to stop (moving around the country, far less time for such delicate work).

TL;DR version is that if you want to have a fairly recent kernel with PCI working, use the archive "pre_pcibios.zip". If you want to use netusbee.ucd on 030/060, you can use latest sources but you have to compile it by yourself for 020+ CPU.

So it's far from solved but at least we have some pointers.

User avatar
viking272
Captain Atari
Captain Atari
Posts: 294
Joined: Mon Oct 13, 2008 12:50 pm
Location: west of London, UK

Re: CTPCI and USB card

Postby viking272 » Fri Jan 19, 2018 5:41 pm

Thanks mikro for that update, some good work analysing all the issues.

Galvez
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 124
Joined: Fri Oct 19, 2007 7:49 am

Re: CTPCI and USB card

Postby Galvez » Sun Jan 21, 2018 7:45 pm

mikro wrote:You're right, this deserves some conclusion.

The first thing is to name the problem precisely, there are three separate problems:

  • CTPCI+USB keyboard/mouse (beginning of this thread)
  • CTPCI+network card (viewtopic.php?f=97&t=31641)
  • 060+NetUSBee (later in this thread)
The first two issues are fortunately connected to the same problem, addition of the PCI BIOS wrapper to the kernel.


I have disabled the PCI wrapper for the 060 kernel, this should fix the the two first issues for current kernels.
Kroll let me know if it works now for you.

Kroll
Captain Atari
Captain Atari
Posts: 381
Joined: Fri Mar 09, 2012 10:07 am

Re: CTPCI and USB card

Postby Kroll » Sun Jan 21, 2018 11:07 pm

Hi Galvez:
Sorry, but my falcon in which I have 060 and CTPCI is not working in this moment. I do not know what happened, but tomorrow I send to my friend who I hope to see what happened, in this moment I have only Falcon 030 :(

mikro
Atari God
Atari God
Posts: 1425
Joined: Sat Sep 10, 2005 11:11 am
Location: Burnie, Tasmania
Contact:

Re: CTPCI and USB card

Postby mikro » Sun Jan 21, 2018 11:57 pm

Kroll wrote:Sorry, but my falcon in which I have 060 and CTPCI is not working in this moment. I do not know what happened, but tomorrow I send to my friend who I hope to see what happened, in this moment I have only Falcon 030 :(

After such a heroic help from your side, this is really not fair. :-/

Fingers crossed, please report as soon as you know something. And thanks David for taking a look, I have totally missed that part in pcibios.c.

Galvez
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 124
Joined: Fri Oct 19, 2007 7:49 am

Re: CTPCI and USB card

Postby Galvez » Tue Jan 23, 2018 5:57 pm

I've attached a current kernel (1.19) with the PCI_BIOS wrapper enable, it has a fix that I hope it solves the two first issues mentioned above.

Could some of you test this kernel and report back please?

Thanks

mint060_pcibios.zip
You do not have the required permissions to view the files attached to this post.

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12157
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: CTPCI and USB card

Postby wongck » Tue Jan 23, 2018 11:42 pm

Hi Galvez

Thanks for the new kernel.

My falcon has Mint 1.19 on it, but when I ran your file above, after loading xaaes060 it reported version too high.
My current Mint 1.19 (gcc version 4.6.4 (MiNT 20170417) (GCC)) #1 Thu Sep 28 10:46:20 AEST 2017
[ the one by Mikro for testing the network back last year]

I ran out of time this morning.
Can you let me know which branch in GitHub your build is for ?
My Stuff: FB/Falcon CT63+CTPCI_ATI_RTL8139 14+512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

mikro
Atari God
Atari God
Posts: 1425
Joined: Sat Sep 10, 2005 11:11 am
Location: Burnie, Tasmania
Contact:

Re: CTPCI and USB card

Postby mikro » Wed Jan 24, 2018 1:49 am

wongck: just setup your INIT as INIT=/bin/bash, that will save you all the fiddling with XaAES.

Galvez
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 124
Joined: Fri Oct 19, 2007 7:49 am

Re: CTPCI and USB card

Postby Galvez » Wed Jan 24, 2018 9:46 am

wongck wrote:Can you let me know which branch in GitHub your build is for ?


It's from the master branch, you could use the XaAES from the official snapshots.
https://github.com/freemint/freemint.gi ... master/new

Latz
Captain Atari
Captain Atari
Posts: 216
Joined: Tue Mar 08, 2011 6:02 pm
Location: Germany
Contact:

Re: CTPCI and USB card

Postby Latz » Wed Jan 24, 2018 9:51 am

Hi David,

i tested only regarding networking functions:

- trunk21012018 (with disabled PCI wrapper) works good here (exept my weird upload problem, of course).
- Your mint060_pcibios kernel shows the same problems as the "old" 1-19-cur: No network connection, only
"RTL8139: Setting 100mbps full-duplex based on auto-negotiated partner ability 45E1." is displayed repeatedly.

Perhaps i can test USB functions later.

Latz
Falcon/CT60 90MHz, 14+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, DVD-RW.
Falcon/CT63 95 MHz, 4+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, CD-RW.

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12157
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: CTPCI and USB card

Postby wongck » Wed Jan 24, 2018 12:09 pm

mikro wrote:wongck: just setup your INIT as INIT=/bin/bash, that will save you all the fiddling with XaAES.

Thanks Mikro, that did accelerated the testing time.
My Stuff: FB/Falcon CT63+CTPCI_ATI_RTL8139 14+512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12157
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: CTPCI and USB card

Postby wongck » Wed Jan 24, 2018 12:13 pm

Galvez wrote:I've attached a current kernel (1.19) with the PCI_BIOS wrapper enable, it has a fix that I hope it solves the two first issues mentioned above.


Unfortunately it did not work. :-(
I got the same message as Latz on the network part.

I have not setup the USB software, so I did not test the USB part.
My Stuff: FB/Falcon CT63+CTPCI_ATI_RTL8139 14+512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

Galvez
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 124
Joined: Fri Oct 19, 2007 7:49 am

Re: CTPCI and USB card

Postby Galvez » Wed Jan 24, 2018 12:19 pm

Thanks to both of you for doing the tests.

wongck wrote:I have not setup the USB software, so I did not test the USB part.

If I understood the USB problem right, the problem was with the built-in mouse and keyboard drivers from CT60TOS, I think nothing must be setup.

Kroll
Captain Atari
Captain Atari
Posts: 381
Joined: Fri Mar 09, 2012 10:07 am

Re: CTPCI and USB card

Postby Kroll » Wed Jan 24, 2018 1:07 pm

Hi,
I am sorry that I can not test now, but as I wrote in another thread, but I have a problem with falcon in which I use CTPCI USB card and network card. The good news is that I just found out that my friend again managed to run the motherboard and I hope that in a short time I will start testing everything again. I will keep everyone informed

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12157
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: CTPCI and USB card

Postby wongck » Wed Jan 24, 2018 1:19 pm

Galvez wrote:If I understood the USB problem right, the problem was with the built-in mouse and keyboard drivers from CT60TOS, I think nothing must be setup.

Ah So.... I see if I can find my USB card now.
My Stuff: FB/Falcon CT63+CTPCI_ATI_RTL8139 14+512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list


Social Media

     

Return to “CT60 / CT63 Area”

Who is online

Users browsing this forum: No registered users and 1 guest