From: <da...@io...> - 2001-12-04 08:04:18
|
Hello, > The ohci1394 driver in 2.4.17-pre2, and all kernels I have tried before i= t, > is severely broken. >=20 > ``Broken?' you may say. Yes broken in that my entire machine locks up > solid when I type: >=20 > modprobe ohci1394 >=20 > The lock-up is such that I cannot switch VTYs, and the kernel prints > nothing. Magic SysRq also fails, so this is pretty bad... I've been able to use kernel 2.4.8 and 2.4.14 with the latest ieee1394 from cvs (as of 12/01). I think other 2.4 kernels should work as well. In my setup, the following code changes made things work (Ratoc latptop card, Iomega Peerless disk, and camcorder+dvgrab...). cd drivers/ieee1394 patch -p1 < (1st-patch-file-below) Anyone wanting to use the Ratoc CBFW3 card or other host adapter, may want the pcmcia patch: cd pcmcia-cs-3.1.29 patch -p1 < (2nd-patch-file-below) The problems were just in new init logic, and bad precedence on the RESET_BUS expression; also on my system, using pcmcia/cardbus, request_mem_region() in ohci always fails (causing module to segvi since cleanup doesn't check registers pointer for NULL). I just commented out the request and it seems to work (not sure what happens with a pci card). On the pcmcia side, seemed to need to set dev.resource[n].end as well as start, pci_resource_len() call in ohci was returning 0.... These patches are nothing but a hack until there's something stable in cvs, use at your own risk! Dan Childers da...@io... patch file for ieee1394 (cvs as of 12/01...) ------------------------------------------------------------------------------ diff -Naur ieee1394.org/hosts.c ieee1394.fix/hosts.c --- ieee1394.org/hosts.c Mon Nov 26 03:10:06 2001 +++ ieee1394.fix/hosts.c Tue Dec 4 07:22:09 2001 @@ -79,7 +79,7 @@ spin_unlock_irqrestore(&hosts_lock, flags); } -struct hpsb_host *hpsb_add_host(struct hpsb_host_driver *drv, void *data) +struct hpsb_host *hpsb_add_host(struct hpsb_host_driver *drv, void *data, struct pci_dev *pdev, struct hpsb_host **hpp) { struct hpsb_host *h; unsigned long flags; @@ -109,6 +109,8 @@ h->speed_map = (u8 *)(h->csr.speed_map + 2); h->hostdata = data; + h->pdev = pdev; + *hpp = h; spin_lock_irqsave(&hosts_lock, flags); drv->number_of_hosts++; diff -Naur ieee1394.org/hosts.h ieee1394.fix/hosts.h --- ieee1394.org/hosts.h Mon Nov 26 03:10:06 2001 +++ ieee1394.fix/hosts.h Tue Dec 4 07:22:09 2001 @@ -178,7 +178,7 @@ int hpsb_ref_host(struct hpsb_host *host); void hpsb_unref_host(struct hpsb_host *host); -struct hpsb_host *hpsb_add_host(struct hpsb_host_driver *drv, void *data); +struct hpsb_host *hpsb_add_host(struct hpsb_host_driver *drv, void *data, struct pci_dev *pdev, struct hpsb_host **hpp); void hpsb_remove_host(struct hpsb_host *h); struct hpsb_host_driver *hpsb_register_lowlevel(struct hpsb_host_operations *op, diff -Naur ieee1394.org/ohci1394.c ieee1394.fix/ohci1394.c --- ieee1394.org/ohci1394.c Wed Nov 28 09:18:20 2001 +++ ieee1394.fix/ohci1394.c Tue Dec 4 07:22:09 2001 @@ -897,7 +897,7 @@ case RESET_BUS: DBGMSG(ohci->id, "devctl: Bus reset requested%s", attempt_root ? " and attempting to become root" : ""); - set_phy_reg_mask (ohci, 1, 0x40 | attempt_root ? 0x80 : 0); + set_phy_reg_mask (ohci, 1, 0x40 | (attempt_root ? 0x80 : 0)); break; case GET_CYCLE_COUNTER: @@ -2033,6 +2033,7 @@ ohci = kmalloc(sizeof (struct ti_ohci), GFP_KERNEL); if (!ohci) FAIL(-ENOMEM, "Failed to allocate host structure"); + memset(ohci,0,sizeof(struct ti_ohci)); ohci->id = card_id_counter++; ohci->dev = dev; @@ -2069,9 +2070,11 @@ ohci_base = pci_resource_start(dev, 0); ohci_len = pci_resource_len(dev, 0); + /* if (!request_mem_region (ohci_base, ohci_len, OHCI1394_DRIVER_NAME)) FAIL(-ENOMEM, "MMIO resource (0x%lx@0x%lx) unavailable, aborting.", ohci_base, ohci_len); + */ ohci->registers = ioremap(ohci_base, ohci_len); @@ -2189,7 +2192,7 @@ ohci_initialize(ohci); /* Tell the highlevel this host is ready */ - ohci->host = hpsb_add_host (ohci1394_driver, ohci); + ohci->host = hpsb_add_host (ohci1394_driver, ohci, dev, &ohci->host); if (!ohci->host) FAIL(-ENOMEM, "Failed to register ohci1394 host with subsystem"); diff -Naur ieee1394.org/pcilynx.c ieee1394.fix/pcilynx.c --- ieee1394.org/pcilynx.c Mon Nov 26 03:10:06 2001 +++ ieee1394.fix/pcilynx.c Tue Dec 4 07:22:09 2001 @@ -1503,7 +1503,7 @@ if (i != -1) set_phy_reg(lynx, 4, i | 0x40); } - lynx->host = hpsb_add_host(lynx_driver, lynx); + lynx->host = hpsb_add_host(lynx_driver, lynx, dev, &lynx->host); if (!lynx->host) FAIL("failed to attach PCILynx chip to subsystem"); lynx->state = is_host; lynx->host->pdev = dev; ------------------------------------------------------------------------------ patch for pcmcia-cs-3.1.29: ------------------------------------------------------------------------------ diff -Naur pcmcia-cs-3.1.29/Configure pcmcia.fix/Configure --- pcmcia-cs-3.1.29/Configure Mon Aug 27 12:33:51 2001 +++ pcmcia.fix/Configure Wed Nov 28 23:22:56 2001 @@ -634,6 +634,7 @@ >/dev/null 2>&1 ; then CONFIG_IEEE1394=n fi +CONFIG_IEEE1394=y printconfig echo "" diff -Naur pcmcia-cs-3.1.29/clients/ohci1394_stub.c pcmcia.fix/clients/ohci1394_stub.c --- pcmcia-cs-3.1.29/clients/ohci1394_stub.c Fri Aug 24 12:13:15 2001 +++ pcmcia.fix/clients/ohci1394_stub.c Tue Dec 4 07:08:57 2001 @@ -101,6 +101,7 @@ printk(KERN_INFO "ohci_attach(device %02x:%02x.%d)\n", bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); +#if 0 /* A hack to work around resource allocation confusion */ pcibios_read_config_dword(bus, devfn, PCI_BASE_ADDRESS_0, &io); release_region(io & PCI_BASE_ADDRESS_IO_MASK, 0x100); @@ -112,6 +113,7 @@ } else { +#endif node = kmalloc(sizeof(dev_node_t), GFP_KERNEL); strcpy (node->dev_name, "ohci1394"); node->major = 171; @@ -119,7 +121,9 @@ node->next = NULL; MOD_INC_USE_COUNT; return node; +#if 0 } +#endif } static void ohci_suspend(dev_node_t *node) @@ -134,7 +138,9 @@ static void ohci_detach(dev_node_t *node) { +#if 0 hpsb_unregister_lowlevel(get_ohci_template()); +#endif printk(KERN_INFO "removed ohci1394_cb module\n"); kfree(node); MOD_DEC_USE_COUNT; diff -Naur pcmcia-cs-3.1.29/clients/pcilynx_stub.c pcmcia.fix/clients/pcilynx_stub.c --- pcmcia-cs-3.1.29/clients/pcilynx_stub.c Fri Aug 24 12:13:15 2001 +++ pcmcia.fix/clients/pcilynx_stub.c Sun Dec 2 11:51:48 2001 @@ -96,6 +96,7 @@ printk(KERN_INFO "pcilynx_attach(device %02x:%02x.%d)\n", bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); +#if 0 /* A hack to work around resource allocation confusion */ pcibios_read_config_dword(bus, devfn, PCI_BASE_ADDRESS_0, &io); release_region(io & PCI_BASE_ADDRESS_IO_MASK, 0x100); @@ -107,6 +108,7 @@ } else { +#endif node = kmalloc(sizeof(dev_node_t), GFP_KERNEL); strcpy (node->dev_name, "pcilynx"); node->major = PCILYNX_MAJOR; @@ -114,12 +116,16 @@ node->next = NULL; MOD_INC_USE_COUNT; return node; +#if 0 } +#endif } static void pcilynx_detach(dev_node_t *node) { +#if 0 hpsb_unregister_lowlevel(get_lynx_template()); +#endif printk(KERN_INFO "removed pcilynx_cb module\n"); kfree(node); MOD_DEC_USE_COUNT; diff -Naur pcmcia-cs-3.1.29/etc/config pcmcia.fix/etc/config --- pcmcia-cs-3.1.29/etc/config Mon Aug 27 00:26:02 2001 +++ pcmcia.fix/etc/config Wed Nov 28 23:22:56 2001 @@ -1366,6 +1366,10 @@ pci 0x1033, 0x00cd bind "ohci1394_cb" +card "Ratoc CBFW3 1394 Adapter" + pci 0x104c, 0x8021 + bind "ohci1394_cb" + # # Multifunction cards # diff -Naur pcmcia-cs-3.1.29/modules/cardbus.c pcmcia.fix/modules/cardbus.c --- pcmcia-cs-3.1.29/modules/cardbus.c Fri Aug 24 12:14:36 2001 +++ pcmcia.fix/modules/cardbus.c Tue Dec 4 07:10:16 2001 @@ -126,6 +126,7 @@ #endif #define FLAGS(cb,n) BASE(cb,n) #endif +#define ENDFIELD(cb,n) ((cb).dev.resource[n].end) /* There are three classes of bridge maps: IO ports, non-prefetchable memory, and prefetchable memory */ @@ -525,6 +526,7 @@ printk("%s 0x%x-0x%x\n", (m) ? "mem" : "io", base[m], base[m]+sz-1); BASE(c[i], j) = base[m]; + ENDFIELD(c[i], j) = base[m]+sz-1; FLAGS(c[i], j) |= map_flags[m]; } } ------------------------------------------------------------------------------ BTW, if you want to use Iomega Peerless 20G, it appears to have the sbp2 INQUIRY problems being discussed elsewhere on this list, you need to add the code to fudge the inquiry data (see message 7232435). A quick kludge to set the RMB removable flag is to put the (garbage) vendor/id string in the device_list[] in drivers/scsi/scsi_scan.c. The garbage I happen to get (yours may vary): {"GHIJKLMN", "OPQRSTUVWXYZ", "*", BLIST_ISDISK}, // Iomega Peerless |
From: Michael D. C. <cra...@go...> - 2002-10-24 02:38:58
|
I forgot to say - I have learned to program 1394 in just the last few months, first by working with it in the Mac OS X IOKit, and now by working with the firmware of an embedded device that uses it. Mostly I am working with SBP-2 that's being used to carry SCSI commands. I also spent quite a bit of time writing traditional SCSI scanner drivers using CAM a few years ago. Best, Mike -- Michael D. Crawford GoingWare Inc. - Expert Software Development and Consulting http://www.goingware.com/ cra...@go... Tilting at Windmills for a Better Tomorrow. |
From: Mark K. <mar...@at...> - 2002-10-24 02:50:03
|
Welcome. We can always use experienced, energetic folks. -----Original Message----- From: lin...@li... [mailto:lin...@li...]On Behalf Of Michael D. Crawford Sent: Thursday, October 24, 2002 3:42 AM To: lin...@li... Subject: Re: Greetings I forgot to say - I have learned to program 1394 in just the last few months, first by working with it in the Mac OS X IOKit, and now by working with the firmware of an embedded device that uses it. Mostly I am working with SBP-2 that's being used to carry SCSI commands. I also spent quite a bit of time writing traditional SCSI scanner drivers using CAM a few years ago. Best, Mike -- Michael D. Crawford GoingWare Inc. - Expert Software Development and Consulting http://www.goingware.com/ cra...@go... Tilting at Windmills for a Better Tomorrow. ------------------------------------------------------- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en _______________________________________________ mailing list lin...@li... https://lists.sourceforge.net/lists/listinfo/linux1394-devel |
From: Michael D. C. <cra...@go...> - 2002-10-24 20:22:24
|
Stefan sez any cardbus to pci adapter will work in my Mac if the motherboard is OK. Well, then I think it's pretty likely to work because I think the 8500 has a pretty high quality motherboard. The machines were certainly expensive enough when they were new, and I've had mine for six years with no trouble. But I can't seem to find where I can buy any adapters. Does anyone know where they're available? Searching the manufacturer's websites didn't turn up any. The page stefan gave listed: Intel 2011WW Netgear MA301 Ricoh R5C475 or maybe RL5c475 I see an MA311 at Netgear's site but it already has a wireless card in it. I'd like just a naked adapter to put my PCILynx cardbus card in. Does anyone know where to get PCILynx PCI cards? Can they still be had? Mike -- Michael D. Crawford GoingWare Inc. - Expert Software Development and Consulting http://www.goingware.com/ cra...@go... Tilting at Windmills for a Better Tomorrow. |
From: Manfred W. <we...@ic...> - 2002-10-25 21:16:12
|
Michael D. Crawford wrote: > Does anyone know where to get PCILynx PCI cards? Can they still be had? Yes. Unibrain still sells them. Have a look at http://www.unibrain.com/1394_products/fireboard_400/fireboard_400.htm (They also sell a FireWire Development Toolkit containing two of these cards and some other stuff.) Manfred |
From: Mark K. <mk...@co...> - 2002-10-25 21:24:21
|
Yikes!! $290!! -----Original Message----- From: lin...@li... [mailto:lin...@li...]On Behalf Of Manfred Weihs Sent: Friday, October 25, 2002 2:16 PM To: Michael D. Crawford Cc: lin...@li... Subject: Re: Greetings Michael D. Crawford wrote: > Does anyone know where to get PCILynx PCI cards? Can they still be had? Yes. Unibrain still sells them. Have a look at http://www.unibrain.com/1394_products/fireboard_400/fireboard_400.htm (They also sell a FireWire Development Toolkit containing two of these cards and some other stuff.) Manfred ------------------------------------------------------- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en _______________________________________________ mailing list lin...@li... https://lists.sourceforge.net/lists/listinfo/linux1394-devel |
From: Manfred W. <we...@ic...> - 2002-10-25 21:41:26
|
Mark Knecht wrote: > Yikes!! $290!! Oh, I forgot to mention, that Unibrain is rather expensive ;-) But they do sell pcilynx cards... Manfred |
From: Michael D. C. <cra...@go...> - 2002-10-24 20:53:07
|
Justin, Yes, my PCILynx card is cardbus, it says so on the label on the back. That would be helpful if you could find out the manufacturer of your adapter. What would be the possibility of getting a PCI adapter that's got a wireless cardbus card integrated with it, and removing the wireless card? I wouldn't mind owning a wireless card. The one at netgear looked like it was just stuck on there, I don't think it was soldered on or anything. Mike -- Michael D. Crawford GoingWare Inc. - Expert Software Development and Consulting http://www.goingware.com/ cra...@go... Tilting at Windmills for a Better Tomorrow. |
From: Kristian H. <hog...@us...> - 2002-10-25 07:51:40
|
"Michael D. Crawford" <cra...@go...> writes: > Justin, > > Yes, my PCILynx card is cardbus, it says so on the label on the back. Hi Mike, Do you really have a PCILynx cardbus card? Where did you get it? I gave up looking for those a while ago, but if you know where to get these, that would be really great news. best regards, Kristian |
From: Michael D. C. <cra...@go...> - 2002-10-25 08:00:55
|
Kristian, Yes, it's a PCILynx cardbus card! They're no longer manufactured, but someone is sitting on a pile of them and selling them expressly for the purpose of snooping the firewire bus. Get one while you can. Or get two - they're cheap, for the value they provide. I haven't actually tried out either of the two firewire 2 go cards I have, but for no particular reason. I'm pretty sure they work. You can get them for $39 from: http://www.technowarehousellc.com/brannewfir2g.html Here's how I found them: I am doing some firewire development for James Wiebe of http://www.wiebetech.com/ When I started, I asked if he knew how I could snoop the bus. He replied that when he was the CEO of Newer Technology, he manufactured some cards that would do that. TechnoWarehouse bought up all the cards when Newer went out of business, and later realized what they could be used for, and told James. So now the above web page explicitly advertises them for snooping. So when I asked James about this, he bought a couple of the cards and sent them to me. If you have an OS 9 Mac, you can use firebug to do this. It's free-as-in-beer with the firewire SDK from Apple. I know it's not linux - but you can use it to snoop a bus that a linux box whose drivers you're testing is on. Mike -- Michael D. Crawford GoingWare Inc. - Expert Software Development and Consulting http://www.goingware.com/ cra...@go... Tilting at Windmills for a Better Tomorrow. |
From: Kristian H. <hog...@us...> - 2002-10-25 15:16:36
|
"Michael D. Crawford" <cra...@go...> writes: > Kristian, > > Yes, it's a PCILynx cardbus card! > > They're no longer manufactured, but someone is sitting on a pile of > them and selling them expressly for the purpose of snooping the > firewire bus. Get one while you can. Or get two - they're cheap, for > the value they provide. > > I haven't actually tried out either of the two firewire 2 go cards I > have, but for no particular reason. I'm pretty sure they work. > > You can get them for $39 from: > > http://www.technowarehousellc.com/brannewfir2g.html [...] This is great - I just ordered a couple of these card and I'm looking forward to trying them out. Thanks for the tip. > If you have an OS 9 Mac, you can use firebug to do this. It's > free-as-in-beer with the firewire SDK from Apple. I know it's not > linux - but you can use it to snoop a bus that a linux box whose > drivers you're testing is on. I dont dont have a Mac but I use the firespy from DAP design (www.dapdesign.com) which is a great snooper. However, there's no way you can set it up to decode your own protocols, and I also miss some functionality for quantitatively analyzing isochronous traffic (eg. estimating the transmission rate), so I've been wanting to write some kind of sniffer tool myself. However, I only had a PCI pcilynx card (which doesn't fit in my laptop, which is my main pc) and I didn't have the specs for the pcilynx chipset. But I recently found the specs on TI's website, and hopefully, I'll soon receive a pcilynx pccard in the mail, so... best regards, Kristian |
From: <Jam...@ox...> - 2002-10-25 08:02:18
|
There's one here (they do other variants, as well): http://www.elan-digital-systems.co.uk/adapter/p111.php No prices, though :-( James Chaldecott Michael D. Crawford wrote: > Stefan sez any cardbus to pci adapter will work in my Mac if the > motherboard is OK. > > Well, then I think it's pretty likely to work because I think the > 8500 has a pretty high quality motherboard. The machines were > certainly expensive enough when they were new, and I've had mine for > six years with no trouble. > > But I can't seem to find where I can buy any adapters. Does anyone > know where they're available? Searching the manufacturer's websites > didn't turn up any. > > The page stefan gave listed: > > Intel 2011WW > Netgear MA301 > Ricoh R5C475 or maybe RL5c475 > > I see an MA311 at Netgear's site but it already has a wireless card > in it. I'd like just a naked adapter to put my PCILynx cardbus card > in. > > Does anyone know where to get PCILynx PCI cards? Can they still be > had? > > Mike ### OXFORD INSTRUMENTS http://www.oxford-instruments.com/ ### Unless stated above to be non-confidential, this E-mail and any attachments are private and confidential and are for the addressee only and may not be used, copied or disclosed save to the addressee. If you have received this E-mail in error please notify us upon receipt and delete it from your records. Internet communications are not secure and Oxford Instruments is not responsible for their abuse by third parties nor for any alteration or corruption in transmission. |