Skip to contentSkip to conversation

New firewire stack

GIT PULL Jonathan Woithe 6 participants 10 messages May 3, 2007 – May 8, 2007 1 message not in the archive Firewire

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): mailman.197656.1178135675.32383.linux1394-devel@lists.sourceforge.net

#1 lore raw
Quoted 11 lines · Kritian
Quoted 7 lines · Olaf Hering
Quoted 1 line · Kristian H?gsberg
  drivers/firewire/Kconfig          |   60 ++

NACK.
Upgrade the current drivers/ieee1394/ with the new code, and keep all existing module names.

What's your reasoning here? Having different module names allows people to compile both stacks and switch between them as they wish.

While I'm not fussed about the implementation details I agree with those who have advocated a migration period where both stacks are present. A major change such as this is almost certain to turn up bugs when it becomes more widely tested, and many firewire users are unlikely to test the new stack without an easy fallback to a known working system. Yes, I know development and production systems should be separate, but I (and many others) can't afford enough hardware for that.

Quoted 5 lines

Another point in favour of different module names is that the new stack doesn't actually provide the same user space interfaces as the old stack. Basically, no applications use the raw kernel interfaces and the new stack is only compatible at the library level. In the light of this, I think it's fair to change the module names.

Sounds reasonable to me.

However, as a compromise how about renaming the existing stack's modules and then reusing the existing names for the new stack? Messy I know, but this way both stacks would still be available without recompilation for those who needed them and the sbp2-as-root dilemma raised by Olaf would also be covered.

Quoted 2 lines

As for putting the new stack in drivers/ieee1394 - I don't know, I think it makes sense to keep the new stack in it's own directory.

My immediate thought it that it would be neater and clearer to have both stacks in different directories, but I could live with either.

