diff --git a/modules/iopcore/cdvdman/device-bdm.c b/modules/iopcore/cdvdman/device-bdm.c index e31dd80b6..d595919db 100644 --- a/modules/iopcore/cdvdman/device-bdm.c +++ b/modules/iopcore/cdvdman/device-bdm.c @@ -26,17 +26,13 @@ void bdm_connect_bd(struct block_device *bd) { DPRINTF("connecting device %s%dp%d\n", bd->name, bd->devNr, bd->parNr); - struct block_device *current_bd = NULL; - - if (bd->devNr == cdvdman_settings.bdDeviceId) { + if (g_bd == NULL && bd->devNr == cdvdman_settings.bdDeviceId) { DPRINTF("attaching to %s%dp%d\n", bd->name, bd->devNr, bd->parNr); - current_bd = bd; + g_bd = bd; g_bd_sectors_per_sector = (2048 / bd->sectorSize); // Free usage of block device SignalSema(bdm_io_sema); } - - g_bd = current_bd; } void bdm_disconnect_bd(struct block_device *bd) @@ -117,7 +113,7 @@ int DeviceReadSectors(u32 lsn, void *buffer, unsigned int sectors) { int rv = SCECdErNO; - DPRINTF("%s(%u, 0x%p, %u)\n", __func__, (unsigned int)lsn, buffer, sectors); + // DPRINTF("%s(%u, 0x%p, %u)\n", __func__, (unsigned int)lsn, buffer, sectors); if (g_bd == NULL) return SCECdErTRMOPN;