This is a bit backwards, but at least for testing my patches I thought this patch might be useful. It's Sebastian Andrzej Siewior's patch that fixes an interrupt problem, modified to apply after my patch series has been applied: diff -Nurp linux-2.6.37-isp1760-007/drivers/usb/host/isp1760-hcd.c linux-2.6.37-isp1760-007-intfix/drivers/usb/host/isp1760-hcd.c --- linux-2.6.37-isp1760-007/drivers/usb/host/isp1760-hcd.c 2011-02-23 13:29:18.225095730 +0100 +++ linux-2.6.37-isp1760-007-intfix/drivers/usb/host/isp1760-hcd.c 2011-02-23 14:48:11.825096580 +0100 @@ -33,6 +33,7 @@ struct isp1760_hcd { struct inter_packet_info atl_ints[32]; struct inter_packet_info int_ints[32]; struct memory_chunk memory_pool[BLOCKS]; + u32 atl_queued; /* periodic schedule support */ #define DEFAULT_I_TDPS 1024 @@ -837,6 +838,7 @@ static void enqueue_one_int_qtd(struct u static void enqueue_an_ATL_packet(struct usb_hcd *hcd, struct isp1760_qh *qh, struct isp1760_qtd *qtd) { + struct isp1760_hcd *priv = hcd_to_priv(hcd); u32 skip_map, or_map; u32 slot; u32 buffstatus; @@ -863,6 +865,11 @@ static void enqueue_an_ATL_packet(struct skip_map &= ~(1 << slot); isp176x_reg_write32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG, skip_map); + priv->atl_queued++; + if (priv->atl_queued == 2) + isp176x_reg_write32(hcd->regs, HC_INTERRUPT_ENABLE, + INTERRUPT_ENABLE_SOT_MASK); + buffstatus = isp176x_reg_read32(hcd->regs, HC_BUFFER_STATUS_REG); buffstatus |= ATL_BUFFER; isp176x_reg_write32(hcd->regs, HC_BUFFER_STATUS_REG, buffstatus); @@ -993,6 +1000,7 @@ static void do_atl_int(struct usb_hcd *h while (done_map) { status = 0; + priv->atl_queued--; slot = __ffs(done_map); done_map &= ~(1 << slot); @@ -1036,12 +1044,6 @@ static void do_atl_int(struct usb_hcd *h * device is not able to send data fast enough. * This happens mostly on slower hardware. */ - dev_notice(hcd->self.controller, - "Reloading ptd %p/%p... qh %p read: " - "%d of %zu done: %08x cur: %08x\n", qtd, - qtd->urb, qh, PTD_XFERRED_LENGTH(ptd.dw3), - qtd->length, done_map, - (1 << slot)); /* RL counter = ERR counter */ ptd.dw3 &= ~(0xf << 19); @@ -1064,6 +1066,12 @@ static void do_atl_int(struct usb_hcd *h ptd.dw0 |= PTD_VALID; isp176x_ptd_write(hcd->regs, ATL_PTD_OFFSET, slot, &ptd); + priv->atl_queued++; + if (priv->atl_queued == 2) + isp176x_reg_write32(hcd->regs, + HC_INTERRUPT_ENABLE, + INTERRUPT_ENABLE_SOT_MASK); + buffstatus = isp176x_reg_read32(hcd->regs, HC_BUFFER_STATUS_REG); buffstatus |= ATL_BUFFER; @@ -1154,6 +1162,9 @@ static void do_atl_int(struct usb_hcd *h skip_map = isp176x_reg_read32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG); } + if (priv->atl_queued <= 1) + isp176x_reg_write32(hcd->regs, HC_INTERRUPT_ENABLE, + INTERRUPT_ENABLE_MASK); } static void do_intl_int(struct usb_hcd *hcd) @@ -1644,7 +1655,7 @@ static irqreturn_t isp1760_irq(struct us goto leave; isp176x_reg_write32(hcd->regs, HC_INTERRUPT_REG, imask); - if (imask & HC_ATL_INT) + if (imask & (HC_ATL_INT | HC_SOT_INT)) do_atl_int(hcd); if (imask & HC_INTL_INT) diff -Nurp linux-2.6.37-isp1760-007/drivers/usb/host/isp1760-hcd.h linux-2.6.37-isp1760-007-intfix/drivers/usb/host/isp1760-hcd.h --- linux-2.6.37-isp1760-007/drivers/usb/host/isp1760-hcd.h 2011-02-23 13:18:07.049095864 +0100 +++ linux-2.6.37-isp1760-007-intfix/drivers/usb/host/isp1760-hcd.h 2011-02-23 14:48:11.825096580 +0100 @@ -69,6 +69,7 @@ void deinit_kmem_cache(void); #define HC_INTERRUPT_ENABLE 0x314 #define INTERRUPT_ENABLE_MASK (HC_INTL_INT | HC_ATL_INT | HC_EOT_INT) +#define INTERRUPT_ENABLE_SOT_MASK (HC_INTL_INT | HC_SOT_INT | HC_EOT_INT) #define HC_ISO_INT (1 << 9) #define HC_ATL_INT (1 << 8) -- Arvid Brodin Enea Services Stockholm AB -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html