Skip to contentSkip to conversation

Proble, with new ata compatibility links for libata devices

DISCUSSION Matthias Schwarzott 2 participants 3 messages Apr 27, 2007 – Apr 28, 2007

lore
Share & tools
lore
#0 lore raw

Hi!

Since the commit of the ata compatibility links, I get this error message at every system-start:
ata_id main: HDIO_GET_IDENTITY failed for '/dev/.tmp-8-0'

Looking up the device, it is /dev/sda.
It is this rule:

KERNEL="sd*[!0-9]|sr*", ENV{ID_VENDOR}="ATA", PROGRAM="ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result"

Is it really intended to call ata_id on libata devices? Or is that a kernel error (using version 2.6.20-gentoo).

Or is this just a missing patch, only applied to suse kernels?

Matthias

Signature · 11 lines
Matthias Schwarzott (zzam)

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#1 lore raw
Quoted 9 lines · Matthias Schwarzott

Hi!

Since the commit of the ata compatibility links, I get this error message at every system-start:
ata_id main: HDIO_GET_IDENTITY failed for '/dev/.tmp-8-0'

Looking up the device, it is /dev/sda.
It is this rule:

Quoted 8 lines

KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result"

Is it really intended to call ata_id on libata devices? Or is that a kernel error (using version 2.6.20-gentoo).

Or is this just a missing patch, only applied to suse kernels?

To answer to me:
The patch seems to be included in Kernel 2.6.21.

Attached patch just makes ata_id ignore the error: Unsupported ioctl (errno==ENOTTY).

Matthias

Signature · 1 line
Matthias Schwarzott (zzam)
extras/ata_id/ata_id.c +3 -1
index aedebff..56e4ddc 100644
@@ -120,7 +120,9 @@ int main(int argc, char *argv[])
 	}
 
 	if (ioctl(fd, HDIO_GET_IDENTITY, &id)) {
-		err("HDIO_GET_IDENTITY failed for '%s'", node);
+		// older libata (kernel < 2.6.21) did not implement that ioctl
+		if (errno!=ENOTTY)
+			err("HDIO_GET_IDENTITY failed for '%s'", node);
 		rc = 3;
 		goto close;
 	}

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Matthias Schwarzott
Quoted 14 lines · Matthias Schwarzott
Quoted 13 lines · Matthias Schwarzott

Since the commit of the ata compatibility links, I get this error message at every system-start:
ata_id main: HDIO_GET_IDENTITY failed for '/dev/.tmp-8-0'

Looking up the device, it is /dev/sda.
It is this rule:

KERNEL="sd*[!0-9]|sr*", ENV{ID_VENDOR}="ATA", PROGRAM="ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result"

Is it really intended to call ata_id on libata devices? Or is that a kernel error (using version 2.6.20-gentoo).

Quoted 7 lines
Quoted 2 lines

Or is this just a missing patch, only applied to suse kernels?

To answer to me:
The patch seems to be included in Kernel 2.6.21.

Attached patch just makes ata_id ignore the error: Unsupported ioctl (errno=ENOTTY).

Nice, I've applied that with a message at the "info" level, if the ioctl is not supported. So no error should be logged in the default setup.

Thanks,
Kay

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel