Statistics
| Branch: | Revision:

root / hw / spapr_vscsi.c @ df787185

History | View | Annotate | Download (28.4 kB)

# Date Author Comment
01e95455 02/22/2012 02:29 pm Paolo Bonzini

scsi: pass residual amount to command_complete

With the upcoming sglist support, HBAs will not see any transfer_data
call and will not have a way to detect short transfers. So pass the
residual amount of data upon command completion.

Signed-off-by: Paolo Bonzini <>

83f7d43a 02/15/2012 05:39 pm Andreas Färber

qom: Unify type registration

Replace device_init() with generalized type_init().

While at it, unify naming convention: type_init([$prefix_]register_types)
Also, type_init() is a function, so add preceding blank line where
necessary and don't put a semicolon after the closing brace....

39bffca2 02/03/2012 06:41 pm Anthony Liguori

qdev: register all types natively through QEMU Object Model

This was done in a mostly automated fashion. I did it in three steps and then
rebased it into a single step which avoids repeatedly touching every file in
the tree.

The first step was a sed-based addition of the parent type to the subclass...

3954d33a 01/27/2012 06:50 pm Anthony Liguori

spapr: convert to QEMU Object Model (v2)

Signed-off-by: Anthony Liguori <>
---
v1 -> v2
- use QOM to check for the default console

e855761c 01/27/2012 06:50 pm Anthony Liguori

qdev: prepare source tree for code conversion

These are various small stylistic changes which help make things more
consistent such that the automated conversion script can be simpler.

It's not necessary to agree or disagree with these style changes because all...

afd4030c 10/28/2011 08:25 pm Paolo Bonzini

scsi: move tcq/ndev to SCSIBusOps (now SCSIBusInfo)

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

f48a7a6e 10/28/2011 08:25 pm Paolo Bonzini

scsi: remove devs array from SCSIBus

Change the devs array into a linked list, and add a scsi_device_find
function to navigate the children list instead. This lets the SCSI
bus use more complex addressing, and HBAs can talk to the correct device
when there are multiple LUNs per target....

7e0380b9 10/28/2011 08:25 pm Paolo Bonzini

scsi: allow arbitrary LUNs

This only requires changes in two places: in SCSIBus, we need to look
for a free LUN if somebody creates a device with a pre-existing scsi-id
but the default LUN (-1, meaning "search for a free spot"); in vSCSI,
we need to actually parse the LUN according to the SCSI spec....

0d3545e7 10/28/2011 08:25 pm Paolo Bonzini

scsi: add channel to addressing

This also requires little more than adding the new argument to
scsi_device_find, and the qdev property. All devices by default
end up on channel 0.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

f5b6ffcf 10/06/2011 10:48 am Paolo Bonzini

vscsi: send the CHECK_CONDITION status down together with autosense data

I introduced this bug in commit 05751d3 (vscsi: always use get_sense,
2011-08-03) because at the time there was no way to expose a sense
condition to SLOF and Linux manages to work around the bug. However,...

277f9acf 10/06/2011 10:43 am Paolo Bonzini

spapr: proper qdevification

Right now the spapr devices cannot be instantiated with -device,
because the IRQs need to be passed to the spapr_*_create functions.
Do this instead in the bus's init wrapper.

This is particularly important with the conversion from scsi-disk...

77c7ea5e 10/06/2011 10:43 am Paolo Bonzini

spapr: prepare for qdevification of irq

Restructure common properties for sPAPR devices so that IRQ definitions
can be added in one place.

Signed-off-by: Paolo Bonzini <>
Cc: Alexander Graf <>
Cc: David Gibson <>...

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

c39ce112 08/12/2011 04:27 pm Paolo Bonzini

scsi: pass cdb already to scsi_req_new

Right now the CDB is not passed to the SCSIBus until scsi_req_enqueue.
Passing it to scsi_req_new will let scsi_req_new dispatch common requests
through different reqops.

