Skip to contentSkip to conversation

2.4.21-rc1 pointless IDE noise reduction

PATCH In review Erik Andersen 3 participants 4 messages Apr 24, 2003 – Apr 27, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.4.21-rc1 pointless IDE noise reduction

The ide driver does not list whether drives support things like write cache, SMART, SECURITY ERASE UNIT. But for some silly reason it tells us at boot whether each drive is capable of supporting the Host Protected Area feature set. If people want to know the capabilites of their drive, they can run 'hdparm' and find out.

This patch removes this pointless noise. Please apply,

drivers/ide/ide-disk.c renamed from drivers/ide/ide-disk.c.orig +1 -4
@@ -1133,10 +1133,7 @@
  */
 static inline int idedisk_supports_host_protected_area(ide_drive_t *drive)
 {
-	int flag = (drive->id->cfs_enable_1 & 0x0400) ? 1 : 0;
-	if (flag)
-		printk("%s: host protected area => %d\n", drive->name, flag);
-	return flag;
+	return((drive->id->cfs_enable_1 & 0x0400) ? 1 : 0);
 }
 
 /*

-Erik

--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

#1 lore raw
Quoted 13 lines · Erik Andersen

The ide driver does not list whether drives support things like write cache, SMART, SECURITY ERASE UNIT. But for some silly reason it tells us at boot whether each drive is capable of supporting the Host Protected Area feature set. If people want to know the capabilites of their drive, they can run 'hdparm' and find out.

This patch removes this pointless noise. Please apply,

drivers/ide/ide-disk.c line 1137

Quoted 9 lines
drivers/ide/ide-disk.c renamed from drivers/ide/ide-disk.c.orig +1 -4
@@ -1133,10 +1133,7 @@
  */
 static inline int idedisk_supports_host_protected_area(ide_drive_t *drive)
 {
-	int flag = (drive->id->cfs_enable_1 & 0x0400) ? 1 : 0;
-	if (flag)
-		printk("%s: host protected area => %d\n", drive->name, flag);
-	return flag;
+	return((drive->id->cfs_enable_1 & 0x0400) ? 1 : 0);
 }

Seconded, it causes a lot more confusion than it does good.

Signature · 1 line
Jens Axboe
#2 lore raw
In reply to Erik Andersen
Quoted 14 lines · Erik Andersen

The ide driver does not list whether drives support things like write cache, SMART, SECURITY ERASE UNIT. But for some silly reason it tells us at boot whether each drive is capable of supporting the Host Protected Area feature set. If people want to know the capabilites of their drive, they can run 'hdparm' and find out.

This patch removes this pointless noise. Please apply,

drivers/ide/ide-disk.c renamed from drivers/ide/ide-disk.c.orig +0 -0
@@ -1133,10 +1133,7 @@
  */

drivers/ide/ide-disk.c line 1139

Quoted 10 lines
drivers/ide/ide-disk.c renamed from drivers/ide/ide-disk.c.orig +1 -4
 static inline int idedisk_supports_host_protected_area(ide_drive_t *drive)
 {
-	int flag = (drive->id->cfs_enable_1 & 0x0400) ? 1 : 0;
-	if (flag)
-		printk("%s: host protected area => %d\n", drive->name, flag);
-	return flag;
+	return((drive->id->cfs_enable_1 & 0x0400) ? 1 : 0);
 }
 
 /*

Looking at the only user of this function it seems we can completely remove it (patch below).

Alan:
Is the patch below OK or are there any future plans for more uses of idedisk_supports_host_protected_area?

Quoted 1 line

-Erik

cu
Adrian

drivers/ide/ide-disk.c renamed from drivers/ide/ide-disk.c.old +0 -14
@@ -1128,18 +1128,6 @@
 #endif /* CONFIG_IDEDISK_STROKE */
 
 /*
- * Tests if the drive supports Host Protected Area feature.
- * Returns true if supported, false otherwise.
- */
-static inline int idedisk_supports_host_protected_area(ide_drive_t *drive)
-{
-	int flag = (drive->id->cfs_enable_1 & 0x0400) ? 1 : 0;
-	if (flag)
-		printk("%s: host protected area => %d\n", drive->name, flag);
-	return flag;
-}
-
-/*
  * Compute drive->capacity, the full capacity of the drive
  * Called with drive->id != NULL.
  *
@@ -1165,8 +1153,6 @@
 	drive->capacity48 = 0;
 	drive->select.b.lba = 0;
 
-	(void) idedisk_supports_host_protected_area(drive);
-
 	if (id->cfs_enable_2 & 0x0400) {
 		capacity_2 = id->lba_capacity_2;
 		drive->head		= drive->bios_head = 255;
#3 lore raw
Quoted 8 lines · Adrian Bunk

Looking at the only user of this function it seems we can completely remove it (patch below).

Alan:
Is the patch below OK or are there any future plans for more uses of idedisk_supports_host_protected_area?

Quoted 1 line

-Erik

Looks fine to me. Even better,

-Erik

--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--