- Timestamp:
- Jun 2, 2013, 5:10:06 AM (12 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/Makefile
r160 r162 32 32 BLD_MINOR=28 # must be 2 digits 33 33 BLD_REV=0 # not used at this time 34 FIXPACK= Test Build34 FIXPACK= 35 35 36 36 !ifndef %WATCOM # if not defined in the environment -
trunk/src/os2ahci/README
r161 r162 382 382 ========== 383 383 384 v.1.28 30-May-2013 - David Azarewicz384 v.1.28 01-Jun-2013 - David Azarewicz 385 385 Reworked trap dump kernel exit 386 386 Removed unused IDC entry point. 387 Some work on suspend/resume routines. 387 Reworked suspend/resume routines. 388 Implemented a temporary hack to make resume work reasonably well. 388 389 Suspend/resume is only supported on eCS systems with ACPI. 390 Suspend/resume is known to not work reliably and cannot be further 391 addressed in this driver. 389 392 390 393 v.1.27 23-Apr-2013 - David Azarewicz -
trunk/src/os2ahci/ahci.c
r161 r162 1736 1736 static u8 total_dev_cnt; 1737 1737 1738 if (p >= AHCI_MAX_PORTS) return; 1739 if (d >= AHCI_MAX_DEVS) return; 1740 1738 1741 if (ai->port_max < p) { 1739 1742 ai->port_max = p; -
trunk/src/os2ahci/ahci.h
r155 r162 58 58 #define AHCI_PCI_BAR 5 59 59 #define AHCI_MAX_PORTS 16 /* Spec says 32, but we only support 16 */ 60 #define AHCI_MAX_DEVS 8 60 61 #define AHCI_MAX_SG 48 /* hardware max is 64K */ 61 62 #define AHCI_MAX_SG_ELEMENT_LEN (1UL << 22) -
trunk/src/os2ahci/apm.c
r161 r162 133 133 writel(ai->mmio + HOST_CTL, readl(ai->mmio + HOST_CTL) & ~HOST_IRQ_EN); 134 134 readl(ai->mmio + HOST_CTL); /* flush */ 135 136 /* TODO: put the device into the D3 state */ 135 137 } 136 138 … … 138 140 init_complete = 0; 139 141 140 /* TODO: put the device into the D3 state */141 142 142 suspended = 1; 143 143 dprintf("suspend() finished\n"); … … 155 155 dprintf("resume()\n"); 156 156 157 /* TODO: put the device into the D0 state */158 159 for (a = 0; a < ad_info_cnt; a++) { 160 AD_INFO *ai = ad_infos + a;157 for (a = 0; a < ad_info_cnt; a++) { 158 AD_INFO *ai = ad_infos + a; 159 160 /* TODO: put the device into the D0 state */ 161 161 162 162 //ahci_reset_controller(ai); … … 181 181 182 182 /* restart engine to resume IORB processing */ 183 /* The resume_sleep_flag and probably rearming the ctx hook is a temporary hack 184 * to make resume kind of work when I/O operations are outstanding or started 185 * during the suspend operation. This behavior may change with future versions 186 * of the ACPI software which will make this hack unnecessary. 187 */ 183 188 resume_sleep_flag = 5000; 184 189 DevHelp_ArmCtxHook(0, engine_ctxhook_h); -
trunk/src/os2ahci/ata.c
r160 r162 605 605 606 606 if (is_lvm_geometry(iorb)) Method = "LVM"; 607 ad_infos[a].ports[p].devs[0].dev_info.Cylinders = geometry->TotalCylinders; 608 ad_infos[a].ports[p].devs[0].dev_info.HeadsPerCylinder = geometry->NumHeads; 609 ad_infos[a].ports[p].devs[0].dev_info.SectorsPerTrack = geometry->SectorsPerTrack; 610 ad_infos[a].ports[p].devs[0].dev_info.TotalSectors = geometry->TotalSectors; 611 ad_infos[a].ports[p].devs[0].dev_info.Method = Method; 607 612 608 613 dprintf("Drive geometry: %ld cylinders, %d heads, %d sectors per track (%ldMB) (%s)\n", -
trunk/src/os2ahci/os2ahci.c
r161 r162 224 224 suspended = 0; 225 225 resume_sleep_flag = 0; 226 memset(ad_infos, 0, sizeof(ad_infos)); 226 227 227 228 /* set device helper entry point */ -
trunk/src/os2ahci/os2ahci.h
r161 r162 333 333 } IORB_QUEUE; 334 334 335 typedef struct { 336 USHORT Cylinders; 337 USHORT HeadsPerCylinder; 338 USHORT SectorsPerTrack; 339 ULONG TotalSectors; 340 char *Method; 341 } DEV_INFO; 342 335 343 /* port information structure */ 336 344 typedef struct { 337 345 IORB_QUEUE iorb_queue; /* IORB queue for this port */ 338 unsigned dev_max : 4; /* maximum device number on this port (0 -15) */346 unsigned dev_max : 4; /* maximum device number on this port (0..AHCI_MAX_DEVS-1) */ 339 347 unsigned cmd_slot : 5; /* current command slot index (using round- 340 348 * robin indexes to prevent starvation) */ … … 353 361 unsigned ncq_max : 5; /* maximum tag number for queued commands */ 354 362 UNITINFO _far *unit_info; /* pointer to modified unit info */ 355 } devs[15]; 363 DEV_INFO dev_info; 364 } devs[AHCI_MAX_DEVS]; 356 365 } P_INFO; 357 366 … … 360 369 PCI_ID *pci; /* pointer to corresponding PCI ID */ 361 370 362 unsigned port_max : 5; /* maximum port number (0 -31) */371 unsigned port_max : 5; /* maximum port number (0..AHCI_MAX_PORTS-1) */ 363 372 unsigned cmd_max : 5; /* maximum cmd slot number (0-31) */ 364 373 unsigned port_scan_done : 1; /* if != 0, port scan already done */ -
trunk/src/os2ahci/trace.c
r160 r162 246 246 for (d = 0; d <= pi->dev_max; d++) { 247 247 if (!pi->devs[d].present) continue; 248 ntprintf(" Drive %d: atapi=%d, removable=%d\n", d, pi->devs[d].atapi, pi->devs[d].removable); 248 249 ntprintf(" Drive %d:"); 250 if (pi->devs[d].atapi) ntprintf(" atapi"); 251 if (pi->devs[d].removable) ntprintf(" removable"); 252 if (pi->devs[d].dev_info.Method != NULL) 253 ntprintf(" %d cylinders, %d heads, %d sectors per track (%ldMB) (%s)", 254 pi->devs[d].dev_info.Cylinders, pi->devs[d].dev_info.HeadsPerCylinder, pi->devs[d].dev_info.SectorsPerTrack, 255 pi->devs[d].dev_info.TotalSectors/2048, pi->devs[d].dev_info.Method); 256 ntprintf("\n"); 249 257 } 250 258 }
Note:
See TracChangeset
for help on using the changeset viewer.