Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 5 Aug 2002 18:12:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 5 Aug 2002 18:12:50 -0400 Received: from e35.co.us.ibm.com ([32.97.110.133]:44715 "EHLO e35.co.us.ibm.com") by vger.kernel.org with ESMTP id ; Mon, 5 Aug 2002 18:12:48 -0400 Subject: Re: [PATCH] 2.5.30-dj1 From: Paul Larson To: Matti Aarnio Cc: davej@suse.de, lkml In-Reply-To: <20020805214835.GP32427@mea-ext.zmailer.org> References: <1028579086.19435.31.camel@plars.austin.ibm.com> <20020805214835.GP32427@mea-ext.zmailer.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.5 Date: 05 Aug 2002 17:11:33 -0500 Message-Id: <1028585494.19435.56.camel@plars.austin.ibm.com> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2634 Lines: 63 On Mon, 2002-08-05 at 16:48, Matti Aarnio wrote: > On Mon, Aug 05, 2002 at 03:24:43PM -0500, Paul Larson wrote: > > Trivial fix for sym53c8xx driver breakage when > > CONFIG_BROKEN_SCSI_ERROR_HANDLING is turned off. > > Wrong. You are trying to place your "fix" within > a #define statement. No can do. No, just ifdefing out the broken part the same way it's ifdefed out in hosts.h which should make the driver compile regardless of whether broken scsi error handling is enabled or disabled. Hopefully you have a cleaner way of doing it. The problem is that this driver won't build if CONFIG_BROKEN_SCSI_ERROR_HANDLING isn't defined because in hosts.h we have this in the Scsi_Host_Template struct: #ifdef CONFIG_BROKEN_SCSI_ERROR_HANDLING int (* abort)(Scsi_Cmnd *); int (* reset)(Scsi_Cmnd *, unsigned int); #endif This is the compiler error generated by it: gcc -Wp,-MD,./.sym53c8xx.o.d -D__KERNEL__ -I/kernel/bk/linux-dj/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=sym53c8xx -c -o sym53c8xx.o sym53c8xx.c sym53c8xx.c:14724: unknown field `abort' specified in initializer sym53c8xx.c:14724: warning: initialization from incompatible pointer type sym53c8xx.c:14724: unknown field `reset' specified in initializer sym53c8xx.c:14724: warning: initialization from incompatible pointer type make[3]: *** [sym53c8xx.o] Error 1 make[3]: Leaving directory `/kernel/bk/linux-dj/drivers/scsi' make[2]: *** [scsi] Error 2 make[2]: Leaving directory `/kernel/bk/linux-dj/drivers' make[1]: *** [drivers] Error 2 make[1]: Leaving directory `/kernel/bk/linux-dj' make: *** [bzImage] Error 2 > > Thanks, > > Paul Larson > > > > --- linux-dj/drivers/scsi/sym53c8xx.h Mon Aug 5 15:42:11 2002 > > +++ linux-dj-symfix/drivers/scsi/sym53c8xx.h Mon Aug 5 15:41:43 2002 > > @@ -89,8 +89,10 @@ > > release: sym53c8xx_release, \ > > info: sym53c8xx_info, \ > > queuecommand: sym53c8xx_queue_command,\ > > +#ifdef CONFIG_BROKEN_SCSI_ERROR_HANDLING > > abort: sym53c8xx_abort, \ > > reset: sym53c8xx_reset, \ > > +#endif > > bios_param: scsicam_bios_param, \ > > can_queue: SCSI_NCR_CAN_QUEUE, \ > > this_id: 7, \ > > > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/