summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRupesh Gujare <rupesh.gujare@atmel.com>2013-08-05 17:40:15 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-12 21:58:34 (GMT)
commita66698110b7a286d57df023eaa6c0e50503c4d7b (patch)
treef3b47b92cb4adfd3030d4be72d0bebf3ff38a26d /drivers
parentd772983d2a392a139c544a97014ed95554b09ad1 (diff)
downloadlinux-fsl-qoriq-a66698110b7a286d57df023eaa6c0e50503c4d7b.tar.xz
staging: ozwpan: Return correct hub status.
Fix a bug where we were not returning correct hub status for 8th port. Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/ozwpan/ozhcd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index 26eaa74..f38d036 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -1865,17 +1865,24 @@ static int oz_hcd_hub_status_data(struct usb_hcd *hcd, char *buf)
int i;
buf[0] = 0;
+ buf[1] = 0;
spin_lock_bh(&ozhcd->hcd_lock);
for (i = 0; i < OZ_NB_PORTS; i++) {
if (ozhcd->ports[i].flags & OZ_PORT_F_CHANGED) {
oz_dbg(HUB, "Port %d changed\n", i);
ozhcd->ports[i].flags &= ~OZ_PORT_F_CHANGED;
- buf[0] |= 1<<(i+1);
+ if (i < 7)
+ buf[0] |= 1 << (i+1);
+ else
+ buf[1] |= 1 << (i-7);
}
}
spin_unlock_bh(&ozhcd->hcd_lock);
- return buf[0] ? 1 : 0;
+ if (buf[0] != 0 || buf[1] != 0)
+ return 2;
+ else
+ return 0;
}
/*------------------------------------------------------------------------------
* Context: process