All of lore.kernel.org
 help / color / mirror / Atom feed
* compat-wireless updated for 2.6.33-rc8, 2.6.32.8 and next-20100212
@ 2010-02-13  2:10 Luis R. Rodriguez
  2010-02-14  5:10 ` compat-wireless + Linux 2.6.26.8 testing results Pavel Roskin
  0 siblings, 1 reply; 15+ messages in thread
From: Luis R. Rodriguez @ 2010-02-13  2:10 UTC (permalink / raw)
  To: linux-wireless, linux-bluetooth; +Cc: linux-kernel

The bleeding edge compat-wireless updates were stuck due to a
bluetooth hunk failing on net/bluetooth/hidp/core.c, that should be
fixed now, at least it compiles for me down to 2.6.27. I also hadn't
updated a 2.6.33-rcx releases in a while, as well as 2.6.32.y release.
This should all now be in synch with upstream. I never got reports
about MQ support on older kernels so I just threw in the code, issues
can be dealt with once actually found.

ath3k went in on 2.6.33-rc8 so we enable it now. Atheros Ethernet
AR8152/AR8152 support was submitted upstream for atl1c but it hasn't
been merged yet so likely it won't get into 2.6.33, but once its
merged for 2.6.34 I will just throw in the patch as an extra onto the
compat-wireless-2.6.33 releases.

Worth noting also is if you have any specific patch which did *not* go
into a stable release due to size but yet considered relatively
important and if it is merged upstream please send a note to
linux-wireless about it and we can consider enabling it if it is not
insane. This applies to new drivers as well. I will likely an an
extra/ dir. The only requirement is you *must* have the patch merged
upstream on one of the trees, either wireless-testing,
bluetooth-testing, or net-next-2.6. Reasoning for enabling patches
like these is as I have seen, even as hard we try we somehow can't get
rid of a small delta between what we feel needs to be supported and
what is on stable. My main concern over accepting patches like these
is creating a fork but forks can be avoided if we have a requirement
of first requiring the patch on a development tree.

Please report any issues found:

http://wireless.kernel.org/en/users/Documentation/Reporting_bugs

Stable releases:
=========

2.6.32.8:

sha1sum 694b453db50cd22798b754d022aca1e5ba45c8f1
http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.32/compat-wireless-2.6.32.8.tar.bz2
http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.32/ChangeLog-2.6.32.8-wireless

2.6.33-rc8:

sha1sum 4811f419acb1d9d12e5262bffc4892da71134510
http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.33/compat-wireless-2.6.33-rc8.tar.bz2
http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.33/ChangeLog-2.6.33-rc8-wireless

Bleeding edge release based on linux-next:
==========================

http://wireless.kernel.org/en/users/Download
http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2.6.tar.bz2

  Luis

^ permalink raw reply	[flat|nested] 15+ messages in thread

* compat-wireless + Linux 2.6.26.8 testing results
  2010-02-13  2:10 compat-wireless updated for 2.6.33-rc8, 2.6.32.8 and next-20100212 Luis R. Rodriguez
@ 2010-02-14  5:10 ` Pavel Roskin
  2010-02-16 21:23   ` Luis R. Rodriguez
  0 siblings, 1 reply; 15+ messages in thread
From: Pavel Roskin @ 2010-02-14  5:10 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless

On Fri, 2010-02-12 at 18:10 -0800, Luis R. Rodriguez wrote:
> The bleeding edge compat-wireless updates were stuck due to a
> bluetooth hunk failing on net/bluetooth/hidp/core.c, that should be
> fixed now, at least it compiles for me down to 2.6.27. I also hadn't
> updated a 2.6.33-rcx releases in a while, as well as 2.6.32.y release.
> This should all now be in synch with upstream. I never got reports
> about MQ support on older kernels so I just threw in the code, issues
> can be dealt with once actually found.

I've tried compiling all three tarballs against Linux 2.6.26.8.  It's a
kernel with some hardware patches for arm architecture that are hard to
port to newer kernels, so compat-wireless would be very helpful.

compat-wireless-2.6.32.8 compiles just fine with ath5k selected.

compat-wireless-2.6.33-rc8 fails:

/home/proski/src/compat-wireless-2.6.33-rc8/net/mac80211/util.c: In
function '__ieee80211_wake_queue':
/home/proski/src/compat-wireless-2.6.33-rc8/net/mac80211/util.c:290:
error: implicit declaration of function 'netif_tx_wake_queue'
/home/proski/src/compat-wireless-2.6.33-rc8/net/mac80211/util.c:290:
error: implicit declaration of function 'netdev_get_tx_queue'
/home/proski/src/compat-wireless-2.6.33-rc8/net/mac80211/util.c: In
function '__ieee80211_stop_queue':
/home/proski/src/compat-wireless-2.6.33-rc8/net/mac80211/util.c:325:
error: implicit declaration of function 'netif_tx_stop_queue'

compat-wireless-2010-02-13 fails differently:

/home/proski/src/compat-wireless-2010-02-13/net/mac80211/iface.c: In
function 'ieee80211_if_setup':
/home/proski/src/compat-wireless-2010-02-13/net/mac80211/iface.c:738:
error: 'struct net_device' has no member named 'select_queue'
/home/proski/src/compat-wireless-2010-02-13/net/mac80211/iface.c: In
function 'ieee80211_setup_sdata':
/home/proski/src/compat-wireless-2010-02-13/net/mac80211/iface.c:790:
error: 'struct net_device' has no member named 'select_queue'

I tried enabling CONFIG_NETDEVICES_MULTIQUEUE, but it made no
difference.

It looks like compat-wireless-2.6.33-rc8 and compat-wireless-2010-02-13
don't have the patches to deal with the lack of netif_tx_wake_queue and
select_queue in Linux 2.6.26.  compat-wireless-2.6.32.8 has such
patches.

If all drivers are selected, compat-wireless-2.6.32.8 fails:

In file included
from /home/proski/src/compat-wireless-2.6.32.8/drivers/net/b44.c:28:
/home/proski/src/compat-wireless-2.6.32.8/include/linux/ssb/ssb.h: In
function 'ssb_dma_sync_single_range_for_cpu':
/home/proski/src/compat-wireless-2.6.32.8/include/linux/ssb/ssb.h:595:
error: implicit declaration of function 'dma_sync_single_range_for_cpu'
/home/proski/src/compat-wireless-2.6.32.8/include/linux/ssb/ssb.h: In
function 'ssb_dma_sync_single_range_for_device':
/home/proski/src/compat-wireless-2.6.32.8/include/linux/ssb/ssb.h:620:
error: implicit declaration of function
'dma_sync_single_range_for_device'

That appears to be caused by the lack of
dma_sync_single_range_for_device on the arm architecture.  Other
architectures have it.  "make -k" doesn't find any other errors.  All
other drivers compile fine.

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-14  5:10 ` compat-wireless + Linux 2.6.26.8 testing results Pavel Roskin
@ 2010-02-16 21:23   ` Luis R. Rodriguez
  2010-02-16 22:12     ` Pavel Roskin
  0 siblings, 1 reply; 15+ messages in thread
