aiclib.h (7a93aef7fbac6f4db40b6fec5c0c6b654ae7a93c) | aiclib.h (1ff927306e08b356d764e605eff7c50079550bd2) |
---|---|
1/* 2 * Largely written by Julian Elischer (julian@tfs.com) 3 * for TRW Financial Systems. 4 * 5 * TRW Financial Systems, in accordance with their agreement with Carnegie 6 * Mellon University, makes this software available to CMU to distribute 7 * or use in any manner that they see fit as long as this message is kept with 8 * the software. For this reason TFS also grants any other persons or --- 127 unchanged lines hidden (view full) --- 136static __inline int 137aic_sector_div(sector_t capacity, int heads, int sectors) 138{ 139 /* ugly, ugly sector_div calling convention.. */ 140 sector_div(capacity, (heads * sectors)); 141 return (int)capacity; 142} 143 | 1/* 2 * Largely written by Julian Elischer (julian@tfs.com) 3 * for TRW Financial Systems. 4 * 5 * TRW Financial Systems, in accordance with their agreement with Carnegie 6 * Mellon University, makes this software available to CMU to distribute 7 * or use in any manner that they see fit as long as this message is kept with 8 * the software. For this reason TFS also grants any other persons or --- 127 unchanged lines hidden (view full) --- 136static __inline int 137aic_sector_div(sector_t capacity, int heads, int sectors) 138{ 139 /* ugly, ugly sector_div calling convention.. */ 140 sector_div(capacity, (heads * sectors)); 141 return (int)capacity; 142} 143 |
144/**************************** Module Library Hack *****************************/ 145/* 146 * What we'd like to do is have a single "scsi library" module that both the 147 * aic7xxx and aic79xx drivers could load and depend on. A cursory examination 148 * of implementing module dependencies in Linux (handling the install and 149 * initrd cases) does not look promissing. For now, we just duplicate this 150 * code in both drivers using a simple symbol renaming scheme that hides this 151 * hack from the drivers. 152 */ 153#define AIC_LIB_ENTRY_CONCAT(x, prefix) prefix ## x 154#define AIC_LIB_ENTRY_EXPAND(x, prefix) AIC_LIB_ENTRY_CONCAT(x, prefix) 155#define AIC_LIB_ENTRY(x) AIC_LIB_ENTRY_EXPAND(x, AIC_LIB_PREFIX) 156 157#define aic_calc_syncsrate AIC_LIB_ENTRY(_calc_syncrate) 158 159u_int aic_calc_syncsrate(u_int /*period_factor*/); 160 161typedef void aic_option_callback_t(u_long, int, int, int32_t); 162char * aic_parse_brace_option(char *opt_name, char *opt_arg, 163 char *end, int depth, 164 aic_option_callback_t *, u_long); 165 | |
166static __inline uint32_t 167scsi_4btoul(uint8_t *bytes) 168{ 169 uint32_t rv; 170 171 rv = (bytes[0] << 24) | 172 (bytes[1] << 16) | 173 (bytes[2] << 8) | --- 44 unchanged lines hidden --- | 144static __inline uint32_t 145scsi_4btoul(uint8_t *bytes) 146{ 147 uint32_t rv; 148 149 rv = (bytes[0] << 24) | 150 (bytes[1] << 16) | 151 (bytes[2] << 8) | --- 44 unchanged lines hidden --- |