Changeset 86
- Timestamp:
- Apr 28, 2011, 7:41:44 PM (14 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/ahci.c
r82 r86 1236 1236 1237 1237 /****************************************************************************** 1238 * set device into IDLE mode (spin down); this was used during 1239 * debugging/testing and is still there since it does not hurt... 1238 * Set device into IDLE mode (spin down); this was used during 1239 * debugging/testing and is now unused; it's still there in case we need it 1240 * again... 1241 * 1240 1242 * If 'idle' is != 0, the idle timeout is set to 5 seconds, otherwise it 1241 1243 * is turned off. … … 1258 1260 * the driver-level spinlock when actually changing the driver state (IORB 1259 1261 * queues, ...) 1262 * 1263 * NOTE: OS/2 expects the carry flag set upon return from an interrupt 1264 * handler if the interrupt has not been handled. We do this by 1265 * shifting the return code from this function one bit to the right, 1266 * thus the return code must set bit 0 in this case. 1260 1267 */ 1261 1268 int ahci_intr(u16 irq) -
trunk/src/os2ahci/ata.c
r82 r86 47 47 * be 0 for the time being. 48 48 * 49 * - 'cmd' is pass wd as 16-bit integer because the compiler would push49 * - 'cmd' is passed as 16-bit integer because the compiler would push 50 50 * a 'u8' as 16-bit value (it's a fixed argument) and the stdarg 51 51 * macros would screw up the address of the first variable argument -
trunk/src/os2ahci/ioctl.c
r84 r86 232 232 while (!(ic->iorb.iorbh.Status & IORB_DONE)) { 233 233 # ifndef OS2AHCI_SMP 234 drv_lock = 0;234 drv_lock = 0; 235 235 # endif 236 236 DevHelp_ProcBlock((ULONG) (void _far *) &ic->iorb.iorbh, 30000, 1); -
trunk/src/os2ahci/libc.c
r82 r86 715 715 static void long_to_asc(long val, char _far *buf, int base, int zero, int flen) 716 716 { 717 register unsigned long abs_val = (unsigned long) val;717 register unsigned long abs_val; 718 718 char tmp[80]; 719 719 char _far *ptmp = tmp; … … 725 725 } 726 726 727 abs_val = (unsigned long) ((val < 0 && base <= 10) ? -val : val); 727 728 tmp[sizeof(tmp) - 1] = '\0'; 729 728 730 for (s = ptmp + sizeof(tmp) - 2; s > ptmp; s--) { 729 731 *s = hex_digits[abs_val % base]; … … 734 736 } 735 737 738 /* left-pad the resulting number with zeros or spaces up to 'flen' */ 739 while (flen > 0) { 740 *(--s) = (zero) ? '0' : ' '; 741 flen--; 742 } 743 736 744 /* prepend minus sign if val was negative and base is decimal or less */ 737 745 if (val < 0 && base <= 0) { … … 740 748 } 741 749 742 /* left-pad the resulting number with zeros or spaces up to 'flen' */743 while (flen > 0) {744 *(--s) = (zero) ? '0' : ' ';745 flen--;746 }747 748 750 strcpy(buf, s); 749 751 } -
trunk/src/os2ahci/os2ahci.c
r82 r86 430 430 431 431 if (iorb_driver_level(iorb)) { 432 /* adapter-level IORB */432 /* driver-level IORB */ 433 433 iorb->UnitHandle = 0; 434 434 iorb_queue_add(&driver_queue, iorb); … … 531 531 * 532 532 * - Driver-level IORB handlers must not access the hardware of a 533 * particular adapter if it's flagged as 'busy' 533 * particular adapter if it's flagged as 'busy' by another IORB. 534 534 */ 535 535 int trigger_engine_1(void) … … 1308 1308 * hook right inside this timer callback. Not exactly pretty, especially 1309 1309 * considering the fact that context hooks were implemented to prevent running 1310 * lengthy operations like a port reset at tasktime, but without this1310 * lengthy operations like a port reset at interrupt time, but without this 1311 1311 * watchdog mechanism we run the risk of getting completely stalled by device 1312 1312 * problems during the early boot phase. -
trunk/src/os2ahci/version.h
r85 r86 9 9 10 10 11 #define VERSION 11 0/* driver version (2 implied decimals) */11 #define VERSION 111 /* driver version (2 implied decimals) */ 12 12
Note:
See TracChangeset
for help on using the changeset viewer.