Hi all,
Okay, I've re-jumpered the AHA-1542B thus :
DMA 3 IRQ 10 IOport : 0x370
.....and I've had SOME success.
I have managed to access fd0 and fd4.....just not at the same time.
To get fd0 recognised, I type :
modprobe floppy "floppy=two_fdc 2,dma 6,irq 0,4,cmos"
....obviously "modprobe floppy" would have sufficed here.
To get fd4 recognised, I type
rmmod floppy modprobe floppy "floppy=two_fdc 3,dma 10,irq 4,4,cmos"
....and I'm able to access /dev/fd4
I just can't access fd1 and fd4 at the same time; because I can't get FDC-0 and FDC-1 recognised at the same time. It's either one or the other; but not both.
SO, I tried playing with the modprobe command :
modprobe floppy "floppy=two_fdc 2,3,dma 6,10,irq 0,4,cmos 4,4,cmos"
and
modprobe floppy "floppy=two_fdc 2,dma 6,irq 0,4,cmos 3,dma 10,irq 4,4,cmos"
.....and no joy.
I even tried loading the floppy module twice - once for each FDC - just returns the prompt, without echoing anything to /var/log/messages
SO.....Question now; is how can I load the floppy module, such that I can specify both IRQs and both DMA channels ?
It's as though the floppy module is happy to play with either FDC.....just not both :-(
So near.....was primed for that jig ;-)
Justin
On 08/04/09 23:57, Justin Eastham wrote:
Hi all,
Okay, I've re-jumpered the AHA-1542B thus :
DMA 3 IRQ 10 IOport : 0x370
.....and I've had SOME success.
I have managed to access fd0 and fd4.....just not at the same time.
[...]
Did you also try using the same DMA and IRQ for both boards? Maybe then you will be able to use them at the same time.
To get fd0 recognised, I type :
modprobe floppy "floppy=two_fdc 2,dma 6,irq 0,4,cmos"
You can also specify multiple cmos options in the same line:
modprobe floppy "floppy=two_fdc 2,dma 6,irq 0,4,cmos 4,4,cmos"
But usually, you wouldn't need an entry for drive 0, as that is usually already defined in the machine's physical CMOS.
....obviously "modprobe floppy" would have sufficed here.
To get fd4 recognised, I type
rmmod floppy modprobe floppy "floppy=two_fdc 3,dma 10,irq 4,4,cmos"
....and I'm able to access /dev/fd4
I just can't access fd1 and fd4 at the same time; because I can't get FDC-0 and FDC-1 recognised at the same time. It's either one or the other; but not both.
SO, I tried playing with the modprobe command :
modprobe floppy "floppy=two_fdc 2,3,dma 6,10,irq 0,4,cmos 4,4,cmos"
and
modprobe floppy "floppy=two_fdc 2,dma 6,irq 0,4,cmos 3,dma 10,irq 4,4,cmos"
Indeed, right now there is no way of telling the floppy driver to use different IRQ/DMA s for each controllers (the dma and irq settings always apply to both). I agree there should be a way, but right now there is none, unfortunately. So, best try to wire them to the same.
But if you're available 3 weeks from now, I can try to make a patch. I have unfortunately no means of testing it myself (as I no longer own the relevant hardware), so I'd need your help there.
The syntax proposed will (probably) be modprobe floppy "floppy=two_fdc 2,dma 6,irq 0,4,cmos 3,dma2 10,irq2 4,4,cmos"
or something line that (does not work now yet).
.....and no joy.
I even tried loading the floppy module twice - once for each FDC - just returns the prompt, without echoing anything to /var/log/messages
SO.....Question now; is how can I load the floppy module, such that I can specify both IRQs and both DMA channels ?
It's as though the floppy module is happy to play with either FDC.....just not both :-(
So near.....was primed for that jig ;-)
Justin
Regards,
Alain
On Wed, Aug 5, 2009 at 11:00 AM, Alain Knaff alain@knaff.lu wrote:
Did you also try using the same DMA and IRQ for both boards?
Maybe then you will be able to use them at the same time.
I didn't try that, and to be honest, I don't think it will work. I have heard from a number of sources, that legacy hardware i.e. ISA cards, *must* have their own IRQ (and IO port, and DMA channel). It's only PCI cards (and subsequent buses) that can share IRQs; and only if they're designed to do so.
Indeed, right now there is no way of telling the floppy driver to use different IRQ/DMA s for each controllers (the dma and irq settings always apply to both). I agree there should be a way, but right now there is
none,
unfortunately. So, best try to wire them to the same.
I can wire them the same, but I'm 99.9% sure it won't work. For one thing, the primary FDC gets detected with a simple "modprobe floppy" command, so it must default to IRQ 6 and DMA 2. I'd then expect the "modprobe floppy floppy=two_fdc" command to detect both controllers on IRQ6 and DMA 2, as both my FDCs were configured for previously.
But if you're available 3 weeks from now, I can try to make a patch. I
have
unfortunately no means of testing it myself (as I no longer own the relevant hardware), so I'd need your help there.
A patch would be great - I'll help all I can. I have to say though, I'm no kernel hacker, so you'd have to bear with my limited knowledge. I can patch a kernel source tree, and compile a kernel and modules. I'd prefer to compile the module in isolation, if at all possible.
The syntax proposed will (probably) be modprobe floppy "floppy=two_fdc 2,dma 6,irq 0,4,cmos 3,dma2 10,irq2
4,4,cmos"
Yep, I like that :-)
Do you think it'll be straightforward to implement ?
At least I know that everything is now correct at my end - syntax, hardware, etc.
Thanks for your response, and your offer of creating a patch
Justin
On 08/05/09 13:40, Justin Eastham wrote:
On Wed, Aug 5, 2009 at 11:00 AM, Alain Knaff alain@knaff.lu wrote:
Did you also try using the same DMA and IRQ for both boards?
Maybe then you will be able to use them at the same time.
I didn't try that, and to be honest, I don't think it will work. I have heard from a number of sources, that legacy hardware i.e. ISA cards, *must* have their own IRQ (and IO port, and DMA channel). It's only PCI cards (and subsequent buses) that can share IRQs; and only if they're designed to do so.
Well, that's how it worked back in the day on an all ISA board with the AHA 1542. Please do try it, and tell me how it goes.
Indeed, right now there is no way of telling the floppy driver to use different IRQ/DMA s for each controllers (the dma and irq settings always apply to both). I agree there should be a way, but right now there is
none,
unfortunately. So, best try to wire them to the same.
I can wire them the same, but I'm 99.9% sure it won't work. For one thing, the primary FDC gets detected with a simple "modprobe floppy" command, so it must default to IRQ 6 and DMA 2. I'd then expect the "modprobe floppy floppy=two_fdc" command to detect both controllers on IRQ6 and DMA 2, as both my FDCs were configured for previously.
But that command was missing the 4,4,cmos.
But if you're available 3 weeks from now, I can try to make a patch. I
have
unfortunately no means of testing it myself (as I no longer own the relevant hardware), so I'd need your help there.
A patch would be great - I'll help all I can. I have to say though, I'm no kernel hacker, so you'd have to bear with my limited knowledge. I can patch a kernel source tree, and compile a kernel and modules. I'd prefer to compile the module in isolation, if at all possible.
You need a least a minimal tree (named <something>-headers in most distributions) to compile floppy.c
The syntax proposed will (probably) be modprobe floppy "floppy=two_fdc 2,dma 6,irq 0,4,cmos 3,dma2 10,irq2
4,4,cmos"
Yep, I like that :-)
Do you think it'll be straightforward to implement ?
Normally, it shouldn't be too difficult. There may be some sneakiness in the .h files (macros which directly use the variable FLOPPY_INT), but I think that is solvable.
At least I know that everything is now correct at my end - syntax, hardware, etc.
Thanks for your response, and your offer of creating a patch
Justin
Regards,
Alain
On Wed, Aug 5, 2009 at 12:57 PM, Alain Knaff alain@knaff.lu wrote:
Well, that's how it worked back in the day on an all ISA board with the
AHA
- Please do try it, and tell me how it goes.
I will try :
modprobe floppy "floppy=two_fdc 2,dma 6,irq 4,4,cmos"
Bare in mind; the two FDC are different; so are less likely to cooperate on the same IRQ/DMA
But that command was missing the 4,4,cmos.
I have tried : modprobe floppy "floppy=two_fdc 4,4,cmos" I'll try again with the dma and irq parameters as well. I'm not hopeful though
You need a least a minimal tree (named <something>-headers in most distributions) to compile floppy.c
Well, the main Linux box runs Mandriva, and that has a package called "kernel-headers". I assume that is what you are refering to ?
Normally, it shouldn't be too difficult. There may be some sneakiness in the .h files (macros which directly use the variable FLOPPY_INT), but I think that is solvable.
Okay, let me know when you're ready to proceed. Presumably; you'll send me a revised floppy.c, or a diff file
Thanks again for your agreed help
Justin
On 08/05/09 15:05, Justin Eastham wrote:
On Wed, Aug 5, 2009 at 12:57 PM, Alain Knaff alain@knaff.lu wrote:
Well, that's how it worked back in the day on an all ISA board with the
AHA
- Please do try it, and tell me how it goes.
I will try :
modprobe floppy "floppy=two_fdc 2,dma 6,irq 4,4,cmos"
^^^^^^^^^^^^ Normally, these shouldn't be needed as they are the default values.
Bare in mind; the two FDC are different; so are less likely to cooperate on the same IRQ/DMA
hmmm, I'd think it'd have more to do with the boards being more complex nowadays due to addition of PCI. Maybe the ISA bridge is not forwarding the DMA 2 and IRQ 6 from ISA to the processor, because some internal PCI device already uses it?
But that command was missing the 4,4,cmos.
I have tried : modprobe floppy "floppy=two_fdc 4,4,cmos"
weird... this should have succeeded... So maybe indeed something on the path is eating the interrupt and/or dma requests from the external FDC.
I'll try again with the dma and irq parameters as well. I'm not hopeful though
You need a least a minimal tree (named <something>-headers in most distributions) to compile floppy.c
Well, the main Linux box runs Mandriva, and that has a package called "kernel-headers". I assume that is what you are refering to ?
Yes, that's the one I'm referring to.
Normally, it shouldn't be too difficult. There may be some sneakiness in the .h files (macros which directly use the variable FLOPPY_INT), but I think that is solvable.
Okay, let me know when you're ready to proceed. Presumably; you'll send me a revised floppy.c, or a diff file
Most probably a diff. However, this week, I'm still somewhat busy, and next week I'll be on holiday, so don't expect anything before August 20th or so...
Thanks again for your agreed help
Justin
Alain
On Wed, Aug 5, 2009 at 2:19 PM, Alain Knaff alain@knaff.lu wrote:
modprobe floppy "floppy=two_fdc 2,dma 6,irq 4,4,cmos"
^^^^^^^^^^^^
Normally, these shouldn't be needed as they are the default values.
I've tried : modprobe two_fdc 4,4,cmos
....and it throws an error. It wants the "floppy=" before the module parameters.
Also, I thought one_fdc was the default
hmmm, I'd think it'd have more to do with the boards being more complex nowadays due to addition of PCI. Maybe the ISA bridge is not forwarding
the
DMA 2 and IRQ 6 from ISA to the processor, because some internal PCI
device
already uses it?
Only thing on IRQ 6 and DMA 2 is "floppy" (according to /proc/dma and /proc/interrupts)
weird... this should have succeeded... So maybe indeed something on the path is eating the interrupt and/or dma requests from the external FDC.
Don't know. But I'm sure if the floppy module supports a 2nd dma and irq pair, then it will work.
Most probably a diff. However, this week, I'm still somewhat busy, and
next
week I'll be on holiday, so don't expect anything before August 20th or
so...
Okay no problem. Look forward to receiving the code, and being able to help
test.
Regards
Justin
On 08/05/09 15:48, Justin Eastham wrote:
On Wed, Aug 5, 2009 at 2:19 PM, Alain Knaff alain@knaff.lu wrote:
modprobe floppy "floppy=two_fdc 2,dma 6,irq 4,4,cmos"
^^^^^^^^^^^^
Normally, these shouldn't be needed as they are the default values.
I've tried : modprobe two_fdc 4,4,cmos
....and it throws an error.
Which error does it throw?
It wants the "floppy=" before the module parameters.
Yes, that's done to be most similar to the boot command line. So what error do you get with modprobe floppy "floppy=two_fdc 4,4,cmos" ? (both to stderr, and in dmesg)
Also, I thought one_fdc was the default
Yes, indeed.
[...]
Regards,
Alain
On Wed, Aug 5, 2009 at 3:00 PM, Alain Knaff alain@knaff.lu wrote:
I've tried : modprobe two_fdc 4,4,cmos
....and it throws an error.
Which error does it throw?
The floppy kernel module complains that it doesn't recognise two_fdc (or anything other than floppy=). It says something like unrecognised label or something like that - can't reproduce here at work.
I can't type modprobe floppy two_fdc.......
I have to type modprobe floppy floppy=two_fdc.......
It wants the "floppy=" before the module parameters.
Yes, that's done to be most similar to the boot command line. So what
error
do you get with modprobe floppy "floppy=two_fdc 4,4,cmos" ? (both to stderr, and in dmesg)
I don't get an error with modprobe floppy "floppy=two_fdc 4,4,cmos" It simply picks up the primary FDC (which is fixed at IRQ 6 and DMA 2), and mentions (in /var/log/messages) that fd4 is a 1.44Mb FDD
Something like :
modprobe floppy "floppy=two_fdc 2,dma 3,dma2 6,irq 10,irq2 0,6,cmos 1,1,cmos 4,2,cmos"
.....I'm sure would work (when floppy.c is patched)
Will the patched floppy.c (when verified by me to be working) find its way to kernel.org ?
Regards
Justin
On 08/05/09 16:47, Justin Eastham wrote:
On Wed, Aug 5, 2009 at 3:00 PM, Alain Knaff alain@knaff.lu wrote:
I've tried : modprobe two_fdc 4,4,cmos
....and it throws an error.
Which error does it throw?
The floppy kernel module complains that it doesn't recognise two_fdc (or anything other than floppy=). It says something like unrecognised label or something like that - can't reproduce here at work.
I can't type modprobe floppy two_fdc.......
I have to type modprobe floppy floppy=two_fdc.......
Well, yes, obviously you need to use the correct syntax... I'm not really sure why you are bringing this up...
It wants the "floppy=" before the module parameters.
Yes, that's done to be most similar to the boot command line. So what
error
do you get with modprobe floppy "floppy=two_fdc 4,4,cmos" ? (both to stderr, and in dmesg)
I don't get an error with modprobe floppy "floppy=two_fdc 4,4,cmos" It simply picks up the primary FDC (which is fixed at IRQ 6 and DMA 2), and mentions (in /var/log/messages) that fd4 is a 1.44Mb FDD
ok, good. That's what I was trying to find out. Thanks.
Something like :
modprobe floppy "floppy=two_fdc 2,dma 3,dma2 6,irq 10,irq2 0,6,cmos 1,1,cmos 4,2,cmos"
.....I'm sure would work (when floppy.c is patched)
Will the patched floppy.c (when verified by me to be working) find its way to kernel.org ?
Well, I'll submit it, and normally 2 kernel versions later (~ 6 months) it should show up in the standard kernel.
Regards
Justin
Regards,
Alain
On Wed, Aug 5, 2009 at 4:10 PM, Alain Knaff alain@knaff.lu wrote:
Well, yes, obviously you need to use the correct syntax... I'm not really sure why you are bringing this up...
Sorry, I thought you were asking me to try the modprobe command without the "floppy=" directive.
I don't get an error with modprobe floppy "floppy=two_fdc 4,4,cmos" It simply picks up the primary FDC (which is fixed at IRQ 6 and DMA 2),
and
mentions (in /var/log/messages) that fd4 is a 1.44Mb FDD
ok, good. That's what I was trying to find out. Thanks.
No problem.
Will the patched floppy.c (when verified by me to be working) find its
way
to kernel.org ?
Well, I'll submit it, and normally 2 kernel versions later (~ 6 months) it should show up in the standard kernel.
Okay, good. Because then, any live CDs that run the newer kernel, will have the patched floppy.c, and I won't have to run an "installed" distro, with a custom floppy module.
Thanks again, and enjoy your holiday
Justin
Justin Eastham wrote:
On Wed, Aug 5, 2009 at 4:10 PM, Alain Knaff alain@knaff.lu wrote:
Well, yes, obviously you need to use the correct syntax... I'm not really sure why you are bringing this up...
Sorry, I thought you were asking me to try the modprobe command without the "floppy=" directive.
??? No, I never asked such a thing...
[...]
Will the patched floppy.c (when verified by me to be working) find its
way
to kernel.org ?
Well, I'll submit it, and normally 2 kernel versions later (~ 6 months) it should show up in the standard kernel.
Okay, good. Because then, any live CDs that run the newer kernel, will have the patched floppy.c, and I won't have to run an "installed" distro, with a custom floppy module.
Indeed, that's the goal (... although it will probably take a couple of more months on top of those 6 until distributions will start including it...)
Thanks again, and enjoy your holiday
Thanks
Justin
Regards,
Alain