From: Luis R. Rodriguez @ 2010-02-16 21:23 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linux-wireless

On Sat, Feb 13, 2010 at 9:10 PM, Pavel Roskin <proski@gnu.org> wrote:
> On Fri, 2010-02-12 at 18:10 -0800, Luis R. Rodriguez wrote:
>> The bleeding edge compat-wireless updates were stuck due to a
>> bluetooth hunk failing on net/bluetooth/hidp/core.c, that should be
>> fixed now, at least it compiles for me down to 2.6.27. I also hadn't
>> updated a 2.6.33-rcx releases in a while, as well as 2.6.32.y release.
>> This should all now be in synch with upstream. I never got reports
>> about MQ support on older kernels so I just threw in the code, issues
>> can be dealt with once actually found.
>
> I've tried compiling all three tarballs against Linux 2.6.26.8.  It's a
> kernel with some hardware patches for arm architecture that are hard to
> port to newer kernels, so compat-wireless would be very helpful.
>
> compat-wireless-2.6.32.8 compiles just fine with ath5k selected.
>
> compat-wireless-2.6.33-rc8 fails:
>
> /home/proski/src/compat-wireless-2.6.33-rc8/net/mac80211/util.c: In
> function '__ieee80211_wake_queue':
> /home/proski/src/compat-wireless-2.6.33-rc8/net/mac80211/util.c:290:
> error: implicit declaration of function 'netif_tx_wake_queue'
> /home/proski/src/compat-wireless-2.6.33-rc8/net/mac80211/util.c:290:
> error: implicit declaration of function 'netdev_get_tx_queue'
> /home/proski/src/compat-wireless-2.6.33-rc8/net/mac80211/util.c: In
> function '__ieee80211_stop_queue':
> /home/proski/src/compat-wireless-2.6.33-rc8/net/mac80211/util.c:325:
> error: implicit declaration of function 'netif_tx_stop_queue'
>
> compat-wireless-2010-02-13 fails differently:
>
> /home/proski/src/compat-wireless-2010-02-13/net/mac80211/iface.c: In
> function 'ieee80211_if_setup':
> /home/proski/src/compat-wireless-2010-02-13/net/mac80211/iface.c:738:
> error: 'struct net_device' has no member named 'select_queue'
> /home/proski/src/compat-wireless-2010-02-13/net/mac80211/iface.c: In
> function 'ieee80211_setup_sdata':
> /home/proski/src/compat-wireless-2010-02-13/net/mac80211/iface.c:790:
> error: 'struct net_device' has no member named 'select_queue'
>
> I tried enabling CONFIG_NETDEVICES_MULTIQUEUE, but it made no
> difference.
>
> It looks like compat-wireless-2.6.33-rc8 and compat-wireless-2010-02-13
> don't have the patches to deal with the lack of netif_tx_wake_queue and
> select_queue in Linux 2.6.26.  compat-wireless-2.6.32.8 has such
> patches.

