Re: [PATCH] usb-storage: stop using block layer bounce buffers

2018-05-02 Thread Christoph Hellwig
On Fri, Apr 27, 2018 at 10:09:17AM -0400, Alan Stern wrote: > On Fri, 27 Apr 2018, Christoph Hellwig wrote: > > > On Sun, Apr 15, 2018 at 11:24:11AM -0400, Alan Stern wrote: > > > On Sun, 15 Apr 2018, Christoph Hellwig wrote: > > > > > > > USB host cont

Re: [PATCH] usb-storage: stop using block layer bounce buffers

2018-04-26 Thread Christoph Hellwig
On Sun, Apr 15, 2018 at 11:24:11AM -0400, Alan Stern wrote: > On Sun, 15 Apr 2018, Christoph Hellwig wrote: > > > USB host controllers now must handle highmem, so we can get rid of bounce > > buffering highmem pages in the block layer. > > Sorry, I don't quite understand

[PATCH] usb-storage: stop using block layer bounce buffers

2018-04-15 Thread Christoph Hellwig
USB host controllers now must handle highmem, so we can get rid of bounce buffering highmem pages in the block layer. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/storage/scsiglue.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/usb/storage/scsigl

Re: [GIT PULL] USB/PHY driver patches for 4.17-rc1

2018-04-05 Thread Christoph Hellwig
On Thu, Apr 05, 2018 at 09:19:28AM +0200, Lars-Peter Clausen wrote: > On 04/05/2018 08:31 AM, Kees Cook wrote: > > On Wed, Apr 4, 2018 at 3:31 AM, Greg KH wrote: > >> Lars-Peter Clausen (2): > >> usb: gadget: ffs: Execute copy_to_user() with USER_DS set > > > >

Re: [PATCH v2 0/5] Allow compile-testing NO_DMA (core)

2018-03-16 Thread Christoph Hellwig
Thanks Geert, applied to the dma-mapping tree for 4.17. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 00/16] remove eight obsolete architectures

2018-03-15 Thread Christoph Hellwig
On Thu, Mar 15, 2018 at 11:42:25AM +0100, Arnd Bergmann wrote: > Is anyone producing a chip that includes enough of the Privileged ISA spec > to have things like system calls, but not the MMU parts? Various SiFive SOCs seem to support M and U mode, but no S mode or iommu. That should be enough

Re: WARN_ON(irqs_disabled()) in dma_free_attrs?

2018-03-15 Thread Christoph Hellwig
On Wed, Mar 14, 2018 at 05:43:46PM +, Robin Murphy wrote: >> Looking back I don't really understand why we even indirect the "classic" >> per-device dma_declare_coherent_memory use case through the DMA API. > > It certainly makes sense for devices which can exist in both shared-memory > and

Re: WARN_ON(irqs_disabled()) in dma_free_attrs?

2018-03-13 Thread Christoph Hellwig
On Tue, Mar 13, 2018 at 12:11:49PM +, Robin Murphy wrote: > Taking a step back, though, provided the original rationale about > dma_declare_coherent_memory() is still valid, I wonder if we should simply > permit the USB code to call dma_{alloc,free}_from_dev_coherent() directly > here

Re: WARN_ON(irqs_disabled()) in dma_free_attrs?

2018-03-05 Thread Christoph Hellwig
On Sat, Mar 03, 2018 at 07:19:06PM +0100, Fredrik Noring wrote: > Christoph, Alan, > > > If it is allocating / freeing this memory all the time in the hot path > > it should really use a dma pool (see include/ilinux/dmapool.h). > > The dma coherent APIs aren't really built for being called in the

Re: [PATCH v2 02/15] usb: gadget: make config_item_type structures const

2017-10-19 Thread Christoph Hellwig
> > Now we have 9 const instances of the config_item_type structure that are > identical, with only the .ct_owner field set. Should they be all merged into > a > single structure ? I think that's a good idea. But I'm about to slurp up this whole series into my tree, how about making that an

