lkml.org 
[lkml]   [1996]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectSCSI patches for 1.3.86
Date
Hi,

Here are the revised SCSI HD capacity patch plus a patch for
Nakamichi MBR-7 CDROM changer. They are for 1.3.86.

Thanks.


--
H.J. Lu (hjl@gnu.ai.mit.edu)
---
Index: scsi.c
===================================================================
RCS file: /home/cvs/linux/linux/drivers/scsi/scsi.c,v
retrieving revision 1.1.1.17
diff -c -r1.1.1.17 scsi.c
*** scsi.c 1996/04/05 07:20:14 1.1.1.17
--- scsi.c 1996/04/12 15:20:29
***************
*** 277,282 ****
--- 277,283 ----
{"TEXEL","CD-ROM","1.06", BLIST_BORKEN},
{"INSITE","Floptical F*8I","*", BLIST_KEY},
{"INSITE","I325VM","*", BLIST_KEY},
+ {"NRC","MBR-7","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"PIONEER","CD-ROM DRM-602X","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"PIONEER","CD-ROM DRM-604X","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"EMULEX","MD21/S2 ESDI","*",BLIST_FORCELUN | BLIST_SINGLELUN},
Index: sd.c
===================================================================
RCS file: /home/cvs/linux/linux/drivers/scsi/sd.c,v
retrieving revision 1.1.1.11
diff -c -r1.1.1.11 sd.c
*** sd.c 1996/04/11 05:46:39 1.1.1.11
--- sd.c 1996/04/12 14:30:11
***************
*** 1161,1174 ****
* So I have created this table. See ll_rw_blk.c
* Jacques Gelinas (Jacques@solucorp.qc.ca)
*/
! int m, mb;
int sz_quot, sz_rem;
int hard_sector = rscsi_disks[i].sector_size;
/* There are 16 minors allocated for each major device */
for (m=i<<4; m<((i+1)<<4); m++){
sd_hardsizes[m] = hard_sector;
}
! mb = (hard_sector * rscsi_disks[i].capacity) / (1024*1024);
/* sz = div(m/100, 10); this seems to not be in the libr */
m = (mb + 50) / 100;
sz_quot = m / 10;
--- 1161,1187 ----
* So I have created this table. See ll_rw_blk.c
* Jacques Gelinas (Jacques@solucorp.qc.ca)
*/
! int m, mb, one_mb;
int sz_quot, sz_rem;
int hard_sector = rscsi_disks[i].sector_size;
/* There are 16 minors allocated for each major device */
for (m=i<<4; m<((i+1)<<4); m++){
sd_hardsizes[m] = hard_sector;
}
! /*
! * mb = (hard_sector * rscsi_disks[i].capacity) / (1024*1024);
! *
! * hard_sector * rscsi_disks[i].capacity may be overflow.
! * We should be very careful. 1 MB is 1 << 20.
! * H.J. (hjl@lucon.org).
! */
! one_mb = 20;
! for (mb = hard_sector; (mb & 0x1) == 0 && one_mb > 0;
! mb >>= 1, one_mb--);
! for (m = rscsi_disks[i].capacity; (m & 0x1) == 0 && one_mb > 0;
! m >>= 1, one_mb--);
! mb *= m;
! mb >>= one_mb;
/* sz = div(m/100, 10); this seems to not be in the libr */
m = (mb + 50) / 100;
sz_quot = m / 10;


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.050 / U:1.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site