Skip to content

Commit 203738e

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
1) ICMP sockets leave err uninitialized but we try to return it for the unsupported MSG_OOB case, reported by Dave Jones. 2) Add new Zaurus device ID entries, from Dave Jones. 3) Pointer calculation in hso driver memset is wrong, from Dan Carpenter. 4) ks8851_probe() checks unsigned value as negative, fix also from Dan Carpenter. 5) Fix crashes in atl1c driver due to TX queue handling, from Eric Dumazet. I anticipate some TX side locking fixes coming in the near future for this driver as well. 6) The inline directive fix in Bluetooth which was breaking the build only with very new versions of GCC, from Johan Hedberg. 7) Fix crashes in the ATP CLIP code due to ARP cleanups this merge window, reported by Meelis Roos and fixed by Eric Dumazet. 8) JME driver doesn't flush RX FIFO correctly, from Guo-Fu Tseng. 9) Some ip6_route_output() callers test the return value for NULL, but this never happens as the convention is to return a dst entry with dst->error set. Fixes from RonQing Li. 10) Logitech Harmony 900 should be handled by zaurus driver not cdc_ether, update white lists and black lists accordingly. From Scott Talbert. 11) Receiving from certain kinds of devices there won't be a MAC header, so there is no MAC header to fixup in the IPSEC code, and if we try to do it we'll crash. Fix from Eric Dumazet. 12) Port type array indexing off-by-one in mlx4 driver, fix from Yevgeny Petrilin. 13) Fix regression in link-down handling in davinci_emac which causes all RX descriptors to be freed up and therefore RX to wedge completely, from Christian Riesch. 14) It took two attempts, but ctnetlink soft lockups seem to be cured now, from Pablo Neira Ayuso. 15) Endianness bug fix in ENIC driver, from Santosh Nayak. 16) The long ago conversion of the PPP fragmentation code over to abstracted SKB list handling wasn't perfect, once we get an out of sequence SKB we don't flush the rest of them like we should. From Ben McKeegan. 17) Fix regression of ->ip_summed initialization in sfc driver. From Ben Hutchings. 18) Bluetooth timeout mistakenly using msecs instead of jiffies, from Andrzej Kaczmarek. 19) Using _sync variant of work cancellation results in deadlocks, use the non _sync variants instead. From Andre Guedes. 20) Bluetooth rfcomm code had reference counting problems leading to crashes, fix from Octavian Purdila. 21) The conversion of netem over to classful qdisc handling added two bugs to netem_dequeue(), fixes from Eric Dumazet. 22) Missing pci_iounmap() in ATM Solos driver. Fix from Julia Lawall. 23) b44_pci_exit() should not have __exit tag since it's invoked from non-__exit code. From Nikola Pajkovsky. 24) The conversion of the neighbour hash tables over to RCU added a race, fixed here by adding the necessary reread of tbl->nht, fix from Michel Machado. 25) When we added VF (virtual function) attributes for network device dumps, this potentially bloats up the size of the dump of one network device such that the dump size is too large for the buffer allocated by properly written netlink applications. In particular, if you add 255 VFs to a network device, parts of GLIBC stop working. To fix this, we add an attribute that is used to turn on these extended portions of the network device dump. Sophisticaed applications like 'ip' that want to see this stuff will be changed to set the attribute, whereas things like GLIBC that don't care about VFs simply will not, and therefore won't be busted by the mere presence of VFs on a network device. Thanks to the tireless work of Greg Rose on this fix. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (53 commits) sfc: Fix assignment of ip_summed for pre-allocated skbs ppp: fix 'ppp_mp_reconstruct bad seq' errors enic: Fix endianness bug. gre: fix spelling in comments netfilter: ctnetlink: fix soft lockup when netlink adds new entries (v2) Revert "netfilter: ctnetlink: fix soft lockup when netlink adds new entries" davinci_emac: Do not free all rx dma descriptors during init mlx4_core: Fixing array indexes when setting port types phy: IC+101G and PHY_HAS_INTERRUPT flag netdev/phy/icplus: Correct broken phy_init code ipsec: be careful of non existing mac headers Move Logitech Harmony 900 from cdc_ether to zaurus hso: memsetting wrong data in hso_get_count() netfilter: ip6_route_output() never returns NULL. ethernet/broadcom: ip6_route_output() never returns NULL. ipv6: ip6_route_output() never returns NULL. jme: Fix FIFO flush issue atm: clip: remove clip_tbl ipv4: ping: Fix recvmsg MSG_OOB error handling. rtnetlink: Fix problem with buffer allocation ...
2 parents 3c761ea + b072342 commit 203738e

