File tree Expand file tree Collapse file tree 2 files changed +47
-13
lines changed Expand file tree Collapse file tree 2 files changed +47
-13
lines changed Original file line number Diff line number Diff line change @@ -2883,6 +2883,26 @@ static void handle_stat0_irqs_superspeed(struct net2280 *dev,
2883
2883
return ;
2884
2884
}
2885
2885
2886
+ static void usb338x_handle_ep_intr (struct net2280 * dev , u32 stat0 )
2887
+ {
2888
+ u32 index ;
2889
+ u32 bit ;
2890
+
2891
+ for (index = 0 ; index < ARRAY_SIZE (ep_bit ); index ++ ) {
2892
+ bit = BIT (ep_bit [index ]);
2893
+
2894
+ if (!stat0 )
2895
+ break ;
2896
+
2897
+ if (!(stat0 & bit ))
2898
+ continue ;
2899
+
2900
+ stat0 &= ~bit ;
2901
+
2902
+ handle_ep_small (& dev -> ep [index ]);
2903
+ }
2904
+ }
2905
+
2886
2906
static void handle_stat0_irqs (struct net2280 * dev , u32 stat )
2887
2907
{
2888
2908
struct net2280_ep * ep ;
@@ -3107,20 +3127,31 @@ static void handle_stat0_irqs(struct net2280 *dev, u32 stat)
3107
3127
#undef w_length
3108
3128
3109
3129
next_endpoints :
3110
- /* endpoint data irq ? */
3111
- scratch = stat & 0x7f ;
3112
- stat &= ~0x7f ;
3113
- for (num = 0 ; scratch ; num ++ ) {
3114
- u32 t ;
3115
-
3116
- /* do this endpoint's FIFO and queue need tending? */
3117
- t = BIT (num );
3118
- if ((scratch & t ) == 0 )
3119
- continue ;
3120
- scratch ^= t ;
3130
+ if ((dev -> quirks & PLX_SUPERSPEED ) && dev -> enhanced_mode ) {
3131
+ u32 mask = (BIT (ENDPOINT_0_INTERRUPT ) |
3132
+ USB3380_IRQSTAT0_EP_INTR_MASK_IN |
3133
+ USB3380_IRQSTAT0_EP_INTR_MASK_OUT );
3134
+
3135
+ if (stat & mask ) {
3136
+ usb338x_handle_ep_intr (dev , stat & mask );
3137
+ stat &= ~mask ;
3138
+ }
3139
+ } else {
3140
+ /* endpoint data irq ? */
3141
+ scratch = stat & 0x7f ;
3142
+ stat &= ~0x7f ;
3143
+ for (num = 0 ; scratch ; num ++ ) {
3144
+ u32 t ;
3145
+
3146
+ /* do this endpoint's FIFO and queue need tending? */
3147
+ t = BIT (num );
3148
+ if ((scratch & t ) == 0 )
3149
+ continue ;
3150
+ scratch ^= t ;
3121
3151
3122
- ep = & dev -> ep [num ];
3123
- handle_ep_small (ep );
3152
+ ep = & dev -> ep [num ];
3153
+ handle_ep_small (ep );
3154
+ }
3124
3155
}
3125
3156
3126
3157
if (stat )
Original file line number Diff line number Diff line change @@ -168,6 +168,9 @@ struct net2280_regs {
168
168
#define ENDPOINT_B_INTERRUPT 2
169
169
#define ENDPOINT_A_INTERRUPT 1
170
170
#define ENDPOINT_0_INTERRUPT 0
171
+ #define USB3380_IRQSTAT0_EP_INTR_MASK_IN (0xF << 17)
172
+ #define USB3380_IRQSTAT0_EP_INTR_MASK_OUT (0xF << 1)
173
+
171
174
u32 irqstat1 ;
172
175
#define POWER_STATE_CHANGE_INTERRUPT 27
173
176
#define PCI_ARBITER_TIMEOUT_INTERRUPT 26
You can’t perform that action at this time.
0 commit comments