diff options
Diffstat (limited to 'drivers/scsi/arm/fas216.c')
-rw-r--r-- | drivers/scsi/arm/fas216.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c index 737554c37d9e..b46a6f6c0eb3 100644 --- a/drivers/scsi/arm/fas216.c +++ b/drivers/scsi/arm/fas216.c | |||
@@ -2958,9 +2958,9 @@ void fas216_release(struct Scsi_Host *host) | |||
2958 | queue_free(&info->queues.issue); | 2958 | queue_free(&info->queues.issue); |
2959 | } | 2959 | } |
2960 | 2960 | ||
2961 | int fas216_print_host(FAS216_Info *info, char *buffer) | 2961 | void fas216_print_host(FAS216_Info *info, struct seq_file *m) |
2962 | { | 2962 | { |
2963 | return sprintf(buffer, | 2963 | seq_printf(m, |
2964 | "\n" | 2964 | "\n" |
2965 | "Chip : %s\n" | 2965 | "Chip : %s\n" |
2966 | " Address: 0x%p\n" | 2966 | " Address: 0x%p\n" |
@@ -2970,11 +2970,9 @@ int fas216_print_host(FAS216_Info *info, char *buffer) | |||
2970 | info->scsi.irq, info->scsi.dma); | 2970 | info->scsi.irq, info->scsi.dma); |
2971 | } | 2971 | } |
2972 | 2972 | ||
2973 | int fas216_print_stats(FAS216_Info *info, char *buffer) | 2973 | void fas216_print_stats(FAS216_Info *info, struct seq_file *m) |
2974 | { | 2974 | { |
2975 | char *p = buffer; | 2975 | seq_printf(m, "\n" |
2976 | |||
2977 | p += sprintf(p, "\n" | ||
2978 | "Command Statistics:\n" | 2976 | "Command Statistics:\n" |
2979 | " Queued : %u\n" | 2977 | " Queued : %u\n" |
2980 | " Issued : %u\n" | 2978 | " Issued : %u\n" |
@@ -2991,38 +2989,33 @@ int fas216_print_stats(FAS216_Info *info, char *buffer) | |||
2991 | info->stats.writes, info->stats.miscs, | 2989 | info->stats.writes, info->stats.miscs, |
2992 | info->stats.disconnects, info->stats.aborts, | 2990 | info->stats.disconnects, info->stats.aborts, |
2993 | info->stats.bus_resets, info->stats.host_resets); | 2991 | info->stats.bus_resets, info->stats.host_resets); |
2994 | |||
2995 | return p - buffer; | ||
2996 | } | 2992 | } |
2997 | 2993 | ||
2998 | int fas216_print_devices(FAS216_Info *info, char *buffer) | 2994 | void fas216_print_devices(FAS216_Info *info, struct seq_file *m) |
2999 | { | 2995 | { |
3000 | struct fas216_device *dev; | 2996 | struct fas216_device *dev; |
3001 | struct scsi_device *scd; | 2997 | struct scsi_device *scd; |
3002 | char *p = buffer; | ||
3003 | 2998 | ||
3004 | p += sprintf(p, "Device/Lun TaggedQ Parity Sync\n"); | 2999 | seq_printf(m, "Device/Lun TaggedQ Parity Sync\n"); |
3005 | 3000 | ||
3006 | shost_for_each_device(scd, info->host) { | 3001 | shost_for_each_device(scd, info->host) { |
3007 | dev = &info->device[scd->id]; | 3002 | dev = &info->device[scd->id]; |
3008 | p += sprintf(p, " %d/%d ", scd->id, scd->lun); | 3003 | seq_printf(m, " %d/%d ", scd->id, scd->lun); |
3009 | if (scd->tagged_supported) | 3004 | if (scd->tagged_supported) |
3010 | p += sprintf(p, "%3sabled(%3d) ", | 3005 | seq_printf(m, "%3sabled(%3d) ", |
3011 | scd->simple_tags ? "en" : "dis", | 3006 | scd->simple_tags ? "en" : "dis", |
3012 | scd->current_tag); | 3007 | scd->current_tag); |
3013 | else | 3008 | else |
3014 | p += sprintf(p, "unsupported "); | 3009 | seq_printf(m, "unsupported "); |
3015 | 3010 | ||
3016 | p += sprintf(p, "%3sabled ", dev->parity_enabled ? "en" : "dis"); | 3011 | seq_printf(m, "%3sabled ", dev->parity_enabled ? "en" : "dis"); |
3017 | 3012 | ||
3018 | if (dev->sof) | 3013 | if (dev->sof) |
3019 | p += sprintf(p, "offset %d, %d ns\n", | 3014 | seq_printf(m, "offset %d, %d ns\n", |
3020 | dev->sof, dev->period * 4); | 3015 | dev->sof, dev->period * 4); |
3021 | else | 3016 | else |
3022 | p += sprintf(p, "async\n"); | 3017 | seq_printf(m, "async\n"); |
3023 | } | 3018 | } |
3024 | |||
3025 | return p - buffer; | ||
3026 | } | 3019 | } |
3027 | 3020 | ||
3028 | EXPORT_SYMBOL(fas216_init); | 3021 | EXPORT_SYMBOL(fas216_init); |