Re: [PATCH usb 00/32] cleanup on resource check
On Thu, Oct 30, 2014 at 09:08:45AM +0530, Varka Bhadram wrote: On 10/30/2014 09:05 AM, Varka Bhadram wrote: Hi Balbi, On 10/30/2014 08:13 AM, Felipe Balbi wrote: Hi, On Thu, Oct 30, 2014 at 06:42:08AM +0530, Varka Bhadram wrote: On Thursday 30 October 2014 02:43 AM, Alan Stern wrote: On Wed, 29 Oct 2014, Varka Bhadram wrote: This series removes the duplication of sanity check for platform_get_resource() return resource. It will be checked with devm_ioremap_resource() This series based on usb/master. Varka Bhadram (32): host: ehci-atmel: remove duplicate check on resource host: ehci-exynos: remove duplicate check on resource host: ehci-fsl: remove duplicate check on resource dwc3: core: remove duplicate check on resource dwc3: dwc3-keystone: remove duplicate check on resource renesas_usbhs: common: remove duplicate check on resource phy: phy-rcar-usb: remove duplicate check on resource musb: musb_dsps: remove duplicate check on resource musb: musb_core: remove duplicate check on resource host: xhci-plat: remove duplicate check on resource host: uhci-platform: remove duplicate check on resource host: ohci-st: remove duplicate check on resource host: ohci-spear: remove duplicate check on resource host: ehci-sh: remove duplicate check on resource host: ohci-pxa27x: remove duplicate check on resource host: ohci-platform: remove duplicate check on resource host: ohci-octeon: remove duplicate check on resource host: ohci-jz4740: remove duplicate check on resource host: ohci-exynos: remove duplicate check on resource host: ohci-da8xx: remove duplicate check on resource host: ohci-at91: remove duplicate check on resource host: ehci-w90x900: remove duplicate check on resource host: ehci-tegra: remove duplicate check on resource host: ehci-st: remove duplicate check on resource host: ehci-spear: remove duplicate check on resource host: ehci-sead3: remove duplicate check on resource host: ehci-platform: remove duplicate check on resource host: ehci-orion: remove duplicate check on resource host: ehci-octeon: remove duplicate check on resource host: ehci-mxc: remove duplicate check on resource host: ehci-mv: remove duplicate check on resource host: ehci-msm: remove duplicate check on resource For all the ehci, ohci, and uhci changes: Acked-by: Alan Stern st...@rowland.harvard.edu Thanx for your ACK. I didn't look carefully at the others, but the dwc3-core patch (4/32) definitely seemed wrong. I don't find any wrong in the code. Really ? Look more carefuly static int dwc3_probe(struct platform_device *pdev) { struct device*dev = pdev-dev; struct dwc3_platform_data *pdata = dev_get_platdata(dev); struct device_node*node = dev-of_node; struct resource*res; struct dwc3*dwc; intret; void __iomem*regs; void*mem; mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL); if (!mem) return -ENOMEM; dwc = PTR_ALIGN(mem, DWC3_ALIGN_MASK + 1); dwc-mem = mem; dwc-dev = dev; res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!res) { dev_err(dev, missing IRQ\n); return -ENODEV; } dwc-xhci_resources[1].start = res-start; dwc-xhci_resources[1].end = res-end; dwc-xhci_resources[1].flags = res-flags; dwc-xhci_resources[1].name = res-name; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); /* * Request memory region but exclude xHCI regs, * since it will be requested by the xhci-plat driver. */ regs = devm_ioremap_resource(dev, res); because you moved this call here... if (IS_ERR(regs)) return PTR_ERR(regs); dwc-xhci_resources[0].start = res-start; dwc-xhci_resources[0].end = dwc-xhci_resources[0].start + DWC3_XHCI_REGS_END; dwc-xhci_resources[0].flags = res-flags; dwc-xhci_resources[0].name = res-name; res-start += DWC3_GLOBALS_REGS_START; ... before doing this, you're now ioremapping the entire space *INCLUDING* the XHCI address space, which means that you have just broken every single platform using this driver in host mode. In that case, i will drop this patch. Is other patches are fine except #04/32 patch..? Can i add you Ack..? And based on which tree i need to generate the patches.? I rebased all these patches on [1] of master branch. [1]: https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git patches that go through my tree means that I will apply them to my tree and send a pull request to Greg. Have a look at MAINTAINERS. -- balbi signature.asc Description: Digital signature
Re: [PATCH usb 00/32] cleanup on resource check
On Wed, 29 Oct 2014, Varka Bhadram wrote: This series removes the duplication of sanity check for platform_get_resource() return resource. It will be checked with devm_ioremap_resource() This series based on usb/master. Varka Bhadram (32): host: ehci-atmel: remove duplicate check on resource host: ehci-exynos: remove duplicate check on resource host: ehci-fsl: remove duplicate check on resource dwc3: core: remove duplicate check on resource dwc3: dwc3-keystone: remove duplicate check on resource renesas_usbhs: common: remove duplicate check on resource phy: phy-rcar-usb: remove duplicate check on resource musb: musb_dsps: remove duplicate check on resource musb: musb_core: remove duplicate check on resource host: xhci-plat: remove duplicate check on resource host: uhci-platform: remove duplicate check on resource host: ohci-st: remove duplicate check on resource host: ohci-spear: remove duplicate check on resource host: ehci-sh: remove duplicate check on resource host: ohci-pxa27x: remove duplicate check on resource host: ohci-platform: remove duplicate check on resource host: ohci-octeon: remove duplicate check on resource host: ohci-jz4740: remove duplicate check on resource host: ohci-exynos: remove duplicate check on resource host: ohci-da8xx: remove duplicate check on resource host: ohci-at91: remove duplicate check on resource host: ehci-w90x900: remove duplicate check on resource host: ehci-tegra: remove duplicate check on resource host: ehci-st: remove duplicate check on resource host: ehci-spear: remove duplicate check on resource host: ehci-sead3: remove duplicate check on resource host: ehci-platform: remove duplicate check on resource host: ehci-orion: remove duplicate check on resource host: ehci-octeon: remove duplicate check on resource host: ehci-mxc: remove duplicate check on resource host: ehci-mv: remove duplicate check on resource host: ehci-msm: remove duplicate check on resource For all the ehci, ohci, and uhci changes: Acked-by: Alan Stern st...@rowland.harvard.edu I didn't look carefully at the others, but the dwc3-core patch (4/32) definitely seemed wrong. Alan Stern -- 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 usb 00/32] cleanup on resource check
On Thursday 30 October 2014 02:43 AM, Alan Stern wrote: On Wed, 29 Oct 2014, Varka Bhadram wrote: This series removes the duplication of sanity check for platform_get_resource() return resource. It will be checked with devm_ioremap_resource() This series based on usb/master. Varka Bhadram (32): host: ehci-atmel: remove duplicate check on resource host: ehci-exynos: remove duplicate check on resource host: ehci-fsl: remove duplicate check on resource dwc3: core: remove duplicate check on resource dwc3: dwc3-keystone: remove duplicate check on resource renesas_usbhs: common: remove duplicate check on resource phy: phy-rcar-usb: remove duplicate check on resource musb: musb_dsps: remove duplicate check on resource musb: musb_core: remove duplicate check on resource host: xhci-plat: remove duplicate check on resource host: uhci-platform: remove duplicate check on resource host: ohci-st: remove duplicate check on resource host: ohci-spear: remove duplicate check on resource host: ehci-sh: remove duplicate check on resource host: ohci-pxa27x: remove duplicate check on resource host: ohci-platform: remove duplicate check on resource host: ohci-octeon: remove duplicate check on resource host: ohci-jz4740: remove duplicate check on resource host: ohci-exynos: remove duplicate check on resource host: ohci-da8xx: remove duplicate check on resource host: ohci-at91: remove duplicate check on resource host: ehci-w90x900: remove duplicate check on resource host: ehci-tegra: remove duplicate check on resource host: ehci-st: remove duplicate check on resource host: ehci-spear: remove duplicate check on resource host: ehci-sead3: remove duplicate check on resource host: ehci-platform: remove duplicate check on resource host: ehci-orion: remove duplicate check on resource host: ehci-octeon: remove duplicate check on resource host: ehci-mxc: remove duplicate check on resource host: ehci-mv: remove duplicate check on resource host: ehci-msm: remove duplicate check on resource For all the ehci, ohci, and uhci changes: Acked-by: Alan Stern st...@rowland.harvard.edu Thanx for your ACK. I didn't look carefully at the others, but the dwc3-core patch (4/32) definitely seemed wrong. I don't find any wrong in the code. Plese see the probe() static int dwc3_probe(struct platform_device *pdev) { struct device *dev = pdev-dev; struct dwc3_platform_data *pdata = dev_get_platdata(dev); struct device_node *node = dev-of_node; struct resource *res; struct dwc3 *dwc; int ret; void __iomem*regs; void*mem; mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL); if (!mem) return -ENOMEM; dwc = PTR_ALIGN(mem, DWC3_ALIGN_MASK + 1); dwc-mem = mem; dwc-dev = dev; res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!res) { dev_err(dev, missing IRQ\n); return -ENODEV; } dwc-xhci_resources[1].start = res-start; dwc-xhci_resources[1].end = res-end; dwc-xhci_resources[1].flags = res-flags; dwc-xhci_resources[1].name = res-name; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); /* * Request memory region but exclude xHCI regs, * since it will be requested by the xhci-plat driver. */ regs = devm_ioremap_resource(dev, res); if (IS_ERR(regs)) return PTR_ERR(regs); dwc-xhci_resources[0].start = res-start; dwc-xhci_resources[0].end = dwc-xhci_resources[0].start + DWC3_XHCI_REGS_END; dwc-xhci_resources[0].flags = res-flags; dwc-xhci_resources[0].name = res-name; res-start += DWC3_GLOBALS_REGS_START; dwc-regs= regs; dwc-regs_size = resource_size(res); /* * restore res-start back to its original value so that, * in case the probe is deferred, we don't end up getting error in * request the memory region the next time probe is called. */ res-start -= DWC3_GLOBALS_REGS_START; if (node) { dwc-maximum_speed = of_usb_get_maximum_speed(node); dwc-needs_fifo_resize = of_property_read_bool(node, tx-fifo-resize); dwc-dr_mode = of_usb_get_dr_mode(node); } else if (pdata) { dwc-maximum_speed = pdata-maximum_speed; dwc-needs_fifo_resize = pdata-tx_fifo_resize; dwc-dr_mode = pdata-dr_mode; } /* default to superspeed if no maximum_speed passed */ if (dwc-maximum_speed == USB_SPEED_UNKNOWN) dwc-maximum_speed = USB_SPEED_SUPER; ret = dwc3_core_get_phy(dwc);
Re: [PATCH usb 00/32] cleanup on resource check
Hi, On Thu, Oct 30, 2014 at 06:42:08AM +0530, Varka Bhadram wrote: On Thursday 30 October 2014 02:43 AM, Alan Stern wrote: On Wed, 29 Oct 2014, Varka Bhadram wrote: This series removes the duplication of sanity check for platform_get_resource() return resource. It will be checked with devm_ioremap_resource() This series based on usb/master. Varka Bhadram (32): host: ehci-atmel: remove duplicate check on resource host: ehci-exynos: remove duplicate check on resource host: ehci-fsl: remove duplicate check on resource dwc3: core: remove duplicate check on resource dwc3: dwc3-keystone: remove duplicate check on resource renesas_usbhs: common: remove duplicate check on resource phy: phy-rcar-usb: remove duplicate check on resource musb: musb_dsps: remove duplicate check on resource musb: musb_core: remove duplicate check on resource host: xhci-plat: remove duplicate check on resource host: uhci-platform: remove duplicate check on resource host: ohci-st: remove duplicate check on resource host: ohci-spear: remove duplicate check on resource host: ehci-sh: remove duplicate check on resource host: ohci-pxa27x: remove duplicate check on resource host: ohci-platform: remove duplicate check on resource host: ohci-octeon: remove duplicate check on resource host: ohci-jz4740: remove duplicate check on resource host: ohci-exynos: remove duplicate check on resource host: ohci-da8xx: remove duplicate check on resource host: ohci-at91: remove duplicate check on resource host: ehci-w90x900: remove duplicate check on resource host: ehci-tegra: remove duplicate check on resource host: ehci-st: remove duplicate check on resource host: ehci-spear: remove duplicate check on resource host: ehci-sead3: remove duplicate check on resource host: ehci-platform: remove duplicate check on resource host: ehci-orion: remove duplicate check on resource host: ehci-octeon: remove duplicate check on resource host: ehci-mxc: remove duplicate check on resource host: ehci-mv: remove duplicate check on resource host: ehci-msm: remove duplicate check on resource For all the ehci, ohci, and uhci changes: Acked-by: Alan Stern st...@rowland.harvard.edu Thanx for your ACK. I didn't look carefully at the others, but the dwc3-core patch (4/32) definitely seemed wrong. I don't find any wrong in the code. Really ? Look more carefuly static int dwc3_probe(struct platform_device *pdev) { struct device *dev = pdev-dev; struct dwc3_platform_data *pdata = dev_get_platdata(dev); struct device_node *node = dev-of_node; struct resource *res; struct dwc3 *dwc; int ret; void __iomem*regs; void*mem; mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL); if (!mem) return -ENOMEM; dwc = PTR_ALIGN(mem, DWC3_ALIGN_MASK + 1); dwc-mem = mem; dwc-dev = dev; res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!res) { dev_err(dev, missing IRQ\n); return -ENODEV; } dwc-xhci_resources[1].start = res-start; dwc-xhci_resources[1].end = res-end; dwc-xhci_resources[1].flags = res-flags; dwc-xhci_resources[1].name = res-name; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); /* * Request memory region but exclude xHCI regs, * since it will be requested by the xhci-plat driver. */ regs = devm_ioremap_resource(dev, res); because you moved this call here... if (IS_ERR(regs)) return PTR_ERR(regs); dwc-xhci_resources[0].start = res-start; dwc-xhci_resources[0].end = dwc-xhci_resources[0].start + DWC3_XHCI_REGS_END; dwc-xhci_resources[0].flags = res-flags; dwc-xhci_resources[0].name = res-name; res-start += DWC3_GLOBALS_REGS_START; ... before doing this, you're now ioremapping the entire space *INCLUDING* the XHCI address space, which means that you have just broken every single platform using this driver in host mode. -- balbi signature.asc Description: Digital signature
Re: [PATCH usb 00/32] cleanup on resource check
Hi Balbi, On 10/30/2014 08:13 AM, Felipe Balbi wrote: Hi, On Thu, Oct 30, 2014 at 06:42:08AM +0530, Varka Bhadram wrote: On Thursday 30 October 2014 02:43 AM, Alan Stern wrote: On Wed, 29 Oct 2014, Varka Bhadram wrote: This series removes the duplication of sanity check for platform_get_resource() return resource. It will be checked with devm_ioremap_resource() This series based on usb/master. Varka Bhadram (32): host: ehci-atmel: remove duplicate check on resource host: ehci-exynos: remove duplicate check on resource host: ehci-fsl: remove duplicate check on resource dwc3: core: remove duplicate check on resource dwc3: dwc3-keystone: remove duplicate check on resource renesas_usbhs: common: remove duplicate check on resource phy: phy-rcar-usb: remove duplicate check on resource musb: musb_dsps: remove duplicate check on resource musb: musb_core: remove duplicate check on resource host: xhci-plat: remove duplicate check on resource host: uhci-platform: remove duplicate check on resource host: ohci-st: remove duplicate check on resource host: ohci-spear: remove duplicate check on resource host: ehci-sh: remove duplicate check on resource host: ohci-pxa27x: remove duplicate check on resource host: ohci-platform: remove duplicate check on resource host: ohci-octeon: remove duplicate check on resource host: ohci-jz4740: remove duplicate check on resource host: ohci-exynos: remove duplicate check on resource host: ohci-da8xx: remove duplicate check on resource host: ohci-at91: remove duplicate check on resource host: ehci-w90x900: remove duplicate check on resource host: ehci-tegra: remove duplicate check on resource host: ehci-st: remove duplicate check on resource host: ehci-spear: remove duplicate check on resource host: ehci-sead3: remove duplicate check on resource host: ehci-platform: remove duplicate check on resource host: ehci-orion: remove duplicate check on resource host: ehci-octeon: remove duplicate check on resource host: ehci-mxc: remove duplicate check on resource host: ehci-mv: remove duplicate check on resource host: ehci-msm: remove duplicate check on resource For all the ehci, ohci, and uhci changes: Acked-by: Alan Stern st...@rowland.harvard.edu Thanx for your ACK. I didn't look carefully at the others, but the dwc3-core patch (4/32) definitely seemed wrong. I don't find any wrong in the code. Really ? Look more carefuly static int dwc3_probe(struct platform_device *pdev) { struct device *dev = pdev-dev; struct dwc3_platform_data *pdata = dev_get_platdata(dev); struct device_node *node = dev-of_node; struct resource *res; struct dwc3 *dwc; int ret; void __iomem*regs; void*mem; mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL); if (!mem) return -ENOMEM; dwc = PTR_ALIGN(mem, DWC3_ALIGN_MASK + 1); dwc-mem = mem; dwc-dev = dev; res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!res) { dev_err(dev, missing IRQ\n); return -ENODEV; } dwc-xhci_resources[1].start = res-start; dwc-xhci_resources[1].end = res-end; dwc-xhci_resources[1].flags = res-flags; dwc-xhci_resources[1].name = res-name; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); /* * Request memory region but exclude xHCI regs, * since it will be requested by the xhci-plat driver. */ regs = devm_ioremap_resource(dev, res); because you moved this call here... if (IS_ERR(regs)) return PTR_ERR(regs); dwc-xhci_resources[0].start = res-start; dwc-xhci_resources[0].end = dwc-xhci_resources[0].start + DWC3_XHCI_REGS_END; dwc-xhci_resources[0].flags = res-flags; dwc-xhci_resources[0].name = res-name; res-start += DWC3_GLOBALS_REGS_START; ... before doing this, you're now ioremapping the entire space *INCLUDING* the XHCI address space, which means that you have just broken every single platform using this driver in host mode. In that case, i will drop this patch. Is other patches are fine except #04/32 patch..? -- Regards, Varka Bhadram. -- 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 usb 00/32] cleanup on resource check
On 10/30/2014 09:05 AM, Varka Bhadram wrote: Hi Balbi, On 10/30/2014 08:13 AM, Felipe Balbi wrote: Hi, On Thu, Oct 30, 2014 at 06:42:08AM +0530, Varka Bhadram wrote: On Thursday 30 October 2014 02:43 AM, Alan Stern wrote: On Wed, 29 Oct 2014, Varka Bhadram wrote: This series removes the duplication of sanity check for platform_get_resource() return resource. It will be checked with devm_ioremap_resource() This series based on usb/master. Varka Bhadram (32): host: ehci-atmel: remove duplicate check on resource host: ehci-exynos: remove duplicate check on resource host: ehci-fsl: remove duplicate check on resource dwc3: core: remove duplicate check on resource dwc3: dwc3-keystone: remove duplicate check on resource renesas_usbhs: common: remove duplicate check on resource phy: phy-rcar-usb: remove duplicate check on resource musb: musb_dsps: remove duplicate check on resource musb: musb_core: remove duplicate check on resource host: xhci-plat: remove duplicate check on resource host: uhci-platform: remove duplicate check on resource host: ohci-st: remove duplicate check on resource host: ohci-spear: remove duplicate check on resource host: ehci-sh: remove duplicate check on resource host: ohci-pxa27x: remove duplicate check on resource host: ohci-platform: remove duplicate check on resource host: ohci-octeon: remove duplicate check on resource host: ohci-jz4740: remove duplicate check on resource host: ohci-exynos: remove duplicate check on resource host: ohci-da8xx: remove duplicate check on resource host: ohci-at91: remove duplicate check on resource host: ehci-w90x900: remove duplicate check on resource host: ehci-tegra: remove duplicate check on resource host: ehci-st: remove duplicate check on resource host: ehci-spear: remove duplicate check on resource host: ehci-sead3: remove duplicate check on resource host: ehci-platform: remove duplicate check on resource host: ehci-orion: remove duplicate check on resource host: ehci-octeon: remove duplicate check on resource host: ehci-mxc: remove duplicate check on resource host: ehci-mv: remove duplicate check on resource host: ehci-msm: remove duplicate check on resource For all the ehci, ohci, and uhci changes: Acked-by: Alan Stern st...@rowland.harvard.edu Thanx for your ACK. I didn't look carefully at the others, but the dwc3-core patch (4/32) definitely seemed wrong. I don't find any wrong in the code. Really ? Look more carefuly static int dwc3_probe(struct platform_device *pdev) { struct device*dev = pdev-dev; struct dwc3_platform_data *pdata = dev_get_platdata(dev); struct device_node*node = dev-of_node; struct resource*res; struct dwc3*dwc; intret; void __iomem*regs; void*mem; mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL); if (!mem) return -ENOMEM; dwc = PTR_ALIGN(mem, DWC3_ALIGN_MASK + 1); dwc-mem = mem; dwc-dev = dev; res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!res) { dev_err(dev, missing IRQ\n); return -ENODEV; } dwc-xhci_resources[1].start = res-start; dwc-xhci_resources[1].end = res-end; dwc-xhci_resources[1].flags = res-flags; dwc-xhci_resources[1].name = res-name; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); /* * Request memory region but exclude xHCI regs, * since it will be requested by the xhci-plat driver. */ regs = devm_ioremap_resource(dev, res); because you moved this call here... if (IS_ERR(regs)) return PTR_ERR(regs); dwc-xhci_resources[0].start = res-start; dwc-xhci_resources[0].end = dwc-xhci_resources[0].start + DWC3_XHCI_REGS_END; dwc-xhci_resources[0].flags = res-flags; dwc-xhci_resources[0].name = res-name; res-start += DWC3_GLOBALS_REGS_START; ... before doing this, you're now ioremapping the entire space *INCLUDING* the XHCI address space, which means that you have just broken every single platform using this driver in host mode. In that case, i will drop this patch. Is other patches are fine except #04/32 patch..? Can i add you Ack..? And based on which tree i need to generate the patches.? I rebased all these patches on [1] of master branch. [1]: https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git -- Regards, Varka Bhadram. -- 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