Changeset 43475 in vbox for trunk/src/VBox
- Timestamp:
- Sep 30, 2012 9:30:51 PM (12 years ago)
- Location:
- trunk/src/VBox/Devices/PC/BIOS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/biosint.h
r42935 r43475 53 53 #define DEBUG_ATA 0 54 54 #define DEBUG_AHCI 0 55 #define DEBUG_SCSI 0 55 56 #define DEBUG_CD_BOOT 0 56 57 #define DEBUG_ELTORITO 0 -
trunk/src/VBox/Devices/PC/BIOS/ebda.h
r39651 r43475 215 215 } disk_req_t; 216 216 217 uint16_t ahci_cmd_packet(uint16_t device_id, uint8_t cmdlen, char __far *cmdbuf, 218 uint16_t header, uint32_t length, uint8_t inout, char __far *buffer); 219 220 uint16_t ata_cmd_packet(uint16_t device, uint8_t cmdlen, char __far *cmdbuf, 221 uint16_t header, uint32_t length, uint8_t inout, char __far *buffer); 217 extern uint16_t ahci_cmd_packet(uint16_t device_id, uint8_t cmdlen, char __far *cmdbuf, 218 uint16_t header, uint32_t length, uint8_t inout, char __far *buffer); 219 extern uint16_t scsi_cmd_packet(uint16_t device, uint8_t cmdlen, char __far *cmdbuf, 220 uint16_t header, uint32_t length, uint8_t inout, char __far *buffer); 221 extern uint16_t ata_cmd_packet(uint16_t device, uint8_t cmdlen, char __far *cmdbuf, 222 uint16_t header, uint32_t length, uint8_t inout, char __far *buffer); 222 223 223 224 /* All BIOS disk information. Disk-related code in the BIOS should not need … … 244 245 /* SCSI bus-specific device information. */ 245 246 scsi_dev_t scsidev[BX_MAX_SCSI_DEVICES]; 246 uint8_t scsi_ hdcount; /* Number of SCSI disks. */247 uint8_t scsi_devcount; /* Number of SCSI devices. */ 247 248 #endif 248 249 -
trunk/src/VBox/Devices/PC/BIOS/eltorito.c
r41653 r43475 268 268 { 269 269 //@todo: Use indirect calls instead? 270 if ( device > BX_MAX_ATA_DEVICES)270 if (VBOX_IS_AHCI_DEVICE(device)) 271 271 error = ahci_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer); 272 else if (VBOX_IS_SCSI_DEVICE(device)) 273 error = scsi_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer); 272 274 else 273 275 error = ata_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer); … … 304 306 #endif 305 307 306 if ( device > BX_MAX_ATA_DEVICES)308 if (VBOX_IS_AHCI_DEVICE(device)) 307 309 error = ahci_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer); 310 else if (VBOX_IS_SCSI_DEVICE(device)) 311 error = scsi_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer); 308 312 else 309 313 error = ata_cmd_packet(device, 12, (char __far *)&atapicmd, 0, 2048L, ATA_DATA_IN, &buffer); … … 368 372 bios_dsk->drqp.skip_a = 2048 - nbsectors * 512UL % 2048; 369 373 370 if ( device > BX_MAX_ATA_DEVICES)374 if (VBOX_IS_AHCI_DEVICE(device)) 371 375 error = ahci_cmd_packet(device, 12, (char __far *)&atapicmd, 0, nbsectors*512L, ATA_DATA_IN, MK_FP(boot_segment,0)); 376 else if (VBOX_IS_SCSI_DEVICE(device)) 377 error = scsi_cmd_packet(device, 12, (char __far *)&atapicmd, 0, nbsectors*512L, ATA_DATA_IN, MK_FP(boot_segment,0)); 372 378 else 373 379 error = ata_cmd_packet(device, 12, (char __far *)&atapicmd, 0, nbsectors*512L, ATA_DATA_IN, MK_FP(boot_segment,0)); … … 554 560 bios_dsk->drqp.skip_a = 2048 - nbsectors * 512UL % 2048 - bios_dsk->drqp.skip_b; 555 561 556 if ( device > BX_MAX_ATA_DEVICES)562 if (VBOX_IS_AHCI_DEVICE(device)) 557 563 status = ahci_cmd_packet(device, 12, (char __far *)&atapicmd, before*512, nbsectors*512L, ATA_DATA_IN, MK_FP(segment,offset)); 564 else if (VBOX_IS_SCSI_DEVICE(device)) 565 status = scsi_cmd_packet(device, 12, (char __far *)&atapicmd, before*512, nbsectors*512L, ATA_DATA_IN, MK_FP(segment,offset)); 558 566 else 559 567 status = ata_cmd_packet(device, 12, (char __far *)&atapicmd, before*512, nbsectors*512L, ATA_DATA_IN, MK_FP(segment,offset)); … … 758 766 bios_dsk->drqp.sect_sz = 2048; 759 767 760 if ( device > BX_MAX_ATA_DEVICES)768 if (VBOX_IS_AHCI_DEVICE(device)) 761 769 status = ahci_cmd_packet(device, 12, (char __far *)&atapicmd, 0, count*2048L, ATA_DATA_IN, MK_FP(segment,offset)); 770 else if (VBOX_IS_SCSI_DEVICE(device)) 771 status = scsi_cmd_packet(device, 12, (char __far *)&atapicmd, 0, count*2048L, ATA_DATA_IN, MK_FP(segment,offset)); 762 772 else 763 773 status = ata_cmd_packet(device, 12, (char __far *)&atapicmd, 0, count*2048L, ATA_DATA_IN, MK_FP(segment,offset)); -
trunk/src/VBox/Devices/PC/BIOS/scsi.c
r42811 r43475 23 23 24 24 25 //#define VBOX_SCSI_DEBUG 1 /* temporary */ 26 27 #ifdef VBOX_SCSI_DEBUG 28 # define VBSCSI_DEBUG(...) BX_INFO(__VA_ARGS__) 25 #if DEBUG_SCSI 26 # define DBG_SCSI(...) BX_INFO(__VA_ARGS__) 29 27 #else 30 # define VBSCSI_DEBUG(...)28 # define DBG_SCSI(...) 31 29 #endif 32 30 … … 73 71 ct_assert(sizeof(cdb_rw10) == 10); 74 72 75 int scsi_cmd_data_in(uint16_t io_base, uint8_t device_id, uint8_t __far *aCDB, 76 uint8_t cbCDB, uint8_t __far *buffer, uint16_t cbBuffer) 73 74 void insb_discard(unsigned nbytes, unsigned port); 75 #pragma aux insb_discard = \ 76 ".286" \ 77 "again:" \ 78 "in al,dx" \ 79 "loop again" \ 80 parm [cx] [dx] modify exact [cx ax] nomemory; 81 82 83 int scsi_cmd_data_in(uint16_t io_base, uint8_t target_id, uint8_t __far *aCDB, 84 uint8_t cbCDB, uint8_t __far *buffer, uint32_t cbBuffer) 77 85 { 78 86 /* Check that the adapter is ready. */ 79 uint8_t status ;87 uint8_t status, sizes; 80 88 uint16_t i; 81 89 82 90 do 83 { 84 status = inb(io_base+VBSCSI_REGISTER_STATUS); 85 } while (status & VBSCSI_BUSY); 86 87 /* Write target ID. */ 88 outb(io_base+VBSCSI_REGISTER_COMMAND, device_id); 89 /* Write transfer direction. */ 90 outb(io_base+VBSCSI_REGISTER_COMMAND, SCSI_TXDIR_FROM_DEVICE); 91 /* Write the CDB size. */ 92 outb(io_base+VBSCSI_REGISTER_COMMAND, cbCDB); 93 /* Write buffer size. */ 94 outb(io_base+VBSCSI_REGISTER_COMMAND, cbBuffer); 95 outb(io_base+VBSCSI_REGISTER_COMMAND, (cbBuffer >> 8)); 96 /* Write the CDB. */ 97 for (i = 0; i < cbCDB; i++) 98 outb(io_base+VBSCSI_REGISTER_COMMAND, aCDB[i]); 91 status = inb(io_base + VBSCSI_REGISTER_STATUS); 92 while (status & VBSCSI_BUSY); 93 94 95 sizes = ((cbBuffer >> 12) & 0xF0) | cbCDB; 96 outb(io_base + VBSCSI_REGISTER_COMMAND, target_id); /* Write the target ID. */ 97 outb(io_base + VBSCSI_REGISTER_COMMAND, SCSI_TXDIR_FROM_DEVICE); /* Write the transfer direction. */ 98 outb(io_base + VBSCSI_REGISTER_COMMAND, sizes); /* Write CDB size and top bufsize bits. */ 99 outb(io_base + VBSCSI_REGISTER_COMMAND, cbBuffer); /* Write the buffer size. */ 100 outb(io_base + VBSCSI_REGISTER_COMMAND, (cbBuffer >> 8)); 101 for (i = 0; i < cbCDB; i++) /* Write the CDB. */ 102 outb(io_base + VBSCSI_REGISTER_COMMAND, aCDB[i]); 99 103 100 104 /* Now wait for the command to complete. */ 101 105 do 102 { 103 status = inb(io_base+VBSCSI_REGISTER_STATUS); 104 } while (status & VBSCSI_BUSY); 106 status = inb(io_base + VBSCSI_REGISTER_STATUS); 107 while (status & VBSCSI_BUSY); 105 108 106 109 /* Get the read data. */ … … 110 113 } 111 114 112 int scsi_cmd_data_out(uint16_t io_base, uint8_t device_id, uint8_t __far *aCDB,113 uint8_t cbCDB, uint8_t __far *buffer, uint 16_t cbBuffer)115 int scsi_cmd_data_out(uint16_t io_base, uint8_t target_id, uint8_t __far *aCDB, 116 uint8_t cbCDB, uint8_t __far *buffer, uint32_t cbBuffer) 114 117 { 115 118 /* Check that the adapter is ready. */ 116 uint8_t status ;119 uint8_t status, sizes; 117 120 uint16_t i; 118 121 119 122 do 120 { 121 status = inb(io_base+VBSCSI_REGISTER_STATUS); 122 } while (status & VBSCSI_BUSY); 123 124 /* Write target ID. */ 125 outb(io_base+VBSCSI_REGISTER_COMMAND, device_id); 126 /* Write transfer direction. */ 127 outb(io_base+VBSCSI_REGISTER_COMMAND, SCSI_TXDIR_TO_DEVICE); 128 /* Write the CDB size. */ 129 outb(io_base+VBSCSI_REGISTER_COMMAND, cbCDB); 130 /* Write buffer size. */ 131 outb(io_base+VBSCSI_REGISTER_COMMAND, cbBuffer); 132 outb(io_base+VBSCSI_REGISTER_COMMAND, (cbBuffer >> 8)); 133 /* Write the CDB. */ 134 for (i = 0; i < cbCDB; i++) 135 outb(io_base+VBSCSI_REGISTER_COMMAND, aCDB[i]); 123 status = inb(io_base + VBSCSI_REGISTER_STATUS); 124 while (status & VBSCSI_BUSY); 125 126 127 sizes = ((cbBuffer >> 12) & 0xF0) | cbCDB; 128 outb(io_base + VBSCSI_REGISTER_COMMAND, target_id); /* Write the target ID. */ 129 outb(io_base + VBSCSI_REGISTER_COMMAND, SCSI_TXDIR_TO_DEVICE); /* Write the transfer direction. */ 130 outb(io_base + VBSCSI_REGISTER_COMMAND, sizes); /* Write CDB size and top bufsize bits. */ 131 outb(io_base + VBSCSI_REGISTER_COMMAND, cbBuffer); /* Write the buffer size. */ 132 outb(io_base + VBSCSI_REGISTER_COMMAND, (cbBuffer >> 8)); 133 for (i = 0; i < cbCDB; i++) /* Write the CDB. */ 134 outb(io_base + VBSCSI_REGISTER_COMMAND, aCDB[i]); 136 135 137 136 /* Write data to I/O port. */ … … 140 139 /* Now wait for the command to complete. */ 141 140 do 142 { 143 status = inb(io_base+VBSCSI_REGISTER_STATUS); 144 } while (status & VBSCSI_BUSY); 141 status = inb(io_base + VBSCSI_REGISTER_STATUS); 142 while (status & VBSCSI_BUSY); 145 143 146 144 return 0; … … 181 179 182 180 rc = scsi_cmd_data_in(io_base, target_id, (void __far *)&cdb, 10, 183 bios_dsk->drqp.buffer, (count * 512 ));181 bios_dsk->drqp.buffer, (count * 512L)); 184 182 185 183 if (!rc) 186 184 { 187 185 bios_dsk->drqp.trsfsectors = count; 188 bios_dsk->drqp.trsfbytes = count * 512 ;186 bios_dsk->drqp.trsfbytes = count * 512L; 189 187 } 190 188 … … 225 223 226 224 rc = scsi_cmd_data_out(io_base, target_id, (void __far *)&cdb, 10, 227 bios_dsk->drqp.buffer, (count * 512 ));225 bios_dsk->drqp.buffer, (count * 512L)); 228 226 229 227 if (!rc) 230 228 { 231 229 bios_dsk->drqp.trsfsectors = count; 232 bios_dsk->drqp.trsfbytes = (count * 512 );230 bios_dsk->drqp.trsfbytes = (count * 512L); 233 231 } 234 232 235 233 return rc; 234 } 235 236 237 //@todo: move 238 #define ATA_DATA_NO 0x00 239 #define ATA_DATA_IN 0x01 240 #define ATA_DATA_OUT 0x02 241 242 /** 243 * Perform a "packet style" read with supplied CDB. 244 * 245 * @returns status code. 246 * @param bios_dsk Pointer to disk request packet (in the 247 * EBDA). 248 */ 249 uint16_t scsi_cmd_packet(uint16_t device_id, uint8_t cmdlen, char __far *cmdbuf, 250 uint16_t before, uint32_t length, uint8_t inout, char __far *buffer) 251 { 252 bio_dsk_t __far *bios_dsk = read_word(0x0040, 0x000E) :> &EbdaData->bdisk; 253 uint8_t status, sizes; 254 uint16_t i; 255 uint16_t io_base; 256 uint8_t target_id; 257 258 /* Data out is currently not supported. */ 259 if (inout == ATA_DATA_OUT) { 260 BX_INFO("%s: DATA_OUT not supported yet\n", __func__); 261 return 1; 262 } 263 264 /* Convert to SCSI specific device number. */ 265 device_id = VBOX_GET_SCSI_DEVICE(device_id); 266 267 DBG_SCSI("%s: reading %lu bytes, skip %u/%u, device %d, target %d\n", __func__, 268 length, bios_dsk->drqp.skip_b, bios_dsk->drqp.skip_a, 269 device_id, bios_dsk->scsidev[device_id].target_id); 270 DBG_SCSI("%s: reading %u %u-byte sectors\n", __func__, 271 bios_dsk->drqp.nsect, bios_dsk->drqp.sect_sz); 272 273 //@todo: why do we need to do this? 274 cmdlen -= 2; // ATAPI uses 12 bytes for a READ 10 CDB?? 275 276 io_base = bios_dsk->scsidev[device_id].io_base; 277 target_id = bios_dsk->scsidev[device_id].target_id; 278 279 /* Wait until the adapter is ready. */ 280 do 281 status = inb(io_base + VBSCSI_REGISTER_STATUS); 282 while (status & VBSCSI_BUSY); 283 284 sizes = (((length + before) >> 12) & 0xF0) | cmdlen; 285 outb(io_base + VBSCSI_REGISTER_COMMAND, target_id); /* Write the target ID. */ 286 outb(io_base + VBSCSI_REGISTER_COMMAND, SCSI_TXDIR_FROM_DEVICE); /* Write the transfer direction. */ 287 outb(io_base + VBSCSI_REGISTER_COMMAND, sizes); /* Write the CDB size. */ 288 outb(io_base + VBSCSI_REGISTER_COMMAND, length + before); /* Write the buffer size. */ 289 outb(io_base + VBSCSI_REGISTER_COMMAND, (length + before) >> 8); 290 for (i = 0; i < cmdlen; i++) /* Write the CDB. */ 291 outb(io_base + VBSCSI_REGISTER_COMMAND, cmdbuf[i]); 292 293 /* Now wait for the command to complete. */ 294 do 295 status = inb(io_base + VBSCSI_REGISTER_STATUS); 296 while (status & VBSCSI_BUSY); 297 298 /* Transfer the data read from the device. */ 299 300 if (before) /* If necessary, throw away data which needs to be skipped. */ 301 insb_discard(before, io_base + VBSCSI_REGISTER_DATA_IN); 302 303 bios_dsk->drqp.trsfbytes = length; 304 305 /* The requested length may be exactly 64K or more, which needs 306 * a bit of care when we're using 16-bit 'rep ins'. 307 */ 308 while (length > 32768) { 309 DBG_SCSI("%s: reading 32K to %X:%X\n", __func__, FP_SEG(buffer), FP_OFF(buffer)); 310 rep_insb(buffer, 32768, io_base + VBSCSI_REGISTER_DATA_IN); 311 length -= 32768; 312 buffer = (FP_SEG(buffer) + (32768 >> 4)) :> FP_OFF(buffer); 313 } 314 DBG_SCSI("%s: reading %ld bytes to %X:%X\n", __func__, length, FP_SEG(buffer), FP_OFF(buffer)); 315 rep_insb(buffer, length, io_base + VBSCSI_REGISTER_DATA_IN); 316 317 return 0; 236 318 } 237 319 … … 255 337 uint8_t rc; 256 338 uint8_t aCDB[10]; 339 uint8_t hd_index, devcount_scsi; 257 340 258 341 aCDB[0] = SCSI_INQUIRY; … … 265 348 rc = scsi_cmd_data_in(io_base, i, aCDB, 6, buffer, 5); 266 349 if (rc != 0) 267 BX_PANIC(" scsi_enumerate_attached_devices: SCSI_INQUIRY failed\n");268 269 /* Check if there is a disk attached. */350 BX_PANIC("%s: SCSI_INQUIRY failed\n", __func__); 351 352 /* Check the attached device. */ 270 353 if ( ((buffer[0] & 0xe0) == 0) 271 354 && ((buffer[0] & 0x1f) == 0x00)) 272 355 { 273 VBSCSI_DEBUG("scsi_enumerate_attached_devices: Disk detected at %d\n", i);356 DBG_SCSI("%s: Disk detected at %d\n", __func__, i); 274 357 275 358 /* We add the disk only if the maximum is not reached yet. */ 276 if (bios_dsk->scsi_ hdcount < BX_MAX_SCSI_DEVICES)359 if (bios_dsk->scsi_devcount < BX_MAX_SCSI_DEVICES) 277 360 { 278 361 uint32_t sectors, sector_size, cylinders; 279 362 uint16_t heads, sectors_per_track; 280 uint8_t hdcount , hdcount_scsi, hd_index;363 uint8_t hdcount; 281 364 282 365 /* Issue a read capacity command now. */ … … 286 369 rc = scsi_cmd_data_in(io_base, i, aCDB, 10, buffer, 8); 287 370 if (rc != 0) 288 BX_PANIC(" scsi_enumerate_attached_devices: SCSI_READ_CAPACITY failed\n");371 BX_PANIC("%s: SCSI_READ_CAPACITY failed\n", __func__); 289 372 290 373 /* Build sector number and size from the buffer. */ … … 327 410 } 328 411 cylinders = (uint32_t)(sectors / (heads * sectors_per_track)); 329 hdcount_scsi = bios_dsk->scsi_hdcount;412 devcount_scsi = bios_dsk->scsi_devcount; 330 413 331 414 /* Calculate index into the generic disk table. */ 332 hd_index = hdcount_scsi + BX_MAX_ATA_DEVICES;333 334 bios_dsk->scsidev[ hdcount_scsi].io_base = io_base;335 bios_dsk->scsidev[ hdcount_scsi].target_id = i;415 hd_index = devcount_scsi + BX_MAX_ATA_DEVICES; 416 417 bios_dsk->scsidev[devcount_scsi].io_base = io_base; 418 bios_dsk->scsidev[devcount_scsi].target_id = i; 336 419 bios_dsk->devices[hd_index].type = DSK_TYPE_SCSI; 337 420 bios_dsk->devices[hd_index].device = DSK_DEVICE_HD; … … 361 444 /* Store the id of the disk in the ata hdidmap. */ 362 445 hdcount = bios_dsk->hdcount; 363 bios_dsk->hdidmap[hdcount] = hdcount_scsi + BX_MAX_ATA_DEVICES;446 bios_dsk->hdidmap[hdcount] = devcount_scsi + BX_MAX_ATA_DEVICES; 364 447 hdcount++; 365 448 bios_dsk->hdcount = hdcount; … … 370 453 write_byte(0x40, 0x75, hdcount); 371 454 372 hdcount_scsi++;373 bios_dsk->scsi_ hdcount = hdcount_scsi;455 devcount_scsi++; 456 bios_dsk->scsi_devcount = devcount_scsi; 374 457 } 375 458 else … … 379 462 } 380 463 } 464 else if ( ((buffer[0] & 0xe0) == 0) 465 && ((buffer[0] & 0x1f) == 0x05)) 466 { 467 uint8_t cdcount; 468 uint8_t removable; 469 470 DBG_SCSI("%s: CD/DVD-ROM detected at %d\n", __func__, i); 471 472 /* Calculate index into the generic device table. */ 473 hd_index = devcount_scsi + BX_MAX_ATA_DEVICES; 474 475 removable = buffer[1] & 0x80 ? 1 : 0; 476 477 bios_dsk->scsidev[devcount_scsi].io_base = io_base; 478 bios_dsk->scsidev[devcount_scsi].target_id = i; 479 bios_dsk->devices[hd_index].type = DSK_TYPE_SCSI; 480 bios_dsk->devices[hd_index].device = DSK_DEVICE_CDROM; 481 bios_dsk->devices[hd_index].removable = removable; 482 bios_dsk->devices[hd_index].blksize = 2048; 483 484 /* Store the ID of the device in the BIOS cdidmap. */ 485 cdcount = bios_dsk->cdcount; 486 bios_dsk->cdidmap[cdcount] = devcount_scsi + BX_MAX_ATA_DEVICES; 487 cdcount++; 488 bios_dsk->cdcount = cdcount; 489 490 devcount_scsi++; 491 bios_dsk->scsi_devcount = devcount_scsi; 492 } 381 493 else 382 VBSCSI_DEBUG("scsi_enumerate_attached_devices: No disk detected at %d\n", i);494 DBG_SCSI("%s: No supported device detected at %d\n", __func__, i); 383 495 } 384 496 } … … 394 506 bios_dsk = read_word(0x0040, 0x000E) :> &EbdaData->bdisk; 395 507 396 bios_dsk->scsi_ hdcount = 0;508 bios_dsk->scsi_devcount = 0; 397 509 398 510 identifier = 0; 399 511 400 /* Detect BusLogic adapter. */512 /* Detect the BusLogic adapter. */ 401 513 outb(BUSLOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY, 0x55); 402 514 identifier = inb(BUSLOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY); … … 405 517 { 406 518 /* Detected - Enumerate attached devices. */ 407 VBSCSI_DEBUG("scsi_init: BusLogic SCSI adapter detected\n");519 DBG_SCSI("scsi_init: BusLogic SCSI adapter detected\n"); 408 520 outb(BUSLOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_RESET, 0); 409 521 scsi_enumerate_attached_devices(BUSLOGIC_BIOS_IO_PORT); … … 411 523 else 412 524 { 413 VBSCSI_DEBUG("scsi_init: BusLogic SCSI adapter not detected\n");414 } 415 416 /* Detect LsiLogicadapter. */525 DBG_SCSI("scsi_init: BusLogic SCSI adapter not detected\n"); 526 } 527 528 /* Detect the LSI Logic parallel SCSI adapter. */ 417 529 outb(LSILOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY, 0x55); 418 530 identifier = inb(LSILOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY); … … 421 533 { 422 534 /* Detected - Enumerate attached devices. */ 423 VBSCSI_DEBUG("scsi_init: LSI Logic SCSI adapter detected\n");535 DBG_SCSI("scsi_init: LSI Logic SCSI adapter detected\n"); 424 536 outb(LSILOGIC_BIOS_IO_PORT+VBSCSI_REGISTER_RESET, 0); 425 537 scsi_enumerate_attached_devices(LSILOGIC_BIOS_IO_PORT); … … 427 539 else 428 540 { 429 VBSCSI_DEBUG("scsi_init: LSI Logic SCSI adapter not detected\n");430 } 431 432 /* Detect LsiLogic SAS adapter. */541 DBG_SCSI("scsi_init: LSI Logic SCSI adapter not detected\n"); 542 } 543 544 /* Detect the LSI Logic SAS adapter. */ 433 545 outb(LSILOGIC_SAS_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY, 0x55); 434 546 identifier = inb(LSILOGIC_SAS_BIOS_IO_PORT+VBSCSI_REGISTER_IDENTIFY); … … 437 549 { 438 550 /* Detected - Enumerate attached devices. */ 439 VBSCSI_DEBUG("scsi_init: LSI Logic SAS adapter detected\n");551 DBG_SCSI("scsi_init: LSI Logic SAS adapter detected\n"); 440 552 outb(LSILOGIC_SAS_BIOS_IO_PORT+VBSCSI_REGISTER_RESET, 0); 441 553 scsi_enumerate_attached_devices(LSILOGIC_SAS_BIOS_IO_PORT); … … 443 555 else 444 556 { 445 VBSCSI_DEBUG("scsi_init: LSI Logic SAS adapter not detected\n");446 } 447 } 557 DBG_SCSI("scsi_init: LSI Logic SAS adapter not detected\n"); 558 } 559 }
Note:
See TracChangeset
for help on using the changeset viewer.