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 306307 Details for
Bug 447586
DM failing path due to a communication failure on a single i/o
[?]
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]
wait to fail path
use-slave-and-timeout2.patch (text/plain), 9.14 KB, created by
Mike Christie
on 2008-05-21 19:46:46 UTC
(
hide
)
Description:
wait to fail path
Filename:
MIME Type:
Creator:
Mike Christie
Created:
2008-05-21 19:46:46 UTC
Size:
9.14 KB
patch
obsolete
>diff -aurp linux-2.6.9-67/drivers/scsi/sym53c8xx_2/sym_glue.c linux-2.6.9-67.work/drivers/scsi/sym53c8xx_2/sym_glue.c >--- linux-2.6.9-67/drivers/scsi/sym53c8xx_2/sym_glue.c 2008-04-08 23:23:44.000000000 -0500 >+++ linux-2.6.9-67.work/drivers/scsi/sym53c8xx_2/sym_glue.c 2008-05-19 12:26:06.000000000 -0500 >@@ -309,6 +309,16 @@ void sym_set_cam_result_error(struct sym > cam_status = DID_OK; > scsi_status = cp->ssss_status; > >+ if (cp->host_status == CAM_SEL_TIMEOUT || >+ cp->host_status == CAM_DEV_NOT_THERE || >+ cp->host_status == DID_NO_CONNECT) { >+ printk(KERN_ERR "sym_set_cam_result_error got no connect\n"); >+ if (cp->host_flags & HF_SENSE) >+ printk(KERN_ERR "sym_set_cam_result_error also got " >+ "sense?????\n"); >+ dump_stack(); >+ } >+ > if (cp->host_flags & HF_SENSE) { > scsi_status = cp->sv_scsi_status; > resid = cp->sv_resid; >@@ -353,8 +363,10 @@ void sym_set_cam_result_error(struct sym > } > } else if (cp->host_status == HS_COMPLETE) /* Bad SCSI status */ > cam_status = DID_OK; >- else if (cp->host_status == HS_SEL_TIMEOUT) /* Selection timeout */ >+ else if (cp->host_status == HS_SEL_TIMEOUT) { /* Selection timeout */ >+ printk(KERN_ERR "sym_set_cam_result_error got HS_SEL_TIMEOUT\n"); > cam_status = DID_NO_CONNECT; >+ } > else if (cp->host_status == HS_UNEXPECTED) /* Unexpected BUS FREE*/ > cam_status = DID_ERROR; > else { /* Extended error */ >@@ -464,6 +476,9 @@ static int sym_queue_command(struct sym_ > if (ccb->device->id == np->myaddr || > ccb->device->id >= SYM_CONF_MAX_TARGET || > ccb->device->lun >= SYM_CONF_MAX_LUN) { >+ printk(KERN_ERR "sym_queue_command CAM_DEV_NOT_THERE " >+ "%u %u %u\n", np->myaddr, ccb->device->id, >+ ccb->device->lun); > sym_xpt_done2(np, ccb, CAM_DEV_NOT_THERE); > return 0; > } >@@ -490,6 +505,7 @@ static int sym_queue_command(struct sym_ > ((tp->usrflags & SYM_SCAN_LUNS_DISABLED) && > ccb->device->lun != 0)) { > tp->usrflags &= ~SYM_SCAN_BOOT_DISABLED; >+ printk(KERN_ERR "sym_queue_command disabled\n"); > sym_xpt_done2(np, ccb, CAM_DEV_NOT_THERE); > return 0; > } >@@ -1077,16 +1093,15 @@ static int device_queue_depth(struct sym > #define device_queue_depth(np, t, l) (sym_driver_setup.max_tag) > #endif /* SYM_LINUX_BOOT_COMMAND_LINE_SUPPORT */ > >-/* >- * Linux entry point for device queue sizing. >- */ >-static int sym53c8xx_slave_configure(struct scsi_device *device) >+static int sym53c8xx_slave_alloc(struct scsi_device *device) > { > struct Scsi_Host *host = device->host; > struct sym_hcb *np; > struct sym_tcb *tp; >- struct sym_lcb *lp; >- int reqtags, depth_to_use; >+ >+ if (device->id >= SYM_CONF_MAX_TARGET || >+ device->lun >= SYM_CONF_MAX_LUN) >+ return -ENXIO; > > np = ((struct host_data *) host->hostdata)->ncb; > tp = &np->target[device->id]; >@@ -1096,9 +1111,20 @@ static int sym53c8xx_slave_configure(str > * Allocate the LCB if not yet. > * If it fail, we may well be in the sh*t. :) > */ >- lp = sym_alloc_lcb(np, device->id, device->lun); >- if (!lp) >+ if (!sym_alloc_lcb(np, device->id, device->lun)) > return -ENOMEM; >+ return 0; >+} >+/* >+ * Linux entry point for device queue sizing. >+ */ >+static int sym53c8xx_slave_configure(struct scsi_device *device) >+{ >+ struct Scsi_Host *host = device->host; >+ struct sym_hcb *np = ((struct host_data *) host->hostdata)->ncb; >+ struct sym_tcb *tp = &np->target[device->id]; >+ struct sym_lcb *lp = sym_lp(np, tp, device->lun); >+ int reqtags, depth_to_use; > > /* > * Get user flags. >@@ -1136,6 +1162,19 @@ static int sym53c8xx_slave_configure(str > return 0; > } > >+static void sym53c8xx_slave_destroy(struct scsi_device *sdev) >+{ >+ struct Scsi_Host *host = sdev->host; >+ struct sym_hcb *np = ((struct host_data *) host->hostdata)->ncb; >+ struct sym_lcb *lp = sym_lp(np, &np->target[sdev->id], sdev->lun); >+ >+ if (lp->itlq_tbl) >+ sym_mfree_dma(lp->itlq_tbl, SYM_CONF_MAX_TASK * 4, "ITLQ_TBL"); >+ if (lp->cb_tags) >+ sym_mfree(lp->cb_tags, SYM_CONF_MAX_TASK, "CB_TAGS"); >+ sym_mfree_dma(lp, sizeof(*lp), "LCB"); >+} >+ > /* > * Linux entry point for info() function > */ >@@ -2262,6 +2301,8 @@ static struct scsi_host_template sym2_te > .info = sym53c8xx_info, > .queuecommand = sym53c8xx_queue_command, > .slave_configure = sym53c8xx_slave_configure, >+ .slave_alloc = sym53c8xx_slave_alloc, >+ .slave_destroy = sym53c8xx_slave_destroy, > .eh_abort_handler = sym53c8xx_eh_abort_handler, > .eh_device_reset_handler = sym53c8xx_eh_device_reset_handler, > .eh_bus_reset_handler = sym53c8xx_eh_bus_reset_handler, >diff -aurp linux-2.6.9-67/drivers/scsi/sym53c8xx_2/sym_hipd.c linux-2.6.9-67.work/drivers/scsi/sym53c8xx_2/sym_hipd.c >--- linux-2.6.9-67/drivers/scsi/sym53c8xx_2/sym_hipd.c 2008-04-08 23:23:44.000000000 -0500 >+++ linux-2.6.9-67.work/drivers/scsi/sym53c8xx_2/sym_hipd.c 2008-04-24 11:32:53.000000000 -0500 >@@ -4765,30 +4765,7 @@ ccb_p sym_get_ccb (hcb_p np, u_char tn, > goto out; > cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); > >-#ifndef SYM_OPT_HANDLE_DEVICE_QUEUEING >- /* >- * If the LCB is not yet available and the LUN >- * has been probed ok, try to allocate the LCB. >- */ >- if (!lp && sym_is_bit(tp->lun_map, ln)) { >- lp = sym_alloc_lcb(np, tn, ln); >- if (!lp) >- goto out_free; >- } >-#endif >- >- /* >- * If the LCB is not available here, then the >- * logical unit is not yet discovered. For those >- * ones only accept 1 SCSI IO per logical unit, >- * since we cannot allow disconnections. >- */ >- if (!lp) { >- if (!sym_is_bit(tp->busy0_map, ln)) >- sym_set_bit(tp->busy0_map, ln); >- else >- goto out_free; >- } else { >+ { > /* > * If we have been asked for a tagged command. > */ >@@ -4797,7 +4774,8 @@ ccb_p sym_get_ccb (hcb_p np, u_char tn, > * Debugging purpose. > */ > #ifndef SYM_OPT_HANDLE_DEVICE_QUEUEING >- assert(lp->busy_itl == 0); >+ if (lp->busy_itl != 0) >+ goto out_free > #endif > /* > * Allocate resources for tags if not yet. >@@ -4842,7 +4820,8 @@ ccb_p sym_get_ccb (hcb_p np, u_char tn, > * Debugging purpose. > */ > #ifndef SYM_OPT_HANDLE_DEVICE_QUEUEING >- assert(lp->busy_itl == 0 && lp->busy_itlq == 0); >+ if (lp->busy_itl != 0 || lp->busy_itlq != 0) >+ goto out_free; > #endif > /* > * Count this nexus for this LUN. >@@ -4945,12 +4924,6 @@ void sym_free_ccb (hcb_p np, ccb_p cp) > lp->head.resel_sa = > cpu_to_scr(SCRIPTB_BA (np, resel_bad_lun)); > } >- /* >- * Otherwise, we only accept 1 IO per LUN. >- * Clear the bit that keeps track of this IO. >- */ >- else >- sym_clr_bit(tp->busy0_map, cp->lun); > > /* > * We donnot queue more than 1 ccb per target >@@ -5133,20 +5106,7 @@ static void sym_init_tcb (hcb_p np, u_ch > lcb_p sym_alloc_lcb (hcb_p np, u_char tn, u_char ln) > { > tcb_p tp = &np->target[tn]; >- lcb_p lp = sym_lp(np, tp, ln); >- >- /* >- * Already done, just return. >- */ >- if (lp) >- return lp; >- >- /* >- * Donnot allow LUN control block >- * allocation for not probed LUNs. >- */ >- if (!sym_is_bit(tp->lun_map, ln)) >- return NULL; >+ lcb_p lp = NULL; > > /* > * Initialize the target control block if not yet. >@@ -5218,13 +5178,6 @@ lcb_p sym_alloc_lcb (hcb_p np, u_char tn > lp->started_max = SYM_CONF_MAX_TASK; > lp->started_limit = SYM_CONF_MAX_TASK; > #endif >- /* >- * If we are busy, count the IO. >- */ >- if (sym_is_bit(tp->busy0_map, ln)) { >- lp->busy_itl = 1; >- sym_clr_bit(tp->busy0_map, ln); >- } > fail: > return lp; > } >@@ -5666,12 +5619,6 @@ void sym_complete_ok (hcb_p np, ccb_p cp > lp = sym_lp(np, tp, cp->lun); > > /* >- * Assume device discovered on first success. >- */ >- if (!lp) >- sym_set_bit(tp->lun_map, cp->lun); >- >- /* > * If all data have been transferred, given than no > * extended error did occur, there is no residual. > */ >@@ -6002,8 +5949,7 @@ void sym_hcb_free(hcb_p np) > SYM_QUEHEAD *qp; > ccb_p cp; > tcb_p tp; >- lcb_p lp; >- int target, lun; >+ int target; > > if (np->scriptz0) > sym_mfree_dma(np->scriptz0, np->scriptz_sz, "SCRIPTZ0"); >@@ -6039,18 +5985,6 @@ void sym_hcb_free(hcb_p np) > > for (target = 0; target < SYM_CONF_MAX_TARGET ; target++) { > tp = &np->target[target]; >- for (lun = 0 ; lun < SYM_CONF_MAX_LUN ; lun++) { >- lp = sym_lp(np, tp, lun); >- if (!lp) >- continue; >- if (lp->itlq_tbl) >- sym_mfree_dma(lp->itlq_tbl, SYM_CONF_MAX_TASK*4, >- "ITLQ_TBL"); >- if (lp->cb_tags) >- sym_mfree(lp->cb_tags, SYM_CONF_MAX_TASK, >- "CB_TAGS"); >- sym_mfree_dma(lp, sizeof(*lp), "LCB"); >- } > #if SYM_CONF_MAX_LUN > 1 > if (tp->lunmp) > sym_mfree(tp->lunmp, SYM_CONF_MAX_LUN*sizeof(lcb_p), >diff -aurp linux-2.6.9-67/drivers/scsi/sym53c8xx_2/sym_hipd.h linux-2.6.9-67.work/drivers/scsi/sym53c8xx_2/sym_hipd.h >--- linux-2.6.9-67/drivers/scsi/sym53c8xx_2/sym_hipd.h 2008-04-08 23:23:44.000000000 -0500 >+++ linux-2.6.9-67.work/drivers/scsi/sym53c8xx_2/sym_hipd.h 2008-04-24 11:31:30.000000000 -0500 >@@ -416,19 +416,6 @@ struct sym_tcb { > lcb_p *lunmp; /* Other LCBs [1..MAX_LUN] */ > #endif > >- /* >- * Bitmap that tells about LUNs that succeeded at least >- * 1 IO and therefore assumed to be a real device. >- * Avoid useless allocation of the LCB structure. >- */ >- u32 lun_map[(SYM_CONF_MAX_LUN+31)/32]; >- >- /* >- * Bitmap that tells about LUNs that haven't yet an LCB >- * allocated (not discovered or LCB allocation failed). >- */ >- u32 busy0_map[(SYM_CONF_MAX_LUN+31)/32]; >- > #ifdef SYM_HAVE_STCB > /* > * O/S specific data structure.
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 447586
: 306307 |
316556
|
316558
|
316600
|
316605
|
316608