aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2014-12-02 18:10:50 -0500
committerJames Bottomley <JBottomley@Parallels.com>2015-02-02 12:57:45 -0500
commit2f979427b2babed959c86d32a506063b9145429e (patch)
tree09f8cc6c887fb3fe326da3a059077a824ef360cf /drivers/scsi
parent0c3de38ff3eec506ef08ede32110d1f266366ccd (diff)
advansys: replace seq_printf with seq_puts
Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace seq_printf with seq_puts when possible. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/advansys.c155
1 files changed, 75 insertions, 80 deletions
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 2c5ce48c8f95..9cdad1de9ae3 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -2880,7 +2880,7 @@ static void asc_prt_board_devices(struct seq_file *m, struct Scsi_Host *shost)
2880 chip_scsi_id = boardp->dvc_var.adv_dvc_var.chip_scsi_id; 2880 chip_scsi_id = boardp->dvc_var.adv_dvc_var.chip_scsi_id;
2881 } 2881 }
2882 2882
2883 seq_printf(m, "Target IDs Detected:"); 2883 seq_puts(m, "Target IDs Detected:");
2884 for (i = 0; i <= ADV_MAX_TID; i++) { 2884 for (i = 0; i <= ADV_MAX_TID; i++) {
2885 if (boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) 2885 if (boardp->init_tidmask & ADV_TID_TO_TIDMASK(i))
2886 seq_printf(m, " %X,", i); 2886 seq_printf(m, " %X,", i);
@@ -2896,18 +2896,18 @@ static void asc_prt_adv_bios(struct seq_file *m, struct Scsi_Host *shost)
2896 struct asc_board *boardp = shost_priv(shost); 2896 struct asc_board *boardp = shost_priv(shost);
2897 ushort major, minor, letter; 2897 ushort major, minor, letter;
2898 2898
2899 seq_printf(m, "\nROM BIOS Version: "); 2899 seq_puts(m, "\nROM BIOS Version: ");
2900 2900
2901 /* 2901 /*
2902 * If the BIOS saved a valid signature, then fill in 2902 * If the BIOS saved a valid signature, then fill in
2903 * the BIOS code segment base address. 2903 * the BIOS code segment base address.
2904 */ 2904 */
2905 if (boardp->bios_signature != 0x55AA) { 2905 if (boardp->bios_signature != 0x55AA) {
2906 seq_printf(m, "Disabled or Pre-3.1\n"); 2906 seq_puts(m, "Disabled or Pre-3.1\n");
2907 seq_printf(m, 2907 seq_puts(m,
2908 "BIOS either disabled or Pre-3.1. If it is pre-3.1, then a newer version\n"); 2908 "BIOS either disabled or Pre-3.1. If it is pre-3.1, then a newer version\n");
2909 seq_printf(m, 2909 seq_puts(m,
2910 "can be found at the ConnectCom FTP site: ftp://ftp.connectcom.net/pub\n"); 2910 "can be found at the ConnectCom FTP site: ftp://ftp.connectcom.net/pub\n");
2911 } else { 2911 } else {
2912 major = (boardp->bios_version >> 12) & 0xF; 2912 major = (boardp->bios_version >> 12) & 0xF;
2913 minor = (boardp->bios_version >> 8) & 0xF; 2913 minor = (boardp->bios_version >> 8) & 0xF;
@@ -2923,10 +2923,9 @@ static void asc_prt_adv_bios(struct seq_file *m, struct Scsi_Host *shost)
2923 */ 2923 */
2924 if (major < 3 || (major <= 3 && minor < 1) || 2924 if (major < 3 || (major <= 3 && minor < 1) ||
2925 (major <= 3 && minor <= 1 && letter < ('I' - 'A'))) { 2925 (major <= 3 && minor <= 1 && letter < ('I' - 'A'))) {
2926 seq_printf(m, 2926 seq_puts(m,
2927 "Newer version of ROM BIOS is available at the ConnectCom FTP site:\n"); 2927 "Newer version of ROM BIOS is available at the ConnectCom FTP site:\n");
2928 seq_printf(m, 2928 seq_puts(m, "ftp://ftp.connectcom.net/pub\n");
2929 "ftp://ftp.connectcom.net/pub\n");
2930 } 2929 }
2931 } 2930 }
2932} 2931}
@@ -3056,11 +3055,10 @@ static void asc_prt_asc_board_eeprom(struct seq_file *m, struct Scsi_Host *shost
3056 == ASC_TRUE) 3055 == ASC_TRUE)
3057 seq_printf(m, " Serial Number: %s\n", serialstr); 3056 seq_printf(m, " Serial Number: %s\n", serialstr);
3058 else if (ep->adapter_info[5] == 0xBB) 3057 else if (ep->adapter_info[5] == 0xBB)
3059 seq_printf(m, 3058 seq_puts(m,
3060 " Default Settings Used for EEPROM-less Adapter.\n"); 3059 " Default Settings Used for EEPROM-less Adapter.\n");
3061 else 3060 else
3062 seq_printf(m, 3061 seq_puts(m, " Serial Number Signature Not Present.\n");
3063 " Serial Number Signature Not Present.\n");
3064 3062
3065 seq_printf(m, 3063 seq_printf(m,
3066 " Host SCSI ID: %u, Host Queue Size: %u, Device Queue Size: %u\n", 3064 " Host SCSI ID: %u, Host Queue Size: %u, Device Queue Size: %u\n",
@@ -3070,34 +3068,34 @@ static void asc_prt_asc_board_eeprom(struct seq_file *m, struct Scsi_Host *shost
3070 seq_printf(m, 3068 seq_printf(m,
3071 " cntl 0x%x, no_scam 0x%x\n", ep->cntl, ep->no_scam); 3069 " cntl 0x%x, no_scam 0x%x\n", ep->cntl, ep->no_scam);
3072 3070
3073 seq_printf(m, " Target ID: "); 3071 seq_puts(m, " Target ID: ");
3074 for (i = 0; i <= ASC_MAX_TID; i++) 3072 for (i = 0; i <= ASC_MAX_TID; i++)
3075 seq_printf(m, " %d", i); 3073 seq_printf(m, " %d", i);
3076 seq_printf(m, "\n"); 3074 seq_puts(m, "\n");
3077 3075
3078 seq_printf(m, " Disconnects: "); 3076 seq_puts(m, " Disconnects: ");
3079 for (i = 0; i <= ASC_MAX_TID; i++) 3077 for (i = 0; i <= ASC_MAX_TID; i++)
3080 seq_printf(m, " %c", 3078 seq_printf(m, " %c",
3081 (ep->disc_enable & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3079 (ep->disc_enable & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3082 seq_printf(m, "\n"); 3080 seq_puts(m, "\n");
3083 3081
3084 seq_printf(m, " Command Queuing: "); 3082 seq_puts(m, " Command Queuing: ");
3085 for (i = 0; i <= ASC_MAX_TID; i++) 3083 for (i = 0; i <= ASC_MAX_TID; i++)
3086 seq_printf(m, " %c", 3084 seq_printf(m, " %c",
3087 (ep->use_cmd_qng & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3085 (ep->use_cmd_qng & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3088 seq_printf(m, "\n"); 3086 seq_puts(m, "\n");
3089 3087
3090 seq_printf(m, " Start Motor: "); 3088 seq_puts(m, " Start Motor: ");
3091 for (i = 0; i <= ASC_MAX_TID; i++) 3089 for (i = 0; i <= ASC_MAX_TID; i++)
3092 seq_printf(m, " %c", 3090 seq_printf(m, " %c",
3093 (ep->start_motor & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3091 (ep->start_motor & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3094 seq_printf(m, "\n"); 3092 seq_puts(m, "\n");
3095 3093
3096 seq_printf(m, " Synchronous Transfer:"); 3094 seq_puts(m, " Synchronous Transfer:");
3097 for (i = 0; i <= ASC_MAX_TID; i++) 3095 for (i = 0; i <= ASC_MAX_TID; i++)
3098 seq_printf(m, " %c", 3096 seq_printf(m, " %c",
3099 (ep->init_sdtr & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3097 (ep->init_sdtr & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3100 seq_printf(m, "\n"); 3098 seq_puts(m, "\n");
3101 3099
3102#ifdef CONFIG_ISA 3100#ifdef CONFIG_ISA
3103 if (asc_dvc_varp->bus_type & ASC_IS_ISA) { 3101 if (asc_dvc_varp->bus_type & ASC_IS_ISA) {
@@ -3151,7 +3149,7 @@ static void asc_prt_adv_board_eeprom(struct seq_file *m, struct Scsi_Host *shost
3151 if (asc_get_eeprom_string(wordp, serialstr) == ASC_TRUE) 3149 if (asc_get_eeprom_string(wordp, serialstr) == ASC_TRUE)
3152 seq_printf(m, " Serial Number: %s\n", serialstr); 3150 seq_printf(m, " Serial Number: %s\n", serialstr);
3153 else 3151 else
3154 seq_printf(m, " Serial Number Signature Not Present.\n"); 3152 seq_puts(m, " Serial Number Signature Not Present.\n");
3155 3153
3156 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) 3154 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550)
3157 seq_printf(m, 3155 seq_printf(m,
@@ -3209,10 +3207,10 @@ static void asc_prt_adv_board_eeprom(struct seq_file *m, struct Scsi_Host *shost
3209 ep_38C1600->termination_lvd, termstr, 3207 ep_38C1600->termination_lvd, termstr,
3210 ep_38C1600->bios_ctrl); 3208 ep_38C1600->bios_ctrl);
3211 3209
3212 seq_printf(m, " Target ID: "); 3210 seq_puts(m, " Target ID: ");
3213 for (i = 0; i <= ADV_MAX_TID; i++) 3211 for (i = 0; i <= ADV_MAX_TID; i++)
3214 seq_printf(m, " %X", i); 3212 seq_printf(m, " %X", i);
3215 seq_printf(m, "\n"); 3213 seq_puts(m, "\n");
3216 3214
3217 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) { 3215 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) {
3218 word = ep_3550->disc_enable; 3216 word = ep_3550->disc_enable;
@@ -3221,11 +3219,11 @@ static void asc_prt_adv_board_eeprom(struct seq_file *m, struct Scsi_Host *shost
3221 } else { 3219 } else {
3222 word = ep_38C1600->disc_enable; 3220 word = ep_38C1600->disc_enable;
3223 } 3221 }
3224 seq_printf(m, " Disconnects: "); 3222 seq_puts(m, " Disconnects: ");
3225 for (i = 0; i <= ADV_MAX_TID; i++) 3223 for (i = 0; i <= ADV_MAX_TID; i++)
3226 seq_printf(m, " %c", 3224 seq_printf(m, " %c",
3227 (word & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3225 (word & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3228 seq_printf(m, "\n"); 3226 seq_puts(m, "\n");
3229 3227
3230 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) { 3228 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) {
3231 word = ep_3550->tagqng_able; 3229 word = ep_3550->tagqng_able;
@@ -3234,11 +3232,11 @@ static void asc_prt_adv_board_eeprom(struct seq_file *m, struct Scsi_Host *shost
3234 } else { 3232 } else {
3235 word = ep_38C1600->tagqng_able; 3233 word = ep_38C1600->tagqng_able;
3236 } 3234 }
3237 seq_printf(m, " Command Queuing: "); 3235 seq_puts(m, " Command Queuing: ");
3238 for (i = 0; i <= ADV_MAX_TID; i++) 3236 for (i = 0; i <= ADV_MAX_TID; i++)
3239 seq_printf(m, " %c", 3237 seq_printf(m, " %c",
3240 (word & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3238 (word & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3241 seq_printf(m, "\n"); 3239 seq_puts(m, "\n");
3242 3240
3243 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) { 3241 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) {
3244 word = ep_3550->start_motor; 3242 word = ep_3550->start_motor;
@@ -3247,28 +3245,28 @@ static void asc_prt_adv_board_eeprom(struct seq_file *m, struct Scsi_Host *shost
3247 } else { 3245 } else {
3248 word = ep_38C1600->start_motor; 3246 word = ep_38C1600->start_motor;
3249 } 3247 }
3250 seq_printf(m, " Start Motor: "); 3248 seq_puts(m, " Start Motor: ");
3251 for (i = 0; i <= ADV_MAX_TID; i++) 3249 for (i = 0; i <= ADV_MAX_TID; i++)
3252 seq_printf(m, " %c", 3250 seq_printf(m, " %c",
3253 (word & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3251 (word & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3254 seq_printf(m, "\n"); 3252 seq_puts(m, "\n");
3255 3253
3256 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) { 3254 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) {
3257 seq_printf(m, " Synchronous Transfer:"); 3255 seq_puts(m, " Synchronous Transfer:");
3258 for (i = 0; i <= ADV_MAX_TID; i++) 3256 for (i = 0; i <= ADV_MAX_TID; i++)
3259 seq_printf(m, " %c", 3257 seq_printf(m, " %c",
3260 (ep_3550->sdtr_able & ADV_TID_TO_TIDMASK(i)) ? 3258 (ep_3550->sdtr_able & ADV_TID_TO_TIDMASK(i)) ?
3261 'Y' : 'N'); 3259 'Y' : 'N');
3262 seq_printf(m, "\n"); 3260 seq_puts(m, "\n");
3263 } 3261 }
3264 3262
3265 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) { 3263 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) {
3266 seq_printf(m, " Ultra Transfer: "); 3264 seq_puts(m, " Ultra Transfer: ");
3267 for (i = 0; i <= ADV_MAX_TID; i++) 3265 for (i = 0; i <= ADV_MAX_TID; i++)
3268 seq_printf(m, " %c", 3266 seq_printf(m, " %c",
3269 (ep_3550->ultra_able & ADV_TID_TO_TIDMASK(i)) 3267 (ep_3550->ultra_able & ADV_TID_TO_TIDMASK(i))
3270 ? 'Y' : 'N'); 3268 ? 'Y' : 'N');
3271 seq_printf(m, "\n"); 3269 seq_puts(m, "\n");
3272 } 3270 }
3273 3271
3274 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) { 3272 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) {
@@ -3278,16 +3276,15 @@ static void asc_prt_adv_board_eeprom(struct seq_file *m, struct Scsi_Host *shost
3278 } else { 3276 } else {
3279 word = ep_38C1600->wdtr_able; 3277 word = ep_38C1600->wdtr_able;
3280 } 3278 }
3281 seq_printf(m, " Wide Transfer: "); 3279 seq_puts(m, " Wide Transfer: ");
3282 for (i = 0; i <= ADV_MAX_TID; i++) 3280 for (i = 0; i <= ADV_MAX_TID; i++)
3283 seq_printf(m, " %c", 3281 seq_printf(m, " %c",
3284 (word & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3282 (word & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3285 seq_printf(m, "\n"); 3283 seq_puts(m, "\n");
3286 3284
3287 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800 || 3285 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800 ||
3288 adv_dvc_varp->chip_type == ADV_CHIP_ASC38C1600) { 3286 adv_dvc_varp->chip_type == ADV_CHIP_ASC38C1600) {
3289 seq_printf(m, 3287 seq_puts(m, " Synchronous Transfer Speed (Mhz):\n ");
3290 " Synchronous Transfer Speed (Mhz):\n ");
3291 for (i = 0; i <= ADV_MAX_TID; i++) { 3288 for (i = 0; i <= ADV_MAX_TID; i++) {
3292 char *speed_str; 3289 char *speed_str;
3293 3290
@@ -3325,10 +3322,10 @@ static void asc_prt_adv_board_eeprom(struct seq_file *m, struct Scsi_Host *shost
3325 } 3322 }
3326 seq_printf(m, "%X:%s ", i, speed_str); 3323 seq_printf(m, "%X:%s ", i, speed_str);
3327 if (i == 7) 3324 if (i == 7)
3328 seq_printf(m, "\n "); 3325 seq_puts(m, "\n ");
3329 sdtr_speed >>= 4; 3326 sdtr_speed >>= 4;
3330 } 3327 }
3331 seq_printf(m, "\n"); 3328 seq_puts(m, "\n");
3332 } 3329 }
3333} 3330}
3334 3331
@@ -3403,7 +3400,7 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
3403 seq_printf(m, 3400 seq_printf(m,
3404 " Total Command Pending: %d\n", v->cur_total_qng); 3401 " Total Command Pending: %d\n", v->cur_total_qng);
3405 3402
3406 seq_printf(m, " Command Queuing:"); 3403 seq_puts(m, " Command Queuing:");
3407 for (i = 0; i <= ASC_MAX_TID; i++) { 3404 for (i = 0; i <= ASC_MAX_TID; i++) {
3408 if ((chip_scsi_id == i) || 3405 if ((chip_scsi_id == i) ||
3409 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { 3406 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
@@ -3413,10 +3410,10 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
3413 i, 3410 i,
3414 (v->use_tagged_qng & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3411 (v->use_tagged_qng & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3415 } 3412 }
3416 seq_printf(m, "\n"); 3413 seq_puts(m, "\n");
3417 3414
3418 /* Current number of commands waiting for a device. */ 3415 /* Current number of commands waiting for a device. */
3419 seq_printf(m, " Command Queue Pending:"); 3416 seq_puts(m, " Command Queue Pending:");
3420 for (i = 0; i <= ASC_MAX_TID; i++) { 3417 for (i = 0; i <= ASC_MAX_TID; i++) {
3421 if ((chip_scsi_id == i) || 3418 if ((chip_scsi_id == i) ||
3422 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { 3419 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
@@ -3424,10 +3421,10 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
3424 } 3421 }
3425 seq_printf(m, " %X:%u", i, v->cur_dvc_qng[i]); 3422 seq_printf(m, " %X:%u", i, v->cur_dvc_qng[i]);
3426 } 3423 }
3427 seq_printf(m, "\n"); 3424 seq_puts(m, "\n");
3428 3425
3429 /* Current limit on number of commands that can be sent to a device. */ 3426 /* Current limit on number of commands that can be sent to a device. */
3430 seq_printf(m, " Command Queue Limit:"); 3427 seq_puts(m, " Command Queue Limit:");
3431 for (i = 0; i <= ASC_MAX_TID; i++) { 3428 for (i = 0; i <= ASC_MAX_TID; i++) {
3432 if ((chip_scsi_id == i) || 3429 if ((chip_scsi_id == i) ||
3433 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { 3430 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
@@ -3435,10 +3432,10 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
3435 } 3432 }
3436 seq_printf(m, " %X:%u", i, v->max_dvc_qng[i]); 3433 seq_printf(m, " %X:%u", i, v->max_dvc_qng[i]);
3437 } 3434 }
3438 seq_printf(m, "\n"); 3435 seq_puts(m, "\n");
3439 3436
3440 /* Indicate whether the device has returned queue full status. */ 3437 /* Indicate whether the device has returned queue full status. */
3441 seq_printf(m, " Command Queue Full:"); 3438 seq_puts(m, " Command Queue Full:");
3442 for (i = 0; i <= ASC_MAX_TID; i++) { 3439 for (i = 0; i <= ASC_MAX_TID; i++) {
3443 if ((chip_scsi_id == i) || 3440 if ((chip_scsi_id == i) ||
3444 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { 3441 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
@@ -3450,9 +3447,9 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
3450 else 3447 else
3451 seq_printf(m, " %X:N", i); 3448 seq_printf(m, " %X:N", i);
3452 } 3449 }
3453 seq_printf(m, "\n"); 3450 seq_puts(m, "\n");
3454 3451
3455 seq_printf(m, " Synchronous Transfer:"); 3452 seq_puts(m, " Synchronous Transfer:");
3456 for (i = 0; i <= ASC_MAX_TID; i++) { 3453 for (i = 0; i <= ASC_MAX_TID; i++) {
3457 if ((chip_scsi_id == i) || 3454 if ((chip_scsi_id == i) ||
3458 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { 3455 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
@@ -3462,7 +3459,7 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
3462 i, 3459 i,
3463 (v->sdtr_done & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3460 (v->sdtr_done & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3464 } 3461 }
3465 seq_printf(m, "\n"); 3462 seq_puts(m, "\n");
3466 3463
3467 for (i = 0; i <= ASC_MAX_TID; i++) { 3464 for (i = 0; i <= ASC_MAX_TID; i++) {
3468 uchar syn_period_ix; 3465 uchar syn_period_ix;
@@ -3476,7 +3473,7 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
3476 seq_printf(m, " %X:", i); 3473 seq_printf(m, " %X:", i);
3477 3474
3478 if ((boardp->sdtr_data[i] & ASC_SYN_MAX_OFFSET) == 0) { 3475 if ((boardp->sdtr_data[i] & ASC_SYN_MAX_OFFSET) == 0) {
3479 seq_printf(m, " Asynchronous"); 3476 seq_puts(m, " Asynchronous");
3480 } else { 3477 } else {
3481 syn_period_ix = 3478 syn_period_ix =
3482 (boardp->sdtr_data[i] >> 4) & (v->max_sdtr_index - 3479 (boardp->sdtr_data[i] >> 4) & (v->max_sdtr_index -
@@ -3494,16 +3491,15 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
3494 } 3491 }
3495 3492
3496 if ((v->sdtr_done & ADV_TID_TO_TIDMASK(i)) == 0) { 3493 if ((v->sdtr_done & ADV_TID_TO_TIDMASK(i)) == 0) {
3497 seq_printf(m, "*\n"); 3494 seq_puts(m, "*\n");
3498 renegotiate = 1; 3495 renegotiate = 1;
3499 } else { 3496 } else {
3500 seq_printf(m, "\n"); 3497 seq_puts(m, "\n");
3501 } 3498 }
3502 } 3499 }
3503 3500
3504 if (renegotiate) { 3501 if (renegotiate) {
3505 seq_printf(m, 3502 seq_puts(m, " * = Re-negotiation pending before next command.\n");
3506 " * = Re-negotiation pending before next command.\n");
3507 } 3503 }
3508} 3504}
3509 3505
@@ -3548,7 +3544,7 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
3548 c->mcode_date, c->mcode_version); 3544 c->mcode_date, c->mcode_version);
3549 3545
3550 AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able); 3546 AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able);
3551 seq_printf(m, " Queuing Enabled:"); 3547 seq_puts(m, " Queuing Enabled:");
3552 for (i = 0; i <= ADV_MAX_TID; i++) { 3548 for (i = 0; i <= ADV_MAX_TID; i++) {
3553 if ((chip_scsi_id == i) || 3549 if ((chip_scsi_id == i) ||
3554 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { 3550 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
@@ -3559,9 +3555,9 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
3559 i, 3555 i,
3560 (tagqng_able & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3556 (tagqng_able & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3561 } 3557 }
3562 seq_printf(m, "\n"); 3558 seq_puts(m, "\n");
3563 3559
3564 seq_printf(m, " Queue Limit:"); 3560 seq_puts(m, " Queue Limit:");
3565 for (i = 0; i <= ADV_MAX_TID; i++) { 3561 for (i = 0; i <= ADV_MAX_TID; i++) {
3566 if ((chip_scsi_id == i) || 3562 if ((chip_scsi_id == i) ||
3567 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { 3563 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
@@ -3573,9 +3569,9 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
3573 3569
3574 seq_printf(m, " %X:%d", i, lrambyte); 3570 seq_printf(m, " %X:%d", i, lrambyte);
3575 } 3571 }
3576 seq_printf(m, "\n"); 3572 seq_puts(m, "\n");
3577 3573
3578 seq_printf(m, " Command Pending:"); 3574 seq_puts(m, " Command Pending:");
3579 for (i = 0; i <= ADV_MAX_TID; i++) { 3575 for (i = 0; i <= ADV_MAX_TID; i++) {
3580 if ((chip_scsi_id == i) || 3576 if ((chip_scsi_id == i) ||
3581 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { 3577 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
@@ -3587,10 +3583,10 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
3587 3583
3588 seq_printf(m, " %X:%d", i, lrambyte); 3584 seq_printf(m, " %X:%d", i, lrambyte);
3589 } 3585 }
3590 seq_printf(m, "\n"); 3586 seq_puts(m, "\n");
3591 3587
3592 AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able); 3588 AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able);
3593 seq_printf(m, " Wide Enabled:"); 3589 seq_puts(m, " Wide Enabled:");
3594 for (i = 0; i <= ADV_MAX_TID; i++) { 3590 for (i = 0; i <= ADV_MAX_TID; i++) {
3595 if ((chip_scsi_id == i) || 3591 if ((chip_scsi_id == i) ||
3596 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { 3592 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
@@ -3601,10 +3597,10 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
3601 i, 3597 i,
3602 (wdtr_able & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3598 (wdtr_able & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3603 } 3599 }
3604 seq_printf(m, "\n"); 3600 seq_puts(m, "\n");
3605 3601
3606 AdvReadWordLram(iop_base, ASC_MC_WDTR_DONE, wdtr_done); 3602 AdvReadWordLram(iop_base, ASC_MC_WDTR_DONE, wdtr_done);
3607 seq_printf(m, " Transfer Bit Width:"); 3603 seq_puts(m, " Transfer Bit Width:");
3608 for (i = 0; i <= ADV_MAX_TID; i++) { 3604 for (i = 0; i <= ADV_MAX_TID; i++) {
3609 if ((chip_scsi_id == i) || 3605 if ((chip_scsi_id == i) ||
3610 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { 3606 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
@@ -3620,14 +3616,14 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
3620 3616
3621 if ((wdtr_able & ADV_TID_TO_TIDMASK(i)) && 3617 if ((wdtr_able & ADV_TID_TO_TIDMASK(i)) &&
3622 (wdtr_done & ADV_TID_TO_TIDMASK(i)) == 0) { 3618 (wdtr_done & ADV_TID_TO_TIDMASK(i)) == 0) {
3623 seq_printf(m, "*"); 3619 seq_puts(m, "*");
3624 renegotiate = 1; 3620 renegotiate = 1;
3625 } 3621 }
3626 } 3622 }
3627 seq_printf(m, "\n"); 3623 seq_puts(m, "\n");
3628 3624
3629 AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able); 3625 AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able);
3630 seq_printf(m, " Synchronous Enabled:"); 3626 seq_puts(m, " Synchronous Enabled:");
3631 for (i = 0; i <= ADV_MAX_TID; i++) { 3627 for (i = 0; i <= ADV_MAX_TID; i++) {
3632 if ((chip_scsi_id == i) || 3628 if ((chip_scsi_id == i) ||
3633 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { 3629 ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
@@ -3638,7 +3634,7 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
3638 i, 3634 i,
3639 (sdtr_able & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); 3635 (sdtr_able & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
3640 } 3636 }
3641 seq_printf(m, "\n"); 3637 seq_puts(m, "\n");
3642 3638
3643 AdvReadWordLram(iop_base, ASC_MC_SDTR_DONE, sdtr_done); 3639 AdvReadWordLram(iop_base, ASC_MC_SDTR_DONE, sdtr_done);
3644 for (i = 0; i <= ADV_MAX_TID; i++) { 3640 for (i = 0; i <= ADV_MAX_TID; i++) {
@@ -3657,14 +3653,14 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
3657 seq_printf(m, " %X:", i); 3653 seq_printf(m, " %X:", i);
3658 3654
3659 if ((lramword & 0x1F) == 0) { /* Check for REQ/ACK Offset 0. */ 3655 if ((lramword & 0x1F) == 0) { /* Check for REQ/ACK Offset 0. */
3660 seq_printf(m, " Asynchronous"); 3656 seq_puts(m, " Asynchronous");
3661 } else { 3657 } else {
3662 seq_printf(m, " Transfer Period Factor: "); 3658 seq_puts(m, " Transfer Period Factor: ");
3663 3659
3664 if ((lramword & 0x1F00) == 0x1100) { /* 80 Mhz */ 3660 if ((lramword & 0x1F00) == 0x1100) { /* 80 Mhz */
3665 seq_printf(m, "9 (80.0 Mhz),"); 3661 seq_puts(m, "9 (80.0 Mhz),");
3666 } else if ((lramword & 0x1F00) == 0x1000) { /* 40 Mhz */ 3662 } else if ((lramword & 0x1F00) == 0x1000) { /* 40 Mhz */
3667 seq_printf(m, "10 (40.0 Mhz),"); 3663 seq_puts(m, "10 (40.0 Mhz),");
3668 } else { /* 20 Mhz or below. */ 3664 } else { /* 20 Mhz or below. */
3669 3665
3670 period = (((lramword >> 8) * 25) + 50) / 4; 3666 period = (((lramword >> 8) * 25) + 50) / 4;
@@ -3684,16 +3680,15 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
3684 } 3680 }
3685 3681
3686 if ((sdtr_done & ADV_TID_TO_TIDMASK(i)) == 0) { 3682 if ((sdtr_done & ADV_TID_TO_TIDMASK(i)) == 0) {
3687 seq_printf(m, "*\n"); 3683 seq_puts(m, "*\n");
3688 renegotiate = 1; 3684 renegotiate = 1;
3689 } else { 3685 } else {
3690 seq_printf(m, "\n"); 3686 seq_puts(m, "\n");
3691 } 3687 }
3692 } 3688 }
3693 3689
3694 if (renegotiate) { 3690 if (renegotiate) {
3695 seq_printf(m, 3691 seq_puts(m, " * = Re-negotiation pending before next command.\n");
3696 " * = Re-negotiation pending before next command.\n");
3697 } 3692 }
3698} 3693}
3699 3694