Re: [PATCH v3] dma-mapping: skip USB devices when configuring DMA during probe

2017-08-05 Thread Christoph Hellwig
I think the root problem is that the code added by " of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices" is completely bogus and needs to be reverted. We can't simply iterate over all devices in the system and set up dma for them. We'll need to ask the firmware /

Re: CPU lock-ups with 4.12.0+ kernels related to usb_storage

2017-07-26 Thread Christoph Hellwig
On Thu, Jul 13, 2017 at 01:00:29PM -0400, Alan Stern wrote: > All right. In the meantime, changing usb-storage won't hurt. > Arthur, can you test the patch below? Do you plan to send this fix to Greg for 4.13-rc? -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body

Re: CPU lock-ups with 4.12.0+ kernels related to usb_storage

2017-07-12 Thread Christoph Hellwig
On Wed, Jul 12, 2017 at 12:10:02PM -0400, Alan Stern wrote: > This is pretty conclusive. The problem comes about because > usb_stor_control_thread() calls scsi_mq_done() while holding > shost->host_lock, and then scsi_eh_scmd_add() tries to acquire that > same lock. > > I don't know why this

Re: [REGRESSION] Failed network caused by: xhci: switch to pci_alloc_irq_vectors

2017-05-20 Thread Christoph Hellwig
On Sat, May 20, 2017 at 09:49:56AM -0700, Linus Torvalds wrote: > Side note: why is it doing that " > 1" check, when any value _other_ > than 1 is wrong? It's the same effect, so either one is fine with me. > Also, to match the non-MSI implementation, wouldn't it be nicer to > just write it that

Re: [REGRESSION] Failed network caused by: xhci: switch to pci_alloc_irq_vectors

2017-05-19 Thread Christoph Hellwig
On Fri, May 19, 2017 at 08:37:21AM -0400, Steven Rostedt wrote: > ktest config bisect ended with: > > *** > Found bad config: CONFIG_PCI_MSI > *** Oh, that's interesting. I think there's been a bug in the !CONFIG_PCI_MSI

Re: [PATCH v1] ACPI: Switch to use generic UUID API

2017-05-05 Thread Christoph Hellwig
On Fri, May 05, 2017 at 12:50:31PM +0300, Amir Goldstein wrote: > To complete the picture for folks not cc'ed on my patches, > xfs use case suggests there is also justification for the additional helpers: > > uuid_is_null() / uuid_equal() > guid_is_null() / guid_equal() The is_null is useful and

Re: [PATCH v1] ACPI: Switch to use generic UUID API

