Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e06b8405 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from David Miller:

 1) Revert iwlwifi reclaimed packet tracking, it causes problems for a
    bunch of folks.  From Emmanuel Grumbach.

 2) Work limiting code in brcmsmac wifi driver can clear tx status
    without processing the event.  From Arend van Spriel.

 3) rtlwifi USB driver processes wrong SKB, fix from Larry Finger.

 4) l2tp tunnel delete can race with close, fix from Tom Parkin.

 5) pktgen_add_device() failures are not checked at all, fix from Cong
    Wang.

 6) Fix unintentional removal of carrier off from tun_detach(),
    otherwise we confuse userspace, from Michael S.  Tsirkin.

 7) Don't leak socket reference counts and ubufs in vhost-net driver,
    from Jason Wang.

 8) vmxnet3 driver gets it's initial carrier state wrong, fix from Neil
    Horman.

 9) Protect against USB networking devices which spam the host with 0
    length frames, from Bjørn Mork.

10) Prevent neighbour overflows in ipv6 for locally destined routes,
    from Marcelo Ricardo.  This is the best short-term fix for this, a
    longer term fix has been implemented in net-next.

11) L2TP uses ipv4 datagram routines in it's ipv6 code, whoops.  This
    mistake is largely because the ipv6 functions don't even have some
    kind of prefix in their names to suggest they are ipv6 specific.
    From Tom Parkin.

12) Check SYN packet drops properly in tcp_rcv_fastopen_synack(), from
    Yuchung Cheng.

13) Fix races and TX skb freeing bugs in via-rhine's NAPI support, from
    Francois Romieu and your's truly.

14) Fix infinite loops and divides by zero in TCP congestion window
    handling, from Eric Dumazet, Neal Cardwell, and Ilpo Järvinen.

15) AF_PACKET tx ring handling can leak kernel memory to userspace, fix
    from Phil Sutter.

16) Fix error handling in ipv6 GRE tunnel transmit, from Tommi Rantala.

17) Protect XEN netback driver against hostile frontend putting garbage
    into the rings, don't leak pages in TX GOP checking, and add proper
    resource releasing in error path of xen_netbk_get_requests().  From
    Ian Campbell.

18) SCTP authentication keys should be cleared out and released with
    kzfree(), from Daniel Borkmann.

19) L2TP is a bit too clever trying to maintain skb->truesize, and ends
    up corrupting socket memory accounting to the point where packet
    sending is halted indefinitely.  Just remove the adjustments
    entirely, they aren't really needed.  From Eric Dumazet.

20) ATM Iphase driver uses a data type with the same name as the S390
    headers, rename to fix the build.  From Heiko Carstens.

21) Fix a typo in copying the inner network header offset from one SKB
    to another, from Pravin B Shelar.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (56 commits)
  net: sctp: sctp_endpoint_free: zero out secret key data
  net: sctp: sctp_setsockopt_auth_key: use kzfree instead of kfree
  atm/iphase: rename fregt_t -> ffreg_t
  net: usb: fix regression from FLAG_NOARP code
  l2tp: dont play with skb->truesize
  net: sctp: sctp_auth_key_put: use kzfree instead of kfree
  netback: correct netbk_tx_err to handle wrap around.
  xen/netback: free already allocated memory on failure in xen_netbk_get_requests
  xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop.
  xen/netback: shutdown the ring if it contains garbage.
  net: qmi_wwan: add more Huawei devices, including E320
  net: cdc_ncm: add another Huawei vendor specific device
  ipv6/ip6_gre: fix error case handling in ip6gre_tunnel_xmit()
  tcp: fix for zero packets_in_flight was too broad
  brcmsmac: rework of mac80211 .flush() callback operation
  ssb: unregister gpios before unloading ssb
  bcma: unregister gpios before unloading bcma
  rtlwifi: Fix scheduling while atomic bug
  net: usbnet: fix tx_dropped statistics
  tcp: ipv6: Update MIB counters for drops
  ...
