[lkml]   [2001]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectSeagate ST340824A and (un)clipping max LBA: 2.2.19+ide04092001 patch

Disk capacity unclipping routines in ide. 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 = 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 = 0;

- if (!(drive->id->command_set_1 & 0x0400))
+ if (!(drive->id->command_set_1 & 0x000a))
// if (!(drive->id->cfs_enable_1 & 0x0400))
return addr;

@@ -580,7 +580,7 @@
ide_task_t args;
unsigned long addr_set = 0;

-// printk("%s: (un)clipping max LBA...%lu\n", drive->name, addr_req);
+ printk("%s: (un)clipping max LBA...%lu\n", drive->name, addr_req);

/* Create IDE/ATA command request structure */
@@ -603,7 +603,7 @@
| ((args.tfRegister[IDE_SECTOR_OFFSET] ));
-// 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;

===== GPG Key 0xF7343C8B: 68DD 1E1B 2C98 D336 E31F C87B 91B9 5244 F734 3C8B
|_____Alexander Stavitsky [unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-03-22 12:52    [W:0.067 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site