Some content is hidden

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

61 files changed

+380
-204
lines changed

drivers/atm/solos-pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,9 +1206,9 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
12061206

12071207
out_unmap_both:
12081208
pci_set_drvdata(dev, NULL);
1209-
pci_iounmap(dev, card->config_regs);
1210-
out_unmap_config:
12111209
pci_iounmap(dev, card->buffers);
1210+
out_unmap_config:
1211+
pci_iounmap(dev, card->config_regs);
12121212
out_release_regions:
12131213
pci_release_regions(dev);
12141214
out:

drivers/bluetooth/btusb.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ static struct usb_device_id btusb_table[] = {
102102

103103
/* Broadcom BCM20702A0 */
104104
{ USB_DEVICE(0x0a5c, 0x21e3) },
105+
{ USB_DEVICE(0x0a5c, 0x21f3) },
105106
{ USB_DEVICE(0x413c, 0x8197) },
106107

107108
{ } /* Terminating entry */
@@ -726,9 +727,6 @@ static int btusb_send_frame(struct sk_buff *skb)
726727
usb_fill_bulk_urb(urb, data->udev, pipe,
727728
skb->data, skb->len, btusb_tx_complete, skb);
728729

729-
if (skb->priority >= HCI_PRIO_MAX - 1)
730-
urb->transfer_flags = URB_ISO_ASAP;
731-
732730
hdev->stat.acl_tx++;
733731
break;
734732

drivers/net/can/sja1000/sja1000.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,16 @@ static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val)
9595
spin_unlock_irqrestore(&priv->cmdreg_lock, flags);
9696
}
9797

