Problem with X-Surf 100 and MorphOS 1.4.5
  • Just looking around
    Posts: 10 from 2015/12/8
    Hi,

    I have an A4000D/CSPPC with a X-Surf 100 which I am trying to get to work in MorphOS 1.4.5.

    I am using the latest 68k version of Roadshow which worked perfectly before with an Ariadne card, but with the X-Surf it manages to open the device and online the interface, but it doesn't seem able to transfer any actual data.

    What I have tried so far:
    - Tested all variants of x-surf-100.device (000, 020, 030x2, 040)
    - Upgraded trance to 50.12

    The card works fine in AmigaOS.

    Have tried searching for anyone else with this problem, but didn't find anything, so I thought I ask here if anyone has been successful getting this card to work in MOS or has any tips?
  • »08.12.15 - 18:54
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Zylesea
    Posts: 1797 from 2003/6/4
    https://morph.zone/modules/newbb_plus/viewtopic.php?topic_id=3930&forum=42

    I don't remember what did the trick for me back then (tha A1200 is sold off long ago), but eventually it worked. i thibk the MNI drivers did it.

    Edit: Oops - missed it's about the X-Surf _100_ and not the X-Surf.

    [ Editiert durch Zylesea 10.12.2015 - 00:02 ]
    --
    http://www.via-altera.de

    Whenever you're sad just remember the world is 4.543 billion years old and you somehow managed to exist at the same time as David Bowie.
  • »08.12.15 - 21:45
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Chain-Q
    Posts: 322 from 2003/10/12
    From: Budapest, Hungary
    Sadly, I can confirm that the x-surf-100.device doesn't work with MorphOS PowerUP. Also no idea if it's the .device does something which it shouldn't, or it's a problem with MorphOS. But the original X-Surf 10 also had problems with its x-surf.device, if I recall correctly, while it was stable and nice with Miami's MNI driver.

    Sadly, as far as I know, there's no MNI driver for the X-Surf 100, so if the SANA-II device doesn't work, you're more or less out of luck.
    [.PegasosII/G4.:.Efika.:.Amiga2000/060.]
    [.Free Pascal Compiler MorphOS Port.]
    [.Hosting Pegasos.hu and AmigaSpirit.hu.]
  • »08.12.15 - 23:28
    Profile Visit Website
  • Just looking around
    Posts: 10 from 2015/12/8
    Thanks for the info and confirmation!

    In the mean time I have also tested the X-Surf 100 in Zorro2 mode to rule out any issues using a Zorro3 network card, as it is not the norm. It did not help.

    So to summarize the info regarding getting the old X-Surf working in MorpOS you had two options:
    1. Use a patched Ariadne2 SANA-2 device (possible because the Ariadne2 and the old X-Surf are based on the same RTL8019AS chip)
    2. Use Miami with the X-Surf MNI driver.

    This suggests that there is something the individual computers SANA-2 devices are doing that does not work under 68k emulation in MorphOS. It would be interesting to know if there are like commonly known things 68k code cannot do under emulation, which these devices might be doing.
  • »09.12.15 - 12:21
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    polluks
    Posts: 301 from 2007/10/23
    From: Gelsenkirchen,...
    Try to set DEBUGLEV 1 for x-surf-100.device_040debug
    see http://wiki.icomp.de/wiki/X-Surf-100

    [ Editiert durch polluks 09.12.2015 - 18:14 ]
    Pegasos II G4: MorphOS 3.9, Zalman M220W
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.9
  • »09.12.15 - 12:34
    Profile
  • Just looking around
    Posts: 10 from 2015/12/8
    @polluks:
    I tried setting that, but I am a bit unsure where that debug logging is supposed to end up. Is it on the serial port?

    Took a look at the morphos ramdebug output with logtool and got some output when onlineing the interface which doesn't seem say very much apart that a read goes wrong:
    Code:
    --------------------------------------------
    ASM_Exception: DAR 0xdfeff8 DSISR 0x40000000
    ASM_Exception: IntGPR1 0x80004f60 SRR0 0x11301740 SRR1 0xf070 LR 0x11007190
    ASM_Exception: Type 0x3
    ASM_Exception: Thread 0x800fa740 Name Interrupt SOFTINT
    ASM_Exception: DAR 0xdfeff8 DSISR 0x40000000
    ------------------------------------------------------------------------------
    ExceptionThread: Exception Thread 0x800fa740 <Interrupt SOFTINT>
    ExceptionThread: Type 0x3 <Data Access>
    ExceptionThread: Illegal Data Access at 0x00dfeff8 DSISR 0x40000000 <Read Access to a not existing Page>
    PC(SRR0) 0x11301740 MSR(SRR1) 0x0000f070
    CR 80000000 XER 00000000 LR 11007190 CTR 11301730
    General Register Dump:
    GPR[0] 11301730 10015880 10015920 0003f280 00000004 00000004 1100873c 11008748
    GPR[8] 110084c0 ffffffdd 00002000 00dfeff8 0000f070 08ddfca2 00002118 11328724
    GPR[16] 000000dd 00000004 00000000 00000000 00000000 00000000 00000000 00000000
    GPR[24] 00dfeff8 08ddfc88 08df8c01 00000000 08ddfc8c 10015f84 08000c44 10015954
    FPSCR 00000000
    FPECR 00000000
    FPR[0] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[4] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[8] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[12] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[16] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[20] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[24] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[28] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    Special Register Dump:
    IABR 00000000 DABR 00000000
    OS Register Dump:
    SysCall_SRR0 1011e6a8 SysCall_SRR1 0000f070 SysCall_GPR2 10015a88 SysCall_LR 101006ec SysCall_CR 10117f04
    ------------------------------------------------------------------------------


    The address it is attempting the read from changes for each run. This was with the a debug version of the device, but it doesn't seem to help with any symbols or anything.. can't say that I know much about using these kind of tools unfortunately.

    Also tried with the non debug version of the device and got sortof the same thing, but an illegal write instead. It seems to be 100% reproducible and debug device = read fail, normal device = write fail.

    Normal device output:
    Code:
    --------------------------------------------
    ASM_Exception: DAR 0x45 DSISR 0xa000000
    ASM_Exception: IntGPR1 0x80004f60 SRR0 0x1104cd44 SRR1 0xf070 LR 0x11007190
    ASM_Exception: Type 0x3
    ASM_Exception: Thread 0x800fa740 Name Interrupt SOFTINT
    ASM_Exception: DAR 0x45 DSISR 0xa000000
    ------------------------------------------------------------------------------
    ExceptionThread: Exception Thread 0x800fa740 <Interrupt SOFTINT>
    ExceptionThread: Type 0x3 <Data Access>
    ExceptionThread: Illegal Data Access at 0x00000045 DSISR 0x0a000000 <Write Access is not allowed because of protection modes>
    PC(SRR0) 0x1104cd44 MSR(SRR1) 0x0000f070
    CR 40000000 XER 00000000 LR 11007190 CTR 1104cd0c
    General Register Dump:
    GPR[0] 00000000 100158a0 10015920 00001df0 00000004 00000000 00001010 00000040
    GPR[8] 08f1ef84 00000004 00000045 00000010 0000f070 00000046 00002100 11328724
    GPR[16] 10101000 00000004 00000000 61796264 02000000 00000000 00000000 00000000
    GPR[24] 00dff000 08f1ef70 00000000 00000000 08f1ef70 10015f84 08000c44 10015960
    FPSCR 00000000
    FPECR 00000000
    FPR[0] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[4] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[8] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[12] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[16] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[20] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[24] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[28] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    Special Register Dump:
    IABR 00000000 DABR 00000000
    OS Register Dump:
    SysCall_SRR0 1011e6a8 SysCall_SRR1 0000f070 SysCall_GPR2 10015a88 SysCall_LR 101006ec SysCall_CR 10117f04
    ------------------------------------------------------------------------------
  • »09.12.15 - 21:23
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    polluks
    Posts: 301 from 2007/10/23
    From: Gelsenkirchen,...
    Hi!
    What about the xsurftest tool?
    http://wiki.icomp.de/wiki/File:Xsurf100.lha
    Pegasos II G4: MorphOS 3.9, Zalman M220W
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.9
  • »10.12.15 - 08:10
    Profile
  • Just looking around
    Posts: 10 from 2015/12/8
    Interestingly enough, x-surftest works perfectly and gives no hits in the debug log.

    I checked if DEBUGLEV=1 and the debug version of the device printed text on the serial port and it did, but only AmigaOS3.9 at first. When I added the edebugflag logkprintf in MorphOS the debug output also started working there.

    This is the result when onlineing the interface (including the hit which gets interleaved in the text):
    Code:
    PPC_ColdBoot 604e Init done Stack 0xfff03ff0 MSR 0x00003070 PVR 0x00000009 HID0 0xc000c084 HID1 0x80000000 MMCR0 0x00000000

    DevInit()...
    Found X-Surf-100-Card. Unit=0x00000000
    InitETHERUnit()...
    Unit=0x00000000
    InitETHERUNIT()...ende
    OpenDev-Flags:0x00000000
    HAL_Constructor()
    HAL_ReadConfig Unit=0x00000000
    config: Auto Duplex
    config: Auto Speed
    config: Auto MDIX
    config: Negotiation Auto
    config: FlowControl Off
    ProbeNovell()...
    Speichertest ok!
    Adresse auslesen...
    Probing ok!



    MII setup: Auto MDIX
    MII location: 0x00000013
    MII value write: 0x00000021
    MII location: 0x00000013
    MII value read: 0x00000021
    HAL_InitInterrupt()
    HAL_InitInterrupt end.ende
    SANA2_CTB-Tag found...
    SANA2_CFB-Tag found...
    *DeviceQuery
    *GetStationAddress
    *ConfigInterface
    *Online...
    HAL_Online()
    spinlock_irq_save=0x00000001
    ed_init()...
    New MCAST hash filter:0x00000000
    0x00000000
    0x00000000
    0x00000000
    0x00000000
    0x00000000
    0x00000000
    0x00000000
    spinlock_irq_restore=0x00000001

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000800

    *DevCmdReadPacket
    PacketTyp = 0x00000806

    *DevCmdReadPacket
    PacketTyp = 0x00000806

    *DevCmdReadPacket
    PacketTyp = 0x00000806

    *DevCmdReadPacket
    PacketTyp = 0x00000806

    *CMD_WRITE
    H--------------------------------------------

    ASM_Exception: DAR 0xdfefff DSISR 0x42000000

    ASM_Exception: IntGPR1 0x80004f60 SRR0 0x11206170 SRR1 0xf070 LR 0x11007190

    ASM_Exception: Type 0x3

    ASM_Exception: Thread 0x800fa740 Name Interrupt SOFTINT

    ASM_Exception: DAR 0xdfefff DSISR 0x42000000




    ------------------------------------------------------------------------------
    ExceptionThread: Exception Thread 0x800fa740 <Interrupt SOFTINT>
    ExceptionThread: Type 0x3 <Data Access>
    ExceptionThread: Illegal Data Access at 0x00dfefff DSISR 0x42000000 <Write Access to a not existing Page>
    PC(SRR0) 0x11206170 MSR(SRR1) 0x0000f070
    CR 20000c00 XER 00000000 LR 11007190 CTR 11206160
    General Register Dump:
    GPR[0] 00000000 100158a0 10015920 00004410 00000004 00000004 1100873c 11008748
    GPR[8] 110084c0 00000000 00002000 ab000000 0000f070 086124fc 0000211b 11328724
    GPR[16] 0000009d 00000004 00000000 00000000 00000000 00000000 00000000 00000000
    GPR[24] 00dfefff 086124f0 08ab4369 00000000 086124f0 10015f84 08000c44 10015954
    FPSCR 00000000
    FPECR 00000000
    FPR[0] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[4] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[8] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[12] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[16] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[20] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[24] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    FPR[28] 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
    Special Register Dump:
    IABR 00000000 DABR 00000000
    OS Register Dump:
    SysCall_SRR0 1011e6a8 SysCall_SRR1 0000f070 SysCall_GPR2 10015a88 SysCall_LR 101006ec SysCall_CR 10117f04
    ------------------------------------------------------------------------------

    *CMD_WRITE
    *AddMulticast

    ISR: x-surf-card interrupt detect... unit=0x00000000
    ISR:RTL8019 interrupt detect! ISR=0x00000001
    ISR:ending...


    If I after this try accessing something on the network, like pinging another host, it will say the following a couple of times for each attempt:
    Code:
    *CMD_WRITE
    TransmitterInt noch eingetragen...!
    *CMD_WRITE
    TransmitterInt noch eingetragen...!
    *CMD_WRITE
    TransmitterInt noch eingetragen...!
    *CMD_WRITE
    TransmitterInt noch eingetragen...!
    *CMD_WRITE
    TransmitterInt noch eingetragen...!


    Which I interpret as it cannot find its transmit interrupt or something?

    Compared the output when the hit happens with the output when running AmigaOS3.9 and this is what it was about to print (of course with other addresses):
    Code:
    HAL_SendNextPacket()...
    spinlock_irq_save=0x00000001
    spinlock_irq_restore=0x00000001
    ios2 from =0x08a1c38c
    ios2 to =0x08001dac
    ios2 len =0x0000001c
    sending normal Packet...
    len for NIC is 0x0000003c
    Using TX-Buffer at addr 0x00004000
    TermIO:ReplyMsg : cmd=0x00000003
    xmit() start transmitting TX-Buf 0x00000000
    spinlock_irq_save=0x00000001
    spinlock_irq_restore=0x00000001



    [ Edited by patrik 10.12.2015 - 21:26 ]
  • »10.12.15 - 18:45
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    polluks
    Posts: 301 from 2007/10/23
    From: Gelsenkirchen,...
    Did you try AmigaOS to be sure it's not an emulation problem?
    However if you want to patch ariadne_ii.device 43.12 (15.01.99):

    Code:
    	MOVEQ	#$65,D1
    MOVE.L #$877,D0
    ADD.L D1,D1
    ==>
    Code:
    	MOVEQ	#100/2,D1
    MOVE.L #$1212,D0
    ADD.L D1,D1


    Today the first programmer wrote:
    Quote:

    Also der Hinweis „TransmitterInt noch eingetragen“ deutet darauf hin, dass die Übergabe des Paketes vom „Task" an den Software-Interrupt des Netzwerktreibers "überraschenderweise“ nicht funktioniert. Es gibt eine Art Stau. Er bekommt die Pakete nicht los…

    Wenn ich das richtig interpretiere macht der Software-Interrupt ein fehlerhaften Schreibzugriff und der zugehörige ausführende Thread wird beendet. Der Software - Interrupt wird dann nicht mehr korrekt beendet und beim nächsten Sende-Versuch wird „TransmitterInt noch eingetragen“ im Device wieder ausgegeben.
    Soweit die Fehleranalyse…:-)

    Was den fehlerhaften Aufruf allerdings auslöst, ist schwerlich zu sagen, da auch keine Symbolauflösung vorliegt. Auch bräuchte man dann den aktuellen Sourcecode des Treibers, den ich leider nicht habe…



    [ Editiert durch polluks 11.12.2015 - 18:44 ]
    Pegasos II G4: MorphOS 3.9, Zalman M220W
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.9
  • »11.12.15 - 12:14
    Profile
  • Just looking around
    Posts: 10 from 2015/12/8
    Regarding testing on AmigaOS, I have so far tested the X-Surf 100 (with x-surf-100.device) on AmigaOS3.9, AmigaOS4 and AmigaOS4.1 with successful result.

    I tried your suggestion of patching ariadne_ii.device 43.12 to use the X-Surf 100 autoconfig ids (changed "7265 203c 0000 0877 d281" at offset 2E72 to "7232 203c 0000 1212 d281" as suggested). However, upon opening this patched device the amiga locks up both under AmigaOS3.9 and MorphOS, so perhaps the registers begin at a different offset and have a slightly different layout or spacing?

    I also tried patching the ariadne_ii.device with the "Frank Mariak xsurfpatch -> x-surf.device" applied to use the X-Surf 100 autoconfig ids in a similar manner. I found sortof the same code, patched in another way there (the last ADD.L was replace with a MOVE.Q with the product value, Code:

    MOVEQ #$65, D1
    MOVE.L #$1212, D0
    MOVEQ #$17, D1


    Which I changed to Code:

    MOVEQ #$65, D1
    MOVE.L #$1212, D0
    MOVEQ #100, D1


    As hex: Changed "7265 203c 0000 1212 7217" at offset 1bcc to "7265 203c 0000 1212 7264"

    This didn't work either, however I am not sure the patch-attempt I did was correct as I don't get consistent behaviour between AmigaOS3.9 and MorphOS with this one. Maybe there is another check in the code for the manufacturer/id. The result is that in AmigaOS3.9 it locks up the amiga, but under MorphOS it fails opening the device.

    Thanks for reaching out to people trying to help me out, very appreciated! My german is not strong, do I understand him correctly if he suspects something with the storage for the interrupt routine?

    If so, maybe something is perhaps not 100% right which it, but it gets away with under AmigaOS, like not allocating enough space? Just started thinking of the scsi.device bug with TLSFMem :D.

    [ Edited by patrik 13.12.2015 - 00:10 ]
  • »12.12.15 - 22:06
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    polluks
    Posts: 301 from 2007/10/23
    From: Gelsenkirchen,...
    Heiko said the hit is the cause. Anyway I asked Frank if this is already fixed after 1.4.5.
    Pegasos II G4: MorphOS 3.9, Zalman M220W
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.9
  • »14.12.15 - 07:44
    Profile
  • Just looking around
    Posts: 10 from 2015/12/8
    Quote:

    polluks wrote:
    Heiko said the hit is the cause. Anyway I asked Frank if this is already fixed after 1.4.5.


    Did you hear anything back from Frank? :)
  • »13.05.17 - 22:29
    Profile