PROBLEM: Does not work with the partition table of the SCSI-disk (1024 byte/sector)

=?ISO-8859-1?Q? (dsk@post.tomica.ru)
Thu, 05 Aug 1999 22:00:56 +0100


[2.] An equipment:
AHA1520 (aha152x.c) adapter, MAXTOR XT-4380S disk (1024 byte/sector).
aha152x: processing commandline: ok
aha152x: BIOS test: passed, detected 1 controller(s)
aha152x0: vital data: PORTBASE=0x340, IRQ=11, SCSI ID=7,
reconnect=enabled, parity=enabled, synchronous=disabled, delay=100,
extended translation=disabled
aha152x: trying software interrupt, ok.
scsi0 : Adaptec 152x SCSI driver; $Revision: 1.7 $
scsi : 1 host.
Vendor: MAXTOR Model: XT-4380S Rev: B5A
Type: Direct-Access ANSI SCSI revision: 01 CCS
Detected scsi disk sda at scsi0, channel 0, id 1, lun 0
scsi : detected 1 SCSI disk total.
SCSI device sda: hdwr sector= 1024 bytes. Sectors= 328860 [321 MB] [0.3
GB]
The creation of the partition table was fulfilled Linux fdisk.
The partition table in genhd.c not correctly is filled. The scale is
not necessary for the sd.c driver.
[3.] SCSI, DISK, aha152x.c
[4.] Linux version 2.2.5-15
[X.] After importation of the following modifications in genhd.c the
disk has earned:
294,295c294,295
< add_partition(hd, current_minor, this_sector+START_SECT(p),
< NR_SECTS(p), ptype(SYS_IND(p)));
---
> 			add_partition(hd, current_minor, this_sector+START_SECT(p)*sector_size, 
> 				      NR_SECTS(p)*sector_size, ptype(SYS_IND(p)));
317,319c317,319
< 		hd->part[current_minor].nr_sects = NR_SECTS(p); /* JSt */
< 		hd->part[current_minor].start_sect = first_sector + START_SECT(p);
< 		this_sector = first_sector + START_SECT(p);
---
> 		hd->part[current_minor].nr_sects = NR_SECTS(p) * sector_size; /* JSt */
> 		hd->part[current_minor].start_sect = first_sector + START_SECT(p) * sector_size;
> 		this_sector = first_sector + START_SECT(p) * sector_size;
593c593
<                add_partition(hd, minor, first_sector+START_SECT(p),
NR_SECTS(p), 
---
>                add_partition(hd, minor, first_sector+START_SECT(p)*sector_size, NR_SECTS(p)*sector_size,

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/