Browse Source

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

Pull staging driver fixes from Greg KH:
 "Here are some tiny staging driver and documentation fixes for 4.3-rc3.

  All of these resolve reported issues that people have found and have
  been in the linux-next tree for a while with no problems"

* tag 'staging-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  MAINTAINERS: Update email address for Martyn Welch
  staging: ion: fix corruption of ion_import_dma_buf
  staging: dgap: Remove myself from the MAINTAINERS file
  staging: most: Add dependency to HAS_IOMEM
  staging: unisys: remove reference of visorutil
  staging: unisys: visornic: handle error return from device registration
  staging: unisys: stop device registration before visorbus registration
  staging: unisys: visorbus: Unregister driver on error
  staging: unisys: visornic: Fix receive bytes statistics
  staging: unisys: unregister netdev when create debugfs fails
  staging: fbtft: replace master->setup() with spi_setup()
  staging: fbtft: fix 9-bit SPI support detection
  staging/lustre: change Lustre URLs and mailing list
  staging/android: Update ION TODO per LPC discussion
  Staging: most: MOST and MOSTCORE should depend on HAS_DMA
  staging: most: fix HDM_USB dependencies and build errors
Linus Torvalds 10 years ago
parent
commit
b11e7b81bf

+ 3 - 4
MAINTAINERS

@@ -3401,7 +3401,6 @@ F:	drivers/staging/dgnc/
 
 
 DIGI EPCA PCI PRODUCTS
 DIGI EPCA PCI PRODUCTS
 M:	Lidza Louina <lidza.louina@gmail.com>
 M:	Lidza Louina <lidza.louina@gmail.com>
-M:	Mark Hounschell <markh@compro.net>
 M:	Daeseok Youn <daeseok.youn@gmail.com>
 M:	Daeseok Youn <daeseok.youn@gmail.com>
 L:	driverdev-devel@linuxdriverproject.org
 L:	driverdev-devel@linuxdriverproject.org
 S:	Maintained
 S:	Maintained
@@ -9910,8 +9909,8 @@ F:	drivers/staging/media/lirc/
 STAGING - LUSTRE PARALLEL FILESYSTEM
 STAGING - LUSTRE PARALLEL FILESYSTEM
 M:	Oleg Drokin <oleg.drokin@intel.com>
 M:	Oleg Drokin <oleg.drokin@intel.com>
 M:	Andreas Dilger <andreas.dilger@intel.com>
 M:	Andreas Dilger <andreas.dilger@intel.com>
-L:	HPDD-discuss@lists.01.org (moderated for non-subscribers)
-W:	http://lustre.opensfs.org/
+L:	lustre-devel@lists.lustre.org (moderated for non-subscribers)
+W:	http://wiki.lustre.org/
 S:	Maintained
 S:	Maintained
 F:	drivers/staging/lustre
 F:	drivers/staging/lustre
 
 
@@ -11203,7 +11202,7 @@ F:	drivers/vlynq/vlynq.c
 F:	include/linux/vlynq.h
 F:	include/linux/vlynq.h
 
 
 VME SUBSYSTEM
 VME SUBSYSTEM
-M:	Martyn Welch <martyn.welch@ge.com>
+M:	Martyn Welch <martyn@welchs.me.uk>
 M:	Manohar Vanga <manohar.vanga@gmail.com>
 M:	Manohar Vanga <manohar.vanga@gmail.com>
 M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 L:	devel@driverdev.osuosl.org
 L:	devel@driverdev.osuosl.org

+ 20 - 0
drivers/staging/android/TODO

@@ -5,5 +5,25 @@ TODO:
 	- add proper arch dependencies as needed
 	- add proper arch dependencies as needed
 	- audit userspace interfaces to make sure they are sane
 	- audit userspace interfaces to make sure they are sane
 
 
