Changeset 171
- Timestamp:
- Sep 7, 2013, 5:52:45 PM (12 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/Makefile
r169 r171 153 153 @AddToFile $^@,$#define BLD_MONTH,DATEMONTH 154 154 @AddToFile $^@,$#define BLD_DAY,DATEDAY 155 @AddToFile $^@,$#define BLDLEVEL,BLDLEVEL2,$(VENDOR),$(BLD_MAJOR).$(BLD_MINOR),AHCI Driver (c) Mensys BV 2013,$(FIXPACK)155 @AddToFile $^@,$#define BLDLEVEL,BLDLEVEL2,$(VENDOR),$(BLD_MAJOR).$(BLD_MINOR),AHCI Driver (c) 2013 $(VENDOR),$(FIXPACK) 156 156 157 157 .asm.obj: .autodepend -
trunk/src/os2ahci/README
r169 r171 17 17 Copyright (c) 2011 thi.guten Software Development 18 18 Copyright (c) 2011-2013 Mensys B.V. 19 Portions copyright (c) 2013 David Azarewicz19 Copyright (c) 2013 David Azarewicz 20 20 21 21 Authors: Christian Mueller, Markus Thielen … … 394 394 ========== 395 395 396 v.1.31 04-Aug-2013 - David Azarewicz396 v.1.31 21-Aug-2013 - David Azarewicz 397 397 Enhanced debug output. 398 398 Added code to check for bad geometries reported by the BIOS and fix them. 399 Fixed a PCI ID coding error that has been there since version 1.01. 399 400 400 401 v.1.30 29-Jun-2013 - David Azarewicz -
trunk/src/os2ahci/ahci.c
r169 r171 4 4 * Copyright (c) 2011 thi.guten Software Development 5 5 * Copyright (c) 2011 Mensys B.V. 6 * Portions copyright (c) 2013 David Azarewicz6 * Copyright (c) 2013 David Azarewicz 7 7 * 8 8 * Authors: Christian Mueller, Markus Thielen … … 234 234 } 235 235 236 #if 0237 /* init_reset is set by default. This code is commented out to allow238 * unsetting init_reset by a command line switch239 */240 236 if ((ai->bios_config[HOST_CTL / sizeof(u32)] & HOST_AHCI_EN) == 0 && 241 ai->pci ->vendor == PCI_VENDOR_ID_INTEL) {237 ai->pci_vendor == PCI_VENDOR_ID_INTEL) { 242 238 /* Adapter is not in AHCI mode and the spec says a COMRESET is 243 239 * required when switching from SATA to AHCI mode and vice versa. … … 245 241 init_reset = 1; 246 242 } 247 #endif248 243 249 244 #ifdef DEBUG … … 295 290 } 296 291 297 if (ai->pci ->vendor == PCI_VENDOR_ID_JMICRON &&298 ai->pci ->device == 0x2361 && ai->port_map != 1) {292 if (ai->pci_vendor == PCI_VENDOR_ID_JMICRON && 293 ai->pci_device == 0x2361 && ai->port_map != 1) { 299 294 dprintf("JMB361 has only one port, port_map 0x%lx -> 0x%lx\n", ai->port_map, 1); 300 295 ai->port_map = 1; … … 353 348 354 349 if ((ai->bios_config[HOST_CTL / sizeof(u32)] & HOST_AHCI_EN) == 0 && 355 ai->pci ->vendor == PCI_VENDOR_ID_INTEL) {350 ai->pci_vendor == PCI_VENDOR_ID_INTEL) { 356 351 357 352 /* This BIOS apparently accesses the controller via SATA registers and … … 455 450 ahci_restore_initial_config(ai); 456 451 457 if (ai->pci ->vendor == PCI_VENDOR_ID_INTEL) {452 if (ai->pci_vendor == PCI_VENDOR_ID_INTEL) { 458 453 u32 tmp16 = 0; 459 454 … … 1243 1238 } 1244 1239 1240 /* 0x89 = BSY(0x80) | DRQ(0x08) | ERR(0x01) */ 1245 1241 if (rc) { 1246 1242 dprintf(" timeout for IORB %Fp", iorb); 1247 1243 iorb_seterr(iorb, IOERR_ADAPTER_TIMEOUT); 1248 } else if (readl(port_mmio + PORT_SCR_ERR) != 0 || 1249 readl(port_mmio + PORT_TFDATA) & 0x89) { 1244 } else if (readl(port_mmio + PORT_SCR_ERR) != 0 || readl(port_mmio + PORT_TFDATA) & 0x89) { 1250 1245 dprintf(" polled cmd error for IORB %Fp", iorb); 1251 1246 iorb_seterr(iorb, IOERR_DEVICE_NONSPECIFIC); … … 1313 1308 while (readl(port_mmio + PORT_CMD_ISSUE) & 1) { 1314 1309 rc = timer_check_and_block(&Timer); 1315 if (rc) break; 1316 } 1317 1318 /* check error condition */ 1310 if (rc) { 1311 dprintf(" Timeout", tmp); 1312 break; 1313 } 1314 } 1315 1319 1316 if ((tmp = readl(port_mmio + PORT_SCR_ERR)) != 0) { 1320 1317 dprintf(" SERR = 0x%08lx", tmp); 1321 1318 rc = 1; 1322 1319 } 1320 /* 0x89 = BSY(0x80) | DRQ(0x08) | ERR(0x01) */ 1323 1321 if (((tmp = readl(port_mmio + PORT_TFDATA)) & 0x89) != 0) { 1324 1322 dprintf(" TFDATA = 0x%08lx", tmp); … … 1819 1817 1820 1818 /* try to detect virtualbox environment to enable a hack for IRQ routing */ 1821 if (ai == ad_infos && ai->pci ->vendor == 0x8086 && ai->pci->device == 0x2829 &&1819 if (ai == ad_infos && ai->pci_vendor == 0x8086 && ai->pci_device == 0x2829 && 1822 1820 !memcmp(ata_dev_name(id_buf), "VBOX HARDDISK", 13)) { 1823 1821 /* running inside virtualbox */ -
trunk/src/os2ahci/init.asm
r165 r171 37 37 DEVHDR SEGMENT WORD PUBLIC 'DATA' 38 38 _dev_hdr dd -1 ; next device header 39 dw DEVLEV_3 + DEV_CHAR_DEV + DEV_IDC ; flags for ADD drivers39 dw DEVLEV_3 + DEV_CHAR_DEV + DEV_IDC + DEV_30; flags for ADD drivers 40 40 dw OFFSET _asm_strat ; strategy routine 41 41 dw OFFSET _asm_idc_entry ; IDC entry point -
trunk/src/os2ahci/os2ahci.c
r170 r171 4 4 * Copyright (c) 2011 thi.guten Software Development 5 5 * Copyright (c) 2011 Mensys B.V. 6 * Portions copyright (c) 2013 David Azarewicz6 * Copyright (c) 2013 David Azarewicz 7 7 * 8 8 * Authors: Christian Mueller, Markus Thielen … … 153 153 154 154 /****************************************************************************** 155 * OS/2 device driver main strategy function. This function is only used 156 * for initialization purposes; all other calls go directly to the adapter 157 * device driver's strategy function. 155 * OS/2 device driver main strategy function. 158 156 * 159 157 * NOTE: this is also used as the IDC entry point. We expect an IOCTL request … … 178 176 break; 179 177 178 case CMDOpen: 179 build_user_info(1); 180 rc = STDON; 181 break; 182 180 183 case CMDINPUT: 181 184 rc = char_dev_input((RP_RWV _far *) req); … … 184 187 case CMDSaveRestore: 185 188 rc = sr_drv(((RPSAVERESTORE _far *) req)->FuncCode); 189 break; 190 191 case CMDClose: 192 case CMDInputS: 193 case CMDInputF: 194 /* noop */ 195 rc = STDON; 186 196 break; 187 197 … … 831 841 #endif 832 842 833 build_user_info( );843 build_user_info(0); 834 844 } 835 845 iorb_done(iorb); -
trunk/src/os2ahci/os2ahci.h
r170 r171 4 4 * Copyright (c) 2011 thi.guten Software Development 5 5 * Copyright (c) 2011 Mensys B.V. 6 * Copyright (c) 2013 David Azarewicz 6 7 * 7 8 * Authors: Christian Mueller, Markus Thielen … … 376 377 377 378 u32 port_map; /* bitmap of active ports */ 379 u16 pci_vendor; 380 u16 pci_device; 378 381 379 382 /* initial adapter configuration from BIOS */ … … 572 575 extern u16 trace_read (u8 _far *buf, u16 cb_buf); 573 576 extern u16 trace_char_dev(RP_RWV _far *rwrb); 574 extern void build_user_info( void);577 extern void build_user_info(int check); 575 578 576 579 /* pci.c */ -
trunk/src/os2ahci/pci.c
r167 r171 4 4 * Copyright (c) 2011 thi.guten Software Development 5 5 * Copyright (c) 2011 Mensys B.V. 6 * Copyright (c) 2013 David Azarewicz 6 7 * 7 8 * Authors: Christian Mueller, Markus Thielen … … 712 713 * itself with the OS/2 resource manager 713 714 */ 714 ad_info->pci = pci_ids + i; 715 ad_info->bus = bus; 715 ad_info->pci = pci_id; 716 ad_info->pci_vendor = vendor; 717 ad_info->pci_device = device; 718 ad_info->bus = bus; 716 719 ad_info->dev_func = dev_func; 717 ad_info->irq 720 ad_info->irq = irq; 718 721 719 722 /* allocate memory for port-specific DMA scratch buffers */ -
trunk/src/os2ahci/trace.c
r170 r171 4 4 * Copyright (c) 2011 thi.guten Software Development 5 5 * Copyright (c) 2011 Mensys B.V. 6 * Portions copyright (c) 2013 David Azarewicz6 * Copyright (c) 2013 David Azarewicz 7 7 * 8 8 * Authors: Christian Mueller, Markus Thielen … … 210 210 * Create adapter/port/device list for user output. 211 211 */ 212 void build_user_info( void)212 void build_user_info(int check) 213 213 { 214 214 int a; … … 216 216 int d; 217 217 218 if ( check && (ahci_trace_buf.readp != ahci_trace_buf.writep)) return; 219 218 220 for (a = 0; a < ad_info_cnt; a++) { 219 221 AD_INFO *ai = ad_infos + a; 220 222 221 ntprintf("Adapter %d: PCI=%d:%d:%d ID=%04x:%04x irq=%d addr=0x%lx version=%lx\n", a,223 ntprintf("Adapter %d: PCI=%d:%d:%d ID=%04x:%04x %s %s irq=%d addr=0x%lx version=%lx\n", a, 222 224 ai->bus, ai->dev_func>>3, ai->dev_func&7, 223 ai->pci ->vendor, ai->pci->device,225 ai->pci_vendor, ai->pci_device, vendor_from_id(ai->pci_vendor), ai->pci->chipname, 224 226 ai->irq, ai->mmio_phys, 225 227 ai->bios_config[HOST_VERSION / sizeof(u32)]);
Note:
See TracChangeset
for help on using the changeset viewer.