Re: [PATCH v3 3/6] uas: make work list per-device

2013-09-17 Thread Christoph Hellwig
On Fri, Sep 13, 2013 at 01:27:12PM +0200, Gerd Hoffmann wrote: Simplifies locking, we'll protect the list with the device spin lock. Also plugs races which can happen when two devices operate on the global list. While being at it rename the list head from list to work, preparing for the

Re: [PATCH v3 3/6] uas: make work list per-device

2013-09-24 Thread Christoph Hellwig
On Wed, Sep 18, 2013 at 09:33:04AM +0200, Gerd Hoffmann wrote: While being at it rename the list head from list to work, preparing for the addition of a second list. Why do you even the list? The list was already there when I took over maintainance ... What would a ordered

Re: [PATCH] Try #3: Use SCSI read/write(16) with 32-bit LBA drives

2012-11-15 Thread Christoph Hellwig
On Wed, Nov 14, 2012 at 05:03:22PM -0500, Jason J. Herne wrote: From: Jason J. Herne hern...@gmail.com Force large capacity ( 0x blocks) drives to use READ/WRITE(16) instead of READ/WRITE(10). Some(most/all?) USB enclosures do not like READ(10) commands when a large capacity

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-06 Thread Christoph Hellwig
On Wed, Aug 06, 2014 at 03:29:47PM +0200, Douglas Gilbert wrote: If not and since I'm told black lists and the like won't work, my advice for the record is to use FreeBSD or Windows for tools that need this capability. I doubt either of them forces users to hack up flags for these cases. At

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-07 Thread Christoph Hellwig
On Wed, Aug 06, 2014 at 04:02:22PM -0400, Alan Stern wrote: I doubt either of them forces users to hack up flags for these cases. Why was this change needed in the first place? There's no explanation in the patch itself. Which chance? The one to not support SG_FLAG_LUN_INHIBIT? At

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-19 Thread Christoph Hellwig
On Thu, Aug 07, 2014 at 11:58:37AM -0400, Alan Stern wrote: On Wed, Aug 06, 2014 at 04:02:22PM -0400, Alan Stern wrote: I doubt either of them forces users to hack up flags for these cases. Why was this change needed in the first place? There's no explanation in the patch itself.

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-21 Thread Christoph Hellwig
On Thu, Aug 21, 2014 at 10:41:02AM -0400, Douglas Gilbert wrote: Perhaps we could add another bit flag in struct scsi_host_template such as: unsigned int transport_says_dont_scsi2_lun_cmd:1; then drivers/usb/storage/scsiglue.c could set that bit in its usb_stor_host_template and

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-21 Thread Christoph Hellwig
On Thu, Aug 21, 2014 at 05:43:41PM -0400, Martin K. Petersen wrote: Alan Okay, here's a patch that implements the suggestion, except that I Alan put the flag in the Scsi_Host structure instead of the template. Alan This was to minimize the impact of the change. Among the various Alan

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread Christoph Hellwig
to do that into the patch. Looks good to me, Acked-by: Christoph Hellwig h...@lst.de Do you want to queue this up in the USB tree? From the looks of what I have on my plate so far it seems like we could avoid conflicts with it in the SCSI tree. -- To unsubscribe from this list: send the line

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-24 Thread Christoph Hellwig
On Fri, Aug 22, 2014 at 01:29:32PM -0400, Alan Stern wrote: Other than this, I'm fine with the code ... you can add the acked by from me when we resolve the above question. Okay. It's true that this issue is only tangentially related to the main point of the patch. It could be removed

Re: [PATCH] SCSI: Don't store LUN bits in CDB[1] for USB mass-storage devices

2014-09-04 Thread Christoph Hellwig
Thanks, applied. -- 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: [REGRESSION 3.17] scsi (uas) disks no longer using tagged command queuing

2014-09-09 Thread Christoph Hellwig
On Tue, Sep 09, 2014 at 11:15:24AM +0200, Hans de Goede wrote: Taking the uas.c file from 3.17, and building it for 3.16 restores the use of tcq (debugged by adding a printk blk_rq_tagged + request-tag). So either uas is doing something wrong which happened to work in 3.16, or something has

Re: [PATCH 1/2] uas: Set no_report_opcodes

2014-09-09 Thread Christoph Hellwig
On Tue, Sep 09, 2014 at 04:59:59PM +0200, Hans de Goede wrote: asm1051e usb - sata bridges hang when receiving a report opcodes scsi cmnd. Take a page out of the usb-storage book, and simple disable no_report_opcodes outright. Given that this device also seems broken in other ways can we wait

