Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'staging-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg KH:
"Here are some small staging driver fixes for issues that have been
reported in 5.10-rc1:

- octeon driver fixes

- wfx driver fixes

- memory leak fix in vchiq driver

- fieldbus driver bugfix

- comedi driver bugfix

All of these have been in linux-next with no reported issues"

* tag 'staging-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: fieldbus: anybuss: jump to correct label in an error path
staging: wfx: fix test on return value of gpiod_get_value()
staging: wfx: fix use of uninitialized pointer
staging: mmal-vchiq: Fix memory leak for vchiq_instance
staging: comedi: cb_pcidas: Allow 2-channel commands for AO subdevice
staging: octeon: Drop on uncorrectable alignment or FCS error
staging: octeon: repair "fixed-link" support

+49 -30
+1
drivers/staging/comedi/drivers/cb_pcidas.c
··· 1342 1342 if (dev->irq && board->has_ao_fifo) { 1343 1343 dev->write_subdev = s; 1344 1344 s->subdev_flags |= SDF_CMD_WRITE; 1345 + s->len_chanlist = s->n_chan; 1345 1346 s->do_cmdtest = cb_pcidas_ao_cmdtest; 1346 1347 s->do_cmd = cb_pcidas_ao_cmd; 1347 1348 s->cancel = cb_pcidas_ao_cancel;
+1 -1
drivers/staging/fieldbus/anybuss/arcx-anybus.c
··· 293 293 regulator = devm_regulator_register(dev, &can_power_desc, &config); 294 294 if (IS_ERR(regulator)) { 295 295 err = PTR_ERR(regulator); 296 - goto out_reset; 296 + goto out_ida; 297 297 } 298 298 /* make controller info visible to userspace */ 299 299 cd->class_dev = kzalloc(sizeof(*cd->class_dev), GFP_KERNEL);
-6
drivers/staging/octeon/ethernet-mdio.c
··· 147 147 148 148 phy_node = of_parse_phandle(priv->of_node, "phy-handle", 0); 149 149 if (!phy_node && of_phy_is_fixed_link(priv->of_node)) { 150 - int rc; 151 - 152 - rc = of_phy_register_fixed_link(priv->of_node); 153 - if (rc) 154 - return rc; 155 - 156 150 phy_node = of_node_get(priv->of_node); 157 151 } 158 152 if (!phy_node)
+19 -15
drivers/staging/octeon/ethernet-rx.c
··· 69 69 else 70 70 port = work->word1.cn38xx.ipprt; 71 71 72 - if ((work->word2.snoip.err_code == 10) && (work->word1.len <= 64)) { 72 + if ((work->word2.snoip.err_code == 10) && (work->word1.len <= 64)) 73 73 /* 74 74 * Ignore length errors on min size packets. Some 75 75 * equipment incorrectly pads packets to 64+4FCS 76 76 * instead of 60+4FCS. Note these packets still get 77 77 * counted as frame errors. 78 78 */ 79 - } else if (work->word2.snoip.err_code == 5 || 80 - work->word2.snoip.err_code == 7) { 79 + return 0; 80 + 81 + if (work->word2.snoip.err_code == 5 || 82 + work->word2.snoip.err_code == 7) { 81 83 /* 82 84 * We received a packet with either an alignment error 83 85 * or a FCS error. This may be signalling that we are ··· 110 108 /* Port received 0xd5 preamble */ 111 109 work->packet_ptr.s.addr += i + 1; 112 110 work->word1.len -= i + 5; 113 - } else if ((*ptr & 0xf) == 0xd) { 111 + return 0; 112 + } 113 + 114 + if ((*ptr & 0xf) == 0xd) { 114 115 /* Port received 0xd preamble */ 115 116 work->packet_ptr.s.addr += i; 116 117 work->word1.len -= i + 4; ··· 123 118 ((*(ptr + 1) & 0xf) << 4); 124 119 ptr++; 125 120 } 126 - } else { 127 - printk_ratelimited("Port %d unknown preamble, packet dropped\n", 128 - port); 129 - cvm_oct_free_work(work); 130 - return 1; 121 + return 0; 131 122 } 123 + 124 + printk_ratelimited("Port %d unknown preamble, packet dropped\n", 125 + port); 126 + cvm_oct_free_work(work); 127 + return 1; 132 128 } 133 - } else { 134 - printk_ratelimited("Port %d receive error code %d, packet dropped\n", 135 - port, work->word2.snoip.err_code); 136 - cvm_oct_free_work(work); 137 - return 1; 138 129 } 139 130 140 - return 0; 131 + printk_ratelimited("Port %d receive error code %d, packet dropped\n", 132 + port, work->word2.snoip.err_code); 133 + cvm_oct_free_work(work); 134 + return 1; 141 135 } 142 136 143 137 static void copy_segments_to_skb(struct cvmx_wqe *work, struct sk_buff *skb)
+9
drivers/staging/octeon/ethernet.c
··· 13 13 #include <linux/phy.h> 14 14 #include <linux/slab.h> 15 15 #include <linux/interrupt.h> 16 + #include <linux/of_mdio.h> 16 17 #include <linux/of_net.h> 17 18 #include <linux/if_ether.h> 18 19 #include <linux/if_vlan.h> ··· 891 890 cvm_set_rgmii_delay(priv, interface, 892 891 port_index); 893 892 break; 893 + } 894 + 895 + if (priv->of_node && of_phy_is_fixed_link(priv->of_node)) { 896 + if (of_phy_register_fixed_link(priv->of_node)) { 897 + netdev_err(dev, "Failed to register fixed link for interface %d, port %d\n", 898 + interface, priv->port); 899 + dev->netdev_ops = NULL; 900 + } 894 901 } 895 902 896 903 if (!dev->netdev_ops) {
+15 -4
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
··· 179 179 180 180 /* ordered workqueue to process all bulk operations */ 181 181 struct workqueue_struct *bulk_wq; 182 + 183 + /* handle for a vchiq instance */ 184 + struct vchiq_instance *vchiq_instance; 182 185 }; 183 186 184 187 static struct mmal_msg_context * ··· 1843 1840 1844 1841 mutex_unlock(&instance->vchiq_mutex); 1845 1842 1843 + vchiq_shutdown(instance->vchiq_instance); 1846 1844 flush_workqueue(instance->bulk_wq); 1847 1845 destroy_workqueue(instance->bulk_wq); 1848 1846 ··· 1860 1856 int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance) 1861 1857 { 1862 1858 int status; 1859 + int err = -ENODEV; 1863 1860 struct vchiq_mmal_instance *instance; 1864 1861 static struct vchiq_instance *vchiq_instance; 1865 1862 struct vchiq_service_params_kernel params = { ··· 1895 1890 status = vchiq_connect(vchiq_instance); 1896 1891 if (status) { 1897 1892 pr_err("Failed to connect VCHI instance (status=%d)\n", status); 1898 - return -EIO; 1893 + err = -EIO; 1894 + goto err_shutdown_vchiq; 1899 1895 } 1900 1896 1901 1897 instance = kzalloc(sizeof(*instance), GFP_KERNEL); 1902 1898 1903 - if (!instance) 1904 - return -ENOMEM; 1899 + if (!instance) { 1900 + err = -ENOMEM; 1901 + goto err_shutdown_vchiq; 1902 + } 1905 1903 1906 1904 mutex_init(&instance->vchiq_mutex); 1907 1905 1908 1906 instance->bulk_scratch = vmalloc(PAGE_SIZE); 1907 + instance->vchiq_instance = vchiq_instance; 1909 1908 1910 1909 mutex_init(&instance->context_map_lock); 1911 1910 idr_init_base(&instance->context_map, 1); ··· 1941 1932 err_free: 1942 1933 vfree(instance->bulk_scratch); 1943 1934 kfree(instance); 1944 - return -ENODEV; 1935 + err_shutdown_vchiq: 1936 + vchiq_shutdown(vchiq_instance); 1937 + return err; 1945 1938 } 1946 1939 EXPORT_SYMBOL_GPL(vchiq_mmal_init); 1947 1940
+1 -1
drivers/staging/wfx/bh.c
··· 21 21 22 22 if (!wdev->pdata.gpio_wakeup) 23 23 return; 24 - if (gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup) >= 0) 24 + if (gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup) > 0) 25 25 return; 26 26 27 27 if (wfx_api_older_than(wdev, 1, 4)) {
+3 -3
drivers/staging/wfx/data_tx.c
··· 31 31 } 32 32 return rate->idx + 14; 33 33 } 34 + // WFx only support 2GHz, else band information should be retrieved 35 + // from ieee80211_tx_info 36 + band = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]; 34 37 if (rate->idx >= band->n_bitrates) { 35 38 WARN(1, "wrong rate->idx value: %d", rate->idx); 36 39 return -1; 37 40 } 38 - // WFx only support 2GHz, else band information should be retrieved 39 - // from ieee80211_tx_info 40 - band = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]; 41 41 return band->bitrates[rate->idx].hw_value; 42 42 } 43 43