Skip to contentSkip to conversation

2.4.21-rc1 pointless IDE noise reduction

PATCH In review Adrian Bunk 4 participants 4 messages May 18, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.4.21-rc1 pointless IDE noise reduction

Below is a 2.5 version of the patch to remove
idedisk_supports_host_protected_area.

I've tested the compilation with 2.5.69-mm6.

cu
Adrian

drivers/ide/ide-disk.c renamed from drivers/ide/ide-disk.c.old +0 -14
@@ -1064,18 +1064,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(KERN_INFO "%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.
  *
@@ -1101,8 +1089,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;
#1 lore raw

Just maybe people would like to know if there is a secret OS on the tail of their drive, or the potential for one being there.

Go research EDDS BEER PARTIES and you will find out this is not a joke.

If the noise pisses you off turn down your kernel printk noise makers. Better yet stub it out in your own kernel.

Do not remove items that have meaning or valid tests.

Erik, get over it and just live with a stub out.

Cheers,

Quoted 41 lines · Adrian Bunk

Below is a 2.5 version of the patch to remove
idedisk_supports_host_protected_area.

I've tested the compilation with 2.5.69-mm6.

cu
Adrian

drivers/ide/ide-disk.c renamed from drivers/ide/ide-disk.c.old +0 -15
@@ -1064,18 +1064,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(KERN_INFO "%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.
  *
@@ -1101,8 +1089,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;
 
-
Quoted 5 lines

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Andre Hedrick
LAD Storage Consulting Group

#2 lore raw
Quoted 5 lines · Andre Hedrick

Just maybe people would like to know if there is a secret OS on the tail of their drive, or the potential for one being there.

Go research EDDS BEER PARTIES and you will find out this is not a joke.

Real world to Andre: idedisk_supports_host_protected_area() does not tell people any such thing.

Quoted 4 lines

If the noise pisses you off turn down your kernel printk noise makers. Better yet stub it out in your own kernel.

Do not remove items that have meaning or valid tests.

I wouldn't dream of removing things which have meaning. Which is why removing this is the Right Thing(tm). It is useless noise.

The test, as implemented, merely tells us whether a drive is capable of supporting the Host Protected Area feature set. Well, who cares about that? The only time anyone cares, is when something, such as the BIOS, has done a SET MAX ADDRESS [EXT], in which case CONFIG_IDEDISK_STROKE already addresses the problem (unless the drive was transitioned to Set_Max_Frozen state SM3, in which case there is nothing to be done) and whines appropriately to let people know. This is a good thing. No complaints there.

But the Host Protected Area feature is not equal to DCO. If you want to detect and display when an drive has been modified via DCO to appear smaller thereby concealing stuff, then by all means go far it. You won't hear me compain one bit.

Quoted 1 line

Erik, get over it and just live with a stub out.

As usual, I have no idea what you are talking about.

Submit a patch to make idedisk_supports_host_protected_area() do something useful, then fine we can keep it. As is, it is completely useless, it prints confusing messages, and it erroneously suggests that there is already something hidden on people's drives.

As such, this stuff is useless cruft. I suggested removing this stuff and submitted an initial patch to silence it. Adrian then noticed that in addition to being noisy, the driver never uses the info, and it could be dropped entirely.

-Erik

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

#3 lore raw
In reply to Andre Hedrick
Quoted 2 lines · Andre Hedrick

Just maybe people would like to know if there is a secret OS on the tail of their drive, or the potential for one being there.

This function only checks for HPA command set enabled (not supported).

I find it only useful when we see failed command in logs and ">= 0", then we now it was READ_NATIVE_MAX command.

We check for secret OS in init_idedisk_capacity(). :-)

Quoted 6 lines

Go research EDDS BEER PARTIES and you will find out this is not a joke.

If the noise pisses you off turn down your kernel printk noise makers. Better yet stub it out in your own kernel.

Do not remove items that have meaning or valid tests.

It is covered by init_idedisk_capacity() (capacity != native capacity) and hdparm (HPA command set supported/enabled).

Can it go away?

Cheers,
--
Bartlomiej

Quoted 10 lines

Erik, get over it and just live with a stub out.

Cheers,

Quoted 4 lines · Adrian Bunk

Below is a 2.5 version of the patch to remove
idedisk_supports_host_protected_area.

I've tested the compilation with 2.5.69-mm6.