Re: Re: Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hi, >> >I have a bad feeling about this... might it be that cistpl.c isn't thread >> >safe at all? >> > >> >Could you test out this patch, please? >> With this patch, the 3c589_cs driver is not loaded at all. So I think this patch is not correct. >pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0 >pcmcia_socket pcmcia_socket0: cs: memory probe 0xd200-0xd40f: ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hey, On Sat, Jan 09, 2010 at 06:05:26PM +0900, Komuro wrote: > >I have a bad feeling about this... might it be that cistpl.c isn't thread > >safe at all? > > > >Could you test out this patch, please? > > > OK. I will test it. Thanks! > By the way , do you think the pcmcia_core API is MP safe ? Yes I do. Best, Dominik ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hi, >I have a bad feeling about this... might it be that cistpl.c isn't thread >safe at all? > >Could you test out this patch, please? OK. I will test it. By the way , do you think the pcmcia_core API is MP safe ? I need to learn the difference between spin_lock and mutex_lock. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hey, On Thu, Jan 07, 2010 at 09:56:59PM +0900, Komuro wrote: > I got the kernel-oops by pcmcia-check-broken-cis > at kernel 2.6.33-rc3. > > Do you think this is the same as CIS problem? I have a bad feeling about this... might it be that cistpl.c isn't thread safe at all? Could you test out this patch, please? Thanks, Dominik diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 25b1cd2..b7eec6e 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c @@ -64,6 +64,7 @@ module_param(cis_width, int, 0444); void release_cis_mem(struct pcmcia_socket *s) { +mutex_lock(&s->card_mutex); if (s->cis_mem.flags & MAP_ACTIVE) { s->cis_mem.flags &= ~MAP_ACTIVE; s->ops->set_mem_map(s, &s->cis_mem); @@ -75,6 +76,7 @@ void release_cis_mem(struct pcmcia_socket *s) iounmap(s->cis_virt); s->cis_virt = NULL; } +mutex_unlock(&s->card_mutex); } EXPORT_SYMBOL(release_cis_mem); @@ -89,11 +91,13 @@ set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flag pccard_mem_map *mem = &s->cis_mem; int ret; + mutex_lock(&s->card_mutex); if (!(s->features & SS_CAP_STATIC_MAP) && (mem->res == NULL)) { mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s); if (mem->res == NULL) { dev_printk(KERN_NOTICE, &s->dev, "cs: unable to map card memory!\n"); + mutex_unlock(&s->card_mutex); return NULL; } s->cis_virt = NULL; @@ -109,6 +113,7 @@ set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flag if (ret) { iounmap(s->cis_virt); s->cis_virt = NULL; + mutex_unlock(&s->card_mutex); return NULL; } @@ -117,6 +122,7 @@ set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flag iounmap(s->cis_virt); s->cis_virt = ioremap(mem->static_start, s->map_size); } + mutex_unlock(&s->card_mutex); return s->cis_virt; } @@ -271,27 +277,34 @@ static void read_cis_cache(struct pcmcia_socket *s, int attr, u_int addr, struct cis_cache_entry *cis; int ret; +mutex_lock(&s->card_mutex); if (s->fake_cis) { if (s->fake_cis_len >= addr+len) memcpy(ptr, s->fake_cis+addr, len); else memset(ptr, 0xff, len); + mutex_unlock(&s->card_mutex); return; } list_for_each_entry(cis, &s->cis_cache, node) { if (cis->addr == addr && cis->len == len && cis->attr == attr) { memcpy(ptr, cis->cache, len); + mutex_unlock(&s->card_mutex); return; } } +mutex_unlock(&s->card_mutex); #ifdef CONFIG_CARDBUS if (s->state & SOCKET_CARDBUS) ret = read_cb_mem(s, attr, addr, len, ptr); else #endif +{ + mutex_lock(&s->card_mutex); ret = pcmcia_read_cis_mem(s, attr, addr, len, ptr); +} if (ret == 0) { /* Copy data into the cache */ @@ -304,6 +317,7 @@ static void read_cis_cache(struct pcmcia_socket *s, int attr, u_int addr, list_add(&cis->node, &s->cis_cache); } } + mutex_unlock(&s->card_mutex); } static void @@ -311,24 +325,28 @@ remove_cis_cache(struct pcmcia_socket *s, int attr, u_int addr, u_int len) { struct cis_cache_entry *cis; + mutex_lock(&s->card_mutex); list_for_each_entry(cis, &s->cis_cache, node) if (cis->addr == addr && cis->len == len && cis->attr == attr) { list_del(&cis->node); kfree(cis); break; } + mutex_unlock(&s->card_mutex); } void destroy_cis_cache(struct pcmcia_socket *s) { struct list_head *l, *n; + mutex_lock(&s->card_mutex); list_for_each_safe(l, n, &s->cis_cache) { struct cis_cache_entry *cis = list_entry(l, struct cis_cache_entry, node); list_del(&cis->node); kfree(cis); } + mutex_unlock(&s->card_mutex); /* * If there was a fake CIS, destroy that as well. @@ -356,6 +374,7 @@ int verify_cis_cache(struct pcmcia_socket *s) "no memory for verifying CIS\n"); return -ENOMEM; } + mutex_lock(&s->card_mutex); list_for_each_entry(cis, &s->cis_cache, node) { int len = cis->len; @@ -369,10 +388,12 @@ int verify_cis_cache(struct pcmcia_socket *s) pcmcia_read_cis_mem(s, cis->attr, cis->addr, len, buf); if (memcmp(buf, cis->cache, len) != 0) { + mutex_unlock(&s->card_mutex); kfree(buf);
Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hi, I got the kernel-oops by pcmcia-check-broken-cis at kernel 2.6.33-rc3. Do you think this is the same as CIS problem? pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3af: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0x3e0-0x4ff: excluding 0x4d0-0x4d7 pcmcia_socket pcmcia_socket0: cs: IO port probe 0x820-0x8ff: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcf7: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0xa00-0xaff: clean. pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0 pcmcia_socket pcmcia_socket0: cs: memory probe 0xd200-0xd40f: excluding 0xd2e7-0xd307 0xd3ef-0xd40f pcmcia 0.0: pcmcia: registering new device pcmcia0.0 pcmcia 0.1: pcmcia: registering new device pcmcia0.1 BUG: unable to handle kernel paging request at 00100100 IP: [] read_cis_cache+0x7e/0x106 *pdpt = 369b1001 *pde = Oops: [#1] SMP last sysfs file: /sys/devices/pci:00/:00:1e.0/:04:06.0/0.1/allow_func_id_match Modules linked in: usb_storage i2c_i801 yenta_socket rsrc_nonstatic ata_generic i915 drm_kms_helper drm i2c_algo_bit i2c_core video output [last unloaded: scsi_wait_scan] Pid: 916, comm: pcmcia-check-br Not tainted 2.6.33-rc3 #1 Portable PC/dynabook EX/63H EIP: 0060:[] EFLAGS: 00010287 CPU: 1 EIP is at read_cis_cache+0x7e/0x106 EAX: 00100100 EBX: 00ff ECX: 0134 EDX: 00100100 ESI: 0001 EDI: 0134 EBP: f64bbe8c ESP: f64bbe78 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Process pcmcia-check-br (pid: 916, ti=f64ba000 task=f6478ce0 task.ti=f64ba000) Stack: f694dce4 f694dc40 00ff 0003 f64bbeac c0603353 0003 <0> f655b700 03031b53 f660d600 f655b700 f655b7ff f64bbf0c c0604484 f64bbedc <0> f703e000 f694dc40 012d 0132 0200 Call Trace: [] ? pccard_get_tuple_data+0x62/0x70 [] ? pccard_show_cis+0x193/0x273 [] ? read+0xf6/0x163 [] ? pccard_show_cis+0x0/0x273 [] ? read+0x0/0x163 [] ? vfs_read+0x92/0xf1 [] ? sys_read+0x4c/0x70 [] ? sysenter_do_call+0x12/0x2d Code: c2 a4 00 00 00 89 55 ec eb 21 39 78 08 75 1a 8b 4d 08 39 48 0c 75 12 39 70 10 75 0d 8b 7d 0c 8d 70 14 f3 a4 e9 82 00 00 00 89 d0 <8b> 10 0f 18 02 90 3b 45 ec 75 d4 8b 45 f0 66 83 78 14 00 79 11 EIP: [] read_cis_cache+0x7e/0x106 SS:ESP 0068:f64bbe78 CR2: 00100100 ---[ end trace cd442f1d2dcb6065 ]--- eth0: 3Com 3c562, io 0x300, irq 3, hw_addr 00:60:97:xx:xx:xx 8K FIFO split 5:3 Rx:Tx, auto xcvr udev: renamed network interface eth0 to eth7 0.1: ttyS0 at I/O 0x3f8 (irq = 3) is a 16550A ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hi, I think the resource problem is fixed. but if I connect the 3Com 3c562 and boot the linux, the mac address of 3c562 sometimes becomes ff:ff:ff:ff:ff:ff. the mac address becomes normal after replugging it. >pcmcia 0.0: pcmcia: registering new device pcmcia0.0 >pcmcia 0.1: pcmcia: registering new device pcmcia0.1 >0.1: ttyS0 at I/O 0x3f8 (irq = 3) is a 16550A >3c589_cs 0.0: pcmcia: could not parse base and rmask0 of CIS >eth0: 3Com 3c562, io 0x300, irq 3, hw_addr ff:ff:ff:ff:ff:ff > 32K FIFO split 3:5 Rx:Tx, auto xcvr Best Regards Komuro >Hey, > >On Sun, Dec 20, 2009 at 03:11:05PM +0900, Komuro wrote: >> >Any chance you could bisect it further? Also, does "lspci -vvv", >> >"/proc/ioports" and/or "/proc/iomem" change between -git7 and -git8? >> > > >Could you test this patch, please? > >Best, > Dominik > >From: Dominik Brodowski >Date: Sun, 20 Dec 2009 10:04:56 +0100 >Subject: [PATCH] resources: fix call to alignf() in allocate_resource() > >The second parameter to alignf() in allocate_resource() must >reflect what new resource is attempted to be allocated, else >functions like pcibios_align_resource() (at least on x86) or >pcmcia_align() can't work correctly. > >Commit 1e5ad9679016275d422e36b12a98b0927d76f556 broke this by >setting the "new" resource until we're about to return success. >To keep the resource untouched when allocate_resource() fails, >a "tmp" resource is introduced. > >CC: Linus Torvalds >CC: Yinghai Lu >CC: Bjorn Helgaas >CC: Jesse Barnes >Signed-off-by: Dominik Brodowski > >diff --git a/kernel/resource.c b/kernel/resource.c >index dc15686..af96c1e 100644 >--- a/kernel/resource.c >+++ b/kernel/resource.c >@@ -308,37 +308,37 @@ static int find_resource(struct resource *root, struct resource *new, >void *alignf_data) > { > struct resource *this = root->child; >- resource_size_t start, end; >+ struct resource tmp = *new; > >- start = root->start; >+ tmp.start = root->start; > /* >* Skip past an allocated resource that starts at 0, since the > assignment >- * of this->start - 1 to new->end below would cause an underflow. >+ * of this->start - 1 to tmp->end below would cause an underflow. >*/ > if (this && this->start == 0) { >- start = this->end + 1; >+ tmp.start = this->end + 1; > this = this->sibling; > } > for(;;) { > if (this) >- end = this->start - 1; >+ tmp.end = this->start - 1; > else >- end = root->end; >- if (start < min) >- start = min; >- if (end > max) >- end = max; >- start = ALIGN(start, align); >+ tmp.end = root->end; >+ if (tmp.start < min) >+ tmp.start = min; >+ if (tmp.end > max) >+ tmp.end = max; >+ tmp.start = ALIGN(tmp.start, align); > if (alignf) >- alignf(alignf_data, new, size, align); >- if (start < end && end - start >= size - 1) { >- new->start = start; >- new->end = start + size - 1; >+ alignf(alignf_data, &tmp, size, align); >+ if (tmp.start < tmp.end && tmp.end - tmp.start >= size - 1) { >+ new->start = tmp.start; >+ new->end = tmp.start + size - 1; > return 0; > } > if (!this) > break; >- start = this->end + 1; >+ tmp.start = this->end + 1; > this = this->sibling; > } > return -EBUSY; ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hey, On Sun, Dec 20, 2009 at 03:11:05PM +0900, Komuro wrote: > >Any chance you could bisect it further? Also, does "lspci -vvv", > >"/proc/ioports" and/or "/proc/iomem" change between -git7 and -git8? > > Could you test this patch, please? Best, Dominik From: Dominik Brodowski Date: Sun, 20 Dec 2009 10:04:56 +0100 Subject: [PATCH] resources: fix call to alignf() in allocate_resource() The second parameter to alignf() in allocate_resource() must reflect what new resource is attempted to be allocated, else functions like pcibios_align_resource() (at least on x86) or pcmcia_align() can't work correctly. Commit 1e5ad9679016275d422e36b12a98b0927d76f556 broke this by setting the "new" resource until we're about to return success. To keep the resource untouched when allocate_resource() fails, a "tmp" resource is introduced. CC: Linus Torvalds CC: Yinghai Lu CC: Bjorn Helgaas CC: Jesse Barnes Signed-off-by: Dominik Brodowski diff --git a/kernel/resource.c b/kernel/resource.c index dc15686..af96c1e 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -308,37 +308,37 @@ static int find_resource(struct resource *root, struct resource *new, void *alignf_data) { struct resource *this = root->child; - resource_size_t start, end; + struct resource tmp = *new; - start = root->start; + tmp.start = root->start; /* * Skip past an allocated resource that starts at 0, since the assignment -* of this->start - 1 to new->end below would cause an underflow. +* of this->start - 1 to tmp->end below would cause an underflow. */ if (this && this->start == 0) { - start = this->end + 1; + tmp.start = this->end + 1; this = this->sibling; } for(;;) { if (this) - end = this->start - 1; + tmp.end = this->start - 1; else - end = root->end; - if (start < min) - start = min; - if (end > max) - end = max; - start = ALIGN(start, align); + tmp.end = root->end; + if (tmp.start < min) + tmp.start = min; + if (tmp.end > max) + tmp.end = max; + tmp.start = ALIGN(tmp.start, align); if (alignf) - alignf(alignf_data, new, size, align); - if (start < end && end - start >= size - 1) { - new->start = start; - new->end = start + size - 1; + alignf(alignf_data, &tmp, size, align); + if (tmp.start < tmp.end && tmp.end - tmp.start >= size - 1) { + new->start = tmp.start; + new->end = tmp.start + size - 1; return 0; } if (!this) break; - start = this->end + 1; + tmp.start = this->end + 1; this = this->sibling; } return -EBUSY; ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hi, >Any chance you could bisect it further? Also, does "lspci -vvv", >"/proc/ioports" and/or "/proc/iomem" change between -git7 and -git8? > Here is the patch that introduced the problem pointed out by bisect. but this result is apparently wrong. commit 5f1586d0dd8f6eeecf6c0d35cbca6291afd6f1cc Author: Ryusuke Konishi Date: Sun Nov 29 19:14:17 2009 +0900 nilfs2: do not return io error for bio allocation failure Previously, log writer had possibility to set an io error flag on segments even in case of memory allocation failure. This fixes the issue. Signed-off-by: Ryusuke Konishi diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hi, >Any chance you could bisect it further? Also, does "lspci -vvv", >"/proc/ioports" and/or "/proc/iomem" change between -git7 and -git8? Here is the difference of lspci , ioports and iomem. I tried the bisect, but I failed to get the correct result. maybe I mistyped the bisect command. (It takes too many time to complete bisect) --- lspci-7 2009-12-20 06:32:32.0 +0900 +++ lspci-8 2009-12-20 06:29:42.0 +0900 @@ -216,7 +216,7 @@ Memory window 0: dc00-d000 (prefetchable) Memory window 1: e000-e3fff000 I/O window 0: 1000-10ff - I/O window 1: 1400-14ff + I/O window 1: 1100-11ff 16-bit legacy interface ports at 0001 Kernel driver in use: yenta_cardbus Kernel modules: yenta_socket --- iomem-7 2009-12-20 06:33:42.0 +0900 +++ iomem-8 2009-12-20 06:30:05.0 +0900 @@ -6,8 +6,8 @@ 000e-000f : reserved 000f-000f : System ROM 0010-b7b6bfff : System RAM - 0040-0070e7c0 : Kernel code - 0070e7c1-008eda7f : Kernel data + 0040-0070ebc8 : Kernel code + 0070ebc9-008edaff : Kernel data 00972000-00a30bef : Kernel bss b7b6c000-b7bbefff : reserved b7bbf000-b7c85fff : System RAM @@ -42,7 +42,7 @@ dab05800-dab058ff : :00:1f.3 dc00-dfff : PCI CardBus :05 e000-e3ff : PCI CardBus :05 -f800-fbff : PCI MMCONFIG 0 [00-3f] +f800-fbff : PCI MMCONFIG [bus 00-3f] f800-fbff : reserved f800-fbff : pnp 00:01 fec0-fec00fff : reserved --- ioports-7 2009-12-20 06:33:31.0 +0900 +++ ioports-8 2009-12-20 06:29:56.0 +0900 @@ -9,10 +9,7 @@ 00a0-00a1 : pic2 00c0-00df : dma2 00f0-00ff : fpu -0300-030f : pcmcia_socket0 03c0-03df : vga+ -03f8-03ff : pcmcia_socket0 - 03f8-03ff : serial 0400-047f : pnp 00:01 0400-0403 : ACPI PM1a_EVT_BLK 0404-0405 : ACPI PM1a_CNT_BLK @@ -29,7 +26,9 @@ 0cf8-0cff : PCI conf1 1000-1fff : PCI Bus :04 1000-10ff : PCI CardBus :05 - 1400-14ff : PCI CardBus :05 + 1100-11ff : PCI CardBus :05 + 1200-120f : pcmcia_socket0 + 1210-1217 : pcmcia_socket0 2000-2fff : PCI Bus :06 3000-3fff : PCI Bus :03 4000-5fff : PCI Bus :02 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Dear Komuro, Any chance you could bisect it further? Also, does "lspci -vvv", "/proc/ioports" and/or "/proc/iomem" change between -git7 and -git8? Best, Dominik On Sat, Dec 19, 2009 at 04:16:47PM +0900, Komuro wrote: > > Hi, > > 2.6.32-git7(2009/12/11) works and 2.6.32-git8(2009/12/12) does not work. > > So I think "'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbar > nes" > introduces this problem. > > > authorLinus Torvalds > Fri, 11 Dec 2009 20:18:16 + (12:18 -0800) > committer Linus Torvalds > Fri, 11 Dec 2009 20:18:16 + (12:18 -0800) > commit11bd04f6f35621193311c32e0721142b073a7794 > tree 00979740582bb26e8d3756bf3526c85f19f66a46tree | snapshot > parent4e2ccdb0409146f8cf64a11b6ef82a9c928ced2acommit | diff > parent9e0b5b2c447ad0caa075a5cfef86def62e1782ffcommit | diff > Merge branch 'linux-next' of git://git./linux/kernel/git/jbarnes/pci-2.6 > > * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2. > 6: (109 commits) > PCI: fix coding style issue in pci_save_state() > PCI: add pci_request_acs > PCI: fix BUG_ON triggered by logical PCIe root port removal > PCI: remove ifdefed pci_cleanup_aer_correct_error_status > PCI: unconditionally clear AER uncorr status register during cleanup > x86/PCI: claim SR-IOV BARs in pcibios_allocate_resource > PCI: portdrv: remove redundant definitions > PCI: portdrv: remove unnecessary struct pcie_port_data > PCI: portdrv: minor cleanup for pcie_port_device_register > PCI: portdrv: add missing irq cleanup > PCI: portdrv: enable device before irq initialization > PCI: portdrv: cleanup service irqs initialization > PCI: portdrv: check capabilities first > PCI: portdrv: move PME capability check > PCI: portdrv: remove redundant pcie type calculation > PCI: portdrv: cleanup pcie_device registration > PCI: portdrv: remove redundant pcie_port_device_probe > PCI: Always set prefetchable base/limit upper32 registers > PCI: read-modify-write the pcie device control register when initiating pcie > flr > PCI: show dma_mask bits in /sys > ... > > >> > >>> The mac address of 3c562 becomes ff:ff:ff:ff:ff:ff > >>> and no startup message appear for serial. > >> > >>Ouch. > >> > >>> This card works with kernel-2.6.32-git7. > >> > >>Hm, there didn't happen much in PCMCIA land between git7 and git10: > >> > >># git log --pretty=oneline 3ef884b4c04e857c283cc77ca70ad8f638d94b0e..f405425 > 3 > >2e96dda5506eb76badea322f2ae4731c drivers/pcmcia/ include/pcmcia/ > >>11bd04f6f35621193311c32e0721142b073a7794 Merge branch 'linux-next' of git:// > g > >it.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 > >>15ea76d407d560f985224b65fe59c9db01692a0d pccard: configure CLS on attach > >> > >>which only seems relevant for CardBus. Nonetheless: could you try commenting > >>out the line "pci_set_cacheline_size(dev)" in > >>drivers/pcmcia/cardbus.c:cardbus_config_irq_and_cls() ? > >> > > > >Even if I revert the "pccard: configure CLS on attach" manually, > >3com 3c562 still does not work. > > > >Best Regards > >Komuro > > > > > > > >___ > >Linux PCMCIA reimplementation list > >http://lists.infradead.org/mailman/listinfo/linux-pcmcia > ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hi, 2.6.32-git7(2009/12/11) works and 2.6.32-git8(2009/12/12) does not work. So I think "'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbar nes" introduces this problem. author Linus Torvalds Fri, 11 Dec 2009 20:18:16 + (12:18 -0800) committer Linus Torvalds Fri, 11 Dec 2009 20:18:16 + (12:18 -0800) commit 11bd04f6f35621193311c32e0721142b073a7794 tree00979740582bb26e8d3756bf3526c85f19f66a46tree | snapshot parent 4e2ccdb0409146f8cf64a11b6ef82a9c928ced2acommit | diff parent 9e0b5b2c447ad0caa075a5cfef86def62e1782ffcommit | diff Merge branch 'linux-next' of git://git./linux/kernel/git/jbarnes/pci-2.6 * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2. 6: (109 commits) PCI: fix coding style issue in pci_save_state() PCI: add pci_request_acs PCI: fix BUG_ON triggered by logical PCIe root port removal PCI: remove ifdefed pci_cleanup_aer_correct_error_status PCI: unconditionally clear AER uncorr status register during cleanup x86/PCI: claim SR-IOV BARs in pcibios_allocate_resource PCI: portdrv: remove redundant definitions PCI: portdrv: remove unnecessary struct pcie_port_data PCI: portdrv: minor cleanup for pcie_port_device_register PCI: portdrv: add missing irq cleanup PCI: portdrv: enable device before irq initialization PCI: portdrv: cleanup service irqs initialization PCI: portdrv: check capabilities first PCI: portdrv: move PME capability check PCI: portdrv: remove redundant pcie type calculation PCI: portdrv: cleanup pcie_device registration PCI: portdrv: remove redundant pcie_port_device_probe PCI: Always set prefetchable base/limit upper32 registers PCI: read-modify-write the pcie device control register when initiating pcie flr PCI: show dma_mask bits in /sys ... >> >>> The mac address of 3c562 becomes ff:ff:ff:ff:ff:ff >>> and no startup message appear for serial. >> >>Ouch. >> >>> This card works with kernel-2.6.32-git7. >> >>Hm, there didn't happen much in PCMCIA land between git7 and git10: >> >># git log --pretty=oneline 3ef884b4c04e857c283cc77ca70ad8f638d94b0e..f405425 3 >2e96dda5506eb76badea322f2ae4731c drivers/pcmcia/ include/pcmcia/ >>11bd04f6f35621193311c32e0721142b073a7794 Merge branch 'linux-next' of git:// g >it.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 >>15ea76d407d560f985224b65fe59c9db01692a0d pccard: configure CLS on attach >> >>which only seems relevant for CardBus. Nonetheless: could you try commenting >>out the line "pci_set_cacheline_size(dev)" in >>drivers/pcmcia/cardbus.c:cardbus_config_irq_and_cls() ? >> > >Even if I revert the "pccard: configure CLS on attach" manually, >3com 3c562 still does not work. > >Best Regards >Komuro > > > >___ >Linux PCMCIA reimplementation list >http://lists.infradead.org/mailman/listinfo/linux-pcmcia ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hi > >> The mac address of 3c562 becomes ff:ff:ff:ff:ff:ff >> and no startup message appear for serial. > >Ouch. > >> This card works with kernel-2.6.32-git7. > >Hm, there didn't happen much in PCMCIA land between git7 and git10: > ># git log --pretty=oneline 3ef884b4c04e857c283cc77ca70ad8f638d94b0e..f4054253 2e96dda5506eb76badea322f2ae4731c drivers/pcmcia/ include/pcmcia/ >11bd04f6f35621193311c32e0721142b073a7794 Merge branch 'linux-next' of git://g it.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 >15ea76d407d560f985224b65fe59c9db01692a0d pccard: configure CLS on attach > >which only seems relevant for CardBus. Nonetheless: could you try commenting >out the line "pci_set_cacheline_size(dev)" in >drivers/pcmcia/cardbus.c:cardbus_config_irq_and_cls() ? > Even if I revert the "pccard: configure CLS on attach" manually, 3com 3c562 still does not work. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
> >> The mac address of 3c562 becomes ff:ff:ff:ff:ff:ff > >> and no startup message appear for serial. > >> > >> This card works with kernel-2.6.32-git7. > > It seems the pcmcia card can't access the io-range 0x100-0x3ff, > so serial can't allocate io-port resource. That sounds familiar. I think I had a card with a similar phenomenon, but that was months ago... Maybe I'll have time this week to dig this card out of wherever it is now :) -- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc Description: Digital signature ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hi, >> 3com 3c562 multifunction card does not work >> with kernel 2.6.32-git10. >> >> The mac address of 3c562 becomes ff:ff:ff:ff:ff:ff >> and no startup message appear for serial. >> >> This card works with kernel-2.6.32-git7. It seems the pcmcia card can't access the io-range 0x100-0x3ff, so serial can't allocate io-port resource. >Sounds like a good candidate for git-bisect :) > OK. but I don't have enough time on weekdays. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
> 3com 3c562 multifunction card does not work > with kernel 2.6.32-git10. > > The mac address of 3c562 becomes ff:ff:ff:ff:ff:ff > and no startup message appear for serial. > > This card works with kernel-2.6.32-git7. Sounds like a good candidate for git-bisect :) -- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc Description: Digital signature ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hey, On Sun, Dec 13, 2009 at 09:25:56PM +0900, Komuro wrote: > 3com 3c562 multifunction card does not work > with kernel 2.6.32-git10. Thanks for testing! > The mac address of 3c562 becomes ff:ff:ff:ff:ff:ff > and no startup message appear for serial. Ouch. > This card works with kernel-2.6.32-git7. Hm, there didn't happen much in PCMCIA land between git7 and git10: # git log --pretty=oneline 3ef884b4c04e857c283cc77ca70ad8f638d94b0e..f40542532e96dda5506eb76badea322f2ae4731c drivers/pcmcia/ include/pcmcia/ 11bd04f6f35621193311c32e0721142b073a7794 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 15ea76d407d560f985224b65fe59c9db01692a0d pccard: configure CLS on attach which only seems relevant for CardBus. Nonetheless: could you try commenting out the line "pci_set_cacheline_size(dev)" in drivers/pcmcia/cardbus.c:cardbus_config_irq_and_cls() ? However, my suspicion is that it is more related to PCI or serial work in between... Does "lspci -vvv" change between -git7 and -git10? Best, Dominik ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work
Hi, 3com 3c562 multifunction card does not work with kernel 2.6.32-git10. The mac address of 3c562 becomes ff:ff:ff:ff:ff:ff and no startup message appear for serial. This card works with kernel-2.6.32-git7. >pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0 >pcmcia 0.0: pcmcia: registering new device pcmcia0.0 >pcmcia 0.1: pcmcia: registering new device pcmcia0.1 >eth0: 3Com 3c562, io 0x1208, irq 3, hw_addr ff:ff:ff:ff:ff:ff > 8K FIFO split 5:3 Rx:Tx, auto xcvr Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia