Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1526299 > unrolled thread
| Started by | Stefan Wahren <stefan.wahren@i2se.com> |
|---|---|
| First post | 2016-11-20 22:30 +0100 |
| Last post | 2016-11-22 13:10 +0100 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 0/5] usb: dwc2: fix parameter handling Stefan Wahren <stefan.wahren@i2se.com> - 2016-11-20 22:30 +0100
[PATCH 4/5] usb: dwc2: gadget: fix default value for gadget-dma-desc Stefan Wahren <stefan.wahren@i2se.com> - 2016-11-20 22:30 +0100
[PATCH 3/5] usb: dwc2: fix default value for DMA support Stefan Wahren <stefan.wahren@i2se.com> - 2016-11-20 22:30 +0100
[PATCH 1/5] usb: dwc2: Do not set host parameter in peripheral mode Stefan Wahren <stefan.wahren@i2se.com> - 2016-11-20 22:30 +0100
Re: [PATCH 0/5] usb: dwc2: fix parameter handling John Youn <John.Youn@synopsys.com> - 2016-11-22 01:00 +0100
Re: [PATCH 0/5] usb: dwc2: fix parameter handling Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-11-22 13:10 +0100
| From | Stefan Wahren <stefan.wahren@i2se.com> |
|---|---|
| Date | 2016-11-20 22:30 +0100 |
| Subject | [PATCH 0/5] usb: dwc2: fix parameter handling |
| Message-ID | <sFHQt-rT-7@gated-at.bofh.it> |
This patch series fixes several parameter handling issues found on bcm2835 in gadget mode. It's based on Felipe's USB next. Stefan Wahren (5): usb: dwc2: Do not set host parameter in peripheral mode usb: dwc2: fix dwc2_get_device_property for u8 and u16 usb: dwc2: fix default value for DMA support usb: dwc2: gadget: fix default value for gadget-dma-desc usb: dwc2: fix kernel-doc for dwc2_set_param drivers/usb/dwc2/params.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) -- 1.7.9.5
[toc] | [next] | [standalone]
| From | Stefan Wahren <stefan.wahren@i2se.com> |
|---|---|
| Date | 2016-11-20 22:30 +0100 |
| Subject | [PATCH 4/5] usb: dwc2: gadget: fix default value for gadget-dma-desc |
| Message-ID | <sFHQu-rT-27@gated-at.bofh.it> |
| In reply to | #1526299 |
The current default for gadget DMA descriptor results on bcm2835 in a
unnecessary error message:
Invalid value 1 for param gadget-dma-desc
So fix this by using hw->dma_desc_enable as default value.
Fixes: dec4b55677e ("usb: dwc2: gadget: Add descriptor DMA parameter")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/usb/dwc2/params.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index 30b954e..11fe68a 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -1094,7 +1094,7 @@ static void dwc2_set_gadget_dma(struct dwc2_hsotg *hsotg)
/* DMA Descriptor */
dwc2_set_param_bool(hsotg, &p->g_dma_desc, false,
"gadget-dma-desc",
- p->g_dma, false,
+ !!hw->dma_desc_enable, false,
!!hw->dma_desc_enable);
}
--
1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | Stefan Wahren <stefan.wahren@i2se.com> |
|---|---|
| Date | 2016-11-20 22:30 +0100 |
| Subject | [PATCH 3/5] usb: dwc2: fix default value for DMA support |
| Message-ID | <sFHQu-rT-41@gated-at.bofh.it> |
| In reply to | #1526299 |
The current defaults for DMA results on a non-DMA platform in a unnecessary
error message:
Invalid value 0 for param gadget-dma
So fix this by using dma_capable as default value.
Fixes: 9962b62f1be ("usb: dwc2: Deprecate g-use-dma binding")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/usb/dwc2/params.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index 2c7b624..30b954e 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -1088,7 +1088,7 @@ static void dwc2_set_gadget_dma(struct dwc2_hsotg *hsotg)
/* Buffer DMA */
dwc2_set_param_bool(hsotg, &p->g_dma,
false, "gadget-dma",
- true, false,
+ dma_capable, false,
dma_capable);
/* DMA Descriptor */
@@ -1118,7 +1118,7 @@ static void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
dwc2_set_param_bool(hsotg, &p->host_dma,
false, "host-dma",
- true, false,
+ dma_capable, false,
dma_capable);
dwc2_set_param_host_rx_fifo_size(hsotg,
params->host_rx_fifo_size);
--
1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | Stefan Wahren <stefan.wahren@i2se.com> |
|---|---|
| Date | 2016-11-20 22:30 +0100 |
| Subject | [PATCH 1/5] usb: dwc2: Do not set host parameter in peripheral mode |
| Message-ID | <sFHQu-rT-43@gated-at.bofh.it> |
| In reply to | #1526299 |
Since commit "usb: dwc2: Improve handling of host and device hwparams" the
host mode specific hardware parameter aren't initialized in peripheral mode
from the register settings anymore. So we better do not set them in this
case which avoids the following warnings on bcm2835:
256 invalid for host_nperio_tx_fifo_size. Check HW configuration.
512 invalid for host_perio_tx_fifo_size. Check HW configuration.
Fixes: 55e1040e424b ("usb: dwc2: Improve handling of host and device hwparams")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/usb/dwc2/params.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index a786256..fd5f7f8 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -1132,6 +1132,12 @@ static void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
false, "host-dma",
true, false,
dma_capable);
+ dwc2_set_param_host_rx_fifo_size(hsotg,
+ params->host_rx_fifo_size);
+ dwc2_set_param_host_nperio_tx_fifo_size(hsotg,
+ params->host_nperio_tx_fifo_size);
+ dwc2_set_param_host_perio_tx_fifo_size(hsotg,
+ params->host_perio_tx_fifo_size);
}
dwc2_set_param_dma_desc_enable(hsotg, params->dma_desc_enable);
dwc2_set_param_dma_desc_fs_enable(hsotg, params->dma_desc_fs_enable);
@@ -1140,12 +1146,6 @@ static void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
params->host_support_fs_ls_low_power);
dwc2_set_param_enable_dynamic_fifo(hsotg,
params->enable_dynamic_fifo);
- dwc2_set_param_host_rx_fifo_size(hsotg,
- params->host_rx_fifo_size);
- dwc2_set_param_host_nperio_tx_fifo_size(hsotg,
- params->host_nperio_tx_fifo_size);
- dwc2_set_param_host_perio_tx_fifo_size(hsotg,
- params->host_perio_tx_fifo_size);
dwc2_set_param_max_transfer_size(hsotg,
params->max_transfer_size);
dwc2_set_param_max_packet_count(hsotg,
--
1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | John Youn <John.Youn@synopsys.com> |
|---|---|
| Date | 2016-11-22 01:00 +0100 |
| Message-ID | <sG6Fb-7Sj-3@gated-at.bofh.it> |
| In reply to | #1526299 |
On 11/20/2016 1:26 PM, Stefan Wahren wrote: > This patch series fixes several parameter handling issues > found on bcm2835 in gadget mode. It's based on Felipe's USB next. > > Stefan Wahren (5): > usb: dwc2: Do not set host parameter in peripheral mode > usb: dwc2: fix dwc2_get_device_property for u8 and u16 > usb: dwc2: fix default value for DMA support > usb: dwc2: gadget: fix default value for gadget-dma-desc > usb: dwc2: fix kernel-doc for dwc2_set_param > > drivers/usb/dwc2/params.c | 32 ++++++++++---------------------- > 1 file changed, 10 insertions(+), 22 deletions(-) > For this series: Acked-by: John Youn <johnyoun@synopsys.com> Felipe, This is too late for 4.10-rc1 right? Can you queue for 4.10 fixes. I can remind you after 4.10-rc1 if it's too early for that. Regards, John
[toc] | [prev] | [next] | [standalone]
| From | Felipe Balbi <felipe.balbi@linux.intel.com> |
|---|---|
| Date | 2016-11-22 13:10 +0100 |
| Message-ID | <sGi3D-6XC-1@gated-at.bofh.it> |
| In reply to | #1527134 |
[Multipart message — attachments visible in raw view] — view raw
Hi, John Youn <John.Youn@synopsys.com> writes: > On 11/20/2016 1:26 PM, Stefan Wahren wrote: >> This patch series fixes several parameter handling issues >> found on bcm2835 in gadget mode. It's based on Felipe's USB next. >> >> Stefan Wahren (5): >> usb: dwc2: Do not set host parameter in peripheral mode >> usb: dwc2: fix dwc2_get_device_property for u8 and u16 >> usb: dwc2: fix default value for DMA support >> usb: dwc2: gadget: fix default value for gadget-dma-desc >> usb: dwc2: fix kernel-doc for dwc2_set_param >> >> drivers/usb/dwc2/params.c | 32 ++++++++++---------------------- >> 1 file changed, 10 insertions(+), 22 deletions(-) >> > > For this series: > > Acked-by: John Youn <johnyoun@synopsys.com> > > > Felipe, > > This is too late for 4.10-rc1 right? > > Can you queue for 4.10 fixes. I can remind you after 4.10-rc1 if it's > too early for that. I can keep it in testing/fixes rebased on 'the next of the day' until v4.10-rc1 is tagged. No problems. -- balbi
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web