HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Kernel Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=6)
-   -   linux-2.6.20-1 and ide cd/dvd device nodes are detected as scsi!udev? (http://www.howtoforge.com/forums/showthread.php?t=11967)

praka123 9th April 2007 10:15

linux-2.6.20-1 and ide cd/dvd device nodes are detected as scsi!udev?
 
3 Attachment(s)

Hello falkko and all,
I compiled a linux-2.6-20 using the config file of my working 2.6.-18-4-686 debian kernel.everything went nice and only problem is my DVD writer and cd writer drives are now detected as /dev/scd0 and /dev/scd1 with lot of symlinks for it like sr0,sr1 etc.I have an asus via chipset board with 4 sata ports.
My default 2.6.18-4 kernel detects these ide drives correctly and makes /dev/hda and /dev/hdb.I've got also a sata hdd /dev/sda.
I think my udev version is older for the 2.6.20 as my udev version 105 while latest is 108.as for now which file to be edited for correcting the driver files.
my /etc/udev/rules.d/z25-persistent-cd-rules which is dependent on some other config file is below:
# CDDVDW_SH-S182F (pci-0000:00:0f.1-scsi-0:0:0:0)
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:0f.1-scsi-0:0:0:0", SYMLINK+="dv
d", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:0f.1-scsi-0:0:0:0", SYMLINK+="dv
drw", ENV{GENERATED}="1"
as seen it is scsi it is detecting!
I dont know how the kernel detects ide drives as scsi things!
here is part of dmesg:
Quote:

SCSI subsystem initialized libata version 2.00 loaded.
ata1: SATA max UDMA/133 cmd 0xDF806D00 ctl 0x0 bmdma 0x0 irq 221
ata2: SATA max UDMA/133 cmd 0xDF806D80 ctl 0x0 bmdma 0x0 irq 221
ata3: SATA max UDMA/133 cmd 0xDF806E00 ctl 0x0 bmdma 0x0 irq 221
ata4: SATA max UDMA/133 cmd 0xDF806E80 ctl 0x0 bmdma 0x0 irq 221
scsi0 : ahci
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-6, max UDMA/133, 156299375 sectors: LBA48
ata1.00: ata1: dev 0 multi count 16
ata1.00: configured for UDMA/133
scsi1 : ahci
ata2: SATA link down (SStatus 0 SControl 300)
scsi2 : ahci
ata3: SATA link down (SStatus 0 SControl 300)
scsi3 : ahci
ata4: SATA link down (SStatus 0 SControl 300)
scsi 0:0:0:0: Direct-Access ATA ST380013AS 3.18 PQ: 0 ANSI: 5
pata_via 0000:00:0f.1: version 0.2.1
ata5: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xFC00 irq 14
ata6: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xFC08 irq 15
scsi4 : pata_via
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ata5.00: ATAPI, max UDMA/33
ata5.01: ATAPI, max UDMA/33
ata5.00: configured for UDMA/33
ata5.01: configured for UDMA/33
scsi5 : pata_via
ATA: abnormal status 0x8 on port 0x177
scsi 4:0:0:0: CD-ROM TSSTcorp CD/DVDW SH-S182F SB02 PQ: 0 ANSI: 5
scsi 4:0:1:0: CD-ROM SONY CD-RW CRX210E1 2YS2 PQ: 0 ANSI: 5
-----------
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378 (0x77, irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 4:0:0:0: Attached scsi CD-ROM sr0
----------------------
sr1: scsi3-mmc drive: 152x/52x writer cd/rw xa/form2 cdda tray
sr 4:0:1:0: Attached scsi CD-ROM sr1
sd 0:0:0:0: Attached scsi generic sg0 type 0
sr 4:0:0:0: Attached scsi generic sg1 type 5
sr 4:0:1:0: Attached scsi generic sg2 type 5

ide0: I/O resource 0x3F6-0x3F6 not free.
ide0: ports already in use, skipping probe
ide1: I/O resource 0x376-0x376 not free.
ide1: ports already in use, skipping probe
and /var/log/messages shows:
Quote:
Apr 7 15:11:39 localhost kernel: ahci 0000:00:0f.0: AHCI 0001.0000 32 slots 4 ports 3 Gbps 0xf impl IDE mode
Apr 7 15:11:39 localhost kernel: ahci 0000:00:0f.0: flags: 64bit ncq pm led clo pmp pio slum part
Apr 7 15:11:39 localhost kernel: ata1: SATA max UDMA/133 cmd 0xDF806D00 ctl 0x0 bmdma 0x0 irq 221
Apr 7 15:11:39 localhost kernel: ata2: SATA max UDMA/133 cmd 0xDF806D80 ctl 0x0 bmdma 0x0 irq 221
Apr 7 15:11:39 localhost kernel: ata3: SATA max UDMA/133 cmd 0xDF806E00 ctl 0x0 bmdma 0x0 irq 221
Apr 7 15:11:39 localhost kernel: ata4: SATA max UDMA/133 cmd 0xDF806E80 ctl 0x0 bmdma 0x0 irq 221
Apr 7 15:11:39 localhost kernel: scsi0 : ahci
Apr 7 15:11:39 localhost kernel: ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Apr 7 15:11:39 localhost kernel: ata1.00: ATA-6, max UDMA/133, 156299375 sectors: LBA48
Apr 7 15:11:39 localhost kernel: ata1.00: ata1: dev 0 multi count 16
Apr 7 15:11:39 localhost kernel: ata1.00: configured for UDMA/133
Apr 7 15:11:39 localhost kernel: scsi1 : ahci
Apr 7 15:11:39 localhost kernel: ata2: SATA link down (SStatus 0 SControl 300)
Apr 7 15:11:39 localhost kernel: scsi2 : ahci
Apr 7 15:11:39 localhost kernel: ata3: SATA link down (SStatus 0 SControl 300)
Apr 7 15:11:39 localhost kernel: scsi3 : ahci
Apr 7 15:11:39 localhost kernel: ata4: SATA link down (SStatus 0 SControl 300)
Apr 7 15:11:39 localhost kernel: scsi 0:0:0:0: Direct-Access ATA ST380013AS 3.18 PQ: 0 ANSI: 5
Apr 7 15:11:39 localhost kernel: ata5: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xFC00 irq 14
Apr 7 15:11:39 localhost kernel: ata6: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xFC08 irq 15
Apr 7 15:11:39 localhost kernel: scsi4 : pata_via
Apr 7 15:11:39 localhost kernel: Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
Apr 7 15:11:39 localhost kernel: ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
Apr 7 15:11:39 localhost kernel: ata5.00: ATAPI, max UDMA/33
Apr 7 15:11:39 localhost kernel: ata5.01: ATAPI, max UDMA/33
Apr 7 15:11:39 localhost kernel: ata5.00: configured for UDMA/33
Apr 7 15:11:39 localhost kernel: ata5.01: configured for UDMA/33
Apr 7 15:11:39 localhost kernel: scsi5 : pata_via
Apr 7 15:11:39 localhost kernel: ATA: abnormal status 0x8 on port 0x177
Apr 7 15:11:39 localhost kernel: scsi 4:0:0:0: CD-ROM TSSTcorp CD/DVDW SH-S182F SB02 PQ: 0 ANSI: 5
Apr 7 15:11:39 localhost kernel: scsi 4:0:1:0: CD-ROM SONY CD-RW CRX210E1 2YS2 PQ: 0 ANSI: 5

Apr 7 15:11:39 localhost kernel: sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
Apr 7 15:11:39 localhost kernel: sr1: scsi3-mmc drive: 152x/52x writer cd/rw xa/form2 cdda tray
Apr 7 15:11:39 localhost kernel: shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
Apr 7 15:11:39 localhost kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
Apr 7 15:11:39 localhost kernel: sr 4:0:0:0: Attached scsi generic sg1 type 5
Apr 7 15:11:39 localhost kernel: sr 4:0:1:0: Attached scsi generic sg2 type 5
I have all modules probed correctly (ide-cd)
the device names are from /etc/udev/rules.d/z25_persistent-cd.rules
But In Debian,this file is created and ruled by config files like /etc/udev/udev.rules(the one i attached) the line:
# SCSI devices
SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
So if i edit the pci-0000:00:0f.1-scsi-0:0:1:0 line to pci-0000:00:0f.1-ide-0:0:1:0 it simply doesnt hold;udev reads from /etc/udev/udev.rules.
in that file is creating these unwanted device files(i think).I have doubt with another file in the /etc/udev directory which is /etc/udev/devfs.rules and is similar in content to the /etc/udev/udev.rules file but with a line added more and inspiring:
Code:

prakrut:~# less /etc/udev/devfs.rules #IDE devices SUBSYSTEMS=="ide", KERNEL=="hd[a-z]*", PROGRAM="ide-devfs.sh %k %b %n", \ ACTION=="add", \ NAME="%c{1}", SYMLINK+="%k %c{2}"
but isnt devfs deprecated in linux-2.6?
Should I copy this lines into the /etc/udev/udev.rules?
also in the /lib/udev/ all files are maintained by depending on the main files in /etc/udev.

BTW i forgot to tell that i have a sata 80gb hdd ( ST380013AS) which is connected to sata port.
my /proc information on my "scsi" cd/dvd drives:

Code:

prakrut:~# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST380013AS Rev: 3.18 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi4 Channel: 00 Id: 00 Lun: 00 Vendor: TSSTcorp Model: CD/DVDW SH-S182F Rev: SB02 Type: CD-ROM ANSI SCSI revision: 05 Host: scsi4 Channel: 00 Id: 01 Lun: 00 Vendor: SONY Model: CD-RW CRX210E1 Rev: 2YS2 Type: CD-ROM ANSI SCSI revision: 05

falko 10th April 2007 15:22

Take a look here: http://www.linuxquestions.org/questi...d.php?t=541094

In new kernels, IDE drives are treated as SCSI/SATA drives as well.

praka123 11th April 2007 06:49

{Solved}
 
OH!Thank You So much dear falkko!.So let the Debian makes the device nodes as /dev/scd0 etc.
But I've got Ubuntu Feisty also installed and it runs with a linux-2.6.-20 kernel and correctly detects ide devices-my cd/dvd drives as /dev/hda and /dev/hdb.but ubuntu feisty uses udev-108 with totally different config file names from what that is found on debian latest experimental.also debian's latest udev version is 105.so hopefully waiting for latest udev to fix this,if it is an error.Thank YOu again.

falko 12th April 2007 16:19

I think Ubuntu will handle your IDE devices the same way as Debian if you upgrade the system to the latest packages by running

Code:

apt-get update
apt-get upgrade


praka123 12th April 2007 17:01

I run Debian mainly and I installed Feisty thats all.apt-get upgrade doesnot help yet.


All times are GMT +2. The time now is 14:17.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.