* [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth
@ 2013-08-27 15:53 Rupesh Gujare
2013-08-27 15:53 ` [PATCH 2/4] staging: ozwpan: Reset PORT_ENABLE bit Rupesh Gujare
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Rupesh Gujare @ 2013-08-27 15:53 UTC (permalink / raw)
To: devel; +Cc: linux-usb, linux-kernel, gregkh
Increase ISOC IN buffer depth to 100 units.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
---
drivers/staging/ozwpan/ozhcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index 3548860..b0398c5 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -39,7 +39,7 @@
* Number of units of buffering to capture for an isochronous IN endpoint before
* allowing data to be indicated up.
*/
-#define OZ_IN_BUFFERING_UNITS 50
+#define OZ_IN_BUFFERING_UNITS 100
/* Name of our platform device.
*/
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] staging: ozwpan: Reset PORT_ENABLE bit.
2013-08-27 15:53 [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth Rupesh Gujare
@ 2013-08-27 15:53 ` Rupesh Gujare
2013-08-27 15:53 ` [PATCH 3/4] staging: ozwpan: Add debounce time before unregistering Rupesh Gujare
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Rupesh Gujare @ 2013-08-27 15:53 UTC (permalink / raw)
To: devel; +Cc: linux-usb, linux-kernel, gregkh
Reset PORT_ENABLE bit of port status on loosing PD.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
---
drivers/staging/ozwpan/ozhcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index b0398c5..39f5066 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -756,7 +756,7 @@ void oz_hcd_pd_departed(struct oz_port *port)
port->config_num = 0;
port->flags &= ~(OZ_PORT_F_PRESENT | OZ_PORT_F_DYING);
port->flags |= OZ_PORT_F_CHANGED;
- port->status &= ~USB_PORT_STAT_CONNECTION;
+ port->status &= ~(USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE);
port->status |= (USB_PORT_STAT_C_CONNECTION << 16);
/* If there is an endpont 0 then clear the pointer while we hold
* the spinlock be we deallocate it after releasing the lock.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] staging: ozwpan: Add debounce time before unregistering.
2013-08-27 15:53 [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth Rupesh Gujare
2013-08-27 15:53 ` [PATCH 2/4] staging: ozwpan: Reset PORT_ENABLE bit Rupesh Gujare
@ 2013-08-27 15:53 ` Rupesh Gujare
2013-08-27 15:53 ` [PATCH 4/4] staging: ozwpan: Return error, if PD is not connected Rupesh Gujare
2013-08-27 18:57 ` [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth Dan Carpenter
3 siblings, 0 replies; 6+ messages in thread
From: Rupesh Gujare @ 2013-08-27 15:53 UTC (permalink / raw)
To: devel; +Cc: linux-usb, linux-kernel, gregkh
Fixes following error caused during unloading driver.
[ 1127.542888] usb 5-1: USB disconnect, device number 2
[ 1127.542909] ozwpan ozwpan: remove, state 1
[ 1127.542933] usb usb5: USB disconnect, device number 1
[ 1127.618634] hub 5-0:1.0: hub_port_status failed (err = -19)
[ 1127.618647] hub_port_connect_change: 45 callbacks suppressed
[ 1127.618657] hub 5-0:1.0: connect-debounce failed, port 1 disabled
[ 1127.618668] hub 5-0:1.0: cannot disable port 1 (err = -19)
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
---
drivers/staging/ozwpan/ozhcd.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index 39f5066..d9c43c3 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -57,6 +57,10 @@
*/
#define EP0_TIMEOUT_COUNTER 13
+/* Debounce time HCD driver should wait before unregistering.
+ */
+#define OZ_HUB_DEBOUNCE_TIMEOUT 1500
+
/*
* Used to link urbs together and also store some status information for each
* urb.
@@ -2355,6 +2359,7 @@ error:
*/
void oz_hcd_term(void)
{
+ msleep(OZ_HUB_DEBOUNCE_TIMEOUT);
tasklet_kill(&g_urb_process_tasklet);
tasklet_kill(&g_urb_cancel_tasklet);
platform_device_unregister(g_plat_dev);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] staging: ozwpan: Return error, if PD is not connected.
2013-08-27 15:53 [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth Rupesh Gujare
2013-08-27 15:53 ` [PATCH 2/4] staging: ozwpan: Reset PORT_ENABLE bit Rupesh Gujare
2013-08-27 15:53 ` [PATCH 3/4] staging: ozwpan: Add debounce time before unregistering Rupesh Gujare
@ 2013-08-27 15:53 ` Rupesh Gujare
2013-08-27 17:27 ` Sergei Shtylyov
2013-08-27 18:57 ` [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth Dan Carpenter
3 siblings, 1 reply; 6+ messages in thread
From: Rupesh Gujare @ 2013-08-27 15:53 UTC (permalink / raw)
To: devel; +Cc: linux-usb, linux-kernel, gregkh
Return error if we receive write(), while PD is not connected.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
---
drivers/staging/ozwpan/ozcdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/ozwpan/ozcdev.c b/drivers/staging/ozwpan/ozcdev.c
index 03b41ee..22cb2ae 100644
--- a/drivers/staging/ozwpan/ozcdev.c
+++ b/drivers/staging/ozwpan/ozcdev.c
@@ -162,6 +162,8 @@ static ssize_t oz_cdev_write(struct file *filp, const char __user *buf,
spin_unlock_bh(&g_cdev.lock);
if (pd == NULL)
return -1;
+ if (!(pd->state & OZ_PD_S_CONNECTED))
+ return -ENXIO;
eb = &pd->elt_buff;
ei = oz_elt_info_alloc(eb);
if (ei == NULL) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] staging: ozwpan: Return error, if PD is not connected.
2013-08-27 15:53 ` [PATCH 4/4] staging: ozwpan: Return error, if PD is not connected Rupesh Gujare
@ 2013-08-27 17:27 ` Sergei Shtylyov
0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2013-08-27 17:27 UTC (permalink / raw)
To: Rupesh Gujare; +Cc: devel, linux-usb, linux-kernel, gregkh
Hello.
On 08/27/2013 07:53 PM, Rupesh Gujare wrote:
> Return error if we receive write(), while PD is not connected.
> Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
> ---
> drivers/staging/ozwpan/ozcdev.c | 2 ++
> 1 file changed, 2 insertions(+)
> diff --git a/drivers/staging/ozwpan/ozcdev.c b/drivers/staging/ozwpan/ozcdev.c
> index 03b41ee..22cb2ae 100644
> --- a/drivers/staging/ozwpan/ozcdev.c
> +++ b/drivers/staging/ozwpan/ozcdev.c
> @@ -162,6 +162,8 @@ static ssize_t oz_cdev_write(struct file *filp, const char __user *buf,
> spin_unlock_bh(&g_cdev.lock);
> if (pd == NULL)
> return -1;
Note that returning -EPERM here is hardly correct.
> + if (!(pd->state & OZ_PD_S_CONNECTED))
> + return -ENXIO;
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth
2013-08-27 15:53 [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth Rupesh Gujare
` (2 preceding siblings ...)
2013-08-27 15:53 ` [PATCH 4/4] staging: ozwpan: Return error, if PD is not connected Rupesh Gujare
@ 2013-08-27 18:57 ` Dan Carpenter
3 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2013-08-27 18:57 UTC (permalink / raw)
To: Rupesh Gujare; +Cc: devel, gregkh, linux-usb, linux-kernel
On Tue, Aug 27, 2013 at 04:53:40PM +0100, Rupesh Gujare wrote:
> Increase ISOC IN buffer depth to 100 units.
>
This change log is not useful. What are the user visible effects of
this bug?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-27 18:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 15:53 [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth Rupesh Gujare
2013-08-27 15:53 ` [PATCH 2/4] staging: ozwpan: Reset PORT_ENABLE bit Rupesh Gujare
2013-08-27 15:53 ` [PATCH 3/4] staging: ozwpan: Add debounce time before unregistering Rupesh Gujare
2013-08-27 15:53 ` [PATCH 4/4] staging: ozwpan: Return error, if PD is not connected Rupesh Gujare
2013-08-27 17:27 ` Sergei Shtylyov
2013-08-27 18:57 ` [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.