Changeset 157 for trunk/src/os2ahci/ata.c
- Timestamp:
- May 8, 2013, 5:10:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/ata.c
r156 r157 443 443 int check_lvm(IORBH _far *iorb, ULONG sector) 444 444 { 445 ADD_WORKSPACE _far *aws = add_workspace(iorb);445 DLA_Table_Sector *pDLA = (DLA_Table_Sector*)add_workspace(iorb)->buf; 446 446 AD_INFO *ai = ad_infos + iorb_unit_adapter(iorb); 447 447 GEOMETRY _far *geometry = ((IORB_GEOMETRY _far *) iorb)->pGeometry; 448 PDLA_Table_Sector pDLA;449 448 int p = iorb_unit_port(iorb); 450 449 int rc; … … 453 452 AP_SECTOR_28, (u32) sector-1, 454 453 AP_COUNT, (u16) 1, 455 AP_VADDR, (void _far *) aws->buf, 512,454 AP_VADDR, (void _far *) pDLA, 512, 456 455 AP_DEVICE, 0x40, 457 456 AP_END); 458 457 if (rc) return 0; 459 458 460 pDLA = (PDLA_Table_Sector)aws->buf;461 459 ddphex(pDLA, sizeof(DLA_Table_Sector), "DLA sector %d:\n", sector-1); 462 460 463 461 if ((pDLA->DLA_Signature1 == DLA_TABLE_SIGNATURE1) && (pDLA->DLA_Signature2 == DLA_TABLE_SIGNATURE2)) { 464 ddprintf("is_lvm_geometry found at sector %d\n", sector );462 ddprintf("is_lvm_geometry found at sector %d\n", sector-1); 465 463 geometry->TotalCylinders = pDLA->Cylinders; 466 464 geometry->NumHeads = pDLA->Heads_Per_Cylinder; 467 465 geometry->SectorsPerTrack = pDLA->Sectors_Per_Track; 466 geometry->TotalSectors = pDLA->Cylinders * pDLA->Heads_Per_Cylinder * pDLA->Sectors_Per_Track; 468 467 return 1; 469 468 } … … 605 604 if (is_lvm_geometry(iorb)) Method = "LVM"; 606 605 607 if (debug) { 608 printf("Drive geometry: %d cylinders, %d heads, %d sectors per track (%ldMB) (%s)\n", 609 (u16) geometry->TotalCylinders, (u16) geometry->NumHeads, (u16) geometry->SectorsPerTrack, 610 (u32) (geometry->TotalSectors / 2048), Method); 611 } 606 dprintf("Drive geometry: %ld cylinders, %d heads, %d sectors per track (%ldMB) (%s)\n", 607 (u32) geometry->TotalCylinders, (u16) geometry->NumHeads, (u16) geometry->SectorsPerTrack, 608 (u32) (geometry->TotalSectors / 2048), Method); 612 609 613 610 /* tell interrupt handler that this IORB is complete */
Note:
See TracChangeset
for help on using the changeset viewer.