Skip to content

Commit 0f62745

Browse files
committed
Some fixes
Split transaction retry count set to infinite. Full-speed interrupt interval caluclation fixed.
1 parent 3d6d88c commit 0f62745

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

kernel/uspi/dwhcixferstagedata.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
#include <uspios.h>
2626
#include <uspi/assert.h>
2727

28-
#define MAX_SPLIT_CYCLES 100
29-
3028
void DWHCITransferStageData (TDWHCITransferStageData *pThis, unsigned nChannel, TUSBRequest *pURB, boolean bIn, boolean bStatusStage)
3129
{
3230
assert (pThis != 0);
@@ -36,7 +34,6 @@ void DWHCITransferStageData (TDWHCITransferStageData *pThis, unsigned nChannel,
3634
pThis->m_bIn = bIn;
3735
pThis->m_bStatusStage = bStatusStage;
3836
pThis->m_bSplitComplete = FALSE;
39-
pThis->m_nSplitCycles = MAX_SPLIT_CYCLES;
4037
pThis->m_nTotalBytesTransfered = 0;
4138
pThis->m_nState = 0;
4239
pThis->m_nSubState = 0;
@@ -246,8 +243,7 @@ unsigned DWHCITransferStageDataGetSubState (TDWHCITransferStageData *pThis)
246243

247244
boolean DWHCITransferStageDataBeginSplitCycle (TDWHCITransferStageData *pThis)
248245
{
249-
assert (pThis != 0);
250-
return pThis->m_nSplitCycles-- > 0;
246+
return TRUE;
251247
}
252248

253249
unsigned DWHCITransferStageDataGetChannelNumber (TDWHCITransferStageData *pThis)

kernel/uspi/dwhcixferstagedata.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ typedef struct TDWHCITransferStageData
4040

4141
boolean m_bSplitTransaction;
4242
boolean m_bSplitComplete;
43-
unsigned m_nSplitCycles;
4443

4544
TUSBDevice *m_pDevice; // cached from *pURB
4645
TUSBEndpoint *m_pEndpoint;

kernel/uspi/usbendpoint.c

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void USBEndpoint2 (TUSBEndpoint *pThis, TUSBDevice *pDevice, const TUSBEndpointD
7676
}
7777

7878
// see USB 2.0 spec chapter 9.6.6
79-
if (USBDeviceGetSpeed (pThis->m_pDevice) == USBSpeedLow)
79+
if (USBDeviceGetSpeed (pThis->m_pDevice) != USBSpeedHigh)
8080
{
8181
pThis->m_nInterval = ucInterval;
8282
}
@@ -89,18 +89,11 @@ void USBEndpoint2 (TUSBEndpoint *pThis, TUSBDevice *pDevice, const TUSBEndpointD
8989

9090
unsigned nValue = 1 << (ucInterval - 1);
9191

92-
if (USBDeviceGetSpeed (pThis->m_pDevice) == USBSpeedFull)
93-
{
94-
pThis->m_nInterval = nValue;
95-
}
96-
else
97-
{
98-
pThis->m_nInterval = nValue / 8;
92+
pThis->m_nInterval = nValue / 8;
9993

100-
if (pThis->m_nInterval < 1)
101-
{
102-
pThis->m_nInterval = 1;
103-
}
94+
if (pThis->m_nInterval < 1)
95+
{
96+
pThis->m_nInterval = 1;
10497
}
10598
}
10699
}

0 commit comments

Comments
 (0)