# cd/dvd reader not always recognized

## sbdmmg

Hello,

  I ran into a strange problem after my last "emerge -au world" on my laptop (HP nc6400); with this emerge i upgraded my kernel (2.6.32-gentoo-r7) and gcc (4.4.3). After the upgrade my cd/dvd reader was not recognized anymore. I then tried to change some of the SCSI flags in my .config, and I got to a better stage, but still with problems. Now the cd/dvd reader is recognized when I boot (i.e. I can see it with cdrecord -scanbus), but when I start playing something (be it an audio cd or a movie) it hangs after a short (and unpredictable) time. Afterward the device is not seen anymore by cdrecord. The problem appeared only after this upgrade, so I doubt this is an hardware failure. Any idea about what I am doing wrong?

I have looked around quite a bit (forums and bugzilla), but I wasn't able to find any hint...

Thank you very much for any suggestion.

Cheers,

davide

------

Here are the SCSI flags that I changed in my dotconfig:

```

< CONFIG_SCSI_MULTI_LUN=y

< CONFIG_SCSI_LOGGING=y

< CONFIG_SCSI_DH=y

< CONFIG_SCSI_DH_HP_SW=y

```

here is how the device is initially recognized by cdrecord (after it hangs the "removable CD-ROM" line disappears)

```

$ cdrecord -scanbus

Cdrecord-ProDVD-ProBD-Clone 2.01.01a75 (i686-pc-linux-gnu) Copyright (C) 1995-2010 JÃ¶rg Schilling

Linux sg driver version: 3.5.34

Using libscg version 'schily-0.9'.

scsibus0:

        0,0,0     0) 'ATA     ' 'FUJITSU MHW2060B' '8918' Disk

        0,1,0     1) *

        0,2,0     2) *

        0,3,0     3) *

        0,4,0     4) *

        0,5,0     5) *

        0,6,0     6) *

        0,7,0     7) *

scsibus4:

        4,0,0   400) 'HL-DT-ST' 'RW/DVD GCC-4247N' '1.01' Removable CD-ROM

        4,1,0   401) *

        4,2,0   402) *

        4,3,0   403) *

        4,4,0   404) *

        4,5,0   405) *

        4,6,0   406) *

        4,7,0   407) *

```

Here is the output from /var/log/messages when the cd freezes and then disappears

```

[   61.416112] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen

[   61.416119] ata5.00: ST_FIRST: !(DRQ|ERR|DF)

[   61.416124] sr 4:0:0:0: CDB: Test Unit Ready: 00 00 00 00 00 00

[   61.416146] ata5.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0

[   61.416148]          res 50/00:03:00:a0:50/00:00:00:00:00/a0 Emask 0x2 (HSM violation)

[   61.416154] ata5.00: status: { DRDY }

[   61.416199] ata5: soft resetting link

[   61.576328] ata5.00: configured for MWDMA2

[   61.577264] ata5: EH complete

[   61.597219] CPUFREQ: Per core ondemand sysfs interface is deprecated - up_threshold

[   62.339402] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen

[   62.339410] sr 4:0:0:0: CDB: Test Unit Ready: 00 00 00 00 00 00

[   62.339432] ata5.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0

[   62.339434]          res 51/24:03:00:00:00/00:00:00:00:00/a0 Emask 0x3 (HSM violation)

[   62.339441] ata5.00: status: { DRDY ERR }

[   62.339487] ata5: soft resetting link

[   62.601394] ata5.00: configured for MWDMA2

[   62.602275] ata5: EH complete

[  132.704077] ata5: lost interrupt (Status 0x58)

[  132.705019] ata5: drained 32768 bytes to clear DRQ.

[  132.821212] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen

[  132.821218] sr 4:0:0:0: CDB: Test Unit Ready: 00 00 00 00 00 00

[  132.821241] ata5.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0

[  132.821244]          res 58/04:00:00:00:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation)

[  132.821249] ata5.00: status: { DRDY DRQ }

[  132.821296] ata5: soft resetting link

[  133.011726] ata5.00: NODEV after polling detection

[  133.011730] ata5.00: revalidation failed (errno=-2)

[  137.972082] ata5: soft resetting link

[  138.123258] ata5.00: NODEV after polling detection

[  138.123264] ata5.00: revalidation failed (errno=-2)

[  143.123088] ata5: soft resetting link

[  143.283388] ata5.00: configured for MWDMA2

[  143.285027] ata5: EH complete

[  143.408355] sr 4:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE

[  143.408364] sr 4:0:0:0: [sr0] Sense Key : Illegal Request [current]

[  143.408373] Info fld=0x0, ILI

[  143.408377] sr 4:0:0:0: [sr0] Add. Sense: Illegal mode for this track

[  143.408387] sr 4:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 40 00

[  143.408404] end_request: I/O error, dev sr0, sector 0

[  143.408410] Buffer I/O error on device sr0, logical block 0

[  143.408416] Buffer I/O error on device sr0, logical block 1

[  143.408424] Buffer I/O error on device sr0, logical block 2

[  143.408429] Buffer I/O error on device sr0, logical block 3

[  143.408434] Buffer I/O error on device sr0, logical block 4

[  143.408439] Buffer I/O error on device sr0, logical block 5

[  143.408444] Buffer I/O error on device sr0, logical block 6

[  143.408449] Buffer I/O error on device sr0, logical block 7

[  143.408454] Buffer I/O error on device sr0, logical block 8

[  143.408459] Buffer I/O error on device sr0, logical block 9

[  143.412146] sr 4:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE

[  143.412153] sr 4:0:0:0: [sr0] Sense Key : Illegal Request [current]

```

