* [PATCH 1/1 linux-next] hp100: simplify hp100_module_init
From: Fabian Frederick @ 2015-01-03 13:44 UTC (permalink / raw)
To: linux-kernel; +Cc: Fabian Frederick, Jaroslav Kysela, netdev
-Avoid double goto and directly return err where possible.
-Remove unused labels which fixes:
drivers/net/ethernet/hp/hp100.c:3047:2: warning: label
'out3' defined but not used [-Wunused-label]
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
This is untested.
drivers/net/ethernet/hp/hp100.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c
index ae6e30d..7155938 100644
--- a/drivers/net/ethernet/hp/hp100.c
+++ b/drivers/net/ethernet/hp/hp100.c
@@ -3031,26 +3031,25 @@ static int __init hp100_module_init(void)
err = hp100_isa_init();
if (err && err != -ENODEV)
- goto out;
+ return err;
#ifdef CONFIG_EISA
err = eisa_driver_register(&hp100_eisa_driver);
if (err && err != -ENODEV)
- goto out2;
+ goto out_eisa;
+ else
+ return err;
#endif
#ifdef CONFIG_PCI
err = pci_register_driver(&hp100_pci_driver);
- if (err && err != -ENODEV)
- goto out3;
+ if (!err || err == -ENODEV)
+ return err;
#endif
- out:
- return err;
- out3:
#ifdef CONFIG_EISA
eisa_driver_unregister (&hp100_eisa_driver);
- out2:
+ out_eisa:
#endif
hp100_isa_cleanup();
- goto out;
+ return err;
}
--
2.1.0
^ permalink raw reply related
* [PATCH net-next] enic: reconfigure resources for kdump crash kernel
From: Govindarajulu Varadarajan @ 2015-01-03 14:05 UTC (permalink / raw)
To: davem, netdev; +Cc: ssujith, benve, Govindarajulu Varadarajan
When running in kdump kernel, reduce number of resources used by the driver.
This will enable NIC to operate in low memory kdump kernel environment.
Also change the driver version to .83
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
---
drivers/net/ethernet/cisco/enic/enic.h | 2 +-
drivers/net/ethernet/cisco/enic/enic_main.c | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cisco/enic/enic.h b/drivers/net/ethernet/cisco/enic/enic.h
index d2a1035..84b6a2b 100644
--- a/drivers/net/ethernet/cisco/enic/enic.h
+++ b/drivers/net/ethernet/cisco/enic/enic.h
@@ -33,7 +33,7 @@
#define DRV_NAME "enic"
#define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver"
-#define DRV_VERSION "2.1.1.67"
+#define DRV_VERSION "2.1.1.83"
#define DRV_COPYRIGHT "Copyright 2008-2013 Cisco Systems, Inc"
#define ENIC_BARS_MAX 6
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 142c9b5..9027fc1 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -45,6 +45,7 @@
#ifdef CONFIG_NET_RX_BUSY_POLL
#include <net/busy_poll.h>
#endif
+#include <linux/crash_dump.h>
#include "cq_enet_desc.h"
#include "vnic_dev.h"
@@ -2265,6 +2266,18 @@ static void enic_dev_deinit(struct enic *enic)
enic_clear_intr_mode(enic);
}
+static void enic_kdump_kernel_config(struct enic *enic)
+{
+ if (is_kdump_kernel()) {
+ dev_info(enic_get_dev(enic), "Running from within kdump kernel. Using minimal resources\n");
+ enic->rq_count = 1;
+ enic->wq_count = 1;
+ enic->config.rq_desc_count = ENIC_MIN_RQ_DESCS;
+ enic->config.wq_desc_count = ENIC_MIN_WQ_DESCS;
+ enic->config.mtu = min_t(u16, 1500, enic->config.mtu);
+ }
+}
+
static int enic_dev_init(struct enic *enic)
{
struct device *dev = enic_get_dev(enic);
@@ -2294,6 +2307,10 @@ static int enic_dev_init(struct enic *enic)
enic_get_res_counts(enic);
+ /* modify resource count if we are in kdump_kernel
+ */
+ enic_kdump_kernel_config(enic);
+
/* Set interrupt mode based on resource counts and system
* capabilities
*/
--
2.2.1
^ permalink raw reply related
* Re: [PATCH] can: kvaser_usb: Don't free packets when tight on URBs
From: Ahmed S. Darwish @ 2015-01-03 14:34 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Olivier Sobrie, Oliver Hartkopp, Wolfgang Grandegger,
Marc Kleine-Budde, David S. Miller, Paul Gortmaker, Linux-CAN,
netdev, LKML
In-Reply-To: <20150101135913.6205ce0e@urahara>
On Thu, Jan 01, 2015 at 01:59:13PM -0800, Stephen Hemminger wrote:
> On Tue, 23 Dec 2014 17:46:54 +0200
> "Ahmed S. Darwish" <darwish.07@gmail.com> wrote:
>
> > int ret = NETDEV_TX_OK;
> > + bool kfree_skb_on_error = true;
> >
> > if (can_dropped_invalid_skb(netdev, skb))
> > return NETDEV_TX_OK;
> > @@ -1336,6 +1337,7 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
> >
> > if (!context) {
> > netdev_warn(netdev, "cannot find free context\n");
> > + kfree_skb_on_error = false;
> > ret = NETDEV_TX_BUSY;
>
> You already have a flag value (ret == NETDEV_TX_BUSY), why
> not use that instead of introducing another variable?
Yes, that variable got implicitly removed in v2 patch 1/4.
Thanks,
--
Darwish
^ permalink raw reply
* Re: [PATCH] net: wireless: b43legacy: radio.c: Remove unused function
From: Rickard Strandqvist @ 2015-01-03 14:45 UTC (permalink / raw)
To: Sedat Dilek
Cc: Rafał Miłecki, Larry Finger, Stefano Brivio,
Network Development, linux-wireless@vger.kernel.org,
Linux Kernel Mailing List, b43-dev
In-Reply-To: <CA+icZUUJfemKC85=p7Huyw7xwfUdXBhePseJCnUKLx9edgpT4w@mail.gmail.com>
2015-01-03 14:19 GMT+01:00 Sedat Dilek <sedat.dilek@gmail.com>:
>
> On Sat, Jan 3, 2015 at 1:28 PM, Rickard Strandqvist
> <rickard_strandqvist@spectrumdigital.se> wrote:
> > 2015-01-02 22:34 GMT+01:00 Rafał Miłecki <zajec5@gmail.com>:
> >>
> >> On 2 January 2015 at 18:46, Rickard Strandqvist
> >> <rickard_strandqvist@spectrumdigital.se> wrote:
> >> > 2015-01-02 13:14 GMT+01:00 Sedat Dilek <sedat.dilek@gmail.com>:
> >> >>
> >> >> On Fri, Jan 2, 2015 at 1:06 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
> >> >> > On 2 January 2015 at 13:05, Rafał Miłecki <zajec5@gmail.com> wrote:
> >> >> >> On 1 January 2015 at 16:46, Rickard Strandqvist
> >> >> >> <rickard_strandqvist@spectrumdigital.se> wrote:
> >> >> >>> Remove the function b43legacy_radio_set_tx_iq() that is not used
> >> >> >>> anywhere.
> >> >> >>>
> >> >> >>> This was partially found by using a static code analysis program
> >> >> >>> called cppcheck.
> >> >> >>
> >> >> >> It seems to be for A-PHY based hardware (with 0x2060 radio id) which
> >> >> >> is not handled by b43legacy. Should be safe to drop this code (we
> >> >> >> won't likely need it).
> >> >> >>
> >> >> >> Ack
> >> >> >
> >> >> > For future, we prefix patches with just a driver name. So this could
> >> >> > be simply called
> >> >> > b43legacy: radio.c: Remove unused function
> >> >> >
> >> >>
> >> >> Alternatively...
> >> >>
> >> >> "b43legacy: Remove unused function in radio.c"
> >> >>
> >> >> BTW, as Arnd Bergmann pointed out [1] how did you test with cppcheck
> >> >> to get such stuff?
> >> >>
> >> >> - Sedat -
> >> >>
> >> >> [1] https://lkml.org/lkml/2015/1/2/51
> >> >
> >> >
> >> >
> >> > Hi Rafal and Sedat
> >> >
> >> > Rafal do you mean I should remove the entire b43legacy part?
> >>
> >> 1) I gave you Ack for the changes
> >> 2) You could drop "net: wireless: " or better use something Sedat proposed
> >>
> >> --
> >> Rafał
> >
> >
> >
> > Hi
> >
> > Nice, yes I miss the Ack :)
> >
> > I just got one more complaining about my subject-line in "net: wireless: "
> > I use some sed call for this, so it's easy to fix. I will now remove that
> > part hereinafter.
> > I check in Documentation/ but did not find any clear info for this.
> >
>
> The easiest way to make (sub)maintainers happy is to check the git-log...
>
> $ git log --oneline /path/to/file
>
> ...and look how other contributors labeled their patches.
>
> [1] is the 1st address to look at on how to submit patches to Linux-kernel.
> To promote the good work of Greg, see [2,3] for a video and tutorial
> on that topic, too.
>
> - Sedat -
>
> [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches
> [2] https://www.youtube.com/watch?v=XXix80GCvpo
> [3] https://github.com/gregkh/kernel-tutorial
Hi Sedat
Thanks for the tip :)
To bad with the audio in the video thow. Have read SubmittingPatches before.
But I have now added a line in my script that does a:
git log -10 --oneline
So I can at least see the other subjekt lines, and make adjustments if
necessary.
Kind regards
Rickard Strandqvist
^ permalink raw reply
* Re: [PATCH] net: wireless: b43legacy: radio.c: Remove unused function
From: Sedat Dilek @ 2015-01-03 14:51 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Rafał Miłecki, Larry Finger, Stefano Brivio,
Network Development,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Linux Kernel Mailing List, b43-dev
In-Reply-To: <CAKXHbyPm+2gy3E_FAVY82ggvJhWe-E_xtrhgeAPxUyRS-FutaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sat, Jan 3, 2015 at 3:45 PM, Rickard Strandqvist
<rickard_strandqvist-IW2WV5XWFqGZkjO+N0TKoMugMpMbD5Xr@public.gmane.org> wrote:
[ ... ]
>> > I just got one more complaining about my subject-line in "net: wireless: "
>> > I use some sed call for this, so it's easy to fix. I will now remove that
>> > part hereinafter.
>> > I check in Documentation/ but did not find any clear info for this.
>> >
>>
>> The easiest way to make (sub)maintainers happy is to check the git-log...
>>
>> $ git log --oneline /path/to/file
>>
>> ...and look how other contributors labeled their patches.
>>
>> [1] is the 1st address to look at on how to submit patches to Linux-kernel.
>> To promote the good work of Greg, see [2,3] for a video and tutorial
>> on that topic, too.
>>
>> - Sedat -
>>
>> [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches
>> [2] https://www.youtube.com/watch?v=XXix80GCvpo
>> [3] https://github.com/gregkh/kernel-tutorial
>
>
>
> Hi Sedat
>
> Thanks for the tip :)
>
> To bad with the audio in the video thow. Have read SubmittingPatches before.
>
AFAICS there is another (earlier) video "Write and Submit your first
Linux kernel Patch" from FOSDEM 2010.
For German readers I can recommend the book from [2] (no I get no
money for promotion).
- Sedat -
[1] https://www.youtube.com/watch?v=LLBrBBImJt4
[2] http://www.opensourcepress.de/de/produkte/Git/33227/978-3-95539-119-5-
>
> But I have now added a line in my script that does a:
>
> git log -10 --oneline
>
> So I can at least see the other subjekt lines, and make adjustments if
> necessary.
>
>
>
> Kind regards
> Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH] Revert "ipw2200: select CFG80211_WEXT"
From: Paul Bolle @ 2015-01-03 14:59 UTC (permalink / raw)
To: Stanislav Yakovlev, Kalle Valo
Cc: Jiri Kosina, Linus Torvalds, linux-wireless, netdev, linux-kernel
This reverts commit dddd60220f41775e634258efd1b54c6fa81ce706.
The raison d'être of commit dddd60220f41 ("ipw2200: select
CFG80211_WEXT") was reverted in commit 2d36e008739e ("Revert "cfg80211:
make WEXT compatibility unselectable""). So revert this commit too.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
drivers/net/wireless/ipw2x00/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ipw2x00/Kconfig b/drivers/net/wireless/ipw2x00/Kconfig
index 21de4fe6cf2d..91c0cb3c368e 100644
--- a/drivers/net/wireless/ipw2x00/Kconfig
+++ b/drivers/net/wireless/ipw2x00/Kconfig
@@ -65,8 +65,7 @@ config IPW2100_DEBUG
config IPW2200
tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection"
- depends on PCI && CFG80211
- select CFG80211_WEXT
+ depends on PCI && CFG80211 && CFG80211_WEXT
select WIRELESS_EXT
select WEXT_SPY
select WEXT_PRIV
--
2.1.0
^ permalink raw reply related
* Re: [PATCH] Drivers: isdn: gigaset: checkpatch cleanup
From: Tilman Schmidt @ 2015-01-03 15:01 UTC (permalink / raw)
To: Bas Peters; +Cc: hjlipp, isdn, gigaset307x-common, netdev, linux-kernel
In-Reply-To: <1420047298-7798-1-git-send-email-baspeters93@gmail.com>
[I only just noticed that my first reply got terribly mangled by my
mailer, so here it is again, hopefully more readable this time.]
Hello Bas,
I have several objections to your patch.
Am 31.12.2014 um 18:34 schrieb Bas Peters:
> I have not been able to test the code as I do not have access to the
> hardware but since no new features were really added I don't think that
> should pose a problem.
It's always problematic to change code you cannot test.
At the very least, if you do coding style cleanups you should test
whether the result still compiles and generates the same code as before.
> --- a/drivers/isdn/gigaset/bas-gigaset.c
> +++ b/drivers/isdn/gigaset/bas-gigaset.c
> @@ -261,11 +261,12 @@ static inline void dump_urb(enum debuglevel level, const char *tag,
> {
> #ifdef CONFIG_GIGASET_DEBUG
> int i;
> +
> gig_dbg(level, "%s urb(0x%08lx)->{", tag, (unsigned long) urb);
> if (urb) {
> gig_dbg(level,
> - " dev=0x%08lx, pipe=%s:EP%d/DV%d:%s, "
> - "hcpriv=0x%08lx, transfer_flags=0x%x,",
> + " dev=0x%08lx, pipe=%s:EP%d/DV%d:%s,
> + hcpriv=0x%08lx, transfer_flags=0x%x,",
This is syntactically wrong and won't compile. You cannot have an
unescaped newline inside a string literal. (Applies to two later
chunks, too.)
> @@ -566,8 +566,8 @@ static int atread_submit(struct cardstate *cs, int timeout)
>
> if (basstate & BS_SUSPEND) {
> dev_notice(cs->dev,
> - "HD_READ_ATMESSAGE not submitted, "
> - "suspend in progress\n");
> + "HD_READ_ATMESSAGE not submitted,\
> + suspend in progress\n");
This makes the message less readable by inserting lots of whitespace
after the comma. (Applies to five later chunks, too.)
> @@ -2312,13 +2312,13 @@ static int gigaset_probe(struct usb_interface *interface,
> /* Reject application specific interfaces
> */
> if (hostif->desc.bInterfaceClass != 255) {
> - dev_warn(&udev->dev, "%s: bInterfaceClass == %d\n",
> + dev_warn(&udev->dev, "%s: bInterfaceClass == %d\n",\
> __func__, hostif->desc.bInterfaceClass);
> return -ENODEV;
> }
>
> dev_info(&udev->dev,
> - "%s: Device matched (Vendor: 0x%x, Product: 0x%x)\n",
> + "%s: Device matched (Vendor: 0x%x, Product: 0x%x)\n",\
> __func__, le16_to_cpu(udev->descriptor.idVendor),
> le16_to_cpu(udev->descriptor.idProduct));
This looks strange, and not like correct coding style. Why would you
want to escape the end of line after a function argument?
> --- a/drivers/isdn/gigaset/capi.c
> +++ b/drivers/isdn/gigaset/capi.c
> @@ -1370,7 +1373,7 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
> cmsg->adr.adrPLCI |= (bcs->channel + 1) << 8;
>
> /* build command table */
> - commands = kzalloc(AT_NUM * (sizeof *commands), GFP_KERNEL);
> + commands = kzalloc(AT_NUM * (sizeof(*commands)), GFP_KERNEL);
Extra pair of parentheses around sizeof(*commands) is unnecessary.
(Applies to one later chunk, too.)
> --- a/drivers/isdn/gigaset/common.c
> +++ b/drivers/isdn/gigaset/common.c
> @@ -53,7 +53,7 @@ void gigaset_dbg_buffer(enum debuglevel level, const unsigned char *msg,
> {
> unsigned char outbuf[80];
> unsigned char c;
> - size_t space = sizeof outbuf - 1;
> + size_t space = sizeof(outbuf - 1);
This is wrong. The sizeof operator must be applied to the array
variable outbuf, not to the expression (outbuf - 1).
> --- a/drivers/isdn/gigaset/ev-layer.c
> +++ b/drivers/isdn/gigaset/ev-layer.c
> @@ -1083,7 +1079,7 @@ static void do_action(int action, struct cardstate *cs,
>
> int channel;
>
> - unsigned char *s, *e;
> + unsigned char *s;
> int i;
> unsigned long val;
>
> @@ -1355,8 +1351,20 @@ static void do_action(int action, struct cardstate *cs,
> }
>
> for (i = 0; i < 4; ++i) {
> - val = simple_strtoul(s, (char **) &e, 10);
> - if (val > INT_MAX || e == s)
> + unsigned long *e;
> +
> + val = kstrtoul(s, 10, e);
> + if (val == -EINVAL) {
> + dev_err(cs->dev, "Parsing error on converting string to\
> + unsigned long\n");
> + break;
> + }
> + if (val == -ERANGE) {
> + dev_err(cs->dev, "Overflow error converting string to\
> + unsigned long\n");
> + break;
> + }
> + if (val > INT_MAX || *e == s)
> break;
> if (i == 3) {
> if (*e)
> @@ -1364,7 +1372,7 @@ static void do_action(int action, struct cardstate *cs,
> } else if (*e != '.')
> break;
> else
> - s = e + 1;
> + s = *e + 1;
> cs->fwver[i] = val;
> }
> if (i != 4) {
This cannot work. The pointer variable e gets dereferenced without
ever being initialized. The type mismatches when declaring e as
pointing to an unsigned long but comparing *e to s in one place and to
a character literal in another point make me wonder which semantics
you had in mind for e in the first place.
Also your error messages are not helpful for someone reading the log
and trying to find out what went wrong, and not very readable because
of the big stretch of whitespace you insert between the words "to" and
"unsigned". In fact I'm not even convinced it's a good idea to emit a
log message at all here.
> --- a/drivers/isdn/gigaset/gigaset.h
> +++ b/drivers/isdn/gigaset/gigaset.h
> @@ -94,8 +94,7 @@ enum debuglevel {
> #define gig_dbg(level, format, arg...) \
> do { \
> if (unlikely(((enum debuglevel)gigaset_debuglevel) & (level))) \
> - printk(KERN_DEBUG KBUILD_MODNAME ": " format "\n", \
> - ## arg); \
> + dev_dbg(cs->dev, KBUILD_MODNAME ": " format "\n")\
> } while (0)
This will not work when
- there is no cs variable in the context where the macro is used or
- cs->dev doesn't contain a valid device pointer or
- the format string references additional arguments,
all of which actually occur in the driver.
> --- a/drivers/isdn/gigaset/i4l.c
> +++ b/drivers/isdn/gigaset/i4l.c
> @@ -624,14 +624,14 @@ int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid)
> {
> isdn_if *iif;
>
> - iif = kmalloc(sizeof *iif, GFP_KERNEL);
> + iif = kmalloc(sizeof(*iif, GFP_KERNEL));
You're calling kmalloc with too few arguments here.
> if (!iif) {
> pr_err("out of memory\n");
> return -ENOMEM;
> }
>
> - if (snprintf(iif->id, sizeof iif->id, "%s_%u", isdnid, cs->minor_index)
> - >= sizeof iif->id) {
> + if (snprintf(iif->id, sizeof(iif->id, "%s_%u", isdnid, cs->minor_index))
> + >= sizeof(iif->id)) {
You're calling snprintf with too few arguments here.
> --- a/drivers/isdn/gigaset/proc.c
> +++ b/drivers/isdn/gigaset/proc.c
> @@ -27,13 +27,18 @@ static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr,
> const char *buf, size_t count)
> {
> struct cardstate *cs = dev_get_drvdata(dev);
> - long int value;
> - char *end;
> + long int *value;
> + int result;
>
> - value = simple_strtol(buf, &end, 0);
> - while (*end)
> - if (!isspace(*end++))
> - return -EINVAL;
> + result = kstrtol(buf, 0, &value);
> + if (result == -ERANGE)
> + /* Overflow error */
> + dev_err(cs->dev, "Overflow error on conversion from string to\
> + long\n");
> + if (result == -EINVAL)
> + /* Parsing error */
> + dev_err(cs->dev, "Parsing error on conversion from string to\
> + long\n");
> if (value < 0 || value > 1)
> return -EINVAL;
>
This changes semantics. Your code will not accept the same input as
the original code, and it will emit messages of its own instead of
just returning an error code to the caller as it should.
In sum: NACK.
Regards,
Tilman
--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
^ permalink raw reply
* Re: [PATCH] net: wireless: b43legacy: radio.c: Remove unused function
From: Rickard Strandqvist @ 2015-01-03 15:41 UTC (permalink / raw)
To: Sedat Dilek
Cc: Rafał Miłecki, Larry Finger, Stefano Brivio,
Network Development,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Linux Kernel Mailing List, b43-dev
In-Reply-To: <CA+icZUUfFr2PQjp4ppMNj5UQE3U7-ArmO1LSDoZZf5c1Y85OMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-03 15:51 GMT+01:00 Sedat Dilek <sedat.dilek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> On Sat, Jan 3, 2015 at 3:45 PM, Rickard Strandqvist
> <rickard_strandqvist-IW2WV5XWFqGZkjO+N0TKoMugMpMbD5Xr@public.gmane.org> wrote:
> [ ... ]
>>> > I just got one more complaining about my subject-line in "net: wireless: "
>>> > I use some sed call for this, so it's easy to fix. I will now remove that
>>> > part hereinafter.
>>> > I check in Documentation/ but did not find any clear info for this.
>>> >
>>>
>>> The easiest way to make (sub)maintainers happy is to check the git-log...
>>>
>>> $ git log --oneline /path/to/file
>>>
>>> ...and look how other contributors labeled their patches.
>>>
>>> [1] is the 1st address to look at on how to submit patches to Linux-kernel.
>>> To promote the good work of Greg, see [2,3] for a video and tutorial
>>> on that topic, too.
>>>
>>> - Sedat -
>>>
>>> [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches
>>> [2] https://www.youtube.com/watch?v=XXix80GCvpo
>>> [3] https://github.com/gregkh/kernel-tutorial
>>
>>
>>
>> Hi Sedat
>>
>> Thanks for the tip :)
>>
>> To bad with the audio in the video thow. Have read SubmittingPatches before.
>>
>
> AFAICS there is another (earlier) video "Write and Submit your first
> Linux kernel Patch" from FOSDEM 2010.
>
> For German readers I can recommend the book from [2] (no I get no
> money for promotion).
>
> - Sedat -
>
> [1] https://www.youtube.com/watch?v=LLBrBBImJt4
> [2] http://www.opensourcepress.de/de/produkte/Git/33227/978-3-95539-119-5-
>
>>
>> But I have now added a line in my script that does a:
>>
>> git log -10 --oneline
>>
>> So I can at least see the other subjekt lines, and make adjustments if
>> necessary.
>>
>>
>>
>> Kind regards
>> Rickard Strandqvist
Hi
Good video!
Wish I had seen this a year ago.
Sorry, no German for me :)
Kind regards
Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Please Confirm
From: Linda Okoh @ 2015-01-02 23:33 UTC (permalink / raw)
To: Recipients
Is your email still active?
^ permalink raw reply
* Re: [PATCH iproute2 1/3] ss: Unify unix stats output from netlink and proc
From: Stephen Hemminger @ 2015-01-03 17:56 UTC (permalink / raw)
To: Vadim Kochan; +Cc: netdev
In-Reply-To: <1420245877-11763-2-git-send-email-vadim4j@gmail.com>
Looks good, but could you fix some minor style things.
On Sat, 3 Jan 2015 02:44:35 +0200
Vadim Kochan <vadim4j@gmail.com> wrote:
>
> -static void unix_list_print(struct unixstat *list, struct filter *f)
> +static int unix_type_skip(struct unixstat *s, struct filter *f)
> +{
Please use bool for logical true/false value in new code.
^ permalink raw reply
* Re: [PATCH iproute2 3/3] ss: Filtering logic changing, with fixes
From: Stephen Hemminger @ 2015-01-03 17:57 UTC (permalink / raw)
To: Vadim Kochan; +Cc: netdev
In-Reply-To: <1420245877-11763-4-git-send-email-vadim4j@gmail.com>
On Sat, 3 Jan 2015 02:44:37 +0200
Vadim Kochan <vadim4j@gmail.com> wrote:
> +struct filter default_dbs[MAX_DB] = {
> + [TCP_DB] = {
> + .states = SS_CONN,
> + .families = (1 << AF_INET) | (1 << AF_INET6),
> + },
I like table driven code, so this is good. But please make
mark the table as const.
^ permalink raw reply
* Re: [PATCH iproute2] man ss: Fix 'Kuznetosv' -> 'Kuznetsov' typo
From: Stephen Hemminger @ 2015-01-03 18:00 UTC (permalink / raw)
To: Vadim Kochan; +Cc: netdev
In-Reply-To: <1420279669-3491-1-git-send-email-vadim4j@gmail.com>
Thanks, I found two others as well and did the change manually.
^ permalink raw reply
* Re: [PATCH] Revert "ipw2200: select CFG80211_WEXT"
From: Marcel Holtmann @ 2015-01-03 18:02 UTC (permalink / raw)
To: Paul Bolle
Cc: Stanislav Yakovlev, Kalle Valo, Jiri Kosina, Linus Torvalds,
linux-wireless, Network Development, linux-kernel
In-Reply-To: <1420297188.2397.3.camel@tiscali.nl>
Hi Paul,
> This reverts commit dddd60220f41775e634258efd1b54c6fa81ce706.
>
> The raison d'être of commit dddd60220f41 ("ipw2200: select
> CFG80211_WEXT") was reverted in commit 2d36e008739e ("Revert "cfg80211:
> make WEXT compatibility unselectable""). So revert this commit too.
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> drivers/net/wireless/ipw2x00/Kconfig | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ipw2x00/Kconfig b/drivers/net/wireless/ipw2x00/Kconfig
> index 21de4fe6cf2d..91c0cb3c368e 100644
> --- a/drivers/net/wireless/ipw2x00/Kconfig
> +++ b/drivers/net/wireless/ipw2x00/Kconfig
> @@ -65,8 +65,7 @@ config IPW2100_DEBUG
>
> config IPW2200
> tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection"
> - depends on PCI && CFG80211
> - select CFG80211_WEXT
> + depends on PCI && CFG80211 && CFG80211_WEXT
> select WIRELESS_EXT
> select WEXT_SPY
> select WEXT_PRIV
why would you revert this? It is obviously the correct change to actually select CFG80211_WEXT.
Regards
Marcel
^ permalink raw reply
* Re: [PATCH] Revert "ipw2200: select CFG80211_WEXT"
From: Linus Torvalds @ 2015-01-03 18:07 UTC (permalink / raw)
To: Marcel Holtmann
Cc: Paul Bolle, Stanislav Yakovlev, Kalle Valo, Jiri Kosina,
linux-wireless, Network Development, Linux Kernel Mailing List
In-Reply-To: <CD467A59-F563-439B-BA82-954AB27AD9CC@holtmann.org>
On Sat, Jan 3, 2015 at 10:02 AM, Marcel Holtmann <marcel@holtmann.org> wrote:
>
> why would you revert this? It is obviously the correct change to actually select CFG80211_WEXT.
I don't know about obvious, but yeah, I think the select in this case
is actually the better idea anyway.
We could make the CFG80211_WEXT help message be very negative so that
people aren't encouraged to select it even if they can, but then if
they need the ipw driver it gets selected because of that. Because the
ipw driver is probably the more important of the two if you just
happen to have old hardware but are upgrading yout software (and
anybody who recompiles their own kernel is obviously doing the
latter).
Linus
^ permalink raw reply
* [RFC] netlink: get rid of nl_table_lock
From: Stephen Hemminger @ 2015-01-03 19:02 UTC (permalink / raw)
To: Thomas Graf
Cc: davem, netdev, linux-kernel, herbert, paulmck, edumazet,
john.r.fastabend, josh
In-Reply-To: <daae84cd33bfde8518b849176e25dcf3eea8014b.1420230585.git.tgraf@suug.ch>
As a follow on to Thomas's patch I think this would complete the
transistion to RCU for netlink.
Compile tested only.
This patch gets rid of the reader/writer nl_table_lock and replaces it
with exclusively using RCU for reading, and a mutex for writing.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
--- a/include/net/sock.h 2015-01-01 10:05:35.805253771 -0800
+++ b/include/net/sock.h 2015-01-03 10:45:29.661737618 -0800
@@ -666,6 +666,8 @@ static inline void sk_add_bind_node(stru
hlist_for_each_entry_safe(__sk, tmp, list, sk_node)
#define sk_for_each_bound(__sk, list) \
hlist_for_each_entry(__sk, list, sk_bind_node)
+#define sk_for_each_bound_rcu(__sk, list) \
+ hlist_for_each_entry_rcu(__sk, list, sk_bind_node)
/**
* sk_nulls_for_each_entry_offset - iterate over a list at a given struct offset
--- a/net/netlink/af_netlink.c 2015-01-03 10:04:37.738319202 -0800
+++ b/net/netlink/af_netlink.c 2015-01-03 10:53:29.568387253 -0800
@@ -100,15 +100,14 @@ static void netlink_skb_destructor(struc
* Lookup and traversal are protected with an RCU read-side lock. Insertion
* and removal are protected with nl_sk_hash_lock while using RCU list
* modification primitives and may run in parallel to RCU protected lookups.
- * Destruction of the Netlink socket may only occur *after* nl_table_lock has
+ * Destruction of the Netlink socket may only occur *after* nl_table_mutex has
* been acquired * either during or after the socket has been removed from
* the list and after an RCU grace period.
*/
-DEFINE_RWLOCK(nl_table_lock);
-EXPORT_SYMBOL_GPL(nl_table_lock);
-static atomic_t nl_table_users = ATOMIC_INIT(0);
+static DEFINE_MUTEX(nl_table_mutex);
-#define nl_deref_protected(X) rcu_dereference_protected(X, lockdep_is_held(&nl_table_lock));
+#define nl_deref_protected(X) \
+ rcu_dereference_protected(X, lockdep_is_held(&nl_table_mutex))
/* Protects netlink socket hash table mutations */
DEFINE_MUTEX(nl_sk_hash_lock);
@@ -118,7 +117,8 @@ EXPORT_SYMBOL_GPL(nl_sk_hash_lock);
static int lockdep_nl_sk_hash_is_held(void *parent)
{
if (debug_locks)
- return lockdep_is_held(&nl_sk_hash_lock) || lockdep_is_held(&nl_table_lock);
+ return lockdep_is_held(&nl_sk_hash_lock) ||
+ lockdep_is_held(&nl_table_mutex);
return 1;
}
#endif
@@ -925,59 +925,14 @@ static void netlink_sock_destruct(struct
WARN_ON(nlk_sk(sk)->groups);
}
-/* This lock without WQ_FLAG_EXCLUSIVE is good on UP and it is _very_ bad on
- * SMP. Look, when several writers sleep and reader wakes them up, all but one
- * immediately hit write lock and grab all the cpus. Exclusive sleep solves
- * this, _but_ remember, it adds useless work on UP machines.
- */
-
void netlink_table_grab(void)
- __acquires(nl_table_lock)
{
- might_sleep();
-
- write_lock_irq(&nl_table_lock);
-
- if (atomic_read(&nl_table_users)) {
- DECLARE_WAITQUEUE(wait, current);
-
- add_wait_queue_exclusive(&nl_table_wait, &wait);
- for (;;) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- if (atomic_read(&nl_table_users) == 0)
- break;
- write_unlock_irq(&nl_table_lock);
- schedule();
- write_lock_irq(&nl_table_lock);
- }
-
- __set_current_state(TASK_RUNNING);
- remove_wait_queue(&nl_table_wait, &wait);
- }
+ mutex_lock(&nl_table_mutex);
}
void netlink_table_ungrab(void)
- __releases(nl_table_lock)
-{
- write_unlock_irq(&nl_table_lock);
- wake_up(&nl_table_wait);
-}
-
-static inline void
-netlink_lock_table(void)
{
- /* read_lock() synchronizes us to netlink_table_grab */
-
- read_lock(&nl_table_lock);
- atomic_inc(&nl_table_users);
- read_unlock(&nl_table_lock);
-}
-
-static inline void
-netlink_unlock_table(void)
-{
- if (atomic_dec_and_test(&nl_table_users))
- wake_up(&nl_table_wait);
+ mutex_unlock(&nl_table_mutex);
}
struct netlink_compare_arg
@@ -1151,12 +1106,12 @@ static int netlink_create(struct net *ne
if (protocol < 0 || protocol >= MAX_LINKS)
return -EPROTONOSUPPORT;
- netlink_lock_table();
+ mutex_lock(&nl_table_mutex);
#ifdef CONFIG_MODULES
if (!nl_table[protocol].registered) {
- netlink_unlock_table();
+ mutex_unlock(&nl_table_mutex);
request_module("net-pf-%d-proto-%d", PF_NETLINK, protocol);
- netlink_lock_table();
+ mutex_lock(&nl_table_mutex);
}
#endif
if (nl_table[protocol].registered &&
@@ -1167,7 +1122,7 @@ static int netlink_create(struct net *ne
cb_mutex = nl_table[protocol].cb_mutex;
bind = nl_table[protocol].bind;
unbind = nl_table[protocol].unbind;
- netlink_unlock_table();
+ mutex_unlock(&nl_table_mutex);
if (err < 0)
goto out;
@@ -1982,17 +1937,13 @@ int netlink_broadcast_filtered(struct so
info.tx_filter = filter;
info.tx_data = filter_data;
- /* While we sleep in clone, do not allow to change socket list */
-
- netlink_lock_table();
-
- sk_for_each_bound(sk, &nl_table[ssk->sk_protocol].mc_list)
+ rcu_read_lock();
+ sk_for_each_bound_rcu(sk, &nl_table[ssk->sk_protocol].mc_list)
do_one_broadcast(sk, &info);
+ rcu_read_unlock();
consume_skb(skb);
- netlink_unlock_table();
-
if (info.delivery_failure) {
kfree_skb(info.skb2);
return -ENOBUFS;
@@ -2071,12 +2022,11 @@ int netlink_set_err(struct sock *ssk, u3
/* sk->sk_err wants a positive error value */
info.code = -code;
- read_lock(&nl_table_lock);
-
- sk_for_each_bound(sk, &nl_table[ssk->sk_protocol].mc_list)
+ rcu_read_lock();
+ sk_for_each_bound_rcu(sk, &nl_table[ssk->sk_protocol].mc_list)
ret += do_one_set_err(sk, &info);
+ rcu_read_unlock();
- read_unlock(&nl_table_lock);
return ret;
}
EXPORT_SYMBOL(netlink_set_err);
--- a/net/netlink/diag.c 2014-08-09 08:39:57.756179454 -0700
+++ b/net/netlink/diag.c 2015-01-03 10:57:31.113791535 -0800
@@ -136,7 +136,7 @@ static int __netlink_diag_dump(struct sk
}
}
- sk_for_each_bound(sk, &tbl->mc_list) {
+ sk_for_each_bound_rcu(sk, &tbl->mc_list) {
if (sk_hashed(sk))
continue;
if (!net_eq(sock_net(sk), net))
@@ -171,7 +171,7 @@ static int netlink_diag_dump(struct sk_b
req = nlmsg_data(cb->nlh);
mutex_lock(&nl_sk_hash_lock);
- read_lock(&nl_table_lock);
+ rcu_read_lock();
if (req->sdiag_protocol == NDIAG_PROTO_ALL) {
int i;
@@ -183,7 +183,7 @@ static int netlink_diag_dump(struct sk_b
}
} else {
if (req->sdiag_protocol >= MAX_LINKS) {
- read_unlock(&nl_table_lock);
+ rcu_read_unlock();
mutex_unlock(&nl_sk_hash_lock);
return -ENOENT;
}
@@ -191,7 +191,7 @@ static int netlink_diag_dump(struct sk_b
__netlink_diag_dump(skb, cb, req->sdiag_protocol, s_num);
}
- read_unlock(&nl_table_lock);
+ rcu_read_unlock();
mutex_unlock(&nl_sk_hash_lock);
return skb->len;
^ permalink raw reply
* Re: [PATCH 0/9 net-next v2] rhashtable: Per bucket locks & deferred table resizing
From: David Miller @ 2015-01-03 19:44 UTC (permalink / raw)
To: tgraf
Cc: netdev, linux-kernel, herbert, paulmck, edumazet,
john.r.fastabend, josh
In-Reply-To: <cover.1420230585.git.tgraf@suug.ch>
From: Thomas Graf <tgraf@suug.ch>
Date: Fri, 2 Jan 2015 23:00:13 +0100
> Prepares for and introduces per bucket spinlocks and deferred table
> resizing. This allows for parallel table mutations in different hash
> buckets from atomic context. The resizing occurs in the background
> in a separate worker thread while lookups, inserts, and removals can
> continue.
>
> Also modified the chain linked list to be terminated with a special
> nulls marker to allow entries to move between multiple lists.
>
> Last but not least, reintroduces lockless netlink_lookup() with
> deferred Netlink socket destruction to avoid the side effect of
> increased netlink_release() runtime.
I'm sure that this might need a minor tweak or two still, but I really
like how you implemented this so I'll apply this series now.
Thanks!
^ permalink raw reply
* Re: linux-next: build failure after merge of the net-next tree
From: David Miller @ 2015-01-03 19:45 UTC (permalink / raw)
To: sfr; +Cc: netdev, linux-next, linux-kernel, richardcochran,
jeffrey.t.kirsher
In-Reply-To: <20150103091101.04b2c11e@canb.auug.org.au>
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Sat, 3 Jan 2015 09:11:01 +1100
> After merging the net-next tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> drivers/net/ethernet/mellanox/mlx4/en_clock.c: In function 'mlx4_en_init_timestamp':
> drivers/net/ethernet/mellanox/mlx4/en_clock.c:249:2: error: implicit declaration of function 'CLOCKSOURCE_MASK' [-Werror=implicit-function-declaration]
> mdev->cycles.mask = CLOCKSOURCE_MASK(48);
Stephen please let me know if this failure is persisting.
^ permalink raw reply
* Re: [PATCH v3 0/6] support GMAC driver for RK3288
From: Heiko Stübner @ 2015-01-03 22:27 UTC (permalink / raw)
To: David Miller
Cc: roger.chen, peppe.cavallaro, netdev, linux-kernel, linux-rockchip,
kever.yang, eddie.cai
In-Reply-To: <20150101.210122.660970681208198668.davem@davemloft.net>
Am Donnerstag, 1. Januar 2015, 21:01:22 schrieb David Miller:
> From: Heiko Stübner <heiko@sntech.de>
> Date: Thu, 01 Jan 2015 03:06:31 +0100
>
> > Hi David,
> >
> > Am Mittwoch, 31. Dezember 2014, 19:15:38 schrieb David Miller:
> >> From: Roger Chen <roger.chen@rock-chips.com>
> >> Date: Mon, 29 Dec 2014 17:42:32 +0800
> >>
> >> > Roger Chen (6):
> >> > patch1: add driver for Rockchip RK3288 SoCs integrated GMAC
> >> > patch2: define clock ID used for GMAC
> >> > patch3: modify CRU config for Rockchip RK3288 SoCs integrated GMAC
> >> > patch4: dts: rockchip: add gmac info for rk3288
> >> > patch5: dts: rockchip: enable gmac on RK3288 evb board
> >> > patch6: add document for Rockchip RK3288 GMAC
> >> >
> >> > Tested on rk3288 evb board:
> >> > Execute the following command to enable ethernet,
> >> > set local IP and ping a remote host.
> >> >
> >> > busybox ifconfig eth0 up
> >> > busybox ifconfig eth0 192.168.1.111
> >> > ping 192.168.1.1
> >>
> >> Series applied to net-next, thanks.
> >
> > could we split this up a bit instead?
>
> Too late, what's in my tree is in the permanent commit history
> and cannot be deleted.
ok no problem ... I'll work around it then so that any possible conflicts are
easily solvable.
Heiko
^ permalink raw reply
* Re: [PATCH] Revert "ipw2200: select CFG80211_WEXT"
From: Paul Bolle @ 2015-01-03 22:28 UTC (permalink / raw)
To: Linus Torvalds
Cc: Marcel Holtmann, Stanislav Yakovlev, Kalle Valo, Jiri Kosina,
linux-wireless, Network Development, Linux Kernel Mailing List
In-Reply-To: <CA+55aFzYSiUkntraMrHEhMzkt35Ft2p9E3cT7ejwQOBDwKvcOg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sat, 2015-01-03 at 10:07 -0800, Linus Torvalds wrote:
> On Sat, Jan 3, 2015 at 10:02 AM, Marcel Holtmann <marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org> wrote:
> >
> > why would you revert this? It is obviously the correct change to actually select CFG80211_WEXT.
>
> I don't know about obvious, but yeah, I think the select in this case
> is actually the better idea anyway.
Obviously it wasn't obvious to me!
My reasoning was that the "ipw2200: select CFG80211_WEXT" commit was
_solely_ a workaround for the breakage introduced by that other patch.
And since that one is now reverted the workaround wasn't needed anymore.
Besied, I thought we try to avoid select-ing symbols that can also be
set manually. As that makes it more likely to trigger circular
dependency problems in the kconfig tools, doesn't it?
> We could make the CFG80211_WEXT help message be very negative so that
> people aren't encouraged to select it even if they can, but then if
> they need the ipw driver it gets selected because of that. Because the
> ipw driver is probably the more important of the two if you just
> happen to have old hardware but are upgrading yout software (and
> anybody who recompiles their own kernel is obviously doing the
> latter).
Side note: am I correct in thinking that there's some successor to
CFG80211_WEXT and that the ipw2200 driver could, at least in theory, be
ported to that successor? (ipw2200 hardware appears to be a bit old, so
probably no one would care enough to actually do that.)
net/wireless/kconfig doesn't mention anything like that, so probably I'm
just confused.
Paul Bolle
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH iproute2 3/3] ss: Filtering logic changing, with fixes
From: Vadim Kochan @ 2015-01-03 22:58 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Vadim Kochan, netdev
In-Reply-To: <20150103095707.37e69147@urahara>
On Sat, Jan 03, 2015 at 09:57:07AM -0800, Stephen Hemminger wrote:
> On Sat, 3 Jan 2015 02:44:37 +0200
> Vadim Kochan <vadim4j@gmail.com> wrote:
>
> > +struct filter default_dbs[MAX_DB] = {
> > + [TCP_DB] = {
> > + .states = SS_CONN,
> > + .families = (1 << AF_INET) | (1 << AF_INET6),
> > + },
>
> I like table driven code, so this is good. But please make
> mark the table as const.
I did re-test, and I still don't like very much my results (some cases
are not logically) even if they (IMHO) better than the 'master' version,
so I will try to change filer options applying in the following way:
0) default filter should have only default states & all dbs
1) apply all selected families with their default dbs & states from table
2) logical AND selected dbs with dbs of the selected families and their default
states from table, also select families by db from table if there no
already selected families
3) logical AND selected states with selected dbs and their default states from table,
also select families and dbs from table by states if there no
already selected dbs & families
So with such approach the options should affect each other in the strict
predictable way:
families -> dbs (socket tables) -> socket states
I hope I will success with this ...
I appreciate any feedback.
Regards,
Vadim Kochan
^ permalink raw reply
* [PATCH] brcm80211: brcmsmac: dma: Remove some unused functions
From: Rickard Strandqvist @ 2015-01-04 0:47 UTC (permalink / raw)
To: Brett Rudley, Arend van Spriel
Cc: Rickard Strandqvist, Hante Meuleman, Kalle Valo, Fabian Frederick,
linux-wireless, brcm80211-dev-list, netdev, linux-kernel
Removes some functions that are not used anywhere:
dma_txflush() dma_txsuspended()
This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/net/wireless/brcm80211/brcmsmac/dma.c | 19 -------------------
drivers/net/wireless/brcm80211/brcmsmac/dma.h | 2 --
2 files changed, 21 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/dma.c b/drivers/net/wireless/brcm80211/brcmsmac/dma.c
index 796f5f9..bca233a 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/dma.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/dma.c
@@ -1192,16 +1192,6 @@ void dma_txresume(struct dma_pub *pub)
bcma_mask32(di->core, DMA64TXREGOFFS(di, control), ~D64_XC_SE);
}
-bool dma_txsuspended(struct dma_pub *pub)
-{
- struct dma_info *di = container_of(pub, struct dma_info, dma);
-
- return (di->ntxd == 0) ||
- ((bcma_read32(di->core,
- DMA64TXREGOFFS(di, control)) & D64_XC_SE) ==
- D64_XC_SE);
-}
-
void dma_txreclaim(struct dma_pub *pub, enum txd_range range)
{
struct dma_info *di = container_of(pub, struct dma_info, dma);
@@ -1425,15 +1415,6 @@ int dma_txfast(struct brcms_c_info *wlc, struct dma_pub *pub,
return -ENOSPC;
}
-void dma_txflush(struct dma_pub *pub)
-{
- struct dma_info *di = container_of(pub, struct dma_info, dma);
- struct brcms_ampdu_session *session = &di->ampdu_session;
-
- if (!skb_queue_empty(&session->skb_list))
- ampdu_finalize(di);
-}
-
int dma_txpending(struct dma_pub *pub)
{
struct dma_info *di = container_of(pub, struct dma_info, dma);
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/dma.h b/drivers/net/wireless/brcm80211/brcmsmac/dma.h
index ff5b80b..210ec72 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/dma.h
+++ b/drivers/net/wireless/brcm80211/brcmsmac/dma.h
@@ -88,11 +88,9 @@ bool dma_txreset(struct dma_pub *pub);
void dma_txinit(struct dma_pub *pub);
int dma_txfast(struct brcms_c_info *wlc, struct dma_pub *pub,
struct sk_buff *p0);
-void dma_txflush(struct dma_pub *pub);
int dma_txpending(struct dma_pub *pub);
void dma_kick_tx(struct dma_pub *pub);
void dma_txsuspend(struct dma_pub *pub);
-bool dma_txsuspended(struct dma_pub *pub);
void dma_txresume(struct dma_pub *pub);
void dma_txreclaim(struct dma_pub *pub, enum txd_range range);
void dma_rxreclaim(struct dma_pub *pub);
--
1.7.10.4
^ permalink raw reply related
* Fw: [Bug 89831] New: timeout of TCP-sockets is *infinite* by default .. even if TCP-connection is already *broken*
From: Stephen Hemminger @ 2015-01-04 1:33 UTC (permalink / raw)
To: netdev
Begin forwarded message:
Date: Tue, 16 Dec 2014 22:33:50 -0800
From: "bugzilla-daemon@bugzilla.kernel.org" <bugzilla-daemon@bugzilla.kernel.org>
To: "stephen@networkplumber.org" <stephen@networkplumber.org>
Subject: [Bug 89831] New: timeout of TCP-sockets is *infinite* by default .. even if TCP-connection is already *broken*
https://bugzilla.kernel.org/show_bug.cgi?id=89831
Bug ID: 89831
Summary: timeout of TCP-sockets is *infinite* by default ..
even if TCP-connection is already *broken*
Product: Networking
Version: 2.5
Kernel Version: all
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: IPV4
Assignee: shemminger@linux-foundation.org
Reporter: polymorphm@gmail.com
Regression: No
Created attachment 160881
--> https://bugzilla.kernel.org/attachment.cgi?id=160881&action=edit
test for catch infinite freezing (on TCP-sockets by default) on GNU/Linux
good day!
please, very sorry me for your time. :-) [and sorry for my bad english].
big problem in that fact: *most* application-programmers think that if
TCP-connection is already *broken* -- that timeout of TCP-socket will *NOT* be
*infinite*. (default system timeout).
I prepared example code:
https://gist.github.com/polymorphm/0e057402c9fa82547d72 (and this file
"to-test.c" -- in attachment).
this example code ("to-test.c") -- shows that if TCP-connection *broken* --
that timeout will *never* be reached (for broken TCP-connection. EVEN AFTER
SOME DAYS).
program "to-test.c" -- becomes to infinite freezing -- after "[step 8]":
$ gcc -Wall -Werror -o to-test to-test.c && sudo ./to-test
***** begin of test *****
[step 1] creating socket...
***** INFO: is used SO_KEEPALIVE by default for TCP-sockets? answer: 0
*****
[step 2] connecting socket...
[step 3] time waiting (1s)...
[step 4] breaking down network... [wlp1s0]
# ip link set down dev wlp1s0
[step 5] time waiting (15s)...
[step 6] reestablishing up network... [wlp1s0]
# ip link set up dev wlp1s0
[step 7] time waiting (1s)...
[step 8] waiting of socket timeout (or we are freezed *infinity*?)...
(infinite freeze -- at this point)
probably, this issue-ticket will be marked as WONTFIX (and again: very sorry me
for your time!). but this issue-ticket -- need at least for official canonical
URL-link for answer to problem of default timeout of *broken* TCP-connection on
GNU/Linux.
when I speek with some application-programmers -- they say me: if GNU/Linux
freeze at broken-TCP-connections (with default settings of socket) than is
*bug* of GNU/Linux. and I maked this issue-ticket. sorry.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply
* RE: [PATCH net-next v1 0/3] net: fec: add Wake-on-LAN support
From: fugang.duan @ 2015-01-04 1:39 UTC (permalink / raw)
To: Fabio Estevam, David Miller
Cc: Shawn Guo, netdev@vger.kernel.org, Ben Hutchings,
Stephen Hemminger
In-Reply-To: <CAOMZO5De+v_LAOdxGR=OHV3iMXwe8O-Z1dK0uv8ezMU90sMnMA@mail.gmail.com>
From: Fabio Estevam <festevam@gmail.com> Sent: Thursday, January 01, 2015 3:22 AM
> To: David Miller
> Cc: Duan Fugang-B38611; Shawn Guo; netdev@vger.kernel.org; Ben Hutchings;
> Stephen Hemminger
> Subject: Re: [PATCH net-next v1 0/3] net: fec: add Wake-on-LAN support
>
> On Wed, Dec 31, 2014 at 5:20 PM, David Miller <davem@davemloft.net> wrote:
> > From: Fabio Estevam <festevam@gmail.com>
> > Date: Wed, 31 Dec 2014 17:03:28 -0200
> >
> >> ,but when we see your patches applied they appear with Nimrod Andy as
> >> the author instead:
> >> https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commi
> >> t/?id=de40ed31b3c577cefd7b54972365a272ecbe9dd6
> >>
> >> It would be nice if you could use the From field to match the name in
> >> the Signed-off tag.
> >
> > It's his business to setup things properly so they match, not mine. I
> > just take what is in the patch as-is.
>
> Exactly. This was what I suggested him to do.
Thanks for your suggestion.
I have these two English name. Sorry I will sync one name in later patch.
Regards,
Andy
^ permalink raw reply
* [PATCH net-next] qlcnic: Fix dump_skb output
From: Joe Perches @ 2015-01-04 1:50 UTC (permalink / raw)
To: Shahed Shaikh; +Cc: netdev, LKML
Use normal facilities to avoid printing each byte
on a separate line.
Now emits at KERN_DEBUG instead of KERN_INFO.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
index 18e5de7..d166e53 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
@@ -10,6 +10,7 @@
#include <net/ip.h>
#include <linux/ipv6.h>
#include <net/checksum.h>
+#include <linux/printk.h>
#include "qlcnic.h"
@@ -1465,14 +1466,14 @@ void qlcnic_post_rx_buffers(struct qlcnic_adapter *adapter,
static void dump_skb(struct sk_buff *skb, struct qlcnic_adapter *adapter)
{
- int i;
- unsigned char *data = skb->data;
-
- pr_info(KERN_INFO "\n");
- for (i = 0; i < skb->len; i++) {
- QLCDB(adapter, DRV, "%02x ", data[i]);
- if ((i & 0x0f) == 8)
- pr_info(KERN_INFO "\n");
+ if (adapter->ahw->msg_enable & NETIF_MSG_DRV) {
+ char prefix[30];
+
+ scnprintf(prefix, sizeof(prefix), "%s: %s: ",
+ dev_name(&adapter->pdev->dev), __func__);
+
+ print_hex_dump_debug(prefix, DUMP_PREFIX_NONE, 16, 1,
+ skb->data, skb->len, true);
}
}
^ permalink raw reply related
* Re: Re: [PATCH v3 05/20] selftests/ftrace: add install target to enable test install
From: Masami Hiramatsu @ 2015-01-04 5:18 UTC (permalink / raw)
To: Steven Rostedt
Cc: Shuah Khan, mmarek-AlSwsSmVLrQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
mingo-H+wXaHxf7aLQT0dZR+AlfA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
keescook-F7+t8E8rja9g9hUCZPvPmw,
tranmanphong-Re5JQEeQqe8AvxtiuMwx3w, mpe-Gsx/Oe8HsFggBc27wqDAHg,
cov-sgV2jX0FEOL9JmXXK+q4OQ, dh.herrmann-Re5JQEeQqe8AvxtiuMwx3w,
hughd-hpIqsD4AKlfQT0dZR+AlfA, bobby.prani-Re5JQEeQqe8AvxtiuMwx3w,
serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA,
ebiederm-aS9lmoZGLiVWk0Htik3J/w, tim.bird-/MT0OVThwyLZJqsBc5GL+g,
josh-iaAMLnmF4UmaiuxdJuQwMA, koct9i-Re5JQEeQqe8AvxtiuMwx3w,
linux-kbuild-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20150102104526.29df5641-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org>
(2015/01/03 0:45), Steven Rostedt wrote:
> On Wed, 24 Dec 2014 09:27:41 -0700
> Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> wrote:
>
>> Add a new make target to enable installing test. This target
>> installs test in the kselftest install location and add to the
>> kselftest script to run the test. Install target can be run
>> only from top level kernel source directory.
>>
>> Signed-off-by: Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
>> ---
>> tools/testing/selftests/ftrace/Makefile | 11 ++++++++++-
>> 1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/ftrace/Makefile b/tools/testing/selftests/ftrace/Makefile
>> index 76cc9f1..7c7cf42 100644
>> --- a/tools/testing/selftests/ftrace/Makefile
>> +++ b/tools/testing/selftests/ftrace/Makefile
>> @@ -1,7 +1,16 @@
>> +TEST_STR = /bin/sh ./ftracetest || echo ftrace selftests: [FAIL]
>
> Is it ok that this removes the quotes around the echo string? I don't
> see anything wrong about it, but I don't know if there's a shell out
> there that will fail due to it.
Agreed, if possible, we'd better add quotes around the echo string
as you did in 2/20 in this series.
Anyway, you can also add my ack to this patch.
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt-FCd8Q96Dh0JBDgjK7y7TUQ@public.gmane.org>
Thank you!
>
> Other than than,
>
> Acked-by: Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>
>
> -- Steve
>
>
>> +
>> all:
>>
>> +install:
>> +ifdef INSTALL_KSFT_PATH
>> + install ./ftracetest $(INSTALL_KSFT_PATH)
>> + @cp -r test.d $(INSTALL_KSFT_PATH)
>> + echo "$(TEST_STR)" >> $(KSELFTEST)
>> +endif
>> +
>> run_tests:
>> - @/bin/sh ./ftracetest || echo "ftrace selftests: [FAIL]"
>> + @$(TEST_STR)
>>
>> clean:
>> rm -rf logs/*
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt-FCd8Q96Dh0JBDgjK7y7TUQ@public.gmane.org
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox