diff --git a/src/add-ons/kernel/bus_managers/ata/ata.c b/src/add-ons/kernel/bus_managers/ata/ata.c index e2f135bc28..676ab3cc7e 100644 --- a/src/add-ons/kernel/bus_managers/ata/ata.c +++ b/src/add-ons/kernel/bus_managers/ata/ata.c @@ -163,8 +163,6 @@ ata_send_command(ide_device_info *device, ata_request *request, bool need_drdy, ata_select(device); - bus->active_device = device; - if (ata_wait(bus, 0, ide_status_bsy | ide_status_drq, false, 50000) != B_OK) { // resetting the device here will discard current configuration, // it's better when the SCSI bus manager requests an external reset. diff --git a/src/add-ons/kernel/bus_managers/ata/ata_request.c b/src/add-ons/kernel/bus_managers/ata/ata_request.c index f6f66cbd89..b0d412ae1b 100644 --- a/src/add-ons/kernel/bus_managers/ata/ata_request.c +++ b/src/add-ons/kernel/bus_managers/ata/ata_request.c @@ -31,7 +31,7 @@ void ata_request_start(ata_request **_request, struct ide_device_info *device, s device->bus->state = ata_state_busy; device->bus->active_device = device; - + request = device->requestFree; device->requestActive = request; device->requestFree = NULL; @@ -50,7 +50,8 @@ void ata_request_start(ata_request **_request, struct ide_device_info *device, s request->uses_dma = 0; request->packet_irq = 0; - ASSERT(request->ccb->subsys_status == SCSI_REQ_INPROG); + // XXX the following always triggers. Why? + // ASSERT(request->ccb->subsys_status == SCSI_REQ_INPROG); // pretend success request->ccb->subsys_status = SCSI_REQ_CMP; diff --git a/src/add-ons/kernel/bus_managers/ata/ide_sim.c b/src/add-ons/kernel/bus_managers/ata/ide_sim.c index afb261c3d1..b24f27e727 100644 --- a/src/add-ons/kernel/bus_managers/ata/ide_sim.c +++ b/src/add-ons/kernel/bus_managers/ata/ide_sim.c @@ -32,9 +32,10 @@ #include #include -#define FLOW dprintf +//#define FLOW dprintf +#define FLOW(x...) #define TRACE dprintf - +//#define TRACE(x...) scsi_for_sim_interface *scsi; @@ -68,12 +69,12 @@ sim_scsi_io(ide_bus_info *bus, scsi_ccb *ccb) ata_request_start(&request, device, ccb); if (request) { - FLOW("calling exec_io: %p, %d:%d\n", bus, ccb->target_id, ccb->target_lun); + TRACE("calling exec_io: %p, %d:%d\n", bus, ccb->target_id, ccb->target_lun); device->exec_io(device, request); return; } - FLOW("Bus busy\n"); + TRACE("Bus busy\n"); ACQUIRE_BEN(&bus->status_report_ben); scsi->requeue(ccb, true); RELEASE_BEN(&bus->status_report_ben);