Command queueing is now generally disabled in PIO modes. No matter what
the cause is, it didn't work over here at all in this combination. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10629 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||||
* Copyright 2002/03, Thomas Kurschel. All rights reserved.
|
* Copyright 2002/03, Thomas Kurschel. All rights reserved.
|
||||||
|
*
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -166,7 +168,7 @@ err_inv_device:
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
err_bus_busy:
|
err_bus_busy:
|
||||||
SHOW_FLOW0( 3, "Bus busy" );
|
SHOW_FLOW0(3, "Bus busy");
|
||||||
FAST_LOG1(bus->log, ev_ide_scsi_io_bus_busy, (uint32)request);
|
FAST_LOG1(bus->log, ev_ide_scsi_io_bus_busy, (uint32)request);
|
||||||
|
|
||||||
IDE_UNLOCK(bus);
|
IDE_UNLOCK(bus);
|
||||||
@@ -175,7 +177,7 @@ err_bus_busy:
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
err_device_busy:
|
err_device_busy:
|
||||||
SHOW_FLOW0( 3, "Device busy" );
|
SHOW_FLOW0(3, "Device busy");
|
||||||
FAST_LOG1(bus->log, ev_ide_scsi_io_device_busy, (uint32)request);
|
FAST_LOG1(bus->log, ev_ide_scsi_io_device_busy, (uint32)request);
|
||||||
|
|
||||||
IDE_UNLOCK(bus);
|
IDE_UNLOCK(bus);
|
||||||
@@ -184,7 +186,7 @@ err_device_busy:
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
err_disconnected:
|
err_disconnected:
|
||||||
SHOW_ERROR0( 3, "No controller anymore" );
|
SHOW_ERROR0(3, "No controller anymore");
|
||||||
FAST_LOG1(bus->log, ev_ide_scsi_io_disconnected, (uint32)request);
|
FAST_LOG1(bus->log, ev_ide_scsi_io_disconnected, (uint32)request);
|
||||||
request->subsys_status = SCSI_NO_HBA;
|
request->subsys_status = SCSI_NO_HBA;
|
||||||
scsi->finished(request, 1);
|
scsi->finished(request, 1);
|
||||||
@@ -617,12 +619,21 @@ ide_sim_init_bus(pnp_node_handle node, void *user_cookie, void **cookie)
|
|||||||
|
|
||||||
SHOW_FLOW(2, "can_dma: %d", bus->can_DMA);
|
SHOW_FLOW(2, "can_dma: %d", bus->can_DMA);
|
||||||
|
|
||||||
if (pnp->get_attr_uint8(node, IDE_CONTROLLER_CAN_CQ_ITEM, &bus->can_CQ, true) != B_OK)
|
if (bus->can_DMA) {
|
||||||
// per default, command queuing is supported unless the driver
|
if (pnp->get_attr_uint8(node, IDE_CONTROLLER_CAN_CQ_ITEM, &bus->can_CQ, true) != B_OK) {
|
||||||
// reports problems (queuing should be transparent to
|
// per default, command queuing is supported unless the driver
|
||||||
// controller, but for sure there is some buggy, over-optimizing
|
// reports problems (queuing should be transparent to
|
||||||
// controller out there)
|
// controller, but for sure there is some buggy, over-optimizing
|
||||||
bus->can_CQ = true;
|
// controller out there)
|
||||||
|
bus->can_CQ = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// I am not sure if it's a problem of the driver or the drive (probably the
|
||||||
|
// former), but we're generally disable command queueing in case of PIO
|
||||||
|
// transfers. Since those should be rare on a real system (as is CQ support
|
||||||
|
// in the drive), it's not really worth investigating, though.
|
||||||
|
bus->can_CQ = false;
|
||||||
|
}
|
||||||
|
|
||||||
res = pnp->load_driver(pnp->get_parent(node), bus,
|
res = pnp->load_driver(pnp->get_parent(node), bus,
|
||||||
(pnp_driver_info **)&bus->controller,
|
(pnp_driver_info **)&bus->controller,
|
||||||
|
|||||||
Reference in New Issue
Block a user