# acd0: setting up DMA failed



## mitranet (Aug 9, 2009)

Hello all,

I am getting the following error on my DVDRW drive:

```
Aug  9 10:07:18 phenomium kernel: acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x02 ascq=0x00 
Aug  9 10:07:18 phenomium kernel: (cd0:ata2:0:0:0): READ(10). CDB: 28 0 0 5 77 e0 0 0 1 0 
Aug  9 10:07:18 phenomium kernel: (cd0:ata2:0:0:0): CAM Status: SCSI Status Error
Aug  9 10:07:18 phenomium kernel: (cd0:ata2:0:0:0): SCSI Status: Check Condition
Aug  9 10:07:18 phenomium kernel: (cd0:ata2:0:0:0): MEDIUM ERROR info:577e0 asc:2,0
Aug  9 10:07:18 phenomium kernel: (cd0:ata2:0:0:0): No seek complete
Aug  9 10:07:18 phenomium kernel: (cd0:ata2:0:0:0): Retrying Command (per Sense Data)
Aug  9 10:07:18 phenomium kernel: ata3: FAILURE - zero length DMA transfer attempted
Aug  9 10:07:18 phenomium kernel: acd0: setting up DMA failed
Aug  9 10:07:19 phenomium kernel: ata3: FAILURE - zero length DMA transfer attempted
etc.
```
Also, k3b and xcdroast seem to have problems detecting the drive. They keep complaining that they can not find an optical device. (which should be /dev/cd0).

Information about my system:

uname:

```
FreeBSD phenomium.mitranet.nl 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri Aug  7 01:22:21 CEST 2009     root@phenomium.mitranet.nl:/usr/obj/usr/src/sys/PHENOMIUM02  amd64
```

kernel PHENOMIUM02 (excerpt):

```
cpu             HAMMER
ident           PHENOMIUM02
options QUOTA
options IPFIREWALL
options IPFIREWALL_VERBOSE
options DUMMYNET
options HZ=1000
device atapicam
device          ata
device          atadisk
device          ataraid
device          atapicd
device          atapifd
device          atapist
options         ATA_STATIC_ID
device          scbus
device          ch
device          da
device          sa
device          cd 
device          pass
```

/dev:

```
[unix@phenomium.mitranet.nl:/data/home/unix]$ ls -la /dev/|grep cd
crw-rw-rw-   1 root  operator    0,  99 Aug  9 02:42 acd0
crw-r-----   1 root  operator    0, 126 Aug  9 02:42 acd0t01
crw-rw-rw-   1 root  operator    0, 118 Aug  9 02:42 cd0
[unix@phenomium.mitranet.nl:/data/home/unix]$
```

dmesg (excerpt):

