libata/PATA: GPCMD_SET_STREAMING via SG_IO does nothing
Hi all,
while trying to limit the speed of DVD drives during DVD playback I've come under the impression that GPCMD_SET_STREAMING via SG_IO doesn't yet work with libata/PATA (AMD/NVIDIA PATA support). I tested on an NForce2 board (all IDE, no SATA) and kernel 2.6.22.12. When I use the "old" ATA kernel driver my drive slows down, with libata it doesn't. Is this a known issue or has this slipped by unnoticed?
I tried with mplayer dvd:// -dvd-device /dev/sr0 -dvd-speed BTW . I get no errors in syslog/dmesg. Also mplayer doesn't report a problem (so ioctl(fd, SG_IO, &sghdr) doesn't have a return < 0).
Regards
Sebastian
ghMem 229376 -> 262128
early_node_map[1] active PFN ranges
0: 0 -> 262128
On node 0 totalpages: 262128
DMA zone: 32 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 4064 pages, LIFO batch:0
Normal zone: 1760 pages used for memmap
Normal zone: 223520 pages, LIFO batch:31
HighMem zone: 255 pages used for memmap
HighMem zone: 32497 pages, LIFO batch:7
DMI 2.2 present.
ACPI: RSDP 000F6FA0, 0014 (r0 Nvidia)
ACPI: RSDT 3FFF3000, 002C (r1 Nvidia AWRDACPI 42302E31 AWRD 0)
ACPI: FACP 3FFF3040, 0074 (r1 Nvidia AWRDACPI 42302E31 AWRD 0)
ACPI: DSDT 3FFF30C0, 478E (r1 NVIDIA AWRDACPI 1000 MSFT 100000E)
ACPI: FACS 3FFF0000, 0040
ACPI: APIC 3FFF7880, 006E (r1 Nvidia AWRDACPI 42302E31 AWRD 0)
Nvidia board detected. Ignoring ACPI timer override.
If you got timer trouble try acpi_use_timer_override
ACPI: PM-Timer IO Port: 0x4008
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 6:8 APIC version 16
ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: BIOS IRQ0 pin2 override ignored.
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 14 global_irq 14 high edge)
ACPI: INT_SRC_OVR (bus 0 bus_irq 15 global_irq 15 high edge)
ACPI: IRQ9 used by override.
ACPI: IRQ14 used by override.
ACPI: IRQ15 used by override.
Enabling APIC mode: Flat. Using 1 I/O APICs
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at 50000000 (gap: 40000000:bec00000)
Built 1 zonelists. Total pages: 260081
Kernel command line: BOOT_IMAGE=Gentoo ro root=802 radeonfb.default_dynclk=1 radeonfb.monitor_layout=TMDS,NONE snd-ac97-codec.power_save=1 loop.max_loop=2 acpi_os_name="Microsoft Windows NT" acpi_osi="Windows 2001"
ACPI: Added _OSI(Windows 2001)
mapped APIC to ffffd000 (fee00000)
mapped IOAPIC to ffffc000 (fec00000)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 16384 bytes)
Detected 1670.455 MHz processor.
Console: colour VGA+ 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1035792k/1048512k available (2049k kernel code, 12076k reserved, 683k data, 160k init, 131008k highmem)
virtual kernel memory layout:
fixmap : 0xfffab000 - 0xfffff000 ( 336 kB)
pkmap : 0xff800000 - 0xffc00000 (4096 kB)
vmalloc : 0xf8800000 - 0xff7fe000 ( 111 MB)
lowmem : 0xc0000000 - 0xf8000000 ( 896 MB)
.init : 0xc03ae000 - 0xc03d6000 ( 160 kB)
.data : 0xc0300633 - 0xc03ab264 ( 683 kB)
.text : 0xc0100000 - 0xc0300633 (2049 kB)Checking if this processor honours the WP bit even in supervisor mode... Ok. Calibrating delay using timer specific routine.. 3342.82 BogoMIPS (lpj=16714141) Mount-cache hash table entries: 512
CPU: After generic identify, caps: 0383fbff c1cbfbff 00000000 00000000 00000000 00000000 00000000
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 256K (64 bytes/line)
CPU: After all inits, caps: 0383fbff c1cbfbff 00000000 00000420 00000000 00000000 00000000 Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
Compat vDSO mapped to ffffe000.
CPU: AMD Sempron(tm) 2400+ stepping 01
Checking 'hlt' instruction... OK.
ACPI: Core revision 20070126
ACPI: Overriding _OS definition to 'Microsoft Windows NT'
ENABLING IO-APIC IRQs
..TIMER: vector=0x31 apic1=0 pin1=0 apic2=-1 pin2=-1
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: Using configuration type 1
Setting up standard PCI resources
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGPB._PRT]
ACPI: PCI Interrupt Link [LNK1] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK2] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK3] (IRQs 3 4 5 6 7 10 11 *12 14 15)
ACPI: PCI Interrupt Link [LNK4] (IRQs 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNK5] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LUBA] (IRQs *3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LUBB] (IRQs 3 4 5 6 *7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LMAC] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LAPU] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LACI] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LMCI] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LSMB] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LUB2] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LFIR] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [L3CM] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LIDE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [APC1] (IRQs *16), disabled.
ACPI: PCI Interrupt Link [APC2] (IRQs *17), disabled.
ACPI: PCI Interrupt Link [APC3] (IRQs *18)
ACPI: PCI Interrupt Link [APC4] (IRQs *19)
ACPI: PCI Interrupt Link [APC5] (IRQs *16), disabled.
ACPI: PCI Interrupt Link [APCF] (IRQs 20 21 22) *0
ACPI: PCI Interrupt Link [APCG] (IRQs 20 21 22) *0
ACPI: PCI Interrupt Link [APCH] (IRQs 20 21 22) *0
ACPI: PCI Interrupt Link [APCI] (IRQs 20 21 22) *0, disabled.
ACPI: PCI Interrupt Link [APCJ] (IRQs 20 21 22) *0, disabled.
ACPI: PCI Interrupt Link [APCK] (IRQs 20 21 22) *0, disabled.
ACPI: PCI Interrupt Link [APCS] (IRQs *23)
ACPI: PCI Interrupt Link [APCL] (IRQs 20 21 22) *0
ACPI: PCI Interrupt Link [APCM] (IRQs 20 21 22) *0, disabled.
ACPI: PCI Interrupt Link [AP3C] (IRQs 20 21 22) *0, disabled.
ACPI: PCI Interrupt Link [APCZ] (IRQs 20 21 22) *0, disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp: PnP ACPI: found 10 devices
ACPI: ACPI bus type pnp unregistered
SCSI subsystem initialized
libata version 2.21 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
pnp: 00:00: ioport range 0x4000-0x407f has been reserved
pnp: 00:00: ioport range 0x4080-0x40ff has been reserved
pnp: 00:00: ioport range 0x4400-0x447f has been reserved
pnp: 00:00: ioport range 0x4480-0x44ff has been reserved
pnp: 00:00: ioport range 0x4200-0x427f has been reserved
pnp: 00:00: ioport range 0x4280-0x42ff has been reserved
pnp: 00:01: ioport range 0x5000-0x503f has been reserved
pnp: 00:01: ioport range 0x5100-0x513f has been reserved
pnp: 00:02: iomem range 0xd5800-0xd7fff has been reserved
pnp: 00:02: iomem range 0xf0000-0xf7fff could not be reserved
pnp: 00:02: iomem range 0xf8000-0xfbfff could not be reserved
pnp: 00:02: iomem range 0xfc000-0xfffff could not be reserved
Time: tsc clocksource has been installed.
PCI: Bridge: 0000:00:08.0
IO window: c000-cfff
MEM window: disabled.
PREFETCH window: disabled.
PCI: Bridge: 0000:00:1e.0
IO window: d000-dfff
MEM window: e4000000-e5ffffff
PREFETCH window: d0000000-dfffffff
PCI: Setting latency timer of device 0000:00:08.0 to 64
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
highmem bounce pool size: 64 pages
io scheduler noop registered
io scheduler cfq registered (default)
Boot video device is 0000:02:00.0
ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19
ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [APC4] -> GSI 19 (level, high) -> IRQ 16
radeonfb: Found Intel x86 BIOS ROM Image
radeonfb: Retrieved PLL infos from BIOS
radeonfb: Reference=27.00 MHz (RefDiv=12) Memory=240.00 Mhz, System=166.00 MHz
radeonfb: PLL min 20000 max 40000
radeonfb: Monitor 1 type DFP found
radeonfb: EDID probed
radeonfb: Monitor 2 type no found
Switched to high resolution mode on CPU 0
radeonfb: Dynamic Clock Power Management enabled
Console: switching to colour frame buffer device 160x64
radeonfb (0000:02:00.0): ATI Radeon Y`
input: Power Button (FF) as /class/input/input0
ACPI: Power Button (FF) [PWRF]
input: Power Button (CM) as /class/input/input1
ACPI: Power Button (CM) [PWRB]
input: Sleep Button (CM) as /class/input/input2
ACPI: Sleep Button (CM) [SLPB]
ACPI: Thermal Zone [THRM] (37 C)
Real Time Clock Driver v1.12ac
loop: module loadedforcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.60.
ACPI: PCI Interrupt Link [APCH] enabled at IRQ 22
ACPI: PCI Interrupt 0000:00:04.0[A] -> Link [APCH] -> GSI 22 (level, high) -> IRQ 17
PCI: Setting latency timer of device 0000:00:04.0 to 64
eth0: forcedeth.c: subsystem: 01297:0531 bound to 0000:00:04.0pata_amd 0000:00:09.0: version 0.3.8
PCI: Setting latency timer of device 0000:00:09.0 to 64
scsi0 : pata_amd
scsi1 : pata_amd
ata1: PATA max UDMA/133 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001f000 irq 14
ata2: PATA max UDMA/133 cmd 0x00010170 ctl 0x00010376 bmdma 0x0001f008 irq 15 ata1.00: ATA-7: SAMSUNG SP2014N, VC100-33, max UDMA/133
ata1.00: 390721968 sectors, multi 16: LBA48
ata1.00: configured for UDMA/133
ata2.00: ATAPI: Optiarc DVD RW AD-7170A, 1.04, max UDMA/66
ata2.01: ATAPI: LITE-ON DVD SOHD-16P9SV, F$02, max UDMA/33
ata2.00: configured for UDMA/66
ata2.01: configured for UDMA/33
scsi 0:0:0:0: Direct-Access ATA SAMSUNG SP2014N VC10 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 390721968 512-byte hardware sectors (200050 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: [sda] 390721968 512-byte hardware sectors (200050 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 >
sd 0:0:0:0: [sda] Attached SCSI disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: CD-ROM Optiarc DVD RW AD-7170A 1.04 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 1:0:0:0: Attached scsi CD-ROM sr0
sr 1:0:0:0: Attached scsi generic sg1 type 5
scsi 1:0:1:0: CD-ROM LITE-ON DVD SOHD-16P9SV F$02 PQ: 0 ANSI: 5
sr1: scsi3-mmc drive: 4x/48x cd/rw xa/form2 cdda tray
sr 1:0:1:0: Attached scsi CD-ROM sr1
sr 1:0:1:0: Attached scsi generic sg2 type 5
ACPI: PCI Interrupt Link [APCL] enabled at IRQ 21
ACPI: PCI Interrupt 0000:00:02.2[C] -> Link [APCL] -> GSI 21 (level, high) -> IRQ 18
PCI: Setting latency timer of device 0000:00:02.2 to 64ehci_hcd 0000:00:02.2: EHCI Host Controllerehci_hcd 0000:00:02.2: new USB bus registered, assigned bus number 1ehci_hcd 0000:00:02.2: debug port 1
PCI: cache line size of 64 is not supported by device 0000:00:02.2ehci_hcd 0000:00:02.2: irq 18, io mem 0xe6000000ehci_hcd 0000:00:02.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 6 ports detectedohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
ACPI: PCI Interrupt Link [APCF] enabled at IRQ 20
ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [APCF] -> GSI 20 (level, high) -> IRQ 19
PCI: Setting latency timer of device 0000:00:02.0 to 64ohci_hcd 0000:00:02.0: OHCI Host Controllerohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 2ohci_hcd 0000:00:02.0: irq 19, io mem 0xe6003000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
ACPI: PCI Interrupt Link [APCG] enabled at IRQ 22
ACPI: PCI Interrupt 0000:00:02.1[B] -> Link [APCG] -> GSI 22 (level, high) -> IRQ 17
PCI: Setting latency timer of device 0000:00:02.1 to 64ohci_hcd 0000:00:02.1: OHCI Host Controllerohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 3ohci_hcd 0000:00:02.1: irq 17, io mem 0xe6004000
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 3 ports detected
PNP: No PS/2 controller found. Probing ports directly.
serio: i8042 KBD port at 0x60,0x64 irq 1
mice: PS/2 mouse device common for all mice
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: [email protected] usb 2-1: new low speed USB device using ohci_hcd and address 2
usb 2-1: configuration #1 chosen from 1 choice
usb 2-2: new low speed USB device using ohci_hcd and address 3
usb 2-2: configuration #1 chosen from 1 choice
usb 3-2: new full speed USB device using ohci_hcd and address 2
usb 3-2: configuration #1 chosen from 1 choice
input: Logitech USB-PS/2 Optical Mouse as /class/input/input3
input: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:02.0-1
input: Logitech HID compliant keyboard as /class/input/input4
input: USB HID v1.10 Keyboard [Logitech HID compliant keyboard] on usb-0000:00:02.0-2
input: Logitech HID compliant keyboard as /class/input/input5
input: USB HID v1.10 Device [Logitech HID compliant keyboard] on usb-0000:00:02.0-2
usbcore: registered new interface driver usbhiddrivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31 09:03:25 2007 UTC).
ACPI: PCI Interrupt Link [APC3] enabled at IRQ 18
ACPI: PCI Interrupt 0000:01:06.0[A] -> Link [APC3] -> GSI 18 (level, high) -> IRQ 20 ALSA device list:
#0: M Audio Audiophile 24/96 at 0xc000, irq 20
TCP cubic registered
NET: Registered protocol family 1
Using IPI Shortcut mode
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 160k freed
EXT3 FS on sda2, internal journallirc_dev: IR Remote Control driver registered, at major 61lirc_serial: auto-detected active low receiverlirc_dev: lirc_register_plugin: sample_rate: 0
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda3, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda5, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda7, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 979924k swap on /dev/sda6. Priority:-1 extents:1 across:979924k
kjournald starting. Commit interval 5 seconds
EXT3 FS on dm-0, internal journal
EXT3-fs: mounted filesystem with ordered data mode.ip_tables: (C) 2000-2006 Netfilter Core Teamnf_conntrack version 0.5.0 (8191 buckets, 65528 max)
If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes.
Linux section-eight 2.6.22.12 #2 Tue Nov 13 17:05:58 CET 2007 i686 AMD Sempron(tm) 2400+ AuthenticAMD GNU/Linux
Gnu C 4.1.2 Gnu make 3.81 binutils Binutils util-linux 2.12r mount 2.12r module-init-tools 3.2.2 e2fsprogs 1.40.2 Linux C Library 2.6.1 Dynamic linker (ldd) 2.6.1 Procps 3.2.7 Net-tools 1.60 Kbd 1.13 Sh-utils 6.9 udev 115 Modules Loaded ipt_LOG xt_state xt_tcpudp xt_pkttype ipt_REJECT xt_multiport xt_conntrack iptable_mangle nf_conntrack_ipv4 nf_conntrack iptable_filter ip_tables x_tables sha256 serpent cbc blkcipher cryptomgr crypto_algapi dm_crypt lirc_serial lirc_dev
CONFIG_X86_32=yCONFIG_GENERIC_TIME=y CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=yCONFIG_X86=yCONFIG_MMU=yCONFIG_ZONE_DMA=yCONFIG_QUICKLIST=yCONFIG_GENERIC_ISA_DMA=yCONFIG_GENERIC_IOMAP=yCONFIG_GENERIC_BUG=yCONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=yCONFIG_DMI=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_EXPERIMENTAL=yCONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION=""CONFIG_SWAP=yCONFIG_SYSVIPC=yCONFIG_SYSVIPC_SYSCTL=yCONFIG_LOG_BUF_SHIFT=14CONFIG_SYSCTL=yCONFIG_UID16=yCONFIG_SYSCTL_SYSCALL=yCONFIG_KALLSYMS=yCONFIG_HOTPLUG=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_ELF_CORE=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_ANON_INODES=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_EVENTFD=yCONFIG_SHMEM=yCONFIG_VM_EVENT_COUNTERS=yCONFIG_SLAB=yCONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0CONFIG_MODULES=yCONFIG_MODULE_UNLOAD=yCONFIG_KMOD=yCONFIG_BLOCK=yCONFIG_IOSCHED_NOOP=yCONFIG_IOSCHED_CFQ=yCONFIG_DEFAULT_CFQ=yCONFIG_DEFAULT_IOSCHED="cfq"CONFIG_TICK_ONESHOT=yCONFIG_NO_HZ=yCONFIG_HIGH_RES_TIMERS=yCONFIG_X86_PC=yCONFIG_MK7=yCONFIG_X86_CMPXCHG=yCONFIG_X86_L1_CACHE_SHIFT=6CONFIG_X86_XADD=yCONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_X86_WP_WORKS_OK=yCONFIG_X86_INVLPG=yCONFIG_X86_BSWAP=yCONFIG_X86_POPAD_OK=yCONFIG_X86_GOOD_APIC=yCONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y CONFIG_X86_USE_3DNOW=yCONFIG_X86_TSC=yCONFIG_X86_CMOV=yCONFIG_X86_MINIMUM_CPU_MODEL=4 CONFIG_PREEMPT_VOLUNTARY=yCONFIG_X86_UP_APIC=yCONFIG_X86_UP_IOAPIC=yCONFIG_X86_LOCAL_APIC=yCONFIG_X86_IO_APIC=yCONFIG_X86_MCE=yCONFIG_VM86=yCONFIG_HIGHMEM4G=yCONFIG_PAGE_OFFSET=0xC0000000CONFIG_HIGHMEM=yCONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=yCONFIG_FLATMEM=yCONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPARSEMEM_STATIC=y CONFIG_SPLIT_PTLOCK_CPUS=4CONFIG_ZONE_DMA_FLAG=1CONFIG_NR_QUICK=1CONFIG_MTRR=yCONFIG_HZ_100=yCONFIG_HZ=100CONFIG_PHYSICAL_START=0x100000 CONFIG_PHYSICAL_ALIGN=0x100000 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=yCONFIG_PM=yCONFIG_ACPI=yCONFIG_ACPI_BUTTON=yCONFIG_ACPI_PROCESSOR=yCONFIG_ACPI_THERMAL=yCONFIG_ACPI_BLACKLIST_YEAR=0CONFIG_ACPI_EC=yCONFIG_ACPI_POWER=yCONFIG_ACPI_SYSTEM=yCONFIG_X86_PM_TIMER=yCONFIG_PCI=yCONFIG_PCI_GODIRECT=yCONFIG_PCI_DIRECT=yCONFIG_ARCH_SUPPORTS_MSI=yCONFIG_ISA_DMA_API=yCONFIG_BINFMT_ELF=yCONFIG_NET=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_FIB_HASH=yCONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic"CONFIG_NETFILTER=yCONFIG_NF_CONNTRACK_ENABLED=m CONFIG_NF_CONNTRACK=mCONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m CONFIG_NETFILTER_XT_MATCH_STATE=m CONFIG_NF_CONNTRACK_IPV4=mCONFIG_IP_NF_IPTABLES=mCONFIG_IP_NF_FILTER=mCONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=mCONFIG_IP_NF_MANGLE=mCONFIG_BT=mCONFIG_BT_L2CAP=mCONFIG_BT_RFCOMM=mCONFIG_BT_RFCOMM_TTY=yCONFIG_BT_HCIUSB=mCONFIG_PNP=yCONFIG_PNPACPI=yCONFIG_BLK_DEV_LOOP=yCONFIG_SCSI=yCONFIG_BLK_DEV_SD=yCONFIG_BLK_DEV_SR=yCONFIG_CHR_DEV_SG=yCONFIG_SCSI_WAIT_SCAN=mCONFIG_ATA=yCONFIG_ATA_ACPI=yCONFIG_PATA_AMD=yCONFIG_MD=yCONFIG_BLK_DEV_DM=yCONFIG_DM_CRYPT=mCONFIG_NETDEVICES=yCONFIG_NET_ETHERNET=yCONFIG_NET_PCI=yCONFIG_FORCEDETH=yCONFIG_INPUT=yCONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1280 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1024 CONFIG_INPUT_KEYBOARD=yCONFIG_KEYBOARD_ATKBD=yCONFIG_SERIO=yCONFIG_SERIO_I8042=yCONFIG_SERIO_LIBPS2=yCONFIG_VT=yCONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=yCONFIG_UNIX98_PTYS=yCONFIG_RTC=yCONFIG_DEVPORT=yCONFIG_I2C=yCONFIG_I2C_BOARDINFO=yCONFIG_I2C_ALGOBIT=yCONFIG_FB=yCONFIG_FB_DDC=yCONFIG_FB_CFB_FILLRECT=yCONFIG_FB_CFB_COPYAREA=yCONFIG_FB_CFB_IMAGEBLIT=yCONFIG_FB_DEFERRED_IO=yCONFIG_FB_MODE_HELPERS=yCONFIG_FB_RADEON=yCONFIG_FB_RADEON_I2C=yCONFIG_VGA_CONSOLE=yCONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=yCONFIG_SOUND=yCONFIG_SND=yCONFIG_SND_TIMER=yCONFIG_SND_PCM=yCONFIG_SND_RAWMIDI=yCONFIG_SND_MPU401_UART=yCONFIG_SND_AC97_CODEC=yCONFIG_SND_ICE1712=yCONFIG_SND_AC97_POWER_SAVE=yCONFIG_AC97_BUS=yCONFIG_HID=yCONFIG_USB_HID=yCONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=yCONFIG_USB=yCONFIG_USB_DEVICEFS=yCONFIG_USB_SUSPEND=yCONFIG_USB_EHCI_HCD=yCONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_STORAGE=mCONFIG_USB_SERIAL=mCONFIG_USB_SERIAL_PL2303=mCONFIG_EXT3_FS=yCONFIG_JBD=yCONFIG_INOTIFY=yCONFIG_INOTIFY_USER=yCONFIG_DNOTIFY=yCONFIG_ISO9660_FS=mCONFIG_JOLIET=yCONFIG_UDF_FS=mCONFIG_UDF_NLS=yCONFIG_FAT_FS=mCONFIG_VFAT_FS=mCONFIG_FAT_DEFAULT_CODEPAGE=850 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15" CONFIG_PROC_FS=yCONFIG_PROC_SYSCTL=yCONFIG_SYSFS=yCONFIG_TMPFS=yCONFIG_RAMFS=yCONFIG_MSDOS_PARTITION=yCONFIG_NLS=mCONFIG_NLS_DEFAULT="iso8859-15" CONFIG_NLS_CODEPAGE_850=mCONFIG_NLS_ISO8859_15=m CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_DEBUG_BUGVERBOSE=yCONFIG_EARLY_PRINTK=yCONFIG_X86_FIND_SMP_CONFIG=yCONFIG_X86_MPPARSE=yCONFIG_DOUBLEFAULT=yCONFIG_CRYPTO=yCONFIG_CRYPTO_ALGAPI=mCONFIG_CRYPTO_BLKCIPHER=mCONFIG_CRYPTO_MANAGER=mCONFIG_CRYPTO_SHA256=mCONFIG_CRYPTO_CBC=mCONFIG_CRYPTO_SERPENT=mCONFIG_BITREVERSE=yCONFIG_CRC32=yCONFIG_PLIST=yCONFIG_HAS_IOMEM=yCONFIG_HAS_IOPORT=yCONFIG_HAS_DMA=yCONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_X86_BIOS_REBOOT=yCONFIG_KTIME_SCALAR=y
Quoted 6 lines
while trying to limit the speed of DVD drives during DVD playback I've come under the impression that
GPCMD_SET_STREAMINGviaSG_IOdoesn't yet work with libata/PATA (AMD/NVIDIA PATA support). I tested on an NForce2 board (all IDE, no SATA) and kernel 2.6.22.12. When I use the "old" ATA kernel driver my drive slows down, with libata it doesn't. Is this a known issue or has this slipped by unnoticed?
It isn't a known issue, and it suprises me as SG_IO basically passes commands through to the drive. We don't support speed change via xfermode setting but GPCMD_SET_STREAMING sohuld behave.
Quoted 4 lines
I tried with mplayer dvd:// -dvd-device
/dev/sr0-dvd-speed BTW . I get no errors in syslog/dmesg. Also mplayer doesn't report a problem (soioctl(fd, SG_IO, &sghdr)doesn't have a return < 0).
Do you have a simple code example that shows the problem ?
Hi Alan!
Quoted 5 lines · Alan Cox
It isn't a known issue, and it suprises me as
SG_IObasically passes commands through to the drive. We don't support speed change via xfermode setting butGPCMD_SET_STREAMINGsohuld behave.Do you have a simple code example that shows the problem ?
http://svn.mplayerhq.hu/mplayer/trunk/stream/stream_dvd.c?view=markup
See dvd_set_speed(). The drive I'm using is an Optiarc DVD RW AD-7170A. With the "old" ATA driver dvd_set_speed() works, with libata it doesn't.
Regards
Sebastian
Quoted 4 lines · Sebastian Kemper
http://svn.mplayerhq.hu/mplayer/trunk/stream/stream_dvd.c?view=markup
See
dvd_set_speed(). The drive I'm using is an Optiarc DVD RW AD-7170A. With the "old" ATA driverdvd_set_speed()works, with libata it doesn't.
Hello Alan,
in the meantime I tried the kernels 2.6.23.1 as well as 2.6.24-rc2. Both show the same behaviour when using libata with AMD/NVIDIA PATA support:GPCMD_SET_STREAMING via SG_IO doesn't have any effect. With these two kernels I didn't try the "old" ATA driver - but I assume it would've worked out (changing your system from ATA to libata and vice versa turned out to be quite time consuming ;)).
Regards
Sebastian
Quoted 7 lines · Sebastian Kemper
Hi Alan!
Quoted 4 lines · Alan Cox
It isn't a known issue, and it suprises me as
SG_IObasically passes commands through to the drive. We don't support speed change via xfermode setting butGPCMD_SET_STREAMINGsohuld behave.
Quoted 6 lines
Quoted 1 line
Do you have a simple code example that shows the problem ?
http://svn.mplayerhq.hu/mplayer/trunk/stream/stream_dvd.c?view=markup
See
dvd_set_speed(). The drive I'm using is an Optiarc DVD RW AD-7170A. With the "old" ATA driverdvd_set_speed()works, with libata it doesn't.
..
I think the problem here might be that libata doesn't actually support SG_IO for ATAPI drives prior to 2.6.24 (ugh).
Try it with a 2.6.24-rc* kernel from kernel.org, or back-patch the ATA_16 SG_IO support into your older kernel.
Cheers
Quoted 6 lines · Mark Lord
I think the problem here might be that libata doesn't actually support
SG_IO
for ATAPI drives prior to 2.6.24 (ugh).Try it with a 2.6.24-rc* kernel from kernel.org, or back-patch the
ATA_16SG_IOsupport into your older kernel.
Hi Mark,
I already tried 2.6.24-rc2 and it didn't work, see my last reply:
http://marc.info/?l=linux-kernel&m=119504244805467&w=2
Regards
Sebastian
Quoted 11 lines · Sebastian Kemper
Quoted 5 lines · Mark Lord
I think the problem here might be that libata doesn't actually support
SG_IOfor ATAPI drives prior to 2.6.24 (ugh).Try it with a 2.6.24-rc* kernel from kernel.org, or back-patch the
ATA_16SG_IOsupport into your older kernel.Hi Mark,
I already tried 2.6.24-rc2 and it didn't work, see my last reply:
http://marc.info/?l=linux-kernel&m=119504244805467&w=2
..
Yeah, I'm a bit drowsy this morning -- the set speed command doesn't use ATA_16, so it should work with any kernel.
I'll try it here soon-ish, since I need to update "hdparm -E" for libata anyway.
Cheers
PATCH 1/1 libata-scsi: be tolerant of 12-byte ATAPI commands in 16-byte CDBs
Sebastian Kemper reported that issuing CD/DVD commands under libata is not fully compatible with ide-scsi. In particular, the GPCMD_SET_STREAMING was being rejected at the host level in some instances.
The reason is that libata-scsi insists upon the cmd_len field exactly matching the SCSI opcode being issued, whereas ide-scsi tolerates 12-byte commands contained within a 16-byte (cmd_len) CDB.
There doesn't seem to be a good reason for us to not be compatible there, so here is a patch to fix libata-scsi to permit SCSI opcodes so long as they fit within whatever size CDB is provided.
---
Patch is against 2.6.24-rc2-git4. Sebastian, could you please re-test with this patch and let us know that it works for you (or not).
drivers/ata/libata-scsi.c +0 -0
@@ -2869,7 +2869,8 @@
xlat_func = NULL;
if (likely((scsi_op != ATA_16) || !atapi_passthru16)) {
/* relay SCSI command to ATAPI device */
- if (unlikely(scmd->cmd_len > dev->cdb_len))
+ int len = COMMAND_SIZE(scsi_op);
+ if (unlikely(len > scmd->cmd_len || len > dev->cdb_len))
goto bad_cdb_len;
xlat_func = atapi_xlat;Re: [PATCH] libata-scsi: be tolerant of 12-byte ATAPI commands in 16-byte CDBs
Quoted 10 lines · Mark Lord
Sebastian Kemper reported that issuing CD/DVD commands under libata is not fully compatible with ide-scsi. In particular, the
GPCMD_SET_STREAMING
was being rejected at the host level in some instances.The reason is that libata-scsi insists upon the
cmd_lenfield exactly matching
the SCSI opcode being issued, whereas ide-scsi tolerates 12-byte commands contained within a 16-byte (cmd_len) CDB.
Quoted 5 lines
There doesn't seem to be a good reason for us to not be compatible there, so here is a patch to fix libata-scsi to permit SCSI opcodes so long as they fit within whatever size CDB is provided.
Signed-off-by Mark Lord <[email protected]>
Tejun Heo
AppliedRe: [PATCH] libata-scsi: be tolerant of 12-byte ATAPI commands in 16-byte CDBs
In reply to Mark LordQuoted 10 lines · Mark Lord
Sebastian Kemper reported that issuing CD/DVD commands under libata is not fully compatible with ide-scsi. In particular, the
GPCMD_SET_STREAMING
was being rejected at the host level in some instances.The reason is that libata-scsi insists upon the
cmd_lenfield exactly matching
the SCSI opcode being issued, whereas ide-scsi tolerates 12-byte commands contained within a 16-byte (cmd_len) CDB.
Quoted 5 lines
There doesn't seem to be a good reason for us to not be compatible there, so here is a patch to fix libata-scsi to permit SCSI opcodes so long as they fit within whatever size CDB is provided.
Signed-off-by Mark Lord <[email protected]>
applied to #tj-upstream-fixes.
Signature · 1 line
tejun
Quoted 10 lines · Sebastian Kemper
Hi Alan!
Quoted 5 lines · Alan Cox
It isn't a known issue, and it suprises me as
SG_IObasically passes commands through to the drive. We don't support speed change via xfermode setting butGPCMD_SET_STREAMINGsohuld behave.Do you have a simple code example that shows the problem ?
http://svn.mplayerhq.hu/mplayer/trunk/stream/stream_dvd.c?view=markup
..
That code is riddled with bugs, by the way.
It fails to close/clean-up on just about every exit path. But apart from that, it does appear to issue the command.
Another way to the same thing is with "hdparm -E", which contrary to my earlier posting actually does seem to work already with libata.
Quoted 2 lines
See
dvd_set_speed(). The drive I'm using is an Optiarc DVD RW AD-7170A. With the "old" ATA driverdvd_set_speed()works, with libata it doesn't.
..
Can you define "doesn't work" for me?
How can I test this to see if it works one way or another ?
The command issue (ioctl) is not returning -1.
Quoted 21 lines · Mark Lord
Quoted 10 lines · Sebastian Kemper
Hi Alan!
Quoted 5 lines · Alan Cox
It isn't a known issue, and it suprises me as
SG_IObasically passes commands through to the drive. We don't support speed change via xfermode setting butGPCMD_SET_STREAMINGsohuld behave.Do you have a simple code example that shows the problem ?
http://svn.mplayerhq.hu/mplayer/trunk/stream/stream_dvd.c?view=markup
..
That code is riddled with bugs, by the way.
It fails to close/clean-up on just about every exit path. But apart from that, it does appear to issue the command.Another way to the same thing is with "hdparm -E", which contrary to my earlier posting actually does seem to work already with libata.
Quoted 8 lines
Quoted 2 lines
See
dvd_set_speed(). The drive I'm using is an Optiarc DVD RW AD-7170A. With the "old" ATA driverdvd_set_speed()works, with libata it doesn't...
Can you define "doesn't work" for me?
How can I test this to see if it works one way or another ?The command issue (ioctl) is not returning -1.
..
Ahh.. got it. The host_status returned (not checked by that code) was 7, which means "host error".
In this case, that's because the cmd_len is (16), which is too large for ATAPI. It needs to be changed to (12) instead.
So this line: sghdr.cmd_len = 12;
The code (apart from totally mishandling any kinds of errors) works after that.
-ml
Hi Mark!
Quoted 6 lines · Mark Lord
Ahh.. got it. The
host_statusreturned (not checked by that code) was 7, which means "host error".In this case, that's because the
cmd_lenis (16), which is too large for ATAPI.
It needs to be changed to (12) instead.
I don't understand. You seem to use a cmd_len of 16 in hdparm yourself. And why does it work with the "old" ATA driver and not with libata if 16 is too large for ATAPI in general?
Quoted 2 lines
The code (apart from totally mishandling any kinds of errors) works after that.
Greetings
Sebastian
Quoted 10 lines · Sebastian Kemper
Hi Mark!
Quoted 5 lines · Mark Lord
Ahh.. got it. The
host_statusreturned (not checked by that code) was 7, which means "host error".In this case, that's because the
cmd_lenis (16), which is too large for ATAPI. It needs to be changed to (12) instead.I don't understand. You seem to use a
cmd_lenof 16 in hdparm yourself.
..
Really? Where?
Quoted 2 lines
And why does it work with the "old" ATA driver and not with libata if 16 is too large for ATAPI in general?
..
Now that *is* the question.
And the answer appears to be that ide-cd.c ignores the passed-in cmd_len, and replaces it with:
cmd_len = COMMAND_SIZE(rq->cmd[0]);
That's a SCSI macro to calculate the correct cmd_len based on the SCSI opcode,
which is very appropriate here. We should do that too (we don't) in libata.
But not exactly as IDE does it -- that's actually a bug: the code needs to also check that the new cmd_len is no larger than the original, or we'll get an Oops.
I'll cook up a patch for that shortly and try it before posting it here.
-ml
Hi,
Quoted 27 lines · Mark Lord
Quoted 11 lines · Sebastian Kemper
Hi Mark!
Quoted 6 lines · Mark Lord
Ahh.. got it. The
host_statusreturned (not checked by that code) was 7, which means "host error".In this case, that's because the
cmd_lenis (16), which is too large for ATAPI.
It needs to be changed to (12) instead.I don't understand. You seem to use a
cmd_lenof 16 in hdparm yourself...
Really? Where?
Quoted 2 lines
And why does it work with the "old" ATA driver and not with libata if 16 is too large for ATAPI in general?
..
Now that *is* the question.
And the answer appears to be thatide-cd.cignores the passed-incmd_len, and replaces it with:cmd_len = COMMAND_SIZE(rq->cmd[0]);
Quoted 7 lines
That's a SCSI macro to calculate the correct
cmd_lenbased on the SCSI opcode,
which is very appropriate here. We should do that too (we don't) in libata.But not exactly as IDE does it -- that's actually a bug: the code needs to also check that the new
cmd_lenis no larger than the original, or we'll get an Oops.I'll cook up a patch for that shortly and try it before posting it here.
Could you please also fix ide-cd while at it?
Thanks,
Bart
Quoted 31 lines · Bartlomiej Zolnierkiewicz
Hi,
Quoted 28 lines · Mark Lord
Quoted 9 lines · Sebastian Kemper
Hi Mark!
Quoted 5 lines · Mark Lord
Ahh.. got it. The
host_statusreturned (not checked by that code) was 7, which means "host error".In this case, that's because the
cmd_lenis (16), which is too large for ATAPI. It needs to be changed to (12) instead.I don't understand. You seem to use a
cmd_lenof 16 in hdparm yourself...
Really? Where?
Quoted 2 lines
And why does it work with the "old" ATA driver and not with libata if 16 is too large for ATAPI in general?
..
Now that *is* the question.
And the answer appears to be thatide-cd.cignores the passed-incmd_len, and replaces it with:cmd_len = COMMAND_SIZE(rq->cmd[0]);That's a SCSI macro to calculate the correct
cmd_lenbased on the SCSI opcode,
which is very appropriate here. We should do that too (we don't) in libata.
Quoted 6 lines
Quoted 4 lines
But not exactly as IDE does it -- that's actually a bug: the code needs to also check that the new
cmd_lenis no larger than the original, or we'll get an Oops.I'll cook up a patch for that shortly and try it before posting it here.
Could you please also fix ide-cd while at it?
..
ide-cd already does the COMMAND_SIZE() thingie, so that fix is not needed.
The only bug there is that it doesn't check for the possibility of a 16-byte opcode being issued with only a 12-byte CDB underneath. In practice, this doesn't seem to hurt anything.
I'm no longer familiar enough with the code there to reliably fix it.
Cheers
Quoted 3 lines · Mark Lord
Another way to the same thing is with "hdparm -E", which contrary to my earlier posting actually does seem to work already with libata.
Hi!
There are DVD-ROM drives that don't react to hdparm -E but do react to SET_STREAMING, for instance some NEC drives.
Regards
Sebastian
Quoted 9 lines · Sebastian Kemper
Quoted 3 lines · Mark Lord
Another way to the same thing is with "hdparm -E", which contrary to my earlier posting actually does seem to work already with libata.
Hi!
There are DVD-ROM drives that don't react to hdparm -E but do react to
SET_STREAMING, for instance some NEC drives.
..
Mmm.. that's possible. The NEC drive I have here works with either.
I wonder if an update to sr_select_speed() (inside the SCSI code) is needed? It currently uses GPCMD_SET_SPEED, with no fallback to GPCMD_SET_STREAMING.
Or I suppose this is best left to userspace.
I may change hdparm to try both opcodes.