Oh right, so I was hoping to get some reports on results of MQ
backport on 2.6.32.y, I guess its OK enough to merge now and if its
borked we can remove older kernel support or something.

> If all drivers are selected, compat-wireless-2.6.32.8 fails:
>
> In file included
> from /home/proski/src/compat-wireless-2.6.32.8/drivers/net/b44.c:28:
> /home/proski/src/compat-wireless-2.6.32.8/include/linux/ssb/ssb.h: In
> function 'ssb_dma_sync_single_range_for_cpu':
> /home/proski/src/compat-wireless-2.6.32.8/include/linux/ssb/ssb.h:595:
> error: implicit declaration of function 'dma_sync_single_range_for_cpu'
> /home/proski/src/compat-wireless-2.6.32.8/include/linux/ssb/ssb.h: In
> function 'ssb_dma_sync_single_range_for_device':
> /home/proski/src/compat-wireless-2.6.32.8/include/linux/ssb/ssb.h:620:
> error: implicit declaration of function
> 'dma_sync_single_range_for_device'
>
> That appears to be caused by the lack of
> dma_sync_single_range_for_device on the arm architecture.

Interesting... well that would just mean we have to lift SSB off of
2.6.28 kernels.

> Other
> architectures have it.  "make -k" doesn't find any other errors.  All
> other drivers compile fine.

