Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 1 Nov 2000 00:07:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 1 Nov 2000 00:07:10 -0500 Received: from lilia.hypercore.co.jp ([210.162.116.126]:53266 "EHLO lilia.hypercore.co.jp") by vger.kernel.org with ESMTP id ; Wed, 1 Nov 2000 00:07:00 -0500 From: Kaz Sasayama To: linux-kernel@vger.kernel.org Subject: 2.4.0-test10 AM53C974 driver cannot get kernel boot parameters. [patch] X-Attribution: Kaz User-Agent: EMIKO/1.13.9 (Euglena tripteris) FLIM/1.13.2 (Kasanui) APEL/10.2 Emacs/20.7 (i386-debian-linux-gnu) MULE/4.1 (AOI) MIME-Version: 1.0 (generated by EMIKO 1.13.9 - "Euglena tripteris") Content-Type: text/plain; charset=US-ASCII Message-Id: Date: Wed, 01 Nov 2000 14:06:55 +0900 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org I just tried version 2.4.0-test10 and found the AM53C974 driver does not get any kernel boot parameters when compiled in the kernel. This is my quick fix for it. It seems some other drivers need similar changes too, but I do not have fixes for them yet. Thanks. diff -ur -x *~ -x .depend ../linux-2.4.0-test10/drivers/scsi/AM53C974.c linux-2.4.0-test10/drivers/scsi/AM53C974.c --- ../linux-2.4.0-test10/drivers/scsi/AM53C974.c Thu Oct 5 11:08:38 2000 +++ linux-2.4.0-test10/drivers/scsi/AM53C974.c Wed Nov 1 13:22:59 2000 @@ -572,18 +572,23 @@ } /************************************************************************** -* Function : AM53C974_setup(char *str, int *ints) +* Function : AM53C974_setup(char *str) * * Purpose : LILO command line initialization of the overrides array, * -* Inputs : str - unused, ints - array of integer parameters with ints[0] -* equal to the number of ints. +* Input : str - parameter string. +* +* Returns : 1. * * NOTE : this function needs to be declared as an external function * in init/main.c and included there in the bootsetups list ***************************************************************************/ -void AM53C974_setup(char *str, int *ints) +int AM53C974_setup(char *str) { + int ints[5]; + + get_options(str, ARRAY_SIZE(ints), ints); + if (ints[0] < 4) printk("AM53C974_setup: wrong number of parameters;\n correct syntax is: AM53C974=host-scsi-id, target-scsi-id, max-rate, max-offset\n"); else { @@ -604,7 +609,10 @@ } else printk("AM53C974_setup: too many overrides\n"); } + + return 1; } +__setup("AM53C974=", AM53C974_setup); #if defined (CONFIG_PCI) /************************************************************************** diff -ur -x *~ -x .depend ../linux-2.4.0-test10/drivers/scsi/AM53C974.h linux-2.4.0-test10/drivers/scsi/AM53C974.h --- ../linux-2.4.0-test10/drivers/scsi/AM53C974.h Tue Sep 26 11:55:39 2000 +++ linux-2.4.0-test10/drivers/scsi/AM53C974.h Wed Nov 1 13:33:06 2000 @@ -68,7 +68,7 @@ use_clustering: DISABLE_CLUSTERING \ } -void AM53C974_setup(char *str, int *ints); +int AM53C974_setup(char *str); int AM53C974_detect(Scsi_Host_Template * tpnt); int AM53C974_release(struct Scsi_Host *shp); int AM53C974_biosparm(Disk * disk, int dev, int *info_array); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/