]> git.hungrycats.org Git - linux/commitdiff
[PATCH] dac960 devfs_name initialisation fix
authorAndrew Morton <akpm@osdl.org>
Tue, 9 Sep 2003 17:18:56 +0000 (10:18 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 9 Sep 2003 17:18:56 +0000 (10:18 -0700)
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 ...

drivers/block/DAC960.c

index f71ad544ad7fc443ffc71aae323e311ee65491f1..109f009b29ea40b84d4ae6eff00a2cb8eeef87e9 100644 (file)
@@ -2485,7 +2485,7 @@ static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
 
        disk->queue = RequestQueue;
        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->first_minor = n << DAC960_MaxPartitionsBits;
        disk->fops = &DAC960_BlockDeviceOperations;