Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251186
b: refs/heads/master
c: bf2e2e6
h: refs/heads/master
v: v3
  • Loading branch information
Stephen M. Cameron authored and Jens Axboe committed May 6, 2011
1 parent b1786f4 commit 0015d43
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e28601fdfdec75ce8f6aaaf58540fdd0883fb58
refs/heads/master: bf2e2e6b87ae38fab460a36abfe272d99ae8be49
25 changes: 14 additions & 11 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -4384,7 +4384,7 @@ static __devinit int cciss_message(struct pci_dev *pdev, unsigned char opcode, u
#define cciss_noop(p) cciss_message(p, 3, 0)

static int cciss_controller_hard_reset(struct pci_dev *pdev,
void * __iomem vaddr, bool use_doorbell)
void * __iomem vaddr, u32 use_doorbell)
{
u16 pmcsr;
int pos;
Expand All @@ -4395,7 +4395,7 @@ static int cciss_controller_hard_reset(struct pci_dev *pdev,
* other way using the doorbell register.
*/
dev_info(&pdev->dev, "using doorbell to reset controller\n");
writel(DOORBELL_CTLR_RESET, vaddr + SA5_DOORBELL);
writel(use_doorbell, vaddr + SA5_DOORBELL);
msleep(1000);
} else { /* Try to do it the PCI power state way */

Expand Down Expand Up @@ -4499,7 +4499,7 @@ static __devinit int cciss_kdump_hard_reset_controller(struct pci_dev *pdev)
u32 misc_fw_support;
int rc;
CfgTable_struct __iomem *cfgtable;
bool use_doorbell;
u32 use_doorbell;
u32 board_id;
u16 command_register;

Expand Down Expand Up @@ -4560,15 +4560,18 @@ static __devinit int cciss_kdump_hard_reset_controller(struct pci_dev *pdev)
if (rc)
goto unmap_vaddr;

/* If reset via doorbell register is supported, use that. */
misc_fw_support = readl(&cfgtable->misc_fw_support);
use_doorbell = misc_fw_support & MISC_FW_DOORBELL_RESET;

/* The doorbell reset seems to cause lockups on some Smart
* Arrays (e.g. P410, P410i, maybe others). Until this is
* fixed or at least isolated, avoid the doorbell reset.
/* If reset via doorbell register is supported, use that.
* There are two such methods. Favor the newest method.
*/
use_doorbell = 0;
misc_fw_support = readl(&cfgtable->misc_fw_support);
use_doorbell = misc_fw_support & MISC_FW_DOORBELL_RESET2;
if (use_doorbell) {
use_doorbell = DOORBELL_CTLR_RESET2;
} else {
use_doorbell = misc_fw_support & MISC_FW_DOORBELL_RESET;
if (use_doorbell)
use_doorbell = DOORBELL_CTLR_RESET;
}

rc = cciss_controller_hard_reset(pdev, vaddr, use_doorbell);
if (rc)
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/block/cciss_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#define CFGTBL_ChangeReq 0x00000001l
#define CFGTBL_AccCmds 0x00000001l
#define DOORBELL_CTLR_RESET 0x00000004l
#define DOORBELL_CTLR_RESET2 0x00000020l

#define CFGTBL_Trans_Simple 0x00000002l
#define CFGTBL_Trans_Performant 0x00000004l
Expand Down Expand Up @@ -243,6 +244,7 @@ typedef struct _CfgTable_struct {
u8 reserved[0x78 - 0x58];
u32 misc_fw_support; /* offset 0x78 */
#define MISC_FW_DOORBELL_RESET (0x02)
#define MISC_FW_DOORBELL_RESET2 (0x10)
u8 driver_version[32];
} CfgTable_struct;

Expand Down

0 comments on commit 0015d43

Please sign in to comment.