Re: [REGRESSION 3.17] scsi (uas) disks no longer using tagged command queuing

2014-09-10 Thread Christoph Hellwig
On Wed, Sep 10, 2014 at 09:21:24AM +0200, Hans de Goede wrote: I've applied the patch, this results in the following new dmesg output when using uas: [ 120.602632] initialized host-wide tag map! Thank you for looking into this. So we're initializing the tag map, but scsi_activate_tcq

Re: [REGRESSION 3.17] scsi (uas) disks no longer using tagged command queuing

2014-09-11 Thread Christoph Hellwig
On Thu, Sep 11, 2014 at 12:01:13PM +0200, Hans de Goede wrote: So we're initializing the tag map, but scsi_activate_tcq doesn't pick it up. I can't really come up with a good explanation for it, but there even without that there is an elephant in the room: as part of the scsi-mq series I

[PATCH] scsi: fix regression that accidentally disabled block-based tcq

2014-09-12 Thread Christoph Hellwig
Please try the fix below, looks like the commit broke TCQ for all drivers using block-level tagging. --- From 865a19b760d2786fe37d3b5c151a4ecea4c0e95e Mon Sep 17 00:00:00 2001 From: Christoph Hellwig h...@lst.de Date: Fri, 12 Sep 2014 16:00:19 -0700 Subject: scsi: fix regression

Re: [PATCH] scsi: fix regression that accidentally disabled block-based tcq

2014-09-13 Thread Christoph Hellwig
On Sat, Sep 13, 2014 at 12:28:41PM +0200, Hans de Goede wrote: Yes this one does the trick and fixes things. Note the git tree I used for testing also had your previous fix to split up the blk_tcq union in 2 separate struct members. Let me know if you want me to re-test without that fix. I'm

review-ping: Re: [PATCH] scsi: fix regression that accidentally disabled block-based tcq

2014-09-15 Thread Christoph Hellwig
Can I get some reviews for this patch so that we can get into 3.17-rc? -- 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 1/2] uas: Reduce number of function arguments for uas_alloc_foo functions

2014-10-02 Thread Christoph Hellwig
On Thu, Oct 02, 2014 at 12:04:39PM +0200, Hans de Goede wrote: The stream_id and pipe are already present in uas_cmd_info resp uas_dev_info, so there is no need to pass a copy along. Signed-off-by: Hans de Goede hdego...@redhat.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Christoph Hellwig
Looks fine to me (and actually removes code..) Reviewed-by: Christoph Hellwig h...@lst.de It's fairly late in 3.17 to get something like this in, but would you consider Ccing it to stable so we can get it into the first 3.17 stable release? -- To unsubscribe from this list: send the line

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Christoph Hellwig
On Thu, Oct 02, 2014 at 02:35:10PM +0200, Hans de Goede wrote: This patch sits on top of a whole bunch of uas cleanups / fixes which are going into 3.18, and which are to big of a change to backport. Can add a patch to set disable_blk_mq for uas on 3.17 then? -- To unsubscribe from this list:

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-02 Thread Christoph Hellwig
On Thu, Oct 02, 2014 at 03:08:40PM +0200, Hans de Goede wrote: Yes, although that likely would need to go through stable, without going into 3.18 . Greg, is this ok with you and how do I get a patch in stable which is not in upstream (because upstream will get a better fix) ? This is a

Re: [PATCH 2/2] uas: Make uas work with blk-mq

2014-10-03 Thread Christoph Hellwig
should expect crashes if they attach a usb device. Please consider applying the patch below for 3.17, as there is a cxgb patch pending anyway: --- From 8a42ea1369701960a821b7fa9a3da5c68e7e4366 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig h...@lst.de Date: Fri, 3 Oct 2014 10:45:10 +0200 Subject

Re: [PATCH v2 2/2] uas: Make uas work with blk-mq

2014-10-05 Thread Christoph Hellwig
On Sun, Oct 05, 2014 at 11:06:00AM +0200, Hans de Goede wrote: This patch sits on top of a lot of other uas fixes which are already in usb-next, so this needs to go in through usb-next. What is the actual conflict? If it's just your revert of the disable_blk_mq flag you might want to skip that

Re: Large disk drives

