linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression
@ 2013-03-25 17:26 Ronald
  2013-03-27 12:51 ` Krzysztof Mazur
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Ronald @ 2013-03-25 17:26 UTC (permalink / raw)
  To: krzysiek, linux-ide, linux-kernel

In reply to [1]: I have the same issue. Git bisect took 50+ rebuilds xD

Smartd does not work anymore since 84a9a8cd9 ([libata] Set proper SK
when CK_COND is set.).

I hope I'm not stepping on anyone's toe's by chosing the same title.
I'm not subscribed to this list.

Just wanted to add a 'me2'

[1] http://www.spinics.net/lists/linux-ide/msg45268.html

^ permalink raw reply	[flat|nested] 13+ messages in thread
* ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression
@ 2013-03-23  8:20 Krzysztof Mazur
  0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Mazur @ 2013-03-23  8:20 UTC (permalink / raw)
  To: gwendal, jgarzik; +Cc: linux-ide, linux-kernel

Hi,

commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63
("[libata] Set proper SK when CK_COND is set") breaks
"SMART Status command" ATA command issued by
smartctl -d ata -a /dev/sda at least on FUJITSU MHV2060AH
on ICH6 IDE Controller. The kernel returns -EIO on
HDIO_DRIVE_TASK (0x31e) or HDIO_DRIVE_CMD (0x31f) ioctl,
probably due to RECOVERED_ERROR translated to -EIO.

The regression still exists in v3.9-rc3-218-g0a7e453.

Ancient smartctl like 5.33 give up after such error:

  smartctl version 5.33 [i686-pc-linux-gnu] Copyright (C) 2002-4 Bruce Allen
  Home page is http://smartmontools.sourceforge.net/
  
  === START OF INFORMATION SECTION ===
  Device Model:     FUJITSU MHV2060AH
  Serial Number:    NT29T5B2D23C
  Firmware Version: 00830096
  User Capacity:    60,011,642,880 bytes
  Device is:        Not in smartctl database [for details use: -P showall]
  ATA Version is:   6
  ATA Standard is:  ATA/ATAPI-6 T13 1410D revision 3a
  Local Time is:    Sat Mar 23 01:55:27 2013 CET
  SMART support is: Available - device has SMART capability.
  SMART support is: Enabled
  
  SMART Disabled. Use option -s with argument 'on' to enable it.

 # strace -x smartctl-5.33 -d ata -a /dev/sda 2>&1 | tail -n 10
  write(1, "SMART support is: Available - de"..., 59SMART support is: Available - device has SMART capability.
  ) = 59
  write(1, "SMART support is: Enabled\n", 26SMART support is: Enabled
  ) = 26
  write(1, "\n", 1
  )                       = 1
  ioctl(3, 0x31f, 0x7f98a240)             = -1 EIO (Input/output error)
  write(1, "SMART Disabled. Use option -s wi"..., 63SMART Disabled. Use option -s with argument 'on' to enable it.
  ) = 63
  exit_group(0)                           = ?


Newer smartctl versions (at least 6.1) just reports an error in such
case and continue:

  Error SMART Status command failed: Input/output error

 # strace -x smartctl-6.1 -d ata -a /dev/sda 2>&1
  ...
  ioctl(3, 0x31e, 0x7fac798c)             = -1 EIO (Input/output error)
  write(1, "Error SMART Status command faile"..., 54Error SMART Status command failed: Input/output error
  ...

On older kernels ioctl() returns 0 instead of -EIO.

Thanks,
Krzysiek

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-04-03 23:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-25 17:26 ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression Ronald
2013-03-27 12:51 ` Krzysztof Mazur
2013-04-03 23:49   ` Jeff Garzik
2013-03-29 15:26 ` [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check Gwendal Grignou
2013-03-29 16:10   ` Krzysztof Mazur
2013-03-29 17:06     ` Gwendal Grignou
2013-03-29 17:09       ` [PATCH v2] " Gwendal Grignou
2013-03-29 17:12         ` Gwendal Grignou
2013-03-29 17:47           ` Krzysztof Mazur
2013-03-29 20:01           ` Sergei Shtylyov
2013-03-30 21:43             ` [PATCH v3] " Gwendal Grignou
2013-03-29 15:28 ` ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression Gwendal Grignou
  -- strict thread matches above, loose matches on Subject: below --
2013-03-23  8:20 Krzysztof Mazur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).