[Bug 15014] Poor performance on O2 Micro carbus bridge (OZ6933)

2010-01-09 Thread bugzilla-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=15014





--- Comment #3 from frod...@gmail.com  2010-01-09 22:15:06 ---
Works as expected, thank you very much. Quick and clean! :)

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

___
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

2010-01-09 Thread Komuro
Hi,

>> >I have a bad feeling about this... might it be that cistpl.c isn't thread
>> >safe at all?
>> >
>> >Could you test out this patch, please?
>> 

With this patch, the 3c589_cs driver is not loaded at all.
So I think this patch is not correct.

>pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0
>pcmcia_socket pcmcia_socket0: cs: memory probe 0xd200-0xd40f:


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


[Bug 15014] Poor performance on O2 Micro carbus bridge (OZ6933)

2010-01-09 Thread bugzilla-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=15014





--- Comment #2 from Wolfram Sang   2010-01-09 16:29:18 
---
O2-bridges can do read prefetch and write burst. However, for some combinations
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 enable
or disable these features, while the default is what we have today: detect the
bridge and decide accordingly.

Simplify and unify the printouts while we are here.

Signed-off-by: Wolfram Sang 
Cc: frod...@gmail.com
Cc: Dominik Brodowski 
---

frodone: Can you please test this patch? It is just compile-tested as I don't
have access to the hardware I'd need this weekend.

 drivers/pcmcia/o2micro.h  |   38 +-
 drivers/pcmcia/yenta_socket.c |5 +
 2 files changed, 30 insertions(+), 13 deletions(-)

diff --git a/drivers/pcmcia/o2micro.h b/drivers/pcmcia/o2micro.h
index 624442f..d98cc01 100644
--- a/drivers/pcmcia/o2micro.h
+++ b/drivers/pcmcia/o2micro.h
@@ -116,13 +116,12 @@ static int o2micro_override(struct yenta_socket *socket)
  * from Eric Still, 02Micro.
  */
 u8 a, b;