Moving the memcpy to scsi_req_new is a hack that will go away as...

05751d3f 08/12/2011 04:27 pm Paolo Bonzini

vscsi: always use get_sense

vscsi supports autosensing by providing sense data directly in the
response. When get_sense was added, the older state machine approach
that sent REQUEST SENSE commands separately was left in place. Remove
it, all existing SCSIDevices do support autosensing and the next patches...

c5bf71a9 07/19/2011 04:38 pm Hannes Reinecke

scsi: Add 'hba_private' to SCSIRequest

'tag' is just an abstraction to identify the command
from the driver. So we should make that explicit by
replacing 'tag' with a driver-defined pointer 'hba_private'.
This saves the lookup for driver handling several commands...

c6df7102 05/26/2011 01:14 pm Paolo Bonzini

scsi: split command_complete callback in two

Signed-off-by: Paolo Bonzini <>
Cc: Christoph Hellwig <>

aba1f023 05/26/2011 01:14 pm Paolo Bonzini

scsi: rename arguments to the new callbacks

Signed-off-by: Paolo Bonzini <>
Cc: Christoph Hellwig <>

fc4f0754 05/26/2011 01:14 pm Paolo Bonzini

scsi: do not call send_command directly

Move the common part of scsi-disk.c and scsi-generic.c to the SCSI layer.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Christoph Hellwig <>

43a2b339 05/26/2011 01:14 pm Paolo Bonzini

scsi: introduce scsi_req_new

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Christoph Hellwig <>

ad3376cc 05/26/2011 01:14 pm Paolo Bonzini

scsi: introduce scsi_req_continue

Signed-off-by: Paolo Bonzini <>
Cc: Christoph Hellwig <>

0c34459b 05/26/2011 01:14 pm Paolo Bonzini

scsi: introduce scsi_req_get_buf

... and remove some SCSIDevice variables or fields that now become unused.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Christoph Hellwig <>

74382217 05/26/2011 01:14 pm Hannes Reinecke

scsi: Implement 'get_sense' callback

The get_sense callback copies existing sense information into
the provided buffer. This is required if sense information
should be transferred together with the command response.

Signed-off-by: Hannes Reinecke <>...

5c6c0e51 05/26/2011 01:14 pm Hannes Reinecke

scsi: Use 'SCSIRequest' directly

Currently the SCSIRequest structure is abstracted away and cannot accessed
directly from the driver. This requires the handler to do a lookup on
an abstract 'tag' which identifies the SCSIRequest structure.

With this patch the SCSIRequest structure is exposed to the driver. This...

19d110ab 05/26/2011 01:14 pm Paolo Bonzini

scsi: introduce scsi_req_abort

This covers the case of canceling a request's I/O and still
completing it.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Christoph Hellwig <>

94d3f98a 05/26/2011 01:14 pm Paolo Bonzini

scsi: introduce scsi_req_cancel

This is for when the request must be dropped in the void,
but still memory should be freed. To this end, the devices
register a second callback in SCSIBusOps.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Christoph Hellwig <>

cfdc1bb0 05/26/2011 01:14 pm Paolo Bonzini

scsi: introduce SCSIBusOps

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

8804f57b 04/08/2011 12:32 pm Stefan Weil

spapr_vscsi: Set uninitialized variable

cppcheck reports this error:

hw/spapr_vscsi.c:274: error: Uninitialized variable: rc

If llen == 0, rc was indeed used without being initialized.

Signed-off-by: Stefan Weil <>
Signed-off-by: Alexander Graf <>

6e270446 04/01/2011 07:34 pm Ben Herrenschmidt

Implement PAPR virtual SCSI interface (ibmvscsi)

This patch implements the infrastructure and hypercalls necessary for
the PAPR specified Virtual SCSI interface. This is the normal method
for providing (virtual) disks to PAPR partitions.

Signed-off-by: Ben Herrenschmidt <>...