diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 22:52:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 22:52:57 -0400 |
commit | 426048313dfa7d65dbd2379b1665755511f9544f (patch) | |
tree | dc727b9e41eb3d9dfe8e68f14b027c776d8aba98 /drivers/scsi/bfa/bfa_ioc_ct.c | |
parent | 2a56d2220284b0e4dd8569fa475d7053f1c40a63 (diff) | |
parent | 7ad20aa9d39a525542b0840ac38bfc77be831e19 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (60 commits)
[SCSI] lpfc 8.3.24: Extend BSG infrastructure and add link diagnostics
[SCSI] lpfc 8.3.24: Add resource extent support
[SCSI] lpfc 8.3.24: Add request-firmware support
[SCSI] lpfc 8.3.24: Add SR-IOV control
[SCSI] lpfc 8.3.24: Extended hardware support and support dump images
[SCSI] lpfc 8.3.24: Miscellaneous Fixes and Corrections
[SCSI] libsas: Add option for SATA soft reset
[SCSI] libsas: check dev->gone before submitting sata i/o
[SCSI] libsas: fix/amend device gone notification in sas_deform_port()
[SCSI] MAINTAINERS update for SCSI (new email address)
[SCSI] Fix Ultrastor asm snippet
[SCSI] osst: fix warning
[SCSI] osst: wrong index used in inner loop
[SCSI] aic94xx: world-writable sysfs update_bios file
[SCSI] MAINTAINERS: Add drivers/target/ entry
[SCSI] target: Convert TASK_ATTR to scsi_tcq.h definitions
[SCSI] target: Convert REPORT_LUNs to use int_to_scsilun
[SCSI] target: Fix task->task_execute_queue=1 clear bug + LUN_RESET OOPs
[SCSI] target: Fix bug with task_sg chained transport_free_dev_tasks release
[SCSI] target: Fix interrupt context bug with stats_lock and core_tmr_alloc_req
...
Diffstat (limited to 'drivers/scsi/bfa/bfa_ioc_ct.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc_ct.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc_ct.c b/drivers/scsi/bfa/bfa_ioc_ct.c index 008d129ddfcd..93612520f0d2 100644 --- a/drivers/scsi/bfa/bfa_ioc_ct.c +++ b/drivers/scsi/bfa/bfa_ioc_ct.c | |||
@@ -41,6 +41,7 @@ static void bfa_ioc_ct_map_port(struct bfa_ioc_s *ioc); | |||
41 | static void bfa_ioc_ct_isr_mode_set(struct bfa_ioc_s *ioc, bfa_boolean_t msix); | 41 | static void bfa_ioc_ct_isr_mode_set(struct bfa_ioc_s *ioc, bfa_boolean_t msix); |
42 | static void bfa_ioc_ct_notify_fail(struct bfa_ioc_s *ioc); | 42 | static void bfa_ioc_ct_notify_fail(struct bfa_ioc_s *ioc); |
43 | static void bfa_ioc_ct_ownership_reset(struct bfa_ioc_s *ioc); | 43 | static void bfa_ioc_ct_ownership_reset(struct bfa_ioc_s *ioc); |
44 | static bfa_boolean_t bfa_ioc_ct_sync_start(struct bfa_ioc_s *ioc); | ||
44 | static void bfa_ioc_ct_sync_join(struct bfa_ioc_s *ioc); | 45 | static void bfa_ioc_ct_sync_join(struct bfa_ioc_s *ioc); |
45 | static void bfa_ioc_ct_sync_leave(struct bfa_ioc_s *ioc); | 46 | static void bfa_ioc_ct_sync_leave(struct bfa_ioc_s *ioc); |
46 | static void bfa_ioc_ct_sync_ack(struct bfa_ioc_s *ioc); | 47 | static void bfa_ioc_ct_sync_ack(struct bfa_ioc_s *ioc); |
@@ -62,6 +63,7 @@ bfa_ioc_set_ct_hwif(struct bfa_ioc_s *ioc) | |||
62 | hwif_ct.ioc_isr_mode_set = bfa_ioc_ct_isr_mode_set; | 63 | hwif_ct.ioc_isr_mode_set = bfa_ioc_ct_isr_mode_set; |
63 | hwif_ct.ioc_notify_fail = bfa_ioc_ct_notify_fail; | 64 | hwif_ct.ioc_notify_fail = bfa_ioc_ct_notify_fail; |
64 | hwif_ct.ioc_ownership_reset = bfa_ioc_ct_ownership_reset; | 65 | hwif_ct.ioc_ownership_reset = bfa_ioc_ct_ownership_reset; |
66 | hwif_ct.ioc_sync_start = bfa_ioc_ct_sync_start; | ||
65 | hwif_ct.ioc_sync_join = bfa_ioc_ct_sync_join; | 67 | hwif_ct.ioc_sync_join = bfa_ioc_ct_sync_join; |
66 | hwif_ct.ioc_sync_leave = bfa_ioc_ct_sync_leave; | 68 | hwif_ct.ioc_sync_leave = bfa_ioc_ct_sync_leave; |
67 | hwif_ct.ioc_sync_ack = bfa_ioc_ct_sync_ack; | 69 | hwif_ct.ioc_sync_ack = bfa_ioc_ct_sync_ack; |
@@ -351,6 +353,30 @@ bfa_ioc_ct_ownership_reset(struct bfa_ioc_s *ioc) | |||
351 | writel(1, ioc->ioc_regs.ioc_sem_reg); | 353 | writel(1, ioc->ioc_regs.ioc_sem_reg); |
352 | } | 354 | } |
353 | 355 | ||
356 | static bfa_boolean_t | ||
357 | bfa_ioc_ct_sync_start(struct bfa_ioc_s *ioc) | ||
358 | { | ||
359 | uint32_t r32 = readl(ioc->ioc_regs.ioc_fail_sync); | ||
360 | uint32_t sync_reqd = bfa_ioc_ct_get_sync_reqd(r32); | ||
361 | |||
362 | /* | ||
363 | * Driver load time. If the sync required bit for this PCI fn | ||
364 | * is set, it is due to an unclean exit by the driver for this | ||
365 | * PCI fn in the previous incarnation. Whoever comes here first | ||
366 | * should clean it up, no matter which PCI fn. | ||
367 | */ | ||
368 | |||
369 | if (sync_reqd & bfa_ioc_ct_sync_pos(ioc)) { | ||
370 | writel(0, ioc->ioc_regs.ioc_fail_sync); | ||
371 | writel(1, ioc->ioc_regs.ioc_usage_reg); | ||
372 | writel(BFI_IOC_UNINIT, ioc->ioc_regs.ioc_fwstate); | ||
373 | writel(BFI_IOC_UNINIT, ioc->ioc_regs.alt_ioc_fwstate); | ||
374 | return BFA_TRUE; | ||
375 | } | ||
376 | |||
377 | return bfa_ioc_ct_sync_complete(ioc); | ||
378 | } | ||
379 | |||
354 | /* | 380 | /* |
355 | * Synchronized IOC failure processing routines | 381 | * Synchronized IOC failure processing routines |
356 | */ | 382 | */ |