Re: PATCH: cdrecord: avoiding scsi device numbering for ide devices

From: Erik Mouw
Date: Fri Aug 06 2004 - 09:17:56 EST


On Fri, Aug 06, 2004 at 03:45:46PM +0200, Joerg Schilling wrote:
> >Testing if at least CCS_SENSE_LEN (18) is supported...
> >Sense Data: 70 00 05 00 00 00 00 0A 00 00 00 00 24 00 00 C0 00 03
>
> Wonderful, so you just found another bug in the Linux kernel include files.
>
> To fix: edit sg.h in the Linux kernel source tree and fix the value for
> SG_MAX_QUEUE or if you believe you cannot change it, create a new #define
> and document it......

Uhm, it *is* documented:

In include/scsi/sg.h, line 255:

/* maximum outstanding requests, write() yields EDOM if exceeded */
#define SG_MAX_QUEUE 16

SG_MAX_QUEUE has nothing to do with inquiry length but with the maximum
number of queued commands (hence the name SG_MAX_QUEUE).

I'm sorry, but I think Jens found a genuine bug in your program. IMHO
it would increase your credits on this list if you admit it and fix the
bug. If you don't, we'll keep this kind of linux-vs-cdrecord threads on
lkml. That can't be the idea, cause we all just agreed that we wanted
to keep the amount noise on this list low.


BTW, you are right for the old SG implementations. Line 267 of
include/scsi/sg.h:

/* vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv */
/* The older SG interface based on the 'sg_header' structure follows. */
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

#define SG_MAX_SENSE 16 /* this only applies to the sg_header interface */

You're free to use old and deprecated implementations but don't file
bugs against them cause they are old and deprecated for a reason.



Erik

--
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/