2003-05-18 12:54:14

by Adrian Bunk

[permalink] [raw]
Subject: [2.5 patch] 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


--- linux-2.5.69-mm6/drivers/ide/ide-disk.c.old 2003-05-18 14:55:31.000000000 +0200
+++ linux-2.5.69-mm6/drivers/ide/ide-disk.c 2003-05-18 14:56:17.000000000 +0200
@@ -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;


2003-05-18 22:23:13

by Andre Hedrick

[permalink] [raw]
Subject: Re: [2.5 patch] 2.4.21-rc1 pointless IDE noise reduction


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,

On Sun, 18 May 2003, Adrian Bunk wrote:

> 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
>
>
> --- linux-2.5.69-mm6/drivers/ide/ide-disk.c.old 2003-05-18 14:55:31.000000000 +0200
> +++ linux-2.5.69-mm6/drivers/ide/ide-disk.c 2003-05-18 14:56:17.000000000 +0200
> @@ -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;
>
> -
> 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

2003-05-18 22:55:09

by Erik Andersen

[permalink] [raw]
Subject: Re: [2.5 patch] 2.4.21-rc1 pointless IDE noise reduction

On Sun May 18, 2003 at 03:13:48PM -0700, Andre Hedrick wrote:
>
> 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.

> 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.

> 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--

Subject: Re: [2.5 patch] 2.4.21-rc1 pointless IDE noise reduction


On Sun, 18 May 2003, Andre Hedrick wrote:

> 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(). :-)

> 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

> Erik, get over it and just live with a stub out.
>
> Cheers,
>
> On Sun, 18 May 2003, Adrian Bunk wrote:
>
> > 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.