diff options
Diffstat (limited to 'app-cdr/qpxtool/files/qpxtool-0.6.1-libata.patch')
-rw-r--r-- | app-cdr/qpxtool/files/qpxtool-0.6.1-libata.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app-cdr/qpxtool/files/qpxtool-0.6.1-libata.patch b/app-cdr/qpxtool/files/qpxtool-0.6.1-libata.patch new file mode 100644 index 000000000000..145e486308d7 --- /dev/null +++ b/app-cdr/qpxtool/files/qpxtool-0.6.1-libata.patch @@ -0,0 +1,26 @@ +http://bugs.gentoo.org/210392 + +--- lib/qpxtransport/qpx_transport.cpp ++++ lib/qpxtransport/qpx_transport.cpp +@@ -215,6 +215,21 @@ + #define KERNEL_BROKEN 0 + if (use_sg_io) + { ++ /* see linux-2.6.23/block/scsi_ioctl.c:36 */ ++ static const unsigned char scsi_command_size[8] = ++ { ++ 6, 10, 10, 12, ++ 16, 12, 10, 10 ++ }; ++ char cmdsize, opcode; ++ ++ opcode = cgc.cmd[0]; ++ /* see linux-2.6.23/include/scsi/scsi.h:25 */ ++ cmdsize = scsi_command_size[((opcode) >> 5) & 7]; ++ if ((sg_io.cmd_len > 0) && (sg_io.cmd_len < cmdsize)) { ++ sg_io.cmd_len = cmdsize; ++ } ++ + sg_io.dxferp = buf; + sg_io.dxfer_len = sz; + sg_io.dxfer_direction = use_sg_io[dir]; |