Messages in this thread | | | Subject | Re: [PATCH] 2.5.30-dj1 | From | Paul Larson <> | Date | 05 Aug 2002 17:11:33 -0500 |
| |
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/
| |