2017-05-05 Thread Christoph Hellwig
On Fri, May 05, 2017 at 10:06:06AM +0300, Amir Goldstein wrote: > I much rather that you sort out uuid helpers in a way that will > satisfy the filesystem > needs (just provide the helpers don't need to convert filesystems code). Yeah. > IMO, you should acknowledge that the common use case for

[PATCH] xhci: switch to pci_alloc_irq_vectors

2017-04-12 Thread Christoph Hellwig
Use the modern API to request MSI or MSI-X interrupts, which allows us to get rid of the msix_entries array, as well as cleaning up the cleanup code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/host/xhci.c | 99 ++--- drive

Re: [PATCH] fs: configfs: don't return anything from drop_link

2016-12-01 Thread Christoph Hellwig
Thanks a lot Andrzej! I've applied the patch, but I undid the reformatting of the nvmet code to keep the patch as simple as possible. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH] usb: gadget: uvc: fix returnvar.cocci warnings

2016-11-28 Thread Christoph Hellwig
On Wed, Nov 23, 2016 at 09:35:36AM +0100, Andrzej Pietrasiewicz wrote: > The ->drop_item() is indeed a void function, the ->drop_link() is > actually not. This, together with the fact that the value of ->drop_link() > is silently ignored suggests, that it is the ->drop_link() return > type that

Re: [PATCH] uas: Limit qdepth at the scsi-host level

2016-03-21 Thread Christoph Hellwig
On Sat, Mar 19, 2016 at 10:06:16AM -0700, James Bottomley wrote: > Help me understand this bug a bit more. Are you saying that the commit > you identify is causing the block layer to queue more commands than > you've set the per-lun limit to? In which case we have a serious > problem for more

Re: [PATCH] uas: Limit qdepth at the scsi-host level

2016-03-21 Thread Christoph Hellwig
> per slave to fix this. > > BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1315013 > Cc: sta...@vger.kernel.org # 4.4.x and 4.5.x > Signed-off-by: Hans de Goede <hdego...@redhat.com> Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from t

Re: [PATCH] usb: gadget: f_acm: Fix configfs attr name

2016-03-01 Thread Christoph Hellwig
On Tue, Mar 01, 2016 at 12:47:11PM +0100, Krzysztof Opasiak wrote: > Correct attribute name is port_num not num. > > Signed-off-by: Krzysztof Opasiak <k.opas...@samsung.com> > Fixes: ea6bd6b ("usb-gadget/f_acm: use per-attribute show and store methods") My fault, so

Re: [PATCH] configfs: switch ->default groups to a linked list

2016-02-28 Thread Christoph Hellwig
On Sun, Feb 28, 2016 at 12:58:42PM +0200, Sagi Grimberg wrote: >> -As a consequence of this, default_groups cannot be removed directly via >> +As a consequence of this, default groups cannot be removed directly via >> rmdir(2). They also are not considered when rmdir(2) on the parent >> group

[PATCH] configfs: switch ->default groups to a linked list

2016-02-26 Thread Christoph Hellwig
Replace the current NULL-terminated array of default groups with a linked list. This gets rid of lots of nasty code to size and/or dynamically allocate the array. While we're at it also provide a conveniant helper to remove the default groups. Signed-off-by: Christoph Hellwig <h...@lst

Re: [PATCH] Add support for usbfs zerocopy.

2016-01-05 Thread Christoph Hellwig
This is a completely broken usage of the mmap interface. if you use mmap on a device file you must use the actual mmap for the data transfer. Our interface for zero copy reads/writes is O_DIRECT, and that requires not special memory allocation, just proper alignment. -- To unsubscribe from this

Re: [PATCH] usb: gadget: uvc: fix permissions of configfs attributes

2015-11-30 Thread Christoph Hellwig
Hi Mian, sorry for the bug, the fix looks correct. Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Infrastructure for zerocopy I/O

2015-11-18 Thread Christoph Hellwig
On Tue, Nov 17, 2015 at 02:07:58PM -0500, Alan Stern wrote: > If we really want to do zerocopy I/O then we should not use a bounce > buffer. But the only way to avoid bounce buffers may be to give user > programs a way of allocating memory pages below 4 GB, because lots of > USB hardware can

Re: Infrastructure for zerocopy I/O

2015-11-17 Thread Christoph Hellwig
On Mon, Nov 16, 2015 at 03:22:06PM -0500, Alan Stern wrote: > In other words, you're suggesting we do this: > > Check that userspace requested zerocopy (otherwise the user > program might try to access other data stored in the same cache > lines as the buffer while the I/O is

Re: Infrastructure for zerocopy I/O

2015-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2015 at 01:29:58PM -0500, Alan Stern wrote: > Allocating memory pages that match the device's DMA mask, for > use as I/O buffers, and locking them so their physical > addresses don't change (and they don't get paged out); > > Mapping those pages into a

Re: Infrastructure for zerocopy I/O

2015-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2015 at 08:03:12PM +0100, Steinar H. Gunderson wrote: > The original use case: DVB capture on embedded devices. > > My use case: USB3 uncompressed HD video capture (from multiple cards). > > Both of these hit (beyond the speed boost from zerocopy) the problem that > as time goes

Re: [PATCH 01/15] fs: configfs: Add unlocked version of configfs_depend_item()

2015-10-22 Thread Christoph Hellwig
On Tue, Oct 20, 2015 at 02:32:32PM +0200, Andrzej Pietrasiewicz wrote: > From: Krzysztof Opasiak > > This change is necessary for the SCSI target usb gadget composed with > configfs. In this case configfs will be used for two different purposes: > to compose a usb gadget

Re: [PATCH 07/21] usb/gadget: Remove set-but-not-used variables

2015-10-22 Thread Christoph Hellwig
On Thu, Oct 22, 2015 at 03:55:45PM -0700, Bart Van Assche wrote: > Avoid that building with W=1 triggers compiler warnings about > set-but-not-used variables. Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list: send the line "unsu

Re: [PATCHv2 01/15] fs: configfs: Add unlocked version of configfs_depend_item()

2015-10-22 Thread Christoph Hellwig
Hi Andrzej, please find a way to share code between the two depend function. And also drop the duplicate undepend version and just stop passing the unused subsystem argument. Not only do we not keep unused argument in Linux in general, but in this case it's also really useful for the new API.

Re: simplify configfs attributes V2

2015-10-13 Thread Christoph Hellwig
On Mon, Oct 05, 2015 at 02:37:05PM -0700, Andrew Morton wrote: > > This series consolidates the code to implement configfs attributes > > by providing the ->show and ->store method in common code and using > > container_of in the methods to access the containing structure. > > > > This reduces

Re: simplify configfs attributes V2

2015-10-11 Thread Christoph Hellwig
On Fri, Oct 09, 2015 at 04:37:51PM -0500, Felipe Balbi wrote: > For reference, I'm fine if you guys take all patches through FS > tree. Another option is waiting for dependencies to be merged in v4.4, > and the gadget changes merge in v4.5, whatever works. I'd prefer to take them all in one go.

Re: [PATCH 02/23] usb-gadget: use per-attribute show and store methods

2015-10-11 Thread Christoph Hellwig
On Fri, Oct 09, 2015 at 04:19:57PM -0500, Felipe Balbi wrote: > > Signed-off-by: Christoph Hellwig <h...@lst.de> > > Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> > > I suppose this depends on other fs/configfs changes ? The whole series should be appl

Re: [PATCH 18/23] spear13xx_pcie_gadget: use per-attribute show and store methods

2015-10-11 Thread Christoph Hellwig
On Fri, Oct 09, 2015 at 04:05:17PM -0500, Felipe Balbi wrote: > Pratyush Anand <pratyush.an...@gmail.com> writes: > > > On Sat, Oct 3, 2015 at 7:02 PM, Christoph Hellwig <h...@lst.de> wrote: > >> Signed-off-by: Christoph Hellwig <h...@lst.de> > &

[PATCH 03/15] saa7164: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/media/pci/saa7164/saa7164-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/saa7164/saa7164-

[PATCH 02/15] tw68-core: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/media/pci/tw68/tw68-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/tw68/tw68-core.c b/d

[PATCH 05/15] cx88: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/media/pci/cx88/cx88-alsa.c | 2 +- drivers/media/pci/cx88/cx88-mpeg.c | 2 +- drivers/media/pci/cx88/cx88-video.c | 2 +- 3 files chan

remove dma_supported and pci_dma_supported as public APIs

2015-10-03 Thread Christoph Hellwig
All driver should be using dma_set_mask / pci_set_dma_mask to try to set the dma mask instead of just querying it. Without that some iommu implementations may not work. pci_dma_supported is removed entirely, but dma_supported stays for dma_ops implementations for now. -- To unsubscribe from

[PATCH 06/15] cx25821: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/media/pci/cx25821/cx25821-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/cx25821/cx25821-

[PATCH 04/15] saa7134: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/media/pci/saa7134/saa7134-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/saa7134/saa7134-

[PATCH 01/15] pcnet32: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/net/ethernet/amd/pcnet32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/pcnet32.c b/d

[PATCH 10/23] usb-gadget/f_sourcesink: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_sourcesink.c | 83 +-

[PATCH 12/23] usb-gadget/f_uac1: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_uac1.c | 39 +++-

[PATCH 23/23] configfs: remove old API

2015-10-03 Thread Christoph Hellwig
Remove the old show_attribute and store_attribute methods and update the documentation. Also replace the two C samples with a single new one in the proper samples directory where people expect to find it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- Documentation/filesystems/Ma

[PATCH 13/23] usb-gadget/f_uac2: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_uac2.c | 28 +++- 1 file

simplify configfs attributes V2

2015-10-03 Thread Christoph Hellwig
This series consolidates the code to implement configfs attributes by providing the ->show and ->store method in common code and using container_of in the methods to access the containing structure. This reduces source and binary size of configfs consumers a lot. Changes since V1: - a couple

[PATCH 06/23] usb-gadget/ether: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_ecm.c| 8 ++--- drivers/usb/gad

[PATCH 07/23] usb-gadget/f_loopback: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_loopback.c | 31 ---

[PATCH 17/23] dlm: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: David Teigland <teigl...@redhat.com --- fs/dlm/config.c | 288 +++- 1 file ch

[PATCH 21/23] ocfs2/cluster: move locking into attribute store methods

2015-10-03 Thread Christoph Hellwig
The test and separate set bit scheme was racy to start with, so move to do a test_and_set_bit after doing the earlier error checks inside the actual store methods. Also remove the locking for the local attribute which already has a different scheme to synchronize. Signed-off-by: Christoph

[PATCH 09/23] usb-gadget/f_printer: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_printer.c | 30 -- 1

[PATCH 05/23] usb-gadget/f_acm: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_acm.c | 26 -- 1 fil

[PATCH 04/23] usb-gadget/f_hid: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_hid.c | 34 ++ 1

[PATCH 16/23] usb-gadget/f_serial: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_serial.c | 26 -- 1 fil

[PATCH 15/23] usb-gadget/f_phonet: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_phonet.c | 25 - 1 fil

[PATCH 11/23] usb-gadget/f_mass_storage: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_mass_storage.c | 119 +++

[PATCH 14/23] usb-gadget/f_obex: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_obex.c | 26 -- 1 fil

[PATCH 18/23] spear13xx_pcie_gadget: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/misc/spear13xx_pcie_gadget.c | 216 --- 1 file changed, 71 insertions(+), 145 deletions(-) diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c index b8374cd..e

[PATCH 15/15] dma: remove external references to dma_supported

2015-10-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- Documentation/DMA-API.txt | 13 - drivers/usb/host/ehci-hcd.c | 2 +- drivers/usb/host/fotg210-hcd.c | 2 +- drivers/usb/host/fusbh200-hcd.c | 2 +- drivers/usb/host/oxu210hp-hcd.c | 2 +- 5 files changed, 4 inse

[PATCH 14/15] pci: remove pci_dma_supported

2015-10-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/parisc/ccio-dma.c| 2 -- include/asm-generic/pci-dma-compat.h | 6 -- 2 files changed, 8 deletions(-) diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 957b421..8e11fb2 100644 --- a/drivers/

[PATCH 03/23] usb-gadget/uvc: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
UVC is a little different from other configfs consumers in that it wants different function and field names from the exposed attribute name, so it keeps it's local macros to define attributes instead of using the common ones. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: A

[PATCH 02/23] usb-gadget: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/configfs.c | 295 ++---

[PATCH 22/23] ocfs2/cluster: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/ocfs2/cluster/heartbeat.c | 205 +++ fs/ocfs2/cluster/nodemanager.c | 241 ++--- 2 files changed, 100 insertions(+), 346 deletions(-) diff --git a/fs/ocfs2/c

[PATCH 20/23] netconsole: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
Note that the old code actually used the store_attributes method to do locking, this is moved into the individual methods. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/net/netconsole.c | 271 +++ 1 file changed, 132 insertions(+

[PATCH 08/23] usb-gadget/f_midi: use per-attribute show and store methods

2015-10-03 Thread Christoph Hellwig
To simplify the configfs interface and remove boilerplate code that also causes binary bloat. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Andrzej Pietrasiewicz <andrze...@samsung.com> --- drivers/usb/gadget/function/f_midi.c | 37

[PATCH 01/23] configfs: add show and store methods to struct configfs_attribute

2015-10-03 Thread Christoph Hellwig
Add methods to struct configfs_attribute to directly show and store attributes without adding boilerplate code to every user. In addition to the methods this also adds 3 helper macros to define read/write, read-only and write-only attributes with a single line of code. Signed-off-by: Christoph

[PATCH 13/15] usbnet: remove ifdefed out call to dma_supported

2015-10-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/net/usb/usbnet.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index b4cf107..9497d51 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1661,12 +

[PATCH 11/15] sfc: don't call dma_supported

2015-10-03 Thread Christoph Hellwig
dma_set_mask already checks for a supported DMA mask before updating it, the call to dma_supported is redundant. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/net/ethernet/sfc/efx.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethern

[PATCH 10/15] nouveau: don't call pci_dma_supported

2015-10-03 Thread Christoph Hellwig
Just try to set a 64-bit DMA mask first and retry with the smaller dma_mask if dma_set_mask failed. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/n

[PATCH 08/15] netup_unidvb: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/netup_

[PATCH 12/15] kaweth: remove ifdefed out call to dma_supported

2015-10-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/net/usb/kaweth.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 1e9cdca..f64b25c 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c @@ -1177,12 +

[PATCH 07/15] cx23885: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/media/pci/cx23885/cx23885-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/cx23885/cx23885-

[PATCH 09/15] mpsc: use dma_set_mask insted of dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/tty/serial/mpsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/mpsc.c b/drivers/tty/serial/

Re: [PATCH 02/23] usb-gadget: use per-attribute show and store methods

2015-09-28 Thread Christoph Hellwig
The Subject line is part of the commit log. If you have a useful suggestion for improving the logs please feel free to suggest it. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 02/23] usb-gadget: use per-attribute show and store methods

2015-09-28 Thread Christoph Hellwig
On Sun, Sep 27, 2015 at 10:50:53AM -0500, Felipe Balbi wrote: > this (and the other helper below) could be macros just fine. They could, but they shouldn't. Inlines are always preferable over function-like macros. > Are you 100% compiler > will *always* inline these helpers. With gcc you can't

Re: [PATCH 03/23] usb-gadget/uvc: use per-attribute show and store methods

2015-09-28 Thread Christoph Hellwig
On Mon, Sep 28, 2015 at 01:35:38PM +0200, Andrzej Pietrasiewicz wrote: >> -#define UVCG_STREAMING_CONTROL_SIZE 1 > > Moving this define seems an unrelated change to me. I can move it back - this one wasn't intentional. >> +#define identity_conv(x) (x) > > What is this needed for here? > > This

Re: [PATCH 07/23] usb-gadget/f_loopback: use per-attribute show and store methods

2015-09-28 Thread Christoph Hellwig
On Mon, Sep 28, 2015 at 01:46:57PM +0200, Andrzej Pietrasiewicz wrote: >> } >> >> -static struct f_lb_opts_attribute f_lb_opts_qlen = >> -__CONFIGFS_ATTR(qlen, S_IRUGO | S_IWUSR, >> -f_lb_opts_qlen_show, >> -f_lb_opts_qlen_store); >> - > In my opinion

Re: [PATCH 23/23] configfs: remove old API

2015-09-28 Thread Christoph Hellwig
> Haven't you just removed show_attribute() and store_attribute() from > configfs_item_operations? Oops, looks like the old text manage to slip back in. I'll fix it up. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org

Re: simplify configfs attributes

2015-09-27 Thread Christoph Hellwig
On Sat, Sep 26, 2015 at 04:49:06PM -0700, Nicholas A. Bellinger wrote: > That said, it would probably make sense to merge via target-pending.git > and get this series into linux-next ASAP. Sounds good to me! -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a

[PATCH 11/23] usb-gadget/f_mass_storage: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/gadget/function/f_mass_storage.c | 123 ++- 1 file changed, 46 insertions(+), 77 deletions(-) diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c

[PATCH 23/23] configfs: remove old API

2015-09-25 Thread Christoph Hellwig
Remove the old show_attribute and store_attribute methods and update the documentation. Also replace the two C samples with a single new one in the proper samples directory where people expect to find it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- Documentation/filesystems/Ma

[PATCH 22/23] ocfs2/cluster: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/ocfs2/cluster/heartbeat.c | 205 +++ fs/ocfs2/cluster/nodemanager.c | 241 ++--- 2 files changed, 100 insertions(+), 346 deletions(-) diff --git a/fs/ocfs2/c

[PATCH 14/23] usb-gadget/f_obex: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/gadget/function/f_obex.c | 26 -- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/usb/gadget/function/f_obex.c b/drivers/usb/gadget/function/f_obex.c index 5460426..f6f1e6b

[PATCH 07/23] usb-gadget/f_loopback: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/gadget/function/f_loopback.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/drivers/usb/gadget/function/f_loopback.c b/drivers/usb/gadget/function/f_loopback.c index 6

[PATCH 05/23] usb-gadget/f_acm: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/gadget/function/f_acm.c | 26 -- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/usb/gadget/function/f_acm.c b/drivers/usb/gadget/function/f_acm.c index be9df09..68b289f

[PATCH 04/23] usb-gadget/f_hid: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/gadget/function/f_hid.c | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 6df9715..d15b061

[PATCH 16/23] usb-gadget/f_serial: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/gadget/function/f_serial.c | 26 -- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/usb/gadget/function/f_serial.c b/drivers/usb/gadget/function/f_serial.c index 1d162e2..ec837f4

[PATCH 15/23] usb-gadget/f_phonet: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/gadget/function/f_phonet.c | 25 - 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/drivers/usb/gadget/function/f_phonet.c b/drivers/usb/gadget/function/f_phonet.c index c0c3ef2..c029ef6

[PATCH 20/23] netconsole: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Note that the old code actually used the store_attributes method to do locking, this is moved into the individual methods. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/net/netconsole.c | 269 +++ 1 file changed, 131 insertions(+

[PATCH 18/23] spear13xx_pcie_gadget: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/misc/spear13xx_pcie_gadget.c | 216 --- 1 file changed, 71 insertions(+), 145 deletions(-) diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c index b8374cd..e

[PATCH 17/23] dlm: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/dlm/config.c | 288 +++- 1 file changed, 74 insertions(+), 214 deletions(-) diff --git a/fs/dlm/config.c b/fs/dlm/config.c index d521bdd..8e294fb 100644 --- a/fs/dlm/config.c +++ b/

[PATCH 21/23] ocfs2/cluster: move locking into attribute store methods

2015-09-25 Thread Christoph Hellwig
The test and separate set bit scheme was racy to start with, so move to do a test_and_set_bit after doing the earlier error checks inside the actual store methods. Also remove the locking for the local attribute which already has a different scheme to synchronize. Signed-off-by: Christoph

[PATCH 12/23] usb-gadget/f_ac1: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/gadget/function/f_uac1.c | 39 +++- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c index 7856b33..a

[PATCH 13/23] usb-gadget/f_uac2: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/gadget/function/f_uac2.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c index f8de7ea..0a5a1e1

[PATCH 09/23] usb-gadget/f_printer: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/gadget/function/f_printer.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/drivers/usb/gadget/function/f_printer.c b/drivers/usb/gadget/function/f_printer.c index 8

[PATCH 02/23] usb-gadget: use per-attribute show and store methods

2015-09-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/usb/gadget/configfs.c | 295 ++-- include/linux/usb/gadget_configfs.h | 19 +-- 2 files changed, 118 insertions(+), 196 deletions(-) diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/

  1   2   >