Oh yes, it would be nice to have working PCILynx support again (although I acknowledge it's unlikely to happen). Some of us do have these cards installed for sniffing purposes (using nosy) but it would be nice to be able to use them with libraw1394 as well. It would for example save me having to swap cards depending on what I needed to do (I have insufficient PCI slots to have both the PCILynx and OHCI cards installed simultaneously).

Regards
jonathan

#2 lore raw
Quoted 4 lines · Jonathan Woithe
Quoted 4 lines
Quoted 3 lines · Olaf Hering

NACK.
Upgrade the current drivers/ieee1394/ with the new code, and keep all existing module names.

[...]

Quoted 5 lines

However, as a compromise how about renaming the existing stack's modules and then reusing the existing names for the new stack? Messy I know, but this way both stacks would still be available without recompilation for those who needed them and the sbp2-as-root dilemma raised by Olaf would also be covered.

I.e. new modules:
ieee1394 (was fw-core)
ohci1394 (was fw-ohci)
sbp2 (was fw-sbp2)
eth1394 (to be done) --- but that's a bad name anyway, it
implements IP over 1394, not Ethernet
old modules, for example:

	ieee1394-old
	ohci1394-old
	sbp2-old
	eth1394-old
	pcilynx    (unless somebody plans to port it, then pcilynx-old)
	raw1394    (or rename it too?, it requires ieee1394-old)
	video1394  (ditto)
	dv1394     (ditto)

Looks... weird.

On the other hand, a 1394 module compilation cycle in order to do the fallback is not such a huge issue, except that it requires the person to be able to compile modules. That's probably the main issue.

Quoted 5 lines
Quoted 2 lines

As for putting the new stack in drivers/ieee1394 - I don't know, I think it makes sense to keep the new stack in it's own directory.

My immediate thought it that it would be neater and clearer to have both stacks in different directories, but I could live with either.

We could rename some of the existing source files to make the distinction clearer.

Quoted 6 lines

Oh yes, it would be nice to have working PCILynx support again (although I acknowledge it's unlikely to happen). Some of us do have these cards installed for sniffing purposes (using nosy) but it would be nice to be able to use them with libraw1394 as well. It would for example save me having to swap cards depending on what I needed to do (I have insufficient PCI slots to have both the PCILynx and OHCI cards installed simultaneously).

But then, what is the actual utility of pcilynx? (I mean the current driver, not the card or a future driver.) Last time I checked, sbp2 was broken without OHCI's physical DMA, and AFAIK raw1394's newer iso API and video1394 and dv1394 don't work with pcilynx either.

Porting pcilynx to the new low-level API would be quite resource demanding --- seen in relation to which resources we have, what the existing pcilynx driver's state of affairs is, and how rare the hardware is. (For those who have the hardware, the stand-alone Nosy is undoubtedly the killer application, not pcilynx.)

Signature · 3 lines
Stefan Richter
-=====-=-=== -=-= ---==
http://arcgraph.de/sr/
#3 lore raw
Quoted 1 line · Stefan Richter
	ieee1394-old

Noone will seriously ship two firewire stacks, so that cant be the issue (for distributors).

Once there is a way to easily switch between kernel releases, I'm ok with whatever module names you pick.

#4 lore raw
Quoted 6 lines · Olaf Hering
Quoted 1 line · Stefan Richter
	ieee1394-old

Noone will seriously ship two firewire stacks, so that cant be the issue (for distributors).

I don't actively watch distributions, but I believe there are frequently alternative drivers shipped. How much sense that makes for FireWire is another question.

Quoted 2 lines

Once there is a way to easily switch between kernel releases, I'm ok with whatever module names you pick.

It may actually be easier to let problem reporters (who cannot or don't want to compile kernels) compare between different kernel releases, rather than to ask them to compare between different stacks on top of the same kernel. Still, it potentially reduces the testers base.

Adrian wrote:
| An advantage of changing the names is that they are now prefixed.

Is the opportunity to clean up module names compelling enough, vs. (the wish for) minimized trouble with scripts which refer to module names?

Kristian wrote:

| Another point in favour of different module names is that the new
| stack doesn't actually provide the same user space interfaces as the
| old stack.

This applies mostly to <fw-core> vs. <ieee1394 + raw1394 + video1394 + dv1394>. The rest should look identical to the user, except that some inapplicable module parameters (and bugs) were removed.

Signature · 3 lines
Stefan Richter
-=====-=-=== -=-= ---==
http://arcgraph.de/sr/
#5 lore raw
Quoted 20 lines · Stefan Richter
Quoted 6 lines · Olaf Hering
Quoted 1 line · Stefan Richter
	ieee1394-old

Noone will seriously ship two firewire stacks, so that cant be the issue (for distributors).

I don't actively watch distributions, but I believe there are frequently alternative drivers shipped. How much sense that makes for FireWire is another question.

Quoted 2 lines

Once there is a way to easily switch between kernel releases, I'm ok with whatever module names you pick.

It may actually be easier to let problem reporters (who cannot or don't want to compile kernels) compare between different kernel releases, rather than to ask them to compare between different stacks on top of the same kernel. Still, it potentially reduces the testers base.

Quoted 6 lines

Adrian wrote:
| An advantage of changing the names is that they are now prefixed.

Is the opportunity to clean up module names compelling enough, vs. (the wish for) minimized trouble with scripts which refer to module names?
...

How big is the trouble actually?

We have never and cannot guarantee stable module names (think of e.g. PATA, e100 or sky2/skge), so changed names are always possible when upgrading kernels.

Module aliases can solve many issues.

And sometimes it might even be an advantage that different drivers for the same hardware get different names (consider especially PATA).

Not changing the module names also has the problem that the old code must be removed from the kernel tree before the new one can be added since two different modules with the same names could easily cause trouble - consider a user first compiling and installing the one modular, and then compiling and installing the other one modular (e.g. due to problems with the one he tried first). Which module will now be loaded by modprobe?

Quoted 1 line

Stefan Richter

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#6 lore raw
Quoted 7 lines · Adrian Bunk
Quoted 5 lines

| An advantage of changing the names is that they are now prefixed.

Is the opportunity to clean up module names compelling enough, vs. (the wish for) minimized trouble with scripts which refer to module names?
...

How big is the trouble actually?

Exactly. In Fedora we've just added a fw-sbp2 case to mkinitrd, it's only a couple of lines of extra shell code:

    elif [ "$modName" = "fw-sbp2" ]; then
        findmodule fw-core
        findmodule fw-ohci
        modName="fw-sbp2"

and that's the extent of the changes. The sbp2 case for the old drivers is still in there and in the end mkinitrd works with either stack.

Kristian

#7 lore raw
Quoted 17 lines · Kristian Høgsberg
Quoted 7 lines · Adrian Bunk
Quoted 5 lines

| An advantage of changing the names is that they are now prefixed.

Is the opportunity to clean up module names compelling enough, vs. (the wish for) minimized trouble with scripts which refer to module names?
...

How big is the trouble actually?

Exactly. In Fedora we've just added a fw-sbp2 case to mkinitrd, it's only a couple of lines of extra shell code:

     elif [ "$modName" = "fw-sbp2" ]; then
         findmodule fw-core
         findmodule fw-ohci
         modName="fw-sbp2"
Quoted 4 lines

and that's the extent of the changes. The sbp2 case for the old drivers is still in there and in the end mkinitrd works with either stack.

Kristian

I also think both stacks should be provided in the mainline kernel, preferably in their own separate directories. I still need the old stack for dv1394, which isn't available in the new stack. But if the new stack is also there, I might be motivated for example to try out the new sbp2 module, to see how well it works and how it compares in performance to the old sbp2 module. If it's not there, I'm probably not going to go out of my way to download it from the net, since my existing setup is working just fine for me.

-Bill

#8 lore raw
In reply to Olaf Hering
Quoted 9 lines · Olaf Hering
Quoted 1 line · Stefan Richter
	ieee1394-old

Noone will seriously ship two firewire stacks, so that cant be the issue (for distributors).

Once there is a way to easily switch between kernel releases, I'm ok with whatever module names you pick.

This patch loads fw-sbp2 if sbp2 is still in the config file. So one can go back and forth between releases without worry about the root filesystem drivers.

drivers/firewire/fw-ohci.c +3 -0
Index: linux-2.6.21/drivers/firewire/fw-ohci.c
===================================================================
@@ -1881,6 +1881,9 @@ static struct pci_driver fw_ohci_pci_dri
 MODULE_AUTHOR("Kristian Hoegsberg <[email protected]>");
 MODULE_DESCRIPTION("Driver for PCI OHCI IEEE1394 controllers");
 MODULE_LICENSE("GPL");
+#ifndef CONFIG_IEEE1394_OHCI1394_MODULE
+MODULE_ALIAS("ohci1394");
+#endif
 
 static int __init fw_ohci_init(void)
 {
drivers/firewire/fw-sbp2.c +3 -0
Index: linux-2.6.21/drivers/firewire/fw-sbp2.c
===================================================================
@@ -1150,6 +1150,9 @@ MODULE_AUTHOR("Kristian Hoegsberg <krh@b
 MODULE_DESCRIPTION("SCSI over IEEE1394");
 MODULE_LICENSE("GPL");
 MODULE_DEVICE_TABLE(ieee1394, sbp2_id_table);
+#ifndef CONFIG_IEEE1394_SBP2_MODULE
+MODULE_ALIAS("sbp2");
+#endif
 
 static int __init sbp2_init(void)
 {
#9 lore raw
Quoted 8 lines · Olaf Hering
Quoted 6 lines · Olaf Hering
Quoted 1 line · Stefan Richter
	ieee1394-old

Noone will seriously ship two firewire stacks, so that cant be the issue (for distributors).

Quoted 6 lines
Quoted 2 lines

Once there is a way to easily switch between kernel releases, I'm ok with whatever module names you pick.

This patch loads fw-sbp2 if sbp2 is still in the config file. So one can go back and forth between releases without worry about the root filesystem drivers.

That's a good solution, that should work. I've committed it locally, will push out changes soon.

thanks,
Kristian

#10 lore raw
In reply to Stefan Richter
Quoted 22 lines
Quoted 4 lines · Jonathan Woithe
Quoted 4 lines
Quoted 3 lines · Olaf Hering

NACK.
Upgrade the current drivers/ieee1394/ with the new code, and keep all existing module names.

[...]

Quoted 5 lines

However, as a compromise how about renaming the existing stack's modules and then reusing the existing names for the new stack? Messy I know, but this way both stacks would still be available without recompilation for those who needed them and the sbp2-as-root dilemma raised by Olaf would also be covered.

I.e. new modules:

	ieee1394 (was fw-core)
	ohci1394 (was fw-ohci)
      :

old modules, for example:

	ieee1394-old
	ohci1394-old
      :
Quoted 5 lines

Looks... weird.

On the other hand, a 1394 module compilation cycle in order to do the fallback is not such a huge issue, except that it requires the person to be able to compile modules. That's probably the main issue.

True on all counts. I guess it's a question of whether the lack of an easy fallback path will significantly reduce the number of testers. I don't have enough of a feel to answer that.

Quoted 2 lines

eth1394 (to be done) --- but that's a bad name anyway, it
implements IP over 1394, not Ethernet

So, when eth1394 is ported the name should be something like fw-ip, at least if we are to remain consistent with the other 3 module names.

Quoted 11 lines
Quoted 6 lines

Oh yes, it would be nice to have working PCILynx support again (although I acknowledge it's unlikely to happen). Some of us do have these cards installed for sniffing purposes (using nosy) but it would be nice to be able to use them with libraw1394 as well. It would for example save me having to swap cards depending on what I needed to do (I have insufficient PCI slots to have both the PCILynx and OHCI cards installed simultaneously).

But then, what is the actual utility of pcilynx? (I mean the current driver, not the card or a future driver.) Last time I checked, sbp2 was broken without OHCI's physical DMA, and AFAIK raw1394's newer iso API and video1394 and dv1394 don't work with pcilynx either.

It certainly doesn't support the raw1394 API so its current usefulness is extremely limited.

Quoted 5 lines

Porting pcilynx to the new low-level API would be quite resource demanding --- seen in relation to which resources we have, what the existing pcilynx driver's state of affairs is, and how rare the hardware is. (For those who have the hardware, the stand-alone Nosy is undoubtedly the killer application, not pcilynx.)

Precisely. As I said, I've probably got a corner case and it's certainly not worth the effort just for that. It would be nice though. You're right about nosy; so long as nosy (which is independent of the firewire stack) keeps working I'll be happy. :)

Regards
jonathan