diff options
author | Maggie Zhang <xmzhang@brocade.com> | 2010-12-09 22:12:32 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 13:32:56 -0500 |
commit | f16a17507b09e10e0cccc4d675ccbfe030d51ef1 (patch) | |
tree | 4ead59bd8bfbd06f22dd18040b713fca998e1336 /drivers/scsi/bfa/bfa_svc.c | |
parent | f314878ab95d4802ddde066096f7b30087cea7ba (diff) |
[SCSI] bfa: remove all OS wrappers
Remove OS wrapper functions/macros, and as a result remove bfa_os_inc.h.
Signed-off-by: Maggie Zhang <xmzhang@brocade.com>
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_svc.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_svc.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c index c9192869c0fe..1d5432b42a90 100644 --- a/drivers/scsi/bfa/bfa_svc.c +++ b/drivers/scsi/bfa/bfa_svc.c | |||
@@ -15,11 +15,10 @@ | |||
15 | * General Public License for more details. | 15 | * General Public License for more details. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "bfa_os_inc.h" | 18 | #include "bfad_drv.h" |
19 | #include "bfa_plog.h" | 19 | #include "bfa_plog.h" |
20 | #include "bfa_cs.h" | 20 | #include "bfa_cs.h" |
21 | #include "bfa_modules.h" | 21 | #include "bfa_modules.h" |
22 | #include "bfad_drv.h" | ||
23 | 22 | ||
24 | BFA_TRC_FILE(HAL, FCXP); | 23 | BFA_TRC_FILE(HAL, FCXP); |
25 | BFA_MODULE(fcxp); | 24 | BFA_MODULE(fcxp); |
@@ -286,6 +285,18 @@ plkd_validate_logrec(struct bfa_plog_rec_s *pl_rec) | |||
286 | return 0; | 285 | return 0; |
287 | } | 286 | } |
288 | 287 | ||
288 | static u64 | ||
289 | bfa_get_log_time(void) | ||
290 | { | ||
291 | u64 system_time = 0; | ||
292 | struct timeval tv; | ||
293 | do_gettimeofday(&tv); | ||
294 | |||
295 | /* We are interested in seconds only. */ | ||
296 | system_time = tv.tv_sec; | ||
297 | return system_time; | ||
298 | } | ||
299 | |||
289 | static void | 300 | static void |
290 | bfa_plog_add(struct bfa_plog_s *plog, struct bfa_plog_rec_s *pl_rec) | 301 | bfa_plog_add(struct bfa_plog_s *plog, struct bfa_plog_rec_s *pl_rec) |
291 | { | 302 | { |
@@ -306,7 +317,7 @@ bfa_plog_add(struct bfa_plog_s *plog, struct bfa_plog_rec_s *pl_rec) | |||
306 | 317 | ||
307 | memcpy(pl_recp, pl_rec, sizeof(struct bfa_plog_rec_s)); | 318 | memcpy(pl_recp, pl_rec, sizeof(struct bfa_plog_rec_s)); |
308 | 319 | ||
309 | pl_recp->tv = bfa_os_get_log_time(); | 320 | pl_recp->tv = bfa_get_log_time(); |
310 | BFA_PL_LOG_REC_INCR(plog->tail); | 321 | BFA_PL_LOG_REC_INCR(plog->tail); |
311 | 322 | ||
312 | if (plog->head == plog->tail) | 323 | if (plog->head == plog->tail) |
@@ -2728,7 +2739,7 @@ bfa_fcport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
2728 | struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); | 2739 | struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); |
2729 | struct bfa_port_cfg_s *port_cfg = &fcport->cfg; | 2740 | struct bfa_port_cfg_s *port_cfg = &fcport->cfg; |
2730 | struct bfa_fcport_ln_s *ln = &fcport->ln; | 2741 | struct bfa_fcport_ln_s *ln = &fcport->ln; |
2731 | struct bfa_timeval_s tv; | 2742 | struct timeval tv; |
2732 | 2743 | ||
2733 | memset(fcport, 0, sizeof(struct bfa_fcport_s)); | 2744 | memset(fcport, 0, sizeof(struct bfa_fcport_s)); |
2734 | fcport->bfa = bfa; | 2745 | fcport->bfa = bfa; |
@@ -2742,7 +2753,7 @@ bfa_fcport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
2742 | /* | 2753 | /* |
2743 | * initialize time stamp for stats reset | 2754 | * initialize time stamp for stats reset |
2744 | */ | 2755 | */ |
2745 | bfa_os_gettimeofday(&tv); | 2756 | do_gettimeofday(&tv); |
2746 | fcport->stats_reset_time = tv.tv_sec; | 2757 | fcport->stats_reset_time = tv.tv_sec; |
2747 | 2758 | ||
2748 | /* | 2759 | /* |
@@ -2967,7 +2978,7 @@ bfa_fcport_fcoe_stats_swap(struct bfa_fcoe_stats_s *d, | |||
2967 | 2978 | ||
2968 | for (i = 0; i < ((sizeof(struct bfa_fcoe_stats_s))/sizeof(u32)); | 2979 | for (i = 0; i < ((sizeof(struct bfa_fcoe_stats_s))/sizeof(u32)); |
2969 | i = i + 2) { | 2980 | i = i + 2) { |
2970 | #ifdef __BIGENDIAN | 2981 | #ifdef __BIG_ENDIAN |
2971 | dip[i] = be32_to_cpu(sip[i]); | 2982 | dip[i] = be32_to_cpu(sip[i]); |
2972 | dip[i + 1] = be32_to_cpu(sip[i + 1]); | 2983 | dip[i + 1] = be32_to_cpu(sip[i + 1]); |
2973 | #else | 2984 | #else |
@@ -2984,7 +2995,7 @@ __bfa_cb_fcport_stats_get(void *cbarg, bfa_boolean_t complete) | |||
2984 | 2995 | ||
2985 | if (complete) { | 2996 | if (complete) { |
2986 | if (fcport->stats_status == BFA_STATUS_OK) { | 2997 | if (fcport->stats_status == BFA_STATUS_OK) { |
2987 | struct bfa_timeval_s tv; | 2998 | struct timeval tv; |
2988 | 2999 | ||
2989 | /* Swap FC QoS or FCoE stats */ | 3000 | /* Swap FC QoS or FCoE stats */ |
2990 | if (bfa_ioc_get_fcmode(&fcport->bfa->ioc)) { | 3001 | if (bfa_ioc_get_fcmode(&fcport->bfa->ioc)) { |
@@ -2996,7 +3007,7 @@ __bfa_cb_fcport_stats_get(void *cbarg, bfa_boolean_t complete) | |||
2996 | &fcport->stats_ret->fcoe, | 3007 | &fcport->stats_ret->fcoe, |
2997 | &fcport->stats->fcoe); | 3008 | &fcport->stats->fcoe); |
2998 | 3009 | ||
2999 | bfa_os_gettimeofday(&tv); | 3010 | do_gettimeofday(&tv); |
3000 | fcport->stats_ret->fcoe.secs_reset = | 3011 | fcport->stats_ret->fcoe.secs_reset = |
3001 | tv.tv_sec - fcport->stats_reset_time; | 3012 | tv.tv_sec - fcport->stats_reset_time; |
3002 | } | 3013 | } |
@@ -3055,12 +3066,12 @@ __bfa_cb_fcport_stats_clr(void *cbarg, bfa_boolean_t complete) | |||
3055 | struct bfa_fcport_s *fcport = cbarg; | 3066 | struct bfa_fcport_s *fcport = cbarg; |
3056 | 3067 | ||
3057 | if (complete) { | 3068 | if (complete) { |
3058 | struct bfa_timeval_s tv; | 3069 | struct timeval tv; |
3059 | 3070 | ||
3060 | /* | 3071 | /* |
3061 | * re-initialize time stamp for stats reset | 3072 | * re-initialize time stamp for stats reset |
3062 | */ | 3073 | */ |
3063 | bfa_os_gettimeofday(&tv); | 3074 | do_gettimeofday(&tv); |
3064 | fcport->stats_reset_time = tv.tv_sec; | 3075 | fcport->stats_reset_time = tv.tv_sec; |
3065 | 3076 | ||
3066 | fcport->stats_cbfn(fcport->stats_cbarg, fcport->stats_status); | 3077 | fcport->stats_cbfn(fcport->stats_cbarg, fcport->stats_status); |
@@ -4931,10 +4942,6 @@ bfa_uf_start(struct bfa_s *bfa) | |||
4931 | } | 4942 | } |
4932 | 4943 | ||
4933 | /* | 4944 | /* |
4934 | * hal_uf_api | ||
4935 | */ | ||
4936 | |||
4937 | /* | ||
4938 | * Register handler for all unsolicted recieve frames. | 4945 | * Register handler for all unsolicted recieve frames. |
4939 | * | 4946 | * |
4940 | * @param[in] bfa BFA instance | 4947 | * @param[in] bfa BFA instance |