Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commitc4f4d2f

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Always validate XFRM esn replay attribute, from Florian Westphal. 2) Fix RCU read lock imbalance in xfrm_get_tos(), from Xin Long. 3) Don't try to get firmware dump if not loaded in iwlwifi, from Shaul Triebitz. 4) Fix BPF helpers to deal with SCTP GSO SKBs properly, from Daniel Axtens. 5) Fix some interrupt handling issues in e1000e driver, from Benjamin Poitier. 6) Use strlcpy() in several ethtool get_strings methods, from Florian Fainelli. 7) Fix rhlist dup insertion, from Paul Blakey. 8) Fix SKB leak in netem packet scheduler, from Alexey Kodanev. 9) Fix driver unload crash when link is up in smsc911x, from Jeremy Linton.10) Purge out invalid socket types in l2tp_tunnel_create(), from Eric Dumazet.11) Need to purge the write queue when TCP connections are aborted, otherwise userspace using MSG_ZEROCOPY can't close the fd. From Soheil Hassas Yeganeh.12) Fix double free in error path of team driver, from Arkadi Sharshevsky.13) Filter fixes for hv_netvsc driver, from Stephen Hemminger.14) Fix non-linear packet access in ipv6 ndisc code, from Lorenzo Bianconi.15) Properly filter out unsupported feature flags in macvlan driver, from Shannon Nelson.16) Don't request loading the diag module for a protocol if the protocol itself is not even registered. From Xin Long.17) If datagram connect fails in ipv6, make sure the socket state is consistent afterwards. From Paolo Abeni.18) Use after free in qed driver, from Dan Carpenter.19) If received ipv4 PMTU is less than the min pmtu, lock the mtu in the entry. From Sabrina Dubroca.20) Fix sleep in atomic in tg3 driver, from Jonathan Toppins.21) Fix vlan in vlan untagging in some situations, from Toshiaki Makita.22) Fix double SKB free in genlmsg_mcast(). From Nicolas Dichtel.23) Fix NULL derefs in error paths of tcf_*_init(), from Davide Caratti.24) Unbalanced PM runtime calls in FEC driver, from Florian Fainelli.25) Memory leak in gemini driver, from Igor Pylypiv.26) IDR leaks in error paths of tcf_*_init() functions, from Davide Caratti.27) Need to use GFP_ATOMIC in seg6_build_state(), from David Lebrun.28) Missing dev_put() in error path of macsec_newlink(), from Dan Carpenter.* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (201 commits) macsec: missing dev_put() on error in macsec_newlink() net: dsa: Fix functional dsa-loop dependency on FIXED_PHY hv_netvsc: common detach logic hv_netvsc: change GPAD teardown order on older versions hv_netvsc: use RCU to fix concurrent rx and queue changes hv_netvsc: disable NAPI before channel close net/ipv6: Handle onlink flag with multipath routes ppp: avoid loop in xmit recursion detection code ipv6: sr: fix NULL pointer dereference when setting encap source address ipv6: sr: fix scheduling in RCU when creating seg6 lwtunnel state net: aquantia: driver version bump net: aquantia: Implement pci shutdown callback net: aquantia: Allow live mac address changes net: aquantia: Add tx clean budget and valid budget handling logic net: aquantia: Change inefficient wait loop on fw data reads net: aquantia: Fix a regression with reset on old firmware net: aquantia: Fix hardware reset when SPI may rarely hangup s390/qeth: on channel error, reject further cmd requests s390/qeth: lock read device while queueing next buffer s390/qeth: when thread completes, wake up all waiters ...
2 parents9ce2078 +5dcd840 commitc4f4d2f

File tree

211 files changed

+2086
-1152
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+2086
-1152
lines changed

