Bug 16015 - yenta_socket.c broken wireless cards.
yenta_socket.c broken wireless cards.
Status: CLOSED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: PCMCIA
All Linux
: P1 high
Assigned To: linux-pcmcia
:
Depends on:
Blocks: 15310
  Show dependency treegraph
 
Reported: 2010-05-20 13:26 UTC by Justin P. Mattock
Modified: 2010-06-13 13:25 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.34
Tree: Mainline
Regression: Yes


Attachments
pcmcia: only keep saved I365_CSCING flag if there is no PCI irq (1.11 KB, patch)
2010-05-25 07:26 UTC, Dominik Brodowski
Details | Diff

Description Justin P. Mattock 2010-05-20 13:26:28 UTC
I've sent this out to the appropriate lists, but received no response
(I don't have the time to sit and wait around for people who can figure out how todo their jobs)

Anyways here is the patch/bisection:

I've an old dell inspiron 1200(amazingly still works), that use's
a D-Link DWL-G650, and/or a Dell Wireless 1350 for it's wireless
connection.

With using opensuse11.2(kernel:2.6.32*), the card(s) work fine, but as soon
as I pulled the latest HEAD, all hell broke loose. So after doing a
days worth of bisecting with this machine(painfully slow), it finally
came down to this commit:

commit 28ca8dd71fc170090edca62cb8129625d01b7760
Author: Jens K<C3><BC>nzer <Jens.Kuenzer@fpga.homeip.net>
Date:   Sat Mar 6 07:46:16 2010 +0100

    pcmcia: honor saved flags in yenta_socket's I365_CSCINT register
    
    Instead of overwriting the I365_CSCINT register, save the old value and
    merely change the bits we care about.
    
    Part 1 of a series to allow the ISA irq to be used for Cardbus devices
    if the socket's PCI irq is unusable.
    
    [linux@dominikbrodowski.net: split up the original patch, commit message]
    
    Signed-off-by: Jens Kuenzer <Jens.Kuenzer@fpga.homeip.net>
    Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
 
so after fussing around with this commit, and yenta_socket.c
I come up with something, that does get my cards
powered up, and all good(hopefully).

Anyways please have a look, if you need me to test something
different let me know. 
 
 Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

---
 drivers/pcmcia/yenta_socket.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 83ace27..7d6f43b 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -989,7 +989,7 @@ static int yenta_probe_cb_irq(struct yenta_socket *socket)
 	}
 
 	/* generate interrupt, wait */
-	reg = exca_readb(socket, I365_CSCINT);
+	reg = exca_readb(socket, I365_CSCINT | I365_CSC_ANY);
 	exca_writeb(socket, I365_CSCINT, reg | I365_CSC_STSCHG);
 	cb_writel(socket, CB_SOCKET_EVENT, -1);
 	cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);
-- 1.6.5.2.180.gc5b3e
Comment 1 Justin P. Mattock 2010-05-21 21:31:09 UTC
Thanks for adding this to the list of regressions.
(apologize for being impatient).
Comment 2 Dominik Brodowski 2010-05-25 07:26:43 UTC
Created attachment 26536 [details]
pcmcia: only keep saved I365_CSCING flag if there is no PCI irq

Could you test this (updated) patch, please? Thanks!
Comment 3 Justin P. Mattock 2010-05-25 13:45:52 UTC
come on!! don't people fucking work around here!!(just messing)
:-]
Anyways I tried your patch out, and it works.. wireless card lights up,
leds blink etc..

cheers.
Comment 4 Rafael J. Wysocki 2010-06-13 11:51:19 UTC
Fixed by commit 02caa56e4b789b80ae7e0f0f0789f94b44ad32ef .
Comment 5 Justin P. Mattock 2010-06-13 13:25:41 UTC
alright.. then once that hits the main tree then this can be closed..

Thanks!

Note You need to log in before you can comment on or make changes to this bug.