Commit c6a4440f authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] dac960 devfs_name initialisation fix

From: Andrey Borzenkov <arvidjaar@mail.ru>

DAC960.c does it incorrectly (at least in 2.6.0-test4). It will create
_directory_ /dev/rd/cNdM making it impossible to create compat block device
entry with the same name.

The right thing it to create separate directory for each controller/target as 
in attached trivial patch (untested due to lack of hardware). You will need
devfsd support for this but then you will need it for cciss or cpqarray as 
well and possibly for others. Which returns us to the problem of devfsd 
maintenance ...
parent a39e2c39
...@@ -2485,7 +2485,7 @@ static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller) ...@@ -2485,7 +2485,7 @@ static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
disk->queue = RequestQueue; disk->queue = RequestQueue;
sprintf(disk->disk_name, "rd/c%dd%d", Controller->ControllerNumber, n); sprintf(disk->disk_name, "rd/c%dd%d", Controller->ControllerNumber, n);
sprintf(disk->devfs_name, "rd/c%dd%d", Controller->ControllerNumber, n); sprintf(disk->devfs_name, "rd/host%d/target%d", Controller->ControllerNumber, n);
disk->major = MajorNumber; disk->major = MajorNumber;
disk->first_minor = n << DAC960_MaxPartitionsBits; disk->first_minor = n << DAC960_MaxPartitionsBits;
disk->fops = &DAC960_BlockDeviceOperations; disk->fops = &DAC960_BlockDeviceOperations;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment