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()

2010-09-19 Thread Komuro
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: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()

2010-09-19 Thread Pavel Machek
Hi!
 
 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?

No, I still have the problem in -rc4.

I did a quick test, and 2.6.35+your bigdiff works ok.

(did not run make clean, that would be slow)
Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

___
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()

2010-09-18 Thread Komuro
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: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()

2010-09-18 Thread Dominik Brodowski
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: Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()

2010-09-18 Thread Komuro
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()

2010-09-17 Thread Komuro
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()

2010-09-17 Thread Komuro
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()

2010-09-07 Thread Komuro

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: 

Re: Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()

2010-09-07 Thread Dominik Brodowski
Dear Komuro,

On Tue, Sep 07, 2010 at 09:24:30PM +0900, Komuro wrote:
 Attached file is the output of /sys/kernel/debug/dynamic_debug/control.

Could you issue

$ echo module pcmcia +p  /sys/kernel/debug/dynamic_debug/control

and (re-)insert the card, and then send the dmesg (probably 

$ dmesg -s 20

to me? Thanks!

Best,
Dominik

___
Linux PCMCIA reimplementation list
http://lists.infradead.org/mailman/listinfo/linux-pcmcia


Re: Re: Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()

2010-09-04 Thread Dominik Brodowski
Hey,

On Sat, Sep 04, 2010 at 09:03:40PM +0900, Komuro wrote:
 $ echo module pcmcia +p  /sys/kernel/debug/dynamic_debug/control
 
 
 Which kernel .config option do I need to enable dynamic_debug?

CONFIG_DYNAMIC_DEBUG=y

Then mount debugfs to /sys/kernel/debug, if it isn't done automatically
anyway.

 My kernel does not have
 /sys/kernel/debug/dynamic_debug/control.

Thanks!

Dominik

___
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()

2010-08-30 Thread Dominik Brodowski
Hey,

does this patch help? If not, could you please enable dynamic debug by
issuing

$ echo module pcmcia +p  /sys/kernel/debug/dynamic_debug/control

Thanks,
Dominik


From: Dominik Brodowski li...@dominikbrodowski.net
Date: Mon, 30 Aug 2010 08:18:54 +0200
Subject: [PATCH] pcmcia: fix multifunction card handling in serial_cs.c

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..dd0fa12 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;
@@ -466,7 +464,7 @@ static int simple_config(struct pcmcia_device *link)
unsigned int port = 0;
if ((link-resource[1]-end != 0) 
(resource_size(link-resource[1]) == 8)) {
-   port = link-resource[1]-end;
+   port = link-resource[1]-start;
info-slave = 1;
} else if ((info-manfid == MANFID_OSITECH) 
(resource_size(link-resource[0]) == 0x40)) {
@@ -479,6 +477,9 @@ static int simple_config(struct pcmcia_device *link)
}
}
 
+   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 */
for (try = 0; try  4; try++)
@@ -558,6 +559,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 */

___
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()

2010-08-20 Thread Komuro
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()

2010-08-20 Thread Komuro

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()

2010-08-14 Thread Dominik Brodowski
Hey,

On Sat, Aug 14, 2010 at 08:59:11AM +0900, Komuro wrote:
 @@ -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?

Yes -- I want to have it close to pcmcia_request_io(), especially as I wish
to introduce an autoconfig feature for the next kernel (2.6.37). A
preliminary patch for that can already be found in the pcmcia-test branch,
accessible e.g. via gitweb:

http://git.kernel.org/?p=linux/kernel/git/brodo/pcmcia-2.6.git;a=commitdiff;h=1fefe76a0a620ffc54c4084f4c04dd4d2ac05392

After this patch, a driver may have all the fields filled out automatically
by the PCMCIA core, but can then override things -- e.g. by setting
link-io_lines = 5 . But this override must happen between the setting of
the values (within pcmcia_loop_config(), obviously) and the use of the
values (in pcmcia_request_io()). That's the reason for the move.

Best,
Dominik

___
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()

2010-08-13 Thread Komuro

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()

2010-08-08 Thread Komuro
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