Linux device number bug report
Hello,
I have some questions about device number extension.
In Linux kernel 2.6, device number will be extended from 16-bit to 32-bit. All utilities and libraries should make corresponding extension for this new feature in kernel 2.6.
I find that ¡°lm_sensors-2.8.1-2.4.23¡± considers and operates device number as 16-bit in following places:
In file kernel/chips/smbus-arp.c: 99
u16 dev_int;
"u16" is defined as unsigned short type. It seems not to correspond to device number extension.
In file kernel/chips/smbus-arp.c: 376
data->dev[newdev].dev_int = (blk[6] << 8) | blk[7];
As following, "major" should be 12-bit, and "minor" should be 20-bit.
mmmm mmmm mmmm MMMM MMMM MMMM mmmm mmmm
"M" means major device number.
"m" means minor device number.
But this expression considers both major number and minor number as 8-bit. It seems not to correspond to device number extension.
In file kernel/busses/i2c-piix4.c: 49
const unsigned short dev;
This definition seems not to correspond to device number extension.
Since I didn¡¯t find any information about this aspect in homepage of this package, I wonder whether the latest version has completed the device number extension? If not, will it be completed in the future? And when?
Looking forward to answering.
Regards,
Zhang Jun
--------------------------------------------------
Zhang Jun
Dept. of Technology and Development
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 16-5, Guanzhou Rd., Nanjing, P.R.China
PHONE: +86+25-6630523-652
FUJITSU INTERNAL: 79955-652
FAX: +86+25-3317685
Mail: [email protected]
--------------------------------------------------
Our package only works on 2.4 kernels.
Issues such as this get fixed as drivers are ported to 2.6. See the 2.6 kernel source tree for examples.
Quoted 44 lines · Zhang Jun
Hello,
I have some questions about device number extension.
In Linux kernel 2.6, device number will be extended from 16-bit to 32-bit. All utilities and libraries should make corresponding extension for this new feature in kernel 2.6.
I find that ¡°lm_sensors-2.8.1-2.4.23¡± considers and operates device number as 16-bit in following places:
In filekernel/chips/smbus-arp.c: 99u16 dev_int;"u16" is defined as unsigned short type. It seems not to correspond to device number extension.
In file
kernel/chips/smbus-arp.c: 376data->dev[newdev].dev_int = (blk[6] << 8) | blk[7];As following, "major" should be 12-bit, and "minor" should be 20-bit.
mmmm mmmm mmmm MMMM MMMM MMMM mmmm mmmm
"M" means major device number.
"m" means minor device number.
But this expression considers both major number and minor number as 8-bit. It seems not to correspond to device number extension.In file
kernel/busses/i2c-piix4.c: 49const unsigned short dev;This definition seems not to correspond to device number extension.
Since I didn¡¯t find any information about this aspect in homepage of this package, I wonder whether the latest version has completed the device number extension? If not, will it be completed in the future? And when?
Looking forward to answering.
Regards,
Zhang Jun--------------------------------------------------
Zhang Jun
Dept. of Technology and Development
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 16-5, Guanzhou Rd., Nanjing, P.R.China
PHONE: +86+25-6630523-652
FUJITSU INTERNAL: 79955-652
FAX: +86+25-3317685
Mail: [email protected]
--------------------------------------------------