Commit Message

There are more operations than a SCSI bus can handle, besides completing
commands. One example, which this series will introduce, is cleaning up
after a request is cancelled.
More long term, a "SCSI bus" can represent the LUNs attached to a
target; in this case, while all commands will ultimately reach a logical
unit, it is the target who is in charge of answering REPORT LUNs.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/esp.c | 6 +++++-
hw/lsi53c895a.c | 6 +++++-
hw/scsi-bus.c | 12 ++++++------
hw/scsi-generic.c | 2 +-
hw/scsi.h | 13 +++++++------
hw/spapr_vscsi.c | 6 +++++-
hw/usb-msd.c | 6 +++++-
7 files changed, 34 insertions(+), 17 deletions(-)

Comments

> qbus_create_inplace(&bus->qbus, &scsi_bus_info, host, NULL);> bus->busnr = next_scsi_bus++;> bus->tcq = tcq;> bus->ndev = ndev;> - bus->complete = complete;> + bus->ops = *ops;
Normally bus->ops would be a pointer, so you can just assign it to
the address passed in instead of doing a copy. Any good reason to
do it differently here?

On 05/20/2011 05:53 PM, Christoph Hellwig wrote:
>> qbus_create_inplace(&bus->qbus,&scsi_bus_info, host, NULL);>> > bus->busnr = next_scsi_bus++;>> > bus->tcq = tcq;>> > bus->ndev = ndev;>> > - bus->complete = complete;>> > + bus->ops = *ops;>> Normally bus->ops would be a pointer, so you can just assign it to> the address passed in instead of doing a copy. Any good reason to> do it differently here?
I was thinking that they could be modified in-place later, or built on
the stack depending on some qdev properties, but it's probably pointless
to do it differently. Will change.
Paolo