Thanks for the reports and tests.

  Luis

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-16 21:23   ` Luis R. Rodriguez
@ 2010-02-16 22:12     ` Pavel Roskin
  2010-02-16 22:59       ` Luis R. Rodriguez
  0 siblings, 1 reply; 15+ messages in thread
From: Pavel Roskin @ 2010-02-16 22:12 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless

On Tue, 2010-02-16 at 13:23 -0800, Luis R. Rodriguez wrote:

> > It looks like compat-wireless-2.6.33-rc8 and compat-wireless-2010-02-13
> > don't have the patches to deal with the lack of netif_tx_wake_queue and
> > select_queue in Linux 2.6.26.  compat-wireless-2.6.32.8 has such
> > patches.
> 
> Oh right, so I was hoping to get some reports on results of MQ
> backport on 2.6.32.y, I guess its OK enough to merge now and if its
> borked we can remove older kernel support or something.

I confirm that ath5k and ath9k actually work on that kernel, so the
results are good.

There are some funny messages from ath9k, but scanning still works, and
I don't think it's related to compat-wireless:

ath9k 0000:00:01.0: alloc_safe_buffer: could not alloc dma memory (size=3872)
ath9k 0000:00:01.0: map_single: unable to map unsafe buffer c6ffe020!
ath9k 0000:00:01.0: alloc_safe_buffer: could not alloc dma memory (size=3872)
ath9k 0000:00:01.0: map_single: unable to map unsafe buffer c6800020!

> > That appears to be caused by the lack of
> > dma_sync_single_range_for_device on the arm architecture.
> 
> Interesting... well that would just mean we have to lift SSB off of
> 2.6.28 kernels.

Perhaps you mean 2.6.26?  Anyway, I'd rather see
dma_sync_single_range_for_device() for ARM backported.

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-16 22:12     ` Pavel Roskin
@ 2010-02-16 22:59       ` Luis R. Rodriguez
  2010-02-17  0:45         ` Luis R. Rodriguez
  2010-02-18  3:44         ` Pavel Roskin
  0 siblings, 2 replies; 15+ messages in thread
From: Luis R. Rodriguez @ 2010-02-16 22:59 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linux-wireless

On Tue, Feb 16, 2010 at 2:12 PM, Pavel Roskin <proski@gnu.org> wrote:
> On Tue, 2010-02-16 at 13:23 -0800, Luis R. Rodriguez wrote:
>
>> > It looks like compat-wireless-2.6.33-rc8 and compat-wireless-2010-02-13
>> > don't have the patches to deal with the lack of netif_tx_wake_queue and
>> > select_queue in Linux 2.6.26.  compat-wireless-2.6.32.8 has such
>> > patches.
>>
>> Oh right, so I was hoping to get some reports on results of MQ
>> backport on 2.6.32.y, I guess its OK enough to merge now and if its
>> borked we can remove older kernel support or something.
>
> I confirm that ath5k and ath9k actually work on that kernel, so the
> results are good.

Sweet!

> There are some funny messages from ath9k, but scanning still works, and
> I don't think it's related to compat-wireless:
>
> ath9k 0000:00:01.0: alloc_safe_buffer: could not alloc dma memory (size=3872)
> ath9k 0000:00:01.0: map_single: unable to map unsafe buffer c6ffe020!
> ath9k 0000:00:01.0: alloc_safe_buffer: could not alloc dma memory (size=3872)
> ath9k 0000:00:01.0: map_single: unable to map unsafe buffer c6800020!

Interesting, not sure what could cause this.

>> > That appears to be caused by the lack of
>> > dma_sync_single_range_for_device on the arm architecture.
>>
>> Interesting... well that would just mean we have to lift SSB off of
>> 2.6.28 kernels.
>
> Perhaps you mean 2.6.26?

Sorry, for some reason I misunderstood and though you were using
2.6.28. Since you did use 2.6.26 it means you did test the new MQ
code, so great :) I'll move that stuff to bleeding edge code + 2.6.33
branch.

> Anyway, I'd rather see
> dma_sync_single_range_for_device() for ARM backported.

Patches are welcomed for it indeed.

  Luis

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-16 22:59       ` Luis R. Rodriguez
@ 2010-02-17  0:45         ` Luis R. Rodriguez
  2010-02-17  0:51           ` Luis R. Rodriguez
  2010-02-18  3:44         ` Pavel Roskin
  1 sibling, 1 reply; 15+ messages in thread
From: Luis R. Rodriguez @ 2010-02-17  0:45 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linux-wireless

On Tue, Feb 16, 2010 at 2:59 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> On Tue, Feb 16, 2010 at 2:12 PM, Pavel Roskin <proski@gnu.org> wrote:
>> On Tue, 2010-02-16 at 13:23 -0800, Luis R. Rodriguez wrote:
>>
>>> > It looks like compat-wireless-2.6.33-rc8 and compat-wireless-2010-02-13
>>> > don't have the patches to deal with the lack of netif_tx_wake_queue and
>>> > select_queue in Linux 2.6.26.  compat-wireless-2.6.32.8 has such
>>> > patches.
>>>
>>> Oh right, so I was hoping to get some reports on results of MQ
>>> backport on 2.6.32.y, I guess its OK enough to merge now and if its
>>> borked we can remove older kernel support or something.
>>
>> I confirm that ath5k and ath9k actually work on that kernel, so the
>> results are good.
>
> Sweet!

Hey OK so I propagated MQ support into compat-wireless based on
linux-next. I just hit a snag I forgot about and explains more
logically why I hadn't moved MQ support to bleeding edge:
debugfs_remove_recursive() needs some backport work as well. Last I
looked at it, I determined we could not directly backport it as it
relied on two internal globals on fs/debugfs/inode.c. I did copy over
the code onto compat/compat-2.6.26.c but ifdef'd it out for now.

One option is to disable debugfs on compat-wireless for older kernels
or if you figure out a way to backport that call without using a
global even better. For now I just can't work on this but I do welcome
patches if someone manages to pull off backporting it.

  CC [M]  /home/mcgrof/devel/compat-wireless-2.6/net/mac80211/rate.o
/home/mcgrof/devel/compat-wireless-2.6/net/mac80211/rate.c: In
function ‘rate_control_release’:
/home/mcgrof/devel/compat-wireless-2.6/net/mac80211/rate.c:190: error:
implicit declaration of function ‘debugfs_remove_recursive’
make[3]: *** [/home/mcgrof/devel/compat-wireless-2.6/net/mac80211/rate.o]
Error 1
make[2]: *** [/home/mcgrof/devel/compat-wireless-2.6/net/mac80211] Error 2
make[1]: *** [_module_/home/mcgrof/devel/compat-wireless-2.6] Error 2
make[1]: Leaving directory `/home/mcgrof/kernels/linux-2.6.26.8'

  Luis

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-17  0:45         ` Luis R. Rodriguez
@ 2010-02-17  0:51           ` Luis R. Rodriguez
  2010-02-18  4:23             ` Pavel Roskin
  0 siblings, 1 reply; 15+ messages in thread
From: Luis R. Rodriguez @ 2010-02-17  0:51 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linux-wireless

On Tue, Feb 16, 2010 at 4:45 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:

> Hey OK so I propagated MQ support into compat-wireless based on
> linux-next. I just hit a snag I forgot about and explains more
> logically why I hadn't moved MQ support to bleeding edge:
> debugfs_remove_recursive() needs some backport work as well. Last I
> looked at it, I determined we could not directly backport it as it
> relied on two internal globals on fs/debugfs/inode.c. I did copy over
> the code onto compat/compat-2.6.26.c but ifdef'd it out for now.
>
> One option is to disable debugfs on compat-wireless for older kernels
> or if you figure out a way to backport that call without using a
> global even better. For now I just can't work on this but I do welcome
> patches if someone manages to pull off backporting it.
>
>  CC [M]  /home/mcgrof/devel/compat-wireless-2.6/net/mac80211/rate.o
> /home/mcgrof/devel/compat-wireless-2.6/net/mac80211/rate.c: In
> function ‘rate_control_release’:
> /home/mcgrof/devel/compat-wireless-2.6/net/mac80211/rate.c:190: error:
> implicit declaration of function ‘debugfs_remove_recursive’
> make[3]: *** [/home/mcgrof/devel/compat-wireless-2.6/net/mac80211/rate.o]
> Error 1
> make[2]: *** [/home/mcgrof/devel/compat-wireless-2.6/net/mac80211] Error 2
> make[1]: *** [_module_/home/mcgrof/devel/compat-wireless-2.6] Error 2
> make[1]: Leaving directory `/home/mcgrof/kernels/linux-2.6.26.8'

