Statistics
| Branch: | Revision:

root / hw / spapr_vscsi.c @ 17bff52b

History | View | Annotate | Download (28 kB)

# Date Author Comment
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 <>...