```
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Phenom(tm) 9850 Quad-Core Processor (2500.19-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x100f23  Stepping = 3
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x802009<SSE3,MON,CX16,<b23>>
  AMD Features=0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x7ff<LAHF,CMP,SVM,ExtAPIC,CR8,<b5>,<b6>,<b7>,Prefetch,<b9>,<b10>>
  TSC: P-state invariant
  Cores per package: 4
usable memory = 4280946688 (4082 MB)
avail memory  = 4108361728 (3918 MB)
ACPI APIC Table: <122407 APIC1648>
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  2
 cpu3 (AP): APIC ID:  3
ioapic0 <Version 2.1> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <122407 RSDT1648> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of ffb80000, 80000 (3) failed
acpi0: reservation of fff00000, 100000 (3) failed
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, cff00000 (3) failed
ACPI HPET table warning: Sequence is non-zero (2)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 900
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> at device 2.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0xc000-0xc0ff mem 0xd0000000-0xdfffffff,0xfe9f0000-0xfe9fffff irq 18 at device 0.0 on pci1
hdac0: <ATI RV630 High Definition Audio Controller> mem 0xfe9ec000-0xfe9effff irq 19 at device 0.1 on pci1
hdac0: HDA Driver Revision: 20090329_0131
hdac0: [ITHREAD]
pcib2: <ACPI PCI-PCI bridge> at device 6.0 on pci0
pci2: <ACPI PCI bus> on pcib2
atapci0: <ATI IXP600 SATA300 controller> port 0xb000-0xb007,0xa000-0xa003,0x9000-0x9007,0x8000-0x8003,0x7000-0x700f mem 0xfe8ff800-0xfe8ffbff irq 22 at device 18.0 on pci0
atapci0: [ITHREAD]
atapci0: AHCI Version 01.10 controller with 4 ports detected
ata2: <ATA channel 0> on atapci0
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci0
ata3: [ITHREAD]
ata4: <ATA channel 2> on atapci0
ata4: [ITHREAD]
ata5: <ATA channel 3> on atapci0
ata5: [ITHREAD]
pci0: <serial bus, SMBus> at device 20.0 (no driver attached)
atapci1: <ATI IXP600 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xff00-0xff0f at device 20.1 on pci0
ata0: <ATA channel 0> on atapci1
ata0: [ITHREAD]
hdac1: <ATI SB600 High Definition Audio Controller> mem 0xfe8f4000-0xfe8f7fff irq 16 at device 20.2 on pci0
hdac1: HDA Driver Revision: 20090329_0131
hdac1: [ITHREAD]
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
pcib3: <ACPI PCI-PCI bridge> at device 20.4 on pci0
pci3: <ACPI PCI bus> on pcib3
pci3: <multimedia> at device 2.0 (no driver attached)
em0: <Intel(R) PRO/1000 Network Connection 6.9.6> port 0xe800-0xe83f mem 0xfebc0000-0xfebdffff,0xfeba0000-0xfebbffff irq 21 at device 3.0 on pci3
em0: [FILTER]
em0: Ethernet address: 00:1b:21:17:8f:61
acpi_button0: <Power Button> on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
acpi_throttle0: CLK_VAL field overlaps THT_EN bit
device_attach: acpi_throttle0 attach returned 6
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xcffff,0xd0000-0xd0fff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
ppc0: cannot reserve I/O port range
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ukbd0: <Logitech USB Receiver, class 0/0, rev 1.10/38.10, addr 2> on uhub1
kbd2 at ukbd0
ums0: <Logitech USB Receiver, class 0/0, rev 1.10/38.10, addr 2> on uhub1
ums0: 8 buttons and Z dir.
Timecounters tick every 1.000 msec
ad0: 38172MB <MAXTOR 6L040J2 A93.0500> at ata0-master UDMA133
ad4: 715404MB <SAMSUNG HD753LJ 1AA01109> at ata2-master SATA300
acd0: DVDR <Optiarc DVD RW AD-7203S/1.04> at ata3-master SATA150
GEOM_LABEL: Label for provider ad0s1a is ufsid/4a76ae87acea749e.
GEOM_LABEL: Label for provider ad0s1d is ufsid/4a76ae9edced99b2.
GEOM_LABEL: Label for provider ad0s1e is ufsid/4a76ae9d2d7dce0a.
GEOM_LABEL: Label for provider ad0s1f is ufsid/4a76ae9d00089a00.
GEOM_LABEL: Label for provider ad4s1 is ntfs/XP_Pro_x64_UK.
GEOM_LABEL: Label for provider ad4s3 is ufsid/4a76ae871cba9765.
GEOM_LABEL: Label for provider ad4s5 is msdosfs/D0-P2.
(probe1:ata2:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
(probe1:ata2:0:0:0): CAM Status: SCSI Status Error
(probe1:ata2:0:0:0): SCSI Status: Check Condition
(probe1:ata2:0:0:0): NOT READY asc:3a,0
(probe1:ata2:0:0:0): Medium not present
(probe1:ata2:0:0:0): Unretryable error
SMP: AP CPU #1 Launched!
SMP: AP CPU #3 Launched!
SMP: AP CPU #2 Launched!
cd0 at ata2 bus 0 target 0 lun 0
cd0: <Optiarc DVD RW AD-7203S 1.04> Removable CD-ROM SCSI-0 device 
cd0: 3.300MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
Trying to mount root from ufs:/dev/ad0s1a
GEOM_LABEL: Label ufsid/4a76ae87acea749e removed.
GEOM_LABEL: Label for provider ad0s1a is ufsid/4a76ae87acea749e.
GEOM_LABEL: Label ufsid/4a76ae871cba9765 removed.
<11G8>/dev/ad4s3d: FILE SYSTEM CLEAN; SKIPPIENG CHECKS
OM_
BEL: Label ufsid/4a76ae9d2d7dce0a removed.
GEOM_LABEL: Label for provider ad4s3 is ufsid/4a76ae871cba9765.
GEOM_LABEL: Label for provider ad0s1e is ufsid/4a76ae9d2d7dce0a.
GEOM_LABEL: Label ufsid/4a76ae9d00089a00 removed.
GEOM_LABEL: Label for provider ad0s1f is ufsid/4a76ae9d00089a00.
GEOM_LABEL: Label ufsid/4a76ae9edced99b2 removed.
GEOM_LABEL: Label for provider ad0s1d is ufsid/4a76ae9edced99b2.
GEOM_LABEL: Label ufsid/4a76ae87acea749e removed.
GEOM_LABEL: Label ufsid/4a76ae871cba9765 removed.
GEOM_LABEL: Label ufsid/4a76ae9d2d7dce0a removed.
GEOM_LABEL: Label ufsid/4a76ae9d00089a00 removed.
GEOM_LABEL: Label ufsid/4a76ae9edced99b2 removed.
netsmb_dev: loaded
drm0: <ATI Radeon HD 2600 Pro> on vgapci0
vgapci0: child drm0 requested pci_enable_busmaster
info: [drm] Initialized radeon 1.29.0 20080528
info: [drm] Setting GART location based on new memory map
info: [drm] Loading RV630 CP Microcode
info: [drm] Loading RV630 PFP Microcode
info: [drm] Resetting GPU
info: [drm] writeback test succeeded in 1 usecs
drm0: [ITHREAD]
```

camcontrol devlist:

```
<Generic USB SD Reader 1.00>       at scbus0 target 0 lun 0 (pass0,da0)
<Generic USB CF Reader 1.01>       at scbus0 target 0 lun 1 (pass1,da1)
<Generic USB SM Reader 1.02>       at scbus0 target 0 lun 2 (pass2,da2)
<Generic USB MS Reader 1.03>       at scbus0 target 0 lun 3 (pass3,da3)
<Optiarc DVD RW AD-7203S 1.04>     at scbus3 target 0 lun 0 (pass4,cd0)
```

/etc/devfs.conf:

```
perm acd0 0666
perm cd0 0666
perm xpt0 0666
perm pass0 0666
perm pass1 0666
perm pass2 0666
perm pass4 0666
```

hal daemon and dbus-daemon are both running.

Does anyone have an idea what the problem might be, and if there is a solution to it ?

Thanks,

Rick


----------