parents 2a1a6e7a a1c83b05
Loading
Loading
Loading
Loading
+73 −73
Original line number Original line Diff line number Diff line
@@ -636,81 +636,81 @@ struct rx_buf_desc {
#define SEG_BASE IPHASE5575_FRAG_CONTROL_REG_BASE  
#define SEG_BASE IPHASE5575_FRAG_CONTROL_REG_BASE  
#define REASS_BASE IPHASE5575_REASS_CONTROL_REG_BASE  
#define REASS_BASE IPHASE5575_REASS_CONTROL_REG_BASE  


typedef volatile u_int  freg_t;
typedef volatile u_int	ffreg_t;
typedef u_int   rreg_t;
typedef u_int   rreg_t;


typedef struct _ffredn_t {
typedef struct _ffredn_t {
        freg_t  idlehead_high;  /* Idle cell header (high)              */
	ffreg_t	idlehead_high;	/* Idle cell header (high)		*/
        freg_t  idlehead_low;   /* Idle cell header (low)               */
	ffreg_t	idlehead_low;	/* Idle cell header (low)		*/
        freg_t  maxrate;        /* Maximum rate                         */
	ffreg_t	maxrate;	/* Maximum rate				*/
        freg_t  stparms;        /* Traffic Management Parameters        */
	ffreg_t	stparms;	/* Traffic Management Parameters	*/
        freg_t  abrubr_abr;     /* ABRUBR Priority Byte 1, TCR Byte 0   */
	ffreg_t	abrubr_abr;	/* ABRUBR Priority Byte 1, TCR Byte 0	*/
        freg_t  rm_type;        /*                                      */
	ffreg_t	rm_type;	/*					*/
	u_int	filler5[0x17 - 0x06];
	u_int	filler5[0x17 - 0x06];
        freg_t  cmd_reg;        /* Command register                     */
	ffreg_t	cmd_reg;	/* Command register			*/
	u_int	filler18[0x20 - 0x18];
	u_int	filler18[0x20 - 0x18];
        freg_t  cbr_base;       /* CBR Pointer Base                     */
	ffreg_t	cbr_base;	/* CBR Pointer Base			*/
        freg_t  vbr_base;       /* VBR Pointer Base                     */
	ffreg_t	vbr_base;	/* VBR Pointer Base			*/
        freg_t  abr_base;       /* ABR Pointer Base                     */
	ffreg_t	abr_base;	/* ABR Pointer Base			*/
        freg_t  ubr_base;       /* UBR Pointer Base                     */
	ffreg_t	ubr_base;	/* UBR Pointer Base			*/
	u_int	filler24;
	u_int	filler24;
        freg_t  vbrwq_base;     /* VBR Wait Queue Base                  */
	ffreg_t	vbrwq_base;	/* VBR Wait Queue Base			*/
        freg_t  abrwq_base;     /* ABR Wait Queue Base                  */
	ffreg_t	abrwq_base;	/* ABR Wait Queue Base			*/
        freg_t  ubrwq_base;     /* UBR Wait Queue Base                  */
	ffreg_t	ubrwq_base;	/* UBR Wait Queue Base			*/
        freg_t  vct_base;       /* Main VC Table Base                   */
	ffreg_t	vct_base;	/* Main VC Table Base			*/
        freg_t  vcte_base;      /* Extended Main VC Table Base          */
	ffreg_t	vcte_base;	/* Extended Main VC Table Base		*/
	u_int	filler2a[0x2C - 0x2A];
	u_int	filler2a[0x2C - 0x2A];
        freg_t  cbr_tab_beg;    /* CBR Table Begin                      */
	ffreg_t	cbr_tab_beg;	/* CBR Table Begin			*/
        freg_t  cbr_tab_end;    /* CBR Table End                        */
	ffreg_t	cbr_tab_end;	/* CBR Table End			*/
        freg_t  cbr_pointer;    /* CBR Pointer                          */
	ffreg_t	cbr_pointer;	/* CBR Pointer				*/
	u_int	filler2f[0x30 - 0x2F];
	u_int	filler2f[0x30 - 0x2F];
        freg_t  prq_st_adr;     /* Packet Ready Queue Start Address     */
	ffreg_t	prq_st_adr;	/* Packet Ready Queue Start Address	*/
        freg_t  prq_ed_adr;     /* Packet Ready Queue End Address       */
	ffreg_t	prq_ed_adr;	/* Packet Ready Queue End Address	*/
        freg_t  prq_rd_ptr;     /* Packet Ready Queue read pointer      */
	ffreg_t	prq_rd_ptr;	/* Packet Ready Queue read pointer	*/
        freg_t  prq_wr_ptr;     /* Packet Ready Queue write pointer     */
	ffreg_t	prq_wr_ptr;	/* Packet Ready Queue write pointer	*/
        freg_t  tcq_st_adr;     /* Transmit Complete Queue Start Address*/
	ffreg_t	tcq_st_adr;	/* Transmit Complete Queue Start Address*/
        freg_t  tcq_ed_adr;     /* Transmit Complete Queue End Address  */
	ffreg_t	tcq_ed_adr;	/* Transmit Complete Queue End Address	*/
        freg_t  tcq_rd_ptr;     /* Transmit Complete Queue read pointer */
	ffreg_t	tcq_rd_ptr;	/* Transmit Complete Queue read pointer */
        freg_t  tcq_wr_ptr;     /* Transmit Complete Queue write pointer*/
	ffreg_t	tcq_wr_ptr;	/* Transmit Complete Queue write pointer*/
	u_int	filler38[0x40 - 0x38];
	u_int	filler38[0x40 - 0x38];
        freg_t  queue_base;     /* Base address for PRQ and TCQ         */
	ffreg_t	queue_base;	/* Base address for PRQ and TCQ		*/
        freg_t  desc_base;      /* Base address of descriptor table     */
	ffreg_t	desc_base;	/* Base address of descriptor table	*/
	u_int	filler42[0x45 - 0x42];
	u_int	filler42[0x45 - 0x42];
        freg_t  mode_reg_0;     /* Mode register 0                      */
	ffreg_t	mode_reg_0;	/* Mode register 0			*/
        freg_t  mode_reg_1;     /* Mode register 1                      */
	ffreg_t	mode_reg_1;	/* Mode register 1			*/
        freg_t  intr_status_reg;/* Interrupt Status register            */
	ffreg_t	intr_status_reg;/* Interrupt Status register		*/
        freg_t  mask_reg;       /* Mask Register                        */
	ffreg_t	mask_reg;	/* Mask Register			*/
        freg_t  cell_ctr_high1; /* Total cell transfer count (high)     */
	ffreg_t	cell_ctr_high1; /* Total cell transfer count (high)	*/
        freg_t  cell_ctr_lo1;   /* Total cell transfer count (low)      */
	ffreg_t	cell_ctr_lo1;	/* Total cell transfer count (low)	*/
        freg_t  state_reg;      /* Status register                      */
	ffreg_t	state_reg;	/* Status register			*/
	u_int	filler4c[0x58 - 0x4c];
	u_int	filler4c[0x58 - 0x4c];
        freg_t  curr_desc_num;  /* Contains the current descriptor num  */
	ffreg_t	curr_desc_num;	/* Contains the current descriptor num	*/
        freg_t  next_desc;      /* Next descriptor                      */
	ffreg_t	next_desc;	/* Next descriptor			*/
        freg_t  next_vc;        /* Next VC                              */
	ffreg_t	next_vc;	/* Next VC				*/
	u_int	filler5b[0x5d - 0x5b];
	u_int	filler5b[0x5d - 0x5b];
        freg_t  present_slot_cnt;/* Present slot count                  */
	ffreg_t	present_slot_cnt;/* Present slot count			*/
	u_int	filler5e[0x6a - 0x5e];
	u_int	filler5e[0x6a - 0x5e];
        freg_t  new_desc_num;   /* New descriptor number                */
	ffreg_t	new_desc_num;	/* New descriptor number		*/
        freg_t  new_vc;         /* New VC                               */
	ffreg_t	new_vc;		/* New VC				*/
        freg_t  sched_tbl_ptr;  /* Schedule table pointer               */
	ffreg_t	sched_tbl_ptr;	/* Schedule table pointer		*/
        freg_t  vbrwq_wptr;     /* VBR wait queue write pointer         */
	ffreg_t	vbrwq_wptr;	/* VBR wait queue write pointer		*/
        freg_t  vbrwq_rptr;     /* VBR wait queue read pointer          */
	ffreg_t	vbrwq_rptr;	/* VBR wait queue read pointer		*/
        freg_t  abrwq_wptr;     /* ABR wait queue write pointer         */
	ffreg_t	abrwq_wptr;	/* ABR wait queue write pointer		*/
        freg_t  abrwq_rptr;     /* ABR wait queue read pointer          */
	ffreg_t	abrwq_rptr;	/* ABR wait queue read pointer		*/
        freg_t  ubrwq_wptr;     /* UBR wait queue write pointer         */
	ffreg_t	ubrwq_wptr;	/* UBR wait queue write pointer		*/
        freg_t  ubrwq_rptr;     /* UBR wait queue read pointer          */
	ffreg_t	ubrwq_rptr;	/* UBR wait queue read pointer		*/
        freg_t  cbr_vc;         /* CBR VC                               */
	ffreg_t	cbr_vc;		/* CBR VC				*/
        freg_t  vbr_sb_vc;      /* VBR SB VC                            */
	ffreg_t	vbr_sb_vc;	/* VBR SB VC				*/
        freg_t  abr_sb_vc;      /* ABR SB VC                            */
	ffreg_t	abr_sb_vc;	/* ABR SB VC				*/
        freg_t  ubr_sb_vc;      /* UBR SB VC                            */
	ffreg_t	ubr_sb_vc;	/* UBR SB VC				*/
        freg_t  vbr_next_link;  /* VBR next link                        */
	ffreg_t	vbr_next_link;	/* VBR next link			*/
        freg_t  abr_next_link;  /* ABR next link                        */
	ffreg_t	abr_next_link;	/* ABR next link			*/
        freg_t  ubr_next_link;  /* UBR next link                        */
	ffreg_t	ubr_next_link;	/* UBR next link			*/
	u_int	filler7a[0x7c-0x7a];
	u_int	filler7a[0x7c-0x7a];
        freg_t  out_rate_head;  /* Out of rate head                     */
	ffreg_t	out_rate_head;	/* Out of rate head			*/
	u_int	filler7d[0xca-0x7d]; /* pad out to full address space	*/
	u_int	filler7d[0xca-0x7d]; /* pad out to full address space	*/
        freg_t  cell_ctr_high1_nc;/* Total cell transfer count (high)   */
	ffreg_t	cell_ctr_high1_nc;/* Total cell transfer count (high)	*/
        freg_t  cell_ctr_lo1_nc;/* Total cell transfer count (low)      */
	ffreg_t	cell_ctr_lo1_nc;/* Total cell transfer count (low)	*/
	u_int	fillercc[0x100-0xcc]; /* pad out to full address space	 */
	u_int	fillercc[0x100-0xcc]; /* pad out to full address space	 */
} ffredn_t;
} ffredn_t;


+5 −0
Original line number Original line Diff line number Diff line
@@ -94,11 +94,16 @@ void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc);
#ifdef CONFIG_BCMA_DRIVER_GPIO
#ifdef CONFIG_BCMA_DRIVER_GPIO
/* driver_gpio.c */
/* driver_gpio.c */
int bcma_gpio_init(struct bcma_drv_cc *cc);
int bcma_gpio_init(struct bcma_drv_cc *cc);
int bcma_gpio_unregister(struct bcma_drv_cc *cc);
#else
#else
static inline int bcma_gpio_init(struct bcma_drv_cc *cc)
static inline int bcma_gpio_init(struct bcma_drv_cc *cc)
{
{
	return -ENOTSUPP;
	return -ENOTSUPP;
}
}
static inline int bcma_gpio_unregister(struct bcma_drv_cc *cc)
{
	return 0;
}
#endif /* CONFIG_BCMA_DRIVER_GPIO */
#endif /* CONFIG_BCMA_DRIVER_GPIO */