+bool use_speedup;

 if (PCI_FUNC(socket->dev->devfn) == 0) {
 a = config_readb(socket, O2_RESERVED1);
 b = config_readb(socket, O2_RESERVED2);
-
-dev_printk(KERN_INFO, &socket->dev->dev,
-   "O2: res at 0x94/0xD4: %02x/%02x\n", a, b);
+dev_dbg(&socket->dev->dev, "O2: 0x94/0xD4: %02x/%02x\n", a, b);

 switch (socket->dev->device) {
 /*
@@ -136,22 +135,35 @@ static int o2micro_override(struct yenta_socket *socket)
 case PCI_DEVICE_ID_O2_6832:
 case PCI_DEVICE_ID_O2_6836:
  case PCI_DEVICE_ID_O2_6933:
-dev_printk(KERN_INFO, &socket->dev->dev,
-   "Yenta O2: old bridge, disabling read "
-   "prefetch/write burst\n");
-config_writeb(socket, O2_RESERVED1,
-  a & ~(O2_RES_READ_PREFETCH | O2_RES_WRITE_BURST));
-config_writeb(socket, O2_RESERVED2,
-  b & ~(O2_RES_READ_PREFETCH | O2_RES_WRITE_BURST));
+use_speedup = false;
 break;
-
 default:
-dev_printk(KERN_INFO , &socket->dev->dev,
-   "O2: enabling read prefetch/write burst\n");
+use_speedup = true;
+break;
+}
+
+if (strcasecmp(o2_speedup, "on") == 0)
+use_speedup = true;
+else if (strcasecmp(o2_speedup, "off") == 0)
+use_speedup = false;
+else if (strcasecmp(o2_speedup, "default") != 0)
+dev_warn(&socket->dev->dev,
+"O2: Unknown parameter, using 'default'");
+
+if (use_speedup) {
+dev_info(&socket->dev->dev,
+"O2: enabling read prefetch/write burst\n");
 config_writeb(socket, O2_RESERVED1,
   a | O2_RES_READ_PREFETCH | O2_RES_WRITE_BURST);
 config_writeb(socket, O2_RESERVED2,
   b | O2_RES_READ_PREFETCH | O2_RES_WRITE_BURST);
+} else {
+dev_info(&socket->dev->dev,
+"O2: disabling read prefetch/write burst\n");
+config_writeb(socket, O2_RESERVED1,
+  a & ~(O2_RES_READ_PREFETCH | O2_RES_WRITE_BURST));
+config_writeb(socket, O2_RESERVED2,
+  b & ~(O2_RES_READ_PREFETCH | O2_RES_WRITE_BURST));
 }
 }

diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index e4d12ac..041a75a 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -37,6 +37,11 @@ static int pwr_irqs_off;
 module_param(pwr_irqs_off, bool, 0644);
 MODULE_PARM_DESC(pwr_irqs_off, "Force IRQs off during power-on of slot. Use
only when seeing IRQ storms!");

+static char o2_speedup[] = "default";
+module_param_string(o2_speedup, o2_speedup, sizeof(o2_speedup), 0444);
+MODULE_PARM_DESC(o2_speedup, "Use prefetch/burst for O2-bridges: 'on', 'off' "
+"or 'default' (uses recommended behaviour for the detected bridge)");
+
 #define debug(x, s, args...) dev_dbg(&s->dev->dev, x, ##args)

 /* Don't ask.. */

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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


[Bug 15014] Poor performance on O2 Micro carbus bridge (OZ6933)

2010-01-09 Thread bugzilla-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=15014





--- Comment #1 from Wolfram Sang   2010-01-09 15:01:21 
---
> I agree with the "be on the safe side" statement, but...

:)

Hmm, I'm thinking about a module parameter which can force this on/off while
the default behaviour is the currently implemented one.

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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


Re: [Bug 15014] New: Poor performance on O2 Micro carbus bridge (OZ6933)

2010-01-09 Thread Wolfram Sang
> I agree with the "be on the safe side" statement, but...

:)

Hmm, I'm thinking about a module parameter which can force this on/off while
the default behaviour is the currently implemented one.

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


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


[Bug 15014] New: Poor performance on O2 Micro carbus bridge (OZ6933)

2010-01-09 Thread bugzilla-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=15014

   Summary: Poor performance on O2 Micro carbus bridge (OZ6933)
   Product: Drivers
   Version: 2.5
Kernel Version: 2.6.32
  Platform: All
OS/Version: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: PCMCIA
AssignedTo: linux-pcmcia@lists.infradead.org
ReportedBy: frod...@gmail.com
Regression: No


