atapi.c (a00369fc565cef32076b767ecff34469642afe06) | atapi.c (a71754e5b03fd3b8b8c6d3bc2a39f75bead729de) |
---|---|
1/* 2 * QEMU ATAPI Emulation 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * Copyright (c) 2006 Openedhand Ltd. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 380 unchanged lines hidden (view full) --- 389#endif 390 if (s->atapi_dma) { 391 ide_atapi_cmd_read_dma(s, lba, nb_sectors, sector_size); 392 } else { 393 ide_atapi_cmd_read_pio(s, lba, nb_sectors, sector_size); 394 } 395} 396 | 1/* 2 * QEMU ATAPI Emulation 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * Copyright (c) 2006 Openedhand Ltd. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 380 unchanged lines hidden (view full) --- 389#endif 390 if (s->atapi_dma) { 391 ide_atapi_cmd_read_dma(s, lba, nb_sectors, sector_size); 392 } else { 393 ide_atapi_cmd_read_pio(s, lba, nb_sectors, sector_size); 394 } 395} 396 |
397 398/* Called by *_restart_bh when the transfer function points 399 * to ide_atapi_cmd 400 */ 401void ide_atapi_dma_restart(IDEState *s) 402{ 403 /* 404 * I'm not sure we have enough stored to restart the command 405 * safely, so give the guest an error it should recover from. 406 * I'm assuming most guests will try to recover from something 407 * listed as a medium error on a CD; it seems to work on Linux. 408 * This would be more of a problem if we did any other type of 409 * DMA operation. 410 */ 411 ide_atapi_cmd_error(s, MEDIUM_ERROR, ASC_NO_SEEK_COMPLETE); 412} 413 |
|
397static inline uint8_t ide_atapi_set_profile(uint8_t *buf, uint8_t *index, 398 uint16_t profile) 399{ 400 uint8_t *buf_profile = buf + 12; /* start of profiles */ 401 402 buf_profile += ((*index) * 4); /* start of indexed profile */ 403 cpu_to_ube16 (buf_profile, profile); 404 buf_profile[2] = ((buf_profile[0] == buf[6]) && (buf_profile[1] == buf[7])); --- 840 unchanged lines hidden --- | 414static inline uint8_t ide_atapi_set_profile(uint8_t *buf, uint8_t *index, 415 uint16_t profile) 416{ 417 uint8_t *buf_profile = buf + 12; /* start of profiles */ 418 419 buf_profile += ((*index) * 4); /* start of indexed profile */ 420 cpu_to_ube16 (buf_profile, profile); 421 buf_profile[2] = ((buf_profile[0] == buf[6]) && (buf_profile[1] == buf[7])); --- 840 unchanged lines hidden --- |