fixed bugs

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23350 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Marcus Overhagen 2008-01-10 20:50:24 +00:00
parent 1cdfe7f991
commit 3831b73445
3 changed files with 8 additions and 8 deletions

View File

@ -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.

View File

@ -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;

View File

@ -32,9 +32,10 @@
#include <malloc.h>
#include <stdio.h>
#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);