Created an attachment (id=24493)
 --> (http://bugzilla.kernel.org/attachment.cgi?id=24493)
lspci -vv

Since kernel 2.6.32 i noticed degraded performance on network file transfers
from my 8139too pcmcia card (3MB/sec instead of 11MB/sec). I bisected till
this:

1ff84890b62b20823b3697a6041bbec1b5280cee is the first bad commit
commit 1ff84890b62b20823b3697a6041bbec1b5280cee
Author: Tomas Kovacik 
Date:   Sun Jul 26 22:04:58 2009 +0200

pcmcia: disable prefetch/burst for OZ6933

Problems have been reported [1], so disable prefetch/burst, to be on the
safe
side.

[1]
http://www.mail-archive.com/linux-pcmcia@lists.infradead.org/msg02048.html

Signed-off-by: Tomáš KováÄik 
Signed-off-by: Wolfram Sang 
Signed-off-by: Greg Kroah-Hartman 

:04 04 bc4841745f3cba3e1cf1c952d4ce987572fa40f8
8b5f282e917ce1b11b499f81ad219a71487faccd M  drivers


I agree with the "be on the safe side" statement, but...
Bye

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
Linux PCMCIA reimplementation list
http://lists.infradead.org/mailman/listinfo/linux-pcmcia


Re: LOAN OFFER................LOW INTEREST

2010-01-09 Thread Mario Bernier
Good Day/Good evening. First eval, i must tell you that i am a person 
extremly honnest and loyal. I have asked many lender the sumn of 
$70,000.00 canadian on 120 months. All were ready to lend, but i asked 
not to pay fees before i get the loan. They all said there were no fees. 
When came the time for transferring the funds, it was different, well, 
they all came up with transfer fees. It's not that i don't want to 
contribuate but i just don't want to pay for something i don't have or 
even better, i will never have. Please if you are not serious, don't 
even reply to this message. I am willing to pay alot for the loan. So 
it's up to you to determine if we can do business. P.S. Are you at the 
end going to ask for money like others do. They run the transacton till 
the end and then they ask for money. Sometime i almost make deals but 
still, it look like nothing will have to come from my pocket, but no, 
there is always a fee.


Mario


___
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

2010-01-09 Thread Dominik Brodowski
Hey,

On Sat, Jan 09, 2010 at 06:05:26PM +0900, Komuro wrote:
> >I have a bad feeling about this... might it be that cistpl.c isn't thread
> >safe at all?
> >
> >Could you test out this patch, please?
> 
> 
> OK. I will test it.

Thanks!

> By the way , do you think the pcmcia_core API is MP safe ?

Yes I do.

Best,
Dominik

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


Re: [RFC] PCMCIA patches for 2.6.34

2010-01-09 Thread Dominik Brodowski
Hey,

On Sat, Jan 09, 2010 at 01:16:34PM +0100, Wolfram Sang wrote:
> Whole series:
> 
> Tested-by: Wolfram Sang 

Thanks,
Dominik

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


Re: [RFC] PCMCIA patches for 2.6.34

2010-01-09 Thread Dominik Brodowski
Hey,

On Wed, Jan 06, 2010 at 07:30:27PM +0100, Wolfram Sang wrote:
> > thanks for testing -- I think module insertion & removal, combined with card
> > insertion & ejection or suspend / resume might be the most likely error path
> > this time; though I couldn't create any issues here on my test box...
> 
> I did the suggested testing now and everything still behaves like the
> 2.6.30-distro kernel from Debian. Cool work!
> 
> This also means, I discovered something I never noticed before. This happens
> when I remove CF-cards (same for both types I have lying here):
> 
> [  150.313371] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted 
> into slot 0
> [  150.314593] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
> [  150.392217] Probing IDE interface ide2...
> [  150.667050] hde: SanDisk SDCFH-128, CFA DISK drive
> [  151.306831] ide2 at 0xc100-0xc107,0xc10e on irq 11
> [  151.306939] hde: max request size: 128KiB
> [  151.306948] hde: 250880 sectors (128 MB) w/1KiB Cache, CHS=980/8/32
> [  151.307042]  hde: hde1
> [  151.327094] ide-cs: hde: Vpp = 0.0
> [  154.778843] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot 0
> [  154.779280] Trying to free nonexistent resource 
> 
> [  154.779289] Trying to free nonexistent resource 
> 
> 
> The last two lines sound like a problem. Is it known? (I repeat: This is not a
> regression of your patches, it also happens with 2.6.30.)

Not known to me -- does it also happen with pata_pcmcia.c? Also, here's a
test case:

(1) diff between /proc/ioports before and after inserting the card. Extra
bonus i you can grab a /proc/ioports before the ide-cs driver is loaded
(e.g. by moving it away from /lib/modules/... and then insmod'ing it
manually).

(2) issue a manaual unbind of the ide-cs driver:

echo "pcmcia0.0" > sys/bus/pcmcia/drivers/ide-cs/unbind

Does the problem appear already at this stage? What's /proc/ioports
after this unbind?

(3) What happens after card removal to /proc/ioports?

Best,
Dominik

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


Re: [RFC] more PCMCIA patches for 2.6.34

2010-01-09 Thread Wolfram Sang
On Wed, Jan 06, 2010 at 04:40:53PM +0100, Dominik Brodowski wrote:
> Hey,
> 
> the next step turned out to be a bit easier than assumed, so here are some
> more patches relating to the PCMCIA subsystem, and intended for 2.6.34.
> I'm interested in your input to this patch series. They'll be sent to the
> PCMCIA list shortly. All patches are available in the "master" branch
> at
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git 
> 
> (or will be available there shortly).
> 
>   pcmcia: move cistpl.c into pcmcia module
>   pcmcia: remove remaining rsrc_mgr indirections
>   pcmcia: do not use resource manager on !PCMCIA

Whole series:

Tested-by: Wolfram Sang 

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


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


Re: [RFC] PCMCIA patches for 2.6.34

2010-01-09 Thread Wolfram Sang
On Wed, Jan 06, 2010 at 12:45:31PM +0100, Dominik Brodowski wrote:
> Hey,
> 
> here are some patches relating to the PCMCIA subsystem, and intended for
> 2.6.34. I'm interested in your input to this patch series. They'll be
> sent to the PCMCIA list shortly, with CC to other lists if deemed
> appropriate.
> 
>   pcmcia: make use of pcmcia_dev_resume() return value
>   pcmcia: remove remaining unused IRQ_FIRST_SHARED parameter
>   pcmcia: do not meddle with already assigned resources
>   pcmcia: validate CIS, not CIS cache.
>   pcmcia: cleanup pccard_validate_cis()
>   pcmcia: improve check for same card in slot after resume
>   pcmcia: CardBus doesn't need CIS access
>   pcmcia: call CIS cleanup from ds.c
>   pcmcia: rsrc_nonstatic io memory probe improvements
>   pcmcia: do not lock socket driver module in pcmcia_get_socket()
>   pcmcia: do not lock socket driver module on card insert
>   pcmcia: remove useless indirection
>   pcmcia: remove some rsrc_mgr indirections
>   pcmcia: m32r uses static socket resources
>   pcmcia: m8xx_pcmcia.c should use iodyn resource manager

Whole series:

Tested-by: Wolfram Sang 

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


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


Re: [RFC] PCMCIA patches for 2.6.34

2010-01-09 Thread Wolfram Sang
On Wed, Jan 06, 2010 at 07:30:27PM +0100, Wolfram Sang wrote:
> > thanks for testing -- I think module insertion & removal, combined with card
> > insertion & ejection or suspend / resume might be the most likely error path
> > this time; though I couldn't create any issues here on my test box...
> 
> I did the suggested testing now and everything still behaves like the
> 2.6.30-distro kernel from Debian. Cool work!
> 
> This also means, I discovered something I never noticed before. This happens
> when I remove CF-cards (same for both types I have lying here):
> 
> [  150.313371] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted 
> into slot 0
> [  150.314593] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
> [  150.392217] Probing IDE interface ide2...
> [  150.667050] hde: SanDisk SDCFH-128, CFA DISK drive
> [  151.306831] ide2 at 0xc100-0xc107,0xc10e on irq 11
> [  151.306939] hde: max request size: 128KiB
> [  151.306948] hde: 250880 sectors (128 MB) w/1KiB Cache, CHS=980/8/32
> [  151.307042]  hde: hde1
> [  151.327094] ide-cs: hde: Vpp = 0.0
> [  154.778843] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot 0
> [  154.779280] Trying to free nonexistent resource 
> 
> [  154.779289] Trying to free nonexistent resource 
> 
> 
> The last two lines sound like a problem. Is it known? (I repeat: This is not a
> regression of your patches, it also happens with 2.6.30.)

Ping? (This time without dropped CC :))

Has anyone seen this message? Is it intended?

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


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


Re: Re: [BUG? kernel 2.6.32-git10] 3com 3c562 multifunction card does not work

2010-01-09 Thread Komuro
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