[Bug 20010] New: Possible fake host protected area (hpa) detected in ide drive causing SectorIdNotFound
bugzilla-daemon at bugzilla.ubuntu.com
bugzilla-daemon at bugzilla.ubuntu.com
Wed Nov 23 20:48:25 UTC 2005
Please do not reply to this email. You can add comments at
http://bugzilla.ubuntu.com/show_bug.cgi?id=20010
Ubuntu | linux
Summary: Possible fake host protected area (hpa) detected in ide
drive causing SectorIdNotFound
Product: Ubuntu
Version: unspecified
Platform: i386
OS/Version: other
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: linux
AssignedTo: ben.collins at ubuntu.com
ReportedBy: jjchico at dte.us.es
QAContact: kernel-bugs at lists.ubuntu.com
In two PC's ide drives (home and work) it happens that (full details are attached):
1) 2.6.12 (also 2.6.8, 2.6.10) kernel detects a host protected area of just one
sector: reported native capacity is only one sector more than reported current
capacity. Host protected area is disabled and current capacity is set to native
capacity.
2) later during boot, last drive's sector is seeked giving SectorIdNotFound for
several times.
3) DMA is disable in the whole IDE channel
4) seek ends with "end_request: I/O error"
* Faulty sector is the additional sector detected in native capacity.
* Further access using "dd" gives the same error.
* DMA can be enabled afterwords and system runs OK since partitions does not
reach the last sector.
After looking at the kernel code (ide-disk.c, etc.), it seems that checking the
host protected area consists on checking the hpa flag on the disk and comparing
the current capacity with that directly obtained from the disk. However, I don't
see how to query the native capacity with hdparm, since the only value it gives
correspondes to the initial current capacity. Kernel hacking is not among my skills.
I was not able to find a way to say to the kernel to stay with the current
capacity (and do not disable hpa). A related option (hdX=stroke) seems to have
been droped.
I was not able to pass options to the ide modules through kernel boot parameter.
I seems to work now, but the only way I know is using hd=C,H,S not the number of
sectors.
I was not able to disable the hpa flag in the drive. Can it be done with Linux?
Would be useful a kernel parameter saying not to disable hpa (e.g. hdX=hpa_enable)?
Would be useful a kernel parameter to specify the size in lba sectors (e.g.
hdX_sectors=NNNN)?
I include a report about on of the failing disks.
====================================
GENERAL INFO
====================================
$ uname -a
Linux valhalla 2.6.12-9-686 #1 Mon Oct 10 13:25:32 BST 2005 i686 GNU/Linux
Ubuntu 5.10 Breezy
# dpkg --list
...
ii linux-image-2.6.12-9-686 2.6.12-9.23
...
Same thing happen after upgrading to:
ii linux-image-2.6.12-10-686 2.6.12-10.24
====================================
KERNEL LOG
====================================
Nov 22 18:09:48 valhalla kernel: [4294670.701000] VP_IDE: IDE controller at PCI
slot 0000:00:07.1
Nov 22 18:09:48 valhalla kernel: [4294670.701000] PCI: Via IRQ fixup for
0000:00:07.1, from 255 to 0
Nov 22 18:09:48 valhalla kernel: [4294670.701000] VP_IDE: chipset revision 6
Nov 22 18:09:48 valhalla kernel: [4294670.701000] VP_IDE: not 100%% native mode:
will probe irqs later
Nov 22 18:09:48 valhalla kernel: [4294670.702000] VP_IDE: VIA vt82c686b (rev 41)
IDE UDMA100 controller on pci0000:00:07.1
Nov 22 18:09:48 valhalla kernel: [4294670.702000] ide0: BM-DMA at
0xc000-0xc007, BIOS settings: hda:DMA, hdb:pio
Nov 22 18:09:48 valhalla kernel: [4294670.702000] ide1: BM-DMA at
0xc008-0xc00f, BIOS settings: hdc:DMA, hdd:DMA
Nov 22 18:09:48 valhalla kernel: [4294670.702000] Probing IDE interface ide0...
Nov 22 18:09:48 valhalla kernel: [4294671.086000] hda: ST320414A, ATA DISK drive
Nov 22 18:09:48 valhalla kernel: [4294671.698000] ide0 at 0x1f0-0x1f7,0x3f6 on
irq 14
Nov 22 18:09:48 valhalla kernel: [4294671.698000] Probing IDE interface ide1...
Nov 22 18:09:48 valhalla kernel: [4294672.082000] hdc: ST340823A, ATA DISK drive
Nov 22 18:09:48 valhalla kernel: [4294672.796000] hdd: LG DVD-ROM DRD-8120B,
ATAPI CD/DVD-ROM drive
Nov 22 18:09:48 valhalla kernel: [4294672.847000] ide1 at 0x170-0x177,0x376 on
irq 15
Nov 22 18:09:48 valhalla kernel: [4294672.847000] Probing IDE interface ide2...
Nov 22 18:09:48 valhalla kernel: [4294673.360000] Probing IDE interface ide3...
Nov 22 18:09:48 valhalla kernel: [4294673.872000] Probing IDE interface ide4...
Nov 22 18:09:48 valhalla kernel: [4294674.384000] Probing IDE interface ide5...
Nov 22 18:09:48 valhalla kernel: [4294674.904000] hda: max request size: 128KiB
Nov 22 18:09:48 valhalla kernel: [4294674.904000] hda: 39102336 sectors (20020
MB) w/2048KiB Cache, CHS=38792/16/63, UDMA(100)
Nov 22 18:09:48 valhalla kernel: [4294674.904000] hda: cache flushes not supported
Nov 22 18:09:48 valhalla kernel: [4294674.904000]
/dev/ide/host0/bus0/target0/lun0: p1 p2 p3
Nov 22 18:09:48 valhalla kernel: [4294674.917000] hdc: max request size: 128KiB
Nov 22 18:09:48 valhalla kernel: [4294674.918000] hdc: Host Protected Area detected.
Nov 22 18:09:48 valhalla kernel: [4294674.918000] ^Icurrent capacity is 78165360
sectors (40020 MB)
Nov 22 18:09:48 valhalla kernel: [4294674.918000] ^Inative capacity is 78165361
sectors (40020 MB)
Nov 22 18:09:48 valhalla kernel: [4294674.918000] hdc: Host Protected Area disabled.
Nov 22 18:09:48 valhalla kernel: [4294674.918000] hdc: 78165361 sectors (40020
MB) w/1024KiB Cache, CHS=65535/16/63, UDMA(100)
Nov 22 18:09:48 valhalla kernel: [4294674.918000] hdc: cache flushes not supported
Nov 22 18:09:48 valhalla kernel: [4294674.918000]
/dev/ide/host0/bus1/target0/lun0: p1
Nov 22 18:09:48 valhalla kernel: [4294674.959000] hdd: ATAPI 40X DVD-ROM drive,
512kB Cache
Nov 22 18:09:48 valhalla kernel: [4294674.959000] Uniform CD-ROM driver
Revision: 3.20
... (snip) ...
Nov 22 18:09:48 valhalla kernel: [4294702.618000] device-mapper: 4.4.0-ioctl
(2005-01-12) initialised: dm-devel at redhat.com
Nov 22 18:09:48 valhalla kernel: [4294703.492000] cdrom: open failed.
Nov 22 18:09:48 valhalla kernel: [4294704.159000] cdrom: open failed.
Nov 22 18:09:48 valhalla kernel: [4294704.337000] hdc: dma_intr: status=0x51 {
DriveReady SeekComplete Error }
Nov 22 18:09:48 valhalla kernel: [4294704.337000] hdc: dma_intr: error=0x10 {
SectorIdNotFound }, LBAsect=78165360, sector=78165360
Nov 22 18:09:48 valhalla kernel: [4294704.337000] ide: failed opcode was: unknown
Nov 22 18:09:48 valhalla kernel: [4294704.479000] hdc: dma_intr: status=0x51 {
DriveReady SeekComplete Error }
Nov 22 18:09:48 valhalla kernel: [4294704.479000] hdc: dma_intr: error=0x10 {
SectorIdNotFound }, LBAsect=78165360, sector=78165360
Nov 22 18:09:48 valhalla kernel: [4294704.479000] ide: failed opcode was: unknown
Nov 22 18:09:48 valhalla kernel: [4294704.621000] hdc: dma_intr: status=0x51 {
DriveReady SeekComplete Error }
Nov 22 18:09:48 valhalla kernel: [4294704.621000] hdc: dma_intr: error=0x10 {
SectorIdNotFound }, LBAsect=78165360, sector=78165360
Nov 22 18:09:48 valhalla kernel: [4294704.621000] ide: failed opcode was: unknown
Nov 22 18:09:48 valhalla kernel: [4294704.763000] hdc: dma_intr: status=0x51 {
DriveReady SeekComplete Error }
Nov 22 18:09:48 valhalla kernel: [4294704.763000] hdc: dma_intr: error=0x10 {
SectorIdNotFound }, LBAsect=78165360, sector=78165360
Nov 22 18:09:48 valhalla kernel: [4294704.763000] ide: failed opcode was: unknown
Nov 22 18:09:48 valhalla kernel: [4294704.763000] hdc: DMA disabled
Nov 22 18:09:48 valhalla kernel: [4294704.763000] hdd: DMA disabled
Nov 22 18:09:48 valhalla kernel: [4294704.913000] ide1: reset: success
Nov 22 18:09:48 valhalla kernel: [4294705.085000] hdc: task_in_intr: status=0x59
{ DriveReady SeekComplete DataRequest Error }
Nov 22 18:09:48 valhalla kernel: [4294705.085000] hdc: task_in_intr: error=0x10
{ SectorIdNotFound }, LBAsect=78230639, sector=78165360
Nov 22 18:09:48 valhalla kernel: [4294705.085000] ide: failed opcode was: unknown
Nov 22 18:09:48 valhalla kernel: [4294705.258000] hdc: task_in_intr: status=0x59
{ DriveReady SeekComplete DataRequest Error }
Nov 22 18:09:48 valhalla kernel: [4294705.258000] hdc: task_in_intr: error=0x10
{ SectorIdNotFound }, LBAsect=78230639, sector=78165360
Nov 22 18:09:48 valhalla kernel: [4294705.258000] ide: failed opcode was: unknown
Nov 22 18:09:48 valhalla kernel: [4294705.432000] hdc: task_in_intr: status=0x59
{ DriveReady SeekComplete DataRequest Error }
Nov 22 18:09:48 valhalla kernel: [4294705.432000] hdc: task_in_intr: error=0x10
{ SectorIdNotFound }, LBAsect=78230639, sector=78165360
Nov 22 18:09:48 valhalla kernel: [4294705.432000] ide: failed opcode was: unknown
Nov 22 18:09:48 valhalla kernel: [4294705.605000] hdc: task_in_intr: status=0x59
{ DriveReady SeekComplete DataRequest Error }
Nov 22 18:09:48 valhalla kernel: [4294705.605000] hdc: task_in_intr: error=0x10
{ SectorIdNotFound }, LBAsect=78230639, sector=78165360
Nov 22 18:09:48 valhalla kernel: [4294705.605000] ide: failed opcode was: unknown
Nov 22 18:09:48 valhalla kernel: [4294705.755000] ide1: reset: success
Nov 22 18:09:48 valhalla kernel: [4294705.928000] hdc: task_in_intr: status=0x59
{ DriveReady SeekComplete DataRequest Error }
Nov 22 18:09:48 valhalla kernel: [4294705.928000] hdc: task_in_intr: error=0x10
{ SectorIdNotFound }, LBAsect=78230639, sector=78165360
Nov 22 18:09:48 valhalla kernel: [4294705.928000] ide: failed opcode was: unknown
Nov 22 18:09:48 valhalla kernel: [4294705.928000] end_request: I/O error, dev
hdc, sector 78165360
... (snip) ...
====================================
HDPARM
====================================
# hdparm -Iv /dev/hdc
/dev/hdc:
multcount = 0 (off)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 65535/16/63, sectors = 78165361, start = 0
ATA device, with non-removable media
Model Number: ST340823A
Serial Number: 7EF16KS0
Firmware Revision: 3.05
Standards:
Supported: 4 3 2 1
Likely used: 6
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 78165360
device size with M = 1024*1024: 38166 MBytes
device size with M = 1000*1000: 40020 MBytes (40 GB)
Capabilities:
LBA, IORDY(can be disabled)
Buffer size: 1024.0kB Queue depth: 1
Standby timer values: spec'd by Standard
R/W multiple sector transfer: Max = 16 Current = ?
Recommended acoustic management value: 128, current value: 0
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=240ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* READ BUFFER cmd
* WRITE BUFFER cmd
* Host Protected Area feature set
* Look-ahead
* Write cache
* Power Management feature set
Security Mode feature set
* SMART feature set
Automatic Acoustic Management feature set
* SET MAX security extension
* DOWNLOAD MICROCODE cmd
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
HW reset results:
CBLID- above Vih
Device num = 1
Checksum: correct
# hdparm -iv /dev/hdc
/dev/hdc:
multcount = 0 (off)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 65535/16/63, sectors = 78165361, start = 0
Model=ST340823A, FwRev=3.05, SerialNo=7EF16KS0
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=1024kB, MaxMultSect=16, MultSect=off
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78165360
IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=no WriteCache=enabled
Drive conforms to: device does not report version: 1 2 3 4
* signifies the current active mode
========================================
fdisk
========================================
# LANG=C fdisk -l /dev/hdc
Disk /dev/hdc: 40.0 GB, 40020664832 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 4865 39078081 83 Linux
# LANG=C fdisk -lu /dev/hdc
Disk /dev/hdc: 40.0 GB, 40020664832 bytes
255 heads, 63 sectors/track, 4865 cylinders, total 78165361 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 * 63 78156224 39078081 83 Linux
--
Configure bugmail: http://bugzilla.ubuntu.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the kernel-bugs
mailing list