‎Documentation/devicetree/bindings/net/dsa/marvell.txt‎

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@ Example:
5050
compatible = "marvell,mv88e6085";
5151
reg = <0>;
5252
reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
53-
};
54-
mdio {
55-
#address-cells = <1>;
56-
#size-cells = <0>;
57-
switch1phy0: switch1phy0@0 {
58-
reg = <0>;
59-
interrupt-parent = <&switch0>;
60-
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
53+
54+
mdio {
55+
#address-cells = <1>;
56+
#size-cells = <0>;
57+
switch1phy0: switch1phy0@0 {
58+
reg = <0>;
59+
interrupt-parent = <&switch0>;
60+
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
61+
};
6162
};
6263
};
6364
};
@@ -74,23 +75,24 @@ Example:
7475
compatible = "marvell,mv88e6390";
7576
reg = <0>;
7677
reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
77-
};
78-
mdio {
79-
#address-cells = <1>;
80-
#size-cells = <0>;
81-
switch1phy0: switch1phy0@0 {
82-
reg = <0>;
83-
interrupt-parent = <&switch0>;
84-
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
78+
79+
mdio {
80+
#address-cells = <1>;
81+
#size-cells = <0>;
82+
switch1phy0: switch1phy0@0 {
83+
reg = <0>;
84+
interrupt-parent = <&switch0>;
85+
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
86+
};
8587
};
86-
};
8788

88-
mdio1 {
89-
compatible = "marvell,mv88e6xxx-mdio-external";
90-
#address-cells = <1>;
91-
#size-cells = <0>;
92-
switch1phy9: switch1phy0@9 {
93-
reg = <9>;
89+
mdio1 {
90+
compatible = "marvell,mv88e6xxx-mdio-external";
91+
#address-cells = <1>;
92+
#size-cells = <0>;
93+
switch1phy9: switch1phy0@9 {
94+
reg = <9>;
95+
};
9496
};
9597
};
9698
};

‎Documentation/devicetree/bindings/net/renesas,ravb.txt‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ Required properties:
2727
SoC-specific version corresponding to the platform first followed by
2828
the generic version.
2929

30-
- reg: offset and length of (1) the register block and (2) the stream buffer.
30+
- reg: Offset and length of (1) the register block and (2) the stream buffer.
31+
The region for the register block is mandatory.
32+
The region for the stream buffer is optional, as it is only present on
33+
R-Car Gen2 and RZ/G1 SoCs, and on R-Car H3 (R8A7795), M3-W (R8A7796),
34+
and M3-N (R8A77965).
3135
- interrupts: A list of interrupt-specifiers, one for each entry in
3236
interrupt-names.
3337
If interrupt-names is not present, an interrupt specifier

‎Documentation/networking/segmentation-offloads.txt‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ TCP Segmentation Offload
2020

2121
TCP segmentation allows a device to segment a single frame into multiple
2222
frames with a data payload size specified in skb_shinfo()->gso_size.
23-
When TCP segmentation requested the bit for eitherSKB_GSO_TCP or
24-
SKB_GSO_TCP6 should be set in skb_shinfo()->gso_type and
23+
When TCP segmentation requested the bit for eitherSKB_GSO_TCPV4 or
24+
SKB_GSO_TCPV6 should be set in skb_shinfo()->gso_type and
2525
skb_shinfo()->gso_size should be set to a non-zero value.
2626

2727
TCP segmentation is dependent on support for the use of partial checksum
@@ -153,8 +153,18 @@ To signal this, gso_size is set to the special value GSO_BY_FRAGS.
153153

154154
Therefore, any code in the core networking stack must be aware of the
155155
possibility that gso_size will be GSO_BY_FRAGS and handle that case
156-
appropriately. (For size checks, the skb_gso_validate_*_len family of
157-
helpers do this automatically.)
156+
appropriately.
157+
158+
There are some helpers to make this easier:
159+
160+
- skb_is_gso(skb) && skb_is_gso_sctp(skb) is the best way to see if
161+
an skb is an SCTP GSO skb.
162+
163+
- For size checks, the skb_gso_validate_*_len family of helpers correctly
164+
considers GSO_BY_FRAGS.
165+
166+
- For manipulating packets, skb_increase_gso_size and skb_decrease_gso_size
167+
will check for GSO_BY_FRAGS and WARN if asked to manipulate these skbs.
158168

159169
This also affects drivers with the NETIF_F_FRAGLIST & NETIF_F_GSO_SCTP bits
160170
set. Note also that NETIF_F_GSO_SCTP is included in NETIF_F_GSO_SOFTWARE.

‎Makefile‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,15 @@ KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
826826
# disable invalid "can't wrap" optimizations for signed / pointers
827827
KBUILD_CFLAGS+=$(call cc-option,-fno-strict-overflow)
828828

829+
# clang sets -fmerge-all-constants by default as optimization, but this
830+
# is non-conforming behavior for C and in fact breaks the kernel, so we
831+
# need to disable it here generally.
832+
KBUILD_CFLAGS+=$(call cc-option,-fno-merge-all-constants)
833+
834+
# for gcc -fno-merge-all-constants disables everything, but it is fine
835+
# to have actual conforming behavior enabled.
836+
KBUILD_CFLAGS+=$(call cc-option,-fmerge-constants)
837+
829838
# Make sure -fstack-check isn't enabled (like gentoo apparently did)
830839
KBUILD_CFLAGS +=$(call cc-option,-fno-stack-check,)
831840

‎arch/x86/net/bpf_jit_comp.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
11881188
* may converge on the last pass. In such case do one more
11891189
* pass to emit the final image
11901190
*/
1191-
for (pass=0;pass<10||image;pass++) {
1191+
for (pass=0;pass<20||image;pass++) {
11921192
proglen=do_jit(prog,addrs,image,oldproglen,&ctx);
11931193
if (proglen <=0) {
11941194
image=NULL;
@@ -1215,6 +1215,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
12151215
}
12161216
}
12171217
oldproglen=proglen;
1218+
cond_resched();
12181219
}
12191220

12201221
if (bpf_jit_enable>1)

‎drivers/bluetooth/btusb.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ static const struct usb_device_id blacklist_table[] = {
231231
{USB_DEVICE(0x0930,0x0227), .driver_info=BTUSB_ATH3012 },
232232
{USB_DEVICE(0x0b05,0x17d0), .driver_info=BTUSB_ATH3012 },
233233
{USB_DEVICE(0x0cf3,0x0036), .driver_info=BTUSB_ATH3012 },
234-
{USB_DEVICE(0x0cf3,0x3004), .driver_info=BTUSB_ATH3012 },
235234
{USB_DEVICE(0x0cf3,0x3008), .driver_info=BTUSB_ATH3012 },
236235
{USB_DEVICE(0x0cf3,0x311d), .driver_info=BTUSB_ATH3012 },
237236
{USB_DEVICE(0x0cf3,0x311e), .driver_info=BTUSB_ATH3012 },
@@ -264,6 +263,7 @@ static const struct usb_device_id blacklist_table[] = {
264263
{USB_DEVICE(0x0489,0xe03c), .driver_info=BTUSB_ATH3012 },
265264

266265
/* QCA ROME chipset */
266+
{USB_DEVICE(0x0cf3,0x3004), .driver_info=BTUSB_QCA_ROME },
267267
{USB_DEVICE(0x0cf3,0xe007), .driver_info=BTUSB_QCA_ROME },
268268
{USB_DEVICE(0x0cf3,0xe009), .driver_info=BTUSB_QCA_ROME },
269269
{USB_DEVICE(0x0cf3,0xe010), .driver_info=BTUSB_QCA_ROME },
@@ -386,10 +386,10 @@ static const struct usb_device_id blacklist_table[] = {
386386
*/
387387
staticconststructdmi_system_idbtusb_needs_reset_resume_table[]= {
388388
{
389-
/*Lenovo Yoga 920 (QCARome device 0cf3:e300) */
389+
/*Dell OptiPlex 3060 (QCAROME device 0cf3:e007) */
390390
.matches= {
391-
DMI_MATCH(DMI_SYS_VENDOR,"LENOVO"),
392-
DMI_MATCH(DMI_PRODUCT_VERSION,"Lenovo YOGA 920"),
391+
DMI_MATCH(DMI_SYS_VENDOR,"Dell Inc."),
392+
DMI_MATCH(DMI_PRODUCT_NAME,"OptiPlex 3060"),
393393
},
394394
},
395395
{}

‎drivers/bluetooth/hci_bcm.c‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ static irqreturn_t bcm_host_wake(int irq, void *data)
244244

245245
bt_dev_dbg(bdev,"Host wake IRQ");
246246

247-
pm_request_resume(bdev->dev);
247+
pm_runtime_get(bdev->dev);
248+
pm_runtime_mark_last_busy(bdev->dev);
249+
pm_runtime_put_autosuspend(bdev->dev);
248250

249251
returnIRQ_HANDLED;
250252
}
@@ -301,7 +303,7 @@ static const struct bcm_set_sleep_mode default_sleep_params = {
301303
.usb_auto_sleep=0,
302304
.usb_resume_timeout=0,
303305
.break_to_host=0,
304-
.pulsed_host_wake=0,
306+
.pulsed_host_wake=1,
305307
};
306308

307309
staticintbcm_setup_sleep(structhci_uart*hu)
@@ -586,8 +588,11 @@ static int bcm_recv(struct hci_uart *hu, const void *data, int count)
586588
}elseif (!bcm->rx_skb) {
587589
/* Delay auto-suspend when receiving completed packet */
588590
mutex_lock(&bcm_device_lock);
589-
if (bcm->dev&&bcm_device_exists(bcm->dev))
590-
pm_request_resume(bcm->dev->dev);
591+
if (bcm->dev&&bcm_device_exists(bcm->dev)) {
592+
pm_runtime_get(bcm->dev->dev);
593+
pm_runtime_mark_last_busy(bcm->dev->dev);
594+
pm_runtime_put_autosuspend(bcm->dev->dev);
595+
}
591596
mutex_unlock(&bcm_device_lock);
592597
}
593598

‎drivers/net/can/cc770/cc770.c‎

Lines changed: 61 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -390,37 +390,23 @@ static int cc770_get_berr_counter(const struct net_device *dev,
390390
return0;
391391
}
392392

393-
staticnetdev_tx_tcc770_start_xmit(structsk_buff*skb,structnet_device*dev)
393+
staticvoidcc770_tx(structnet_device*dev,intmo)
394394
{
395395
structcc770_priv*priv=netdev_priv(dev);
396-
structnet_device_stats*stats=&dev->stats;
397-
structcan_frame*cf= (structcan_frame*)skb->data;
398-
unsignedintmo=obj2msgobj(CC770_OBJ_TX);
396+
structcan_frame*cf= (structcan_frame*)priv->tx_skb->data;
399397
u8dlc,rtr;
400398
u32id;
401399
inti;
402400

403-
if (can_dropped_invalid_skb(dev,skb))
404-
returnNETDEV_TX_OK;
405-
406-
if ((cc770_read_reg(priv,
407-
msgobj[mo].ctrl1)&TXRQST_UNC)==TXRQST_SET) {
408-
netdev_err(dev,"TX register is still occupied!\n");
409-
returnNETDEV_TX_BUSY;
410-
}
411-
412-
netif_stop_queue(dev);
413-
414401
dlc=cf->can_dlc;
415402
id=cf->can_id;
416-
if (cf->can_id&CAN_RTR_FLAG)
417-
rtr=0;
418-
else
419-
rtr=MSGCFG_DIR;
403+
rtr=cf->can_id&CAN_RTR_FLAG ?0 :MSGCFG_DIR;
404+
405+
cc770_write_reg(priv,msgobj[mo].ctrl0,
406+
MSGVAL_RES |TXIE_RES |RXIE_RES |INTPND_RES);
420407
cc770_write_reg(priv,msgobj[mo].ctrl1,
421408
RMTPND_RES |TXRQST_RES |CPUUPD_SET |NEWDAT_RES);
422-
cc770_write_reg(priv,msgobj[mo].ctrl0,
423-
MSGVAL_SET |TXIE_SET |RXIE_RES |INTPND_RES);
409+
424410
if (id&CAN_EFF_FLAG) {
425411
id &=CAN_EFF_MASK;
426412
cc770_write_reg(priv,msgobj[mo].config,
@@ -439,22 +425,30 @@ static netdev_tx_t cc770_start_xmit(struct sk_buff *skb, struct net_device *dev)
439425
for (i=0;i<dlc;i++)
440426
cc770_write_reg(priv,msgobj[mo].data[i],cf->data[i]);
441427

442-
/* Store echo skb before starting the transfer */
443-
can_put_echo_skb(skb,dev,0);
444-
445428
cc770_write_reg(priv,msgobj[mo].ctrl1,
446-
RMTPND_RES |TXRQST_SET |CPUUPD_RES |NEWDAT_UNC);
429+
RMTPND_UNC |TXRQST_SET |CPUUPD_RES |NEWDAT_UNC);
430+
cc770_write_reg(priv,msgobj[mo].ctrl0,
431+
MSGVAL_SET |TXIE_SET |RXIE_SET |INTPND_UNC);
432+
}
447433

448-
stats->tx_bytes+=dlc;
434+
staticnetdev_tx_tcc770_start_xmit(structsk_buff*skb,structnet_device*dev)
435+
{
436+
structcc770_priv*priv=netdev_priv(dev);
437+
unsignedintmo=obj2msgobj(CC770_OBJ_TX);
449438

439+
if (can_dropped_invalid_skb(dev,skb))
440+
returnNETDEV_TX_OK;
450441

451-
/*
452-
* HM: We had some cases of repeated IRQs so make sure the
453-
* INT is acknowledged I know it's already further up, but
454-
* doing again fixed the issue
455-
*/
456-
cc770_write_reg(priv,msgobj[mo].ctrl0,
457-
MSGVAL_UNC |TXIE_UNC |RXIE_UNC |INTPND_RES);
442+
netif_stop_queue(dev);
443+
444+
if ((cc770_read_reg(priv,
445+
msgobj[mo].ctrl1)&TXRQST_UNC)==TXRQST_SET) {
446+
netdev_err(dev,"TX register is still occupied!\n");
447+
returnNETDEV_TX_BUSY;
448+
}
449+
450+
priv->tx_skb=skb;
451+
cc770_tx(dev,mo);
458452

459453
returnNETDEV_TX_OK;
460454
}
@@ -680,19 +674,46 @@ static void cc770_tx_interrupt(struct net_device *dev, unsigned int o)
680674
structcc770_priv*priv=netdev_priv(dev);
681675
structnet_device_stats*stats=&dev->stats;
682676
unsignedintmo=obj2msgobj(o);
677+
structcan_frame*cf;
678+
u8ctrl1;
679+
680+
ctrl1=cc770_read_reg(priv,msgobj[mo].ctrl1);
683681

684-
/* Nothing more to send, switch off interrupts */
685682
cc770_write_reg(priv,msgobj[mo].ctrl0,
686683
MSGVAL_RES |TXIE_RES |RXIE_RES |INTPND_RES);
687-
/*
688-
* We had some cases of repeated IRQ so make sure the
689-
* INT is acknowledged
684+
cc770_write_reg(priv,msgobj[mo].ctrl1,
685+
RMTPND_RES |TXRQST_RES |MSGLST_RES |NEWDAT_RES);
686+
687+
if (unlikely(!priv->tx_skb)) {
688+
netdev_err(dev,"missing tx skb in tx interrupt\n");
689+
return;
690+
}
691+
692+
if (unlikely(ctrl1&MSGLST_SET)) {
693+
stats->rx_over_errors++;
694+
stats->rx_errors++;
695+
}
696+
697+
/* When the CC770 is sending an RTR message and it receives a regular
698+
* message that matches the id of the RTR message, it will overwrite the
699+
* outgoing message in the TX register. When this happens we must
700+
* process the received message and try to transmit the outgoing skb
701+
* again.
690702
*/
691-
cc770_write_reg(priv,msgobj[mo].ctrl0,
692-
MSGVAL_UNC |TXIE_UNC |RXIE_UNC |INTPND_RES);
703+
if (unlikely(ctrl1&NEWDAT_SET)) {
704+
cc770_rx(dev,mo,ctrl1);
705+
cc770_tx(dev,mo);
706+
return;
707+
}
693708

709+
cf= (structcan_frame*)priv->tx_skb->data;
710+
stats->tx_bytes+=cf->can_dlc;
694711
stats->tx_packets++;
712+
713+
can_put_echo_skb(priv->tx_skb,dev,0);
695714
can_get_echo_skb(dev,0);
715+
priv->tx_skb=NULL;
716+
696717
netif_wake_queue(dev);
697718
}
698719

@@ -804,6 +825,7 @@ struct net_device *alloc_cc770dev(int sizeof_priv)
804825
priv->can.do_set_bittiming=cc770_set_bittiming;
805826
priv->can.do_set_mode=cc770_set_mode;
806827
priv->can.ctrlmode_supported=CAN_CTRLMODE_3_SAMPLES;
828+
priv->tx_skb=NULL;
807829

808830
memcpy(priv->obj_flags,cc770_obj_flags,sizeof(cc770_obj_flags));
809831

‎drivers/net/can/cc770/cc770.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ struct cc770_priv {
193193
u8cpu_interface;/* CPU interface register */
194194
u8clkout;/* Clock out register */
195195
u8bus_config;/* Bus conffiguration register */
196+
197+
structsk_buff*tx_skb;
196198
};
197199

198200
structnet_device*alloc_cc770dev(intsizeof_priv);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp