# atapicam problem



## cpm@ (Jul 30, 2011)

Hello people:

I have a question about version atapi-cam.c (rev 1.63.2.7.2.1) if reverting to rev 1.63.2.6.2.1 will fix the "INQUIRY ILLEGAL REQUEST" error.  


```
$ uname -srm
FreeBSD 8.2-RELEASE i386
```

atapi-cam.c revision:


```
$ grep FBSDID /usr/src/sys/dev/ata/atapi-cam.c 
__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.63.2.7.2.1 2010/12/21 17:09:
25 kensmith Exp $");
```

The infamous error:


```
$ dmesg | grep acd
acd0: DVDR <HL-DT-ST DVDRAM GSA-4120B/A102> at ata1-master UDMA33 
acd1: DVDROM <HL-DT-STDVD-ROM GDR8161B/0100> at ata1-slave UDMA33 
acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00 sks=0x40 0x00 0x01
acd1: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00
```
 

Thanks in advance.


----------



## cpm@ (Jul 30, 2011)

I'll add more information.

In this post someone had a compile error.


----------



## sossego (Jul 31, 2011)

In what directory are you building?


----------



## cpm@ (Jul 31, 2011)

By now, I don't try to compile the kernel with this change.

First I want to know if it works.

Someone had success with this fix?


```
/usr/src
```


----------



## sossego (Aug 1, 2011)

```
cd sys/modules/ata && make && make install
```
or enable during kernel compile. The first method will build all ata modules that were not enabled during kernel compilation.

From /usr/src/sys/powerpc/conf/MYKERNEL


```
# ATA and ATAPI devices
device		ata
device		atadisk		# ATA disk drives
device		atapicd		# ATAPI CDROM drives
#device		atapifd		# ATAPI floppy drives
#device		atapist		# ATAPI tape drives
```
http://www.freebsdwiki.com/index.php/K3b shows a working reference to atapi devices.


----------



## cpm@ (Aug 1, 2011)

Well, I will post the results as soon as possible. 

_sossego_, a lot of thanks for your time.


----------



## cpm@ (Aug 6, 2011)

Without changes:

My kernel


```
# ATA and ATAPI devices
device          ata
device          atadisk         # ATA disk drives
device          ataraid         # ATA RAID drives
device          atapicam        # SCSI emulation for ATAPI CDROM
device          atapicd         # ATAPI CDROM drives
device          atapifd         # ATAPI floppy drives
device          atapist         # ATAPI tape drives
options         ATA_STATIC_ID   # Static device numbering

# SCSI peripherals
device          scbus           # SCSI bus (required for SCSI)
device          ch              # SCSI media changers
device          da              # Direct Access (disks)
device          sa              # Sequential Access (tape etc)
device          cd              # CD
device          pass            # Passthrough device (direct SCSI access)
device          ses             # SCSI Environmental Services (and SAF-TE)
```


I can burn, mount or listen music from cd

But the error persists:


```
$ dmesg | grep acd
acd0: DVDR <HL-DT-ST DVDRAM GSA-4120B/A102> at ata1-master UDMA33
acd1: DVDROM <HL-DT-STDVD-ROM GDR8161B/0100> at ata1-slave UDMA33
acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00 sks=0x40 0x00 0x01
acd1: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00
```


My conclusion:

I must compile atapi-cam.c rev 1.63.2.6.2.1, and cross my fingers. I hope I can remove those errors.


----------



## cpm@ (Aug 20, 2011)

The error messages doesn't disappear, but anyway, is benign. The controller tries to send a command to the device. The device doesn't support it. That's all, everything else works.


----------