+
+ion/
+ - Remove ION_IOC_SYNC: Flushing for devices should be purely a kernel internal
+   interface on top of dma-buf. flush_for_device needs to be added to dma-buf
+   first.
+ - Remove ION_IOC_CUSTOM: Atm used for cache flushing for cpu access in some
+   vendor trees. Should be replaced with an ioctl on the dma-buf to expose the
+   begin/end_cpu_access hooks to userspace.
+ - Clarify the tricks ion plays with explicitly managing coherency behind the
+   dma api's back (this is absolutely needed for high-perf gpu drivers): Add an
+   explicit coherency management mode to flush_for_device to be used by drivers
+   which want to manage caches themselves and which indicates whether cpu caches
+   need flushing.
+ - With those removed there's probably no use for ION_IOC_IMPORT anymore either
+   since ion would just be the central allocator for shared buffers.
+ - Add dt-binding to expose cma regions as ion heaps, with the rule that any
+   such cma regions must already be used by some device for dma. I.e. ion only
+   exposes existing cma regions and doesn't reserve unecessarily memory when
+   booting a system which doesn't use ion.
+
 Please send patches to Greg Kroah-Hartman <greg@kroah.com> and Cc:
 Please send patches to Greg Kroah-Hartman <greg@kroah.com> and Cc:
 Arve Hjønnevåg <arve@android.com> and Riley Andrews <riandrews@android.com>
 Arve Hjønnevåg <arve@android.com> and Riley Andrews <riandrews@android.com>

+ 3 - 3
drivers/staging/android/ion/ion.c

@@ -1179,13 +1179,13 @@ struct ion_handle *ion_import_dma_buf(struct ion_client *client, int fd)
 		mutex_unlock(&client->lock);
 		mutex_unlock(&client->lock);
 		goto end;
 		goto end;
 	}
 	}
-	mutex_unlock(&client->lock);
 
 
 	handle = ion_handle_create(client, buffer);
 	handle = ion_handle_create(client, buffer);
-	if (IS_ERR(handle))
+	if (IS_ERR(handle)) {
+		mutex_unlock(&client->lock);
 		goto end;
 		goto end;
+	}
 
 
-	mutex_lock(&client->lock);
 	ret = ion_handle_add(client, handle);
 	ret = ion_handle_add(client, handle);
 	mutex_unlock(&client->lock);
 	mutex_unlock(&client->lock);
 	if (ret) {
 	if (ret) {

+ 1 - 1
drivers/staging/fbtft/fb_uc1611.c

@@ -76,7 +76,7 @@ static int init_display(struct fbtft_par *par)
 
 
 	/* Set CS active high */
 	/* Set CS active high */
 	par->spi->mode |= SPI_CS_HIGH;
 	par->spi->mode |= SPI_CS_HIGH;
-	ret = par->spi->master->setup(par->spi);
+	ret = spi_setup(par->spi);
 	if (ret) {
 	if (ret) {
 		dev_err(par->info->device, "Could not set SPI_CS_HIGH\n");
 		dev_err(par->info->device, "Could not set SPI_CS_HIGH\n");
 		return ret;
 		return ret;

+ 2 - 2
drivers/staging/fbtft/fb_watterott.c

@@ -169,7 +169,7 @@ static int init_display(struct fbtft_par *par)
 	/* enable SPI interface by having CS and MOSI low during reset */
 	/* enable SPI interface by having CS and MOSI low during reset */
 	save_mode = par->spi->mode;
 	save_mode = par->spi->mode;
 	par->spi->mode |= SPI_CS_HIGH;
 	par->spi->mode |= SPI_CS_HIGH;
-	ret = par->spi->master->setup(par->spi); /* set CS inactive low */
+	ret = spi_setup(par->spi); /* set CS inactive low */
 	if (ret) {
 	if (ret) {
 		dev_err(par->info->device, "Could not set SPI_CS_HIGH\n");
 		dev_err(par->info->device, "Could not set SPI_CS_HIGH\n");
 		return ret;
 		return ret;
@@ -180,7 +180,7 @@ static int init_display(struct fbtft_par *par)
 	par->fbtftops.reset(par);
 	par->fbtftops.reset(par);
 	mdelay(1000);
 	mdelay(1000);
 	par->spi->mode = save_mode;
 	par->spi->mode = save_mode;
-	ret = par->spi->master->setup(par->spi);
+	ret = spi_setup(par->spi);
 	if (ret) {
 	if (ret) {
 		dev_err(par->info->device, "Could not restore SPI mode\n");
 		dev_err(par->info->device, "Could not restore SPI mode\n");
 		return ret;
 		return ret;

+ 3 - 7
drivers/staging/fbtft/fbtft-core.c

@@ -1436,15 +1436,11 @@ int fbtft_probe_common(struct fbtft_display *display,
 
 
 	/* 9-bit SPI setup */
 	/* 9-bit SPI setup */
 	if (par->spi && display->buswidth == 9) {
 	if (par->spi && display->buswidth == 9) {
-		par->spi->bits_per_word = 9;
-		ret = par->spi->master->setup(par->spi);
-		if (ret) {
+		if (par->spi->master->bits_per_word_mask & SPI_BPW_MASK(9)) {
+			par->spi->bits_per_word = 9;
+		} else {
 			dev_warn(&par->spi->dev,
 			dev_warn(&par->spi->dev,
 				"9-bit SPI not available, emulating using 8-bit.\n");
 				"9-bit SPI not available, emulating using 8-bit.\n");
-			par->spi->bits_per_word = 8;
-			ret = par->spi->master->setup(par->spi);
-			if (ret)
-				goto out_release;
 			/* allocate buffer with room for dc bits */
 			/* allocate buffer with room for dc bits */
 			par->extra = devm_kzalloc(par->info->device,
 			par->extra = devm_kzalloc(par->info->device,
 				par->txbuf.len + (par->txbuf.len / 8) + 8,
 				par->txbuf.len + (par->txbuf.len / 8) + 8,

+ 4 - 7
drivers/staging/fbtft/flexfb.c

@@ -463,15 +463,12 @@ static int flexfb_probe_common(struct spi_device *sdev,
 			}
 			}
 			par->fbtftops.write_register = fbtft_write_reg8_bus9;
 			par->fbtftops.write_register = fbtft_write_reg8_bus9;
 			par->fbtftops.write_vmem = fbtft_write_vmem16_bus9;
 			par->fbtftops.write_vmem = fbtft_write_vmem16_bus9;
-			sdev->bits_per_word = 9;
-			ret = sdev->master->setup(sdev);
-			if (ret) {
+			if (par->spi->master->bits_per_word_mask
+			    & SPI_BPW_MASK(9)) {
+				par->spi->bits_per_word = 9;
+			} else {
 				dev_warn(dev,
 				dev_warn(dev,
 					"9-bit SPI not available, emulating using 8-bit.\n");
 					"9-bit SPI not available, emulating using 8-bit.\n");
-				sdev->bits_per_word = 8;
-				ret = sdev->master->setup(sdev);
-				if (ret)
-					goto out_release;
 				/* allocate buffer with room for dc bits */
 				/* allocate buffer with room for dc bits */
 				par->extra = devm_kzalloc(par->info->device,
 				par->extra = devm_kzalloc(par->info->device,
 						par->txbuf.len + (par->txbuf.len / 8) + 8,
 						par->txbuf.len + (par->txbuf.len / 8) + 8,

+ 6 - 10
drivers/staging/lustre/README.txt

@@ -14,10 +14,8 @@ Unlike shared disk storage cluster filesystems (e.g. OCFS2, GFS, GPFS),
 Lustre has independent Metadata and Data servers that clients can access
 Lustre has independent Metadata and Data servers that clients can access
 in parallel to maximize performance.
 in parallel to maximize performance.
 
 
-In order to use Lustre client you will need to download lustre client
-tools from
-https://downloads.hpdd.intel.com/public/lustre/latest-feature-release/
-the package name is lustre-client.
+In order to use Lustre client you will need to download the "lustre-client"
+package that contains the userspace tools from http://lustre.org/download/
 
 
 You will need to install and configure your Lustre servers separately.
 You will need to install and configure your Lustre servers separately.
 
 
@@ -76,12 +74,10 @@ Mount Options
 
 
 More Information
 More Information
 ================
 ================
-You can get more information at
-OpenSFS website: http://lustre.opensfs.org/about/
-Intel HPDD wiki: https://wiki.hpdd.intel.com
+You can get more information at the Lustre website: http://wiki.lustre.org/
 
 
-Out of tree Lustre client and server code is available at:
-http://git.whamcloud.com/fs/lustre-release.git
+Source for the userspace tools and out-of-tree client and server code
+is available at: http://git.hpdd.intel.com/fs/lustre-release.git
 
 
 Latest binary packages:
 Latest binary packages:
-http://lustre.opensfs.org/download-lustre/
+http://lustre.org/download/

+ 1 - 0
drivers/staging/most/Kconfig

@@ -1,5 +1,6 @@
 menuconfig MOST
 menuconfig MOST
         tristate "MOST driver"
         tristate "MOST driver"
+	depends on HAS_DMA
         select MOSTCORE
         select MOSTCORE
         default n
         default n
         ---help---
         ---help---

+ 1 - 0
drivers/staging/most/hdm-dim2/Kconfig

@@ -5,6 +5,7 @@
 config HDM_DIM2
 config HDM_DIM2
 	tristate "DIM2 HDM"
 	tristate "DIM2 HDM"
 	depends on AIM_NETWORK
 	depends on AIM_NETWORK
+	depends on HAS_IOMEM
 
 
 	---help---
 	---help---
 	  Say Y here if you want to connect via MediaLB to network transceiver.
 	  Say Y here if you want to connect via MediaLB to network transceiver.

+ 1 - 1
drivers/staging/most/hdm-usb/Kconfig

@@ -4,7 +4,7 @@
 
 
 config HDM_USB
 config HDM_USB
 	tristate "USB HDM"
 	tristate "USB HDM"
-	depends on USB
+	depends on USB && NET
 	select AIM_NETWORK
 	select AIM_NETWORK
 	---help---
 	---help---
 	  Say Y here if you want to connect via USB to network tranceiver.
 	  Say Y here if you want to connect via USB to network tranceiver.

+ 1 - 0
drivers/staging/most/mostcore/Kconfig

@@ -4,6 +4,7 @@
 
 
 config MOSTCORE
 config MOSTCORE
 	tristate "MOST Core"
 	tristate "MOST Core"
+	depends on HAS_DMA
 
 
 	---help---
 	---help---
 	  Say Y here if you want to enable MOST support.
 	  Say Y here if you want to enable MOST support.

+ 0 - 1
drivers/staging/unisys/visorbus/Makefile

@@ -10,4 +10,3 @@ visorbus-y += visorchipset.o
 visorbus-y += periodic_work.o
 visorbus-y += periodic_work.o
 
 
 ccflags-y += -Idrivers/staging/unisys/include
 ccflags-y += -Idrivers/staging/unisys/include
-ccflags-y += -Idrivers/staging/unisys/visorutil

+ 9 - 4
drivers/staging/unisys/visorbus/visorbus_main.c

@@ -37,6 +37,8 @@ static int visorbus_debugref;
 #define POLLJIFFIES_TESTWORK         100
 #define POLLJIFFIES_TESTWORK         100
 #define POLLJIFFIES_NORMALCHANNEL     10
 #define POLLJIFFIES_NORMALCHANNEL     10
 
 
+static int busreg_rc = -ENODEV; /* stores the result from bus registration */
+
 static int visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env);
 static int visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env);
 static int visorbus_match(struct device *xdev, struct device_driver *xdrv);
 static int visorbus_match(struct device *xdev, struct device_driver *xdrv);
 static void fix_vbus_dev_info(struct visor_device *visordev);
 static void fix_vbus_dev_info(struct visor_device *visordev);
@@ -863,6 +865,9 @@ int visorbus_register_visor_driver(struct visor_driver *drv)
 {
 {
 	int rc = 0;
 	int rc = 0;
 
 
+	if (busreg_rc < 0)
+		return -ENODEV; /*can't register on a nonexistent bus*/
+
 	drv->driver.name = drv->name;
 	drv->driver.name = drv->name;
 	drv->driver.bus = &visorbus_type;
 	drv->driver.bus = &visorbus_type;
 	drv->driver.probe = visordriver_probe_device;
 	drv->driver.probe = visordriver_probe_device;
@@ -885,6 +890,8 @@ int visorbus_register_visor_driver(struct visor_driver *drv)
 	if (rc < 0)
 	if (rc < 0)
 		return rc;
 		return rc;
 	rc = register_driver_attributes(drv);
 	rc = register_driver_attributes(drv);
+	if (rc < 0)
+		driver_unregister(&drv->driver);
 	return rc;
 	return rc;
 }
 }
 EXPORT_SYMBOL_GPL(visorbus_register_visor_driver);
 EXPORT_SYMBOL_GPL(visorbus_register_visor_driver);
@@ -1260,10 +1267,8 @@ remove_bus_instance(struct visor_device *dev)
 static int
 static int
 create_bus_type(void)
 create_bus_type(void)
 {
 {
-	int rc = 0;
-
-	rc = bus_register(&visorbus_type);
-	return rc;
+	busreg_rc = bus_register(&visorbus_type);
+	return busreg_rc;
 }
 }
 
 
 /** Remove the one-and-only one instance of the visor bus type (visorbus_type).
 /** Remove the one-and-only one instance of the visor bus type (visorbus_type).

+ 11 - 7
drivers/staging/unisys/visornic/visornic_main.c

@@ -1189,16 +1189,16 @@ visornic_rx(struct uiscmdrsp *cmdrsp)
 	spin_lock_irqsave(&devdata->priv_lock, flags);
 	spin_lock_irqsave(&devdata->priv_lock, flags);
 	atomic_dec(&devdata->num_rcvbuf_in_iovm);
 	atomic_dec(&devdata->num_rcvbuf_in_iovm);
 
 
-	/* update rcv stats - call it with priv_lock held */
-	devdata->net_stats.rx_packets++;
-	devdata->net_stats.rx_bytes = skb->len;
-
 	/* set length to how much was ACTUALLY received -
 	/* set length to how much was ACTUALLY received -
 	 * NOTE: rcv_done_len includes actual length of data rcvd
 	 * NOTE: rcv_done_len includes actual length of data rcvd
 	 * including ethhdr
 	 * including ethhdr
 	 */
 	 */
 	skb->len = cmdrsp->net.rcv.rcv_done_len;
 	skb->len = cmdrsp->net.rcv.rcv_done_len;
 
 
+	/* update rcv stats - call it with priv_lock held */
+	devdata->net_stats.rx_packets++;
+	devdata->net_stats.rx_bytes += skb->len;
+
 	/* test enabled while holding lock */
 	/* test enabled while holding lock */
 	if (!(devdata->enabled && devdata->enab_dis_acked)) {
 	if (!(devdata->enabled && devdata->enab_dis_acked)) {
 		/* don't process it unless we're in enable mode and until
 		/* don't process it unless we're in enable mode and until
@@ -1924,13 +1924,16 @@ static int visornic_probe(struct visor_device *dev)
 			"%s debugfs_create_dir %s failed\n",
 			"%s debugfs_create_dir %s failed\n",
 			__func__, netdev->name);
 			__func__, netdev->name);
 		err = -ENOMEM;
 		err = -ENOMEM;
-		goto cleanup_xmit_cmdrsp;
+		goto cleanup_register_netdev;
 	}
 	}
 
 
 	dev_info(&dev->device, "%s success netdev=%s\n",
 	dev_info(&dev->device, "%s success netdev=%s\n",
 		 __func__, netdev->name);
 		 __func__, netdev->name);
 	return 0;
 	return 0;
 
 
+cleanup_register_netdev:
+	unregister_netdev(netdev);
+
 cleanup_napi_add:
 cleanup_napi_add:
 	del_timer_sync(&devdata->irq_poll_timer);
 	del_timer_sync(&devdata->irq_poll_timer);
 	netif_napi_del(&devdata->napi);
 	netif_napi_del(&devdata->napi);
@@ -2128,8 +2131,9 @@ static int visornic_init(void)
 	if (!dev_num_pool)
 	if (!dev_num_pool)
 		goto cleanup_workqueue;
 		goto cleanup_workqueue;
 
 
-	visorbus_register_visor_driver(&visornic_driver);
-	return 0;
+	err = visorbus_register_visor_driver(&visornic_driver);
+	if (!err)
+		return 0;
 
 
 cleanup_workqueue:
 cleanup_workqueue:
 	if (visornic_timeout_reset_workqueue) {
 	if (visornic_timeout_reset_workqueue) {