Chameleon

Chameleon Commit Details

Date:2015-02-12 21:32:42 (9 years 2 months ago)
Author:ErmaC
Commit:2571
Parents: 2570
Message:Fix miscalculation in usb.c (Credits to Zenith432)
Changes:
M/trunk/i386/libsaio/usb.c
M/trunk/i386/libsaio/saio_internal.h
M/trunk/i386/libsaio/biosfn.c

File differences

trunk/i386/libsaio/usb.c
162162
163163
164164
165
166
167
165
168166
169167
170168
......
402400
403401
404402
405
403
406404
407405
408406
DBG("Clearing USBLEGCTLSTS\n");
pci_config_write32(pci_dev->dev.addr, eecp + 4, 0);//usblegctlsts
// if delay value is in milliseconds it doesn't appear to work.
// setting value to anything up to 65535 does not add the expected delay here.
delay(100);
delay(100000);
usbcmd = *((unsigned int*)(opaddr));
usbsts = *((unsigned int*)(opaddr + 4));
timeOut = 40;
while (timeOut--)
{
delay(1);
delay(500);
value = *(uint32_t const volatile*) (bar0 + extendCap);
if (value == ~0)
{
trunk/i386/libsaio/biosfn.c
10071007
10081008
10091009
1010
1010
10111011
10121012
10131013
1014
1015
1014
1015
10161016
10171017
10181018
//==============================================================================
void delay(int ms)
void delay(int us)
{
bb.intno = 0x15;
bb.eax.r.h = 0x86;
bb.ecx.rr = ms >> 16;
bb.edx.rr = ms & 0xFFFF;
bb.ecx.rr = us >> 16;
bb.edx.rr = us & 0xFFFF;
bios(&bb);
}
trunk/i386/libsaio/saio_internal.h
5353
5454
5555
56
56
5757
5858
5959
extern int readKeyboardStatus(void);
extern int readKeyboardShiftFlags(void);
extern unsigned int time18(void);
extern void delay(int ms);
extern void delay(int us);
extern unsigned int get_diskinfo(int dev);
#if APM_SUPPORT
extern int APMPresent(void);

Archive Download the corresponding diff file

Revision: 2571