FWIW the two globals can be seen here:

simple_release_fs(&debugfs_mount, &debugfs_mount_count);

Not sure how to deal with that.

  Luis

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-16 22:59       ` Luis R. Rodriguez
  2010-02-17  0:45         ` Luis R. Rodriguez
@ 2010-02-18  3:44         ` Pavel Roskin
  2010-02-18 18:29           ` Luis R. Rodriguez
  1 sibling, 1 reply; 15+ messages in thread
From: Pavel Roskin @ 2010-02-18  3:44 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless

On Tue, 2010-02-16 at 14:59 -0800, Luis R. Rodriguez wrote:

> > Anyway, I'd rather see
> > dma_sync_single_range_for_device() for ARM backported.
> 
> Patches are welcomed for it indeed.

Here's the patch.  I'm not sure if include/net/compat-2.6.27.h or
compat/compat-2.6.27.h is the real source file, as I was patching the
downloaded tarball.

The missing functions are only used by b44.  The functions available in
2.6.26 don't have the offset argument, so I had to extend the range to
start at zero.  This could affect the b44 throughput, but I would not
worry too much about it.

The is another problem.  For some reason, CONFIG_SSB_PCMCIAHOST is
enabled in compat_autoconf.h, even though the target kernel lacks PCMCIA
support.  However, CONFIG_SSB_PCMCIAHOST is not set in the makefiles, so
ssb.ko is compiled with CONFIG_SSB_PCMCIAHOST, but pcmcia.o is not
linked into it, which leads to unresolved symbols.  However, the build
succeeds and there are no warnings about it.


--- a/include/net/compat-2.6.27.h
+++ b/include/net/compat-2.6.27.h
@@ -185,4 +185,28 @@
 
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */
 
+#ifdef CONFIG_ARM
+
+/*
+ * The caller asks to handle a range between offset and offset + size,
+ * but we process a larger range from 0 to offset + size due to lack of
+ * offset support.
+ */
+
+static inline void dma_sync_single_range_for_cpu(struct device *dev,
+		dma_addr_t handle, unsigned long offset, size_t size,
+		enum dma_data_direction dir)
+{
+	dma_sync_single_for_cpu(dev, handle, offset + size, dir);
+}
+
+static inline void dma_sync_single_range_for_device(struct device *dev,
+		dma_addr_t handle, unsigned long offset, size_t size,
+		enum dma_data_direction dir)
+{
+	dma_sync_single_for_device(dev, handle, offset + size, dir);
+}
+
+#endif /* arm */
+
 #endif /* LINUX_26_27_COMPAT_H */

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-17  0:51           ` Luis R. Rodriguez
@ 2010-02-18  4:23             ` Pavel Roskin
  2010-02-18  6:15               ` Pavel Roskin
  0 siblings, 1 reply; 15+ messages in thread
From: Pavel Roskin @ 2010-02-18  4:23 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless

On Tue, 2010-02-16 at 16:51 -0800, Luis R. Rodriguez wrote:

> FWIW the two globals can be seen here:
> 
> simple_release_fs(&debugfs_mount, &debugfs_mount_count);
> 
> Not sure how to deal with that.

I think the safest approach would be to reimplement
debugfs_remove_recursive() using only debugfs_remove().  It would only
use the debugfs internals to find the children.  I would even avoid
looking for siblings.

The idea is to descend the directory structure from the top (i.e. the
directory to be removed) to look for a child that is a file or an empty
directory and remove it.  Then start from the top and do the same until
the top directory has no children.  Then remove the top directory.

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-18  4:23             ` Pavel Roskin
@ 2010-02-18  6:15               ` Pavel Roskin
  2010-02-18 18:30                 ` Luis R. Rodriguez
  0 siblings, 1 reply; 15+ messages in thread
From: Pavel Roskin @ 2010-02-18  6:15 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless

On Wed, 2010-02-17 at 23:23 -0500, Pavel Roskin wrote:

> The idea is to descend the directory structure from the top (i.e. the
> directory to be removed) to look for a child that is a file or an empty
> directory and remove it.  Then start from the top and do the same until
> the top directory has no children.  Then remove the top directory.

Here it is.  I tested it by actually replacing the original function in
wireless-testing.  I checked unloading all wireless drivers.  I also
tested error handling by keeping a file in debugfs open while removing
the modules.

I could compile it against Linux 2.6.26, so it's portable enough for our
purposes.


void debugfs_remove_recursive(struct dentry *dentry)
{
	struct dentry *last = NULL;

	/* Sanity checks */
	if (!dentry || !dentry->d_parent || !dentry->d_parent->d_inode)
		return;

	while (dentry != last) {
		struct dentry *child = dentry;

		/* Find a child without children */
		while (!list_empty(&child->d_subdirs))
			child = list_entry(child->d_subdirs.next, struct dentry,
					   d_u.d_child);

		/* Bail out if we already tried to remove that entry */
		if (child == last)
			return;

		last = child;
		debugfs_remove(child);
	}
}

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-18  3:44         ` Pavel Roskin
@ 2010-02-18 18:29           ` Luis R. Rodriguez
  2010-02-18 19:18             ` Luis R. Rodriguez
  0 siblings, 1 reply; 15+ messages in thread
From: Luis R. Rodriguez @ 2010-02-18 18:29 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Luis R. Rodriguez, linux-wireless

On Wed, Feb 17, 2010 at 10:44:35PM -0500, Pavel Roskin wrote:
> On Tue, 2010-02-16 at 14:59 -0800, Luis R. Rodriguez wrote:
> 
> > > Anyway, I'd rather see
> > > dma_sync_single_range_for_device() for ARM backported.
> > 
> > Patches are welcomed for it indeed.
> 
> Here's the patch.  I'm not sure if include/net/compat-2.6.27.h or
> compat/compat-2.6.27.h is the real source file, as I was patching the
> downloaded tarball.

For 2.6.32 compat.ko is not created and it is also not managed through
a separate git tree so compat/compat-2.6.27.h would have been the right
file for patching purposes.

I tend to prefer to apply things first on bleeding edge and then trickle
things down just as with upstream. I started to package the general
kernel compatibility stuff into its own git tree for the 2.6.33 release,
so for future compat-wireless compat-*.[ch] files go there and patches
should be sent against:

git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/compat.git

In that tree I have branches for each stable release, just as with
the compat-wireless git tree. I apply on the master for bleedinge edge
and then trickle down the stable releases.

Thanks for your patch I have sucked it in and applied it to all
the respective trees.

> The missing functions are only used by b44.  The functions available in
> 2.6.26 don't have the offset argument, so I had to extend the range to
> start at zero.  This could affect the b44 throughput, but I would not
> worry too much about it.
> 
> The is another problem.  For some reason, CONFIG_SSB_PCMCIAHOST is
> enabled in compat_autoconf.h, even though the target kernel lacks PCMCIA
> support.  However, CONFIG_SSB_PCMCIAHOST is not set in the makefiles, so
> ssb.ko is compiled with CONFIG_SSB_PCMCIAHOST, but pcmcia.o is not
> linked into it, which leads to unresolved symbols.  However, the build
> succeeds and there are no warnings about it.

Ah, try this patch, or you can just git pull.

From: Luis R. Rodriguez <lrodriguez@atheros.com>
Date: Thu, 18 Feb 2010 10:17:52 -0800
Subject: [PATCH] compat-wireless: make CONFIG_SSB_PCMCIAHOST depend on CONFIG_PCMCIA

The dependency was created but since we don't use our own mconf magic
thing we have to create our own build dep for our
include/linux/compat_autoconf.h file. We currently handle these sort
of dependencies on a case by case basis as compat-wireless was
relatively simple.

Adding this case would generate this on the compat_autoconf.h file:

ifdef CONFIG_PCMCIA
ifndef CONFIG_SSB_PCMCIAHOST
define CONFIG_SSB_PCMCIAHOST 1
endif /* CONFIG_SSB_PCMCIAHOST */
else

Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 scripts/gen-compat-autoconf.sh |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
index 6c7cae7..6184392 100755
--- a/scripts/gen-compat-autoconf.sh
+++ b/scripts/gen-compat-autoconf.sh
@@ -169,6 +169,10 @@ for i in $(grep '^CONFIG_' $COMPAT_CONFIG); do
 		define_config_dep $VAR $VALUE CONFIG_USB_NET_CDCETHER
 		continue
 		;;
+	CONFIG_SSB_PCMCIAHOST)
+		define_config_dep $VAR $VALUE CONFIG_PCMCIA
+		continue
+		;;
 	# ignore this, we have a special hanlder for this at the botttom
 	# instead. We still need to keep this in config.mk to let Makefiles
 	# know its enabled so just ignore it here.
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-18  6:15               ` Pavel Roskin
@ 2010-02-18 18:30                 ` Luis R. Rodriguez
  2010-02-20  0:21                   ` Pavel Roskin
  0 siblings, 1 reply; 15+ messages in thread
From: Luis R. Rodriguez @ 2010-02-18 18:30 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Luis R. Rodriguez, linux-wireless

On Thu, Feb 18, 2010 at 01:15:34AM -0500, Pavel Roskin wrote:
> On Wed, 2010-02-17 at 23:23 -0500, Pavel Roskin wrote:
> 
> > The idea is to descend the directory structure from the top (i.e. the
> > directory to be removed) to look for a child that is a file or an empty
> > directory and remove it.  Then start from the top and do the same until
> > the top directory has no children.  Then remove the top directory.
> 
> Here it is.  I tested it by actually replacing the original function in
> wireless-testing.  I checked unloading all wireless drivers.  I also
> tested error handling by keeping a file in debugfs open while removing
> the modules.
> 
> I could compile it against Linux 2.6.26, so it's portable enough for our
> purposes.
> 
> 
> void debugfs_remove_recursive(struct dentry *dentry)
> {
> 	struct dentry *last = NULL;
> 
> 	/* Sanity checks */
> 	if (!dentry || !dentry->d_parent || !dentry->d_parent->d_inode)
> 		return;
> 
> 	while (dentry != last) {
> 		struct dentry *child = dentry;
> 
> 		/* Find a child without children */
> 		while (!list_empty(&child->d_subdirs))
> 			child = list_entry(child->d_subdirs.next, struct dentry,
> 					   d_u.d_child);
> 
> 		/* Bail out if we already tried to remove that entry */
> 		if (child == last)
> 			return;
> 
> 		last = child;
> 		debugfs_remove(child);
> 	}
> }

Sweeet, thanks a lot! I've sucked this into all the respective git trees. This
means we now have backporting re-enabled on bleeding edge for kernels older
than 2.6.27 (whoopdi-free'kin-doo for those who are on those ancient kernels).

  Luis

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-18 18:29           ` Luis R. Rodriguez
@ 2010-02-18 19:18             ` Luis R. Rodriguez
  0 siblings, 0 replies; 15+ messages in thread
From: Luis R. Rodriguez @ 2010-02-18 19:18 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Pavel Roskin, linux-wireless

On Thu, Feb 18, 2010 at 10:29 AM, Luis R. Rodriguez
<mcgrof@bombadil.infradead.org> wrote:
> On Wed, Feb 17, 2010 at 10:44:35PM -0500, Pavel Roskin wrote:
>> On Tue, 2010-02-16 at 14:59 -0800, Luis R. Rodriguez wrote:
>>
>> > > Anyway, I'd rather see
>> > > dma_sync_single_range_for_device() for ARM backported.
>> >
>> > Patches are welcomed for it indeed.
>>
>> Here's the patch.  I'm not sure if include/net/compat-2.6.27.h or
>> compat/compat-2.6.27.h is the real source file, as I was patching the
>> downloaded tarball.
>
> For 2.6.32 compat.ko is not created and it is also not managed through
> a separate git tree so compat/compat-2.6.27.h would have been the right
> file for patching purposes.
>
> I tend to prefer to apply things first on bleeding edge and then trickle
> things down just as with upstream. I started to package the general
> kernel compatibility stuff into its own git tree for the 2.6.33 release,
> so for future compat-wireless compat-*.[ch] files go there and patches
> should be sent against:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/compat.git
>
> In that tree I have branches for each stable release, just as with
> the compat-wireless git tree. I apply on the master for bleedinge edge
> and then trickle down the stable releases.
>
> Thanks for your patch I have sucked it in and applied it to all
> the respective trees.
>
>> The missing functions are only used by b44.  The functions available in
>> 2.6.26 don't have the offset argument, so I had to extend the range to
>> start at zero.  This could affect the b44 throughput, but I would not
>> worry too much about it.
>>
>> The is another problem.  For some reason, CONFIG_SSB_PCMCIAHOST is
>> enabled in compat_autoconf.h, even though the target kernel lacks PCMCIA
>> support.  However, CONFIG_SSB_PCMCIAHOST is not set in the makefiles, so
>> ssb.ko is compiled with CONFIG_SSB_PCMCIAHOST, but pcmcia.o is not
>> linked into it, which leads to unresolved symbols.  However, the build
>> succeeds and there are no warnings about it.
>
> Ah, try this patch, or you can just git pull.
>
> From: Luis R. Rodriguez <lrodriguez@atheros.com>
> Date: Thu, 18 Feb 2010 10:17:52 -0800
> Subject: [PATCH] compat-wireless: make CONFIG_SSB_PCMCIAHOST depend on CONFIG_PCMCIA
>
> The dependency was created but since we don't use our own mconf magic
> thing we have to create our own build dep for our
> include/linux/compat_autoconf.h file. We currently handle these sort
> of dependencies on a case by case basis as compat-wireless was
> relatively simple.
>
> Adding this case would generate this on the compat_autoconf.h file:
>
> ifdef CONFIG_PCMCIA
> ifndef CONFIG_SSB_PCMCIAHOST
> define CONFIG_SSB_PCMCIAHOST 1
> endif /* CONFIG_SSB_PCMCIAHOST */
> else
>
> Reported-by: Pavel Roskin <proski@gnu.org>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
>  scripts/gen-compat-autoconf.sh |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
> index 6c7cae7..6184392 100755
> --- a/scripts/gen-compat-autoconf.sh
> +++ b/scripts/gen-compat-autoconf.sh
> @@ -169,6 +169,10 @@ for i in $(grep '^CONFIG_' $COMPAT_CONFIG); do
>                define_config_dep $VAR $VALUE CONFIG_USB_NET_CDCETHER
>                continue
>                ;;
> +       CONFIG_SSB_PCMCIAHOST)
> +               define_config_dep $VAR $VALUE CONFIG_PCMCIA
> +               continue
> +               ;;
>        # ignore this, we have a special hanlder for this at the botttom
>        # instead. We still need to keep this in config.mk to let Makefiles
>        # know its enabled so just ignore it here.

