Accepting request 706094 from filesystems
- Add vhba-scsiapi.diff to fix the build with Linux 5.1 OBS-URL: https://build.opensuse.org/request/show/706094 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vhba-kmp?expand=0&rev=15
This commit is contained in:
commit
2ee0481a5b
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 28 14:38:13 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Add vhba-scsiapi.diff to fix the build with Linux 5.1
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 7 13:28:09 UTC 2017 - jengelh@inai.de
|
Mon Aug 7 13:28:09 UTC 2017 - jengelh@inai.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package vhba-kmp
|
# spec file for package vhba-kmp
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -12,7 +12,7 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@ -20,15 +20,16 @@ Name: vhba-kmp
|
|||||||
Version: 20170610
|
Version: 20170610
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Virtual SCSI Host Bus Adapter
|
Summary: Virtual SCSI Host Bus Adapter
|
||||||
License: GPL-2.0+
|
License: GPL-2.0-or-later
|
||||||
Group: System/Kernel
|
Group: System/Kernel
|
||||||
Url: http://cdemu.sf.net/about/vhba/
|
URL: http://cdemu.sf.net/about/vhba/
|
||||||
|
|
||||||
#Git-Clone: git://git.code.sf.net/p/cdemu/code
|
#Git-Clone: git://git.code.sf.net/p/cdemu/code
|
||||||
Source: http://downloads.sf.net/cdemu/vhba-module-%version.tar.bz2
|
Source: http://downloads.sf.net/cdemu/vhba-module-%version.tar.bz2
|
||||||
Source2: %name-preamble
|
Source2: %name-preamble
|
||||||
Patch1: vhba-no-werror.diff
|
Patch1: vhba-no-werror.diff
|
||||||
Patch2: vhba-devname.diff
|
Patch2: vhba-devname.diff
|
||||||
|
Patch3: vhba-scsiapi.diff
|
||||||
BuildRequires: kernel-syms >= 2.6.20
|
BuildRequires: kernel-syms >= 2.6.20
|
||||||
BuildRequires: modutils
|
BuildRequires: modutils
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@ -55,8 +56,7 @@ Linux.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
echo %flavors_to_build
|
echo %flavors_to_build
|
||||||
%setup -qn vhba-module-%version
|
%autosetup -n vhba-module-%version -p1
|
||||||
%patch -P 1 -P 2 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
for flavor in %flavors_to_build; do
|
for flavor in %flavors_to_build; do
|
||||||
|
78
vhba-scsiapi.diff
Normal file
78
vhba-scsiapi.diff
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
From: Jan Engelhardt <jengelh@inai.de>
|
||||||
|
Date: 2019-05-28 16:37:03.776407560 +0200
|
||||||
|
|
||||||
|
cmd->serial_number was removed in commit
|
||||||
|
52eaa798f4f4e983c711eaa1c13d8859a52946e8 and users were changed to
|
||||||
|
cmd->request->tag.
|
||||||
|
|
||||||
|
---
|
||||||
|
vhba.c | 14 +++++++-------
|
||||||
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
Index: vhba-module-20170610/vhba.c
|
||||||
|
===================================================================
|
||||||
|
--- vhba-module-20170610.orig/vhba.c
|
||||||
|
+++ vhba-module-20170610/vhba.c
|
||||||
|
@@ -445,7 +445,7 @@ static int vhba_queuecommand_lck (struct
|
||||||
|
struct vhba_device *vdev;
|
||||||
|
int retval;
|
||||||
|
|
||||||
|
- scmd_dbg(cmd, "queue %lu\n", cmd->serial_number);
|
||||||
|
+ scmd_dbg(cmd, "queue %lu\n", cmd->request->tag);
|
||||||
|
|
||||||
|
vdev = vhba_lookup_device(cmd->device->id);
|
||||||
|
if (!vdev) {
|
||||||
|
@@ -476,7 +476,7 @@ static int vhba_abort (struct scsi_cmnd
|
||||||
|
struct vhba_device *vdev;
|
||||||
|
int retval = SUCCESS;
|
||||||
|
|
||||||
|
- scmd_warn(cmd, "abort %lu\n", cmd->serial_number);
|
||||||
|
+ scmd_warn(cmd, "abort %lu\n", cmd->request->tag);
|
||||||
|
|
||||||
|
vdev = vhba_lookup_device(cmd->device->id);
|
||||||
|
if (vdev) {
|
||||||
|
@@ -508,7 +508,7 @@ static ssize_t do_request (struct scsi_c
|
||||||
|
ssize_t ret;
|
||||||
|
|
||||||
|
scmd_dbg(cmd, "request %lu, cdb 0x%x, bufflen %d, use_sg %d\n",
|
||||||
|
- cmd->serial_number, cmd->cmnd[0], scsi_bufflen(cmd), scsi_sg_count(cmd));
|
||||||
|
+ cmd->request->tag, cmd->cmnd[0], scsi_bufflen(cmd), scsi_sg_count(cmd));
|
||||||
|
|
||||||
|
ret = sizeof(vreq);
|
||||||
|
if (DATA_TO_DEVICE(cmd->sc_data_direction)) {
|
||||||
|
@@ -520,7 +520,7 @@ static ssize_t do_request (struct scsi_c
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
|
- vreq.tag = cmd->serial_number;
|
||||||
|
+ vreq.tag = cmd->request->tag;
|
||||||
|
vreq.lun = cmd->device->lun;
|
||||||
|
memcpy(vreq.cdb, cmd->cmnd, MAX_COMMAND_SIZE);
|
||||||
|
vreq.cdb_len = cmd->cmd_len;
|
||||||
|
@@ -585,7 +585,7 @@ static ssize_t do_response (struct scsi_
|
||||||
|
ssize_t ret = 0;
|
||||||
|
|
||||||
|
scmd_dbg(cmd, "response %lu, status %x, data len %d, use_sg %d\n",
|
||||||
|
- cmd->serial_number, res->status, res->data_len, scsi_sg_count(cmd));
|
||||||
|
+ cmd->request->tag, res->status, res->data_len, scsi_sg_count(cmd));
|
||||||
|
|
||||||
|
if (res->status) {
|
||||||
|
unsigned char sense_stack[SCSI_SENSE_BUFFERSIZE];
|
||||||
|
@@ -695,7 +695,7 @@ static inline struct vhba_command *match
|
||||||
|
struct vhba_command *vcmd;
|
||||||
|
|
||||||
|
list_for_each_entry(vcmd, &vdev->cmd_list, entry) {
|
||||||
|
- if (vcmd->cmd->serial_number == tag) {
|
||||||
|
+ if (vcmd->cmd->request->tag == tag) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -931,7 +931,7 @@ static int vhba_ctl_release (struct inod
|
||||||
|
list_for_each_entry(vcmd, &vdev->cmd_list, entry) {
|
||||||
|
WARN_ON(vcmd->status == VHBA_REQ_READING || vcmd->status == VHBA_REQ_WRITING);
|
||||||
|
|
||||||
|
- scmd_warn(vcmd->cmd, "device released with command %lu\n", vcmd->cmd->serial_number);
|
||||||
|
+ scmd_warn(vcmd->cmd, "device released with command %lu\n", vcmd->cmd->request->tag);
|
||||||
|
vcmd->cmd->result = DID_NO_CONNECT << 16;
|
||||||
|
vcmd->cmd->scsi_done(vcmd->cmd);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user