#endif
#endif
+1 −1
Original line number Original line Diff line number Diff line
@@ -21,7 +21,7 @@ int bcma_nflash_init(struct bcma_drv_cc *cc)
	struct bcma_bus *bus = cc->core->bus;
	struct bcma_bus *bus = cc->core->bus;


	if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4706 &&
	if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4706 &&
	    cc->core->id.rev != 0x38) {
	    cc->core->id.rev != 38) {
		bcma_err(bus, "NAND flash on unsupported board!\n");
		bcma_err(bus, "NAND flash on unsupported board!\n");
		return -ENOTSUPP;
		return -ENOTSUPP;
	}
	}
+5 −0
Original line number Original line Diff line number Diff line
@@ -96,3 +96,8 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)


	return gpiochip_add(chip);
	return gpiochip_add(chip);
}
}

int bcma_gpio_unregister(struct bcma_drv_cc *cc)
{
	return gpiochip_remove(&cc->gpio);
}
+7 −0
Original line number Original line Diff line number Diff line
@@ -268,6 +268,13 @@ int bcma_bus_register(struct bcma_bus *bus)
void bcma_bus_unregister(struct bcma_bus *bus)
void bcma_bus_unregister(struct bcma_bus *bus)
{
{
	struct bcma_device *cores[3];
	struct bcma_device *cores[3];
	int err;

	err = bcma_gpio_unregister(&bus->drv_cc);
	if (err == -EBUSY)
		bcma_err(bus, "Some GPIOs are still in use.\n");
	else if (err)
		bcma_err(bus, "Can not unregister GPIO driver: %i\n", err);


	cores[0] = bcma_find_core(bus, BCMA_CORE_MIPS_74K);
	cores[0] = bcma_find_core(bus, BCMA_CORE_MIPS_74K);
	cores[1] = bcma_find_core(bus, BCMA_CORE_PCIE);
	cores[1] = bcma_find_core(bus, BCMA_CORE_PCIE);
Loading