Sorry, I just noticed this would break CONFIG_B43_PCMCIA, and making
that also depend on PCMCIA doesn't work on my end. Eh.

  Luis

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-18 18:30                 ` Luis R. Rodriguez
@ 2010-02-20  0:21                   ` Pavel Roskin
  2010-02-20  2:37                     ` Luis R. Rodriguez
  0 siblings, 1 reply; 15+ messages in thread
From: Pavel Roskin @ 2010-02-20  0:21 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Luis R. Rodriguez, linux-wireless

On Thu, 2010-02-18 at 13:30 -0500, Luis R. Rodriguez wrote:

> Sweeet, thanks a lot! I've sucked this into all the respective git trees. This
> means we now have backporting re-enabled on bleeding edge for kernels older
> than 2.6.27 (whoopdi-free'kin-doo for those who are on those ancient kernels).

debugfs_remove_recursive() was misplaced.  It should be in
compat-2.6.27, as it appeared in Linux 2.6.27.  With that change,
compat-wireless compiles for 2.6.26.8 for Gateworks Cambria boards :)

Thank you for your great work on compat-wireless!

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: compat-wireless + Linux 2.6.26.8 testing results
  2010-02-20  0:21                   ` Pavel Roskin
@ 2010-02-20  2:37                     ` Luis R. Rodriguez
  0 siblings, 0 replies; 15+ messages in thread
From: Luis R. Rodriguez @ 2010-02-20  2:37 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Luis R. Rodriguez, linux-wireless

On Fri, Feb 19, 2010 at 4:21 PM, Pavel Roskin <proski@gnu.org> wrote:
> On Thu, 2010-02-18 at 13:30 -0500, Luis R. Rodriguez wrote:
>
>> Sweeet, thanks a lot! I've sucked this into all the respective git trees. This
>> means we now have backporting re-enabled on bleeding edge for kernels older
>> than 2.6.27 (whoopdi-free'kin-doo for those who are on those ancient kernels).
>
> debugfs_remove_recursive() was misplaced.  It should be in
> compat-2.6.27, as it appeared in Linux 2.6.27.  With that change,
> compat-wireless compiles for 2.6.26.8 for Gateworks Cambria boards :)

Neat!

> Thank you for your great work on compat-wireless!

Thanks for your patches :D

  Luis

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-02-20  2:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-13  2:10 compat-wireless updated for 2.6.33-rc8, 2.6.32.8 and next-20100212 Luis R. Rodriguez
2010-02-14  5:10 ` compat-wireless + Linux 2.6.26.8 testing results Pavel Roskin
2010-02-16 21:23   ` Luis R. Rodriguez
2010-02-16 22:12     ` Pavel Roskin
2010-02-16 22:59       ` Luis R. Rodriguez
2010-02-17  0:45         ` Luis R. Rodriguez
2010-02-17  0:51           ` Luis R. Rodriguez
2010-02-18  4:23             ` Pavel Roskin
2010-02-18  6:15               ` Pavel Roskin
2010-02-18 18:30                 ` Luis R. Rodriguez
2010-02-20  0:21                   ` Pavel Roskin
2010-02-20  2:37                     ` Luis R. Rodriguez
2010-02-18  3:44         ` Pavel Roskin
2010-02-18 18:29           ` Luis R. Rodriguez
2010-02-18 19:18             ` Luis R. Rodriguez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.