Skip to content

Commit 3b43d8a

Browse files
committed
Improve USB storage performance
1 parent d6ac6bf commit 3b43d8a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libogc/usbstorage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ static s32 __cycle(usbstorage_handle *dev, u8 lun, u8 *buffer, u32 len, u8 *cb,
317317
{
318318
u32 thisLen = _len > max_size ? max_size : _len;
319319

320-
if ((u32)_buffer&0x1F || !((u32)_buffer&0x10000000)) {
320+
if (!SYS_IsDMAAddress(_buffer, 32) || !SYS_IsDMAAddress(_buffer + thisLen, 1)) {
321321
if (write) memcpy(dev->buffer, _buffer, thisLen);
322322
retval = __USB_BlkMsgTimeout(dev, ep, thisLen, dev->buffer, usbtimeout);
323323
if (!write && retval > 0)

0 commit comments

Comments
 (0)