Disk capacity unclipping routines in ide.2.2.19.04092001.patch do not unclip
Seagate ST340824A.
I have to use the jumper on the drive to make system boot.
I tried "setmax" program and it is able to unclip the capacity,
kernel however does not.
I digged a little and I think the problem is that ST340824A does not follow
the ATA standard - it does support both READ NATIVE MAX ADDRESS
and SET MAX ADDRESS, but does not advertise support for
Host Protected Area feature set.
drive->id->command_set_1 =3D 0x306b for the this drive.
The unclipping routines compare
drive->id->command_set_1 and 0x0400 (Host Protected Feature set)
The earlier version of the patch compared
drive->id->command_set_1 and 0x000a (Security Mode & Power Managment ???)
When I changed it back to 0x000a, it unclipped the capacity just fine.
But 0x000a doesn't make any sense to me.
What is the correct solution?
Also the idedisk_supports_host_protected_area is there, but not used and
the printk's notifying of unclipping are commented out???
I attach the diff to show what I'm talking about.
Also a related question: when I use "setmax", the drive reports full
capacity through "hdparm -I /dev/hd*", but kernel still uses the old info.
How does one update the kernel info after using "setmax"?
--- ide-disk.c.orig Mon Apr 16 13:30:50 2001
+++ ide-disk.c Fri Apr 27 11:16:38 2001
@@ -546,7 +546,7 @@
ide_task_t args;
unsigned long addr =3D 0;
=20
- if (!(drive->id->command_set_1 & 0x0400))
+ if (!(drive->id->command_set_1 & 0x000a))
// if (!(drive->id->cfs_enable_1 & 0x0400))
return addr;
=20
@@ -580,7 +580,7 @@
ide_task_t args;
unsigned long addr_set =3D 0;
=09
-// printk("%s: (un)clipping max LBA...%lu\n", drive->name, addr_req);
+ printk("%s: (un)clipping max LBA...%lu\n", drive->name, addr_req);
=20
addr_req--;
/* Create IDE/ATA command request structure */
@@ -603,7 +603,7 @@
| ((args.tfRegister[IDE_SECTOR_OFFSET] ));
}
addr_set++;
-// printk("%s: max LBA (un)clipped to %lu\n", drive->name, addr_set);
+ printk("%s: max LBA (un)clipped to %lu\n", drive->name, addr_set);
return addr_set;
}
=20
--=20
=3D mailto:astavitsky@yahoo.com
=3D=3D=3D http://www.geocities.com/astavitsky
=3D=3D=3D=3D=3D GPG Key 0xF7343C8B: 68DD 1E1B 2C98 D336 E31F C87B 91B9 524=
4 F734 3C8B
|_____Alexander Stavitsky=20
--FCuugMFkClbJLl1L
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE66aivkblSRPc0PIsRAmHsAJ9O4DzvtRP0HZB/ZY2ZL7+Tsw/p/QCfUdLO
Ziml/p8hgdtD5Op9iR9QhBI=
=akSg
-----END PGP SIGNATURE-----
--FCuugMFkClbJLl1L--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/