Re: [Bug 355] New: Error when compiling SCSI drivers (Adaptec, Seagate etc.)

From: Christoph Hellwig (
Date: Fri Feb 14 2003 - 13:15:35 EST

On Fri, Feb 14, 2003 at 07:43:43AM -0800, Martin J. Bligh wrote:
> Summary: Error when compiling SCSI drivers (Adaptec, Seagate
> etc.)
> Kernel Version: 2.5.60 (- bk4)
> Status: NEW
> Severity: normal
> Owner:
> Submitter:
> Software Environment: linnx Kernel 2.5.60 ( and snapshots -bk1 ... -bk4)
> Problem Description:
> In the change of linux-2.5.59 to linux-2.5.60, the struct scsi_cmnd
> was changed in that the fields host, target, lun, channel are replaced
> by fields of the device field (struct scsi_device*): host, id, lun,
> channel
> This is not reflected in several SCSI drivers, e.g. the change is not
> considered for Adaptec and Seagate SCSI controllers.
> Proposal to fix the Problem:
> 1. some new defines for drivers/scsi/scsi.h
> +#define SCSICMND_HOST device->host
> +#define SCSICMND_TARGET device->id
> +#define SCSICMND_LUN device->lun
> +#define SCSICMND_CHANNEL device->channel

This macro abuse will never get into mainline. Fix it to use the proper
dereferences directly, that'll work fine for older kernels aswell.

/me wonders how people get the crazy idea that cpp abuse will make code
more maintainable..
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Feb 15 2003 - 22:00:55 EST