Skip to content

Commit 7c17d86

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (69 commits) pptp: Accept packet with seq zero RDS: Remove some unused iWARP code net: fsl: fec: handle 10Mbps speed in RMII mode drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c: add missing iounmap drivers/net/ethernet/tundra/tsi108_eth.c: add missing iounmap ksz884x: fix mtu for VLAN net_sched: sfq: add optional RED on top of SFQ dp83640: Fix NOHZ local_softirq_pending 08 warning gianfar: Fix invalid TX frames returned on error queue when time stamping gianfar: Fix missing sock reference when processing TX time stamps phylib: introduce mdiobus_alloc_size() net: decrement memcg jump label when limit, not usage, is changed net: reintroduce missing rcu_assign_pointer() calls inet_diag: Rename inet_diag_req_compat into inet_diag_req inet_diag: Rename inet_diag_req into inet_diag_req_v2 bond_alb: don't disable softirq under bond_alb_xmit mac80211: fix rx->key NULL pointer dereference in promiscuous mode nl80211: fix old station flags compatibility mdio-octeon: use an unique MDIO bus name. mdio-gpio: use an unique MDIO bus name. ...
2 parents 2485a4b + 91dce7d commit 7c17d86

Some content is hidden

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

98 files changed

+925
-588
lines changed

drivers/isdn/i4l/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if ISDN_I4L
66

77
config ISDN_PPP
88
bool "Support synchronous PPP"
9-
depends on INET
9+
depends on INET && NETDEVICES
1010
select SLHC
1111
help
1212
Over digital connections such as ISDN, there is no need to

drivers/net/bonding/bond_alb.c

Lines changed: 76 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,26 @@ static inline u8 _simple_hash(const u8 *hash_start, int hash_size)
9999

100100
/*********************** tlb specific functions ***************************/
101101

102-
static inline void _lock_tx_hashtbl(struct bonding *bond)
102+
static inline void _lock_tx_hashtbl_bh(struct bonding *bond)
103103
{
104104
spin_lock_bh(&(BOND_ALB_INFO(bond).tx_hashtbl_lock));
105105
}
106106

107-
static inline void _unlock_tx_hashtbl(struct bonding *bond)
107+
static inline void _unlock_tx_hashtbl_bh(struct bonding *bond)
108108
{
109109
spin_unlock_bh(&(BOND_ALB_INFO(bond).tx_hashtbl_lock));
110110
}
111111

112+
static inline void _lock_tx_hashtbl(struct bonding *bond)
113+
{
114+
spin_lock(&(BOND_ALB_INFO(bond).tx_hashtbl_lock));
115+
}
116+
117+
static inline void _unlock_tx_hashtbl(struct bonding *bond)
118+
{
119+
spin_unlock(&(BOND_ALB_INFO(bond).tx_hashtbl_lock));
120+
}
121+
112122
/* Caller must hold tx_hashtbl lock */
113123
static inline void tlb_init_table_entry(struct tlb_client_info *entry, int save_load)
114124
{
@@ -129,14 +139,13 @@ static inline void tlb_init_slave(struct slave *slave)
129139
SLAVE_TLB_INFO(slave).head = TLB_NULL_INDEX;
130140
}
131141

132-
/* Caller must hold bond lock for read */
133-
static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_load)
142+
/* Caller must hold bond lock for read, BH disabled */
143+
static void __tlb_clear_slave(struct bonding *bond, struct slave *slave,
144+
int save_load)
134145
{
135146
struct tlb_client_info *tx_hash_table;
136147
u32 index;
137148

138-
_lock_tx_hashtbl(bond);
139-
140149
/* clear slave from tx_hashtbl */
141150
tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl;
142151

@@ -151,8 +160,15 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_
151160
}
152161

153162
tlb_init_slave(slave);
163+
}
154164

155-
_unlock_tx_hashtbl(bond);
165+
/* Caller must hold bond lock for read */
166+
static void tlb_clear_slave(struct bonding *bond, struct slave *slave,
167+
int save_load)
168+
{
169+
_lock_tx_hashtbl_bh(bond);
170+
__tlb_clear_slave(bond, slave, save_load);
171+
_unlock_tx_hashtbl_bh(bond);
156172
}
157173

158174
/* Must be called before starting the monitor timer */
@@ -169,15 +185,15 @@ static int tlb_initialize(struct bonding *bond)
169185
bond->dev->name);
170186
return -1;
171187
}
172-
_lock_tx_hashtbl(bond);
188+
_lock_tx_hashtbl_bh(bond);
173189

174190
bond_info->tx_hashtbl = new_hashtbl;
175191

