主题: linux新内核中关闭硬盘的DMA

vortex86 SIS550 Minit-5250E瘦客户机,
使用CF卡启动,显示不支持DMA。


搜索得新内核已基本不再使用ide=nodma参数了,查到这篇文章:“Debian下关闭CF卡的DMA模式”

在grub的启动参数中了一条 “libata.dma=0”就关闭DMA了。


原来的dmesg可以看到内核不断尝试DMA方式,直到最后PIO方式才能正确访问。


[   10.687047] ata1.00: configured for UDMA/33
[   10.689746] scsi 0:0:0:0: Direct-Access     ATA      ELITE PRO CF CAR 2009 PQ: 0 ANSI: 5
[   12.128626] sd 0:0:0:0: [sda] 15662304 512-byte logical blocks: (8.01 GB/7.46 GiB)
[   12.138999] sd 0:0:0:0: [sda] Write Protect is off
[   12.139144] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[   12.147593] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   42.848609] ata1: lost interrupt (Status 0x50)
[   42.848830] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[   42.848609] ata1: lost interrupt (Status 0x50)
[   42.848830] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[   42.848967] ata1.00: failed command: READ DMA
[   42.849118] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
[   42.849138]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[   42.849327] ata1.00: status: { DRDY }
[   42.849581] ata1: soft resetting link
[   43.028910] ata1.00: configured for UDMA/33
[   43.029081] ata1.00: device reported invalid CHS sector 0
[   43.029317] ata1: EH complete
[   73.826377] ata1: lost interrupt (Status 0x50)
[   73.826604] ata1.00: limiting speed to UDMA/25:PIO4
[   73.826748] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[   73.826884] ata1.00: failed command: READ DMA
[   73.827041] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
[   73.827060]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[   73.828159] ata1.00: status: { DRDY }
[   73.828425] ata1: soft resetting link
[   74.014659] ata1.00: configured for UDMA/25
[   74.014826] ata1.00: device reported invalid CHS sector 0
[   74.015062] ata1: EH complete
[  104.932150] ata1: lost interrupt (Status 0x50)
[  104.932376] ata1.00: limiting speed to PIO4
[  104.932518] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[  104.932653] ata1.00: failed command: READ DMA
[  104.932811] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
[  104.932831]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[  104.933024] ata1.00: status: { DRDY }
[  104.933285] ata1: soft resetting link
[  105.112426] ata1.00: configured for PIO4
[  105.112594] ata1.00: device reported invalid CHS sector 0
[  105.112828] ata1: EH complete
[  105.118050]  sda: sda1 sda2 < sda5 > sda3
[  105.146093] sd 0:0:0:0: [sda] Attached SCSI disk
[  105.192368] sda: detected capacity change from 0 to 8019099648
[  105.335586] sd 0:0:0:0: Attached scsi generic sg0 type 0