You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) Transfer padding was wrong for full-speed USB in ASIX driver, fix
from Ingo van Lil.
2) Propagate the negative packet offset fix into the PowerPC BPF JIT.
From Jan Seiffert.
3) dl2k driver's private ioctls were letting unprivileged tasks make
MII writes and other ugly bits like that. Fix from Jeff Mahoney.
4) Fix TX VLAN and RX packet drops in ucc_geth, from Joakim Tjernlund.
5) OOPS and network namespace fixes in IPVS from Hans Schillstrom and
Julian Anastasov.
6) Fix races and sleeping in locked context bugs in drop_monitor, from
Neil Horman.
7) Fix link status indication in smsc95xx driver, from Paolo Pisati.
8) Fix bridge netfilter OOPS, from Peter Huang.
9) L2TP sendmsg can return on error conditions with the socket lock
held, oops. Fix from Sasha Levin.
10) udp_diag should return meaningful values for socket memory usage,
from Shan Wei.
11) Eric Dumazet is so awesome he gets his own section:
Socket memory cgroup code (I never should have applied those
patches, grumble...) made erroneous changes to
sk_sockets_allocated_read_positive(). It was changed to
use percpu_counter_sum_positive (which requires BH disabling)
instead of percpu_counter_read_positive (which does not).
Revert back to avoid crashes and lockdep warnings.
Adjust the default tcp_adv_win_scale and tcp_rmem[2] values
to fix throughput regressions. This is necessary as a result
of our more precise skb->truesize tracking.
Fix SKB leak in netem packet scheduler.
12) New device IDs for various bluetooth devices, from Manoj Iyer,
AceLan Kao, and Steven Harms.
13) Fix command completion race in ipw2200, from Stanislav Yakovlev.
14) Fix rtlwifi oops on unload, from Larry Finger.
15) Fix hard_mtu when adjusting hard_header_len in smsc95xx driver.
From Stephane Fillod.
16) ehea driver registers it's IRQ before all the necessary state is
setup, resulting in crashes. Fix from Thadeu Lima de Souza
Cascardo.
17) Fix PHY connection failures in davinci_emac driver, from Anatolij
Gustschin.
18) Missing break; in switch statement in bluetooth's
hci_cmd_complete_evt(). Fix from Szymon Janc.
19) Fix queue programming in iwlwifi, from Johannes Berg.
20) Interrupt throttling defaults not being actually programmed into the
hardware, fix from Jeff Kirsher and Ying Cai.
21) TLAN driver SKB encoding in descriptor busted on 64-bit, fix from
Benjamin Poirier.
22) Fix blind status block RX producer pointer deref in TG3 driver, from
Matt Carlson.
23) Promisc and multicast are busted on ehea, fixes from Thadeu Lima de
Souza Cascardo.
24) Fix crashes in 6lowpan, from Alexander Smirnov.
25) tcp_complete_cwr() needs to be careful to not rewind the CWND to
ssthresh if ssthresh has the "infinite" value. Fix from Yuchung
Cheng.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (81 commits)
sungem: Fix WakeOnLan
tcp: change tcp_adv_win_scale and tcp_rmem[2]
net: l2tp: unlock socket lock before returning from l2tp_ip_sendmsg
drop_monitor: prevent init path from scheduling on the wrong cpu
usbnet: fix failure handling in usbnet_probe
usbnet: fix leak of transfer buffer of dev->interrupt
ucc_geth: Add 16 bytes to max TX frame for VLANs
net: ucc_geth, increase no. of HW RX descriptors
netem: fix possible skb leak
sky2: fix receive length error in mixed non-VLAN/VLAN traffic
sky2: propogate rx hash when packet is copied
net: fix two typos in skbuff.h
cxgb3: Don't call cxgb_vlan_mode until q locks are initialized
ixgbe: fix calling skb_put on nonlinear skb assertion bug
ixgbe: Fix a memory leak in IEEE DCB
igbvf: fix the bug when initializing the igbvf
smsc75xx: enable mac to detect speed/duplex from phy
smsc75xx: declare smsc75xx's MII as GMII capable
smsc75xx: fix phy interrupt acknowledge
smsc75xx: fix phy init reset loop
...
This commit is contained in:
@@ -147,7 +147,7 @@ tcp_adv_win_scale - INTEGER
|
||||
(if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale),
|
||||
if it is <= 0.
|
||||
Possible values are [-31, 31], inclusive.
|
||||
Default: 2
|
||||
Default: 1
|
||||
|
||||
tcp_allowed_congestion_control - STRING
|
||||
Show/set the congestion control choices available to non-privileged
|
||||
@@ -410,7 +410,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max
|
||||
net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables
|
||||
automatic tuning of that socket's receive buffer size, in which
|
||||
case this value is ignored.
|
||||
Default: between 87380B and 4MB, depending on RAM size.
|
||||
Default: between 87380B and 6MB, depending on RAM size.
|
||||
|
||||
tcp_sack - BOOLEAN
|
||||
Enable select acknowledgments (SACKS).
|
||||
|
||||
+2
-2
@@ -5892,11 +5892,11 @@ F: Documentation/scsi/st.txt
|
||||
F: drivers/scsi/st*
|
||||
|
||||
SCTP PROTOCOL
|
||||
M: Vlad Yasevich <vladislav.yasevich@hp.com>
|
||||
M: Vlad Yasevich <vyasevich@gmail.com>
|
||||
M: Sridhar Samudrala <sri@us.ibm.com>
|
||||
L: linux-sctp@vger.kernel.org
|
||||
W: http://lksctp.sourceforge.net
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/networking/sctp.txt
|
||||
F: include/linux/sctp.h
|
||||
F: include/net/sctp/
|
||||
|
||||
@@ -48,7 +48,13 @@
|
||||
/*
|
||||
* Assembly helpers from arch/powerpc/net/bpf_jit.S:
|
||||
*/
|
||||
extern u8 sk_load_word[], sk_load_half[], sk_load_byte[], sk_load_byte_msh[];
|
||||
#define DECLARE_LOAD_FUNC(func) \
|
||||
extern u8 func[], func##_negative_offset[], func##_positive_offset[]
|
||||
|
||||
DECLARE_LOAD_FUNC(sk_load_word);
|
||||
DECLARE_LOAD_FUNC(sk_load_half);
|
||||
DECLARE_LOAD_FUNC(sk_load_byte);
|
||||
DECLARE_LOAD_FUNC(sk_load_byte_msh);
|
||||
|
||||
#define FUNCTION_DESCR_SIZE 24
|
||||
|
||||
|
||||
@@ -31,14 +31,13 @@
|
||||
* then branch directly to slow_path_XXX if required. (In fact, could
|
||||
* load a spare GPR with the address of slow_path_generic and pass size
|
||||
* as an argument, making the call site a mtlr, li and bllr.)
|
||||
*
|
||||
* Technically, the "is addr < 0" check is unnecessary & slowing down
|
||||
* the ABS path, as it's statically checked on generation.
|
||||
*/
|
||||
.globl sk_load_word
|
||||
sk_load_word:
|
||||
cmpdi r_addr, 0
|
||||
blt bpf_error
|
||||
blt bpf_slow_path_word_neg
|
||||
.globl sk_load_word_positive_offset
|
||||
sk_load_word_positive_offset:
|
||||
/* Are we accessing past headlen? */
|
||||
subi r_scratch1, r_HL, 4
|
||||
cmpd r_scratch1, r_addr
|
||||
@@ -51,7 +50,9 @@ sk_load_word:
|
||||
.globl sk_load_half
|
||||
sk_load_half:
|
||||
cmpdi r_addr, 0
|
||||
blt bpf_error
|
||||
blt bpf_slow_path_half_neg
|
||||
.globl sk_load_half_positive_offset
|
||||
sk_load_half_positive_offset:
|
||||
subi r_scratch1, r_HL, 2
|
||||
cmpd r_scratch1, r_addr
|
||||
blt bpf_slow_path_half
|
||||
@@ -61,7 +62,9 @@ sk_load_half:
|
||||
.globl sk_load_byte
|
||||
sk_load_byte:
|
||||
cmpdi r_addr, 0
|
||||
blt bpf_error
|
||||
blt bpf_slow_path_byte_neg
|
||||
.globl sk_load_byte_positive_offset
|
||||
sk_load_byte_positive_offset:
|
||||
cmpd r_HL, r_addr
|
||||
ble bpf_slow_path_byte
|
||||
lbzx r_A, r_D, r_addr
|
||||
@@ -69,22 +72,20 @@ sk_load_byte:
|
||||
|
||||
/*
|
||||
* BPF_S_LDX_B_MSH: ldxb 4*([offset]&0xf)
|
||||
* r_addr is the offset value, already known positive
|
||||
* r_addr is the offset value
|
||||
*/
|
||||
.globl sk_load_byte_msh
|
||||
sk_load_byte_msh:
|
||||
cmpdi r_addr, 0
|
||||
blt bpf_slow_path_byte_msh_neg
|
||||
.globl sk_load_byte_msh_positive_offset
|
||||
sk_load_byte_msh_positive_offset:
|
||||
cmpd r_HL, r_addr
|
||||
ble bpf_slow_path_byte_msh
|
||||
lbzx r_X, r_D, r_addr
|
||||
rlwinm r_X, r_X, 2, 32-4-2, 31-2
|
||||
blr
|
||||
|
||||
bpf_error:
|
||||
/* Entered with cr0 = lt */
|
||||
li r3, 0
|
||||
/* Generated code will 'blt epilogue', returning 0. */
|
||||
blr
|
||||
|
||||
/* Call out to skb_copy_bits:
|
||||
* We'll need to back up our volatile regs first; we have
|
||||
* local variable space at r1+(BPF_PPC_STACK_BASIC).
|
||||
@@ -136,3 +137,84 @@ bpf_slow_path_byte_msh:
|
||||
lbz r_X, BPF_PPC_STACK_BASIC+(2*8)(r1)
|
||||
rlwinm r_X, r_X, 2, 32-4-2, 31-2
|
||||
blr
|
||||
|
||||
/* Call out to bpf_internal_load_pointer_neg_helper:
|
||||
* We'll need to back up our volatile regs first; we have
|
||||
* local variable space at r1+(BPF_PPC_STACK_BASIC).
|
||||
* Allocate a new stack frame here to remain ABI-compliant in
|
||||
* stashing LR.
|
||||
*/
|
||||
#define sk_negative_common(SIZE) \
|
||||
mflr r0; \
|
||||
std r0, 16(r1); \
|
||||
/* R3 goes in parameter space of caller's frame */ \
|
||||
std r_skb, (BPF_PPC_STACKFRAME+48)(r1); \
|
||||
std r_A, (BPF_PPC_STACK_BASIC+(0*8))(r1); \
|
||||
std r_X, (BPF_PPC_STACK_BASIC+(1*8))(r1); \
|
||||
stdu r1, -BPF_PPC_SLOWPATH_FRAME(r1); \
|
||||
/* R3 = r_skb, as passed */ \
|
||||
mr r4, r_addr; \
|
||||
li r5, SIZE; \
|
||||
bl bpf_internal_load_pointer_neg_helper; \
|
||||
/* R3 != 0 on success */ \
|
||||
addi r1, r1, BPF_PPC_SLOWPATH_FRAME; \
|
||||
ld r0, 16(r1); \
|
||||
ld r_A, (BPF_PPC_STACK_BASIC+(0*8))(r1); \
|
||||
ld r_X, (BPF_PPC_STACK_BASIC+(1*8))(r1); \
|
||||
mtlr r0; \
|
||||
cmpldi r3, 0; \
|
||||
beq bpf_error_slow; /* cr0 = EQ */ \
|
||||
mr r_addr, r3; \
|
||||
ld r_skb, (BPF_PPC_STACKFRAME+48)(r1); \
|
||||
/* Great success! */
|
||||
|
||||
bpf_slow_path_word_neg:
|
||||
lis r_scratch1,-32 /* SKF_LL_OFF */
|
||||
cmpd r_addr, r_scratch1 /* addr < SKF_* */
|
||||
blt bpf_error /* cr0 = LT */
|
||||
.globl sk_load_word_negative_offset
|
||||
sk_load_word_negative_offset:
|
||||
sk_negative_common(4)
|
||||
lwz r_A, 0(r_addr)
|
||||
blr
|
||||
|
||||
bpf_slow_path_half_neg:
|
||||
lis r_scratch1,-32 /* SKF_LL_OFF */
|
||||
cmpd r_addr, r_scratch1 /* addr < SKF_* */
|
||||
blt bpf_error /* cr0 = LT */
|
||||
.globl sk_load_half_negative_offset
|
||||
sk_load_half_negative_offset:
|
||||
sk_negative_common(2)
|
||||
lhz r_A, 0(r_addr)
|
||||
blr
|
||||
|
||||
bpf_slow_path_byte_neg:
|
||||
lis r_scratch1,-32 /* SKF_LL_OFF */
|
||||
cmpd r_addr, r_scratch1 /* addr < SKF_* */
|
||||
blt bpf_error /* cr0 = LT */
|
||||
.globl sk_load_byte_negative_offset
|
||||
sk_load_byte_negative_offset:
|
||||
sk_negative_common(1)
|
||||
lbz r_A, 0(r_addr)
|
||||
blr
|
||||
|
||||
bpf_slow_path_byte_msh_neg:
|
||||
lis r_scratch1,-32 /* SKF_LL_OFF */
|
||||
cmpd r_addr, r_scratch1 /* addr < SKF_* */
|
||||
blt bpf_error /* cr0 = LT */
|
||||
.globl sk_load_byte_msh_negative_offset
|
||||
sk_load_byte_msh_negative_offset:
|
||||
sk_negative_common(1)
|
||||
lbz r_X, 0(r_addr)
|
||||
rlwinm r_X, r_X, 2, 32-4-2, 31-2
|
||||
blr
|
||||
|
||||
bpf_error_slow:
|
||||
/* fabricate a cr0 = lt */
|
||||
li r_scratch1, -1
|
||||
cmpdi r_scratch1, 0
|
||||
bpf_error:
|
||||
/* Entered with cr0 = lt */
|
||||
li r3, 0
|
||||
/* Generated code will 'blt epilogue', returning 0. */
|
||||
blr
|
||||
|
||||
@@ -127,6 +127,9 @@ static void bpf_jit_build_epilogue(u32 *image, struct codegen_context *ctx)
|
||||
PPC_BLR();
|
||||
}
|
||||
|
||||
#define CHOOSE_LOAD_FUNC(K, func) \
|
||||
((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset)
|
||||
|
||||
/* Assemble the body code between the prologue & epilogue. */
|
||||
static int bpf_jit_build_body(struct sk_filter *fp, u32 *image,
|
||||
struct codegen_context *ctx,
|
||||
@@ -391,21 +394,16 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image,
|
||||
|
||||
/*** Absolute loads from packet header/data ***/
|
||||
case BPF_S_LD_W_ABS:
|
||||
func = sk_load_word;
|
||||
func = CHOOSE_LOAD_FUNC(K, sk_load_word);
|
||||
goto common_load;
|
||||
case BPF_S_LD_H_ABS:
|
||||
func = sk_load_half;
|
||||
func = CHOOSE_LOAD_FUNC(K, sk_load_half);
|
||||
goto common_load;
|
||||
case BPF_S_LD_B_ABS:
|
||||
func = sk_load_byte;
|
||||
func = CHOOSE_LOAD_FUNC(K, sk_load_byte);
|
||||
common_load:
|
||||
/*
|
||||
* Load from [K]. Reference with the (negative)
|
||||
* SKF_NET_OFF/SKF_LL_OFF offsets is unsupported.
|
||||
*/
|
||||
/* Load from [K]. */
|
||||
ctx->seen |= SEEN_DATAREF;
|
||||
if ((int)K < 0)
|
||||
return -ENOTSUPP;
|
||||
PPC_LI64(r_scratch1, func);
|
||||
PPC_MTLR(r_scratch1);
|
||||
PPC_LI32(r_addr, K);
|
||||
@@ -429,7 +427,7 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image,
|
||||
common_load_ind:
|
||||
/*
|
||||
* Load from [X + K]. Negative offsets are tested for
|
||||
* in the helper functions, and result in a 'ret 0'.
|
||||
* in the helper functions.
|
||||
*/
|
||||
ctx->seen |= SEEN_DATAREF | SEEN_XREG;
|
||||
PPC_LI64(r_scratch1, func);
|
||||
@@ -443,13 +441,7 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image,
|
||||
break;
|
||||
|
||||
case BPF_S_LDX_B_MSH:
|
||||
/*
|
||||
* x86 version drops packet (RET 0) when K<0, whereas
|
||||
* interpreter does allow K<0 (__load_pointer, special
|
||||
* ancillary data). common_load returns ENOTSUPP if K<0,
|
||||
* so we fall back to interpreter & filter works.
|
||||
*/
|
||||
func = sk_load_byte_msh;
|
||||
func = CHOOSE_LOAD_FUNC(K, sk_load_byte_msh);
|
||||
goto common_load;
|
||||
break;
|
||||
|
||||
|
||||
@@ -75,6 +75,8 @@ static struct usb_device_id ath3k_table[] = {
|
||||
{ USB_DEVICE(0x0CF3, 0x311D) },
|
||||
{ USB_DEVICE(0x13d3, 0x3375) },
|
||||
{ USB_DEVICE(0x04CA, 0x3005) },
|
||||
{ USB_DEVICE(0x13d3, 0x3362) },
|
||||
{ USB_DEVICE(0x0CF3, 0xE004) },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xE02C) },
|
||||
@@ -94,6 +96,8 @@ static struct usb_device_id ath3k_blist_tbl[] = {
|
||||
{ USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
|
||||
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
||||
@@ -101,12 +101,16 @@ static struct usb_device_id btusb_table[] = {
|
||||
{ USB_DEVICE(0x0c10, 0x0000) },
|
||||
|
||||
/* Broadcom BCM20702A0 */
|
||||
{ USB_DEVICE(0x0489, 0xe042) },
|
||||
{ USB_DEVICE(0x0a5c, 0x21e3) },
|
||||
{ USB_DEVICE(0x0a5c, 0x21e6) },
|
||||
{ USB_DEVICE(0x0a5c, 0x21e8) },
|
||||
{ USB_DEVICE(0x0a5c, 0x21f3) },
|
||||
{ USB_DEVICE(0x413c, 0x8197) },
|
||||
|
||||
/* Foxconn - Hon Hai */
|
||||
{ USB_DEVICE(0x0489, 0xe033) },
|
||||
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
||||
@@ -133,6 +137,8 @@ static struct usb_device_id blacklist_table[] = {
|
||||
{ USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
|
||||
|
||||
@@ -879,8 +879,13 @@ static inline unsigned int tg3_has_work(struct tg3_napi *tnapi)
|
||||
if (sblk->status & SD_STATUS_LINK_CHG)
|
||||
work_exists = 1;
|
||||
}
|
||||
/* check for RX/TX work to do */
|
||||
if (sblk->idx[0].tx_consumer != tnapi->tx_cons ||
|
||||
|
||||
/* check for TX work to do */
|
||||
if (sblk->idx[0].tx_consumer != tnapi->tx_cons)
|
||||
work_exists = 1;
|
||||
|
||||
/* check for RX work to do */
|
||||
if (tnapi->rx_rcb_prod_idx &&
|
||||
*(tnapi->rx_rcb_prod_idx) != tnapi->rx_rcb_ptr)
|
||||
work_exists = 1;
|
||||
|
||||
@@ -6124,6 +6129,9 @@ static int tg3_poll_work(struct tg3_napi *tnapi, int work_done, int budget)
|
||||
return work_done;
|
||||
}
|
||||
|
||||
if (!tnapi->rx_rcb_prod_idx)
|
||||
return work_done;
|
||||
|
||||
/* run RX thread, within the bounds set by NAPI.
|
||||
* All RX "locking" is done by ensuring outside
|
||||
* code synchronizes with tg3->napi.poll()
|
||||
@@ -7567,6 +7575,12 @@ static int tg3_alloc_consistent(struct tg3 *tp)
|
||||
*/
|
||||
switch (i) {
|
||||
default:
|
||||
if (tg3_flag(tp, ENABLE_RSS)) {
|
||||
tnapi->rx_rcb_prod_idx = NULL;
|
||||
break;
|
||||
}
|
||||
/* Fall through */
|
||||
case 1:
|
||||
tnapi->rx_rcb_prod_idx = &sblk->idx[0].rx_producer;
|
||||
break;
|
||||
case 2:
|
||||
|
||||
@@ -1149,6 +1149,48 @@ release_tpsram:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* t3_synchronize_rx - wait for current Rx processing on a port to complete
|
||||
* @adap: the adapter
|
||||
* @p: the port
|
||||
*
|
||||
* Ensures that current Rx processing on any of the queues associated with
|
||||
* the given port completes before returning. We do this by acquiring and
|
||||
* releasing the locks of the response queues associated with the port.
|
||||
*/
|
||||
static void t3_synchronize_rx(struct adapter *adap, const struct port_info *p)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = p->first_qset; i < p->first_qset + p->nqsets; i++) {
|
||||
struct sge_rspq *q = &adap->sge.qs[i].rspq;
|
||||
|
||||
spin_lock_irq(&q->lock);
|
||||
spin_unlock_irq(&q->lock);
|
||||
}
|
||||
}
|
||||
|
||||
static void cxgb_vlan_mode(struct net_device *dev, netdev_features_t features)
|
||||
{
|
||||
struct port_info *pi = netdev_priv(dev);
|
||||
struct adapter *adapter = pi->adapter;
|
||||
|
||||
if (adapter->params.rev > 0) {
|
||||
t3_set_vlan_accel(adapter, 1 << pi->port_id,
|
||||
features & NETIF_F_HW_VLAN_RX);
|
||||
} else {
|
||||
/* single control for all ports */
|
||||
unsigned int i, have_vlans = features & NETIF_F_HW_VLAN_RX;
|
||||
|
||||
for_each_port(adapter, i)
|
||||
have_vlans |=
|
||||
adapter->port[i]->features & NETIF_F_HW_VLAN_RX;
|
||||
|
||||
t3_set_vlan_accel(adapter, 1, have_vlans);
|
||||
}
|
||||
t3_synchronize_rx(adapter, pi);
|
||||
}
|
||||
|
||||
/**
|
||||
* cxgb_up - enable the adapter
|
||||
* @adapter: adapter being enabled
|
||||
@@ -1161,7 +1203,7 @@ release_tpsram:
|
||||
*/
|
||||
static int cxgb_up(struct adapter *adap)
|
||||
{
|
||||
int err;
|
||||
int i, err;
|
||||
|
||||
if (!(adap->flags & FULL_INIT_DONE)) {
|
||||
err = t3_check_fw_version(adap);
|
||||
@@ -1198,6 +1240,9 @@ static int cxgb_up(struct adapter *adap)
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
for_each_port(adap, i)
|
||||
cxgb_vlan_mode(adap->port[i], adap->port[i]->features);
|
||||
|
||||
setup_rss(adap);
|
||||
if (!(adap->flags & NAPI_INIT))
|
||||
init_napi(adap);
|
||||
@@ -2508,48 +2553,6 @@ static int cxgb_set_mac_addr(struct net_device *dev, void *p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* t3_synchronize_rx - wait for current Rx processing on a port to complete
|
||||
* @adap: the adapter
|
||||
* @p: the port
|
||||
*
|
||||
* Ensures that current Rx processing on any of the queues associated with
|
||||
* the given port completes before returning. We do this by acquiring and
|
||||
* releasing the locks of the response queues associated with the port.
|
||||
*/
|
||||
static void t3_synchronize_rx(struct adapter *adap, const struct port_info *p)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = p->first_qset; i < p->first_qset + p->nqsets; i++) {
|
||||
struct sge_rspq *q = &adap->sge.qs[i].rspq;
|
||||
|
||||
spin_lock_irq(&q->lock);
|
||||
spin_unlock_irq(&q->lock);
|
||||
}
|
||||
}
|
||||
|
||||
static void cxgb_vlan_mode(struct net_device *dev, netdev_features_t features)
|
||||
{
|
||||
struct port_info *pi = netdev_priv(dev);
|
||||
struct adapter *adapter = pi->adapter;
|
||||
|
||||
if (adapter->params.rev > 0) {
|
||||
t3_set_vlan_accel(adapter, 1 << pi->port_id,
|
||||
features & NETIF_F_HW_VLAN_RX);
|
||||
} else {
|
||||
/* single control for all ports */
|
||||
unsigned int i, have_vlans = features & NETIF_F_HW_VLAN_RX;
|
||||
|
||||
for_each_port(adapter, i)
|
||||
have_vlans |=
|
||||
adapter->port[i]->features & NETIF_F_HW_VLAN_RX;
|
||||
|
||||
t3_set_vlan_accel(adapter, 1, have_vlans);
|
||||
}
|
||||
t3_synchronize_rx(adapter, pi);
|
||||
}
|
||||
|
||||
static netdev_features_t cxgb_fix_features(struct net_device *dev,
|
||||
netdev_features_t features)
|
||||
{
|
||||
@@ -3353,9 +3356,6 @@ static int __devinit init_one(struct pci_dev *pdev,
|
||||
err = sysfs_create_group(&adapter->port[0]->dev.kobj,
|
||||
&cxgb3_attr_group);
|
||||
|
||||
for_each_port(adapter, i)
|
||||
cxgb_vlan_mode(adapter->port[i], adapter->port[i]->features);
|
||||
|
||||
print_port_info(adapter, ai);
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -1259,55 +1259,21 @@ rio_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
|
||||
{
|
||||
int phy_addr;
|
||||
struct netdev_private *np = netdev_priv(dev);
|
||||
struct mii_data *miidata = (struct mii_data *) &rq->ifr_ifru;
|
||||
|
||||
struct netdev_desc *desc;
|
||||
int i;
|
||||
struct mii_ioctl_data *miidata = if_mii(rq);
|
||||
|
||||
phy_addr = np->phy_addr;
|
||||
switch (cmd) {
|
||||
case SIOCDEVPRIVATE:
|
||||
case SIOCGMIIPHY:
|
||||
miidata->phy_id = phy_addr;
|
||||
break;
|
||||
|
||||
case SIOCDEVPRIVATE + 1:
|
||||
miidata->out_value = mii_read (dev, phy_addr, miidata->reg_num);
|
||||
case SIOCGMIIREG:
|
||||
miidata->val_out = mii_read (dev, phy_addr, miidata->reg_num);
|
||||
break;
|
||||
case SIOCDEVPRIVATE + 2:
|
||||
mii_write (dev, phy_addr, miidata->reg_num, miidata->in_value);
|
||||
case SIOCSMIIREG:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
mii_write (dev, phy_addr, miidata->reg_num, miidata->val_in);
|
||||
break;
|
||||
case SIOCDEVPRIVATE + 3:
|
||||
break;
|
||||
case SIOCDEVPRIVATE + 4:
|
||||
break;
|
||||
case SIOCDEVPRIVATE + 5:
|
||||
netif_stop_queue (dev);
|
||||
break;
|
||||
case SIOCDEVPRIVATE + 6:
|
||||
netif_wake_queue (dev);
|
||||
break;
|
||||
case SIOCDEVPRIVATE + 7:
|
||||
printk
|
||||
("tx_full=%x cur_tx=%lx old_tx=%lx cur_rx=%lx old_rx=%lx\n",
|
||||
netif_queue_stopped(dev), np->cur_tx, np->old_tx, np->cur_rx,
|
||||
np->old_rx);
|
||||
break;
|
||||
case SIOCDEVPRIVATE + 8:
|
||||
printk("TX ring:\n");
|
||||
for (i = 0; i < TX_RING_SIZE; i++) {
|
||||
desc = &np->tx_ring[i];
|
||||
printk
|
||||
("%02x:cur:%08x next:%08x status:%08x frag1:%08x frag0:%08x",
|
||||
i,
|
||||
(u32) (np->tx_ring_dma + i * sizeof (*desc)),
|
||||
(u32)le64_to_cpu(desc->next_desc),
|
||||
(u32)le64_to_cpu(desc->status),
|
||||
(u32)(le64_to_cpu(desc->fraginfo) >> 32),
|
||||
(u32)le64_to_cpu(desc->fraginfo));
|
||||
printk ("\n");
|
||||
}
|
||||
printk ("\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
@@ -365,13 +365,6 @@ struct ioctl_data {
|
||||
char *data;
|
||||
};
|
||||
|
||||
struct mii_data {
|
||||
__u16 reserved;
|
||||
__u16 reg_num;
|
||||
__u16 in_value;
|
||||
__u16 out_value;
|
||||
};
|
||||
|
||||
/* The Rx and Tx buffer descriptors. */
|
||||
struct netdev_desc {
|
||||
__le64 next_desc;
|
||||
|
||||
@@ -116,10 +116,10 @@ static struct ucc_geth_info ugeth_primary_info = {
|
||||
.maxGroupAddrInHash = 4,
|
||||
.maxIndAddrInHash = 4,
|
||||
.prel = 7,
|
||||
.maxFrameLength = 1518,
|
||||
.maxFrameLength = 1518+16, /* Add extra bytes for VLANs etc. */
|
||||
.minFrameLength = 64,
|
||||
.maxD1Length = 1520,
|
||||
.maxD2Length = 1520,
|
||||
.maxD1Length = 1520+16, /* Add extra bytes for VLANs etc. */
|
||||
.maxD2Length = 1520+16, /* Add extra bytes for VLANs etc. */
|
||||
.vlantype = 0x8100,
|
||||
.ecamptr = ((uint32_t) NULL),
|
||||
.eventRegMask = UCCE_OTHER,
|
||||
|
||||
@@ -877,7 +877,7 @@ struct ucc_geth_hardware_statistics {
|
||||
|
||||
/* Driver definitions */
|
||||
#define TX_BD_RING_LEN 0x10
|
||||
#define RX_BD_RING_LEN 0x10
|
||||
#define RX_BD_RING_LEN 0x20
|
||||
|
||||
#define TX_RING_MOD_MASK(size) (size-1)
|
||||
#define RX_RING_MOD_MASK(size) (size-1)
|
||||
|
||||
@@ -290,16 +290,18 @@ static void ehea_update_bcmc_registrations(void)
|
||||
|
||||
arr[i].adh = adapter->handle;
|
||||
arr[i].port_id = port->logical_port_id;
|
||||
arr[i].reg_type = EHEA_BCMC_SCOPE_ALL |
|
||||
EHEA_BCMC_MULTICAST |
|
||||
arr[i].reg_type = EHEA_BCMC_MULTICAST |
|
||||
EHEA_BCMC_UNTAGGED;
|
||||
if (mc_entry->macaddr == 0)
|
||||
arr[i].reg_type |= EHEA_BCMC_SCOPE_ALL;
|
||||
arr[i++].macaddr = mc_entry->macaddr;
|
||||
|
||||
arr[i].adh = adapter->handle;
|
||||
arr[i].port_id = port->logical_port_id;
|
||||
arr[i].reg_type = EHEA_BCMC_SCOPE_ALL |
|
||||
EHEA_BCMC_MULTICAST |
|
||||
arr[i].reg_type = EHEA_BCMC_MULTICAST |
|
||||
EHEA_BCMC_VLANID_ALL;
|
||||
if (mc_entry->macaddr == 0)
|
||||
arr[i].reg_type |= EHEA_BCMC_SCOPE_ALL;
|
||||
arr[i++].macaddr = mc_entry->macaddr;
|
||||
num_registrations -= 2;
|
||||
}
|
||||
@@ -1838,8 +1840,9 @@ static u64 ehea_multicast_reg_helper(struct ehea_port *port, u64 mc_mac_addr,
|
||||
u64 hret;
|
||||
u8 reg_type;
|
||||
|
||||
reg_type = EHEA_BCMC_SCOPE_ALL | EHEA_BCMC_MULTICAST
|
||||
| EHEA_BCMC_UNTAGGED;
|
||||
reg_type = EHEA_BCMC_MULTICAST | EHEA_BCMC_UNTAGGED;
|
||||
if (mc_mac_addr == 0)
|
||||
reg_type |= EHEA_BCMC_SCOPE_ALL;
|
||||
|
||||
hret = ehea_h_reg_dereg_bcmc(port->adapter->handle,
|
||||
port->logical_port_id,
|
||||
@@ -1847,8 +1850,9 @@ static u64 ehea_multicast_reg_helper(struct ehea_port *port, u64 mc_mac_addr,
|
||||
if (hret)
|
||||
goto out;
|
||||
|
||||
reg_type = EHEA_BCMC_SCOPE_ALL | EHEA_BCMC_MULTICAST
|
||||
| EHEA_BCMC_VLANID_ALL;
|
||||
reg_type = EHEA_BCMC_MULTICAST | EHEA_BCMC_VLANID_ALL;
|
||||
if (mc_mac_addr == 0)
|
||||
reg_type |= EHEA_BCMC_SCOPE_ALL;
|
||||
|
||||
hret = ehea_h_reg_dereg_bcmc(port->adapter->handle,
|
||||
port->logical_port_id,
|
||||
@@ -1898,7 +1902,7 @@ static void ehea_allmulti(struct net_device *dev, int enable)
|
||||
netdev_err(dev,
|
||||
"failed enabling IFF_ALLMULTI\n");
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
if (!enable) {
|
||||
/* Disable ALLMULTI */
|
||||
hret = ehea_multicast_reg_helper(port, 0, H_DEREG_BCMC);
|
||||
@@ -1908,6 +1912,7 @@ static void ehea_allmulti(struct net_device *dev, int enable)
|
||||
netdev_err(dev,
|
||||
"failed disabling IFF_ALLMULTI\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ehea_add_multicast_entry(struct ehea_port *port, u8 *mc_mac_addr)
|
||||
@@ -1941,11 +1946,7 @@ static void ehea_set_multicast_list(struct net_device *dev)
|
||||
struct netdev_hw_addr *ha;
|
||||
int ret;
|
||||
|
||||
if (port->promisc) {
|
||||
ehea_promiscuous(dev, 1);
|
||||
return;
|
||||
}
|
||||
ehea_promiscuous(dev, 0);
|
||||
ehea_promiscuous(dev, !!(dev->flags & IFF_PROMISC));
|
||||
|
||||
if (dev->flags & IFF_ALLMULTI) {
|
||||
ehea_allmulti(dev, 1);
|
||||
@@ -2463,6 +2464,7 @@ static int ehea_down(struct net_device *dev)
|
||||
return 0;
|
||||
|
||||
ehea_drop_multicast_list(dev);
|
||||
ehea_allmulti(dev, 0);
|
||||
ehea_broadcast_reg_helper(port, H_DEREG_BCMC);
|
||||
|
||||
ehea_free_interrupts(dev);
|
||||
@@ -3261,6 +3263,7 @@ static int __devinit ehea_probe_adapter(struct platform_device *dev,
|
||||
struct ehea_adapter *adapter;
|
||||
const u64 *adapter_handle;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
if (!dev || !dev->dev.of_node) {
|
||||
pr_err("Invalid ibmebus device probed\n");
|
||||
@@ -3314,17 +3317,9 @@ static int __devinit ehea_probe_adapter(struct platform_device *dev,
|
||||
tasklet_init(&adapter->neq_tasklet, ehea_neq_tasklet,
|
||||
(unsigned long)adapter);
|
||||
|
||||
ret = ibmebus_request_irq(adapter->neq->attr.ist1,
|
||||
ehea_interrupt_neq, IRQF_DISABLED,
|
||||
"ehea_neq", adapter);
|
||||
if (ret) {
|
||||
dev_err(&dev->dev, "requesting NEQ IRQ failed\n");
|
||||
goto out_kill_eq;
|
||||
}
|
||||
|
||||
ret = ehea_create_device_sysfs(dev);
|
||||
if (ret)
|
||||
goto out_free_irq;
|
||||
goto out_kill_eq;
|
||||
|
||||
ret = ehea_setup_ports(adapter);
|
||||
if (ret) {
|
||||
@@ -3332,15 +3327,28 @@ static int __devinit ehea_probe_adapter(struct platform_device *dev,
|
||||
goto out_rem_dev_sysfs;
|
||||
}
|
||||
|
||||
ret = ibmebus_request_irq(adapter->neq->attr.ist1,
|
||||
ehea_interrupt_neq, IRQF_DISABLED,
|
||||
"ehea_neq", adapter);
|
||||
if (ret) {
|
||||
dev_err(&dev->dev, "requesting NEQ IRQ failed\n");
|
||||
goto out_shutdown_ports;
|
||||
}
|
||||
|
||||
|
||||
ret = 0;
|
||||
goto out;
|
||||
|
||||
out_shutdown_ports:
|
||||
for (i = 0; i < EHEA_MAX_PORTS; i++)
|
||||
if (adapter->port[i]) {
|
||||
ehea_shutdown_single_port(adapter->port[i]);
|
||||
adapter->port[i] = NULL;
|
||||
}
|
||||
|
||||
out_rem_dev_sysfs:
|
||||
ehea_remove_device_sysfs(dev);
|
||||
|
||||
out_free_irq:
|
||||
ibmebus_free_irq(adapter->neq->attr.ist1, adapter);
|
||||
|
||||
out_kill_eq:
|
||||
ehea_destroy_eq(adapter->neq);
|
||||
|
||||
|
||||
@@ -450,7 +450,7 @@ u64 ehea_h_modify_ehea_port(const u64 adapter_handle, const u16 port_num,
|
||||
void *cb_addr);
|
||||
|
||||
#define H_REGBCMC_PN EHEA_BMASK_IBM(48, 63)
|
||||
#define H_REGBCMC_REGTYPE EHEA_BMASK_IBM(61, 63)
|
||||
#define H_REGBCMC_REGTYPE EHEA_BMASK_IBM(60, 63)
|
||||
#define H_REGBCMC_MACADDR EHEA_BMASK_IBM(16, 63)
|
||||
#define H_REGBCMC_VLANID EHEA_BMASK_IBM(52, 63)
|
||||
|
||||
|
||||
@@ -3799,7 +3799,7 @@ static int e1000_test_msi_interrupt(struct e1000_adapter *adapter)
|
||||
/* fire an unusual interrupt on the test handler */
|
||||
ew32(ICS, E1000_ICS_RXSEQ);
|
||||
e1e_flush();
|
||||
msleep(50);
|
||||
msleep(100);
|
||||
|
||||
e1000_irq_disable(adapter);
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay");
|
||||
/*
|
||||
* Interrupt Throttle Rate (interrupts/sec)
|
||||
*
|
||||
* Valid Range: 100-100000 (0=off, 1=dynamic, 3=dynamic conservative)
|
||||
* Valid Range: 100-100000 or one of: 0=off, 1=dynamic, 3=dynamic conservative
|
||||
*/
|
||||
E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");
|
||||
#define DEFAULT_ITR 3
|
||||
@@ -344,53 +344,60 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
|
||||
|
||||
if (num_InterruptThrottleRate > bd) {
|
||||
adapter->itr = InterruptThrottleRate[bd];
|
||||
switch (adapter->itr) {
|
||||
case 0:
|
||||
e_info("%s turned off\n", opt.name);
|
||||
break;
|
||||
case 1:
|
||||
e_info("%s set to dynamic mode\n", opt.name);
|
||||
adapter->itr_setting = adapter->itr;
|
||||
adapter->itr = 20000;
|
||||
break;
|
||||
case 3:
|
||||
e_info("%s set to dynamic conservative mode\n",
|
||||
opt.name);
|
||||
adapter->itr_setting = adapter->itr;
|
||||
adapter->itr = 20000;
|
||||
break;
|
||||
case 4:
|
||||
e_info("%s set to simplified (2000-8000 ints) "
|
||||
"mode\n", opt.name);
|
||||
adapter->itr_setting = 4;
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* Save the setting, because the dynamic bits
|
||||
* change itr.
|
||||
*/
|
||||
if (e1000_validate_option(&adapter->itr, &opt,
|
||||
adapter) &&
|
||||
(adapter->itr == 3)) {
|
||||
/*
|
||||
* In case of invalid user value,
|
||||
* default to conservative mode.
|
||||
*/
|
||||
adapter->itr_setting = adapter->itr;
|
||||
adapter->itr = 20000;
|
||||
} else {
|
||||
/*
|
||||
* Clear the lower two bits because
|
||||
* they are used as control.
|
||||
*/
|
||||
adapter->itr_setting =
|
||||
adapter->itr & ~3;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure a message is printed for non-special
|
||||
* values. And in case of an invalid option, display
|
||||
* warning, use default and got through itr/itr_setting
|
||||
* adjustment logic below
|
||||
*/
|
||||
if ((adapter->itr > 4) &&
|
||||
e1000_validate_option(&adapter->itr, &opt, adapter))
|
||||
adapter->itr = opt.def;
|
||||
} else {
|
||||
adapter->itr_setting = opt.def;
|
||||
/*
|
||||
* If no option specified, use default value and go
|
||||
* through the logic below to adjust itr/itr_setting
|
||||
*/
|
||||
adapter->itr = opt.def;
|
||||
|
||||
/*
|
||||
* Make sure a message is printed for non-special
|
||||
* default values
|
||||
*/
|
||||
if (adapter->itr > 40)
|
||||
e_info("%s set to default %d\n", opt.name,
|
||||
adapter->itr);
|
||||
}
|
||||
|
||||
adapter->itr_setting = adapter->itr;
|
||||
switch (adapter->itr) {
|
||||
case 0:
|
||||
e_info("%s turned off\n", opt.name);
|
||||
break;
|
||||
case 1:
|
||||
e_info("%s set to dynamic mode\n", opt.name);
|
||||
adapter->itr = 20000;
|
||||
break;
|
||||
case 3:
|
||||
e_info("%s set to dynamic conservative mode\n",
|
||||
opt.name);
|
||||
adapter->itr = 20000;
|
||||
break;
|
||||
case 4:
|
||||
e_info("%s set to simplified (2000-8000 ints) mode\n",
|
||||
opt.name);
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* Save the setting, because the dynamic bits
|
||||
* change itr.
|
||||
*
|
||||
* Clear the lower two bits because
|
||||
* they are used as control.
|
||||
*/
|
||||
adapter->itr_setting &= ~3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
{ /* Interrupt Mode */
|
||||
|
||||
@@ -2731,14 +2731,14 @@ static int __devinit igbvf_probe(struct pci_dev *pdev,
|
||||
netdev->addr_len);
|
||||
}
|
||||
|
||||
if (!is_valid_ether_addr(netdev->perm_addr)) {
|
||||
if (!is_valid_ether_addr(netdev->dev_addr)) {
|
||||
dev_err(&pdev->dev, "Invalid MAC Address: %pM\n",
|
||||
netdev->dev_addr);
|
||||
err = -EIO;
|
||||
goto err_hw_init;
|
||||
}
|
||||
|
||||
memcpy(netdev->perm_addr, adapter->hw.mac.addr, netdev->addr_len);
|
||||
memcpy(netdev->perm_addr, netdev->dev_addr, netdev->addr_len);
|
||||
|
||||
setup_timer(&adapter->watchdog_timer, &igbvf_watchdog,
|
||||
(unsigned long) adapter);
|
||||
|
||||
@@ -437,6 +437,7 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
|
||||
*/
|
||||
if ((fh->fh_r_ctl == FC_RCTL_DD_SOL_DATA) &&
|
||||
(fctl & FC_FC_END_SEQ)) {
|
||||
skb_linearize(skb);
|
||||
crc = (struct fcoe_crc_eof *)skb_put(skb, sizeof(*crc));
|
||||
crc->fcoe_eof = FC_EOF_T;
|
||||
}
|
||||
|
||||
@@ -4873,10 +4873,6 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
|
||||
}
|
||||
|
||||
ixgbe_clear_interrupt_scheme(adapter);
|
||||
#ifdef CONFIG_DCB
|
||||
kfree(adapter->ixgbe_ieee_pfc);
|
||||
kfree(adapter->ixgbe_ieee_ets);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
retval = pci_save_state(pdev);
|
||||
@@ -7224,6 +7220,11 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev)
|
||||
|
||||
ixgbe_release_hw_control(adapter);
|
||||
|
||||
#ifdef CONFIG_DCB
|
||||
kfree(adapter->ixgbe_ieee_pfc);
|
||||
kfree(adapter->ixgbe_ieee_ets);
|
||||
|
||||
#endif
|
||||
iounmap(adapter->hw.hw_addr);
|
||||
pci_release_selected_regions(pdev, pci_select_bars(pdev,
|
||||
IORESOURCE_MEM));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user