176192
for (i = 0; i < TLB_HASH_TABLE_SIZE; i++) {
177193
tlb_init_table_entry(&bond_info->tx_hashtbl[i], 0);
178194
}
179195

180-
_unlock_tx_hashtbl(bond);
196+
_unlock_tx_hashtbl_bh(bond);
181197

182198
return 0;
183199
}
@@ -187,12 +203,12 @@ static void tlb_deinitialize(struct bonding *bond)
187203
{
188204
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
189205

190-
_lock_tx_hashtbl(bond);
206+
_lock_tx_hashtbl_bh(bond);
191207

192208
kfree(bond_info->tx_hashtbl);
193209
bond_info->tx_hashtbl = NULL;
194210

195-
_unlock_tx_hashtbl(bond);
211+
_unlock_tx_hashtbl_bh(bond);
196212
}
197213

198214
static long long compute_gap(struct slave *slave)
@@ -226,15 +242,13 @@ static struct slave *tlb_get_least_loaded_slave(struct bonding *bond)
226242
return least_loaded;
227243
}
228244

229-
/* Caller must hold bond lock for read */
230-
static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, u32 skb_len)
245+
static struct slave *__tlb_choose_channel(struct bonding *bond, u32 hash_index,
246+
u32 skb_len)
231247
{
232248
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
233249
struct tlb_client_info *hash_table;
234250
struct slave *assigned_slave;
235251

236-
_lock_tx_hashtbl(bond);
237-
238252
hash_table = bond_info->tx_hashtbl;
239253
assigned_slave = hash_table[hash_index].tx_slave;
240254
if (!assigned_slave) {
@@ -263,22 +277,46 @@ static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, u3
263277
hash_table[hash_index].tx_bytes += skb_len;
264278
}
265279

266-
_unlock_tx_hashtbl(bond);
267-
268280
return assigned_slave;
269281
}
270282

283+
/* Caller must hold bond lock for read */
284+
static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index,
285+
u32 skb_len)
286+
{
287+
struct slave *tx_slave;
288+
/*
289+
* We don't need to disable softirq here, becase
290+
* tlb_choose_channel() is only called by bond_alb_xmit()
291+
* which already has softirq disabled.
292+
*/
293+
_lock_tx_hashtbl(bond);
294+
tx_slave = __tlb_choose_channel(bond, hash_index, skb_len);
295+
_unlock_tx_hashtbl(bond);
296+
return tx_slave;
297+
}
298+
271299
/*********************** rlb specific functions ***************************/
272-
static inline void _lock_rx_hashtbl(struct bonding *bond)
300+
static inline void _lock_rx_hashtbl_bh(struct bonding *bond)
273301
{
274302
spin_lock_bh(&(BOND_ALB_INFO(bond).rx_hashtbl_lock));
275303
}
276304

277-
static inline void _unlock_rx_hashtbl(struct bonding *bond)
305+
static inline void _unlock_rx_hashtbl_bh(struct bonding *bond)
278306
{
279307
spin_unlock_bh(&(BOND_ALB_INFO(bond).rx_hashtbl_lock));
280308
}
281309

310+
static inline void _lock_rx_hashtbl(struct bonding *bond)
311+
{
312+
spin_lock(&(BOND_ALB_INFO(bond).rx_hashtbl_lock));
313+
}
314+
315+
static inline void _unlock_rx_hashtbl(struct bonding *bond)
316+
{
317+
spin_unlock(&(BOND_ALB_INFO(bond).rx_hashtbl_lock));
318+
}
319+
282320
/* when an ARP REPLY is received from a client update its info
283321
* in the rx_hashtbl
284322
*/
@@ -288,7 +326,7 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp)
288326
struct rlb_client_info *client_info;
289327
u32 hash_index;
290328

291-
_lock_rx_hashtbl(bond);
329+
_lock_rx_hashtbl_bh(bond);
292330

293331
hash_index = _simple_hash((u8*)&(arp->ip_src), sizeof(arp->ip_src));
294332
client_info = &(bond_info->rx_hashtbl[hash_index]);
@@ -303,7 +341,7 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp)
303341
bond_info->rx_ntt = 1;
304342
}
305343

306-
_unlock_rx_hashtbl(bond);
344+
_unlock_rx_hashtbl_bh(bond);
307345
}
308346

309347
static void rlb_arp_recv(struct sk_buff *skb, struct bonding *bond,
@@ -401,7 +439,7 @@ static void rlb_clear_slave(struct bonding *bond, struct slave *slave)
401439
u32 index, next_index;
402440

403441
/* clear slave from rx_hashtbl */
404-
_lock_rx_hashtbl(bond);
442+
_lock_rx_hashtbl_bh(bond);
405443

406444
rx_hash_table = bond_info->rx_hashtbl;
407445
index = bond_info->rx_hashtbl_head;
@@ -432,7 +470,7 @@ static void rlb_clear_slave(struct bonding *bond, struct slave *slave)
432470
}
433471
}
434472

