scsi-generic scsi_read_complete() should not -both- call the client
complete callback with SCSI_REASON_DATA -and- call
scsi_command_complete(). The former will cause the client to queue a
new read or write request, while the later will free the request data
structure, thus causing the new read or
This abstracts calling the command_complete callback, reducing churn
in the following patches.
Signed-off-by: Paolo Bonzini
---
hw/scsi-bus.c |6 ++
hw/scsi-disk.c|8
hw/scsi-generic.c |6 +++---
hw/scsi.h |1 +
trace-events |1 +
5 files cha
On 05/16/2011 12:07 PM, Juan Quintela wrote:
From two weeks ago, we have already:
- import kvm headers into qemu, drop #ifdef maze (Jan)
SCSI patches merge plan
Paolo
Signed-off-by: Paolo Bonzini
---
hw/scsi-bus.c |6 ++
trace-events |6 ++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index ceeb4ec..0fd85fc 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -4,6 +4,7 @@
#include "scsi-defs.h"
#
Signed-off-by: Paolo Bonzini
---
hw/scsi-generic.c |5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index 5bfbb8a..e1f8a8a 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -288,7 +288,6 @@ static int32_t scsi_send_command(
Signed-off-by: Paolo Bonzini
---
hw/lsi53c895a.c | 63 +-
1 files changed, 38 insertions(+), 25 deletions(-)
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index ccea6ad..3b67155 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -652,38 +
Signed-off-by: Paolo Bonzini
---
hw/esp.c |2 +-
hw/lsi53c895a.c |3 +--
hw/scsi-bus.c|5 +
hw/scsi.h|1 +
hw/spapr_vscsi.c |2 +-
hw/usb-msd.c |2 +-
6 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/hw/esp.c b/hw/esp.c
index 3a6
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
From: Hannes Reinecke
The SCSI spec has a quite detailed list of sense codes available.
It even mandates the use of specific ones for some failure cases.
The current implementation just has one type of generic error
which is actually a violation of the spec in certain cases.
This patch introduces
Signed-off-by: Paolo Bonzini
---
hw/esp.c | 60 +---
hw/lsi53c895a.c | 48 +++---
hw/scsi-bus.c|4 +-
hw/scsi.h|9 +
hw/spapr_vscsi.c | 101 ++
hw/usb-msd.c
From: Hannes Reinecke
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.
With the next patch, a device may hold SCSIRequest for an indefinite
time. Split a rather big patch, and protect against access errors,
by reference counting them.
There is some ugliness in scsi_send_command implementation due to
the need to unref the request when it fails. This will go away
wit
... and remove some SCSIDevice variables or fields that now become unused.
Signed-off-by: Paolo Bonzini
---
hw/esp.c |2 +-
hw/lsi53c895a.c |2 +-
hw/scsi-bus.c|5 +
hw/scsi.h|1 +
hw/spapr_vscsi.c |8 ++--
hw/usb-msd.c |2 +-
6 files chan
On 05/16/2011 02:14 PM, Alon Levy wrote:
On Mon, May 16, 2011 at 02:07:55PM +0200, Paolo Bonzini wrote:
On 05/16/2011 02:06 PM, Gerd Hoffmann wrote:
Usually programs that are fully autoconf-iscated will ship a subset of
libtool sources in the tarball, build a custom version at configure
time, a
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
---
hw/esp.c | 16 ++--
hw/lsi53c895a.c | 30 +-
hw/
This covers the case of canceling a request's I/O and still
completing it.
Signed-off-by: Paolo Bonzini
---
hw/scsi-bus.c|9 +
hw/scsi.h|1 +
hw/spapr_vscsi.c |8 ++--
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.
The return value is unused anyway.
Signed-off-by: Paolo Bonzini
---
hw/scsi-disk.c|6 ++
hw/scsi-generic.c |7 ++-
hw/scsi.h |2 +-
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 65744c7..4c7a53e 100644
--- a/
Move the common part of scsi-disk.c and scsi-generic.c to the SCSI layer.
Signed-off-by: Paolo Bonzini
---
hw/esp.c |2 +-
hw/lsi53c895a.c |2 +-
hw/scsi-bus.c |3 ++-
hw/scsi-disk.c|1 -
hw/scsi-generic.c |1 -
hw/scsi.h |2 +-
hw/spapr_vscsi.c
The code for canceling requests upon reset is already the same. Clean
it up and move it to scsi-bus.c.
Signed-off-by: Paolo Bonzini
---
hw/scsi-bus.c | 12
hw/scsi-disk.c| 18 ++
hw/scsi-generic.c | 18 ++
hw/scsi.h |1 +
4
The sg driver currently has a hardcoded limit of commands it
can handle simultaneously. When this limit is reached the
driver will return -EDOM. So we need to capture this to
enable proper return values here.
Signed-off-by: Hannes Reinecke
Signed-off-by: Paolo Bonzini
---
hw/scsi-generic.c |
From: Hannes Reinecke
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
Signed-off-by: Paolo Bonzini
---
hw/scsi-bus.c |9 +++
Signed-off-by: Paolo Bonzini
---
hw/esp.c | 26 ++
hw/lsi53c895a.c | 22 --
hw/scsi-bus.c| 10 ++
hw/scsi.h|1 +
hw/spapr_vscsi.c | 26 ++
hw/usb-msd.c | 15 ---
trace-ev
From: Hannes Reinecke
scsi_req_parse() already provides for a data direction setting,
so we should be using it to check for correct direction.
And we should return the sense code 'INVALID FIELD IN CDB'
in these cases.
Signed-off-by: Hannes Reinecke
Signed-off-by: Paolo Bonzini
---
hw/scsi-dis
101 - 123 of 123 matches
Mail list logo