aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-01-04 14:57:25 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-04 14:57:25 -0500
commitdbbe68bb12b34f3e450da7a73c20e6fa1f85d63a (patch)
tree10f8363cbf5e428c0cb5614959e37b67a7e0cfa2 /drivers
parent7b26e5ebd8b27b0126a84ae7f9a42aa8293d6c48 (diff)
parent9fc3bbb4a752f108cf096d96640f3b548bbbce6c (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers')
-rw-r--r--drivers/atm/atmtcp.c5
-rw-r--r--drivers/isdn/gigaset/capi.c1
-rw-r--r--drivers/net/atlx/atl1.c10
-rw-r--r--drivers/net/cnic.c10
-rw-r--r--drivers/net/ehea/ehea_ethtool.c7
-rw-r--r--drivers/net/ppp_generic.c9
-rw-r--r--drivers/net/skfp/skfddi.c2
-rw-r--r--drivers/net/starfire.c2
-rw-r--r--drivers/net/tg3.c2
-rw-r--r--drivers/usb/atm/ueagle-atm.c22
10 files changed, 59 insertions, 11 deletions
diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
index 2b464b631f22..0b0625054a87 100644
--- a/drivers/atm/atmtcp.c
+++ b/drivers/atm/atmtcp.c
@@ -392,7 +392,10 @@ static int atmtcp_attach(struct atm_vcc *vcc,int itf)
392 atm_dev_put(dev); 392 atm_dev_put(dev);
393 return -EMEDIUMTYPE; 393 return -EMEDIUMTYPE;
394 } 394 }
395 if (PRIV(dev)->vcc) return -EBUSY; 395 if (PRIV(dev)->vcc) {
396 atm_dev_put(dev);
397 return -EBUSY;
398 }
396 } 399 }
397 else { 400 else {
398 int error; 401 int error;
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index bcc174e4f3b1..658e75f18d05 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -1900,6 +1900,7 @@ static void do_disconnect_req(struct gigaset_capi_ctr *iif,
1900 if (b3skb == NULL) { 1900 if (b3skb == NULL) {
1901 dev_err(cs->dev, "%s: out of memory\n", __func__); 1901 dev_err(cs->dev, "%s: out of memory\n", __func__);
1902 send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR); 1902 send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR);
1903 kfree(b3cmsg);
1903 return; 1904 return;
1904 } 1905 }
1905 capi_cmsg2message(b3cmsg, 1906 capi_cmsg2message(b3cmsg,
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index def8df83359c..3b527687c28f 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -3504,6 +3504,8 @@ static int atl1_set_ringparam(struct net_device *netdev,
3504 struct atl1_rfd_ring rfd_old, rfd_new; 3504 struct atl1_rfd_ring rfd_old, rfd_new;
3505 struct atl1_rrd_ring rrd_old, rrd_new; 3505 struct atl1_rrd_ring rrd_old, rrd_new;
3506 struct atl1_ring_header rhdr_old, rhdr_new; 3506 struct atl1_ring_header rhdr_old, rhdr_new;
3507 struct atl1_smb smb;
3508 struct atl1_cmb cmb;
3507 int err; 3509 int err;
3508 3510
3509 tpd_old = adapter->tpd_ring; 3511 tpd_old = adapter->tpd_ring;
@@ -3544,11 +3546,19 @@ static int atl1_set_ringparam(struct net_device *netdev,
3544 adapter->rrd_ring = rrd_old; 3546 adapter->rrd_ring = rrd_old;
3545 adapter->tpd_ring = tpd_old; 3547 adapter->tpd_ring = tpd_old;
3546 adapter->ring_header = rhdr_old; 3548 adapter->ring_header = rhdr_old;
3549 /*
3550 * Save SMB and CMB, since atl1_free_ring_resources
3551 * will clear them.
3552 */
3553 smb = adapter->smb;
3554 cmb = adapter->cmb;
3547 atl1_free_ring_resources(adapter); 3555 atl1_free_ring_resources(adapter);
3548 adapter->rfd_ring = rfd_new; 3556 adapter->rfd_ring = rfd_new;
3549 adapter->rrd_ring = rrd_new; 3557 adapter->rrd_ring = rrd_new;
3550 adapter->tpd_ring = tpd_new; 3558 adapter->tpd_ring = tpd_new;
3551 adapter->ring_header = rhdr_new; 3559 adapter->ring_header = rhdr_new;
3560 adapter->smb = smb;
3561 adapter->cmb = cmb;
3552 3562
3553 err = atl1_up(adapter); 3563 err = atl1_up(adapter);
3554 if (err) 3564 if (err)
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 6dfa56440ac0..aa5016ad9e19 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -951,7 +951,7 @@ static int cnic_alloc_uio_rings(struct cnic_dev *dev, int pages)
951 &udev->l2_ring_map, 951 &udev->l2_ring_map,
952 GFP_KERNEL | __GFP_COMP); 952 GFP_KERNEL | __GFP_COMP);
953 if (!udev->l2_ring) 953 if (!udev->l2_ring)
954 return -ENOMEM; 954 goto err_udev;
955 955
956 udev->l2_buf_size = (cp->l2_rx_ring_size + 1) * cp->l2_single_buf_size; 956 udev->l2_buf_size = (cp->l2_rx_ring_size + 1) * cp->l2_single_buf_size;
957 udev->l2_buf_size = PAGE_ALIGN(udev->l2_buf_size); 957 udev->l2_buf_size = PAGE_ALIGN(udev->l2_buf_size);
@@ -959,7 +959,7 @@ static int cnic_alloc_uio_rings(struct cnic_dev *dev, int pages)
959 &udev->l2_buf_map, 959 &udev->l2_buf_map,
960 GFP_KERNEL | __GFP_COMP); 960 GFP_KERNEL | __GFP_COMP);
961 if (!udev->l2_buf) 961 if (!udev->l2_buf)
962 return -ENOMEM; 962 goto err_dma;
963 963
964 write_lock(&cnic_dev_lock); 964 write_lock(&cnic_dev_lock);
965 list_add(&udev->list, &cnic_udev_list); 965 list_add(&udev->list, &cnic_udev_list);
@@ -970,6 +970,12 @@ static int cnic_alloc_uio_rings(struct cnic_dev *dev, int pages)
970 cp->udev = udev; 970 cp->udev = udev;
971 971
972 return 0; 972 return 0;
973 err_dma:
974 dma_free_coherent(&udev->pdev->dev, udev->l2_ring_size,
975 udev->l2_ring, udev->l2_ring_map);
976 err_udev:
977 kfree(udev);
978 return -ENOMEM;
973} 979}
974 980
975static int cnic_init_uio(struct cnic_dev *dev) 981static int cnic_init_uio(struct cnic_dev *dev)
diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c
index afebf2075779..3e2e734fecb7 100644
--- a/drivers/net/ehea/ehea_ethtool.c
+++ b/drivers/net/ehea/ehea_ethtool.c
@@ -265,6 +265,13 @@ static void ehea_get_ethtool_stats(struct net_device *dev,
265 265
266static int ehea_set_flags(struct net_device *dev, u32 data) 266static int ehea_set_flags(struct net_device *dev, u32 data)
267{ 267{
268 /* Avoid changing the VLAN flags */
269 if ((data & (ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN)) !=
270 (ethtool_op_get_flags(dev) & (ETH_FLAG_RXVLAN |
271 ETH_FLAG_TXVLAN))){
272 return -EINVAL;
273 }
274
268 return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO 275 return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO
269 | ETH_FLAG_TXVLAN 276 | ETH_FLAG_TXVLAN
270 | ETH_FLAG_RXVLAN); 277 | ETH_FLAG_RXVLAN);
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index b708f68471a6..6456484c0299 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -1283,6 +1283,11 @@ ppp_push(struct ppp *ppp)
1283} 1283}
1284 1284
1285#ifdef CONFIG_PPP_MULTILINK 1285#ifdef CONFIG_PPP_MULTILINK
1286static bool mp_protocol_compress __read_mostly = true;
1287module_param(mp_protocol_compress, bool, S_IRUGO | S_IWUSR);
1288MODULE_PARM_DESC(mp_protocol_compress,
1289 "compress protocol id in multilink fragments");
1290
1286/* 1291/*
1287 * Divide a packet to be transmitted into fragments and 1292 * Divide a packet to be transmitted into fragments and
1288 * send them out the individual links. 1293 * send them out the individual links.
@@ -1345,10 +1350,10 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
1345 if (nfree == 0 || nfree < navail / 2) 1350 if (nfree == 0 || nfree < navail / 2)
1346 return 0; /* can't take now, leave it in xmit_pending */ 1351 return 0; /* can't take now, leave it in xmit_pending */
1347 1352
1348 /* Do protocol field compression (XXX this should be optional) */ 1353 /* Do protocol field compression */
1349 p = skb->data; 1354 p = skb->data;
1350 len = skb->len; 1355 len = skb->len;
1351 if (*p == 0) { 1356 if (*p == 0 && mp_protocol_compress) {
1352 ++p; 1357 ++p;
1353 --len; 1358 --len;
1354 } 1359 }
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
index 0a66fed52e8e..16c62659cdd9 100644
--- a/drivers/net/skfp/skfddi.c
+++ b/drivers/net/skfp/skfddi.c
@@ -412,7 +412,7 @@ static int skfp_driver_init(struct net_device *dev)
412 bp->SharedMemAddr = pci_alloc_consistent(&bp->pdev, 412 bp->SharedMemAddr = pci_alloc_consistent(&bp->pdev,
413 bp->SharedMemSize, 413 bp->SharedMemSize,
414 &bp->SharedMemDMA); 414 &bp->SharedMemDMA);
415 if (!bp->SharedMemSize) { 415 if (!bp->SharedMemAddr) {
416 printk("could not allocate mem for "); 416 printk("could not allocate mem for ");
417 printk("hardware module: %ld byte\n", 417 printk("hardware module: %ld byte\n",
418 bp->SharedMemSize); 418 bp->SharedMemSize);
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index 4adf12422787..a4f2bd52e546 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -148,7 +148,7 @@ static int full_duplex[MAX_UNITS] = {0, };
148 * This SUCKS. 148 * This SUCKS.
149 * We need a much better method to determine if dma_addr_t is 64-bit. 149 * We need a much better method to determine if dma_addr_t is 64-bit.
150 */ 150 */
151#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) || (defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT)) 151#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || (defined(CONFIG_MIPS) && ((defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) || defined(CONFIG_64BIT))) || (defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT))
152/* 64-bit dma_addr_t */ 152/* 64-bit dma_addr_t */
153#define ADDR_64BITS /* This chip uses 64 bit addresses. */ 153#define ADDR_64BITS /* This chip uses 64 bit addresses. */
154#define netdrv_addr_t __le64 154#define netdrv_addr_t __le64
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index e3d80c9fb86f..7841a8f69998 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -12694,7 +12694,7 @@ static void __devinit tg3_read_vpd(struct tg3 *tp)
12694 cnt = pci_read_vpd(tp->pdev, pos, 12694 cnt = pci_read_vpd(tp->pdev, pos,
12695 TG3_NVM_VPD_LEN - pos, 12695 TG3_NVM_VPD_LEN - pos,
12696 &vpd_data[pos]); 12696 &vpd_data[pos]);
12697 if (cnt == -ETIMEDOUT || -EINTR) 12697 if (cnt == -ETIMEDOUT || cnt == -EINTR)
12698 cnt = 0; 12698 cnt = 0;
12699 else if (cnt < 0) 12699 else if (cnt < 0)
12700 goto out_not_found; 12700 goto out_not_found;
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index 44447f54942f..99ac70e32556 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -2206,8 +2206,11 @@ static int uea_boot(struct uea_softc *sc)
2206 goto err1; 2206 goto err1;
2207 } 2207 }
2208 2208
2209 sc->kthread = kthread_run(uea_kthread, sc, "ueagle-atm"); 2209 /* Create worker thread, but don't start it here. Start it after
2210 if (sc->kthread == ERR_PTR(-ENOMEM)) { 2210 * all usbatm generic initialization is done.
2211 */
2212 sc->kthread = kthread_create(uea_kthread, sc, "ueagle-atm");
2213 if (IS_ERR(sc->kthread)) {
2211 uea_err(INS_TO_USBDEV(sc), "failed to create thread\n"); 2214 uea_err(INS_TO_USBDEV(sc), "failed to create thread\n");
2212 goto err2; 2215 goto err2;
2213 } 2216 }
@@ -2624,6 +2627,7 @@ static struct usbatm_driver uea_usbatm_driver = {
2624static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id) 2627static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id)
2625{ 2628{
2626 struct usb_device *usb = interface_to_usbdev(intf); 2629 struct usb_device *usb = interface_to_usbdev(intf);
2630 int ret;
2627 2631
2628 uea_enters(usb); 2632 uea_enters(usb);
2629 uea_info(usb, "ADSL device founded vid (%#X) pid (%#X) Rev (%#X): %s\n", 2633 uea_info(usb, "ADSL device founded vid (%#X) pid (%#X) Rev (%#X): %s\n",
@@ -2637,7 +2641,19 @@ static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id)
2637 if (UEA_IS_PREFIRM(id)) 2641 if (UEA_IS_PREFIRM(id))
2638 return uea_load_firmware(usb, UEA_CHIP_VERSION(id)); 2642 return uea_load_firmware(usb, UEA_CHIP_VERSION(id));
2639 2643
2640 return usbatm_usb_probe(intf, id, &uea_usbatm_driver); 2644 ret = usbatm_usb_probe(intf, id, &uea_usbatm_driver);
2645 if (ret == 0) {
2646 struct usbatm_data *usbatm = usb_get_intfdata(intf);
2647 struct uea_softc *sc = usbatm->driver_data;
2648
2649 /* Ensure carrier is initialized to off as early as possible */
2650 UPDATE_ATM_SIGNAL(ATM_PHY_SIG_LOST);
2651
2652 /* Only start the worker thread when all init is done */
2653 wake_up_process(sc->kthread);
2654 }
2655
2656 return ret;
2641} 2657}
2642 2658
2643static void uea_disconnect(struct usb_interface *intf) 2659static void uea_disconnect(struct usb_interface *intf)