2014-11-05 Thread Christoph Hellwig
On Wed, Nov 05, 2014 at 11:34:11AM -0500, Alan Stern wrote: Sorry, meant to. In principle I'm OK with this as the lever for the hack (largely because it means we don't need to do anything) but will the distributions support it? While I can't speak for the distributions, it's reasonable

Re: Issues with commit 34b48db6 (block: remove artifical max_hw_sectors cap)

2014-12-27 Thread Christoph Hellwig
On Tue, Dec 23, 2014 at 11:48:40PM -0800, Kenneth R. Crudup wrote: Looks like we need to quirk it. Can you try to echo different limits to the /sys/block/sdc/queue/max_hw_sectors_kb file for the device to find the limit for it? Looks like it's 32767; making it an even 32K sectors starts

Re: Issues with commit 34b48db6 (block: remove artifical max_hw_sectors cap)

2014-12-30 Thread Christoph Hellwig
On Sun, Dec 28, 2014 at 10:10:01PM -0500, Alan Stern wrote: (Is this a USB device? Presumably you wouldn't have CC'ed the linux-usb and usb-storage mailing lists if it wasn't...) It's a usb attached device. From the inquity information and the product name it looks like a SATA device attached

Re: Issues with commit 34b48db6 (block: remove artifical max_hw_sectors cap)

2015-01-05 Thread Christoph Hellwig
On Tue, Dec 30, 2014 at 11:19:07AM -0500, Douglas Gilbert wrote: In SCSI, the VPD page 0xb0 (Block limits) has a Maximum transfer length field (32 bits long). Its units are logical blocks. Useful if 0 as 0 means unreported. USB to SATA bridges should comply with SAT. However SAT and SAT-2

Re: Issues with commit 34b48db6 (block: remove artifical max_hw_sectors cap)

2015-01-05 Thread Christoph Hellwig
On Tue, Dec 30, 2014 at 08:36:34AM -0800, Kenneth R. Crudup wrote: OP here. FWIW, this is what I get when running that command on the SCSI generic device that corresponds to the USB-3 (non-UAS) disk[1] that had the issue: So it looks like this one actually provides sane values, but we don't we

Re: [PATCH v3 0/4] scsi: ufs ums-* esp_scsi: fix module reference counting

2015-01-12 Thread Christoph Hellwig
On Sun, Jan 11, 2015 at 10:50:02PM +0900, Akinobu Mita wrote: While accessing a scsi_device, the use count of the underlying LLDD module is incremented. The module reference is retrieved through .module field of struct scsi_host_template. This mapping between scsi_device and underlying LLDD

Re: [PATCH v2 0/3] scsi: ufs ums-*: fix module reference counting

2015-01-07 Thread Christoph Hellwig
On Wed, Jan 07, 2015 at 11:02:59PM +0900, Akinobu Mita wrote: While accessing a scsi_device, the use count of the underlying LLDD module is incremented. The module reference is retrieved through .module field of struct scsi_host_template. This mapping between scsi_device and underlying LLDD

Re: [PATCH 05/19] USB: inode.c: move assignment out of if () block

2015-04-30 Thread Christoph Hellwig
On Thu, Apr 30, 2015 at 11:32:54AM +0200, Greg Kroah-Hartman wrote: We should not be doing assignments within an if () block so fix up the code to not do this. Any reason your ccing me on random cleanups on random usb crap? Nothing personal, but I'm getting tons of these weird cc lately, so I

Re: 4.2 kernel trace when hot unplug a mounted USB/SATA/MMC devices with ext2/ext3/ext4 file system

2015-08-15 Thread Christoph Hellwig
On Fri, Aug 14, 2015 at 05:52:44PM -0700, Duc Dang wrote: The commit 08439fec26 ext4: remove block_device_ejected only causes issue with ext4 and trying reverting it helps our test passes with ext4. But how about the same issue with ext2/ext3? I tried to fix the underlying issue, but I

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: 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: 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: 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> > &

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: 4.2 kernel trace when hot unplug a mounted USB/SATA/MMC devices with ext2/ext3/ext4 file system

2015-08-25 Thread Christoph Hellwig
On Mon, Aug 24, 2015 at 02:20:07PM -0700, Duc Dang wrote: For more information. We tested kernel at commit 5f80f62ada ext4: remove useless condition in if statement. (right before your commit) and still saw the issue. df3305156f989339529b3d6744b898d498fb1f7b [media] v4l: xilinx: Add Xilinx

[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: 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

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

[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

  1   2   >