lkml.org 
[lkml]   [2002]   [Oct]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 5 Oct 2002 15:38:29 +0300 (EEST)
FromKai Makisara <>
SubjectRe: SCSI st tape wrong minor in 2.5.40 with devfs
On Sat, 5 Oct 2002, Bjoern A. Zeeb wrote:

> Hi,
>
> I see a problem with recent 2.5 kernels and SCSI st and devfs.
>
You probably can see it also with driverfs :-(

> As you can see from the output down under the minors are off by 4.
>
The device registration was moved outside the st_dev_arr_lock spinlock but
it seems that I was a bit careless, after all. The driverfs/devicefs
registration loop contains the following lines:

            tpnt->driverfs_dev_r[mode].driver_data =
                        (void *)(long)__mkdev(MAJOR_NR, i + (mode << 5));

            tpnt->de_r[mode] =
                devfs_register (SDp->de, name, DEVFS_FL_DEFAULT,
                                MAJOR_NR, i + (mode << 5),
                                S_IFCHR | S_IRUGO | S_IWUGO,
(two of each type)

In the original location i did contain the device number but here it
contains 4 (from the latest loop). The fix seems to be to replace i by
dev_num but I have not yet tested it.

Thanks for reporting the bug.

--
Kai


-
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/

\
 
 \ /
  Last update: 2005-03-22 12:29    [W:0.159 / U:0.080 seconds]
©2003-2008 Jasper Spaans