Messages in this thread | | | From | "WANG,YIDING (HP-SanJose,ex1)" <> | Subject | RE: Driver reading from a file | Date | Tue, 29 Feb 2000 13:20:24 -0700 |
| |
Marc,
Thanks for the valuable suggestion! However, passing parameters to the driver will not do the work for me. Basically what I am trying to do is to set up persistent binding environment for Linux. This happens to Fibre Channel world when new device plugged into the loop or Fibric, the existing device address could change which leads to target id changes. The persisten binding is to preserve all existing device target id unchanged. This requires to put existing target id and the coresponding device world wide name pair somewhere in a file (or ROM), and be a refernece for the system next boot.
If Linux has some system calls to allow driver access from a file during the loading process, the solution will be obvious.
Eddie Wang Agilent Technologies 350-370 West Trimble Road MS 90TZ San Jose, Ca 95131-1008 Phone: (408) 435-4213 Fax: (408) 435-5838
-----Original Message----- From: Marc SCHAEFER [mailto:schaefer@alphanet.ch] Sent: Tuesday, February 29, 2000 8:01 AM To: linux-scsi@vger.rutgers.edu Subject: Re: Driver reading from a file
WANG,YIDING (HP-SanJose,ex1) <yiding_wang@agilent.com> wrote: > I was wondering that any utility under Linux can allow drvier to read some > variable form a file during dirver initialization stage? If there is, what > is the utility can be used in the driver initialization stage to talk with a > user or driver configuration or system configuration file?
No, however you can define module variables which will be passed to the driver. Example (for 2.2.x):
/* Module parameters */
int unacceptable_mask = 0; /* You can use this to bypass detection * of the boards. E.g. setting to 4 * will skip the 3rd board. */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) MODULE_PARM(unacceptable_mask, "i"); #endif /* >= 2.2.0 */
Use: insmod driver.o unacceptable_mask=1
Used in conjunction with on-demand loading (/etc/conf.modules) or with startup scripts, you get mostly similar functionnality.
- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.rutgers.edu
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |