提交 19e4735b 编写于 作者: C Cornelia Huck 提交者: Christian Borntraeger

KVM: s390: virtio-ccw: Handle command rejects.

A command reject for a ccw may happen if we run on a host not supporting
a certain feature. We want to be able to handle this as special case of
command failure, so let's split this off from the generic -EIO error code.
Reviewed-by: NThomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
上级 d208c79d
...@@ -642,8 +642,15 @@ static void virtio_ccw_int_handler(struct ccw_device *cdev, ...@@ -642,8 +642,15 @@ static void virtio_ccw_int_handler(struct ccw_device *cdev,
(SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND))) { (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND))) {
/* OK */ /* OK */
} }
if (irb_is_error(irb)) if (irb_is_error(irb)) {
vcdev->err = -EIO; /* XXX - use real error */ /* Command reject? */
if ((scsw_dstat(&irb->scsw) & DEV_STAT_UNIT_CHECK) &&
(irb->ecw[0] & SNS0_CMD_REJECT))
vcdev->err = -EOPNOTSUPP;
else
/* Map everything else to -EIO. */
vcdev->err = -EIO;
}
if (vcdev->curr_io & activity) { if (vcdev->curr_io & activity) {
switch (activity) { switch (activity) {
case VIRTIO_CCW_DOING_READ_FEAT: case VIRTIO_CCW_DOING_READ_FEAT:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册