From: Stephen Evanchik <evanchsa@clarkson.edu>
To: linux-kernel@vger.kernel.org
Cc: hermes@gibson.dropbear.id.au
Subject: [PATCH 2.5.54] UPDATE hermes: serialization fixes
Date: Fri, 3 Jan 2003 15:50:55 -0500 [thread overview]
Message-ID: <200301031550.55590.evanchsa@clarkson.edu> (raw)
This fixes "Error -110 writing Tx descriptor to BAP" bug as referenced in David Gibson's README.
As per a suggestion, I've moved the spin_lock/unlock to hermes_bap_seek(). I'm currently running with
this module and it's working nicely.
As always, any comments are appreciated. Patches can be always downloaded from here:
http://www.clarkson.edu/~evanchsa/software/kernel/patches
Stephen Evanchik
--- linux-2.5.54/drivers/net/wireless/hermes.h 2003-01-01 22:21:02.000000000 -0500
+++ linux-2.5.54-devel/drivers/net/wireless/hermes.h 2003-01-03 15:32:33.000000000 -0500
@@ -288,6 +288,9 @@
u16 inten; /* Which interrupts should be enabled? */
+ /* Lock used in hermes_bap_seek */
+ spinlock_t baplock;
+
#ifdef HERMES_DEBUG_BUFFER
struct hermes_debug_entry dbuf[HERMES_DEBUG_BUFSIZE];
unsigned long dbufp;
--- linux-2.5.54/drivers/net/wireless/hermes.c 2003-01-01 22:21:13.000000000 -0500
+++ linux-2.5.54-devel/drivers/net/wireless/hermes.c 2003-01-03 15:34:23.000000000 -0500
@@ -342,11 +342,15 @@
int oreg = bap ? HERMES_OFFSET1 : HERMES_OFFSET0;
int k;
u16 reg;
+ unsigned long flags;
/* Paranoia.. */
if ( (offset > HERMES_BAP_OFFSET_MAX) || (offset % 2) )
return -EINVAL;
+ /* Without it, network connection errors occur.. */
+ spin_lock_irqsave(&(hw->baplock), flags);
+
k = HERMES_BAP_BUSY_TIMEOUT;
reg = hermes_read_reg(hw, oreg);
while ((reg & HERMES_OFFSET_BUSY) && k) {
@@ -368,6 +372,8 @@
}
#endif
+ spin_unlock_irqrestore(&(hw->baplock), flags);
+
if (reg & HERMES_OFFSET_BUSY)
return -ETIMEDOUT;
next reply other threads:[~2003-01-03 20:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-03 20:50 Stephen Evanchik [this message]
2003-01-04 5:38 ` [PATCH 2.5.54] UPDATE hermes: serialization fixes David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200301031550.55590.evanchsa@clarkson.edu \
--to=evanchsa@clarkson.edu \
--cc=hermes@gibson.dropbear.id.au \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox