Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 292178 Details for
Bug 230717
kernel panic with ciss driver upon kdump/kexec execution w/DLx85 platforms
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
kdump support for cciss
p00001_cciss_kdump_rhel5u2.patch (text/plain), 9.86 KB, created by
Mike Miller (OS Dev)
on 2008-01-18 16:58:53 UTC
(
hide
)
Description:
kdump support for cciss
Filename:
MIME Type:
Creator:
Mike Miller (OS Dev)
Created:
2008-01-18 16:58:53 UTC
Size:
9.86 KB
patch
obsolete
> cciss.c | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ cciss_cmd.h | 25 ++++++++++ > cciss_scsi.c | 4 - > 3 files changed, 153 insertions(+), 16 deletions(-) > >diff -urNp linux-2.6.18.x86_64.orig/drivers/block/cciss.c linux-2.6.18.x86_64/drivers/block/cciss.c >--- linux-2.6.18.x86_64.orig/drivers/block/cciss.c 2008-01-18 09:19:22.000000000 -0600 >+++ linux-2.6.18.x86_64/drivers/block/cciss.c 2008-01-18 09:28:46.000000000 -0600 >@@ -166,8 +166,10 @@ static int sendcmd_withirq(__u8 cmd, int > unsigned int use_unit_num, unsigned int log_unit, > __u8 page_code, int cmd_type); > >-static void fail_all_cmds(unsigned long ctlr); >+static void fail_all_cmds(unsigned long); > static void cciss_shutdown(struct pci_dev *); >+static void print_cmd(CommandList_struct *); >+static int cciss_reset_controller(struct pci_dev *, int, ctlr_info_t *); > > #ifdef CONFIG_PROC_FS > static int cciss_proc_get_info(char *buffer, char **start, off_t offset, >@@ -1726,7 +1728,7 @@ static int fill_cmd(CommandList_struct * > case 0: /* ABORT message */ > c->Request.CDBLen = 12; > c->Request.Type.Attribute = ATTR_SIMPLE; >- c->Request.Type.Direction = XFER_WRITE; >+ c->Request.Type.Direction = XFER_NONE; > c->Request.Timeout = 0; > c->Request.CDB[0] = cmd; /* abort */ > c->Request.CDB[1] = 0; /* abort a command */ >@@ -1734,18 +1736,17 @@ static int fill_cmd(CommandList_struct * > memcpy(&c->Request.CDB[4], buff, 8); > break; > case 1: /* RESET message */ >- c->Request.CDBLen = 12; >+ c->Request.CDBLen = 16; > c->Request.Type.Attribute = ATTR_SIMPLE; >- c->Request.Type.Direction = XFER_WRITE; >+ c->Request.Type.Direction = XFER_NONE; > c->Request.Timeout = 0; > memset(&c->Request.CDB[0], 0, sizeof(c->Request.CDB)); > c->Request.CDB[0] = cmd; /* reset */ >- c->Request.CDB[1] = 0x04; /* reset a LUN */ > break; > case 3: /* No-Op message */ > c->Request.CDBLen = 1; > c->Request.Type.Attribute = ATTR_SIMPLE; >- c->Request.Type.Direction = XFER_WRITE; >+ c->Request.Type.Direction = XFER_NONE; > c->Request.Timeout = 0; > c->Request.CDB[0] = cmd; > break; >@@ -2054,11 +2055,18 @@ static int cciss_revalidate(struct gendi > static unsigned long pollcomplete(int ctlr) > { > unsigned long done; >- int i; >+ int i, timeout; > >- /* Wait (up to 20 seconds) for a command to complete */ >+ /* Wait (up to 20 seconds) for a command to complete >+ * under normal conditions. >+ * If reset_devices wait at least 60 seconds. It takes >+ * longer than advertised for the controller to become >+ * ready after a reset. I'd rather have a more dynamic >+ * method to determine if it's ready. >+ */ > >- for (i = 20 * HZ; i > 0; i--) { >+ timeout = reset_devices ? 60 * HZ : 20 * HZ; >+ for (i = timeout; i > 0; i--) { > done = hba[ctlr]->access.command_completed(hba[ctlr]); > if (done == FIFO_EMPTY) > schedule_timeout_uninterruptible(1); >@@ -2089,7 +2097,7 @@ static int add_sendcmd_reject(__u8 cmd, > > /* If it's not the scsi tape stuff doing error handling, (abort */ > /* or reset) then we don't expect anything weird. */ >- if (cmd != CCISS_RESET_MSG && cmd != CCISS_ABORT_MSG) { >+ if (cmd != CCISS_RESET_MSG && cmd != CCISS_ABORT_MSG && !reset_devices) { > #endif > printk(KERN_WARNING "cciss cciss%d: SendCmd " > "Invalid command list address returned! (%lx)\n", >@@ -2115,8 +2123,10 @@ static int add_sendcmd_reject(__u8 cmd, > return 1; > } > /* Save it for later */ >- srl->complete[srl->ncompletions] = complete; >- srl->ncompletions++; >+ if (!reset_devices) { >+ srl->complete[srl->ncompletions] = complete; >+ srl->ncompletions++; >+ } > #endif > return 0; > } >@@ -2148,7 +2158,7 @@ static int sendcmd(__u8 cmd, int ctlr, v > cmd_free(info_p, c, 1); > return status; > } >- resend_cmd1: >+resend_cmd1: > /* > * Disable interrupt > */ >@@ -2184,6 +2194,9 @@ static int sendcmd(__u8 cmd, int ctlr, v > #endif /* CCISS_DEBUG */ > > if (complete == 1) { >+#ifdef CCISS_DEBUG >+ print_cmd(c); >+#endif > printk(KERN_WARNING > "cciss cciss%d: SendCmd Timeout out, " > "No command list address returned!\n", ctlr); >@@ -2786,7 +2799,6 @@ static void __devinit cciss_interrupt_mo > (board_id == 0x40800E11) || > (board_id == 0x40820E11) || (board_id == 0x40830E11)) > goto default_int_mode; >- > if (pci_find_capability(pdev, PCI_CAP_ID_MSIX)) { > err = pci_enable_msix(pdev, cciss_msix_entries, 4); > if (!err) { >@@ -3189,6 +3201,95 @@ static void free_hba(int i) > } > > /* >+ * If were coming up in a crash kernel we need to reset >+ * the controller to clear any outstanding commands and >+ * get the card in a sane state. >+ */ >+static int cciss_reset_controller(struct pci_dev *pdev, >+ int c, ctlr_info_t *hba) >+{ >+ >+ int rc, i, err; >+ char reset_buf[4]; >+ CommandList_struct *cmd; >+ dma_addr_t cmd_dhandle; >+ ushort subsystem_vendor_id, subsystem_device_id; >+ __u32 board_id, scratchpad = 0; >+ u64bit temp64; >+ >+ /* Set up the buffer w/reset controller message. */ >+ memset(reset_buf, RESET_CONTROLLER, 4); >+ >+ /* Set up pci mappings so we can access registers. */ >+ hba->paddr = pci_resource_start(pdev, 0); >+ hba->vaddr = remap_pci_mem(hba->paddr, 0x250); >+ hba->pdev = pdev; >+ >+ /* Find our access methods for this board. */ >+ subsystem_vendor_id = pdev->subsystem_vendor; >+ subsystem_device_id = pdev->subsystem_device; >+ board_id = (((__u32) (subsystem_device_id << 16) & 0xffff0000) | >+ subsystem_vendor_id); >+ for (i = 0; i < ARRAY_SIZE(products); i++) { >+ if (board_id == products[i].board_id) { >+ hba->product_name = products[i].product_name; >+ hba->access = *(products[i].access); >+ hba->nr_cmds = products[i].nr_cmds; >+ break; >+ } >+ } >+ >+ /* Allocate a cmd & error info struct and set up ptrs. */ >+ cmd = (CommandList_struct *) pci_alloc_consistent(hba->pdev, >+ sizeof(CommandList_struct) + sizeof(ErrorInfo_struct), >+ &cmd_dhandle); >+ memset(cmd, 0, sizeof(*cmd) + sizeof(*cmd->err_info)); >+ cmd->err_info = ((void *) cmd) + sizeof(*cmd); >+ cmd->busaddr = (__u32) cmd_dhandle; >+ temp64.val = (__u64) cmd_dhandle + sizeof(CommandList_struct); >+ cmd->ErrDesc.Addr.lower = temp64.val32.lower; >+ cmd->ErrDesc.Addr.upper = temp64.val32.upper; >+ cmd->ErrDesc.Len = sizeof(ErrorInfo_struct); >+ >+ /* Build the command. */ >+ rc = fill_cmd(cmd, CCISS_RESET_MSG, c, reset_buf, 4, 0, >+ 0, 0, NULL, TYPE_MSG); >+ if (rc == IO_ERROR) >+ return -EIO; >+ else >+ rc = 0; >+ >+ /* Send it down. */ >+ hba->access.submit_command(hba, cmd); >+ >+ /* Wait some time for the scratchpad to be reset. */ >+ do { >+ mdelay(25); >+ scratchpad = readl(hba->vaddr + SA5_SCRATCHPAD_OFFSET); >+ } while (scratchpad == CCISS_FIRMWARE_READY); >+ >+ /* Now wait for the scratchpad to become ready. */ >+ for (i = 0; i < 1200; i++) { >+ scratchpad = readl(hba->vaddr + SA5_SCRATCHPAD_OFFSET); >+ if (scratchpad == CCISS_FIRMWARE_READY) { >+ break; >+ } >+ set_current_state(TASK_INTERRUPTIBLE); >+ schedule_timeout(HZ / 10); /* wait 100ms */ >+ } >+ if (scratchpad != CCISS_FIRMWARE_READY) { >+ printk(KERN_WARNING "cciss: Board not ready. Timed out.\n"); >+ err = -ENODEV; >+ } >+ >+ /* Free the command. */ >+ pci_free_consistent(pdev, sizeof(*cmd) + sizeof(*cmd->err_info), >+ cmd, cmd_dhandle); >+ >+ return rc; >+} >+ >+/* > * This is it. Find all the controllers and register them. I really hate > * stealing all these major device numbers. > * returns the number of block devices registered. >@@ -3207,6 +3308,16 @@ static int __devinit cciss_init_one(stru > > hba[i]->busy_initializing = 1; > >+ if (reset_devices) { >+ rc = cciss_reset_controller(pdev, i, hba[i]); >+ if (rc) { >+ printk(KERN_WARNING "cciss: controller reset" >+ " failed with %d\n", rc); >+ free_hba(i); >+ return -EIO; >+ } >+ } >+ > if (cciss_pci_init(hba[i], pdev) != 0) > goto clean1; > >@@ -3272,6 +3383,7 @@ static int __devinit cciss_init_one(stru > printk(KERN_ERR "cciss: out of memory"); > goto clean4; > } >+ > #ifdef CONFIG_CISS_SCSI_TAPE > hba[i]->scsi_rejects.complete = > kmalloc(sizeof(hba[i]->scsi_rejects.complete[0]) * >diff -urNp linux-2.6.18.x86_64.orig/drivers/block/cciss_cmd.h linux-2.6.18.x86_64/drivers/block/cciss_cmd.h >--- linux-2.6.18.x86_64.orig/drivers/block/cciss_cmd.h 2008-01-18 09:19:21.000000000 -0600 >+++ linux-2.6.18.x86_64/drivers/block/cciss_cmd.h 2008-01-18 09:24:41.000000000 -0600 >@@ -102,6 +102,31 @@ typedef struct _InquiryData_struct > BYTE data_byte[36]; > } InquiryData_struct; > >+/* defines for the messages supported by Smart Array */ >+#define CISS_ABORT_MSG 0x00 >+#define CISS_RESET_MSG 0x01 >+#define CISS_SCAN_MSG 0x02 >+#define CISS_NO_OP 0x03 >+ >+/* target defines for CCISS_ABORT_MSG */ >+#define TASK_ABORT 0x00 /* abort a command */ >+#define TASKSET_ABORT 0x01 /* abort all commands to a target */ >+#define CISS_CLEAR_ACA 0x02 /* clear ACA condition */ >+#define CLEAR_TASKSET 0x03 /* abort all commands to a target */ >+ >+/* target defines for CCISS_RESET_MSG */ >+#define RESET_CONTROLLER 0x00 /* reset the controller */ >+#define RESET_BUS 0x01 /* reset the bus */ >+#define RESET_TARGET 0x03 /* reset a target device */ >+#define RESET_LUN 0x04 /* reset a logical volume */ >+ >+/* target defines for CCISS_SCAN_MSG >+ * the target is specified in the LUN field */ >+#define SCAN_ALL 0x00 /* scan all buses */ >+#define SCAN_BUS 0x01 /* scan a bus */ >+#define SCAN_TARGET 0x03 /* scan a target device */ >+#define SCAN_LUN 0x04 /* scan a logical volume */ >+ > #define CISS_REPORT_LOG 0xc2 /* Report Logical LUNs */ > #define CISS_REPORT_PHYS 0xc3 /* Report Physical LUNs */ > // Data returned >diff -urNp linux-2.6.18.x86_64.orig/drivers/block/cciss_scsi.c linux-2.6.18.x86_64/drivers/block/cciss_scsi.c >--- linux-2.6.18.x86_64.orig/drivers/block/cciss_scsi.c 2008-01-18 09:19:18.000000000 -0600 >+++ linux-2.6.18.x86_64/drivers/block/cciss_scsi.c 2008-01-18 09:24:41.000000000 -0600 >@@ -293,6 +293,8 @@ print_bytes (unsigned char *c, int len, > } > } > >+#endif >+ > static void > print_cmd(CommandList_struct *cp) > { >@@ -339,8 +341,6 @@ print_cmd(CommandList_struct *cp) > > } > >-#endif >- > static int > find_bus_target_lun(int ctlr, int *bus, int *target, int *lun) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 230717
:
149128
|
149208
|
292178
|
293393
|
293602
|
293604
|
294226
|
298090
|
298451
|
298533
|
298806
|
299186
|
299200
|
302760
|
302938
|
303074