From: Bill Fink <hidden> Date: 2002-05-13 14:55:19
Hi,
I was successfully using my LaCie 80 GB firewire disk drive with the
2.4.18-ben0 kernel on a dual 500 MHz G4 PPC system (with a UP kernel).
However, it no longer works with the 2.4.19-pre8-ben0 kernel. I tried
using the ieee1394-473 tarball but that didn't help. I also tried going
back to the ieee1394-444 tarball, but that didn't help either. Here are
the dmesg messages from when I modprobe ieee1394/ohci1394 (these are
from using the 444 tarball):
ohci1394: $Revision: 1.101 $ Ben Collins [off-list ref]
PCI: Enabling device 02:0a.0 (0010 -> 0012)
ohci1394_0: OHCI-1394 1.0 (PCI): IRQ=[63] MMIO=[80080000-80080800] Max Packet=[2048]
ieee1394: received packet during reset; ignoring
ohci1394_0: Unexpected tcode 0xf(0x6001c1ff) in AR ctx=0, length=-1: dma prg stopped
ieee1394: ConfigROM quadlet transaction error for node 00:1023
ieee1394: Host added: Node[01:1023] GUID[00000000feeb324a] [Linux OHCI-1394]
For now, I am using the 2.4.18 ieee1394 code with the 2.4.19-pre8 kernel.
For the record, here is the dmesg output from this working case:
ohci1394: $Revision: 1.98 $ Ben Collins [off-list ref]
ohci1394_0: OHCI-1394 1.0 (PCI): IRQ=[63] MMIO=[80080000-80080800] Max Packet=[2048]
ieee1394: NodeMgr: hotplug policy returned -2
ieee1394: Device added: Node[00:1023] GUID[00000000204027a1] [LaCie Group SA ]
ieee1394: Host added: Node[01:1023] GUID[00000000feeb324a] [Linux OHCI-1394]
The working 2.4.18 ieee1394 code is dated February 26 while the broken
444 tarball code is dated April 4.
-Bill
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
From: Bill Fink <hidden> Date: 2002-05-13 16:07:48
On Mon, 13 May 2002, Ben Collins wrote:
quoted
ohci1394: $Revision: 1.101 $ Ben Collins [off-list ref]
Try the SVN code base (check the website for how to download).
Hi Ben,
As I indicated in my earlier message, I already tried the latest
ieee1394-473 tarball (dated May 13). I gave the output from the
ieee1394-444 tarball (dated April 4), since that was the earliest
point I knew it to be broken. For completeness, here is the dmesg
output from the ieee1394-473 tarball:
ohci1394: $Rev: 460 $ Ben Collins [off-list ref]
ohci1394_0: OHCI-1394 1.0 (PCI): IRQ=[63] MMIO=[80080000-80080800] Max Packet=[2048]
ieee1394: received packet during reset; ignoring
ohci1394_0: Unexpected tcode 0xf(0x6001c1ff) in AR ctx=0, length=-1: dma prg stopped
ieee1394: ConfigROM quadlet transaction error for node 00:1023
ieee1394: Host added: Node[01:1023] GUID[00000000feeb324a] [Linux OHCI-1394]
I know it is reporting "$Rev: 460" but it is in fact from the ieee1394-473
tarball.
-Bill
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
From: Ben Collins <hidden> Date: 2002-05-13 16:09:00
On Mon, May 13, 2002 at 12:07:48PM -0400, Bill Fink wrote:
On Mon, 13 May 2002, Ben Collins wrote:
quoted
quoted
ohci1394: $Revision: 1.101 $ Ben Collins [off-list ref]
Try the SVN code base (check the website for how to download).
Hi Ben,
As I indicated in my earlier message, I already tried the latest
ieee1394-473 tarball (dated May 13). I gave the output from the
ieee1394-444 tarball (dated April 4), since that was the earliest
point I knew it to be broken. For completeness, here is the dmesg
output from the ieee1394-473 tarball:
ohci1394: $Rev: 460 $ Ben Collins [off-list ref]
ohci1394_0: OHCI-1394 1.0 (PCI): IRQ=[63] MMIO=[80080000-80080800] Max Packet=[2048]
ieee1394: received packet during reset; ignoring
ohci1394_0: Unexpected tcode 0xf(0x6001c1ff) in AR ctx=0, length=-1: dma prg stopped
ieee1394: ConfigROM quadlet transaction error for node 00:1023
ieee1394: Host added: Node[01:1023] GUID[00000000feeb324a] [Linux OHCI-1394]
I know it is reporting "$Rev: 460" but it is in fact from the ieee1394-473
tarball.
460 was the last revision that ohci1394.c changed, so that's normal.
BenH may know more about the problem here.
No idea, sorry. This machine has a normal OHCI (not the pismo bogus one)
and so far, I had no problem with my boxes and the latest .19pre8 codebase
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
From: Bill Fink <hidden> Date: 2002-05-14 04:40:17
On Mon, 13 May 2002, Ben Collins wrote:
On Mon, May 13, 2002 at 12:07:48PM -0400, Bill Fink wrote:
quoted
On Mon, 13 May 2002, Ben Collins wrote:
quoted
quoted
ohci1394: $Revision: 1.101 $ Ben Collins [off-list ref]
Try the SVN code base (check the website for how to download).
Hi Ben,
As I indicated in my earlier message, I already tried the latest
ieee1394-473 tarball (dated May 13). I gave the output from the
ieee1394-444 tarball (dated April 4), since that was the earliest
point I knew it to be broken. For completeness, here is the dmesg
output from the ieee1394-473 tarball:
ohci1394: $Rev: 460 $ Ben Collins [off-list ref]
ohci1394_0: OHCI-1394 1.0 (PCI): IRQ=[63] MMIO=[80080000-80080800] Max Packet=[2048]
ieee1394: received packet during reset; ignoring
ohci1394_0: Unexpected tcode 0xf(0x6001c1ff) in AR ctx=0, length=-1: dma prg stopped
ieee1394: ConfigROM quadlet transaction error for node 00:1023
ieee1394: Host added: Node[01:1023] GUID[00000000feeb324a] [Linux OHCI-1394]
I know it is reporting "$Rev: 460" but it is in fact from the ieee1394-473
tarball.
460 was the last revision that ohci1394.c changed, so that's normal.
BenH may know more about the problem here.
Hi Ben (either or both :-),
OK, I've narrowed it down a bit. I'm enclosing a diff between a working
ieee1394 CVS checkout from "26 Feb 2002 12:00" and a broken CVS checkout
from "27 Feb 2002 12:00". I'm wondering if it could be a data alignment
issue but since I'm not at all familiar with this code, I'll let the experts
check out the diff to see if anything pops out at anyone, especially if
there's anything that might be problematic for PPC.
-Thanks
-Bill
--------------------------------------------------------------------------------
Common subdirectories: ieee1394-022602/CVS and ieee1394-022702/CVS
diff -u ieee1394-022602/hosts.c ieee1394-022702/hosts.c
--- ieee1394-022602/hosts.c Sat Feb 9 00:41:40 2002+++ ieee1394-022702/hosts.c Tue Feb 26 15:06:39 2002
@@ -78,26 +97,39 @@spin_unlock_irqrestore(&hosts_lock,flags);}+/**+*hpsb_alloc_host-allocateanewhostcontroller.+*@drv:thedriverthatwillmanagethehostcontroller+*@extra:numberofextrabytestoallocateforthedriver+*+*Allocatea&hpsb_hostandinitializethegeneralsubsystemspecific+*fields.Ifthedriverneedstostoreperhostdata,asdrivers+*usuallydo,theamountofmemoryrequiredcanbespecifiedbythe+*@extraparameter.Onceallocated,thedrivershouldinitializethe+*driverspecificparts,enablethecontrollerandmakeitavailable+*tothegeneralsubsystemusinghpsb_add_host().+*+*The&hpsb_hostisallocatedwithansingleinitialreference+*belongingtothedriver.Oncethedriverisdonewiththestruct,+*forexample,whenthedriverisunloaded,itshouldreleasethis+*referenceusinghpsb_unref_host().+*+*ReturnValue:apointertothe&hpsb_hostifsuccesful,%NULLif+*nomemorywasavailable.+*/+structhpsb_host*hpsb_alloc_host(structhpsb_host_driver*drv,size_textra){structhpsb_host*h;-h=kmalloc(sizeof(structhpsb_host),SLAB_KERNEL);+h=kmalloc(sizeof(structhpsb_host)+extra,SLAB_KERNEL);if(!h)returnNULL;memset(h,0,sizeof(structhpsb_host));-/* Drivers usually use this to allocate their private data */-if(extra){-h->hostdata=kmalloc(extra,SLAB_KERNEL);-if(!h->hostdata){-kfree(h);-returnNULL;-}-memset(h->hostdata,0,extra);-}-+h->hostdata=h+1;h->driver=drv;h->ops=drv->ops;+h->refcount=1;INIT_LIST_HEAD(&h->pending_packets);spin_lock_init(&h->pending_pkt_lock);
^^^^^^^^^^^^^^^^^^^^^^^^
This should probably be sizeof(struct hpsb_host) + extra.
- /* Drivers usually use this to allocate their private data */
- if (extra) {
- h->hostdata = kmalloc(extra, SLAB_KERNEL);
- if (!h->hostdata) {
- kfree(h);
- return NULL;
- }
- memset(h->hostdata, 0, extra);
- }
-
+ h->hostdata = h + 1;
h->driver = drv;
h->ops = drv->ops;
+ h->refcount = 1;
INIT_LIST_HEAD(&h->pending_packets);
spin_lock_init(&h->pending_pkt_lock);
Cheers
Michel
-------------------------------------------------------------------------
Michel Lanners | " Read Philosophy. Study Art.
23, Rue Paul Henkes | Ask Questions. Make Mistakes.
L-1710 Luxembourg |
email mlan@cpu.lu |
http://www.cpu.lu/~mlan | Learn Always. "
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
From: Bill Fink <hidden> Date: 2002-05-15 02:49:27
Hi Michel,
Nice shot! It works again with the ieee1394-473 tarball (or the distributed
2.4.19-pre8 ieee1394 code) and the change you suggested. Thanks a ton!!!
-Bill
On Tue, 14 May 2002, Michel Lanners wrote:
Shot in the dark....
On 14 May, this message from Bill Fink echoed through cyberspace: