[PATCH] d80211: ieee80211_hw handlers should be allowed to sleep

2006-10-07 Thread Ivo van Doorn
This patch changes the ieee80211_if_sta timer structure
into a workqueue. This will allow the config(), reset_tsf()
and config_interface() handlers in the ieee80211_hw
structure to sleep. This is especially required for USB
drivers that have to sleep for all register access.

Signed-off-by Jan Kiszka [EMAIL PROTECTED]
Signed-off-by Ivo van Doorn [EMAIL PROTECTED]

---

Note that this patch is created against the dscape git tree,
this patch will likley not apply cleanly against the wireless-dev git tree.

diff --git a/net/d80211/ieee80211.c b/net/d80211/ieee80211.c
index 86062c9..aad1a34 100644
--- a/net/d80211/ieee80211.c
+++ b/net/d80211/ieee80211.c
@@ -2075,15 +2075,15 @@ void ieee80211_if_shutdown(struct net_de
case IEEE80211_IF_TYPE_STA:
case IEEE80211_IF_TYPE_IBSS:
sdata-u.sta.state = IEEE80211_DISABLED;
-   del_timer_sync(sdata-u.sta.timer);
+   cancel_delayed_work(sdata-u.sta.work);
if (local-scan_work.data == sdata-dev) {
local-sta_scanning = 0;
cancel_delayed_work(local-scan_work);
-   flush_scheduled_work();
/* see comment in ieee80211_unregister_hw to
 * understand why this works */
local-scan_work.data = NULL;
}
+   flush_scheduled_work();
break;
}
 }
@@ -4603,8 +4603,8 @@ void ieee80211_unregister_hw(struct net_
flush_scheduled_work();
/* The scan_work is guaranteed not to be called at this
 * point. It is not scheduled and not running now. It can be
-* scheduled again only by some sta_timer (all of them are
-* stopped by now) or under rtnl lock. */
+* scheduled again only by sta_work (stopped by now) or under
+* rtnl lock. */
}
 
ieee80211_rx_bss_list_deinit(dev);
diff --git a/net/d80211/ieee80211_i.h b/net/d80211/ieee80211_i.h
index 89666ec..5b48ce2 100644
--- a/net/d80211/ieee80211_i.h
+++ b/net/d80211/ieee80211_i.h
@@ -240,7 +240,7 @@ struct ieee80211_if_sta {
IEEE80211_ASSOCIATE, IEEE80211_ASSOCIATED,
IEEE80211_IBSS_SEARCH, IEEE80211_IBSS_JOINED
} state;
-   struct timer_list timer;
+   struct work_struct work;
u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
u8 ssid[IEEE80211_MAX_SSID_LEN];
size_t ssid_len;
@@ -621,7 +621,7 @@ int ieee80211_set_compression(struct iee
  struct net_device *dev, struct sta_info *sta);
 int ieee80211_init_client(struct net_device *dev);
 /* ieee80211_sta.c */
-void ieee80211_sta_timer(unsigned long ptr);
+void ieee80211_sta_work(void *ptr);
 void ieee80211_sta_rx_mgmt(struct net_device *dev, struct sk_buff *skb,
   struct ieee80211_rx_status *rx_status);
 int ieee80211_sta_set_ssid(struct net_device *dev, char *ssid, size_t len);
diff --git a/net/d80211/ieee80211_iface.c b/net/d80211/ieee80211_iface.c
index 9a187af..4dd480f 100644
--- a/net/d80211/ieee80211_iface.c
+++ b/net/d80211/ieee80211_iface.c
@@ -194,9 +194,7 @@ void ieee80211_if_set_type(struct net_de
struct ieee80211_if_sta *ifsta;
 
ifsta = sdata-u.sta;
-   init_timer(ifsta-timer);
-   ifsta-timer.data = (unsigned long) dev;
-   ifsta-timer.function = ieee80211_sta_timer;
+   INIT_WORK(ifsta-work, ieee80211_sta_work, dev);
 
ifsta-capab = WLAN_CAPABILITY_ESS;
ifsta-auth_algs = IEEE80211_AUTH_ALG_OPEN |
diff --git a/net/d80211/ieee80211_sta.c b/net/d80211/ieee80211_sta.c
index 480e9c9..bda4f75 100644
--- a/net/d80211/ieee80211_sta.c
+++ b/net/d80211/ieee80211_sta.c
@@ -457,7 +457,7 @@ static void ieee80211_authenticate(struc
 
ieee80211_send_auth(dev, ifsta, 1, NULL, 0, 0);
 
-   mod_timer(ifsta-timer, jiffies + IEEE80211_AUTH_TIMEOUT);
+   schedule_delayed_work(ifsta-work, IEEE80211_AUTH_TIMEOUT);
 }
 
 
@@ -677,7 +677,7 @@ static void ieee80211_associate(struct n
 
ieee80211_send_assoc(dev, ifsta);
 
-   mod_timer(ifsta-timer, jiffies + IEEE80211_ASSOC_TIMEOUT);
+   schedule_delayed_work(ifsta-work, IEEE80211_ASSOC_TIMEOUT);
 }
 
 
@@ -735,11 +735,11 @@ static void ieee80211_associated(struct 
memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(dev, SIOCGIWAP, wrqu, NULL);
-   mod_timer(ifsta-timer,
- jiffies + IEEE80211_MONITORING_INTERVAL + 30 * HZ);
+   schedule_delayed_work(ifsta-work,
+ IEEE80211_MONITORING_INTERVAL + 30 * HZ);
} else {
-   mod_timer(ifsta-timer,
- jiffies + IEEE80211_MONITORING_INTERVAL);
+   

RE: [PATCH] changes to ucc_geth driver as a result of qe_lib changesand bugfixes

2006-10-07 Thread Joakim Tjernlund
 
 changes due to qe_lib changes include:
 
 o removed platform_device code, replaced with of_device
 o removed typedefs
 o uint - u32 conversions
 o removed following defines:
   QE_SIZEOF_BD, BD_BUFFER_ARG, BD_BUFFER_CLEAR, BD_BUFFER,
   BD_STATUS_AND_LENGTH_SET, BD_STATUS_AND_LENGTH, and BD_BUFFER_SET
   because they hid sizeof/in_be32/out_be32 operations from the reader.
 o removed irrelevant comments, added others to resemble 
 removed BD_ defines
 o const'd and uncasted all get_property() assignments
 
 bugfixes, courtesy of Scott Wood, include:
 
 - Read phy_address as a u32, not u8.
 - Match on type == network as well as compatible == ucc_geth, as
   device_is_compatible() will only compare up to the length of the
   test string, allowing ucc_geth_phy to match as well.
 - fixes the MAC setting code in ucc_geth.c.  The old code was 
 overwriting and dereferencing random stack contents.
 
 Signed-off-by: Li Yang [EMAIL PROTECTED]
 Signed-off-by: Kim Phillips [EMAIL PROTECTED]
 Signed-off-by: Scott Wood [EMAIL PROTECTED]
 
 ---
 
 Jeff, this patch fixes ucc_geth buildtime and runtime errors; 
 please apply.

Can you send the complete patch againt paulus tree to get ucc_qeth driver 
going? Currently there
are too many patches floating around.

 Regards
  Joakim

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] [TULIP] Check the return value from pci_set_mwi()

2006-10-07 Thread Jeff Garzik

Grant Grundler wrote:

On Fri, Oct 06, 2006 at 03:59:57PM -0400, Jeff Garzik wrote:
The unmodified tulip driver checks both MWI and cacheline-size because 
one of the clones (PNIC or PNIC2) will let you set the MWI bit, but 
hardwires cacheline size to zero.


Maybe the generic pci_set_mwi() can verify cacheline size is non-zero?
I don't think each driver should need to enforce this.


Agreed.


If the arches do not behave consistently, we need to keep the check in 
the tulip driver, to avoid incorrectly programming the csr0 MWI bit.


Why not fix the arches to be consistent?
There's alot more drivers than arches...and we have control
of the arch specific PCI support.


Agreed.

Jeff



-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: sky2 (was Re: 2.6.18-mm2)

2006-10-07 Thread Matthias Hentges
Hello Stephen,

Am Dienstag, den 03.10.2006, 20:26 -0700 schrieb Stephen Hemminger:

[...]

  while the above patch indeed removes the error messages from my previous
  mail, I have since seen random but reproduceable  freezes of the box in
  question. I believe they are sky2 related since the freeze can be
  triggered by continuous network traffic (like playing a movie over NFS
  etc.).
 
 When it fixes what does the log say. I'm probably going to back out
 the PCI express extended error using the pci_XXX functions.


  The freezes only happen with 2.6.18-mm2 and 2.6.18-mm3. 2.6.18-mm1 works
  perfectly fine.
  I've hooked up the box to my laptop via a serial cable and captured all
  kernel messages from booting up the machine to the freeze. You'll note
  that the last messages are from the sky2 driver ;)
  
 
 Does it still happen with linus git tree. If so, a git bisect might
 help. It might not be sky2 related at all, there has been lots of changes.

I am doing a bisect right now which is kind of a PITA as the freeze is
completely random.
I have since noticed that the freeze happens shortly after the network
dies, possibly during the rrmod sky2 / moprobe sky2 my script is
doing.

  Once frozen the network is dead, the screen won't wake up from suspend
  and CAPSLOCK can not be toggled. SYSRQ (sp?) still works tho.
  
  Any help in debugging this problem would be appreciated =)
 
 The TX timeout is a symptom of a common bug still not fixed where
 the transmitter stops. I'm working on reproducing it on my hardware and 
 switches,
 because without a reproducible test, its just shooting in the dark and
 that isn't working.

I'd be happy to assist with that as I have his bug up to 5 times a day :
\
-- 
Matthias 'CoreDump' Hentges 

Webmaster of hentges.net and OpenZaurus developer.
You can reach me in #openzaurus on Freenode.

My OS: Debian SID. Geek by Nature, Linux by Choice


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: 2.6.19-rc1 regression: airo suspend fails

2006-10-07 Thread Dave Kleikamp
On Fri, 2006-10-06 at 20:47 +0200, Adrian Bunk wrote:
 On Thu, Oct 05, 2006 at 09:31:16PM -0700, Alex Romosan wrote:

  it breaks suspend when the airo module is loaded:
  
  kernel: Stopping tasks: 
  =
  kernel:  stopping tasks timed out after 20 seconds (1 tasks remaining):
  kernel:   eth1
  kernel: Restarting tasks...6 Strange, eth1 not stopped
  
  if i remove the airo module suspend works normally (this is on a
  thinkpad t40).
 
 Thanks for your report.
 
 Let's try to figure out what broke it.

I believe it was broken by:
http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b4c7d640376dbccfe80fc4f7b8772ecc7de28c5

I have seen this in the -mm tree, but didn't follow up at the time.  I
was able to fix it with the following patch.  I don't know if it's the
best fix, but it seems to follow the same logic as the original code.


The airo driver used to break out of while loop if there were any signals
pending.  Since it no longer checks for signals, it at least needs to check
if it needs to be frozen.

Signed-off-by: Dave Kleikamp [EMAIL PROTECTED]

diff -Nurp linux-2.6.19-rc1/drivers/net/wireless/airo.c 
linux/drivers/net/wireless/airo.c
--- linux-2.6.19-rc1/drivers/net/wireless/airo.c2006-10-05 
07:22:39.0 -0500
+++ linux/drivers/net/wireless/airo.c   2006-10-07 13:42:13.0 -0500
@@ -3090,7 +3090,8 @@ static int airo_thread(void *data) {
set_bit(JOB_AUTOWEP, ai-jobs);
break;
}
-   if (!kthread_should_stop()) {
+   if (!kthread_should_stop() 
+   !freezing(current)) {
unsigned long wake_at;
if (!ai-expires || 
!ai-scan_timeout) {
wake_at = 
max(ai-expires,
@@ -3102,7 +3103,8 @@ static int airo_thread(void *data) {
schedule_timeout(wake_at - 
jiffies);
continue;
}
-   } else if (!kthread_should_stop()) {
+   } else if (!kthread_should_stop() 
+  !freezing(current)) {
schedule();
continue;
}

-- 
David Kleikamp
IBM Linux Technology Center

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 2.6.19-rc1 regression: airo suspend fails

2006-10-07 Thread Alex Romosan
Dave Kleikamp [EMAIL PROTECTED] writes:

 I believe it was broken by:
 http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b4c7d640376dbccfe80fc4f7b8772ecc7de28c5

 I have seen this in the -mm tree, but didn't follow up at the time.  I
 was able to fix it with the following patch.  I don't know if it's the
 best fix, but it seems to follow the same logic as the original code.


 The airo driver used to break out of while loop if there were any signals
 pending.  Since it no longer checks for signals, it at least needs to check
 if it needs to be frozen.

 Signed-off-by: Dave Kleikamp [EMAIL PROTECTED]

 diff -Nurp linux-2.6.19-rc1/drivers/net/wireless/airo.c 
 linux/drivers/net/wireless/airo.c
 --- linux-2.6.19-rc1/drivers/net/wireless/airo.c  2006-10-05 
 07:22:39.0 -0500
 +++ linux/drivers/net/wireless/airo.c 2006-10-07 13:42:13.0 -0500
 @@ -3090,7 +3090,8 @@ static int airo_thread(void *data) {
   set_bit(JOB_AUTOWEP, ai-jobs);
   break;
   }
 - if (!kthread_should_stop()) {
 + if (!kthread_should_stop() 
 + !freezing(current)) {
   unsigned long wake_at;
   if (!ai-expires || 
 !ai-scan_timeout) {
   wake_at = 
 max(ai-expires,
 @@ -3102,7 +3103,8 @@ static int airo_thread(void *data) {
   schedule_timeout(wake_at - 
 jiffies);
   continue;
   }
 - } else if (!kthread_should_stop()) {
 + } else if (!kthread_should_stop() 
 +!freezing(current)) {
   schedule();
   continue;
   }


thanks. with this patch applied i can suspend to ram with the airo
module loaded.

--alex--

-- 
| I believe the moment is at hand when, by a paranoiac and active |
|  advance of the mind, it will be possible (simultaneously with  |
|  automatism and other passive states) to systematize confusion  |
|  and thus to help to discredit completely the world of reality. |
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 2/3] atmel: use ARRAY_SIZE()

2006-10-07 Thread Dmitry Torokhov
NET: atmel - switch to using ARRAY_SIZE()

Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---

 drivers/net/wireless/atmel.c |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)

Index: work/drivers/net/wireless/atmel.c
===
--- work.orig/drivers/net/wireless/atmel.c
+++ work/drivers/net/wireless/atmel.c
@@ -1193,7 +1193,7 @@ static irqreturn_t service_interrupt(int
 
atmel_set_gcr(dev, GCR_ACKINT); /* acknowledge interrupt */
 
-   for (i = 0; i  sizeof(irq_order)/sizeof(u8); i++)
+   for (i = 0; i  ARRAY_SIZE(irq_order); i++)
if (isr  irq_order[i])
break;
 
@@ -1345,10 +1345,10 @@ int atmel_open(struct net_device *dev)
atmel_set_mib8(priv, Phy_Mib_Type, PHY_MIB_REG_DOMAIN_POS, 
priv-reg_domain);
} else {
priv-reg_domain = atmel_get_mib8(priv, Phy_Mib_Type, 
PHY_MIB_REG_DOMAIN_POS);
-   for (i = 0; i  sizeof(channel_table)/sizeof(channel_table[0]); 
i++)
+   for (i = 0; i  ARRAY_SIZE(channel_table); i++)
if (priv-reg_domain == channel_table[i].reg_domain)
break;
-   if (i == sizeof(channel_table)/sizeof(channel_table[0])) {
+   if (i == ARRAY_SIZE(channel_table)) {
priv-reg_domain = REG_DOMAIN_MKK1;
printk(KERN_ALERT %s: failed to get regulatory domain: 
assuming MKK1.\n, dev-name);
}
@@ -1393,7 +1393,7 @@ static int atmel_validate_channel(struct
   else return suitable default channel */
int i;
 
-   for (i = 0; i  sizeof(channel_table)/sizeof(channel_table[0]); i++)
+   for (i = 0; i  ARRAY_SIZE(channel_table); i++)
if (priv-reg_domain == channel_table[i].reg_domain) {
if (channel = channel_table[i].min 
channel = channel_table[i].max)
@@ -1437,7 +1437,7 @@ static int atmel_proc_output (char *buf,
}
 
r = unknown;
-   for (i = 0; i  sizeof(channel_table)/sizeof(channel_table[0]); 
i++)
+   for (i = 0; i  ARRAY_SIZE(channel_table); i++)
if (priv-reg_domain == channel_table[i].reg_domain)
r = channel_table[i].name;
 
@@ -2375,7 +2375,7 @@ static int atmel_get_range(struct net_de
range-min_nwid = 0x;
range-max_nwid = 0x;
range-num_channels = 0;
-   for (j = 0; j  sizeof(channel_table)/sizeof(channel_table[0]); j++)
+   for (j = 0; j  ARRAY_SIZE(channel_table); j++)
if (priv-reg_domain == channel_table[j].reg_domain) {
range-num_channels = channel_table[j].max - 
channel_table[j].min + 1;
break;
@@ -2581,9 +2581,9 @@ static const struct iw_priv_args atmel_p
 
 static const struct iw_handler_def atmel_handler_def =
 {
-   .num_standard   = sizeof(atmel_handler)/sizeof(iw_handler),
-   .num_private= sizeof(atmel_private_handler)/sizeof(iw_handler),
-   .num_private_args = sizeof(atmel_private_args)/sizeof(struct 
iw_priv_args),
+   .num_standard   = ARRAY_SIZE(atmel_handler),
+   .num_private= ARRAY_SIZE(atmel_private_handler),
+   .num_private_args = ARRAY_SIZE(atmel_private_args),
.standard   = (iw_handler *) atmel_handler,
.private= (iw_handler *) atmel_private_handler,
.private_args   = (struct iw_priv_args *) atmel_private_args,
@@ -2647,7 +2647,7 @@ static int atmel_ioctl(struct net_device
 
domain[REGDOMAINSZ] = 0;
rc = -EINVAL;
-   for (i = 0; i  sizeof(channel_table)/sizeof(channel_table[0]); 
i++) {
+   for (i = 0; i  ARRAY_SIZE(channel_table); i++) {
/* strcasecmp doesn't exist in the library */
char *a = channel_table[i].name;
char *b = domain;
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 3/3] atmel: whitespace cleanup

2006-10-07 Thread Dmitry Torokhov
NET: atmel: whitespace cleanup

Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---

 drivers/net/wireless/atmel.c |6 +--
 drivers/net/wireless/atmel_cs.c  |   74 +++
 drivers/net/wireless/atmel_pci.c |   10 ++---
 3 files changed, 45 insertions(+), 45 deletions(-)

Index: work/drivers/net/wireless/atmel.c
===
--- work.orig/drivers/net/wireless/atmel.c
+++ work/drivers/net/wireless/atmel.c
@@ -595,7 +595,7 @@ static void atmel_join_bss(struct atmel_
 static void atmel_smooth_qual(struct atmel_private *priv);
 static void atmel_writeAR(struct net_device *dev, u16 data);
 static int probe_atmel_card(struct net_device *dev);
-static int reset_atmel_card(struct net_device *dev );
+static int reset_atmel_card(struct net_device *dev);
 static void atmel_enter_state(struct atmel_private *priv, int new_state);
 int atmel_open (struct net_device *dev);
 
@@ -1738,7 +1738,7 @@ static int atmel_set_encode(struct net_d
/* Disable the key */
priv-wep_key_len[index] = 0;
/* Check if the key is not marked as invalid */
-   if(!(dwrq-flags  IW_ENCODE_NOKEY)) {
+   if (!(dwrq-flags  IW_ENCODE_NOKEY)) {
/* Cleanup */
memset(priv-wep_keys[index], 0, 13);
/* Copy the key in the driver */
@@ -1909,7 +1909,7 @@ static int atmel_get_encodeext(struct ne
 
encoding-flags = idx + 1;
memset(ext, 0, sizeof(*ext));
-   
+
if (!priv-wep_is_on) {
ext-alg = IW_ENCODE_ALG_NONE;
ext-key_len = 0;
Index: work/drivers/net/wireless/atmel_cs.c
===
--- work.orig/drivers/net/wireless/atmel_cs.c
+++ work/drivers/net/wireless/atmel_cs.c
@@ -5,12 +5,12 @@
 Copyright 2000-2001 ATMEL Corporation.
 Copyright 2003 Simon Kelley.
 
-This code was developed from version 2.1.1 of the Atmel drivers, 
-released by Atmel corp. under the GPL in December 2002. It also 
-includes code from the Linux aironet drivers (C) Benjamin Reed, 
-and the Linux PCMCIA package, (C) David Hinds. 
+This code was developed from version 2.1.1 of the Atmel drivers,
+released by Atmel corp. under the GPL in December 2002. It also
+includes code from the Linux aironet drivers (C) Benjamin Reed,
+and the Linux PCMCIA package, (C) David Hinds.
 
-For all queries about this code, please contact the current author, 
+For all queries about this code, please contact the current author,
 Simon Kelley [EMAIL PROTECTED] and not Atmel Corporation.
 
 This program is free software; you can redistribute it and/or modify
@@ -87,7 +87,7 @@ MODULE_SUPPORTED_DEVICE(Atmel at76c50x 
event is received.  The config() and release() entry points are
used to configure or release a socket, in response to card
insertion and ejection events.  They are invoked from the atmel_cs
-   event handler. 
+   event handler.
 */
 
 static int atmel_config(struct pcmcia_device *link);
@@ -133,22 +133,22 @@ static void atmel_detach(struct pcmcia_d
device IO routines can use a flag like this to throttle IO to a
card that is not ready to accept it.
 */
-   
+
 typedef struct local_info_t {
dev_node_t  node;
struct net_device *eth_dev;
 } local_info_t;
 
 /*==
-  
+
   atmel_attach() creates an instance of the driver, allocating
   local data structures for one device.  The device is registered
   with Card Services.
-  
+
   The dev_link structure is initialized, but we don't actually
   configure the card at this point -- we wait until we receive a
   card insertion event.
-  
+
   ==*/
 
 static int atmel_probe(struct pcmcia_device *p_dev)
@@ -184,12 +184,12 @@ static int atmel_probe(struct pcmcia_dev
 } /* atmel_attach */
 
 /*==
-  
+
   This deletes a driver instance.  The device is de-registered
   with Card Services.  If it has been released, all local data
   structures are freed.  Otherwise, the structures will be freed
   when the device is released.
-  
+
   ==*/
 
 static void atmel_detach(struct pcmcia_device *link)
@@ -202,11 +202,11 @@ static void atmel_detach(struct pcmcia_d
 }
 
 /*==
-  
+
   atmel_config() is scheduled to run after a CARD_INSERTION event
   is received, to configure the PCMCIA socket, and to make the
   device available to the system.
-  
+
   ==*/
 
 #define CS_CHECK(fn, ret) \
@@ 

[patch 0/3] atmel: couple of cleanup patches

2006-10-07 Thread Dmitry Torokhov
Hi,

Here are couple of cleanup patches for atmel driver. They are
against tonight pull from Linus. Please consider applying.

Thanks!

--
Dmitry
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 1/3] atmel: save on array initialization

2006-10-07 Thread Dmitry Torokhov
NET: atmel - do not initialize array over and over again

Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---

 drivers/net/wireless/atmel.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: work/drivers/net/wireless/atmel.c
===
--- work.orig/drivers/net/wireless/atmel.c
+++ work/drivers/net/wireless/atmel.c
@@ -784,11 +784,11 @@ static void tx_update_descriptor(struct 
 
 static int start_tx(struct sk_buff *skb, struct net_device *dev)
 {
+   static const u8 SNAP_RFC1024[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 
};
struct atmel_private *priv = netdev_priv(dev);
struct ieee80211_hdr_4addr header;
unsigned long flags;
u16 buff, frame_ctl, len = (ETH_ZLEN  skb-len) ? skb-len : ETH_ZLEN;
-   u8 SNAP_RFC1024[6] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00};
 
if (priv-card  priv-present_callback 
!(*priv-present_callback)(priv-card)) {
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 0/2] prism54: couple of cleanup patches

2006-10-07 Thread Dmitry Torokhov
Hi,

Here are couple of patches for prism54 driver, they are against
tonight pull from Linus. Please consider applying.

Thanks!

--
Dmitry
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 1/2] prism54: fix potential race in reset scheduling

2006-10-07 Thread Dmitry Torokhov
NET: prism54 - fix potential race in reset scheduling

There appears to be a race in reset scheduling logic - thread
responsible for reseting the interface should clear reset
pending flag before restarting the queue, otherwise timeout
handler might not schedule another reset even if it is needed.

This race is mostly theoretical as far as I can see but a race
nonetheless.

Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---

 drivers/net/wireless/prism54/islpci_eth.c |   23 +--
 1 files changed, 13 insertions(+), 10 deletions(-)

Index: work/drivers/net/wireless/prism54/islpci_eth.c
===
--- work.orig/drivers/net/wireless/prism54/islpci_eth.c
+++ work/drivers/net/wireless/prism54/islpci_eth.c
@@ -253,6 +253,7 @@ islpci_monitor_rx(islpci_private *priv, 
 * header and without the FCS. But there a is a bit that
 * indicates if the packet is corrupted :-) */
struct rfmon_header *hdr = (struct rfmon_header *) (*skb)-data;
+
if (hdr-flags  0x01)
/* This one is bad. Drop it ! */
return -1;
@@ -464,10 +465,8 @@ islpci_eth_receive(islpci_private *priv)
break;
}
/* update the fragment address */
-   control_block-rx_data_low[index].address = cpu_to_le32((u32)
-   priv-
-   
pci_map_rx_address
-   
[index]);
+   control_block-rx_data_low[index].address =
+   cpu_to_le32((u32)priv-pci_map_rx_address[index]);
wmb();
 
/* increment the driver read pointer */
@@ -484,10 +483,12 @@ islpci_eth_receive(islpci_private *priv)
 void
 islpci_do_reset_and_wake(void *data)
 {
-   islpci_private *priv = (islpci_private *) data;
+   islpci_private *priv = data;
+
islpci_reset(priv, 1);
-   netif_wake_queue(priv-ndev);
priv-reset_task_pending = 0;
+   smp_wmb();
+   netif_wake_queue(priv-ndev);
 }
 
 void
@@ -499,12 +500,14 @@ islpci_eth_tx_timeout(struct net_device 
/* increment the transmit error counter */
statistics-tx_errors++;
 
-   printk(KERN_WARNING %s: tx_timeout, ndev-name);
if (!priv-reset_task_pending) {
-   priv-reset_task_pending = 1;
-   printk(, scheduling a reset);
+   printk(KERN_WARNING
+   %s: tx_timeout, scheduling reset, ndev-name);
netif_stop_queue(ndev);
+   priv-reset_task_pending = 1;
schedule_work(priv-reset_task);
+   } else {
+   printk(KERN_WARNING
+   %s: tx_timeout, waiting for reset, ndev-name);
}
-   printk(\n);
 }
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 2/2] prism54: whitespace cleanup

2006-10-07 Thread Dmitry Torokhov
NET: prism54 - whitespace cleanup

Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED]
---

 drivers/net/wireless/prism54/isl_38xx.c   |   17 +++
 drivers/net/wireless/prism54/isl_38xx.h   |7 +-
 drivers/net/wireless/prism54/isl_ioctl.c  |   61 --
 drivers/net/wireless/prism54/isl_ioctl.h  |1 
 drivers/net/wireless/prism54/isl_oid.h|   32 ++---
 drivers/net/wireless/prism54/islpci_dev.c |   13 ++---
 drivers/net/wireless/prism54/islpci_dev.h |   11 ++--
 drivers/net/wireless/prism54/islpci_eth.c |7 +-
 drivers/net/wireless/prism54/islpci_eth.h |1 
 drivers/net/wireless/prism54/islpci_hotplug.c |   23 -
 drivers/net/wireless/prism54/islpci_mgt.c |3 -
 drivers/net/wireless/prism54/islpci_mgt.h |5 --
 drivers/net/wireless/prism54/oid_mgt.c|6 +-
 drivers/net/wireless/prism54/prismcompat.h|4 -
 14 files changed, 89 insertions(+), 102 deletions(-)

Index: work/drivers/net/wireless/prism54/isl_38xx.c
===
--- work.orig/drivers/net/wireless/prism54/isl_38xx.c
+++ work/drivers/net/wireless/prism54/isl_38xx.c
@@ -1,5 +1,4 @@
 /*
- *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *  Copyright (C) 2003-2004 Luis R. Rodriguez [EMAIL PROTECTED]_
  *
@@ -38,7 +37,7 @@
  * isl38xx_disable_interrupts - disable all interrupts
  * @device: pci memory base address
  *
- *  Instructs the device to disable all interrupt reporting by asserting 
+ *  Instructs the device to disable all interrupt reporting by asserting
  *  the IRQ line. New events may still show up in the interrupt identification
  *  register located at offset %ISL38XX_INT_IDENT_REG.
  */
@@ -204,17 +203,19 @@ isl38xx_interface_reset(void __iomem *de
/* enable the interrupt for detecting initialization */
 
/* Note: Do not enable other interrupts here. We want the
-* device to have come up first 100% before allowing any other 
+* device to have come up first 100% before allowing any other
 * interrupts. */
isl38xx_w32_flush(device_base, ISL38XX_INT_IDENT_INIT, 
ISL38XX_INT_EN_REG);
udelay(ISL38XX_WRITEIO_DELAY);  /* allow complete full reset */
 }
 
 void
-isl38xx_enable_common_interrupts(void __iomem *device_base) {
+isl38xx_enable_common_interrupts(void __iomem *device_base)
+{
u32 reg;
-   reg = ( ISL38XX_INT_IDENT_UPDATE | 
-   ISL38XX_INT_IDENT_SLEEP | ISL38XX_INT_IDENT_WAKEUP);
+
+   reg = ISL38XX_INT_IDENT_UPDATE | ISL38XX_INT_IDENT_SLEEP |
+ ISL38XX_INT_IDENT_WAKEUP;
isl38xx_w32_flush(device_base, reg, ISL38XX_INT_EN_REG);
udelay(ISL38XX_WRITEIO_DELAY);
 }
@@ -234,23 +235,21 @@ isl38xx_in_queue(isl38xx_control_block *
/* send queues */
case ISL38XX_CB_TX_MGMTQ:
BUG_ON(delta  ISL38XX_CB_MGMT_QSIZE);
+
case ISL38XX_CB_TX_DATA_LQ:
case ISL38XX_CB_TX_DATA_HQ:
BUG_ON(delta  ISL38XX_CB_TX_QSIZE);
return delta;
-   break;
 
/* receive queues */
case ISL38XX_CB_RX_MGMTQ:
BUG_ON(delta  ISL38XX_CB_MGMT_QSIZE);
return ISL38XX_CB_MGMT_QSIZE - delta;
-   break;
 
case ISL38XX_CB_RX_DATA_LQ:
case ISL38XX_CB_RX_DATA_HQ:
BUG_ON(delta  ISL38XX_CB_RX_QSIZE);
return ISL38XX_CB_RX_QSIZE - delta;
-   break;
}
BUG();
return 0;
Index: work/drivers/net/wireless/prism54/isl_38xx.h
===
--- work.orig/drivers/net/wireless/prism54/isl_38xx.h
+++ work/drivers/net/wireless/prism54/isl_38xx.h
@@ -1,5 +1,4 @@
 /*
- *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -67,10 +66,10 @@
  * @base: (host) memory base address of the device
  * @val: 32bit value (host order) to write
  * @offset: byte offset into @base to write value to
- * 
+ *
  *  This helper takes care of writing a 32bit datum to the
- *  specified offset into the device's pci memory space, and making sure 
- *  the pci memory buffers get flushed by performing one harmless read 
+ *  specified offset into the device's pci memory space, and making sure
+ *  the pci memory buffers get flushed by performing one harmless read
  *  from the %ISL38XX_PCI_POSTING_FLUSH offset.
  */
 static inline void
Index: work/drivers/net/wireless/prism54/isl_ioctl.c
===
--- work.orig/drivers/net/wireless/prism54/isl_ioctl.c
+++ work/drivers/net/wireless/prism54/isl_ioctl.c
@@ -1,5 +1,4 @@
 /*
- *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *(C) 2003,2004 Aurelien Alleaume [EMAIL PROTECTED]
  *(C) 2003 Herbert Valerio Riedel [EMAIL PROTECTED]
@@ 

Re: 2.6.19-rc1: known regressions (v2)

2006-10-07 Thread Trond Myklebust
Cc: Linus Torvalds [EMAIL PROTECTED], Linux Kernel Mailing List 
linux-kernel@vger.kernel.org, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL 
PROTECTED],  Prakash Punnoor [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL 
PROTECTED], Steve Fox [EMAIL PROTECTED],  netdev@vger.kernel.org, Michael S. 
Tsirkin [EMAIL PROTECTED],  [EMAIL PROTECTED], linux-acpi@vger.kernel.org, 
Pavel Machek [EMAIL PROTECTED],  Olaf Hering [EMAIL PROTECTED], Antonino 
Daplas [EMAIL PROTECTED], [EMAIL PROTECTED],  Thierry Vignaud [EMAIL 
PROTECTED], [EMAIL PROTECTED], linux-ide@vger.kernel.org, Ernst Herzberg 
[EMAIL PROTECTED], Matthieu Castet [EMAIL PROTECTED],  
linux-usb-devel@lists.sourceforge.net, Jens Axboe [EMAIL PROTECTED],  
Benjamin Herrenschmidt [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL 
PROTECTED], Andreas Schwab [EMAIL PROTECTED],  Mel Gorman [EMAIL 
PROTECTED], Alex Romosan [EMAIL PROTECTED], Sukadev Bhattiprolu [EMAIL 
PROTECTED]
 com, Dave Kleikamp [EMAIL PROTECTED], Torsten Kaiser [EMAIL PROTECTED], 
Magnus Damm [EMAIL PROTECTED], Vivek Goyal [EMAIL PROTECTED], [EMAIL 
PROTECTED], [EMAIL PROTECTED], Alistair John Strachan [EMAIL PROTECTED], 
Stefan Richter [EMAIL PROTECTED],  [EMAIL PROTECTED]
In-Reply-To: [EMAIL PROTECTED]
References: [EMAIL PROTECTED]
 [EMAIL PROTECTED]
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Organization: Network Appliance Inc
Date: Sun, 08 Oct 2006 00:43:35 -0400
Message-Id: [EMAIL PROTECTED]
Mime-Version: 1.0
X-Mailer: Evolution 2.8.1 

On Sat, 2006-10-07 at 23:46 +0200, Adrian Bunk wrote:

 Subject: NFSv4 fails to mount (timeout)
 References : http://bugzilla.kernel.org/show_bug.cgi?id=7274
 Submitter  : Torsten Kaiser [EMAIL PROTECTED]
 Guilty : Trond Myklebust [EMAIL PROTECTED]
  commit 51b6ded4d9a94a61035deba1d8f51a54e3a3dd86
 Handled-By : Trond Myklebust [EMAIL PROTECTED]
 Patch  : http://bugzilla.kernel.org/show_bug.cgi?id=7274
 Status : patch available

Thanks... Always nice to hear that you have been judged and found
guilty. Now go and reread that fucking bug report...

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html