Diff for /src/sys/bus/cam/cam.c between versions 1.3 and 1.4

version 1.3, 2003/08/07 21:16:44 version 1.4, 2003/12/29 23:30:58
Line 31 Line 31
 #include <sys/param.h>  #include <sys/param.h>
   
 #include "cam.h"  #include "cam.h"
   #include "cam_ccb.h"
   
 void  void
 cam_strvis(u_int8_t *dst, const u_int8_t *src, int srclen, int dstlen)  cam_strvis(u_int8_t *dst, const u_int8_t *src, int srclen, int dstlen)
Line 108  cam_quirkmatch(caddr_t target, caddr_t q Line 109  cam_quirkmatch(caddr_t target, caddr_t q
         }          }
         return (NULL);          return (NULL);
 }  }
   
   /*
    * Common calculate geometry fuction
    *
    * Caller should set ccg->volume_size and block_size.
    * The extended parameter should be zero if extended translation
    * should not be used.
    */
   void
   cam_calc_geometry(struct ccb_calc_geometry *ccg, int extended)
   {
           uint32_t size_mb, secs_per_cylinder;
   
           size_mb = ccg->volume_size / ((1024L * 1024L) / ccg->block_size);
           if (size_mb > 1024 && extended) {
                   ccg->heads = 255;
                   ccg->secs_per_track = 63;
           } else {
                   ccg->heads = 64;
                   ccg->secs_per_track = 32;
           }
           secs_per_cylinder = ccg->heads * ccg->secs_per_track;
           ccg->cylinders = ccg->volume_size / secs_per_cylinder;
           ccg->ccb_h.status = CAM_REQ_CMP;
   }
   

Removed from v.1.3  
changed lines
  Added in v.1.4