Changeset 80 for trunk/src/os2ahci/os2ahci.c
- Timestamp:
- Mar 1, 2011, 10:10:11 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/os2ahci.c
r77 r80 101 101 /* apapter/port-specific options saved when parsing the command line */ 102 102 u8 emulate_scsi[MAX_AD][AHCI_MAX_PORTS]; 103 u8 disable_ncq[MAX_AD][AHCI_MAX_PORTS];103 u8 enable_ncq[MAX_AD][AHCI_MAX_PORTS]; 104 104 u8 link_speed[MAX_AD][AHCI_MAX_PORTS]; 105 105 u8 link_power[MAX_AD][AHCI_MAX_PORTS]; … … 261 261 case 'n': 262 262 /* disable NCQ */ 263 set_port_option( disable_ncq, !invert_option);263 set_port_option(enable_ncq, !invert_option); 264 264 break; 265 265 … … 789 789 * requests. 790 790 * 791 * In order to support applications that can't deal with ATAPI devi es791 * In order to support applications that can't deal with ATAPI devices 792 792 * (i.e. need a SCSI adapter) os2ahci will optionally report ATAPI 793 793 * dvices as SCSI devices. The corresponding SCSI adapter doesn't 794 * really 794 * really exist and is only reported here for the IOCM_GET_DEVICETABLE 795 795 * request. The units attached to this adapter will use the real HW 796 796 * unit IDs, thus we'll never receive a command specific to the … … 1164 1164 1165 1165 /****************************************************************************** 1166 * Complete an IORB. Itshould be called without the adapter-level spinlock1166 * Complete an IORB. This should be called without the adapter-level spinlock 1167 1167 * to allow the IORB completion routine to perform whatever processing it 1168 1168 * requires. This implies that the IORB should no longer be in any global … … 1220 1220 /****************************************************************************** 1221 1221 * Lock the adapter, waiting for availability if necessary. This is expected 1222 * to be called without the driver-level spinlock aquired. 1222 * to be called at task/request time without the driver-level spinlock 1223 * aquired. Don't call at interrupt time. 1223 1224 */ 1224 1225 void lock_adapter(AD_INFO *ai) … … 1282 1283 */ 1283 1284 DevHelp_ArmCtxHook(0, reset_ctxhook_h); 1285 1286 /* Set up a watchdog timer which calls the context hook manually in case 1287 * some kernel thread is looping around the IORB_COMPLETE status bit 1288 * without yielding the CPU (kernel threads don't preempt). This shouldn't 1289 * happen per design because kernel threads are supposed to yield but it 1290 * does in the early boot phase. 1291 */ 1292 ADD_StartTimerMS(&th_reset_watchdog, 5000, (PFN) reset_watchdog, 0, 0); 1293 } 1294 1295 /****************************************************************************** 1296 * Reset handler watchdog. If a timeout occurs, a context hook is armed which 1297 * will execute as soon as a kernel thread yields the CPU. However, some 1298 * kernel components won't yield the CPU during the early boot phase and the 1299 * only way to kick some sense into those components is to run the context 1300 * hook right inside this timer callback. Not exactly pretty, especially 1301 * considering the fact that context hooks were implemented to prevent running 1302 * lengthy operations like a port reset at task time, but without this 1303 * watchdog mechanism we run the risk of getting completely stalled by device 1304 * problems during the early boot phase. 1305 */ 1306 void _cdecl _far reset_watchdog(ULONG timer_handle, ULONG p1, 1307 ULONG p2) 1308 { 1309 /* reset watchdog timer */ 1310 ADD_CancelTimer(timer_handle); 1311 dprintf("reset watchdog invoked\n"); 1312 1313 /* call context hook manually */ 1314 reset_ctxhook(0); 1284 1315 } 1285 1316
Note:
See TracChangeset
for help on using the changeset viewer.