From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 18 Sep 1998 22:00:10 -0400 From: arisawa@ar.aichi-u.ac.jp arisawa@ar.aichi-u.ac.jp Subject: [9fans] seek offset Topicbox-Message-UUID: 80f21ed4-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19980919020010.rGag5G8u7OgtUTnXYPjVUH0F17QkA3vZ-RlNq-ZWfzY@z> Hello 9fans, schwartz@bio.cse.psu.edu wrote: >If you send the boddle to the list it will get into the archives at least. I changed two files: /sys/src/9/pc/devata.c /sys/src/boot/pc/hard.c for large IDE. I worked on `devata.c' sent by Forsyth and he forbid me to redistribute the source without his permission. It was fairly easy to fix hard.c. Changing the meaning `cap' is all to do. term% diff hard.c 877058463/hard.c 222,224c222,223 < print("hd%d: LBA %d sect/trk , %d bytes/sect, %lud sectors\n", < drive->driveno, drive->sectors, drive->bytes, < drive->cap); --- > print("hd%d: LBA %d sectors, %d bytes\n", > drive->driveno, drive->sectors, drive->cap); 226c225 < print("hd%d: CHS %d/%d/%d, %d bytes/sect, %lud sectors\n", --- > print("hd%d: CHS %d/%d/%d %d bytes\n", 228c227 < drive->sectors, drive->bytes, drive->cap); --- > drive->sectors, drive->cap); 520c519 < dp->cap = dp->sectors; --- > dp->cap = dp->bytes * dp->sectors; 539c538 < dp->cap = dp->cyl * dp->heads * dp->sectors; --- > dp->cap = dp->bytes * dp->cyl * dp->heads * dp->sectors; 661c660 < pp->end = dp->cap; --- > pp->end = dp->cap / dp->bytes; schwartz@bio.cse.psu.edu also wrote: >What's the situation with >2gb scsi disks? As far as `b.com' is concerned, 877058463/scsi.c have been already fixed as shown bellow: term% grep cap scsi.c scsi.c: case ScsiGetcap: scsi.c:scsicap(int dev, void *p) scsi.c: cmd = scsicmd(dev, ScsiGetcap, scsibuf(), 8); scsi.c: pp->end = dp->cap; scsi.c: if(scsibread(dev, b, 1, dp->bytes, dp->cap-1) <= 0){ scsi.c: if(scsicap(i, buf)) scsi.c: sdrive[i].cap = ((buf[0]<<24)|(buf[1]<<16)|(buf[2]<<8)|buf[3])+1; scsi.c: print("scsi%d: cap %lud, sec %d\n", i, sdrive[i].cap, sdrive[i].bytes); It is uncertain for me whether kernel support large scsi for kfs or not. We can find the last update of `devwren.c' in 824494162.rc. Taking a quick look at the code, it seems there is no problem. I have not experienced large scsi except for file server. It is best to get exact answer from the people in bell-labs. Thanks, Kenji Arisawa E-mail: arisawa@aichi-u.ac.jp