* Re: [net v2 0/4][pull request] Intel Wired LAN Driver Updates
From: Jeff Kirsher @ 2012-05-04 16:11 UTC (permalink / raw)
To: David Miller; +Cc: netdev, gospo, sassmann
In-Reply-To: <20120504.105815.2251328360345706986.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 927 bytes --]
On Fri, 2012-05-04 at 10:58 -0400, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Fri, 4 May 2012 04:05:00 -0700
>
> > This series of patches contains fixes for ixgbe, igb and e1000.
> >
> > v2: Added e1000 patch to fix sparse warnings and igb/ixgbe to
> > correct an issue of calling function to reset Tx queue in
> > init path.
> >
> > The following are changes since commit 5a8887d39e1ba5ee2d4ccb94b14d6f2dce5ddfca:
> > sungem: Fix WakeOnLan
> > and are available in the git repository at:
> > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master`
>
> I pulled, but what is that "`" character doing at the end of that GIT url?
> I removed it when I pulled as you don't seem to have a "master`" branch in
> your tree as far as I can tell.
Sorry about that, not sure what happened there. Guess I missed the ESC
key when editing the cover...
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH net-next] tcp: be more strict before accepting ECN negociation
From: David Miller @ 2012-05-04 16:06 UTC (permalink / raw)
To: eric.dumazet
Cc: netdev, perryl, mattmathis, ycheng, ncardwell, therbert, wilmer,
dave.taht, jankur
In-Reply-To: <1336144442.3752.348.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 04 May 2012 17:14:02 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> It appears some networks play bad games with the two bits reserved for
> ECN. This can trigger false congestion notifications and very slow
> transferts.
>
> Since RFC 3168 (6.1.1) forbids SYN packets to carry CT bits, we can
> disable TCP ECN negociation if it happens we receive mangled CT bits in
> the SYN packet.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCHv3 6/6] mISDN: Help to identify the card
From: Karsten Keil @ 2012-05-04 15:58 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: David Miller, netdev, Karsten Keil
In-Reply-To: <CAP=VYLpKjFHx7b3oTjz7a8wvxQmPME-sK147n8CX6y8+Pii2rg@mail.gmail.com>
Am 04.05.2012 16:48, schrieb Paul Gortmaker:
> On Fri, May 4, 2012 at 10:15 AM, Karsten Keil <kkeil@linux-pingi.de> wrote:
>> From: Karsten Keil <isdn@linux-pingi.de>
>>
>> With multiple cards is hard to figure out which port caused trouble
>> int the layer2 routines (e.g. got a timeout).
>> Now we have the informations in the log output.
>
> If you are in here changing all these printk(KERN_LEVEL ...) lines anyway,
> then perhaps it is a good time to make use of pr_warn() and friends to
> help avoid some multi-line fragmentation things like this:
>
>> printk(KERN_WARNING
>> "%s: windowar[%d] is NULL\n",
>> - __func__, p1);
>> + mISDNDevName4ch(&l2->ch), p1);
>> l2->windowar[p1] = NULL;
>
Good point, but this should be consolidated over the complete project.
Will put this on TODO, after the current issues are solved.
Thanks
Karsten
^ permalink raw reply
* Re: [PATCHv3 0/6] mISDN: Collection of patches for layer1/layer2
From: David Miller @ 2012-05-04 16:02 UTC (permalink / raw)
To: kkeil; +Cc: netdev
In-Reply-To: <1336140935-25830-1-git-send-email-kkeil@linux-pingi.de>
From: Karsten Keil <kkeil@linux-pingi.de>
Date: Fri, 4 May 2012 16:15:29 +0200
> Version 3
> Implement the TIMER3 configuration in one patch.
> Fix additional issues found by checkpatch --strict
>
> Version 2
> I removed the PCM only stuff and the 2MBit test mode and will rework
> them for a later submit. I added the lowlevel driver changes for the TIMER3
> config to this series.
>
> These patches are mainly the outcome of a TBR3 recertification done
> within BT labs.
> The patches itself are very well tested more as 10000 valid/invalid
> call setup were done in preparartion for the TBR3 aproval.
>
> For net-next.
All applied, thanks.
^ permalink raw reply
* Re: [PATCH] bnx2x: bug fix when loading after SAN boot
From: David Miller @ 2012-05-04 15:57 UTC (permalink / raw)
To: ariele; +Cc: netdev, eilong
In-Reply-To: <1336033320-16440-1-git-send-email-ariele@broadcom.com>
From: "Ariel Elior" <ariele@broadcom.com>
Date: Thu, 3 May 2012 11:22:00 +0300
> + /* clear hw from errors which mnay have resulted from an interrupted
> + * dmae transaction.
> + */
Please fix the typos in this comment.
^ permalink raw reply
* Re: [PATCH net-next] tcp: be more strict before accepting ECN negociation
From: Neal Cardwell @ 2012-05-04 15:54 UTC (permalink / raw)
To: Eric Dumazet
Cc: David Miller, netdev, Perry Lorier, Matt Mathis, Yuchung Cheng,
Tom Herbert, Wilmer van der Gaast, Dave Täht, Ankur Jain
In-Reply-To: <1336144442.3752.348.camel@edumazet-glaptop>
On Fri, May 4, 2012 at 11:14 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> It appears some networks play bad games with the two bits reserved for
> ECN. This can trigger false congestion notifications and very slow
> transferts.
>
> Since RFC 3168 (6.1.1) forbids SYN packets to carry CT bits, we can
> disable TCP ECN negociation if it happens we receive mangled CT bits in
> the SYN packet.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Perry Lorier <perryl@google.com>
> Cc: Matt Mathis <mattmathis@google.com>
> Cc: Yuchung Cheng <ycheng@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>
> Cc: Wilmer van der Gaast <wilmer@google.com>
> Cc: Ankur Jain <jankur@google.com>
> Cc: Tom Herbert <therbert@google.com>
> Cc: Dave Täht <dave.taht@bufferbloat.net>
> ---
> include/net/tcp.h | 23 ++++++++++++++++-------
> net/ipv4/tcp_ipv4.c | 2 +-
> net/ipv6/tcp_ipv6.c | 2 +-
> 3 files changed, 18 insertions(+), 9 deletions(-)
Acked-by: Neal Cardwell <ncardwell@google.com>
neal
^ permalink raw reply
* Re: [PATCH net-next] net: sched: factorize code (qdisc_drop())
From: David Miller @ 2012-05-04 15:51 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1336142241.3752.331.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 04 May 2012 16:37:21 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> Use qdisc_drop() helper where possible.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied, thanks Eric.
^ permalink raw reply
* Re: [net-next 0/8][pull request] Intel Wired LAN Driver Updates
From: David Miller @ 2012-05-04 15:49 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann
In-Reply-To: <1336127716-20383-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 4 May 2012 03:35:08 -0700
> This series of patches contains updates for e1000e and ixgbe.
> The e1000e updates the version number and adds support for i217
> silicon. The ixgbe patches are cleanups/re-organizations to
> the driver.
>
> The following are changes since commit f19250883fe09dd2b6b5f818d84874837948c546:
> net/niu: remove one superfluous dma mask check
> and are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
Pulled, thanks Jeff.
^ permalink raw reply
* Re: [PATCH v2] RPS: Sparse connection optimizations - v2
From: Eric Dumazet @ 2012-05-04 15:47 UTC (permalink / raw)
To: Tom Herbert; +Cc: Deng-Cheng Zhu, davem, netdev
In-Reply-To: <CA+mtBx-CErRU=3ewkAjVrGN3dGzjsTz8Q-E8J+Xa+529OVEvwA@mail.gmail.com>
On Fri, 2012-05-04 at 08:31 -0700, Tom Herbert wrote:
> > I think the mechanisms of rps_dev_flow_table and cpu_flow (in this
> > patch) are different: The former works along with rps_sock_flow_table
> > whose CPU info is based on recvmsg by the application. But for the tests
> > like what I did, there's no application involved.
> >
> While rps_sock_flow_table is currently only managed by recvmsg, it
> still is the general mechanism that maps flows to CPUs for steering.
> There should be nothing preventing you from populating and managing
> entries in other ways.
It might be done from a netfilter module, activated in FORWARD chain for
example.
^ permalink raw reply
* Re: [PATCH v3 0/7] ARM: davinci: add support for the am1808 based enbw_cmc board
From: Heiko Schocher @ 2012-05-04 15:33 UTC (permalink / raw)
To: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/
Cc: Kevin Hilman, Wolfgang Denk, Sergei Shtylyov,
netdev-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Wolfram Sang,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA, Ben Dooks, David Woodhouse,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <1330945804-3379-1-git-send-email-hs-ynQEQJNshbs@public.gmane.org>
Hello,
this v3 patchset is now pending for more than 1 month without
seeing comments for it. Are there no more issues?
Should I rebase it (if no further comments occur), as it is
pending so long? (If so, against which tree?)
Thanks.
bye,
Heiko
Heiko Schocher wrote:
> This patchserie add support for the davinci am1808 based
> enbw_cmc board.
>
> Important: I rebased this patchserie against the irqdomain/next
> branch from grant likely, as he suggested to rework the OF
> intcontroller changes to the irqdomain work, branch found here:
>
> http://git.secretlab.ca/?p=linux-2.6.git;a=shortlog;h=refs/heads/irqdomain/next
>
> git://git.secretlab.ca/git/linux-2.6.git irqdomain/next
>
> commit 280ad7fda5f95211857fda38960f2b6fdf6edd3e
> Author: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> Date: Fri Feb 24 14:58:54 2012 -0700
>
> mfd: twl-core: Add IRQ_DOMAIN dependency
>
> changes for v2:
> Post this patchserie now as v2, as reworked in the
> comments I got for the RFC serie.
>
> changes for v3:
> - Interrupt Controller:
> - comment from Sergei Shtylyov:
> - rename compatible" prop to "ti,cp_intc"
> - cp_intc_init() is now also for the of case
> the name of the init function (it calls the
> "new" __cp_intc_init() function, which was
> the "old" cp_intc_init()). Through this
> rework the changes for OF is better visible.
> As the OF case uses the irq_domain rework from
> Grant Likely, maybe the none OF case can use
> this also, but this should be tested on a hw ...
>
> Got no comments to the following points, I noted in the
> RFC series, so posting this patchseries with them:
>
> - ARM: davinci: configure davinci aemif chipselects through OF
> not moved to mfd, as mentioned in this discussion:
> http://davinci-linux-open-source.1494791.n2.nabble.com/PATCH-arm-davinci-configure-davinci-aemif-chipselects-through-OF-td7059739.html
> instead use a phandle in the DTS, so drivers which
> uses the davinci aemif, can call davinci_aemif_setup_timing_of()
>
> This is just thought as an RFC ... The enbw_cmc board
> support not really need to setup this bus timings, as
> they are setup in U-Boot ... but I want to post this,
> as I think, it is a nice to have, and I am not really
> sure, if this has to be a MFD device (If so, all bus
> interfaces for other SoCs should be converted also to
> MFD devices) ... as an example how this can be used
> I add this to the davinci nand controller OF support
> patch, in this patchserie.
>
> - ARM: davinci: mux: add OF support
> I want to get rid of the pin setup code in board code ...
> This patch introduces a davinci_cfg_reg_of() function,
> which davinci drivers can call, if they found a
> "pinmux-handle", so used in the following drivers in
> this patchserie:
>
> drivers/net/ethernet/ti/davinci_emac
> drivers/i2c/busses/i2c-davinci.c
> drivers/mtd/nand/davinci_nand.c
>
> - post this board support with USB support, even though
> USB is only working with the 10 ms "workaround", posted here:
> http://comments.gmane.org/gmane.linux.usb.general/54505
> I see this issue also on the AM1808 TMDXEXP1808L evalboard.
>
> - MMC and USB are not using OF support yet, ideas how to port
> this are welcome. I need for USB and MMC board specific
> callbacks, how to solve this with OF support?
>
> Signed-off-by: Heiko Schocher <hs-ynQEQJNshbs@public.gmane.org>
> Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org
> Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
> Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Cc: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
> Cc: Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>
> Cc: Wolfgang Denk <wd-ynQEQJNshbs@public.gmane.org>
> Cc: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
>
> Heiko Schocher (7):
> ARM: davinci, intc: Add OF support for TI interrupt controller
> ARM: davinci: configure davinci aemif chipselects through OF
> ARM: davinci: mux: add OF support
> ARM: davinci: net: davinci_emac: add OF support
> ARM: davinci: i2c: add OF support
> ARM: mtd: nand: davinci: add OF support for davinci nand controller
> ARM: davinci: add support for the am1808 based enbw_cmc board
>
> .../devicetree/bindings/arm/davinci/aemif.txt | 119 ++++++
> .../bindings/arm/davinci/davinci_emac.txt | 43 +++
> .../devicetree/bindings/arm/davinci/i2c.txt | 33 ++
> .../devicetree/bindings/arm/davinci/intc.txt | 27 ++
> .../devicetree/bindings/arm/davinci/mux.txt | 40 ++
> .../devicetree/bindings/arm/davinci/nand.txt | 74 ++++
> arch/arm/boot/dts/enbw_cmc.dts | 268 ++++++++++++++
> arch/arm/configs/enbw_cmc_defconfig | 123 +++++++
> arch/arm/mach-davinci/Kconfig | 9 +
> arch/arm/mach-davinci/Makefile | 1 +
> arch/arm/mach-davinci/aemif.c | 86 +++++-
> arch/arm/mach-davinci/board-enbw-cmc.c | 380 ++++++++++++++++++++
> arch/arm/mach-davinci/cp_intc.c | 87 ++++-
> arch/arm/mach-davinci/include/mach/aemif.h | 1 +
> arch/arm/mach-davinci/include/mach/mux.h | 2 +
> arch/arm/mach-davinci/include/mach/uncompress.h | 1 +
> arch/arm/mach-davinci/mux.c | 73 ++++-
> drivers/i2c/busses/i2c-davinci.c | 37 ++
> drivers/mtd/nand/davinci_nand.c | 85 +++++-
> drivers/net/ethernet/ti/davinci_emac.c | 94 +++++-
> 20 files changed, 1569 insertions(+), 14 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/arm/davinci/aemif.txt
> create mode 100644 Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt
> create mode 100644 Documentation/devicetree/bindings/arm/davinci/i2c.txt
> create mode 100644 Documentation/devicetree/bindings/arm/davinci/intc.txt
> create mode 100644 Documentation/devicetree/bindings/arm/davinci/mux.txt
> create mode 100644 Documentation/devicetree/bindings/arm/davinci/nand.txt
> create mode 100644 arch/arm/boot/dts/enbw_cmc.dts
> create mode 100644 arch/arm/configs/enbw_cmc_defconfig
> create mode 100644 arch/arm/mach-davinci/board-enbw-cmc.c
>
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd-ynQEQJNshbs@public.gmane.org
^ permalink raw reply
* Re: [PATCH v2] RPS: Sparse connection optimizations - v2
From: Tom Herbert @ 2012-05-04 15:31 UTC (permalink / raw)
To: Deng-Cheng Zhu; +Cc: davem, netdev, eric.dumazet
In-Reply-To: <4FA35A3D.8000205@mips.com>
> I think the mechanisms of rps_dev_flow_table and cpu_flow (in this
> patch) are different: The former works along with rps_sock_flow_table
> whose CPU info is based on recvmsg by the application. But for the tests
> like what I did, there's no application involved.
>
While rps_sock_flow_table is currently only managed by recvmsg, it
still is the general mechanism that maps flows to CPUs for steering.
There should be nothing preventing you from populating and managing
entries in other ways.
Tom
>
> Deng-Cheng
^ permalink raw reply
* Re: [Lksctp-developers] Bug: sctp packets are dropped after IPSEC rekeying (route cache issue)
From: Nicolas Dichtel @ 2012-05-04 15:24 UTC (permalink / raw)
To: David Miller, vyasevich
Cc: babu.srinivasan, lksctp-developers, linux-sctp, netdev,
michael.kreuzer
In-Reply-To: <20120504.104812.502049217620285020.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 653 bytes --]
Le 04/05/2012 16:48, David Miller a écrit :
> From: Nicolas Dichtel<nicolas.dichtel@6wind.com>
> Date: Fri, 04 May 2012 12:07:38 +0200
>
>> Finally, this patch was never integrated into the mainline. Should I
>> rebase it on the head?
>>
>> I've attach the last approved patch.
>>
>> Here is the original thread:
>> http://sourceforge.net/mailarchive/message.php?msg_id=25786006
>
> Vlad no longer works for HP so your email likely will bounce, and
> he will not see it.
Right.
>
> His new email address is vyasevich@gmail.com, as per the MAINTAINERS
> file.
I put the right email address now. I attach the patch again, for Vlad.
Thank you,
Nicolas
[-- Attachment #2: 0001-sctp-check-cached-dst-before-using-it.patch --]
[-- Type: text/x-patch, Size: 2498 bytes --]
>From a54926eded11de99a0cfcda45d852d2f6e919b77 Mon Sep 17 00:00:00 2001
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Wed, 21 Jul 2010 09:59:49 +0200
Subject: [PATCH] sctp: check cached dst before using it
dst_check() will take care of SA (and obsolete field), hence
IPsec rekeying scenario is taken into account.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
include/net/sctp/sctp.h | 13 +++++++++++++
net/sctp/output.c | 4 +---
net/sctp/transport.c | 17 -----------------
3 files changed, 14 insertions(+), 20 deletions(-)
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 65946bc..ab54df3 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -691,4 +691,17 @@ static inline void sctp_v4_map_v6(union sctp_addr *addr)
addr->v6.sin6_addr.s6_addr32[2] = htonl(0x0000ffff);
}
+/* The cookie is always 0 since this is how it's used in the
+ * pmtu code.
+ */
+static inline struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t)
+{
+ if (t->dst && !dst_check(t->dst, 0)) {
+ dst_release(t->dst);
+ t->dst = NULL;
+ }
+
+ return t->dst;
+}
+
#endif /* __net_sctp_h__ */
diff --git a/net/sctp/output.c b/net/sctp/output.c
index a646681..93daf59 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -376,9 +376,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
*/
skb_set_owner_w(nskb, sk);
- /* The 'obsolete' field of dst is set to 2 when a dst is freed. */
- if (!dst || (dst->obsolete > 1)) {
- dst_release(dst);
+ if (!sctp_transport_dst_check(tp)) {
sctp_transport_route(tp, NULL, sctp_sk(sk));
if (asoc && (asoc->param_flags & SPP_PMTUD_ENABLE)) {
sctp_assoc_sync_pmtu(asoc);
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 132046c..bce3f06 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -222,23 +222,6 @@ void sctp_transport_pmtu(struct sctp_transport *transport)
transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT;
}
-/* this is a complete rip-off from __sk_dst_check
- * the cookie is always 0 since this is how it's used in the
- * pmtu code
- */
-static struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t)
-{
- struct dst_entry *dst = t->dst;
-
- if (dst && dst->obsolete && dst->ops->check(dst, 0) == NULL) {
- dst_release(t->dst);
- t->dst = NULL;
- return NULL;
- }
-
- return dst;
-}
-
void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu)
{
struct dst_entry *dst;
--
1.5.4.5
^ permalink raw reply related
* [PATCH net-next] tcp: be more strict before accepting ECN negociation
From: Eric Dumazet @ 2012-05-04 15:14 UTC (permalink / raw)
To: David Miller
Cc: netdev, Perry Lorier, Matt Mathis, Yuchung Cheng, Neal Cardwell,
Tom Herbert, Wilmer van der Gaast, Dave Täht, Ankur Jain
From: Eric Dumazet <edumazet@google.com>
It appears some networks play bad games with the two bits reserved for
ECN. This can trigger false congestion notifications and very slow
transferts.
Since RFC 3168 (6.1.1) forbids SYN packets to carry CT bits, we can
disable TCP ECN negociation if it happens we receive mangled CT bits in
the SYN packet.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Perry Lorier <perryl@google.com>
Cc: Matt Mathis <mattmathis@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Wilmer van der Gaast <wilmer@google.com>
Cc: Ankur Jain <jankur@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Dave Täht <dave.taht@bufferbloat.net>
---
include/net/tcp.h | 23 ++++++++++++++++-------
net/ipv4/tcp_ipv4.c | 2 +-
net/ipv6/tcp_ipv6.c | 2 +-
3 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index c826ed7..92faa6a 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -367,13 +367,6 @@ static inline void tcp_dec_quickack_mode(struct sock *sk,
#define TCP_ECN_DEMAND_CWR 4
#define TCP_ECN_SEEN 8
-static __inline__ void
-TCP_ECN_create_request(struct request_sock *req, struct tcphdr *th)
-{
- if (sysctl_tcp_ecn && th->ece && th->cwr)
- inet_rsk(req)->ecn_ok = 1;
-}
-
enum tcp_tw_status {
TCP_TW_SUCCESS = 0,
TCP_TW_RST = 1,
@@ -671,6 +664,22 @@ struct tcp_skb_cb {
#define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0]))
+/* RFC3168 : 6.1.1 SYN packets must not have ECT/ECN bits set
+ *
+ * If we receive a SYN packet with these bits set, it means a network is
+ * playing bad games with TOS bits. In order to avoid possible false congestion
+ * notifications, we disable TCP ECN negociation.
+ */
+static inline void
+TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb)
+{
+ const struct tcphdr *th = tcp_hdr(skb);
+
+ if (sysctl_tcp_ecn && th->ece && th->cwr &&
+ INET_ECN_is_not_ect(TCP_SKB_CB(skb)->ip_dsfield))
+ inet_rsk(req)->ecn_ok = 1;
+}
+
/* Due to TSO, an SKB can be composed of multiple actual
* packets. To keep these tracked properly, we use this.
*/
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index cf97e98..4ff5e1f 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1368,7 +1368,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
goto drop_and_free;
if (!want_cookie || tmp_opt.tstamp_ok)
- TCP_ECN_create_request(req, tcp_hdr(skb));
+ TCP_ECN_create_request(req, skb);
if (want_cookie) {
isn = cookie_v4_init_sequence(sk, skb, &req->mss);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 57b2109..078d039 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1140,7 +1140,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
treq->rmt_addr = ipv6_hdr(skb)->saddr;
treq->loc_addr = ipv6_hdr(skb)->daddr;
if (!want_cookie || tmp_opt.tstamp_ok)
- TCP_ECN_create_request(req, tcp_hdr(skb));
+ TCP_ECN_create_request(req, skb);
treq->iif = sk->sk_bound_dev_if;
^ permalink raw reply related
* Re: [net v2 0/4][pull request] Intel Wired LAN Driver Updates
From: David Miller @ 2012-05-04 14:58 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann
In-Reply-To: <1336129504-29919-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 4 May 2012 04:05:00 -0700
> This series of patches contains fixes for ixgbe, igb and e1000.
>
> v2: Added e1000 patch to fix sparse warnings and igb/ixgbe to
> correct an issue of calling function to reset Tx queue in
> init path.
>
> The following are changes since commit 5a8887d39e1ba5ee2d4ccb94b14d6f2dce5ddfca:
> sungem: Fix WakeOnLan
> and are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master`
I pulled, but what is that "`" character doing at the end of that GIT url?
I removed it when I pulled as you don't seem to have a "master`" branch in
your tree as far as I can tell.
^ permalink raw reply
* Re: Fwd: Re: WARNING: at net/sched/sch_generic.c:256 dev_watchdog+0x277/0x280()
From: Alex Villacís Lasso @ 2012-05-04 14:57 UTC (permalink / raw)
To: netdev, Francois Romieu
In-Reply-To: <4FA2A6A4.1030308@ceibo.fiec.espol.edu.ec>
(Resending to netdev@vger.kernel.org since previous attempt was rejected as spam)
El 03/05/12 10:39, Alex Villacís Lasso escribió:
> Alex Villacís Lasso<avillaci@fiec.espol.edu.ec> :
> [...]
> > I am currently away from the target computer. How should I check for this? lspci?
>
> lspci can not tell much. Use 'dmesg | grep XID' instead.
[alex@karlalex linux-git]$ dmesg | grep -i xid
[ 10.647557] r8169 0000:02:00.0: eth0: RTL8168b/8111b at 0xffffc90000352000, 00:22:68:44:17:2f, XID 98500000 IRQ 43
> A complete dmesg would be welcome.
>
> It could help to know a few things :
> - does the problem qualify as a regression since some kernel version ?
> If so which one ?
I have only seen these messages since 3.4-rc1. Vanilla kernels up to 3.3, and stock Fedora 16 kernels (kernel-3.3.2-6.fc16.x86_64) did not display this problem. However, I cannot confirm that the latest stock kernel is free from the message, since I prefer
to run the latest RC kernel on my home machine.
> - can it be reproduced with a kernel that has not been vbox tainted ?
I will check this. However, since the message only appears after an hour of so of moderate bittorrent traffic, it might take a while to confirm.
> - does networking recover ?
It does recover, after a few seconds.
>
> Thanks.
>
> --
> Ueimor
>
^ permalink raw reply
* Re: [PATCH v3] bonding: don't increase rx_dropped after processing LACPDUs
From: David Miller @ 2012-05-04 14:53 UTC (permalink / raw)
To: jbohac; +Cc: eric.dumazet, fubar, andy, netdev
In-Reply-To: <20120504132824.GD32665@midget.suse.cz>
From: Jiri Bohac <jbohac@suse.cz>
Date: Fri, 4 May 2012 15:28:24 +0200
> On Fri, May 04, 2012 at 03:04:56PM +0200, Eric Dumazet wrote:
>> On Fri, 2012-05-04 at 14:19 +0200, Jiri Bohac wrote:
>> > if (likely(nskb)) {
>> > - recv_probe(nskb, bond, slave);
>> > + ret = recv_probe(nskb, bond, slave);
>> > dev_kfree_skb(nskb);
>> > + if (ret == RX_HANDLER_CONSUMED) {
>> > + kfree_skb(skb);
>>
>> consume_skb(skb) to not fool drop_monitor/dropwatch ?
>
> Thanks, fixed below:
You're doing the patch-as-reply thing again.
^ permalink raw reply
* Re: [PATCH net-next] net: skb_peek()/skb_peek_tail() cleanups
From: David Miller @ 2012-05-04 14:52 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1336136491.3752.318.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 04 May 2012 15:01:31 +0200
> On Tue, 2012-05-01 at 09:41 -0400, David Miller wrote:
>> From: Eric Dumazet <eric.dumazet@gmail.com>
>> Date: Tue, 01 May 2012 04:31:46 +0200
>>
>> > From: Eric Dumazet <edumazet@google.com>
>> >
>> > remove useless casts and rename variables for less confusion.
>> >
>> > Signed-off-by: Eric Dumazet <edumazet@google.com>
>>
>> Applied, I really need to get back to completing the list_head
>> conversion :-/
>
> Actually doubly linked lists everywhere has a performance issue.
>
> When we dequeue one skb, we must bring in cpu cache the next skb as
> well, to perform the unlink.
>
> In some places it would be better to not have a double linked list, and
> only perform a prefetch(skb->next).
Indeed, I'll keep this in mind.
^ permalink raw reply
* Re: [PATCHv3 6/6] mISDN: Help to identify the card
From: Paul Gortmaker @ 2012-05-04 14:48 UTC (permalink / raw)
To: Karsten Keil; +Cc: David Miller, netdev, Karsten Keil
In-Reply-To: <1336140935-25830-7-git-send-email-kkeil@linux-pingi.de>
On Fri, May 4, 2012 at 10:15 AM, Karsten Keil <kkeil@linux-pingi.de> wrote:
> From: Karsten Keil <isdn@linux-pingi.de>
>
> With multiple cards is hard to figure out which port caused trouble
> int the layer2 routines (e.g. got a timeout).
> Now we have the informations in the log output.
If you are in here changing all these printk(KERN_LEVEL ...) lines anyway,
then perhaps it is a good time to make use of pr_warn() and friends to
help avoid some multi-line fragmentation things like this:
> printk(KERN_WARNING
> "%s: windowar[%d] is NULL\n",
> - __func__, p1);
> + mISDNDevName4ch(&l2->ch), p1);
> l2->windowar[p1] = NULL;
Paul.
^ permalink raw reply
* Re: [Lksctp-developers] Bug: sctp packets are dropped after IPSEC rekeying (route cache issue)
From: David Miller @ 2012-05-04 14:48 UTC (permalink / raw)
To: nicolas.dichtel
Cc: vladislav.yasevich, babu.srinivasan, lksctp-developers,
linux-sctp, netdev, michael.kreuzer
In-Reply-To: <4FA3AA6A.4070503@6wind.com>
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Fri, 04 May 2012 12:07:38 +0200
> Finally, this patch was never integrated into the mainline. Should I
> rebase it on the head?
>
> I've attach the last approved patch.
>
> Here is the original thread:
> http://sourceforge.net/mailarchive/message.php?msg_id=25786006
Vlad no longer works for HP so your email likely will bounce, and
he will not see it.
His new email address is vyasevich@gmail.com, as per the MAINTAINERS
file.
^ permalink raw reply
* [PATCH net-next] net: sched: factorize code (qdisc_drop())
From: Eric Dumazet @ 2012-05-04 14:37 UTC (permalink / raw)
To: David Miller; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
Use qdisc_drop() helper where possible.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/sched/sch_choke.c | 8 +++-----
net/sched/sch_dsmark.c | 3 +--
net/sched/sch_htb.c | 4 +---
net/sched/sch_teql.c | 4 +---
4 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c
index 81445cc..cc37dd5 100644
--- a/net/sched/sch_choke.c
+++ b/net/sched/sch_choke.c
@@ -332,15 +332,13 @@ static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch)
}
q->stats.pdrop++;
- sch->qstats.drops++;
- kfree_skb(skb);
- return NET_XMIT_DROP;
+ return qdisc_drop(skb, sch);
- congestion_drop:
+congestion_drop:
qdisc_drop(skb, sch);
return NET_XMIT_CN;
- other_drop:
+other_drop:
if (ret & __NET_XMIT_BYPASS)
sch->qstats.drops++;
kfree_skb(skb);
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 389b856..3886365 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -265,8 +265,7 @@ static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch)
return NET_XMIT_SUCCESS;
drop:
- kfree_skb(skb);
- sch->qstats.drops++;
+ qdisc_drop(skb, sch);
return NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
}
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 2ea6f19..acae5b0 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -558,9 +558,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
__skb_queue_tail(&q->direct_queue, skb);
q->direct_pkts++;
} else {
- kfree_skb(skb);
- sch->qstats.drops++;
- return NET_XMIT_DROP;
+ return qdisc_drop(skb, sch);
}
#ifdef CONFIG_NET_CLS_ACT
} else if (!cl) {
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index 4532659..ca0c296 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -88,9 +88,7 @@ teql_enqueue(struct sk_buff *skb, struct Qdisc *sch)
return NET_XMIT_SUCCESS;
}
- kfree_skb(skb);
- sch->qstats.drops++;
- return NET_XMIT_DROP;
+ return qdisc_drop(skb, sch);
}
static struct sk_buff *
^ permalink raw reply related
* Re: [PATCH] net: davinci_emac: Add pre_open, post_stop platform callbacks
From: Kevin Hilman @ 2012-05-04 14:31 UTC (permalink / raw)
To: Bedia, Vaibhav, nsekhar
Cc: Ben Hutchings, Mark A. Greer, netdev@vger.kernel.org,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
In-Reply-To: <B5906170F1614E41A8A28DE3B8D121433EA81B04@DBDE01.ent.ti.com>
+Sekhar
"Bedia, Vaibhav" <vaibhav.bedia@ti.com> writes:
> Hi Kevin,
>
> On Fri, May 04, 2012 at 03:02:16, Hilman, Kevin wrote:
>> Ben Hutchings <bhutchings@solarflare.com> writes:
>>
>> > On Thu, 2012-05-03 at 19:25 +0000, Bedia, Vaibhav wrote:
>> >> On Fri, May 04, 2012 at 00:16:32, Mark A. Greer wrote:
>> >> [...]
>> >> > >
>> >> > > So, if I understood this correctly, it's effectively like blocking a low power
>> >> > > state transition (here wfi execution) when EMAC is active?
>> >> >
>> >> > Assuming "it" is my patch, correct.
>> >> >
>> >>
>> >> Recently I was thinking about how to get certain drivers to disallow some or all
>> >> low power states and to me this also seems to fall in a similar category.
>> >>
>> >> One of the suggestions that I got was to check if the 'wakeup' entry associated with
>> >> the device under sysfs could be leveraged for this. The PM code could maintain
>> >> a whitelist (or blacklist) of devices and it decides the low power state to enter
>> >> based on the 'wakeup' entries associated with these devices. In this particular case,
>> >> maybe the driver could simply set this entry to non-wakeup capable when necessary and
>> >> then let the PM code take care of skipping the wfi execution.
>> >>
>> >> Thoughts/brickbats welcome :)
>> >
>> > You can maybe (ab)use the pm_qos mechanism for this.
>>
>> I thought of using this too, but it doesn't actually solve the problem:
>>
>> Using PM QoS, you can avoid hitting the deeper idle states by setting a
>> very low wakeup latency. However, on ARM platforms, even the shallowest
>> idle states use the WFI instruction, and the EMAC would still not be
>> able to wake the system from WFI. A possibility would be define the
>> shallowest idle state to be one that doesn't call WFI and just does
>> cpu_relax(). However, that would only work for CPUidle since PM QoS
>> constraints are only checked by CPUidle. So, a non-CPUidle kernel would
>> still have this bug. :(
>>
>> Ultimately, this is just broken HW. This network HW was bolted onto an
>> existing SoC without consideration for wakeup capabilities. The result
>> is that any use of this device with networking has to completely disable
>> SoC power management.
>>
>
> I was checking with internally with some folks on the issue being addressed
> in this patch and unfortunately no one seems to be aware of this :(
Do you mean they are not aware that the EMAC cannot wakeup th SoC, or
they are not aware that having a device that cannot wakup the SoC has
such an impact on Linux.
> Mark mentioned nfs mounted rootfs being slow but in my limited testing I
> didn't observe this on an AM3517 board. I am yet to go through the PSP code
> to be fully sure that wfi instruction is indeed being executed but I wanted
> to check if I need to do something specific to reproduce this at my end.
Based on my discussion with Mark, I suspect that the kernel you're using
is simply not going idle.
> Irrespective of the above problem being present in the h/w, I feel the approach
> of adding platform callbacks for blocking deeper idle states will create problems
> when this is required for multiple peripherals.
I agree. If we have to do this for multiple peripherals, the curren
approach it will become unwieldy.
> I agree that the default behavior should be to support the deepest
> idle state based on the peripherals being used but IMO the user should
> have the flexibility to change this behavior if he wishes to do so.
Well, we always have the option of booting with 'nohlt' on the
commandline.
Since nobody seems to have thought about idle power management in the HW
design, maybe we shouldn't break our backs to hack around the
HW brokenness.
Personally, I'm perfectly OK leaving the default behavior of
sluggish/unresponsive devices that are not wakeup capable. The only fix
is to not sleep, and that can be accomplished on the cmdline using
nohlt (at the expense of some energy savings.)
> I don't know whether the usage of the 'wakeup' entries for giving this
> control to users qualifies as an abuse of the infrastructure.
It does.
> If it does, perhaps there should some other mechanism for letting
> users control the system behavior.
Come to think of it, the right solution here is probably to use runtime
PM. We could then to add some custom hooks for davinci_emac in the
device code to use enable_hlt/disable_hlt based on activity.
In order to do that though, the davinci_emac driver needs to be runtime
PM converted.
Kevin
^ permalink raw reply
* [PATCHv3 5/6] mISDN: Layer1 statemachine fix
From: Karsten Keil @ 2012-05-04 14:15 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Karsten Keil
In-Reply-To: <1336140935-25830-1-git-send-email-kkeil@linux-pingi.de>
From: Karsten Keil <isdn@linux-pingi.de>
The timer3 and the activation delay timer need to be independent.
If timer3 fires do not reqest power up we have to send only INFO 0.
Now layer1 pass TBR3 again.
Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
---
drivers/isdn/mISDN/layer1.c | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/isdn/mISDN/layer1.c b/drivers/isdn/mISDN/layer1.c
index ff05153..bebc57b 100644
--- a/drivers/isdn/mISDN/layer1.c
+++ b/drivers/isdn/mISDN/layer1.c
@@ -28,7 +28,8 @@ static u_int *debug;
struct layer1 {
u_long Flags;
struct FsmInst l1m;
- struct FsmTimer timer;
+ struct FsmTimer timer3;
+ struct FsmTimer timerX;
int delay;
int t3_value;
struct dchannel *dch;
@@ -135,7 +136,7 @@ l1_deact_req_s(struct FsmInst *fi, int event, void *arg)
struct layer1 *l1 = fi->userdata;
mISDN_FsmChangeState(fi, ST_L1_F3);
- mISDN_FsmRestartTimer(&l1->timer, 550, EV_TIMER_DEACT, NULL, 2);
+ mISDN_FsmRestartTimer(&l1->timerX, 550, EV_TIMER_DEACT, NULL, 2);
test_and_set_bit(FLG_L1_DEACTTIMER, &l1->Flags);
}
@@ -180,11 +181,11 @@ l1_info4_ind(struct FsmInst *fi, int event, void *arg)
mISDN_FsmChangeState(fi, ST_L1_F7);
l1->dcb(l1->dch, INFO3_P8);
if (test_and_clear_bit(FLG_L1_DEACTTIMER, &l1->Flags))
- mISDN_FsmDelTimer(&l1->timer, 4);
+ mISDN_FsmDelTimer(&l1->timerX, 4);
if (!test_bit(FLG_L1_ACTIVATED, &l1->Flags)) {
if (test_and_clear_bit(FLG_L1_T3RUN, &l1->Flags))
- mISDN_FsmDelTimer(&l1->timer, 3);
- mISDN_FsmRestartTimer(&l1->timer, 110, EV_TIMER_ACT, NULL, 2);
+ mISDN_FsmDelTimer(&l1->timer3, 3);
+ mISDN_FsmRestartTimer(&l1->timerX, 110, EV_TIMER_ACT, NULL, 2);
test_and_set_bit(FLG_L1_ACTTIMER, &l1->Flags);
}
}
@@ -202,7 +203,7 @@ l1_timer3(struct FsmInst *fi, int event, void *arg)
}
if (l1->l1m.state != ST_L1_F6) {
mISDN_FsmChangeState(fi, ST_L1_F3);
- l1->dcb(l1->dch, HW_POWERUP_REQ);
+ /* do not force anything here, we need send INFO 0 */
}
}
@@ -234,8 +235,9 @@ l1_activate_s(struct FsmInst *fi, int event, void *arg)
{
struct layer1 *l1 = fi->userdata;
- mISDN_FsmRestartTimer(&l1->timer, l1->t3_value, EV_TIMER3, NULL, 2);
+ mISDN_FsmRestartTimer(&l1->timer3, l1->t3_value, EV_TIMER3, NULL, 2);
test_and_set_bit(FLG_L1_T3RUN, &l1->Flags);
+ /* Tell HW to send INFO 1 */
l1->dcb(l1->dch, HW_RESET_REQ);
}
@@ -303,7 +305,8 @@ static struct FsmNode L1SFnList[] =
static void
release_l1(struct layer1 *l1) {
- mISDN_FsmDelTimer(&l1->timer, 0);
+ mISDN_FsmDelTimer(&l1->timerX, 0);
+ mISDN_FsmDelTimer(&l1->timer3, 0);
if (l1->dch)
l1->dch->l1 = NULL;
module_put(THIS_MODULE);
@@ -395,7 +398,8 @@ create_l1(struct dchannel *dch, dchannel_l1callback *dcb) {
nl1->l1m.printdebug = l1m_debug;
nl1->dch = dch;
nl1->dcb = dcb;
- mISDN_FsmInitTimer(&nl1->l1m, &nl1->timer);
+ mISDN_FsmInitTimer(&nl1->l1m, &nl1->timer3);
+ mISDN_FsmInitTimer(&nl1->l1m, &nl1->timerX);
__module_get(THIS_MODULE);
dch->l1 = nl1;
return 0;
--
1.7.3.4
^ permalink raw reply related
* [PATCHv3 4/6] mISDN: Make layer1 timer 3 value configurable
From: Karsten Keil @ 2012-05-04 14:15 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Karsten Keil
In-Reply-To: <1336140935-25830-1-git-send-email-kkeil@linux-pingi.de>
From: Karsten Keil <isdn@linux-pingi.de>
For certification test it is very useful to change the layer1
timer3 value on runtime.
Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
---
drivers/isdn/hardware/mISDN/avmfritz.c | 5 ++++-
drivers/isdn/hardware/mISDN/hfcmulti.c | 5 ++++-
drivers/isdn/hardware/mISDN/hfcpci.c | 5 ++++-
drivers/isdn/hardware/mISDN/mISDNipac.c | 17 ++++++++++++-----
drivers/isdn/hardware/mISDN/netjet.c | 5 ++++-
drivers/isdn/hardware/mISDN/speedfax.c | 5 ++++-
drivers/isdn/hardware/mISDN/w6692.c | 5 ++++-
drivers/isdn/mISDN/layer1.c | 16 ++++++++++++++--
include/linux/mISDNhw.h | 3 +++
include/linux/mISDNif.h | 3 ++-
10 files changed, 55 insertions(+), 14 deletions(-)
diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c
index c0b8c96..6bf2c58 100644
--- a/drivers/isdn/hardware/mISDN/avmfritz.c
+++ b/drivers/isdn/hardware/mISDN/avmfritz.c
@@ -868,7 +868,7 @@ channel_ctrl(struct fritzcard *fc, struct mISDN_ctrl_req *cq)
switch (cq->op) {
case MISDN_CTRL_GETOP:
- cq->op = MISDN_CTRL_LOOP;
+ cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_L1_TIMER3;
break;
case MISDN_CTRL_LOOP:
/* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */
@@ -878,6 +878,9 @@ channel_ctrl(struct fritzcard *fc, struct mISDN_ctrl_req *cq)
}
ret = fc->isac.ctrl(&fc->isac, HW_TESTLOOP, cq->channel);
break;
+ case MISDN_CTRL_L1_TIMER3:
+ ret = fc->isac.ctrl(&fc->isac, HW_TIMER3_VALUE, cq->p1);
+ break;
default:
pr_info("%s: %s unknown Op %x\n", fc->name, __func__, cq->op);
ret = -EINVAL;
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index 4301331..4c128e4 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -4161,7 +4161,7 @@ channel_dctrl(struct dchannel *dch, struct mISDN_ctrl_req *cq)
switch (cq->op) {
case MISDN_CTRL_GETOP:
- cq->op = MISDN_CTRL_HFC_OP;
+ cq->op = MISDN_CTRL_HFC_OP | MISDN_CTRL_L1_TIMER3;
break;
case MISDN_CTRL_HFC_WD_INIT: /* init the watchdog */
wd_cnt = cq->p1 & 0xf;
@@ -4191,6 +4191,9 @@ channel_dctrl(struct dchannel *dch, struct mISDN_ctrl_req *cq)
__func__);
HFC_outb(hc, R_BERT_WD_MD, hc->hw.r_bert_wd_md | V_WD_RES);
break;
+ case MISDN_CTRL_L1_TIMER3:
+ ret = l1_event(dch->l1, HW_TIMER3_VALUE | (cq->p1 & 0xff));
+ break;
default:
printk(KERN_WARNING "%s: unknown Op %x\n",
__func__, cq->op);
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
index e2c83a2..5fe993e 100644
--- a/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -1819,7 +1819,7 @@ channel_ctrl(struct hfc_pci *hc, struct mISDN_ctrl_req *cq)
switch (cq->op) {
case MISDN_CTRL_GETOP:
cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_CONNECT |
- MISDN_CTRL_DISCONNECT;
+ MISDN_CTRL_DISCONNECT | MISDN_CTRL_L1_TIMER3;
break;
case MISDN_CTRL_LOOP:
/* channel 0 disabled loop */
@@ -1896,6 +1896,9 @@ channel_ctrl(struct hfc_pci *hc, struct mISDN_ctrl_req *cq)
Write_hfc(hc, HFCPCI_CONNECT, hc->hw.conn);
hc->hw.trm &= 0x7f; /* disable IOM-loop */
break;
+ case MISDN_CTRL_L1_TIMER3:
+ ret = l1_event(hc->dch.l1, HW_TIMER3_VALUE | (cq->p1 & 0xff));
+ break;
default:
printk(KERN_WARNING "%s: unknown Op %x\n",
__func__, cq->op);
diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c
index 884369f..92d4a78 100644
--- a/drivers/isdn/hardware/mISDN/mISDNipac.c
+++ b/drivers/isdn/hardware/mISDN/mISDNipac.c
@@ -603,10 +603,11 @@ isac_l1hw(struct mISDNchannel *ch, struct sk_buff *skb)
}
static int
-isac_ctrl(struct isac_hw *isac, u32 cmd, u_long para)
+isac_ctrl(struct isac_hw *isac, u32 cmd, unsigned long para)
{
u8 tl = 0;
- u_long flags;
+ unsigned long flags;
+ int ret = 0;
switch (cmd) {
case HW_TESTLOOP:
@@ -626,12 +627,15 @@ isac_ctrl(struct isac_hw *isac, u32 cmd, u_long para)
}
spin_unlock_irqrestore(isac->hwlock, flags);
break;
+ case HW_TIMER3_VALUE:
+ ret = l1_event(isac->dch.l1, HW_TIMER3_VALUE | (para & 0xff));
+ break;
default:
pr_debug("%s: %s unknown command %x %lx\n", isac->name,
__func__, cmd, para);
- return -1;
+ ret = -1;
}
- return 0;
+ return ret;
}
static int
@@ -1526,7 +1530,7 @@ channel_ctrl(struct ipac_hw *ipac, struct mISDN_ctrl_req *cq)
switch (cq->op) {
case MISDN_CTRL_GETOP:
- cq->op = MISDN_CTRL_LOOP;
+ cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_L1_TIMER3;
break;
case MISDN_CTRL_LOOP:
/* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */
@@ -1536,6 +1540,9 @@ channel_ctrl(struct ipac_hw *ipac, struct mISDN_ctrl_req *cq)
}
ret = ipac->ctrl(ipac, HW_TESTLOOP, cq->channel);
break;
+ case MISDN_CTRL_L1_TIMER3:
+ ret = ipac->isac.ctrl(&ipac->isac, HW_TIMER3_VALUE, cq->p1);
+ break;
default:
pr_info("%s: unknown CTRL OP %x\n", ipac->name, cq->op);
ret = -EINVAL;
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c
index c726e09..27998d7 100644
--- a/drivers/isdn/hardware/mISDN/netjet.c
+++ b/drivers/isdn/hardware/mISDN/netjet.c
@@ -837,7 +837,7 @@ channel_ctrl(struct tiger_hw *card, struct mISDN_ctrl_req *cq)
switch (cq->op) {
case MISDN_CTRL_GETOP:
- cq->op = MISDN_CTRL_LOOP;
+ cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_L1_TIMER3;
break;
case MISDN_CTRL_LOOP:
/* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */
@@ -847,6 +847,9 @@ channel_ctrl(struct tiger_hw *card, struct mISDN_ctrl_req *cq)
}
ret = card->isac.ctrl(&card->isac, HW_TESTLOOP, cq->channel);
break;
+ case MISDN_CTRL_L1_TIMER3:
+ ret = card->isac.ctrl(&card->isac, HW_TIMER3_VALUE, cq->p1);
+ break;
default:
pr_info("%s: %s unknown Op %x\n", card->name, __func__, cq->op);
ret = -EINVAL;
diff --git a/drivers/isdn/hardware/mISDN/speedfax.c b/drivers/isdn/hardware/mISDN/speedfax.c
index 0468993..93f344d 100644
--- a/drivers/isdn/hardware/mISDN/speedfax.c
+++ b/drivers/isdn/hardware/mISDN/speedfax.c
@@ -224,7 +224,7 @@ channel_ctrl(struct sfax_hw *sf, struct mISDN_ctrl_req *cq)
switch (cq->op) {
case MISDN_CTRL_GETOP:
- cq->op = MISDN_CTRL_LOOP;
+ cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_L1_TIMER3;
break;
case MISDN_CTRL_LOOP:
/* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */
@@ -234,6 +234,9 @@ channel_ctrl(struct sfax_hw *sf, struct mISDN_ctrl_req *cq)
}
ret = sf->isac.ctrl(&sf->isac, HW_TESTLOOP, cq->channel);
break;
+ case MISDN_CTRL_L1_TIMER3:
+ ret = sf->isac.ctrl(&sf->isac, HW_TIMER3_VALUE, cq->p1);
+ break;
default:
pr_info("%s: unknown Op %x\n", sf->name, cq->op);
ret = -EINVAL;
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
index 2183357..1d04467 100644
--- a/drivers/isdn/hardware/mISDN/w6692.c
+++ b/drivers/isdn/hardware/mISDN/w6692.c
@@ -1035,7 +1035,10 @@ channel_ctrl(struct w6692_hw *card, struct mISDN_ctrl_req *cq)
switch (cq->op) {
case MISDN_CTRL_GETOP:
- cq->op = 0;
+ cq->op = MISDN_CTRL_L1_TIMER3;
+ break;
+ case MISDN_CTRL_L1_TIMER3:
+ ret = l1_event(card->dch.l1, HW_TIMER3_VALUE | (cq->p1 & 0xff));
break;
default:
pr_info("%s: unknown CTRL OP %x\n", card->name, cq->op);
diff --git a/drivers/isdn/mISDN/layer1.c b/drivers/isdn/mISDN/layer1.c
index 0fc49b3..ff05153 100644
--- a/drivers/isdn/mISDN/layer1.c
+++ b/drivers/isdn/mISDN/layer1.c
@@ -30,11 +30,12 @@ struct layer1 {
struct FsmInst l1m;
struct FsmTimer timer;
int delay;
+ int t3_value;
struct dchannel *dch;
dchannel_l1callback *dcb;
};
-#define TIMER3_VALUE 7000
+#define TIMER3_DEFAULT_VALUE 7000
static
struct Fsm l1fsm_s = {NULL, 0, 0, NULL, NULL};
@@ -233,7 +234,7 @@ l1_activate_s(struct FsmInst *fi, int event, void *arg)
{
struct layer1 *l1 = fi->userdata;
- mISDN_FsmRestartTimer(&l1->timer, TIMER3_VALUE, EV_TIMER3, NULL, 2);
+ mISDN_FsmRestartTimer(&l1->timer, l1->t3_value, EV_TIMER3, NULL, 2);
test_and_set_bit(FLG_L1_T3RUN, &l1->Flags);
l1->dcb(l1->dch, HW_RESET_REQ);
}
@@ -356,6 +357,16 @@ l1_event(struct layer1 *l1, u_int event)
release_l1(l1);
break;
default:
+ if ((event & ~HW_TIMER3_VMASK) == HW_TIMER3_VALUE) {
+ int val = event & HW_TIMER3_VMASK;
+
+ if (val < 5)
+ val = 5;
+ if (val > 30)
+ val = 30;
+ l1->t3_value = val;
+ break;
+ }
if (*debug & DEBUG_L1)
printk(KERN_DEBUG "%s %x unhandled\n",
__func__, event);
@@ -377,6 +388,7 @@ create_l1(struct dchannel *dch, dchannel_l1callback *dcb) {
nl1->l1m.fsm = &l1fsm_s;
nl1->l1m.state = ST_L1_F3;
nl1->Flags = 0;
+ nl1->t3_value = TIMER3_DEFAULT_VALUE;
nl1->l1m.debug = *debug & DEBUG_L1_FSM;
nl1->l1m.userdata = nl1;
nl1->l1m.userint = 0;
diff --git a/include/linux/mISDNhw.h b/include/linux/mISDNhw.h
index 4af8414..de165b5 100644
--- a/include/linux/mISDNhw.h
+++ b/include/linux/mISDNhw.h
@@ -135,6 +135,9 @@ extern int create_l1(struct dchannel *, dchannel_l1callback *);
#define HW_TESTRX_RAW 0x9602
#define HW_TESTRX_HDLC 0x9702
#define HW_TESTRX_OFF 0x9802
+#define HW_TIMER3_IND 0x9902
+#define HW_TIMER3_VALUE 0x9a00
+#define HW_TIMER3_VMASK 0x00FF
struct layer1;
extern int l1_event(struct layer1 *, u_int);
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h
index b80f764..9cc8ce5 100644
--- a/include/linux/mISDNif.h
+++ b/include/linux/mISDNif.h
@@ -37,7 +37,7 @@
*/
#define MISDN_MAJOR_VERSION 1
#define MISDN_MINOR_VERSION 1
-#define MISDN_RELEASE 26
+#define MISDN_RELEASE 27
/* primitives for information exchange
* generell format
@@ -372,6 +372,7 @@ clear_channelmap(u_int nr, u_char *map)
#define MISDN_CTRL_RX_OFF 0x0100
#define MISDN_CTRL_FILL_EMPTY 0x0200
#define MISDN_CTRL_GETPEER 0x0400
+#define MISDN_CTRL_L1_TIMER3 0x0800
#define MISDN_CTRL_HW_FEATURES_OP 0x2000
#define MISDN_CTRL_HW_FEATURES 0x2001
#define MISDN_CTRL_HFC_OP 0x4000
--
1.7.3.4
^ permalink raw reply related
* [PATCHv3 2/6] mISDN: Fix refcounting bug
From: Karsten Keil @ 2012-05-04 14:15 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Karsten Keil, Karsten Keil
In-Reply-To: <1336140935-25830-1-git-send-email-kkeil@linux-pingi.de>
From: Karsten Keil <isdn@linux-pingi.de>
Under some configs it was still not possible to unload the driver,
because the module use count was srewed up.
Signed-off-by: Karsten Keil <keil@b1-systems.de>
---
drivers/isdn/mISDN/tei.c | 53 +++++++++++++++++++++++++++++++++------------
1 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c
index 969766f..109276a 100644
--- a/drivers/isdn/mISDN/tei.c
+++ b/drivers/isdn/mISDN/tei.c
@@ -790,18 +790,23 @@ tei_ph_data_ind(struct teimgr *tm, u_int mt, u_char *dp, int len)
static struct layer2 *
create_new_tei(struct manager *mgr, int tei, int sapi)
{
- u_long opt = 0;
- u_long flags;
- int id;
- struct layer2 *l2;
+ unsigned long opt = 0;
+ unsigned long flags;
+ int id;
+ struct layer2 *l2;
+ struct channel_req rq;
if (!mgr->up)
return NULL;
if ((tei >= 0) && (tei < 64))
test_and_set_bit(OPTION_L2_FIXEDTEI, &opt);
- if (mgr->ch.st->dev->Dprotocols
- & ((1 << ISDN_P_TE_E1) | (1 << ISDN_P_NT_E1)))
+ if (mgr->ch.st->dev->Dprotocols & ((1 << ISDN_P_TE_E1) |
+ (1 << ISDN_P_NT_E1))) {
test_and_set_bit(OPTION_L2_PMX, &opt);
+ rq.protocol = ISDN_P_NT_E1;
+ } else {
+ rq.protocol = ISDN_P_NT_S0;
+ }
l2 = create_l2(mgr->up, ISDN_P_LAPD_NT, opt, tei, sapi);
if (!l2) {
printk(KERN_WARNING "%s:no memory for layer2\n", __func__);
@@ -836,6 +841,14 @@ create_new_tei(struct manager *mgr, int tei, int sapi)
l2->ch.recv = mgr->ch.recv;
l2->ch.peer = mgr->ch.peer;
l2->ch.ctrl(&l2->ch, OPEN_CHANNEL, NULL);
+ /* We need open here L1 for the manager as well (refcounting) */
+ rq.adr.dev = mgr->ch.st->dev->id;
+ id = mgr->ch.st->own.ctrl(&mgr->ch.st->own, OPEN_CHANNEL, &rq);
+ if (id < 0) {
+ printk(KERN_WARNING "%s: cannot open L1\n", __func__);
+ l2->ch.ctrl(&l2->ch, CLOSE_CHANNEL, NULL);
+ l2 = NULL;
+ }
}
return l2;
}
@@ -978,10 +991,11 @@ TEIrelease(struct layer2 *l2)
static int
create_teimgr(struct manager *mgr, struct channel_req *crq)
{
- struct layer2 *l2;
- u_long opt = 0;
- u_long flags;
- int id;
+ struct layer2 *l2;
+ unsigned long opt = 0;
+ unsigned long flags;
+ int id;
+ struct channel_req l1rq;
if (*debug & DEBUG_L2_TEI)
printk(KERN_DEBUG "%s: %s proto(%x) adr(%d %d %d %d)\n",
@@ -1016,6 +1030,7 @@ create_teimgr(struct manager *mgr, struct channel_req *crq)
if (crq->protocol == ISDN_P_LAPD_TE)
test_and_set_bit(MGR_OPT_USER, &mgr->options);
}
+ l1rq.adr = crq->adr;
if (mgr->ch.st->dev->Dprotocols
& ((1 << ISDN_P_TE_E1) | (1 << ISDN_P_NT_E1)))
test_and_set_bit(OPTION_L2_PMX, &opt);
@@ -1055,24 +1070,34 @@ create_teimgr(struct manager *mgr, struct channel_req *crq)
l2->tm->tei_m.fsm = &teifsmu;
l2->tm->tei_m.state = ST_TEI_NOP;
l2->tm->tval = 1000; /* T201 1 sec */
+ if (test_bit(OPTION_L2_PMX, &opt))
+ l1rq.protocol = ISDN_P_TE_E1;
+ else
+ l1rq.protocol = ISDN_P_TE_S0;
} else {
l2->tm->tei_m.fsm = &teifsmn;
l2->tm->tei_m.state = ST_TEI_NOP;
l2->tm->tval = 2000; /* T202 2 sec */
+ if (test_bit(OPTION_L2_PMX, &opt))
+ l1rq.protocol = ISDN_P_NT_E1;
+ else
+ l1rq.protocol = ISDN_P_NT_S0;
}
mISDN_FsmInitTimer(&l2->tm->tei_m, &l2->tm->timer);
write_lock_irqsave(&mgr->lock, flags);
id = get_free_id(mgr);
list_add_tail(&l2->list, &mgr->layer2);
write_unlock_irqrestore(&mgr->lock, flags);
- if (id < 0) {
- l2->ch.ctrl(&l2->ch, CLOSE_CHANNEL, NULL);
- } else {
+ if (id >= 0) {
l2->ch.nr = id;
l2->up->nr = id;
crq->ch = &l2->ch;
- id = 0;
+ /* We need open here L1 for the manager as well (refcounting) */
+ id = mgr->ch.st->own.ctrl(&mgr->ch.st->own, OPEN_CHANNEL,
+ &l1rq);
}
+ if (id < 0)
+ l2->ch.ctrl(&l2->ch, CLOSE_CHANNEL, NULL);
return id;
}
--
1.7.3.4
^ permalink raw reply related
* [PATCHv3 0/6] mISDN: Collection of patches for layer1/layer2
From: Karsten Keil @ 2012-05-04 14:15 UTC (permalink / raw)
To: David Miller; +Cc: netdev
Version 3
Implement the TIMER3 configuration in one patch.
Fix additional issues found by checkpatch --strict
Version 2
I removed the PCM only stuff and the 2MBit test mode and will rework
them for a later submit. I added the lowlevel driver changes for the TIMER3
config to this series.
These patches are mainly the outcome of a TBR3 recertification done
within BT labs.
The patches itself are very well tested more as 10000 valid/invalid
call setup were done in preparartion for the TBR3 aproval.
For net-next.
Andreas Eversberg (1):
mISDN: Added PH_* state info to tei manager.
Karsten Keil (5):
mISDN: Fix refcounting bug
mISDN: L2 timeouts need to be queued as L2 event
mISDN: Make layer1 timer 3 value configurable
mISDN: Layer1 statemachine fix
mISDN: Help to identify the card
drivers/isdn/hardware/mISDN/avmfritz.c | 5 +-
drivers/isdn/hardware/mISDN/hfcmulti.c | 5 +-
drivers/isdn/hardware/mISDN/hfcpci.c | 5 +-
drivers/isdn/hardware/mISDN/mISDNipac.c | 17 +++--
drivers/isdn/hardware/mISDN/netjet.c | 5 +-
drivers/isdn/hardware/mISDN/speedfax.c | 5 +-
drivers/isdn/hardware/mISDN/w6692.c | 5 +-
drivers/isdn/mISDN/core.c | 16 ++++
drivers/isdn/mISDN/layer1.c | 36 +++++++---
drivers/isdn/mISDN/layer2.c | 120 +++++++++++++++++++++++--------
drivers/isdn/mISDN/tei.c | 72 ++++++++++++++-----
include/linux/mISDNhw.h | 3 +
include/linux/mISDNif.h | 9 ++-
13 files changed, 234 insertions(+), 69 deletions(-)
--
1.7.3.4
^ 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