Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Bug#463886: qpxtool incompatible with libata

View Parsed - Show only message text

Path: g2news1.google.com!news4.google.com!news.germany.com!aioe.org!vlad-tepes.bofh.it!bofh.it!news.nic.it!robomod
From: Mirko Parthey <mirko.part...@informatik.tu-chemnitz.de>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#463886: qpxtool incompatible with libata
Date: Mon, 04 Feb 2008 01:10:15 +0100
Message-ID: <9SX4z-7fm-29@gated-at.bofh.it>
X-Original-To: sub...@bugs.debian.org
Old-Return-Path: <debb...@rietz.debian.org>
Reply-To: Mirko Parthey <mirko.part...@informatik.tu-chemnitz.de>, 463...@bugs.debian.org
Resent-To: debian-bugs-d...@lists.debian.org
Resent-Cc: Daniel Baumann <dan...@debian.org>
X-Debian-Pr-Message: report 463886
X-Debian-Pr-Package: qpxtool
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: qpxtool
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="gKMricLos+KVdGMg"
Content-Disposition: inline
User-Agent: Mutt/1.5.13 (2006-08-11)
X-Scan-Signature: a9db257283d348a3bac3d7ad716fae56
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/282682
List-ID: <debian-bugs-dist.lists.debian.org>
Approved: robo...@news.nic.it
Lines: 105
Organization: linux.* mail to news gateway
Sender: robo...@news.nic.it
X-Original-Date: Sun, 3 Feb 2008 02:26:59 +0100
X-Original-Message-ID: <20080203012659.GA24481@augustus.informatik.tu-chemnitz.de>


--gKMricLos+KVdGMg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: qpxtool
Version: 0.6.1-3
Tags: patch

qpxtool does not work with the Linux kernel's new IDE/SATA
infrastructure (libata):

------------------------------------------------------------------------
...
** Scaning for MMC compliant devices...
/dev/sr0: PLEXTOR  DVDR   PX-760A   1.07
** Scan complete: 1 device(s) found

Selected: /dev/sr0
:-( unable to MODE_SENSE(10) : Input/output error
:-( unable to MODE_SENSE(10) : Input/output error

** Reading supported mode pages...
:-( unable to MODE_SENSE(10) : Input/output error
:-( unable to GET_CONFIGURATION LENGTH : Input/output error
:-( unable to MODE_SENSE(10) : Input/output error
...
------------------------------------------------------------------------

The kernel included with Debian currently ships with libata disabled for PATA
devices.  However, I built my own kernel since the old IDE drivers don't work
properly with my hardware (JMicron 20363).

Someone else had the same problem and reported it here:
http://lkml.org/lkml/2008/1/11/297
https://bugzilla.redhat.com/show_bug.cgi?id=428281

I'll attach a bugfix that works for me.

The cause of this problem seems to be the overloaded Scsi_Command []
operator in qpx_transport.h - it has a strange implementation which is
easy to use incorrectly, and qpxtool does get it wrong in various places.

Regards,
Mirko


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable'), (30, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-rc7-git-mpa1 (SMP w/2 CPU cores)
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages qpxtool depends on:
ii  libc6                   2.7-6            GNU C Library: Shared libraries
ii  libgcc1                 1:4.3-20080116-1 GCC support library
ii  libqt3-mt               3:3.3.7-9        Qt GUI Library (Threaded runtime v
ii  libstdc++6              4.3-20080116-1   The GNU Standard C++ Library v3
ii  libx11-6                2:1.0.3-7        X11 client-side library
ii  libxext6                1:1.0.3-2        X11 miscellaneous extension librar

qpxtool recommends no packages.

-- no debconf information

--gKMricLos+KVdGMg
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="qpxtool.diff"

--- lib/qpxtransport/qpx_transport.cpp.orig	2008-02-03 00:56:14.000000000 +0100
+++ lib/qpxtransport/qpx_transport.cpp	2008-02-03 01:14:09.000000000 +0100
@@ -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];

--gKMricLos+KVdGMg--



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-REQU...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google