Changeset 39 for trunk/src/os2ahci
- Timestamp:
- Nov 8, 2010, 9:40:19 PM (15 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/ata.c
r38 r39 2 2 * ata.c - ATA command processing 3 3 * 4 * Copyright (c) 2010 Christian Mueller. Parts copied from/inspired by the 5 * Linux AHCI driver; those parts are (c) Linux AHCI/ATA maintainers 4 * Copyright (c) 2010 Christian Mueller, Markus Thielen. 5 * Parts copied from/inspired by the Linux AHCI driver; 6 * those parts are (c) Linux AHCI/ATA maintainers 6 7 * 7 8 * This program is free software; you can redistribute it and/or modify … … 462 463 463 464 /* extract total number of sectors */ 464 if (id_buf[ATA_ID_CFS_ENABLE_2] & 0x40 ) {465 if (id_buf[ATA_ID_CFS_ENABLE_2] & 0x400) { 465 466 /* 48-bit LBA supported */ 466 467 if (ATA_CAPACITY48_H(id_buf) != 0) { … … 483 484 CUR_CAPACITY(id_buf) == CUR_HEADS(id_buf) * 484 485 CUR_CYLS(id_buf) * 485 486 CUR_SECTORS(id_buf)) { 486 487 /* use BIOS-supplied values for geometry */ 487 488 geometry->NumHeads = CUR_HEADS(id_buf); … … 496 497 geometry->TotalCylinders = ATA_CYLS(id_buf); 497 498 498 } else { 499 /* construct values based on typical [SCSI] BIOS algorithms */ 499 } 500 501 /* MT: if neither ATA nor BIOS supply valid data, or if their 502 * CHS values result in a sector count lower than determined, 503 * we use a typical [SCSI] BIOS algorithm 504 */ 505 if ((u32) geometry->NumHeads * (u32) geometry->SectorsPerTrack * 506 (u32) geometry->TotalCylinders < geometry->TotalSectors) { 500 507 geometry->NumHeads = 255; 501 508 geometry->SectorsPerTrack = 63; -
trunk/src/os2ahci/ata.h
r38 r39 25 25 * Macros to access geometry values in the ATA ID buffer 26 26 */ 27 #define ATA_CYLS(id_buf) *((u 32*) (id_buf + ATA_ID_CYLS))28 #define ATA_HEADS(id_buf) *((u 32*) (id_buf + ATA_ID_HEADS))29 #define ATA_SECTORS(id_buf) *((u 32*) (id_buf + ATA_ID_SECTORS))27 #define ATA_CYLS(id_buf) *((u16 *) (id_buf + ATA_ID_CYLS)) 28 #define ATA_HEADS(id_buf) *((u16 *) (id_buf + ATA_ID_HEADS)) 29 #define ATA_SECTORS(id_buf) *((u16 *) (id_buf + ATA_ID_SECTORS)) 30 30 #define ATA_CAPACITY(id_buf) *((u32 *) (id_buf + ATA_ID_LBA_CAPACITY)) 31 31 … … 33 33 #define ATA_CAPACITY48_H(id_buf) *((u32 *) (id_buf + ATA_ID_LBA_CAPACITY_2 + 2)) 34 34 35 #define CUR_CYLS(id_buf) *((u 32*) (id_buf + ATA_ID_CUR_CYLS))36 #define CUR_HEADS(id_buf) *((u 32*) (id_buf + ATA_ID_CUR_HEADS))37 #define CUR_SECTORS(id_buf) *((u 32*) (id_buf + ATA_ID_CUR_SECTORS))35 #define CUR_CYLS(id_buf) *((u16 *) (id_buf + ATA_ID_CUR_CYLS)) 36 #define CUR_HEADS(id_buf) *((u16 *) (id_buf + ATA_ID_CUR_HEADS)) 37 #define CUR_SECTORS(id_buf) *((u16 *) (id_buf + ATA_ID_CUR_SECTORS)) 38 38 #define CUR_CAPACITY(id_buf) *((u32 *) (id_buf + ATA_ID_CUR_CAPACITY)) 39 39 -
trunk/src/os2ahci/atapi.c
r13 r39 2 2 * atapi.c - ATAPI command processing 3 3 * 4 * Copyright (c) 2010 Christian Mueller. Parts copied from/inspired by the 5 * Linux AHCI driver; those parts are (c) Linux AHCI/ATA maintainers 4 * Copyright (c) 2010 Christian Mueller, Markus Thielen. 5 * Parts copied from/inspired by the Linux AHCI driver; 6 * those parts are (c) Linux AHCI/ATA maintainers 6 7 * 7 8 * This program is free software; you can redistribute it and/or modify -
trunk/src/os2ahci/os2ahci.def
r36 r39 1 1 library os2ahci 2 Description '$@#thi.guten (www.thiguten.de):1.00.2010110 5#@OS/2 AHCI Adapter Device Driver'2 Description '$@#thi.guten (www.thiguten.de):1.00.20101108#@OS/2 AHCI Adapter Device Driver' 3 3 protmode 4 4 -
trunk/src/os2ahci/pci.c
r36 r39 2 2 * PCI.c - PCI constants and detection code for os2ahci driver 3 3 * 4 * Copyright (c) 2010 Christian Mueller. Parts copied from/inspired by the 5 * LINUX ahci driver; those parts are (c) Linux AHCI/ATA maintainers 4 * Copyright (c) 2010 Christian Mueller, Markus Thielen. 5 * Parts copied from/inspired by the LINUX ahci driver; 6 * those parts are (c) Linux AHCI/ATA maintainers 6 7 * 7 8 * This program is free software; you can redistribute it and/or modify
Note:
See TracChangeset
for help on using the changeset viewer.