435-
_unlock_rx_hashtbl(bond);
473+
_unlock_rx_hashtbl_bh(bond);
436474

437475
write_lock_bh(&bond->curr_slave_lock);
438476

@@ -489,7 +527,7 @@ static void rlb_update_rx_clients(struct bonding *bond)
489527
struct rlb_client_info *client_info;
490528
u32 hash_index;
491529

492-
_lock_rx_hashtbl(bond);
530+
_lock_rx_hashtbl_bh(bond);
493531

494532
hash_index = bond_info->rx_hashtbl_head;
495533
for (; hash_index != RLB_NULL_INDEX; hash_index = client_info->next) {
@@ -507,7 +545,7 @@ static void rlb_update_rx_clients(struct bonding *bond)
507545
*/
508546
bond_info->rlb_update_delay_counter = RLB_UPDATE_DELAY;
509547

510-
_unlock_rx_hashtbl(bond);
548+
_unlock_rx_hashtbl_bh(bond);
511549
}
512550

513551
/* The slave was assigned a new mac address - update the clients */
@@ -518,7 +556,7 @@ static void rlb_req_update_slave_clients(struct bonding *bond, struct slave *sla
518556
int ntt = 0;
519557
u32 hash_index;
520558

521-
_lock_rx_hashtbl(bond);
559+
_lock_rx_hashtbl_bh(bond);
522560

523561
hash_index = bond_info->rx_hashtbl_head;
524562
for (; hash_index != RLB_NULL_INDEX; hash_index = client_info->next) {
@@ -538,7 +576,7 @@ static void rlb_req_update_slave_clients(struct bonding *bond, struct slave *sla
538576
bond_info->rlb_update_retry_counter = RLB_UPDATE_RETRY;
539577
}
540578

541-
_unlock_rx_hashtbl(bond);
579+
_unlock_rx_hashtbl_bh(bond);
542580
}
543581

544582
/* mark all clients using src_ip to be updated */
@@ -709,7 +747,7 @@ static void rlb_rebalance(struct bonding *bond)
709747
int ntt;
710748
u32 hash_index;
711749

712-
_lock_rx_hashtbl(bond);
750+
_lock_rx_hashtbl_bh(bond);
713751

714752
ntt = 0;
715753
hash_index = bond_info->rx_hashtbl_head;
@@ -727,7 +765,7 @@ static void rlb_rebalance(struct bonding *bond)
727765
if (ntt) {
728766
bond_info->rx_ntt = 1;
729767
}
730-
_unlock_rx_hashtbl(bond);
768+
_unlock_rx_hashtbl_bh(bond);
731769
}
732770

733771
/* Caller must hold rx_hashtbl lock */
@@ -751,7 +789,7 @@ static int rlb_initialize(struct bonding *bond)
751789
bond->dev->name);
752790
return -1;
753791
}
754-
_lock_rx_hashtbl(bond);
792+
_lock_rx_hashtbl_bh(bond);
755793

756794
bond_info->rx_hashtbl = new_hashtbl;
757795

@@ -761,7 +799,7 @@ static int rlb_initialize(struct bonding *bond)
761799
rlb_init_table_entry(bond_info->rx_hashtbl + i);
762800
}
763801

764-
_unlock_rx_hashtbl(bond);
802+
_unlock_rx_hashtbl_bh(bond);
765803

766804
/* register to receive ARPs */
767805
bond->recv_probe = rlb_arp_recv;
@@ -773,21 +811,21 @@ static void rlb_deinitialize(struct bonding *bond)
773811
{
774812
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
775813

776-
_lock_rx_hashtbl(bond);
814+
_lock_rx_hashtbl_bh(bond);
777815

778816
kfree(bond_info->rx_hashtbl);
779817
bond_info->rx_hashtbl = NULL;
780818
bond_info->rx_hashtbl_head = RLB_NULL_INDEX;
781819

782-
_unlock_rx_hashtbl(bond);
820+
_unlock_rx_hashtbl_bh(bond);
783821
}
784822

785823
static void rlb_clear_vlan(struct bonding *bond, unsigned short vlan_id)
786824
{
787825
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
788826
u32 curr_index;
789827

790-
_lock_rx_hashtbl(bond);
828+
_lock_rx_hashtbl_bh(bond);
791829

792830
curr_index = bond_info->rx_hashtbl_head;
793831
while (curr_index != RLB_NULL_INDEX) {
@@ -812,7 +850,7 @@ static void rlb_clear_vlan(struct bonding *bond, unsigned short vlan_id)
812850
curr_index = next_index;
813851
}
814852

815-
_unlock_rx_hashtbl(bond);
853+
_unlock_rx_hashtbl_bh(bond);
816854
}
817855