98+
static int sja1000_is_absent(struct sja1000_priv *priv)
99+
{
100+
return (priv->read_reg(priv, REG_MOD) == 0xFF);
101+
}
102+
98103
static int sja1000_probe_chip(struct net_device *dev)
99104
{
100105
struct sja1000_priv *priv = netdev_priv(dev);
101106

102-
if (priv->reg_base && (priv->read_reg(priv, 0) == 0xFF)) {
107+
if (priv->reg_base && sja1000_is_absent(priv)) {
103108
printk(KERN_INFO "%s: probing @0x%lX failed\n",
104109
DRV_NAME, dev->base_addr);
105110
return 0;
@@ -493,6 +498,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
493498
while ((isrc = priv->read_reg(priv, REG_IR)) && (n < SJA1000_MAX_IRQ)) {
494499
n++;
495500
status = priv->read_reg(priv, REG_SR);
501+
/* check for absent controller due to hw unplug */
502+
if (status == 0xFF && sja1000_is_absent(priv))
503+
return IRQ_NONE;
496504

497505
if (isrc & IRQ_WUI)
498506
dev_warn(dev->dev.parent, "wakeup interrupt\n");
@@ -509,6 +517,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
509517
while (status & SR_RBS) {
510518
sja1000_rx(dev);
511519
status = priv->read_reg(priv, REG_SR);
520+
/* check for absent controller */
521+
if (status == 0xFF && sja1000_is_absent(priv))
522+
return IRQ_NONE;
512523
}
513524
}
514525
if (isrc & (IRQ_DOI | IRQ_EI | IRQ_BEI | IRQ_EPI | IRQ_ALI)) {

drivers/net/ethernet/atheros/atl1c/atl1c_main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2244,10 +2244,6 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
22442244
dev_info(&adapter->pdev->dev, "tx locked\n");
22452245
return NETDEV_TX_LOCKED;
22462246
}
2247-
if (skb->mark == 0x01)
2248-
type = atl1c_trans_high;
2249-
else
2250-
type = atl1c_trans_normal;
22512247

22522248
if (atl1c_tpd_avail(adapter, type) < tpd_req) {
22532249
/* no enough descriptor, just stop queue */

drivers/net/ethernet/broadcom/b44.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2339,7 +2339,7 @@ static inline int __init b44_pci_init(void)
23392339
return err;
23402340
}
23412341

2342-
static inline void __exit b44_pci_exit(void)
2342+
static inline void b44_pci_exit(void)
23432343
{
23442344
#ifdef CONFIG_B44_PCI
23452345
ssb_pcihost_unregister(&b44_pci_driver);

drivers/net/ethernet/broadcom/cnic.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3584,7 +3584,11 @@ static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr,
35843584
fl6.flowi6_oif = dst_addr->sin6_scope_id;
35853585

35863586
*dst = ip6_route_output(&init_net, NULL, &fl6);
3587-
if (*dst)
3587+
if ((*dst)->error) {
3588+
dst_release(*dst);
3589+
*dst = NULL;
3590+
return -ENETUNREACH;
3591+
} else
35883592
return 0;
35893593
#endif
35903594

drivers/net/ethernet/cisco/enic/cq_enet_desc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static inline void cq_enet_rq_desc_dec(struct cq_enet_rq_desc *desc,
157157
CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK) ? 1 : 0;
158158
*fcoe_enc_error = (desc->flags &
159159
CQ_ENET_RQ_DESC_FCOE_ENC_ERROR) ? 1 : 0;
160-
*fcoe_eof = (u8)((desc->checksum_fcoe >>
160+
*fcoe_eof = (u8)((le16_to_cpu(desc->checksum_fcoe) >>
161161
CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT) &
162162
CQ_ENET_RQ_DESC_FCOE_EOF_MASK);
163163
*checksum = 0;

drivers/net/ethernet/cisco/enic/enic_pp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static int enic_set_port_profile(struct enic *enic, int vf)
7272
struct enic_port_profile *pp;
7373
struct vic_provinfo *vp;
7474
const u8 oui[3] = VIC_PROVINFO_CISCO_OUI;
75-
const u16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
75+
const __be16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
7676
char uuid_str[38];
7777
char client_mac_str[18];
7878
u8 *client_mac;

drivers/net/ethernet/jme.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2328,19 +2328,11 @@ jme_change_mtu(struct net_device *netdev, int new_mtu)
23282328
((new_mtu) < IPV6_MIN_MTU))
23292329
return -EINVAL;
23302330

2331-
if (new_mtu > 4000) {
2332-
jme->reg_rxcs &= ~RXCS_FIFOTHNP;
2333-
jme->reg_rxcs |= RXCS_FIFOTHNP_64QW;
2334-
jme_restart_rx_engine(jme);
2335-
} else {
2336-
jme->reg_rxcs &= ~RXCS_FIFOTHNP;
2337-
jme->reg_rxcs |= RXCS_FIFOTHNP_128QW;
2338-
jme_restart_rx_engine(jme);
2339-
}
23402331

23412332
netdev->mtu = new_mtu;
23422333
netdev_update_features(netdev);
23432334

2335+
jme_restart_rx_engine(jme);
23442336
jme_reset_link(jme);
23452337

23462338
return 0;

drivers/net/ethernet/jme.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ enum jme_rxcs_values {
730730
RXCS_RETRYCNT_60 = 0x00000F00,
731731

732732
RXCS_DEFAULT = RXCS_FIFOTHTP_128T |
733-
RXCS_FIFOTHNP_128QW |
733+
RXCS_FIFOTHNP_16QW |
734734
RXCS_DMAREQSZ_128B |
735735
RXCS_RETRYGAP_256ns |
736736
RXCS_RETRYCNT_32,

drivers/net/ethernet/mellanox/mlx4/eq.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector)
10361036
struct mlx4_priv *priv = mlx4_priv(dev);
10371037
int vec = 0, err = 0, i;
10381038

1039-
spin_lock(&priv->msix_ctl.pool_lock);
1039+
mutex_lock(&priv->msix_ctl.pool_lock);
10401040
for (i = 0; !vec && i < dev->caps.comp_pool; i++) {
10411041
if (~priv->msix_ctl.pool_bm & 1ULL << i) {
10421042
priv->msix_ctl.pool_bm |= 1ULL << i;
@@ -1058,7 +1058,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector)
10581058
eq_set_ci(&priv->eq_table.eq[vec], 1);
10591059
}
10601060
}
1061-
spin_unlock(&priv->msix_ctl.pool_lock);
1061+
mutex_unlock(&priv->msix_ctl.pool_lock);
10621062

10631063
if (vec) {
10641064
*vector = vec;
@@ -1079,13 +1079,13 @@ void mlx4_release_eq(struct mlx4_dev *dev, int vec)
10791079
if (likely(i >= 0)) {
10801080
/*sanity check , making sure were not trying to free irq's
10811081
Belonging to a legacy EQ*/
1082-
spin_lock(&priv->msix_ctl.pool_lock);
1082+
mutex_lock(&priv->msix_ctl.pool_lock);
10831083
if (priv->msix_ctl.pool_bm & 1ULL << i) {
10841084
free_irq(priv->eq_table.eq[vec].irq,
10851085
&priv->eq_table.eq[vec]);
10861086
priv->msix_ctl.pool_bm &= ~(1ULL << i);
10871087
}
1088-
spin_unlock(&priv->msix_ctl.pool_lock);
1088+
mutex_unlock(&priv->msix_ctl.pool_lock);
10891089
}
10901090

10911091
}

drivers/net/ethernet/mellanox/mlx4/main.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -531,15 +531,14 @@ int mlx4_change_port_types(struct mlx4_dev *dev,
531531
for (port = 0; port < dev->caps.num_ports; port++) {
532532
/* Change the port type only if the new type is different
533533
* from the current, and not set to Auto */
534-
if (port_types[port] != dev->caps.port_type[port + 1]) {
534+
if (port_types[port] != dev->caps.port_type[port + 1])
535535
change = 1;
536-
dev->caps.port_type[port + 1] = port_types[port];
537-
}
538536
}
539537
if (change) {
540538
mlx4_unregister_device(dev);
541539
for (port = 1; port <= dev->caps.num_ports; port++) {
542540
mlx4_CLOSE_PORT(dev, port);
541+
dev->caps.port_type[port] = port_types[port - 1];
543542
err = mlx4_SET_PORT(dev, port);
544543
if (err) {
545544
mlx4_err(dev, "Failed to set port %d, "
@@ -986,6 +985,9 @@ static int map_bf_area(struct mlx4_dev *dev)
986985
resource_size_t bf_len;
987986
int err = 0;
988987

988+
if (!dev->caps.bf_reg_size)
989+
return -ENXIO;
990+
989991
bf_start = pci_resource_start(dev->pdev, 2) +
990992
(dev->caps.num_uars << PAGE_SHIFT);
991993
bf_len = pci_resource_len(dev->pdev, 2) -
@@ -1825,7 +1827,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
18251827
goto err_master_mfunc;
18261828

18271829
priv->msix_ctl.pool_bm = 0;
1828-
spin_lock_init(&priv->msix_ctl.pool_lock);
1830+
mutex_init(&priv->msix_ctl.pool_lock);
18291831

18301832
mlx4_enable_msi_x(dev);
18311833
if ((mlx4_is_mfunc(dev)) &&

drivers/net/ethernet/mellanox/mlx4/mlx4.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ struct mlx4_sense {
697697

698698
struct mlx4_msix_ctl {
699699
u64 pool_bm;
700-
spinlock_t pool_lock;
700+
struct mutex pool_lock;
701701
};
702702

703703
struct mlx4_steer {

drivers/net/ethernet/micrel/ks8851_mll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ static int __devinit ks8851_probe(struct platform_device *pdev)
15451545

15461546
netdev->irq = platform_get_irq(pdev, 0);
15471547

1548-
if (netdev->irq < 0) {
1548+
if ((int)netdev->irq < 0) {
15491549
err = netdev->irq;
15501550
goto err_get_irq;
15511551
}

drivers/net/ethernet/sfc/rx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,10 @@ static int efx_init_rx_buffers_skb(struct efx_rx_queue *rx_queue)
156156
if (unlikely(!skb))
157157
return -ENOMEM;
158158

159-
/* Adjust the SKB for padding and checksum */
159+
/* Adjust the SKB for padding */
160160
skb_reserve(skb, NET_IP_ALIGN);
161161
rx_buf->len = skb_len - NET_IP_ALIGN;
162162
rx_buf->is_page = false;
163-
skb->ip_summed = CHECKSUM_UNNECESSARY;
164163

165164
rx_buf->dma_addr = pci_map_single(efx->pci_dev,
166165
skb->data, rx_buf->len,
@@ -496,6 +495,7 @@ static void efx_rx_packet_gro(struct efx_channel *channel,
496495

497496
EFX_BUG_ON_PARANOID(!checksummed);
498497
rx_buf->u.skb = NULL;
498+
skb->ip_summed = CHECKSUM_UNNECESSARY;
499499

500500
gro_result = napi_gro_receive(napi, skb);
501501
}

drivers/net/ethernet/ti/davinci_emac.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ static void emac_rx_handler(void *token, int len, int status)
10091009
int ret;
10101010

10111011
/* free and bail if we are shutting down */
1012-
if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) {
1012+
if (unlikely(!netif_running(ndev))) {
10131013
dev_kfree_skb_any(skb);
10141014
return;
10151015
}
@@ -1038,7 +1038,9 @@ static void emac_rx_handler(void *token, int len, int status)
10381038
recycle:
10391039
ret = cpdma_chan_submit(priv->rxchan, skb, skb->data,
10401040
skb_tailroom(skb), GFP_KERNEL);
1041-
if (WARN_ON(ret < 0))
1041+
1042+
WARN_ON(ret == -ENOMEM);
1043+
if (unlikely(ret < 0))
10421044
dev_kfree_skb_any(skb);
10431045
}
10441046

0 commit comments

Comments
 (0)