aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1362-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/isp1362-hcd.c')
-rw-r--r--drivers/usb/host/isp1362-hcd.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index 43a39eb56cc6..662cd002adfc 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -226,7 +226,6 @@ static int claim_ptd_buffers(struct isp1362_ep_queue *epq,
226 226
227static inline void release_ptd_buffers(struct isp1362_ep_queue *epq, struct isp1362_ep *ep) 227static inline void release_ptd_buffers(struct isp1362_ep_queue *epq, struct isp1362_ep *ep)
228{ 228{
229 int index = ep->ptd_index;
230 int last = ep->ptd_index + ep->num_ptds; 229 int last = ep->ptd_index + ep->num_ptds;
231 230
232 if (last > epq->buf_count) 231 if (last > epq->buf_count)
@@ -236,10 +235,8 @@ static inline void release_ptd_buffers(struct isp1362_ep_queue *epq, struct isp1
236 epq->buf_map, epq->skip_map); 235 epq->buf_map, epq->skip_map);
237 BUG_ON(last > epq->buf_count); 236 BUG_ON(last > epq->buf_count);
238 237
239 for (; index < last; index++) { 238 bitmap_clear(&epq->buf_map, ep->ptd_index, ep->num_ptds);
240 __clear_bit(index, &epq->buf_map); 239 bitmap_set(&epq->skip_map, ep->ptd_index, ep->num_ptds);
241 __set_bit(index, &epq->skip_map);
242 }
243 epq->buf_avail += ep->num_ptds; 240 epq->buf_avail += ep->num_ptds;
244 epq->ptd_count--; 241 epq->ptd_count--;
245 242
@@ -1555,9 +1552,9 @@ static void isp1362_hub_descriptor(struct isp1362_hcd *isp1362_hcd,
1555 desc->wHubCharacteristics = cpu_to_le16((reg >> 8) & 0x1f); 1552 desc->wHubCharacteristics = cpu_to_le16((reg >> 8) & 0x1f);
1556 DBG(0, "%s: hubcharacteristics = %02x\n", __func__, cpu_to_le16((reg >> 8) & 0x1f)); 1553 DBG(0, "%s: hubcharacteristics = %02x\n", __func__, cpu_to_le16((reg >> 8) & 0x1f));
1557 desc->bPwrOn2PwrGood = (reg >> 24) & 0xff; 1554 desc->bPwrOn2PwrGood = (reg >> 24) & 0xff;
1558 /* two bitmaps: ports removable, and legacy PortPwrCtrlMask */ 1555 /* ports removable, and legacy PortPwrCtrlMask */
1559 desc->bitmap[0] = desc->bNbrPorts == 1 ? 1 << 1 : 3 << 1; 1556 desc->u.hs.DeviceRemovable[0] = desc->bNbrPorts == 1 ? 1 << 1 : 3 << 1;
1560 desc->bitmap[1] = ~0; 1557 desc->u.hs.DeviceRemovable[1] = ~0;
1561 1558
1562 DBG(3, "%s: exit\n", __func__); 1559 DBG(3, "%s: exit\n", __func__);
1563} 1560}