818856
/*********************** tlb/rlb shared functions *********************/
@@ -1320,7 +1358,9 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
13201358
res = bond_dev_queue_xmit(bond, skb, tx_slave->dev);
13211359
} else {
13221360
if (tx_slave) {
1323-
tlb_clear_slave(bond, tx_slave, 0);
1361+
_lock_tx_hashtbl(bond);
1362+
__tlb_clear_slave(bond, tx_slave, 0);
1363+
_unlock_tx_hashtbl(bond);
13241364
}
13251365
}
13261366

drivers/net/ethernet/8390/ax88796.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,8 @@ static int ax_mii_init(struct net_device *dev)
623623

624624
ax->mii_bus->name = "ax88796_mii_bus";
625625
ax->mii_bus->parent = dev->dev.parent;
626-
snprintf(ax->mii_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id);
626+
snprintf(ax->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
627+
pdev->name, pdev->id);
627628

628629
ax->mii_bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
629630
if (!ax->mii_bus->irq) {

drivers/net/ethernet/adi/bfin_mac.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,8 @@ static int __devinit bfin_mii_bus_probe(struct platform_device *pdev)
16701670
miibus->name = "bfin_mii_bus";
16711671
miibus->phy_mask = mii_bus_pd->phy_mask;
16721672

1673-
snprintf(miibus->id, MII_BUS_ID_SIZE, "0");
1673+
snprintf(miibus->id, MII_BUS_ID_SIZE, "%s-%x",
1674+
pdev->name, pdev->id);
16741675
miibus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
16751676
if (!miibus->irq)
16761677
goto out_err_irq_alloc;

drivers/net/ethernet/amd/au1000_eth.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,8 @@ static int __devinit au1000_probe(struct platform_device *pdev)
11711171
aup->mii_bus->write = au1000_mdiobus_write;
11721172
aup->mii_bus->reset = au1000_mdiobus_reset;
11731173
aup->mii_bus->name = "au1000_eth_mii";
1174-
snprintf(aup->mii_bus->id, MII_BUS_ID_SIZE, "%x", aup->mac_id);
1174+
snprintf(aup->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
1175+
pdev->name, aup->mac_id);
11751176
aup->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
11761177
if (aup->mii_bus->irq == NULL)
11771178
goto err_out;

drivers/net/ethernet/broadcom/bcm63xx_enet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ static int __devinit bcm_enet_probe(struct platform_device *pdev)
17271727
bus->priv = priv;
17281728
bus->read = bcm_enet_mdio_read_phylib;
17291729
bus->write = bcm_enet_mdio_write_phylib;
1730-
sprintf(bus->id, "%d", priv->mac_id);
1730+
sprintf(bus->id, "%s-%d", pdev->name, priv->mac_id);
17311731

17321732
/* only probe bus where we think the PHY is, because
17331733
* the mdio read operation return 0 instead of 0xffff

drivers/net/ethernet/broadcom/sb1250-mac.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2259,7 +2259,8 @@ static int sbmac_init(struct platform_device *pldev, long long base)
22592259
}
22602260

22612261
sc->mii_bus->name = sbmac_mdio_string;
2262-
snprintf(sc->mii_bus->id, MII_BUS_ID_SIZE, "%x", idx);
2262+
snprintf(sc->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
2263+
pldev->name, idx);
22632264
sc->mii_bus->priv = sc;
22642265
sc->mii_bus->read = sbmac_mii_read;
22652266
sc->mii_bus->write = sbmac_mii_write;

drivers/net/ethernet/cadence/macb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ static int macb_mii_init(struct macb *bp)
243243
bp->mii_bus->read = &macb_mdio_read;
244244
bp->mii_bus->write = &macb_mdio_write;
245245
bp->mii_bus->reset = &macb_mdio_reset;
246-
snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%x", bp->pdev->id);
246+
snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
247+
bp->pdev->name, bp->pdev->id);
247248
bp->mii_bus->priv = bp;
248249
bp->mii_bus->parent = &bp->dev->dev;
249250
pdata = bp->pdev->dev.platform_data;

drivers/net/ethernet/dnet.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ static int dnet_mii_init(struct dnet *bp)
325325
bp->mii_bus->write = &dnet_mdio_write;
326326
bp->mii_bus->reset = &dnet_mdio_reset;
327327

328-
snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%x", 0);
328+
snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
329+
bp->pdev->name, bp->pdev->id);
329330

330331
bp->mii_bus->priv = bp;
331332

0 commit comments

Comments
 (0)