Output of lspci

```

# lspci

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)

00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01)

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)

00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)

00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 01)

02:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller

02:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)

02:06.3 SD Host controller: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller

02:06.4 Communication controller: Texas Instruments PCIxx12 GemCore based SmartCard controller

08:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5753M Gigabit Ethernet PCI Express (rev 21)

10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)

```

and relevant output from lshw

```

        *-ide                                                                                                                                          

             description: IDE interface                                                                                                                

             product: 82801G (ICH7 Family) IDE Controller                                                                                              

             vendor: Intel Corporation                                                                                                                 

             physical id: 1f.1                                                                                                                         

             bus info: pci@0000:00:1f.1                                                                                                                

             logical name: scsi4                                                                                                                       

             version: 01                                                                                                                               

             width: 32 bits                                                                                                                            

             clock: 33MHz                                                                                                                              

             capabilities: ide bus_master emulated                                                                                                     

             configuration: driver=ata_piix latency=0                                                                                                  

             resources: irq:16 ioport:1f0(size=8) ioport:3f6 ioport:170(size=8) ioport:376 ioport:40a0(size=16)                                        

           *-cdrom                                                                                                                                     

                description: DVD reader                                                                                                                

                physical id: 0.0.0                                                                                                                     

                bus info: scsi@4:0.0.0                                                                                                                 

                logical name: /dev/cdrom                                                                                                               

                logical name: /dev/cdrw                                                                                                                

                logical name: /dev/dvd                                                                                                                 

                logical name: /dev/scd0                                                                                                                

                logical name: /dev/sr0                                                                                                                 

                capabilities: audio cd-r cd-rw dvd                                                                                                     

                configuration: status=open                                                                                                             

        *-storage                                                                                                                                      

             description: SATA controller                                                                                                              

             product: 82801GBM/GHM (ICH7 Family) SATA AHCI Controller                                                                                  

             vendor: Intel Corporation                                                                                                                 

             physical id: 1f.2                                                                                                                         

             bus info: pci@0000:00:1f.2                                                                                                                

             logical name: scsi0                                                                                                                       

             version: 01                                                                                                                               

             width: 32 bits                                                                                                                            

             clock: 66MHz                                                                                                                              

             capabilities: storage msi pm ahci_1.0 bus_master cap_list emulated                                                                        

             configuration: driver=ahci latency=0                                                                                                      

             resources: irq:27 ioport:13f0(size=8) ioport:15f4(size=4) ioport:1370(size=8) ioport:1574(size=4) ioport:40d0(size=16) memory:f4785000-f47853ff                                                                                                                                                  

```

----------

## audiodef

Check out Pappy's Kernel Seeds. Get the config for your kernel version and see if that helps.

----------

