Re: pcmciautils.git
Hi, I stil can't find the http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
pcmciautils.git
Hi, Currently, I can't find git://git.kernel.org/pub/scm/linux/pcmcia/pcmciautils.git/ and Linux Kernel 2.6 PCMCIA site. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[pcmciautils] hotplug is obsolete?
Hi, It seems hotplug is obsolete. If yes, hotplug-script should be removed from pcmciautils? Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
ide-cs driver
Hi, ide-cs driver is old and un-maintained. so I think ide-cs should have been removed when Linux becomes ver 3.0. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Lecture of German
Dear expert of German. In a letter to Max Born, Einstein wrote: Der Alte nicht wurfelt. In English, He [God] does not throw dice. Does der Alte mean God in German? According to the dictionary, Alte means old. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[ds.h] need WIN_FLAGS_WIN_0, 1, 2, 3 definition
Hi, I think we need WIN_FLAGS_WIN_0, 1, 2, 3 definition below any comment? --- linux-2.6.39/include/pcmcia/ds.h.orig 2011-03-15 10:20:32.0 +090 0 +++ linux-2.6.39/include/pcmcia/ds.h2011-07-24 12:12:40.0 +090 0 @@ -236,11 +236,11 @@ void pcmcia_disable_device(struct pcmcia #define WIN_FLAGS_MAP 0x63 /* MAP_ATTRIB | MAP_16BIT | MAP_ACTIVE | MAP_USE_WAIT */ -#define WIN_FLAGS_REQ 0x1c /* mapping to socket-win[i]: - 0x04 - 0 - 0x08 - 1 - 0x0c - 2 - 0x10 - 3 */ +#define WIN_FLAGS_REQ 0x1c /* mapping to socket-win[i]: */ +#define WIN_FLAGS_WIN_00x04 +#define WIN_FLAGS_WIN_10x08 +#define WIN_FLAGS_WIN_20x0c +#define WIN_FLAGS_WIN_30x10 /* config_reg{ister}s present for this PCMCIA device */ #define PRESENT_OPTION 0x001 Best Regards Komuro [I changed my e-mail address.] ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [ANNOUNCE] pcmciautils-018 released
Hi, [rules-base] # PCMCIA sockets: # # modprobe the pcmcia bus module so that 16-bit PCMCIA devices work SUBSYSTEM==pcmcia_socket, \ RUN+=/sbin/modprobe -b pcmcia The modprobe does not have -b option. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
pccardctl config
Hi, # pccardctl config Socket 0: command 'config' not yet handled by pccardctl If no one will add 'config' option, it should be removed from pccardctl source code. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [ANNOUNCE] pcmciautils-018 released
Hi, It seems recent modprobe does not have -b option. but older version of modprobe seems to have it. [rules-base] # PCMCIA sockets: # # modprobe the pcmcia bus module so that 16-bit PCMCIA devices work SUBSYSTEM==pcmcia_socket, \ RUN+=/sbin/modprobe -b pcmcia The modprobe does not have -b option. $ modprobe -V module-init-tools version 3.12 $ man modprobe ... -b --use-blacklist This option causes modprobe to apply the blacklist commands in the configuration files (if any) to module names as well. It i s usually used by udev(7). Best, Dominik ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH 2.6.36-git1]pd6729:Coding Style fixes
pd6729: remove unnecessary space. Signed-off-by: Komuro komurojun-...@nifty.com --- --- linux-2.6.36-git1/drivers/pcmcia/pd6729.c.orig 2010-10-22 21:38:04.0 +0900 +++ linux-2.6.36-git1/drivers/pcmcia/pd6729.c 2010-10-22 21:38:38.0 +0900 @@ -725,17 +725,17 @@ static int __devinit pd6729_pci_probe(st return 0; - err_out_free_res2: +err_out_free_res2: if (irq_mode == 1) free_irq(dev-irq, socket); else del_timer_sync(socket-poll_timer); - err_out_free_res: +err_out_free_res: pci_release_regions(dev); - err_out_disable: +err_out_disable: pci_disable_device(dev); - err_out_free_mem: +err_out_free_mem: kfree(socket); return ret; } --- linux-2.6.36-git1/drivers/pcmcia/pd6729.h.orig 2010-10-22 21:38:45.0 +0900 +++ linux-2.6.36-git1/drivers/pcmcia/pd6729.h 2010-10-22 21:39:38.0 +0900 @@ -15,7 +15,7 @@ struct pd6729_socket { int number; int card_irq; - unsigned long io_base; /* base io address of the socket */ + unsigned long io_base; /* base io address of the socket */ struct pcmcia_socket socket; struct timer_list poll_timer; }; ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi, http://userweb.kernel.org/~brodo/pcmcia-2.6.35.diff Serial part of Xircom card works with pcmcia-2.6.35.diff. - Original Message - Date: Sat, 18 Sep 2010 15:32:12 +0200 From: Dominik Brodowski li...@dominikbrodowski.net To: Komuro komurojun-...@nifty.com, pa...@ucw.cz Cc: linux-pcmcia@lists.infradead.org Subject: Re: Re: Re: Re: Re: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io() Hey, On Sat, Sep 18, 2010 at 09:50:31PM +0900, Komuro wrote: Also on re-inserting the card (with 2.6.36-rc4+ as of today)? I tried the 2.6.36-rc4-git4. Thanks for testing! elese we wouldn't see the is a 16550A message, right? Even if the COR(Configuration Option Register) of irq is not properly setup , we can see the above message... Nothing relating to setting CISREG_COR (at least on pcnet_cs) changed, and serial_cs does not modify CISREG_COR on such pseudo-multifunction devices. Would it be possible for you to re-check plain 2.6.35 and 2.6.35 with the pcmcia patchset availble at http://userweb.kernel.org/~brodo/pcmcia-2.6.35.diff ? If this works, we know that it's a serial/tty core issue, else it's indeed a PCMCIA issue. Pavel: has the bt / pcmcia issue you were seeing with -rc1 been solved? If not, could you try out 2.6.35 with this bigdiff as well, please? Thanks best, Dominik ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: Re: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi, With this patch, fmvj18x_cs based card works (both network and serial). but Serial part of Xircom card still does not work. I think the reason is irq or io_width or io_lines is not setuped properly for Xircom-card by pcmcia_core. Hey, On Sat, Sep 18, 2010 at 11:48:32AM +0900, Komuro wrote: Attached file is dmesg of another multi-function card(fmvj18x_cs) Thanks for the debug output -- this helps a lot! This card works with 2.6.35 but does not work with 2.6.36rc3(+patch). does this patch help (at least with the network function?)? Best, Dominik commit 9e7d4841d766f96a4e28a51c434485695d6a60ca Author: Dominik Brodowski li...@dominikbrodowski.net Date: Sat Sep 18 10:19:13 2010 +0200 pcmcia: preserve configuration information if request_io fails partly If pcmcia_request_io() only fails partly -- for the second of two requested resources -- preserve the configuration settings for the first one. Signed-off-by: Dominik Brodowski li...@dominikbrodowski.net diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resourc e.c index a5c1765..9ba4dad 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -595,7 +595,13 @@ int pcmcia_request_io(struct pcmcia_device *p_dev) if (c-io[1].end) { ret = alloc_io_space(s, c-io[1], p_dev-io_lines); if (ret) { + struct resource tmp = c-io[0]; + /* release the previously allocated resource */ release_io_space(s, c-io[0]); + /* but preserve the settings, for they worked... */ + c-io[0].end = resource_size(tmp); + c-io[0].start = tmp.start; + c-io[0].flags = tmp.flags; goto out; } } else ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: Re: Re: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi, Also on re-inserting the card (with 2.6.36-rc4+ as of today)? I tried the 2.6.36-rc4-git4. The serial part still does not work, before and after re-inserting the card. elese we wouldn't see the is a 16550A message, right? Even if the COR(Configuration Option Register) of irq is not properly setup, we can see the above message... Hey, On Sat, Sep 18, 2010 at 07:20:31PM +0900, Komuro wrote: With this patch, fmvj18x_cs based card works (both network and serial). good. Will push the patch upstream, then. but Serial part of Xircom card still does not work. Also on re-inserting the card (with 2.6.36-rc4+ as of today)? I think the reason is irq or io_width or io_lines is not setuped properly for Xircom-card by pcmcia_core. But those values are the same for 2.6.35 and 2.6.36-rc4+, else we wouldn't see the same eth0: Xircom: port 0x300, irq 18, hwaddr 00:10:a4:f3:db:02 0.1: ttyS3 at I/O 0x2e8 (irq = 18) is a 16550A messages. Furthermore, at least some access to the serial part does work, elese we wouldn't see the is a 16550A message, right? Best, Dominik ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi, Xircom multi-function card still does not work. Please see the attached dmesg log. Best Regards Komuro - Original Message - Date: Mon, 13 Sep 2010 21:53:53 +0200 From: Dominik Brodowski li...@dominikbrodowski.net To: Komuro komurojun-...@nifty.com Cc: linux-pcmcia@lists.infradead.org, linux-ser...@vger.kernel.org Subject: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io() Dear Komuro, does the attached patch help with 2.6.36-rc4? Best, Dominik commit 1852d6b8c3fa2d1765f66cd7d96a8c6bf9f01997 Author: Dominik Brodowski li...@dominikbrodowski.net Date: Mon Aug 30 08:18:54 2010 +0200 pcmcia serial_cs.c: fix multifunction card handling We shouldn't overwrite pre-set values, and we should also set the port address to the beginning, and not the end of the 8-port range. Reported-by: Komuro komurojun-...@nifty.com Signed-off-by: Dominik Brodowski li...@dominikbrodowski.net diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 141c695..7d475b2 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c @@ -335,8 +335,6 @@ static int serial_probe(struct pcmcia_device *link) info-p_dev = link; link-priv = info; - link-resource[0]-flags |= IO_DATA_PATH_WIDTH_8; - link-resource[0]-end = 8; link-conf.Attributes = CONF_ENABLE_IRQ; if (do_sound) { link-conf.Attributes |= CONF_ENABLE_SPKR; @@ -411,6 +409,27 @@ static int setup_serial(struct pcmcia_device *handle, st ruct serial_info * info, /**/ +static int pfc_config(struct pcmcia_device *p_dev) +{ + unsigned int port = 0; + struct serial_info *info = p_dev-priv; + + if ((p_dev-resource[1]-end != 0) + (resource_size(p_dev-resource[1]) == 8)) { + port = p_dev-resource[1]-start; + info-slave = 1; + } else if ((info-manfid == MANFID_OSITECH) + (resource_size(p_dev-resource[0]) == 0x40)) { + port = p_dev-resource[0]-start + 0x28; + info-slave = 1; + } + if (info-slave) + return setup_serial(p_dev, info, port, p_dev-irq); + + dev_warn(p_dev-dev, no usable port range found, giving up\n); + return -ENODEV; +} + static int simple_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cf, cistpl_cftable_entry_t *dflt, @@ -461,23 +480,8 @@ static int simple_config(struct pcmcia_device *link) struct serial_info *info = link-priv; int i = -ENODEV, try; - /* If the card is already configured, look up the port and irq */ - if (link-function_config) { - unsigned int port = 0; - if ((link-resource[1]-end != 0) - (resource_size(link-resource[1]) == 8)) { - port = link-resource[1]-end; - info-slave = 1; - } else if ((info-manfid == MANFID_OSITECH) - (resource_size(link-resource[0]) == 0x40)) { - port = link-resource[0]-start + 0x28; - info-slave = 1; - } - if (info-slave) { - return setup_serial(link, info, port, - link-irq); - } - } + link-resource[0]-flags |= IO_DATA_PATH_WIDTH_8; + link-resource[0]-end = 8; /* First pass: look for a config entry that looks normal. * Two tries: without IO aliases, then with aliases */ @@ -491,8 +495,7 @@ static int simple_config(struct pcmcia_device *link) if (!pcmcia_loop_config(link, simple_config_check_notpicky, NULL)) goto found_port; - printk(KERN_NOTICE - serial_cs: no usable port range found, giving up\n); + dev_warn(link-dev, no usable port range found, giving up\n); return -1; found_port: @@ -558,6 +561,7 @@ static int multi_config(struct pcmcia_device *link) int i, base2 = 0; /* First, look for a generic full-sized window */ + link-resource[0]-flags |= IO_DATA_PATH_WIDTH_8; link-resource[0]-end = info-multi * 8; if (pcmcia_loop_config(link, multi_config_check, base2)) { /* If that didn't work, look for two windows */ @@ -565,15 +569,14 @@ static int multi_config(struct pcmcia_device *link) info-multi = 2; if (pcmcia_loop_config(link, multi_config_check_notpicky, base2)) { - printk(KERN_NOTICE serial_cs: no usable port range + dev_warn(link-dev, no usable port range found, giving up\n); return -ENODEV; } } if (!link-irq) - dev_warn(link-dev
Re: Re: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi, Are these lines different from what you see on a working kernel? dmesg is same between working kernel and 2.6.36-rc3. but 2.6.36-rc3(+patch) , the serial part still does not work. - Original Message - Date: Fri, 17 Sep 2010 20:52:12 +0200 From: Dominik Brodowski li...@dominikbrodowski.net To: Komuro komurojun-...@nifty.com Cc: linux-pcmcia@lists.infradead.org, linux-ser...@vger.kernel.org Subject: Re: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io() Dear Komuro, On Fri, Sep 17, 2010 at 10:06:51PM +0900, Komuro wrote: Xircom multi-function card still does not work. Huh, that is indeed surprising, as the dmesg has all the usual config descriptions: eth0: Xircom: port 0x300, irq 18, hwaddr 00:10:a4:f3:db:02 ... 0.1: ttyS3 at I/O 0x2e8 (irq = 18) is a 16550A Are these lines different from what you see on a working kernel? Best, Dominik ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi, Attached file is the output of /sys/kernel/debug/dynamic_debug/control. kernel 2.6..36-rc3. xirc2pcs_cs multi-function card. # filename:lineno [module]function flags format arch/x86/kernel/cpu/perfctr-watchdog.c:244 [perfctr_watchdog]write_watchdog_counter - setting %s to -0x%08Lx\012 arch/x86/kernel/cpu/perfctr-watchdog.c:255 [perfctr_watchdog]write_watchdog_counter32 - setting %s to -0x%08Lx\012 arch/x86/kernel/acpi/boot.c:998 [boot]mp_config_acpi_legacy_irqs - Bus #%d is ISA\012 arch/x86/kernel/smpboot.c:1190 [smpboot]native_smp_cpus_done - Boot done.\012 arch/x86/kernel/smpboot.c:497 [smpboot]impress_friends - Before bogocount - setting activated=1.\012 arch/x86/kernel/smpboot.c:487 [smpboot]impress_friends - Before bogomips.\012 arch/x86/kernel/smpboot.c:928 [smpboot]native_cpu_up - do_boot_cpu failed %d\012 arch/x86/kernel/smpboot.c:913 [smpboot]native_cpu_up - do_boot_cpu %d Already started\012 arch/x86/kernel/smpboot.c:901 [smpboot]native_cpu_up - =_---CPU UP %u\012 arch/x86/kernel/smpboot.c:850 [smpboot]do_boot_cpu - CPU%d: has booted.\012 arch/x86/kernel/smpboot.c:831 [smpboot]do_boot_cpu - After Callout %d.\012 arch/x86/kernel/smpboot.c:829 [smpboot]do_boot_cpu - Before Callout %d.\012 arch/x86/kernel/smpboot.c:804 [smpboot]do_boot_cpu - Setting warm reset code and vector.\012 /usr/src/linux-2.6.36-rc3/arch/x86/include/asm/smpboot_hooks.h:21 [smpboot]smpboot_setup_warm_reset_vector - 3.\012 /usr/src/linux-2.6.36-rc3/arch/x86/include/asm/smpboot_hooks.h:18 [smpboot]smpboot_setup_warm_reset_vector - 2.\012 /usr/src/linux-2.6.36-rc3/arch/x86/include/asm/smpboot_hooks.h:15 [smpboot]smpboot_setup_warm_reset_vector - 1.\012 arch/x86/kernel/smpboot.c:683 [smpboot]wakeup_secondary_cpu_via_init - After Startup.\012 arch/x86/kernel/smpboot.c:670 [smpboot]wakeup_secondary_cpu_via_init - Waiting for send to finish...\012 arch/x86/kernel/smpboot.c:668 [smpboot]wakeup_secondary_cpu_via_init - Startup point 1.\012 arch/x86/kernel/smpboot.c:651 [smpboot]wakeup_secondary_cpu_via_init - After apic_write.\012 arch/x86/kernel/smpboot.c:647 [smpboot]wakeup_secondary_cpu_via_init - Sending STARTUP #%d.\012 arch/x86/kernel/smpboot.c:644 [smpboot]wakeup_secondary_cpu_via_init - #startup loops: %d.\012 arch/x86/kernel/smpboot.c:617 [smpboot]wakeup_secondary_cpu_via_init - Waiting for send to finish...\012 arch/x86/kernel/smpboot.c:611 [smpboot]wakeup_secondary_cpu_via_init - Deasserting INIT.\012 arch/x86/kernel/smpboot.c:606 [smpboot]wakeup_secondary_cpu_via_init - Waiting for send to finish...\012 arch/x86/kernel/smpboot.c:595 [smpboot]wakeup_secondary_cpu_via_init - Asserting INIT.\012 arch/x86/kernel/smpboot.c:277 [smpboot]smp_callin - Stack at about %p\012 arch/x86/kernel/smpboot.c:257 [smpboot]smp_callin - CALLIN, before setup_local_APIC().\012 arch/x86/kernel/smpboot.c:222 [smpboot]smp_callin - CPU#%d (phys ID: %d) waiting for CALLOUT\012 arch/x86/kernel/smpboot.c:568 [smpboot]wakeup_secondary_cpu_via_nmi - NMI sent.\012 arch/x86/kernel/smpboot.c:555 [smpboot]wakeup_secondary_cpu_via_nmi - Waiting for send to finish...\012 arch/x86/kernel/tsc_sync.c:151 [tsc_sync]check_tsc_sync_source - TSC synchronization [CPU#%d - CPU#%d]: passed\012 arch/x86/kernel/apic/apic.c:1779 [apic]smp_error_interrupt - APIC error on CPU%d: %02x(%02x)\012 arch/x86/kernel/apic/io_apic.c:3948 [io_apic]io_apic_set_pci_routing - Pin %d-%d already programmed\012 arch/x86/kernel/apic/io_apic.c:1584 [io_apic]setup_IO_APIC_irq_extra - Pin %d-%d already programmed\012 arch/x86/mm/init_32.c:1031 [init_32]set_kernel_text_ro - Set kernel text: %lx - %lx for read only\012 arch/x86/mm/init_32.c:1017 [init_32]set_kernel_text_rw - Set kernel text: %lx - %lx for read write\012 kernel/pm_qos_params.c:395 [pm_qos_params]pm_qos_power_write - 3%s, %d, 0x%x\012 kernel/freezer.c:123 [freezer]cancel_freezing - clean up: %s\012 kernel/freezer.c:60 [freezer]refrigerator - %s left refrigerator\012 kernel/freezer.c:41 [freezer]refrigerator - %s entered refrigerator\012 kernel/power/suspend.c:291 [suspend]enter_state - PM: Finishing wakeup.\012 kernel/power/suspend.c:287 [suspend]enter_state - PM: Entering %s sleep\012 kernel/power/suspend.c:279 [suspend]enter_state - PM: Preparing system for %s sleep\012 kernel/irq/manage.c:443 [manage]__irq_set_trigger - No set_type function for IRQ %d (%s)\012 fs/notify/fsnotify.c:193 [fsnotify]send_to_group - %s: group=%p to_tell=%p mnt=%p mask=%x inode_mark=%p inode_test_mask=%x vfsmount_mark=%p vfsmount_test_mask=%x data=%p data_is=%d cookie=%d event=%p\012 fs/notify/notification.c:407 [notification]fsnotify_create_event - %s: event=%p to_tell=%p mask=%x data=%p data_type=%d\012 fs/notify/notification.c:365 [notification]fsnotify_clone_event - %s: old_event=%p new_event=%p\012 fs/notify/notification.c:330 [notification]fsnotify_replace_event - %s: old_event=%p new_event=%p\012 fs/notify/notification.c:243 [notification]fsnotify_remove_notify_event - %s:
[BUG] [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi, Something is strange in pcmcia_request_configuration? at kernel 2.6.36-rc1? serial part of multi-function card does not work at 2.6.36-rc1. output of /proc/ioports [2.6.36-rc1] 02e8-02ef : pcmcia_socket0 02e8-02ef : pcmcia0.0 02e8-02ef : serial 0300-030f : pcmcia_socket0 0300-0008 : pcmcia0.0== Strange!! [2.6.35] 02e8-02ef : pcmcia_socket0 02e8-02ef : serial 0300-030f : pcmcia_socket0 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c @@static int serial_probe(struct pcmcia_device *link) info-p_dev = link; link-priv = info; - link-io.Attributes1 = IO_DATA_PATH_WIDTH_8; - link-io.NumPorts1 = 8; + link-resource[0]-flags |= IO_DATA_PATH_WIDTH_8; + link-resource[0]-end = 8; resource[0]-end should be end of port-address? @@ -463,13 +463,13 @@ static int simple_config(struct pcmcia_device *link) /* If the card is already configured, look up the port and irq */ if (link-function_config) { unsigned int port = 0; - if ((link-io.BasePort2 != 0) - (link-io.NumPorts2 == 8)) { - port = link-io.BasePort2; + if ((link-resource[1]-end != 0) + (resource_size(link-resource[1]) == 8)) { + port = link-resource[1]-end; info-slave = 1; It should be link-resource[0]; (resource_size(link-resource[0]) == 8)) { port = link-resource[0]-end; static int multi_config(struct pcmcia_device *link) int i, base2 = 0; /* First, look for a generic full-sized window */ - link-io.NumPorts1 = info-multi * 8; + link-resource[0]-end = info-multi * 8; if (pcmcia_loop_config(link, multi_config_check, base2)) { /* If that didn't work, look for two windows */ - link-io.NumPorts1 = link-io.NumPorts2 = 8; + link-resource[0]-end = link-resource[1]-end = 8; info-multi = 2; if (pcmcia_loop_config(link, multi_config_check_notpicky, base2)) { resource[0]-end , link-resource[1]-end should be end of port-address? ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi @@ -463,13 +463,13 @@ static int simple_config(struct pcmcia_device *link) /* If the card is already configured, look up the port and irq */ if (link-function_config) { unsigned int port = 0; - if ((link-io.BasePort2 != 0) - (link-io.NumPorts2 == 8)) { - port = link-io.BasePort2; + if ((link-resource[1]-end != 0) + (resource_size(link-resource[1]) == 8)) { + port = link-resource[1]-end; info-slave = 1; sorry, It should be link-resource[1]-start; (resource_size(link-resource[1]) == 8)) { port = link-resource[1]-start; HERE!! ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi, @@ -248,9 +248,8 @@ static int fmvj18x_probe(struct pcmcia_device *link) lp-base = NULL; /* The io structure describes IO port mapping */ -link-io.NumPorts1 = 32; -link-io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; -link-io.IOAddrLines = 5; +link-resource[0]-end = 32; +link-resource[0]-flags |= IO_DATA_PATH_WIDTH_AUTO; Do you have any reason to move link-io_lines = 5 from fmvj18x_probe to fmvj18x_config? @@ -345,6 +344,8 @@ static int fmvj18x_config(struct pcmcia_device *link) dev_dbg(link-dev, fmvj18x_config\n); +link-io_lines = 5; + len = pcmcia_get_tuple(link, CISTPL_FUNCE, buf); kfree(buf); ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
Hi, -link-io.IOAddrLines =10; -link-io.Attributes1 = IO_DATA_PATH_WIDTH_16; +link-resource[0]-flags |= IO_DATA_PATH_WIDTH_16; link-io_lines should be set here? @@ -840,14 +839,15 @@ xirc2ps_config(struct pcmcia_device * link) } printk(KNOT_XIRC no ports available\n); } else { - link-io.NumPorts1 = 16; + link-io_lines = 10; + link-resource[0]-end = 16; Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH 01/11] pcmcia: use pcmica_{read,write}_config_byte
Hi, --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c + if (err) goto config_error; - reg.Action = CS_WRITE; - reg.Offset = CISREG_IOBASE_1; - reg.Value = (link-io.BasePort2 8) 0xff; - if ((err = pcmcia_access_configuration_register(link, reg))) + + err = pcmcia_write_config_byte(link, CISREG_IOBASE_1, + link-io.BasePort2 0xff); It should be err = pcmcia_write_config_byte(link, CISREG_IOBASE_1, (link-io.BasePort2 8) 0xff); ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
ds.h: unnecessary bit-field
Hi, bit-field sometimes introduces locking problem. for example, if one cpu loads the value suspended, it also loads other value (_irq, _io ..) at the same time. so it should not be used? [include/pcmcia/ds.h] u16 suspended:1; /* Flags whether io, irq, win configurations were * requested, and whether the configuration is locked */ u16 _irq:1; u16 _io:1; u16 _win:4; u16 _locked:1; /* Flag whether a fuzzy func_id based match is * allowed. */ u16 allow_func_id_match:1; /* information about this device */ u16 has_manf_id:1; u16 has_card_id:1; u16 has_func_id:1; u16 reserved:4; ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: ss.h: unnecessary bit-field
Hi, include/pcmcia/ss.h /* socket setup is done so resources should be able to be allocated. * Only if set to 1, calls to find_{io,mem}_region are handled, and * insertio events are actually managed by the PCMCIA layer.*/ u8 resource_setup_done:1; /* It's old if resource setup is done using adjust_resource_info() */ u8 resource_setup_old:1; u8 resource_setup_new:1; u8 reserved:5; meaningless bit-field? resource_setup_done is still needed. What about this patch? OK. Thanks! ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
ss.h: unnecessary bit-field
Hi, include/pcmcia/ss.h /* socket setup is done so resources should be able to be allocated. * Only if set to 1, calls to find_{io,mem}_region are handled, and * insertio events are actually managed by the PCMCIA layer.*/ u8 resource_setup_done:1; /* It's old if resource setup is done using adjust_resource_info() */ u8 resource_setup_old:1; u8 resource_setup_new:1; u8 reserved:5; meaningless bit-field? /* 16-bit state: */ struct { /* the PCMCIA card consists of two pseudo devices */ u8 has_pfc:1; u8 reserved:7; } pcmcia_state; struct pcmcia_state is unnecessary? it should be u8 has_pfc; ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[BUG] pcmcia: dev_node removal (drivers with unregister_netdev check)
Dear Dominik You introduced a bug to smc91c92_cs.c link-priv = dev; is necessary at smc91c92_probe. --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c @@ -103,7 +103,6 @@ struct smc_private { u_shortmanfid; u_shortcardid; -dev_node_t node; struct sk_buff *saved_skb; intpackets_waiting; void __iomem *base; @@ -323,7 +322,6 @@ static int smc91c92_probe(struct pcmcia_device *link) return -ENOMEM; smc = netdev_priv(dev); smc-p_dev = link; -link-priv = dev;= HERE. This is necessary!! ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[BUG: invalid hash] - update pata_pcmcia/ide-cs with transcend and kingston cards
Hi, The hash of CF CARD 1GB and TS4GCF133 are wrong. pcmcia: pata_pcmcia: invalid hash for product string CF CARD 1GB: is 0x3e520 e17, should be 0x55d5bffb pcmcia: see Documentation/pcmcia/devicetable.txt for details pcmcia: pata_pcmcia: invalid hash for product string TS4GCF133: is 0x9351e59 d, should be 0x7558f133 pcmcia: see Documentation/pcmcia/devicetable.txt for details On 04/19/2010 01:54 PM, Kristoffer Ericson wrote: This patch adds idstrings for Kingston 1GB/4GB and Transcend 4GB/8GB. Signed-off-by: Kristoffer Ericsonkristoffer.eric...@gmail.com diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index ab87e4f..defce28 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c @@ -409,6 +409,8 @@ static struct pcmcia_device_id ide_ids[] = { PCMCIA_DEVICE_PROD_ID12(Hyperstone, Model1, 0x3d5b9ef5, 0xca6ab420), PCMCIA_DEVICE_PROD_ID12(IBM, microdrive, 0xb569a6e5, 0xa6d76178), PCMCIA_DEVICE_PROD_ID12(IBM, IBM17JSSFP20, 0xb569a6e5, 0xf2508753), +PCMCIA_DEVICE_PROD_ID12(KINGSTON, CF CARD 1GB, 0x2e6d1829, 0x3e520e17 ), +PCMCIA_DEVICE_PROD_ID12(KINGSTON, CF CARD 4GB, 0x2e6d1829, 0x531e7d10 ), PCMCIA_DEVICE_PROD_ID12(KINGSTON, CF8GB, 0x2e6d1829, 0xacbe682e), PCMCIA_DEVICE_PROD_ID12(IO DATA, CBIDE2 , 0x547e66dc, 0x8671043 b), PCMCIA_DEVICE_PROD_ID12(IO DATA, PCIDE, 0x547e66dc, 0x5c5ab149), @@ -429,6 +431,8 @@ static struct pcmcia_device_id ide_ids[] = { PCMCIA_DEVICE_PROD_ID12(TRANSCEND, TS1GCF80, 0x709b1bf1, 0x2a54d4b1) , PCMCIA_DEVICE_PROD_ID12(TRANSCEND, TS2GCF120, 0x709b1bf1, 0x969aa4f2 ), PCMCIA_DEVICE_PROD_ID12(TRANSCEND, TS4GCF120, 0x709b1bf1, 0xf54a91c8 ), +PCMCIA_DEVICE_PROD_ID12(TRANSCEND, TS4GCF133, 0x709b1bf1, 0x9351e59d) , +PCMCIA_DEVICE_PROD_ID12(TRANSCEND, TS8GCF133, 0x709b1bf1, 0xb2f89b47) , PCMCIA_DEVICE_PROD_ID12(WIT, IDE16, 0x244e5994, 0x3e232852), PCMCIA_DEVICE_PROD_ID12(WEIDA, TWTTI, 0xcc7cf69c, 0x212bb918), PCMCIA_DEVICE_PROD_ID1(STI Flash, 0xe4a13209), diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 3c3172d..4164dd2 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c @@ -424,6 +424,8 @@ static struct pcmcia_device_id pcmcia_devices[] = { PCMCIA_DEVICE_PROD_ID12(Hyperstone, Model1, 0x3d5b9ef5, 0xca6ab420), PCMCIA_DEVICE_PROD_ID12(IBM, microdrive, 0xb569a6e5, 0xa6d76178), PCMCIA_DEVICE_PROD_ID12(IBM, IBM17JSSFP20, 0xb569a6e5, 0xf2508753), +PCMCIA_DEVICE_PROD_ID12(KINGSTON, CF CARD 1GB, 0x2e6d1829, 0x3e520e17 ), +PCMCIA_DEVICE_PROD_ID12(KINGSTON, CF CARD 4GB, 0x2e6d1829, 0x531e7d10 ), PCMCIA_DEVICE_PROD_ID12(KINGSTON, CF8GB, 0x2e6d1829, 0xacbe682e), PCMCIA_DEVICE_PROD_ID12(IO DATA, CBIDE2 , 0x547e66dc, 0x8671043 b), PCMCIA_DEVICE_PROD_ID12(IO DATA, PCIDE, 0x547e66dc, 0x5c5ab149), @@ -444,6 +446,8 @@ static struct pcmcia_device_id pcmcia_devices[] = { PCMCIA_DEVICE_PROD_ID12(TRANSCEND, TS1GCF80, 0x709b1bf1, 0x2a54d4b1) , PCMCIA_DEVICE_PROD_ID12(TRANSCEND, TS2GCF120, 0x709b1bf1, 0x969aa4f2 ), PCMCIA_DEVICE_PROD_ID12(TRANSCEND, TS4GCF120, 0x709b1bf1, 0xf54a91c8 ), +PCMCIA_DEVICE_PROD_ID12(TRANSCEND, TS4GCF133, 0x709b1bf1, 0x9351e59d) , +PCMCIA_DEVICE_PROD_ID12(TRANSCEND, TS8GCF133, 0x709b1bf1, 0xb2f89b47) , PCMCIA_DEVICE_PROD_ID12(WIT, IDE16, 0x244e5994, 0x3e232852), PCMCIA_DEVICE_PROD_ID12(WEIDA, TWTTI, 0xcc7cf69c, 0x212bb918), PCMCIA_DEVICE_PROD_ID1(STI Flash, 0xe4a13209), Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: Re: [BUG? KERNEL 2.6.34-rc5-git5] pccard_validate_cis WARN_ON error
Hi, But, after pccardctl reset, the card still does not work. Why is pccardctl reset needed in any case? When the device becomes unstable, pccardctl reset reset the driver. It seems that the CIS is different when you call pccardctl reset compared to what it used to be. The CIS is same. I don't change the card. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [BUG? KERNEL 2.6.34-rc5-git5] pccard_validate_cis WARN_ON error
Hi, WARNING: at drivers/pcmcia/cistpl.c:1488 pccard_validate_cis+0x32/0x2c6() is a call trace printed? If so, what is it? Here is the call trace. [ cut here ] WARNING: at drivers/pcmcia/cistpl.c:1488 pccard_validate_cis+0x32/0x2c6() Hardware name: System Product Name Modules linked in: smc91c92_cs mii serial_cs video output sbs sbshc battery ac sg button floppy sr_mod cdrom yenta_socket rsrc_nonstatic sata_via ata_generi c pata_via libata sd_mod scsi_mod ext3 jbd mbcache [last unloaded: scsi_wait_s can] Pid: 1126, comm: pccardd Not tainted 2.6.34-rc5-git5 #5 Call Trace: [c042b90c] ? warn_slowpath_common+0x41/0x71 [c042b929] ? warn_slowpath_common+0x5e/0x71 [c042b946] ? warn_slowpath_null+0xa/0xc [c057f7c3] ? pccard_validate_cis+0x32/0x2c6 [c057c0ab] ? pcmcia_card_add+0x4a/0xa0 [c04ff1fe] ? kref_put+0x36/0x40 [c04fe6ce] ? kobject_release+0x0/0x4f [c04ff1fe] ? kref_put+0x36/0x40 [c057c1c6] ? ds_event+0xc5/0x12f [c057c222] ? ds_event+0x121/0x12f [c057a3dd] ? send_event+0x7b/0x97 [c057a7f6] ? socket_late_resume+0x81/0x86 [c057adfe] ? pccardd+0x21c/0x30e [c057abe2] ? pccardd+0x0/0x30e [c043f535] ? kthread+0x61/0x66 [c043f4d4] ? kthread+0x0/0x66 [c0402bf6] ? kernel_thread_helper+0x6/0x12 ---[ end trace 1855fc3c55f1e08e ]--- ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: [BUG? KERNEL 2.6.34-rc5-git5] pccard_validate_cis WARN_ON error
Hi, WARNING: at drivers/pcmcia/cistpl.c:1488 pccard_validate_cis+0x32/0x2c6( ) is a call trace printed? If so, what is it? Here is the call trace. Thanks! Does this patch help? The WARN_ON error is fixed. But, after pccardctl reset, the card still does not work. case1: eth0 does not appear. case2: eth0 appears, but ping command does not work. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH] pcmcia: fix matching rules for pseudo-multi-function cards
here is a fix for the rule to prevent PCMCIA_DEV_ID_MATCH_FUNC_ID entries to match on PFC-cards. e.g. serial_cs PCMCIA_DEVICE_FUNC_ID(2) will match on device 0 of a xircom CEM33 card resulting in a failure in xirc2ps_cs. I changed the code, so that the first matching struct pcmcia_device_id _PFC_ entry will mark the card has_pfc, preventing PCMCIA_DEV_ID_MATCH_FUNC_ID to match. OK. works. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Questions about ioport-assignments
Hi, Wolfram wrote: - Is it just a buggy card if it works at 0x300 but not 0xc300 (or is it maybe a problem with Linux assigning the io area)? - Why is IOAddrLines forced to 16 (and thus alignment to 0x1), but only if BasePort1 is 0? In this case, start = 0xc000, align_data-mask = 0x3ff, align_data-offset = 0x300 then ret becomes 0xc300; but ret should be 0x300. static resource_size_t pcmcia_common_align(struct pcmcia_align_data *align_data, resource_size_t start) { resource_size_t ret; /* * Ensure that we have the correct start address */ ret = (start ~align_data-mask) + align_data-offset; if (ret start) ret += align_data-mask + 1; return ret; } Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Questions about ioport-assignments
Hi, That's not pcmcia_common_align()s fault -- but this line in alloc_io_space: align = (*base) ? (lines ? 1lines : 0) : 1; Should we try replacing it with align = lines ? 1 lines : 0; unconditionally? In this case, *base = 0x300 So align = (*base) ? (lines ? 1lines : 0) : 1; is correct. Actually, lines defines the max ioport, not align. if lines = 10, the max ioport is 0x3ff. if lines = 16, the max ioport is 0x. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Questions about ioport-assignments
Hi, sorry, lines seems to be align. but some devices with lines=10, it means max io-port = 0x3ff. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: pci_bus_for_each_resource, transparent bridges and rsrc_nonstatic.c
Hi, After setting start = 0x100, size becomes wrong value... unsigned long size = end - start + 1; === HERE int ret = 0; +#if defined(CONFIG_X86) + /* on x86, avoid anything 0x100 for it is often used for +* legacy platform devices */ + if (start 0x100) + start = 0x100; === HERE +#endif + if (end start) return -EINVAL; ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [kernel 2.6.34-rc2] cs: IO port probe 0x100-0x3af: excluding 0x378-0x37f
Hi, So I think this is a pcmcia_core problem not _CRS / ACPI. It was reliably detected by io_probe before. I think we got hit by the same issue as at commit 7a96e87d6e58a07235a2bc3eff9b093af4937a72 . Could you test this patch, please? OK. works. pcmcia_socket pcmcia_socket1: cs: IO port probe 0x100-0x3af: excluding 0x170-0x177 0x1f0-0x1f7 0x290-0x297 0x370-0x37f pcmcia_socket pcmcia_socket1: cs: IO port probe 0x3e0-0x4ff: excluding 0x3e0-0x3e7 0x3f0-0x41f 0x4d0-0x4d7 pcmcia_socket pcmcia_socket1: cs: IO port probe 0x820-0x8ff: excluding 0x820-0x87f pcmcia_socket pcmcia_socket1: cs: IO port probe 0xc00-0xcf7: clean. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH] pcmcia: fix up alignf issues
Hi, cf-io.win[0].base returns 0 at smc_configcheck(); So I think this is a pcmcia_request_io problem. Actually, it seems to be an issue with rsrc_nonstatic. Attached is a patch for 2.6.34-rc; OK. works. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [BUG? kernel 2.6.33] Bogus ioport is allocated for pcmcia device
Hi, Bogus ioport is allocated for pcmcia device at kernel 2.6.33. ioport is 0x30 but it should be 0x100. [2.6.33] ata5: PATA max PIO0 cmd 0x30 ctl 0x3e irq 17 There's _no_ change in the PCMCIA subsystem between 2.6.33-rc5 and 2.6.33; drivers/ata/ doesn't seem to have any related changes... This problem happens to the net/pcmcia/smc91c92_cs.c driver too. so this is not a drivers/ata problem. cf-io.win[0].base returns 0 at smc_configcheck(); So I think this is a pcmcia_request_io problem. [dmesg] pcmcia 0.0: pcmcia: registering new device pcmcia0.0 eth0: smc91c92 rev 3: io 0x30, irq 17, hw_addr 00:00:86:xx:xx:xx 4608 byte buffer, auto xcvr static int smc_configcheck(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cf, cistpl_cftable_entry_t *dflt, unsigned int vcc, void *priv_data) { p_dev-io.BasePort1 = cf-io.win[0].base; p_dev-io.IOAddrLines = cf-io.flags CISTPL_IO_LINES_MASK; return pcmcia_request_io(p_dev, p_dev-io); } [lspcmcia] Socket 0 Bridge:[yenta_cardbus] (bus ID: :00:0c.0) Configuration: state: on ready: yes Voltage: 5.0V Vcc: 5.0V Vpp: 0.0V Available IRQs: none Available ioports: 0x0100 - 0x03af 0x03e0 - 0x04ff 0x0820 - 0x08ff 0x0a00 - 0x0aff 0x0c00 - 0x0cf7 Available iomem:0xa000 - 0xa0ff [dump_cis] offset 0x54, tuple 0x1a, link 0x05 01 01 00 03 01 config base 0x0300 mask 0x0001 last_index 0x01 offset 0x5b, tuple 0x1b, link 0x0c c1 01 19 71 55 06 0e 2d 64 30 ff ff cftable_entry 0x01 [default] Vcc Vnom 5V Iavg 100mA Ipeak 120mA Idown 25mA io 0x-0x000f [lines=4] [8bit] [16bit] irq mask 0x [level] offset 0x69, tuple 0x1b, link 0x05 83 01 08 65 ff cftable_entry 0x03 io 0x-0x001f [lines=5] [8bit] [16bit] 1 bytes in subtuples offset 0x70, tuple 0x20, link 0x04 28 01 03 01 manfid 0x0128, 0x0103 offset 0x76, tuple 0x14, link 0x00 no_long_link Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [BUG] [RFC PATCH 07/19] pcmcia: re-work pcmcia_request_irq()
Hi, do you mean this? diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index bb927ed..63d09df 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -452,7 +452,8 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, if (req-Present PRESENT_IOBASE_0) c-Option |= COR_ADDR_DECODE; } - if (req-Attributes CONF_ENABLE_PULSE_IRQ) + if ((req-Attributes CONF_ENABLE_IRQ) + !(req-Attributes CONF_ENABLE_PULSE_IRQ)) c-Option |= COR_LEVEL_REQ; pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)1, 1, c-Option); mdelay(40); OK. works. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[kernel 2.6.34-rc2] cs: IO port probe 0x100-0x3af: excluding 0x378-0x37f
Hi, At kernel 2.6.34-rc2, io_port 0x378-0x37f is not excluded automatically in my system. io_probe is not safe for some device (for example, ATI Radeon?) Is it better not to do io_probe? [kernel 2.6.33] pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3af: excluding 0x378-0x37f pcmcia_socket pcmcia_socket0: cs: IO port probe 0x3e0-0x4ff: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0x820-0x8ff: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcf7: clean. [kernel 2.6.34-rc2] pcmcia_socket pcmcia_socket1: cs: IO port probe 0xa00-0xaff: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3af: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0x3e0-0x4ff: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0x820-0x8ff: clean. pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcf7: clean. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [kernel 2.6.34-rc2] cs: IO port probe 0x100-0x3af: excluding 0x378-0x37f
Hi, Can't see how this is a real PCMCIA issue here... You are right. do_io_probe (in rsrc_nonstatic.c) is not changed between 2.6.33 and 2.6.34-rc2... ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [BUG? kernel 2.6.34-rc1-git8] cs: IO port probe 0x0-0xcf7: clean.
Hi, Some pcmcia device works only with lower ioport ( ioport 0x300 ) and does not work with higher ioport ( ioport 0x400 ). Actually, it is difficult to find unused ioport in this lower area. One solution is to use PNP BIOS to get used ioport. but pre-1995 system does not have PNP BIOS. I'm not sure the recent system have PNP BIOS. Another solution is to use ACPI BIOS. but pre-1998 system does not have ACPI BIOS. ISA slot card is no longer sold in the PC store, but on-board legacy devices still use this lower ioport. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [BUG? kernel 2.6.34-rc1-git8] cs: IO port probe 0x0-0xcf7: clean.
Hi, Actually, ioport 0x0-0xff is used for onboard legacy devices. So it should be excluded? Probably -- and none of the devices listed below seem to actually be PCI devcices... However, I have no idea why there is a PCI Bus :00 here. Oh wait. Is this the PC in which both pd6729 and yenta_socket are installed? sorry, This PC is different with the PC with pd6729 and yenta_socket are installed. Here is the dmesg and lspci -vvv [dmesg] Initializing cgroup subsys cpuset Initializing cgroup subsys cpu Linux version 2.6.34-rc2 (r...@localhost.localdomain) (gcc version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC) ) #1 SMP Sun Mar 21 20:58:10 JST 2010 BIOS-provided physical RAM map: BIOS-e820: - 0009fc00 (usable) BIOS-e820: 0009fc00 - 000a (reserved) BIOS-e820: 000e - 0010 (reserved) BIOS-e820: 0010 - b7b6c000 (usable) BIOS-e820: b7b6c000 - b7bbf000 (reserved) BIOS-e820: b7bbf000 - b7c86000 (usable) BIOS-e820: b7c86000 - b7cbf000 (ACPI NVS) BIOS-e820: b7cbf000 - b7ced000 (usable) BIOS-e820: b7ced000 - b7cff000 (ACPI data) BIOS-e820: b7cff000 - b7d0 (usable) BIOS-e820: b7d0 - c000 (reserved) BIOS-e820: f800 - fc00 (reserved) BIOS-e820: fec0 - fec01000 (reserved) BIOS-e820: fed1 - fed14000 (reserved) BIOS-e820: fed18000 - fed1a000 (reserved) BIOS-e820: fed1c000 - fed2 (reserved) BIOS-e820: fee0 - fee01000 (reserved) BIOS-e820: fff0 - 0001 (reserved) BIOS-e820: 0001 - 00014000 (usable) NX (Execute Disable) protection: active DMI 2.4 present. e820 update range: - 1000 (usable) == (reserved) e820 remove range: 000a - 0010 (usable) last_pfn = 0x14 max_arch_pfn = 0x100 MTRR default type: uncachable MTRR fixed ranges enabled: 0-9 write-back A-C uncachable D-D write-protect E-F uncachable MTRR variable ranges enabled: 0 base 0FFFE mask E write-protect 1 base 0 mask F8000 write-back 2 base 08000 mask FC000 write-back 3 base 0B800 mask FF800 uncachable 4 base 0B7E0 mask FFFE0 uncachable 5 base 0B7D0 mask 0 uncachable 6 base 1 mask FC000 write-back 7 disabled x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106 initial memory mapped : 0 - 00e0 init_memory_mapping: -375fe000 00 - 20 page 4k 20 - 003740 page 2M 003740 - 00375fe000 page 4k kernel direct mapping tables up to 375fe000 @ 7000-f000 RAMDISK: 37ce2000 - 37fef817 Allocated new RAMDISK: 009f5000 - 00d02817 Move RAMDISK from 37ce2000 - 37fef816 to 009f5000 - 00d02816 ACPI: RSDP 000fe020 00024 (v02 TOSINV) ACPI: XSDT b7cfe120 00064 (v01 TOSINV TOSINV00 0001 0113) ACPI: FACP b7cfd000 000F4 (v04 TOSINV TOSINV00 0001 MSFT 0113) ACPI: DSDT b7cf 08FA8 (v01 TOSINV TOSINV00 0001 MSFT 0113) ACPI: FACS b7c93000 00040 ACPI: HPET b7cfc000 00038 (v01 TOSINV TOSINV00 0001 MSFT 0113) ACPI: APIC b7cfb000 0006C (v02 TOSINV TOSINV00 0001 MSFT 0113) ACPI: MCFG b7cfa000 0003C (v01 TOSINV TOSINV00 0001 MSFT 0113) ACPI: ASF! b7cf9000 000A5 (v32 TOSINV TOSINV00 0001 MSFT 0113) ACPI: SLIC b7cef000 00176 (v01 TOSINV TOSINV00 0001 MSFT 0113) ACPI: BOOT b7cee000 00028 (v01 TOSINV TOSINV00 0001 MSFT 0113) ACPI: SSDT b7ced000 00655 (v01 PmRefCpuPm 3000 INTL 20051117) ACPI: Local APIC address 0xfee0 4234MB HIGHMEM available. 885MB LOWMEM available. mapped low ram: 0 - 375fe000 low ram: 0 - 375fe000 Zone PFN ranges: DMA 0x0001 - 0x1000 Normal 0x1000 - 0x000375fe HighMem 0x000375fe - 0x0014 Movable zone start PFN for each node early_node_map[6] active PFN ranges 0: 0x0001 - 0x009f 0: 0x0100 - 0x000b7b6c 0: 0x000b7bbf - 0x000b7c86 0: 0x000b7cbf - 0x000b7ced 0: 0x000b7cff - 0x000b7d00 0: 0x0010 - 0x0014 On node 0 totalpages: 1014784 free_area_init_node: node 0, pgdat c089d580, node_mem_map c1001020 DMA zone: 32 pages used for memmap DMA zone: 0 pages reserved DMA zone: 3966 pages, LIFO batch:0 Normal zone: 1740 pages used for memmap Normal zone: 220978 pages, LIFO batch:31 HighMem zone: 8469 pages used for memmap HighMem zone: 779599 pages, LIFO batch:31 Using APIC driver default ACPI: PM-Timer IO Port: 0x408 ACPI: Local APIC address 0xfee0 ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled) ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled) ACPI: LAPIC (acpi_id[0x03] lapic_id[0x00] disabled) ACPI: LAPIC (acpi_id[0x04] lapic_id[0x00] disabled) ACPI:
[BUG? kernel 2.6.34-rc1-git8] cs: IO port probe 0x0-0xcf7: clean.
Hi, I don't add include port 0x0-0xcf7 in /etc/pcmcia/config.opts. but recent kernel probes this ioport range ... yenta_cardbus :04:06.0: CardBus bridge found [1179:ff66] yenta_cardbus :04:06.0: ISA IRQ mask 0x0ca8, PCI irq 18 yenta_cardbus :04:06.0: Socket status: 3410 yenta_cardbus :04:06.0: pcmcia: parent PCI bridge I/O window: 0x1000 - 0x1fff pcmcia_socket pcmcia_socket0: cs: IO port probe 0x1000-0x1fff: clean. yenta_cardbus :04:06.0: pcmcia: parent PCI bridge Memory window: 0xd200 - 0xd40f pcmcia_socket pcmcia_socket0: cs: memory probe 0xd200-0xd40f: excluding 0xd3ef-0xd40f yenta_cardbus :04:06.0: pcmcia: parent PCI bridge Memory window: 0xd000 - 0xd1ff pcmcia_socket pcmcia_socket0: cs: memory probe 0xd000-0xd1ff: excluding 0xd000-0xd1ff yenta_cardbus :04:06.0: pcmcia: parent PCI bridge I/O window: 0x0 - 0xcf7 pcmcia_socket pcmcia_socket0: cs: IO port probe 0x0-0xcf7: clean. yenta_cardbus :04:06.0: pcmcia: parent PCI bridge I/O window: 0xd00 - 0x pcmcia_socket pcmcia_socket0: cs: IO port probe 0xd00-0x: clean. yenta_cardbus :04:06.0: pcmcia: parent PCI bridge Memory window: 0xa - 0xb pcmcia_socket pcmcia_socket0: cs: memory probe 0x0a-0x0b: excluding 0xa-0xb yenta_cardbus :04:06.0: pcmcia: parent PCI bridge Memory window: 0xc000 - 0xfebf pcmcia_socket pcmcia_socket0: cs: memory probe 0xc000-0xfebf: excluding 0xc000-0xd1ff 0xd400-0xdaff 0xdc00-0xe3ff 0xf800-0xfbff 0xfe80-0xfeff ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH kernel 2.6.34-rc1-git7] pd6729: Coding Style fixes
Signed-off-by: Komuro komurojun-...@nifty.com --- --- linux-2.6.34-rc1/drivers/pcmcia/pd6729.c.orig2 2010-03-14 05:45:04.0 +0900 +++ linux-2.6.34-rc1/drivers/pcmcia/pd6729.c2010-03-19 06:24:16.0 +0900 @@ -14,13 +14,13 @@ #include linux/workqueue.h #include linux/interrupt.h #include linux/device.h +#include linux/io.h #include pcmcia/cs_types.h #include pcmcia/ss.h #include pcmcia/cs.h #include asm/system.h -#include asm/io.h #include pd6729.h #include i82365.h @@ -222,9 +222,9 @@ static irqreturn_t pd6729_interrupt(int ? SS_READY : 0; } - if (events) { + if (events) pcmcia_parse_events(socket[i].socket, events); - } + active |= events; } @@ -256,9 +256,8 @@ static int pd6729_get_status(struct pcmc status = indirect_read(socket, I365_STATUS); *value = 0; - if ((status I365_CS_DETECT) == I365_CS_DETECT) { + if ((status I365_CS_DETECT) == I365_CS_DETECT) *value |= SS_DETECT; - } /* * IO cards have a different meaning of bits 0,1 @@ -308,7 +307,7 @@ static int pd6729_set_socket(struct pcmc socket-card_irq = state-io_irq; reg = 0; - /* The reset bit has inverse logic */ + /* The reset bit has inverse logic */ if (!(state-flags SS_RESET)) reg |= I365_PC_RESET; if (state-flags SS_IOCARD) @@ -380,7 +379,7 @@ static int pd6729_set_socket(struct pcmc indirect_write(socket, I365_POWER, reg); if (irq_mode == 1) { -/* all interrupts are to be done as PCI interrupts */ + /* all interrupts are to be done as PCI interrupts */ data = PD67_EC1_INV_MGMT_IRQ | PD67_EC1_INV_CARD_IRQ; } else data = 0; @@ -391,9 +390,9 @@ static int pd6729_set_socket(struct pcmc /* Enable specific interrupt events */ reg = 0x00; - if (state-csc_mask SS_DETECT) { + if (state-csc_mask SS_DETECT) reg |= I365_CSC_DETECT; - } + if (state-flags SS_IOCARD) { if (state-csc_mask SS_STSCHG) reg |= I365_CSC_STSCHG; @@ -450,9 +449,12 @@ static int pd6729_set_io_map(struct pcmc ioctl = indirect_read(socket, I365_IOCTL) ~I365_IOCTL_MASK(map); - if (io-flags MAP_0WS) ioctl |= I365_IOCTL_0WS(map); - if (io-flags MAP_16BIT) ioctl |= I365_IOCTL_16BIT(map); - if (io-flags MAP_AUTOSZ) ioctl |= I365_IOCTL_IOCS16(map); + if (io-flags MAP_0WS) + ioctl |= I365_IOCTL_0WS(map); + if (io-flags MAP_16BIT) + ioctl |= I365_IOCTL_16BIT(map); + if (io-flags MAP_AUTOSZ) + ioctl |= I365_IOCTL_IOCS16(map); indirect_write(socket, I365_IOCTL, ioctl); @@ -497,7 +499,7 @@ static int pd6729_set_mem_map(struct pcm /* write the stop address */ - i= (mem-res-end 12) 0x0fff; + i = (mem-res-end 12) 0x0fff; switch (to_cycles(mem-speed)) { case 0: break; @@ -563,7 +565,7 @@ static int pd6729_init(struct pcmcia_soc /* the pccard structure and its functions */ static struct pccard_operations pd6729_operations = { - .init = pd6729_init, + .init = pd6729_init, .get_status = pd6729_get_status, .set_socket = pd6729_set_socket, .set_io_map = pd6729_set_io_map, @@ -578,8 +580,13 @@ static irqreturn_t pd6729_test(int irq, static int pd6729_check_irq(int irq) { - if (request_irq(irq, pd6729_test, IRQF_PROBE_SHARED, x, pd6729_test) - != 0) return -1; + int ret; + + ret = request_irq(irq, pd6729_test, IRQF_PROBE_SHARED, x, + pd6729_test); + if (ret) + return -1; + free_irq(irq, pd6729_test); return 0; } @@ -591,7 +598,7 @@ static u_int __devinit pd6729_isa_scan(v if (irq_mode == 1) { printk(KERN_INFO pd6729: PCI card interrupts, - PCI status changes\n); + PCI status changes\n); return 0; } @@ -607,9 +614,10 @@ static u_int __devinit pd6729_isa_scan(v if (mask (1i)) printk(%s%d, ((mask ((1i)-1)) ? , : ), i); - if (mask == 0) printk(none!); - - printk( polling status changes.\n); + if (mask == 0) + printk(none!); + else + printk( polling status changes.\n); return mask; } @@ -624,11 +632,16 @@ static int __devinit pd6729_pci_probe(st socket = kzalloc(sizeof(struct pd6729_socket) * MAX_SOCKETS
[Another BUG? kernel 2.6.34-rc1] cs: warning: no high memory space available!
Hi, At kernel 2.6.34-rc1, pd6729 can not find high memory. At kernel 2.6.33, there is no problem. [kernel 2.6.34-rc1] pcmcia_socket pcmcia_socket1: cs: IO port probe 0x100-0x3af: clean. pcmcia_socket pcmcia_socket1: cs: IO port probe 0x3e0-0x4ff: clean. pcmcia_socket pcmcia_socket1: cs: IO port probe 0x820-0x8ff: clean. pcmcia_socket pcmcia_socket1: cs: IO port probe 0xc00-0xcf7: clean. pcmcia_socket pcmcia_socket1: cs: memory probe 0x0c-0x0f: excluding 0xc-0xc7fff 0xe4000-0xf pcmcia_socket pcmcia_socket1: cs: memory probe 0xa000-0xa0ff: excluding 0xa000-0xa0ff pcmcia_socket pcmcia_socket1: cs: memory probe 0x6000-0x60ff: excluding 0x6000-0x60ff pcmcia_socket pcmcia_socket1: cs: IO port probe 0xa00-0xaff: clean. pcmcia_socket pcmcia_socket1: cs: warning: no high memory space available! [kernel 2.6.33] pcmcia_socket pcmcia_socket1: cs: IO port probe 0x100-0x3af: excluding 0x378-0x37f pcmcia_socket pcmcia_socket1: cs: IO port probe 0x3e0-0x4ff: clean. pcmcia_socket pcmcia_socket1: cs: IO port probe 0x820-0x8ff: clean. pcmcia_socket pcmcia_socket1: cs: IO port probe 0xc00-0xcf7: clean. pcmcia_socket pcmcia_socket1: cs: memory probe 0x0c-0x0f: excluding 0xc-0xc7fff 0xe4000-0xf pcmcia_socket pcmcia_socket1: cs: memory probe 0xa000-0xa0ff: clean. pcmcia_socket pcmcia_socket1: cs: memory probe 0x6000-0x60ff: clean. pcmcia_socket pcmcia_socket1: cs: IO port probe 0xa00-0xaff: clean. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH kernel 2.6.33] pd6729: remove irq_list parameter
pd6729: remove irq_list parameter. it should be set by /etc/pcmcia/config.opts. Signed-off-by: Komuro komurojun-...@nifty.com --- --- linux-2.6.33/drivers/pcmcia/pd6729.c.orig 2010-02-28 08:36:55.0 +0900 +++ linux-2.6.33/drivers/pcmcia/pd6729.c2010-02-28 08:41:55.0 +0900 @@ -48,23 +48,13 @@ MODULE_AUTHOR(Jun Komuro komurojun-mbn * Specifies the interrupt delivery mode. The default (1) is to use PCI * interrupts; a value of 0 selects ISA interrupts. This must be set for * correct operation of PCI card readers. - * - * irq_list=i,j,... - * This list limits the set of interrupts that can be used by PCMCIA - * cards. - * The default list is 3,4,5,7,9,10,11. - * (irq_list parameter is not used, if irq_mode = 1) */ static int irq_mode = 1; /* 0 = ISA interrupt, 1 = PCI interrupt */ -static int irq_list[16]; -static unsigned int irq_list_count = 0; module_param(irq_mode, int, 0444); -module_param_array(irq_list, int, irq_list_count, 0444); MODULE_PARM_DESC(irq_mode, interrupt delivery mode. 0 = ISA, 1 = PCI. default is 1); -MODULE_PARM_DESC(irq_list, interrupts that can be used by PCMCIA cards); static DEFINE_SPINLOCK(port_lock); @@ -605,13 +595,7 @@ static u_int __devinit pd6729_isa_scan(v return 0; } - if (irq_list_count == 0) - mask0 = 0x; - else - for (i = mask0 = 0; i irq_list_count; i++) - mask0 |= (1irq_list[i]); - - mask0 = PD67_MASK; + mask0 = PD67_MASK; /* just find interrupts that aren't in use */ for (i = 0; i 16; i++) ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [RFC v3] PCMCIA locking updates for 2.6.34
Hi, eth0: 3Com 3c589, io 0x300, irq 3, hw_addr 00:00:86:xx:xx:xx 8K FIFO split 5:3 Rx:Tx, auto xcvr Did you modify the hw_addr here, or is it reported wrongly here, compared to sorry, I modified the hw_addr, so the hw_addr is same between 2.6.33-rc8 and the PCMCIA patches. eth8: command 0x5800 did not complete! eth8: command 0x5800 did not complete! eth8: command 0x5800 did not complete! eth8: command 0x5800 did not complete! eth8: command 0x5800 did not complete! Actually, this error happens when the conf-ConfigIndex of the 3com card is not set up properly... Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [RFC v3] PCMCIA locking updates for 2.6.34
Hi, eth8: command 0x5800 did not complete! eth8: command 0x5800 did not complete! eth8: command 0x5800 did not complete! eth8: command 0x5800 did not complete! eth8: command 0x5800 did not complete! Actually, this error happens when the conf-ConfigIndex of the 3com card is not set up properly... but that is statically set to 1 in 3c589_cs.c? I'm a bit confused... I set the ConfigIndex = 7 in 3c589_cs.c. 3CXEM556 works now. -link-conf.ConfigIndex = 1; +link-conf.ConfigIndex = 7; Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[Error] cs: warning: no high memory space available!
Hi, After pccardctl eject and pccardctl insert, I get the message cs: warning: no high memory space available! in the PCMCIA patches(brodo/pcmcia-2.6.git). pcmcia_socket pcmcia_socket0: parse_uevents: events 0002 pcmcia_socket pcmcia_socket0: insert pcmcia_socket pcmcia_socket0: setup pcmcia_socket pcmcia_socket0: reset pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0 pcmcia_socket pcmcia_socket0: insert done pcmcia_socket pcmcia_socket0: send_event(event 4, pri 0, callback 0xf88fbbbc) pcmcia_socket pcmcia_socket0: ds_event(0x04, 0, 0xf6b00040) pcmcia_socket pcmcia_socket0: cs: warning: no high memory space available! ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [RFC v3] PCMCIA locking updates for 2.6.34
Hi, these were, again, very valuable debug hints. Based on those I've upgraded my patches in the git repository. It'd be great if yo could re-run the test once again, ad still with the debug patch applied. (1) it seems the 3c562 multi_function card works now. (2) but another 3com card 3CXEM556 (multi_function + cis override) does not work. This card works fine with kernel 2.6.33-rc8. pcmcia_socket pcmcia_socket0: pccard: card ejected from slot 0 pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0 pcmcia 0.0: pcmcia: registering new device pcmcia0.0 pcmcia 0.0: firmware: requesting cis/3CXEM556.cis pcmcia_socket pcmcia_socket0: Using replacement CIS eth0: 3Com 3c589, io 0x300, irq 3, hw_addr 00:00:86:32:c1:b5 8K FIFO split 5:3 Rx:Tx, auto xcvr pcmcia 0.1: pcmcia: registering new device pcmcia0.1 0.1: ttyS0 at I/O 0x3f8 (irq = 3) is a 16550A udev: renamed network interface eth0 to eth8 eth8: command 0x5800 did not complete! eth8: command 0x5800 did not complete! eth8: command 0x5800 did not complete! eth8: command 0x5800 did not complete! ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [RFC v3] PCMCIA locking updates for 2.6.34
Hi, When the 3com card does not work, the card_id and prod_id becomes the bogus value. The card_id should be 0x0562. the prod_id(2) should be 3C562D/3C563D [Socket 0 Bridge: [yenta_cardbus] (bus ID: :04:06.0) Configuration: state: on ready: yes Voltage: 5.0V Vcc: 5.0V Vpp: 0.0V Socket 0 Device 0: [3c589_cs] (bus ID: 0.0) Configuration: state: on Product Name: 3Com Corporation 3C EtherLink III LAN+Modem PC Card Identification: manf_id: 0x0101 card_id: 0x function: 6 (network) prod_id(1): 3Com Corporation (0xe1c0d2aa) prod_id(2): 3C (0x1bbe751a) prod_id(3): EtherLink III (0xc9a029c2) prod_id(4): LAN+Modem PC Card (0x32d830f4) Socket 0 Device 1: [serial_cs] (bus ID: 0.1) Configuration: state: on Product Name: 3Com Corporation 3C EtherLink III LAN+Modem PC Card Identification: manf_id: 0x0101 card_id: 0x function: 6 (network) prod_id(1): 3Com Corporation (0xe1c0d2aa) prod_id(2): 3C (0x1bbe751a) prod_id(3): EtherLink III (0xc9a029c2) prod_id(4): LAN+Modem PC Card (0x32d830f4) ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [RFC v3] PCMCIA locking updates for 2.6.34
Hi, The exported function should be locked like below? size_t pcmcia_get_tuple(struct pcmcia_device *p_dev, cisdata_t code, unsigned char **buf) { struct pcmcia_loop_get get = { .len = 0, .buf = buf, }; + mutex_lock(s-ops_mutex); *get.buf = NULL; pcmcia_loop_tuple(p_dev, code, pcmcia_do_get_tuple, get); + mutex_unlock(s-ops_mutex); return get.len; } EXPORT_SYMBOL(pcmcia_get_tuple); ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [RFC v3] PCMCIA locking updates for 2.6.34
Hi, The 3c589_cs and serial_cs is not loaded at dmesg below. After re-plug, it works. Strange -- what does lspcmcia -vvv look like before and after re-plug? lspcmcia -vvv is same between before and after re-plug. By the way, the pcmcia-socket-startup is loaded after registering new device in this case. Is it correct? pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0 pcmcia_socket pcmcia_socket0: cs: memory probe 0xd200-0xd3ee: excluding 0xd2f7-0xd315dfff 0xd3ee-0xd40cdfff pcmcia 0.0: pcmcia: registering new device pcmcia0.0 pcmcia 0.1: pcmcia: registering new device pcmcia0.1 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: memory probe 0x0c-0x0f: excluding 0xc-0xc7fff 0xd-0xd3fff 0xe-0xf pcmcia_socket pcmcia_socket0: cs: IO port probe 0xa00-0xaff: clean. Socket 0 Bridge:[yenta_cardbus] (bus ID: :04:06.0) Configuration: state: on ready: yes Voltage: 5.0V Vcc: 5.0V Vpp: 0.0V Available IRQs: 3, 5, 7, 10, 11 Available ioports: 0x0100 - 0x03af 0x03e0 - 0x04cf 0x04d8 - 0x04ff 0x0820 - 0x08ff 0x0a00 - 0x0aff 0x0c00 - 0x0cf7 0x1000 - 0x1fff Available iomem:0x000c8000 - 0x000c 0x000d4000 - 0x000d 0xd200 - 0xd2f6 0xd315e000 - 0xd3ed Socket 0 Device 0: [3c589_cs] (bus ID: 0.0) Configuration: state: on Product Name: 3Com Corporation 3C562D/3C563D EtherLink III LAN+Modem PC Card Identification: manf_id: 0x0101 card_id: 0x0562 function: 6 (network) prod_id(1): 3Com Corporation (0xe1c0d2aa) prod_id(2): 3C562D/3C563D (0xaa0fba64) prod_id(3): EtherLink III (0xc9a029c2) prod_id(4): LAN+Modem PC Card (0x32d830f4) Socket 0 Device 1: [serial_cs] (bus ID: 0.1) Configuration: state: on Product Name: 3Com Corporation 3C562D/3C563D EtherLink III LAN+Modem PC Card Identification: manf_id: 0x0101 card_id: 0x0562 function: 6 (network) prod_id(1): 3Com Corporation (0xe1c0d2aa) prod_id(2): 3C562D/3C563D (0xaa0fba64) prod_id(3): EtherLink III (0xc9a029c2) prod_id(4): LAN+Modem PC Card (0x32d830f4) ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [RFC] PCMCIA locking updates for 2.6.34
Hi, Same result as Wolfram. echo d /proc/sysrq-trigger No output from sysrq-trigger. pcmcia 0.0: pcmcia: registering new device pcmcia0.0 pcmcia 0.1: pcmcia: registering new device pcmcia0.1 INFO: task modprobe:2191 blocked for more than 120 seconds. echo 0 /proc/sys/kernel/hung_task_timeout_secs disables this message. modprobe D 001c 0 2191 2187 0x0080 f45f1dd8 0086 36e648c7 001c f518c2f4 c0922ec0 c091e394 c0922ec0 f518c2f4 c0922ec0 c0922ec0 f45f fffd451a c3a84394 0001 001c f518c060 00d8 f6a1f178 f6a1f170 Call Trace: [c06c880c] __mutex_lock_common+0x109/0x158 [c06644bf] ? alloc_netdev_mq+0x19e/0x1bf [c06c8872] __mutex_lock_slowpath+0x17/0x1a [c06c8961] ? mutex_lock+0x30/0x3e [c06c8961] mutex_lock+0x30/0x3e [f88b8f9d] pcmcia_request_io+0x23/0xc9 [pcmcia] [fb62d879] tc589_probe+0xfb/0x2eb [3c589_cs] [f88b78b3] pcmcia_device_probe+0x121/0x1a9 [pcmcia] [c05d5100] ? device_release_driver+0xd/0x28 [c05d526a] driver_probe_device+0x7e/0xf2 [c05d5326] __driver_attach+0x48/0x64 [c05d4a62] bus_for_each_dev+0x42/0x6c [c05d5134] driver_attach+0x19/0x1b [c05d52de] ? __driver_attach+0x0/0x64 [c05d4e34] bus_add_driver+0x94/0x1c4 [c054f8e4] ? kset_find_obj+0x12/0x4f [c05d557b] driver_register+0x7e/0xe5 [f88b8172] pcmcia_register_driver+0xc2/0xf2 [pcmcia] [f80a7000] ? init_tc589+0x0/0xf [3c589_cs] [f80a700d] init_tc589+0xd/0xf [3c589_cs] [c040305b] do_one_initcall+0x51/0x144 [c0469d6b] sys_init_module+0xac/0x1e0 [c0408058] sysenter_do_call+0x12/0x2d INFO: task modprobe:2192 blocked for more than 120 seconds. echo 0 /proc/sys/kernel/hung_task_timeout_secs disables this message. modprobe D 001c 0 2192 2188 0x0080 f45f3e64 0086 3840b4f3 001c f5378f74 26c0 c091e394 c0922ec0 f5378f74 c0922ec0 c0922ec0 f45f3e5c fffd457c c3a04394 001c f5378ce0 f45f3e94 f712fc9c f712fc94 Call Trace: [c06c8382] schedule_timeout+0x1b/0x95 [f88b7e95] ? pcmcia_devmatch+0x2a3/0x2b4 [pcmcia] [c050c09e] ? __sysfs_add_one+0x2b/0x7a [c050c437] ? sysfs_addrm_finish+0x1b/0x93 [c050c5f4] ? sysfs_add_one+0x18/0xc2 [c06c8c3b] __down_common+0x82/0xb9 [c06c8cd1] __down+0x17/0x19 [c045a16c] down+0x27/0x37 [c05d530d] __driver_attach+0x2f/0x64 [c05d4a62] bus_for_each_dev+0x42/0x6c [c05d5134] driver_attach+0x19/0x1b [c05d52de] ? __driver_attach+0x0/0x64 [c05d4e34] bus_add_driver+0x94/0x1c4 [c054f8f5] ? kset_find_obj+0x23/0x4f [c05d557b] driver_register+0x7e/0xe5 [f88b8172] pcmcia_register_driver+0xc2/0xf2 [pcmcia] [fb66d000] ? init_serial_cs+0x0/0xf [serial_cs] [fb66d00d] init_serial_cs+0xd/0xf [serial_cs] [c040305b] do_one_initcall+0x51/0x144 [c0469d6b] sys_init_module+0xac/0x1e0 [c0408058] sysenter_do_call+0x12/0x2d SysRq : HELP : loglevel(0-9) reBoot Crash terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) thaw-filesystems(J) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount force-fb(V) show-blocked-tasks(W) dump-ftrace-buffer(Z) INFO: task modprobe:2191 blocked for more than 120 seconds. echo 0 /proc/sys/kernel/hung_task_timeout_secs disables this message. modprobe D 001c 0 2191 1 0x0080 f45f1dd8 0086 36e648c7 001c f518c2f4 c0922ec0 c091e394 c0922ec0 f518c2f4 c0922ec0 c0922ec0 f45f fffd451a c3a84394 0001 001c f518c060 00d8 f6a1f178 f6a1f170 Call Trace: [c06c880c] __mutex_lock_common+0x109/0x158 [c06644bf] ? alloc_netdev_mq+0x19e/0x1bf [c06c8872] __mutex_lock_slowpath+0x17/0x1a [c06c8961] ? mutex_lock+0x30/0x3e [c06c8961] mutex_lock+0x30/0x3e [f88b8f9d] pcmcia_request_io+0x23/0xc9 [pcmcia] [fb62d879] tc589_probe+0xfb/0x2eb [3c589_cs] [f88b78b3] pcmcia_device_probe+0x121/0x1a9 [pcmcia] [c05d5100] ? device_release_driver+0xd/0x28 [c05d526a] driver_probe_device+0x7e/0xf2 [c05d5326] __driver_attach+0x48/0x64 [c05d4a62] bus_for_each_dev+0x42/0x6c [c05d5134] driver_attach+0x19/0x1b [c05d52de] ? __driver_attach+0x0/0x64 [c05d4e34] bus_add_driver+0x94/0x1c4 [c054f8e4] ? kset_find_obj+0x12/0x4f [c05d557b] driver_register+0x7e/0xe5 [f88b8172] pcmcia_register_driver+0xc2/0xf2 [pcmcia] [f80a7000] ? init_tc589+0x0/0xf [3c589_cs] [f80a700d] init_tc589+0xd/0xf [3c589_cs] [c040305b] do_one_initcall+0x51/0x144 [c0469d6b] sys_init_module+0xac/0x1e0 [c0408058] sysenter_do_call+0x12/0x2d INFO: task modprobe:2192 blocked for more than 120 seconds. echo 0 /proc/sys/kernel/hung_task_timeout_secs disables this message. modprobe D 001c 0 2192 1 0x0080 f45f3e64 0086 3840b4f3 001c f5378f74 26c0 c091e394 c0922ec0 f5378f74 c0922ec0 c0922ec0 f45f3e5c fffd457c c3a04394 001c f5378ce0 f45f3e94 f712fc9c f712fc94 Call Trace: [c06c8382]
Re: Questions about ioport-assignments
Hi, - Is it just a buggy card if it works at 0x300 but not 0xc300 (or is it maybe a problem with Linux assigning the io area)? - Why is IOAddrLines forced to 16 (and thus alignment to 0x1), but only if BasePort1 is 0? Some pcmcia-card decodes only lower 10bits (0x-0x03FF). Such card does not work on higher ports (0x0400-0x) Quick'n'Dirty patch -- or should we handle this generically, Komuro? Any way to reliably detect these cards? I think your patch is not correct. - Is it just a buggy card if it works at 0x300 but not 0xc300 It seems the card tries to request the ioport 0x300, but alloc_io_space (in pcmcia_resource.c) added 0xc000 accidentally . then ioport becomes 0xc300. That's strange. so I think alloc_io_space should be fixed. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
RE: Questions about ioport-assignments
Hi, - Is it just a buggy card if it works at 0x300 but not 0xc300 (or is it maybe a problem with Linux assigning the io area)? - Why is IOAddrLines forced to 16 (and thus alignment to 0x1), but only if BasePort1 is 0? Some pcmcia-card decodes only lower 10bits (0x-0x03FF). Such card does not work on higher ports (0x0400-0x) So your card is not a buggy card. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH V2] pcmcia/yenta: add module parameter for O2 speedups
Hi, (1) The default setting of O2_6933 should be on? (2) How about the name enable_prefetch instead of o2_speedup? O2-bridges can do read prefetch and write burst. However, for some combinatio ns of older bridges and cards, this causes problems, so it is disabled for those bridges. Now, as some users know their setup works with the speedups enabled, a new parameter is introduced to the driver. Now, a user can specifically enabl e or disable these features, while the default is what we have today: detect th e bridge and decide accordingly. Fixes Bugzilla entry 15014. Simplify and unify the printouts, fix a whitespace issue while we are here. Signed-off-by: Wolfram Sang w.s...@pengutronix.de Tested-by: frod...@gmail.com Cc: Dominik Brodowski li...@dominikbrodowski.net --- 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
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
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: [c0603269] 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:[c0603269] 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: [c0603353] ? pccard_get_tuple_data+0x62/0x70 [c0604484] ? pccard_show_cis+0x193/0x273 [c05043e8] ? read+0xf6/0x163 [c06042f1] ? pccard_show_cis+0x0/0x273 [c05042f2] ? read+0x0/0x163 [c04c72e9] ? vfs_read+0x92/0xf1 [c04c7404] ? sys_read+0x4c/0x70 [c0407058] ? 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: [c0603269] 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: [ANOTHER BUG? kernel 2.6.32] 3com 3c562 card can't access CIS
Hi, This can be (and probably is) totally unrelated, but e.g. in Fedora 10 somewhere in their 2.6.27.xx kernel series updates, my USB 3G modem stopped to work if it was plugged to USB port at the boot time. After booting, doing unplug-replug it started to work normally. I just wonder if there is something wrong in the kernel hotplug system or something. Yes. Actually, if I connect the USB CDROM and boot linux, the USB CDROM is not detected and I need to replug it. So I think at least USB device support of udev has the bug. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: [ANOTHER BUG? kernel 2.6.32] 3com 3c562 card can't access CIS
This can be (and probably is) totally unrelated, but e.g. in Fedora 10 somewhere in their 2.6.27.xx kernel series updates, my USB 3G modem stopped to work if it was plugged to USB port at the boot time. After booting, doing unplug-replug it started to work normally. I just wonder if there is something wrong in the kernel hotplug system or something. sorry, I tried the Fedore11 + kernel-2.6.32 again. My USB CDROM is detected properly. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [ANOTHER BUG? kernel 2.6.32] 3com 3c562 card can't access CIS
Hi, what's the difference between lspcmcia -vvv when the problem exists, and when the problem does not appear? Can you read out the CIS via sysfs even when the problem exists, and is it the same as when the problem does not appear? The lspcmcia -vvv is same between the problem appear and problem does not appear. Actually, this problem appear when I connect the 3com card and boot linux. Even if the problem appear , after replugging the card, it works well. I can read the CIS from /sys/class/pcmcia_socket/pcmcia_socket0/cis. Socket 0 Bridge:[yenta_cardbus] (bus ID: :04:06.0) Configuration: state: on ready: yes Voltage: 5.0V Vcc: 5.0V Vpp: 0.0V Available IRQs: 3, 5, 7, 10, 11 Available ioports: 0x0100 - 0x03af 0x03e0 - 0x04cf 0x04d8 - 0x04ff 0x0820 - 0x08ff 0x0a00 - 0x0aff 0x0c00 - 0x0cf7 0x1000 - 0x1fff Available iomem:0x000c - 0x000f 0xd200 - 0xd2e6 0xd308 - 0xd3ee Socket 0 Device 0: [3c589_cs] (bus ID: 0.0) Configuration: state: on Product Name: 3Com Corporation 3C562D/3C563D EtherLink III LAN+Modem PC Car d Identification: manf_id: 0x0101 card_id: 0x0562 function: 6 (network) prod_id(1): 3Com Corporation (0xe1c0d2aa) prod_id(2): 3C562D/3C563D (0xaa0fba64) prod_id(3): EtherLink III (0xc9a029c2) prod_id(4): LAN+Modem PC Card (0x32d830f4) Socket 0 Device 1: [serial_cs] (bus ID: 0.1) Configuration: state: on Product Name: 3Com Corporation 3C562D/3C563D EtherLink III LAN+Modem PC Car d Identification: manf_id: 0x0101 card_id: 0x0562 function: 6 (network) prod_id(1): 3Com Corporation (0xe1c0d2aa) prod_id(2): 3C562D/3C563D (0xaa0fba64) prod_id(3): EtherLink III (0xc9a029c2) prod_id(4): LAN+Modem PC Card (0x32d830f4) ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH 1/2] pcmcia: remove unused IRQ_FIRST_SHARED
Hi, In drivers/net/pcmcia/smc91c92_cs.c, one IRQ_FIRST_SHARED is not removed yet. (1) static int osi_config(struct pcmcia_device *link) { struct net_device *dev = link-priv; static const unsigned int com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; int i, j; link-conf.Attributes |= CONF_ENABLE_SPKR; link-conf.Status = CCSR_AUDIO_ENA; link-irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;== HERE (2) static int mhz_mfc_config(struct pcmcia_device *link) { struct net_device *dev = link-priv; struct smc_private *smc = netdev_priv(dev); win_req_t req; memreq_t mem; int i; link-conf.Attributes |= CONF_ENABLE_SPKR; link-conf.Status = CCSR_AUDIO_ENA; -link-irq.Attributes = -IRQ_TYPE_DYNAMIC_SHARING; == It should be one line? +link-irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; ___ 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 li...@dominikbrodowski.net 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 torva...@linux-foundation.org CC: Yinghai Lu yhlu.ker...@gmail.com CC: Bjorn Helgaas bjorn.helg...@hp.com CC: Jesse Barnes jbar...@virtuousgeek.org Signed-off-by: Dominik Brodowski li...@dominikbrodowski.net 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 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: [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 konishi.ryus...@lab.ntt.co.jp 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 konishi.ryus...@lab.ntt.co.jp 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: 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 torva...@linux-foundation.org Fri, 11 Dec 2009 20:18:16 + (12:18 -0800) committer Linus Torvalds torva...@linux-foundation.org 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, 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: Re: [PATCH 13/13] pcmcia: rework the irq_req_t typedef
Hi, IRQ_TYPE_EXCLUSIVE below is unnecessary. --- a/drivers/isdn/hardware/avm/avm_cs.c +++ b/drivers/isdn/hardware/avm/avm_cs.c /* Interrupt setup */ p_dev-irq.Attributes = IRQ_TYPE_EXCLUSIVE; - unnecessary -p_dev-irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; +p_dev-irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; --- a/drivers/isdn/hisax/avma1_cs.c +++ b/drivers/isdn/hisax/avma1_cs.c p_dev-irq.Attributes = IRQ_TYPE_EXCLUSIVE; unnecessary -p_dev-irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; +p_dev-irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [QUESTION] pcmciautils : Is rules-modprobe necessary?
Hi, Even if I remove the rules-modprobe below from /etc/udev/rules.d/60-pcmcia.rules, pcmcia card driver is loaded properly (for example, pcnet_cs) Is rules-modprobe necessary? # modprobe $env{MODALIAS} loads all possibly appropriate modules #SUBSYSTEM==pcmcia, ENV{MODALIAS}==?*, \ #RUN+=/sbin/modprobe $env{MODALIAS} Well, it can be handled generically for all subsystems (e.g. it seems to be handled by /lib/udev/rules.d/80-drivers.rules on my Ubuntu installation). However, I'm not sure whether this is the default on all udev installations. You are right. Thanks, Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: ioports 0x100-0x3af and iomem 0xd000-0xdffff, 0xa0000000-0xa0ffffff -- safe to use on x86 for pcmcia?
Hi, c-f is option ROM and BIOS land. Maybe every BIOS out there is being a good boy/girl and actually adds entries to e820 or similar but I would kindof like to stay away from the region anyway. 0xa000 is 2.5GB, so it's doomed on systems with =2.5GB RAM. :( //Peter (1) The i82365(ISA-pcmcia controller) and some older card-bus controller need the c000-f area to access the CIS instead of high memory area (1MB above). (2) Most of the PC that need the PCMCIA card is not so new. and have less than 2.5GB. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[QUESTION] pcmciautils : Is rules-modprobe necessary?
Hi, Even if I remove the rules-modprobe below from /etc/udev/rules.d/60-pcmcia.rules, pcmcia card driver is loaded properly (for example, pcnet_cs) Is rules-modprobe necessary? # modprobe $env{MODALIAS} loads all possibly appropriate modules #SUBSYSTEM==pcmcia, ENV{MODALIAS}==?*, \ #RUN+=/sbin/modprobe $env{MODALIAS} Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH RFC] pcmcia: load include_io, include_mem from /etc/modprobe.d/pcmcia.conf
Hi, Hmmm... we can't get rid of userspace in all cases, can't we? Yes.it is difficult to get rid of it. but, for example, Fedora rescue-mode does not run the pcmcia-socket-startup. so I think it is necessary to allocate minimum io/mem resources inside the kernel. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [PATCH RFC] pcmcia: load include_io, include_mem from /etc/modprobe.d/pcmcia.conf
Hi, load include_io, include_mem from /etc/modprobe.d/pcmcia.conf instead of running pcmcia-socket-startup. (integration of pcmcia-socket-startup to the kernel) Hmmm... we can't get rid of userspace in all cases, can't we? if /etc/modprobe.d/pcmcia.conf does not exist, rsrc_nonstatic allocates minimum io/mem resource. Could you split this up into two different parts? One for the module parameter, one for the default allocation. The latter one would need the ACK of the x86 maintainer(s), for I'm not sure that it is safe to allocate this area unconditionally. (Well, of course we do additional checks, but anyways...) I will prepare updated patch by next weekend. Actually, allocated io/mem by rsrc_nostatic is no relationship with other device(ISA, PCI). So I think it does not need the ACK of the x86 maintainer. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [PATCH 16/16] pcmcia: use dev_dbg and dev_print in pd6729.c
Hi, There are still 3(three) printk in pd6729.c. static u_int __devinit pd6729_isa_scan(void) { u_int mask0, mask = 0; int i; if (irq_mode == 1) { printk(KERN_INFO pd6729: PCI card interrupts, PCI status changes\n); return 0; } ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: [PATCH 16/16] pcmcia: use dev_dbg and dev_print in pd6729.c
Hi, There are still 3(three) printk in pd6729.c. static u_int __devinit pd6729_isa_scan(void) { u_int mask0, mask = 0; int i; if (irq_mode == 1) { printk(KERN_INFO pd6729: PCI card interrupts, PCI status changes\n); return 0; } Well, we don't have a struct device to use here, don't we? Ah, you are right. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: pcmciamtd -- what's broken, who needs it?
Hi, staging directory is not the place for broken driver, is it? Hey, it seems that just as we were preparing to move pcmciamtd to staging, an user who still tries to use it has appeared: ATTR{modalias}==pcmcia:mcf00fn00pfn00paEBF91155pb805360CApc000 0pd ? ? ATTR{prod_id2}== ?2MB SRAM CARD ? ? ATTR{prod_id1}==PRETEC ? ? ATTR{pm_state}==on ? ? ATTR{function}==0x00 So, what is actually BROKEN with pcmciamtd.c ? Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: Re: [PATCH] pcmcia: cs.c : load pcmcia module automatically.
Hey, yes, but why? Also, wouldn't request_module_nowait() suffice? What about this? OK. Thanks, Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: pcmciamtd -- what's broken, who needs it?
Hi, At least, we need to add one line below to pcmciamtd.c . PCMCIA_DEVICE_PROD_ID12(PRETEC, 2MB SRAM CARD, 0xebf91155, 0x805360ca ), Hey, it seems that just as we were preparing to move pcmciamtd to staging, an user who still tries to use it has appeared: ATTR{modalias}==pcmcia:mcf00fn00pfn00paEBF91155pb805360CApc000 0pd ? ? ATTR{prod_id2}== ?2MB SRAM CARD ? ? ATTR{prod_id1}==PRETEC ? ? ATTR{pm_state}==on ? ? ATTR{function}==0x00 So, what is actually BROKEN with pcmciamtd.c ? Best, Dominik ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH RFC] pcmcia: load include_io, include_mem from /etc/modprobe.d/pcmcia.conf
load include_io, include_mem from /etc/modprobe.d/pcmcia.conf instead of running pcmcia-socket-startup. (integration of pcmcia-socket-startup to the kernel) if /etc/modprobe.d/pcmcia.conf does not exist, rsrc_nonstatic allocates minimum io/mem resource. exclude_io, exclude_mem, include_irq, exclude_irq are not yet implemented. Here is example of pcmcia.conf options rsrc_nonstatic include_io_list=0x100,0x3af,0x3e0,0x4ff,0x800,0x820,0xc00,0xcf7,0xa00,0xaff options rsrc_nonstatic include_mem_list=0xc,0xf,0xa000,0xa0ff,0x6000,0x60ff --- linux-2.6.32-rc5-git3/drivers/pcmcia/rsrc_nonstatic.c.orig 2009-11-01 20:51:39.0 +0900 +++ linux-2.6.32-rc5-git3/drivers/pcmcia/rsrc_nonstatic.c 2009-11-08 11:00:14.0 +0900 @@ -47,6 +47,13 @@ INT_MODULE_PARM(probe_io,1); /* IO por INT_MODULE_PARM(mem_limit, 0x1); #endif +static int include_io_list[16]; +static unsigned int include_io_count = 0; +module_param_array(include_io_list, int, include_io_count, 0444); +static int include_mem_list[16]; +static unsigned int include_mem_count = 0; +module_param_array(include_mem_list, int, include_mem_count, 0444); + /* for io_db and mem_db */ struct resource_map { u_long base, num; @@ -779,8 +786,49 @@ static int nonstatic_autoadd_resources(s struct resource *res; int i, done = 0; - if (!s-cb_dev || !s-cb_dev-bus) - return -ENODEV; + if (include_io_count) { + for (i = 0; i include_io_count; i=i+2) { + if (!adjust_io(s, ADD_MANAGED_RESOURCE, + include_io_list[i], include_io_list[i+1])) { + done |= IORESOURCE_IO; + } + } + } +#if defined(CONFIG_X86) + else { + /* allocate minimum io resource */ + if (!adjust_io(s, ADD_MANAGED_RESOURCE, 0x100, 0x03af)) { + done |= IORESOURCE_IO; + } + } +#endif + + if (include_mem_count) { + for (i = 0; i include_mem_count; i=i+2) { + if (!adjust_memory(s, ADD_MANAGED_RESOURCE, + include_mem_list[i], include_mem_list[i+1])) { + done |= IORESOURCE_MEM; + } + } + } + +#if defined(CONFIG_X86) + else { + /* allocate minimum memory resource */ + if (!adjust_memory(s, ADD_MANAGED_RESOURCE, + 0xa000, 0xa0ff)) { + done |= IORESOURCE_MEM; + } + } +#endif + + if (!s-cb_dev || !s-cb_dev-bus) { + if (done == (IORESOURCE_MEM | IORESOURCE_IO)) { + s-resource_setup_done = 1; + return 0; + } else + return -ENODEV; + } #if defined(CONFIG_X86) /* If this is the root bus, the risk of hitting @@ -789,8 +837,13 @@ static int nonstatic_autoadd_resources(s * resources is too big. Therefore, don't do auto-adding * of resources at the moment. */ - if (s-cb_dev-bus-number == 0) - return -EINVAL; + if (s-cb_dev-bus-number == 0) { + if (done == (IORESOURCE_MEM | IORESOURCE_IO)) { + s-resource_setup_done = 1; + return 0; + } else + return -EINVAL; + } #endif for (i=0; i PCI_BUS_NUM_RESOURCES; i++) { ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
Hi, Also, remove all usages of the CS_CHECK macro and replace them with proper Linux style calling and return value checking. The extra error reporting m ay be dropped, as the PCMCIA core already complains about any (non-driver-aut hor) errors. If the extra error reporting is dropped and debug option is not enabled, the driver is unloaded without error message. So it should be ret = pcmcia_request_io(link, link-io); if (ret) { dev_err(... pcmcia_request_io failed\n); return ret; } Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: Re: [PATCH] pcmcia: cs.c : load pcmcia module automatically.
Hi, This patch integrates some of the pcmciautils feature into the kernel. yes, but why? Also, wouldn't request_module_nowait() suffice? (1) Because the pcmcia is kernel module, so I think it should be loaded by kernel, if kernel can do it. (2) Even if distribution developer forgets to install the pcmciautils, the pcmcia is loaded with this patch. (especially embedded systems) (3) I think request_module_nowait is better. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH] pcmcia: cs.c : load pcmcia module automatically.
load pcmcia module for 16-bit PCMCIA cards without help of userland script. Signed-off-by: Komuro komurojun-...@nifty.com --- --- linux-2.6.32-rc5-git3/drivers/pcmcia/cs.c.orig 2009-11-01 11:50:57.0 +0900 +++ linux-2.6.32-rc5-git3/drivers/pcmcia/cs.c 2009-11-01 11:47:53.0 +0900 @@ -239,6 +239,9 @@ int pcmcia_register_socket(struct pcmcia goto err; } + /* loading pcmcia module for 16-bit PCMCIA cards */ + request_module(pcmcia); + tsk = kthread_run(pccardd, socket, pccardd); if (IS_ERR(tsk)) { ret = PTR_ERR(tsk); ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH 6/9] pcmcia: convert net pcmcia drivers to use new CIS helpers
Hi, Please don't remove the line below in 3c589_cs.c phys_addr = (__be16 *)dev-dev_addr; +++ b/drivers/net/pcmcia/3c589_cs.c @@ -256,22 +256,15 @@ static int tc589_config(struct pcmcia_device *link) { struct net_device *dev = link-priv; struct el3_private *lp = netdev_priv(dev); -tuple_t tuple; -__le16 buf[32]; -__be16 *phys_addr; +__be16 *phys_addr = NULL; int last_fn, last_ret, i, j, multi = 0, fifo; unsigned int ioaddr; char *ram_split[] = {5:3, 3:1, 1:1, 3:5}; +u8 *buf; +size_t len; DEBUG(0, 3c589_config(0x%p)\n, link); -phys_addr = (__be16 *)dev-dev_addr; Here! -tuple.Attributes = 0; -tuple.TupleData = (cisdata_t *)buf; -tuple.TupleDataMax = sizeof(buf); -tuple.TupleOffset = 0; -tuple.Attributes = TUPLE_RETURN_COMMON; Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH 5/9] pcmcia: add new CIS access helpers
Hi, I think ETH_ALEN + 3 is not necessary. The network card with ETH_ALEN + 4 may exist. if (tuple-TupleData[0] != CISTPL_FUNCE_LAN_NODE_ID) return -EINVAL; - if ((tuple-TupleDataLen ETH_ALEN + 2) || - (tuple-TupleDataLen ETH_ALEN + 3)) { + if (tuple-TupleDataLen ETH_ALEN + 2) { dev_warn(p_dev-dev, Invalid CIS tuple length for LAN_NODE_ID\n); return -EINVAL; } Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH 16/16] pcmcia: use dev_dbg and dev_print in pd6729.c
Hi, minir fixes. add \n to some dev_dbg. pd6729_set_io_map /* Check error conditions */ if (map 1) { - dprintk(pd6729_set_io_map with invalid map); + dev_dbg(sock-dev, pd6729_set_io_map with invalid map); return -EINVAL; } if (map 1) { - dev_dbg(sock-dev, pd6729_set_io_map with invalid map); + dev_dbg(sock-dev, pd6729_set_io_map with invalid map\n); return -EINVAL; } pd6729_set_mem_map if (map 4) { - printk(pd6729_set_mem_map: invalid map); + printk(pd6729_set_mem_map: invalid map\n); return -EINVAL; } if ((mem-res-start mem-res-end) || (mem-speed 1000)) { - printk(pd6729_set_mem_map: invalid address / speed); + printk(pd6729_set_mem_map: invalid address / speed\n); return -EINVAL; } Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
RE: [PATCH 5/9] pcmcia: add new CIS access helpers
Hi, The pcmcia_do_get_mac has a bug, tuple-TupleDataLen should be ETH_ALEN + 3; static int pcmcia_do_get_mac(struct pcmcia_device *p_dev, tuple_t *tuple, void *priv) { struct net_device *dev = priv; int i; if (tuple-TupleData[0] != CISTPL_FUNCE_LAN_NODE_ID) return -EINVAL; - if (tuple-TupleDataLen != ETH_ALEN + 2) + if (tuple-TupleDataLen != ETH_ALEN + 3) return -EINVAL; if (tuple-TupleData[1] != ETH_ALEN) return -EINVAL; for (i = 0; i 6; i++) dev-dev_addr[i] = tuple-TupleData[i+2]; return 0; }; Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH] pcmcia: does not load the pd6729 driver, if io_base is 0
The CL-PD6729 chip in some docking station is not initialized properly under Linux. in that case, does not load the pd6729 driver. Signed-off-by: Komuro komurojun-...@nifty.com --- --- linux-2.6.31/drivers/pcmcia/pd6729.c.orig 2009-09-12 11:14:37.0 +0900 +++ linux-2.6.31/drivers/pcmcia/pd6729.c2009-09-12 11:40:01.0 +0900 @@ -641,6 +641,12 @@ if ((ret = pci_enable_device(dev))) goto err_out_free_mem; + if ((unsigned long long)pci_resource_start(dev, 0) == 0) { + printk(KERN_INFO pd6729: failed to load the driver. +since the io_base is 0.\n); + goto err_out_free_mem; + } + printk(KERN_INFO pd6729: Cirrus PD6729 PCI to PCMCIA Bridge at 0x%llx on irq %d\n, (unsigned long long)pci_resource_start(dev, 0), dev-irq); ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [PATCH 1/9] serial_cs: use pcmcia_loop_config() and pre-determined values
Hi, On Mon, Oct 19, 2009 at 09:06:57PM +0900, Komuro wrote: Please don't remove the code below. This code loades the 2nd ConfigBase of the multi-function card. isn't this properly handled by the patch pcmcia: pccard_read tuple and TUPLE_RETURN_COMMON cleanup OK. works. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH 1/9] serial_cs: use pcmcia_loop_config() and pre-determined values
Hi, Please don't remove the code below. This code loades the 2nd ConfigBase of the multi-function card. static int serial_config(struct pcmcia_device * link) { struct serial_info *info = link-priv; - struct serial_cfg_mem *cfg_mem; - tuple_t *tuple; - u_char *buf; - cisparse_t *parse; - cistpl_cftable_entry_t *cf; - int i, last_ret, last_fn; + int i; DEBUG(0, serial_config(0x%p)\n, link); - cfg_mem = kmalloc(sizeof(struct serial_cfg_mem), GFP_KERNEL); - if (!cfg_mem) - goto failed; - - tuple = cfg_mem-tuple; - parse = cfg_mem-parse; - cf = parse-cftable_entry; - buf = cfg_mem-buf; - - tuple-TupleData = (cisdata_t *) buf; - tuple-TupleOffset = 0; - tuple-TupleDataMax = 255; - tuple-Attributes = 0; - - /* Get configuration register information */ - tuple-DesiredTuple = CISTPL_CONFIG; - last_ret = first_tuple(link, tuple, parse); - if (last_ret != 0) { - last_fn = ParseTuple; - goto cs_failed; - } - link-conf.ConfigBase = parse-config.base; - link-conf.Present = parse-config.rmask[0]; - ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: possible bug in pd6729
Hi, So I am now compileing a 2.6.29 kernel. The only problem is I cannot apply the patch (rreproduced below). I cut it out of the email message and pasted it into a file named pd6729.patch. I tried to apply the patch like this: hutson:/usr/src/linux# patch -p1 /tmp/pd6729.patch patching file drivers/pcmcia/pd6729.c Hunk #1 FAILED at 641. 1 out of 1 hunk FAILED -- saving rejects to file drivers/pcmcia/pd6729.c.rej I am thinking this means applying the patch did not work. Instead of apply the patch, could you cut and pasted it to the pd6729.c directly, and compile the kernel again? Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: Re: [BUG pcmcia] multi-function card can't get the correct ConfigBase
Hi, On Sun, Nov 30, 2008 at 05:54:02PM +0900, Komuro wrote: Multi-function card can't get the correct ConfigBase. unfortunately, pccard_read_tuple always get the ConfigBase for 1st device. Is this still an issue? Currently, this problem is fixed for my multi-function card. Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: aironet 350
Hi, Please post the output of pccardctl ident. Best Regards Komuro I am using a 2.6.27.7 kernel and the card is not initialize by pccard. Actually it is not even in the output of lspci !! but the kernel (pccard) shows at least that the card was inserted if the slot. The card was working fine with kernel 2.4.31 and the old card manager Is it a know problem ? Is there any solution to this issue ? PC is a dell latitude csx (pretty old) Alfredo ___ 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: possible bug in pd6729
Hi, [ 50.688869] pd6729: Cirrus PD6729 PCI to PCMCIA Bridge at 0x0 on irq 0 [ 50.693063] pd6729: ISA irqs = 3,5,7,9,10,11 polling status changes. The io_base of pd6729 in your docking station is 0, so this is PCI setup problem. Please try the following patch. Best Regards Komuro --- a/drivers/pcmcia/pd6729.c.orig 2009-09-12 11:14:37.0 +0900 +++ b/drivers/pcmcia/pd6729.c2009-09-12 11:40:01.0 +0900 @@ -641,6 +641,12 @@ if ((ret = pci_enable_device(dev))) goto err_out_free_mem; + if ((unsigned long long)pci_resource_start(dev, 0) == 0) { + printk(KERN_INFO pd6729: failed to load the driver. +since the io_base is 0.\n); + goto err_out_free_mem; + } + printk(KERN_INFO pd6729: Cirrus PD6729 PCI to PCMCIA Bridge at 0x%llx on irq %d\n, (unsigned long long)pci_resource_start(dev, 0), dev-irq); ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: deprecated ioctl on debian etch
Hi, pcmcia: Detected deprecated PCMCIA ioctl usage from process: discover This means the the process discover uses the deprecated PCMCIA ioctl. so you should fix the discover. I have an old Dell Inspiron 400 laptop (from 2001) running Debian etch, which I would like to upgrade to lenny. I have the current (for etch) debian packages for pcmciautils and udev, but I still get the following message in /var/log/dmesg: pcmcia: Detected deprecated PCMCIA ioctl usage from process: discover. [snip] I am confused, since the referenced website seems to say that an upgrade to pcmciautils is the solution -- but I have that. Also, can anyone tell me whether support will indeed be withdrawn from the kernel, and if so when? In particular, will an upgrade to debian lenny break something for me? Regards, Marge ___ 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: [PATCH] aha152x_cs: Fix regression that keeps driver from using shared interrupts
No response from Dominik. It should be sent to linux-scsi? - Original Message - Date: Sun, 30 Nov 2008 12:13:09 -0600 From: Larry Finger larry.fin...@lwfinger.net To: Dominik Brodowski li...@dominikbrodowski.net Subject: [PATCH] aha152x_cs: Fix regression that keeps driver from using shar ed interrupts Cc: linux-pcmcia@lists.infradead.org At some point since 2.6.22, the aha152x_cs driver stopped working and started erring on load with the following messages: kernel: pcmcia: request for exclusive IRQ could not be fulfilled. kernel: pcmcia: the driver needs updating to supported shared IRQ lines. With the following change, the driver works with shared IRQs. Signed-off-by: Larry Finger larry.fin...@lwfinger.net Cc: Stable sta...@kernel.org [2.6.27], [2.6.26] --- Index: wireless-testing/drivers/scsi/pcmcia/aha152x_stub.c === --- wireless-testing.orig/drivers/scsi/pcmcia/aha152x_stub.c +++ wireless-testing/drivers/scsi/pcmcia/aha152x_stub.c @@ -114,7 +114,7 @@ static int aha152x_probe(struct pcmcia_d link-io.NumPorts1 = 0x20; link-io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; link-io.IOAddrLines = 10; -link-irq.Attributes = IRQ_TYPE_EXCLUSIVE; +link-irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; link-irq.IRQInfo1 = IRQ_LEVEL_ID; link-conf.Attributes = CONF_ENABLE_IRQ; link-conf.IntType = INT_MEMORY_AND_IO; ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[BUG pcmcia] multi-function card can't get the correct ConfigBase
Dear Dominik Multi-function card can't get the correct ConfigBase. unfortunately, pccard_read_tuple always get the ConfigBase for 1st device. The reason of this problem is pccard_read_tuple set tuple.Attributes = TUPLE_RETURN_COMMON. Any idea to fix this? ds.c /* set up some more device information */ ret = pccard_read_tuple(p_dev-socket, p_dev-func, CISTPL_CONFIG, cis_config); if (!ret) { p_dev-conf.ConfigBase = cis_config.base; p_dev-conf.Present = cis_config.rmask[0]; } else { dev_printk(KERN_INFO, dev, pcmcia: could not parse base and rmask0 of CIS\n); p_dev-conf.ConfigBase = 0; p_dev-conf.Present = 0; } ds.c cistple.c: pccard_read_tuple int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function, cisdata_t code, void *parse) { tuple_t tuple; cisdata_t *buf; int ret; buf = kmalloc(256, GFP_KERNEL); if (buf == NULL) { dev_printk(KERN_WARNING, s-dev, no memory to read tuple\n); return -ENOMEM; } tuple.DesiredTuple = code; tuple.Attributes = TUPLE_RETURN_COMMON; Here! ret = pccard_get_first_tuple(s, function, tuple); cistple.c cistple.c: get_first_tuple if (!(s-state SOCKET_CARDBUS) (s-functions 1) !(tuple-Attributes TUPLE_RETURN_COMMON)) {Here! cisdata_t req = tuple-DesiredTuple; tuple-DesiredTuple = CISTPL_LONGLINK_MFC; if (pccard_get_next_tuple(s, function, tuple) == 0) { tuple-DesiredTuple = CISTPL_LINKTARGET; if (pccard_get_next_tuple(s, function, tuple) != 0) return -ENOSPC; } else tuple-CISOffset = tuple-TupleLink = 0; tuple-DesiredTuple = req; } cistple.c Best Regards Komuro ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: axnet_cs / pcnet_cs: moving PCMCIA_DEVICE_PROD_ID for Netgear FA411
On Fri, 21 Nov 2008 00:46:57 +0100 Cord Walter [EMAIL PROTECTED] wrote: after noticing that my Netgear FA411 (PCMCIA-NIC) [1] stopped working with the release of the 2.6.25 kernel (sidux-version), You are right. My patch has a bug. The patch below fixes this problem. By the way, (1) Does your FA411 work properly with the pcnet_cs driver before? (2) Please post the full-dmesg (axnet_cs). --- linux-2.6.28-rc6/drivers/net/pcmcia/pcnet_cs.c.orig 2008-11-21 21:39:08.0 +0900 +++ linux-2.6.28-rc6/drivers/net/pcmcia/pcnet_cs.c 2008-11-21 21:39:24.0 +0900 @@ -587,7 +587,7 @@ static int pcnet_config(struct pcmcia_de } if ((link-conf.ConfigBase == 0x03c0) -(link-manf_id == 0x149) (link-card_id = 0xc1ab)) { +(link-manf_id == 0x149) (link-card_id == 0xc1ab)) { printk(KERN_INFO pcnet_cs: this is an AX88190 card!\n); printk(KERN_INFO pcnet_cs: use axnet_cs instead.\n); goto failed; Best Regards Komuro Hi, after noticing that my Netgear FA411 (PCMCIA-NIC) [1] stopped working with the release of the 2.6.25 kernel (sidux-version), I checked the respective driver sources and noticed that the pcnet_cs driver bailed out with use axnet_cs instead for the Netgear FA411, but axnet_cs doesn't claim this ID. I compiled a kernel with the PCMCIA-ID for the netgear card moved to axnet_cs from pcnet_cs which worked. I then contacted sidux-kernel maintainer Stefan Lippers-Hollmann who turned the info into this patch and integrated it into the kernel: http://svn.berlios.de/svnroot/repos/fullstory/linux-sidux-2.6/trunk/debian/patches/features/2.6.27.4_PCMCIA_move-PCMCIA-ID-for-Netgear-FA411-from-pcnet_cs-to-axnet_cs.patch This works for me and AFAIK there were no reports of any breakage for other devices on sidux-support. This looks like a trivial patch, but since I have very limited experience with kernel modifications I might be woefully wrong there. But if there are no side effects of this patch, is it possible to get it into the official kernel? I can provide more detailed information on the affected hardware if necessary. -cord [1] Socket 1 Device 0: [axnet_cs] (bus ID: 1.0) Configuration: state: on Product Name: NETGEAR FA411 Fast Ethernet Identification: manf_id: 0x0149 card_id: 0x0411 function: 6 (network) prod_id(1): NETGEAR (0x9aa79dc3) prod_id(2): FA411 (0x40fad875) prod_id(3): Fast Ethernet (0xb4be14e3) prod_id(4): --- (---) -- Cord Walter email: [EMAIL PROTECTED] Weil es niemanden etwas angeht, dass ich nichts zu verbergen habe: http://www.gnupg.org/ http://www.truecrypt.org/ ...und überhaupt: http://www.FreiheitstattAngst.de -- Komuro [EMAIL PROTECTED] ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [PATCH] pata_pcmcia: another memory card support
Hi, Could you post the output of lspcmcia -vv? I think it is better to use PCMCIA_DEVICE_PROD_ID12 instead of PCMCIA_DEVICE_PROD_ID2 + PCMCIA_DEVICE_PROD_ID2(Flash Card, 0x5a362506), Best Regards Komuro Support for Apacer photo steno pro card. Signed-off-by: Marc Pignat [EMAIL PROTECTED] --- Hi all! Here is a new ID for ide-cs and pata_pcmcia. I tried all the card I can find in the labs, only this one was unknown. Best regards Marc diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 271cb64..64b2e22 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c @@ -416,6 +416,7 @@ static struct pcmcia_device_id pcmcia_devices[] = { PCMCIA_DEVICE_PROD_ID1(STI Flash, 0xe4a13209), PCMCIA_DEVICE_PROD_ID12(STI, Flash 5.0, 0xbf2df18d, 0x8cb57a0e), PCMCIA_MFC_DEVICE_PROD_ID12(1, SanDisk, ConnectPlus, 0x7a954bd9, 0x74be00c6), + PCMCIA_DEVICE_PROD_ID2(Flash Card, 0x5a362506), PCMCIA_DEVICE_NULL, }; diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index cb199c8..f50210f 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c @@ -444,6 +444,7 @@ static struct pcmcia_device_id ide_ids[] = { PCMCIA_DEVICE_PROD_ID1(STI Flash, 0xe4a13209), PCMCIA_DEVICE_PROD_ID12(STI, Flash 5.0, 0xbf2df18d, 0x8cb57a0e), PCMCIA_MFC_DEVICE_PROD_ID12(1, SanDisk, ConnectPlus, 0x7a954bd9, 0x74be00c6), + PCMCIA_DEVICE_PROD_ID2(Flash Card, 0x5a362506), PCMCIA_DEVICE_NULL, }; MODULE_DEVICE_TABLE(pcmcia, ide_ids); ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia -- Komuro [EMAIL PROTECTED] ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia