* Error using DC315U to drive ScanJet 4c
@ 2006-02-11 1:14 Fredrik Roubert
2006-02-11 21:06 ` Guennadi Liakhovetski
0 siblings, 1 reply; 27+ messages in thread
From: Fredrik Roubert @ 2006-02-11 1:14 UTC (permalink / raw)
To: linux-scsi
Hi!
I just connected my old HP ScanJet 4c to my new DC315U SCSI adapter
(connected to an ASRock 939Dual-SATA2 motherboard with AMD Athlon 64 X2)
and tried using the dc395x kernel module with Linux 2.6.15 and scan an
image using xscanimage.
Sometimes it works, but sometimes xscanimage hangs for a long time and
then aborts with a message about I/O error. When that happends, the
following is printed in the dmesg output:
drivers/scsi/dc395x.c: Please, contact <linux-scsi@vger.kernel.org> to help improve support for your system.
dc395x: reselect: w/o disconnected cmds <02-0>
dc395x: disconnect: Unexpected reselection <02-0>
So, what can I do to help you resolve this? (I'm familiar with kernel
programming, in case you need me to check something "complicated".)
Cheers // Fredrik Roubert
--
Sörbyplan 5 | +46 8 7609169 / +46 708 776974
SE-163 71 Spånga | http://www.df.lth.se/~roubert/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-11 1:14 Error using DC315U to drive ScanJet 4c Fredrik Roubert
@ 2006-02-11 21:06 ` Guennadi Liakhovetski
2006-02-12 23:47 ` Guennadi Liakhovetski
2006-02-13 17:10 ` Fredrik Roubert
0 siblings, 2 replies; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-02-11 21:06 UTC (permalink / raw)
To: Fredrik Roubert; +Cc: linux-scsi
On Sat, 11 Feb 2006, Fredrik Roubert wrote:
> Hi!
>
> I just connected my old HP ScanJet 4c to my new DC315U SCSI adapter
> (connected to an ASRock 939Dual-SATA2 motherboard with AMD Athlon 64 X2)
> and tried using the dc395x kernel module with Linux 2.6.15 and scan an
> image using xscanimage.
>
> Sometimes it works, but sometimes xscanimage hangs for a long time and
> then aborts with a message about I/O error. When that happends, the
> following is printed in the dmesg output:
>
> drivers/scsi/dc395x.c: Please, contact <linux-scsi@vger.kernel.org> to help improve support for your system.
> dc395x: reselect: w/o disconnected cmds <02-0>
> dc395x: disconnect: Unexpected reselection <02-0>
Wow! Youppy-yey! It worked!!:-)) Oh, how I waited for this email!:-)
Ok, making a long story short - you run into a VERY (I think) rare
situation when you controller doesn't transfer all the data per DMA and
the driver tries to transfer the rest in PIO mode. And this mode is
currently broken. We know that, but because noone could reproduce such a
situation, we couldn't test any fixes. So, I just suggested to put this
request in the driver and hope that the person with such a setup will
indeed notice it and write to the list and will also help debug possible
fixes for this situation.
...and your 64-bit dual-core CPU makes it even more fun. On the other
hand, it means we won't be able to test it on highmem... Unless you agree
to swap it to a 32-bit machine for a test:-)
Now, I hada patch for this. I just have to dig it out, re-diff it against
2.6.15 and send to you. One warning - while debugging we might crash your
machine a couple of times, perhaps corrupt some data... Do you have,
maybe, a test machine without important data on it for first tests, or at
least, backup all your valuables. You've been warned:-)
> So, what can I do to help you resolve this? (I'm familiar with kernel
> programming, in case you need me to check something "complicated".)
Unless you want to dig out my patch from list-archives and start testing
it yourself, please wait until I send you an updated patch. Don't worry,
it will be "complicated" enough:-)
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-11 21:06 ` Guennadi Liakhovetski
@ 2006-02-12 23:47 ` Guennadi Liakhovetski
2006-02-13 17:10 ` Fredrik Roubert
1 sibling, 0 replies; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-02-12 23:47 UTC (permalink / raw)
To: Fredrik Roubert; +Cc: linux-scsi
On Sat, 11 Feb 2006, Guennadi Liakhovetski wrote:
> On Sat, 11 Feb 2006, Fredrik Roubert wrote:
>
> > I just connected my old HP ScanJet 4c to my new DC315U SCSI adapter
> > (connected to an ASRock 939Dual-SATA2 motherboard with AMD Athlon 64 X2)
> > and tried using the dc395x kernel module with Linux 2.6.15 and scan an
> > image using xscanimage.
> >
> > Sometimes it works, but sometimes xscanimage hangs for a long time and
> > then aborts with a message about I/O error. When that happends, the
> > following is printed in the dmesg output:
> >
> > drivers/scsi/dc395x.c: Please, contact <linux-scsi@vger.kernel.org> to help improve support for your system.
> > dc395x: reselect: w/o disconnected cmds <02-0>
> > dc395x: disconnect: Unexpected reselection <02-0>
...
> Unless you want to dig out my patch from list-archives and start testing
> it yourself, please wait until I send you an updated patch. Don't worry,
> it will be "complicated" enough:-)
Ok, if you feel adventurous, you might try the patch below. Otherwise, you
might want to wait until I also test-run it - so far only compile-tested.
But even if I run-test it, I will not be able to test those PIO paths,
so...
Thanks
Guennadi
---
Guennadi Liakhovetski
Index: drivers/scsi/dc395x.c
===================================================================
RCS file: /usr/src/cvs/linux-2_6/drivers/scsi/dc395x.c,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 dc395x.c
--- a/drivers/scsi/dc395x.c 8 Feb 2006 23:08:47 -0000 1.1.1.9
+++ b/drivers/scsi/dc395x.c 12 Feb 2006 23:38:37 -0000
@@ -230,12 +230,8 @@
struct scsi_cmnd *cmd;
struct SGentry *segment_x; /* Linear array of hw sg entries (up to 64 entries) */
- u32 sg_bus_addr; /* Bus address of sg list (ie, of segment_x) */
-
- u8 sg_count; /* No of HW sg entries for this request */
- u8 sg_index; /* Index of HW sg entry for this request */
- u32 total_xfer_length; /* Total number of bytes remaining to be transfered */
- unsigned char *virt_addr; /* Virtual address of current transfer position */
+ size_t total_xfer_length; /* Total number of bytes remaining to be transfered */
+ size_t request_length; /* Total number of bytes in this request */
/*
* The sense buffer handling function, request_sense, uses
@@ -246,7 +242,12 @@
* total_xfer_length in xferred. These values are restored in
* pci_unmap_srb_sense. This is the only place xferred is used.
*/
- u32 xferred; /* Saved copy of total_xfer_length */
+ size_t xferred; /* Saved copy of total_xfer_length */
+
+ dma_addr_t sg_bus_addr; /* Bus address of sg list (ie, of segment_x) */
+
+ u8 sg_count; /* No of HW sg entries for this request */
+ u8 sg_index; /* Index of HW sg entry for this request */
u16 state;
@@ -976,17 +977,6 @@
}
}
-static inline void pio_trigger(void)
-{
- static int feedback_requested;
-
- if (!feedback_requested) {
- feedback_requested = 1;
- printk(KERN_WARNING "%s: Please, contact <linux-scsi@vger.kernel.org> "
- "to help improve support for your system.\n", __FILE__);
- }
-}
-
/* Prepare SRB for being sent to Device DCB w/ command *cmd */
static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb,
struct ScsiReqBlk *srb)
@@ -1000,7 +990,6 @@
srb->sg_count = 0;
srb->total_xfer_length = 0;
srb->sg_bus_addr = 0;
- srb->virt_addr = NULL;
srb->sg_index = 0;
srb->adapter_status = 0;
srb->target_status = 0;
@@ -1031,7 +1020,6 @@
reqlen, cmd->request_buffer, cmd->use_sg,
srb->sg_count);
- srb->virt_addr = page_address(sl->page);
for (i = 0; i < srb->sg_count; i++) {
u32 busaddr = (u32)sg_dma_address(&sl[i]);
u32 seglen = (u32)sl[i].length;
@@ -1063,7 +1051,7 @@
PCI_DMA_TODEVICE);
dprintkdbg(DBG_SG, "build_srb: [n] map sg %p->%08x(%05x)\n",
- srb->segment_x, srb->sg_bus_addr, SEGMENTX_LEN);
+ srb->segment_x, (u32)srb->sg_bus_addr, SEGMENTX_LEN);
} else {
srb->total_xfer_length = cmd->request_bufflen;
srb->sg_count = 1;
@@ -1076,12 +1064,14 @@
srb->total_xfer_length++;
srb->segment_x[0].length = srb->total_xfer_length;
- srb->virt_addr = cmd->request_buffer;
+
dprintkdbg(DBG_0,
"build_srb: [1] len=%d buf=%p use_sg=%d map=%08x\n",
srb->total_xfer_length, cmd->request_buffer,
cmd->use_sg, srb->segment_x[0].address);
}
+
+ srb->request_length = srb->total_xfer_length;
}
@@ -1975,14 +1965,11 @@
/*
* Compute the next Scatter Gather list index and adjust its length
- * and address if necessary; also compute virt_addr
+ * and address if necessary
*/
static void sg_update_list(struct ScsiReqBlk *srb, u32 left)
{
u8 idx;
- struct scatterlist *sg;
- struct scsi_cmnd *cmd = srb->cmd;
- int segment = cmd->use_sg;
u32 xferred = srb->total_xfer_length - left; /* bytes transfered */
struct SGentry *psge = srb->segment_x + srb->sg_index;
@@ -2015,29 +2002,6 @@
psge++;
}
sg_verify_length(srb);
-
- /* we need the corresponding virtual address */
- if (!segment) {
- srb->virt_addr += xferred;
- return;
- }
-
- /* We have to walk the scatterlist to find it */
- sg = (struct scatterlist *)cmd->request_buffer;
- while (segment--) {
- unsigned long mask =
- ~((unsigned long)sg->length - 1) & PAGE_MASK;
- if ((sg_dma_address(sg) & mask) == (psge->address & mask)) {
- srb->virt_addr = (page_address(sg->page)
- + psge->address -
- (psge->address & PAGE_MASK));
- return;
- }
- ++sg;
- }
-
- dprintkl(KERN_ERR, "sg_update_list: sg_to_virt failed\n");
- srb->virt_addr = NULL;
}
@@ -2049,15 +2013,17 @@
*/
static void sg_subtract_one(struct ScsiReqBlk *srb)
{
+ struct SGentry *psge = srb->segment_x + srb->sg_index;
+
srb->total_xfer_length--;
- srb->segment_x[srb->sg_index].length--;
+ psge->length--;
if (srb->total_xfer_length &&
- !srb->segment_x[srb->sg_index].length) {
+ !psge->length) {
if (debug_enabled(DBG_PIO))
printk(" (next segment)");
srb->sg_index++;
- sg_update_list(srb, srb->total_xfer_length);
- }
+ } else
+ psge->address++;
}
@@ -2216,7 +2182,6 @@
srb->total_xfer_length - diff;
sg_update_list(srb, d_left_counter);
/*srb->total_xfer_length -= diff; */
- /*srb->virt_addr += diff; */
/*if (srb->cmd->use_sg) */
/* srb->sg_index++; */
}
@@ -2238,12 +2203,52 @@
data_io_transfer(acb, srb, XFERDATAOUT);
}
+/**
+ * dc395_kmap_atomic_sg - find and atomically map an sg-elemnt
+ * @sg: scatter-gather list
+ * @sg_count: number of segments in sg
+ * @offset: offset in bytes into sg, on return offset into the mapped area
+ * @len: on return number of bytes mapped
+ *
+ * Returns virtual address of the start of the mapped page
+ */
+static void *dc395x_kmap_atomic_sg(struct scatterlist *sg, int sg_count, size_t *offset, size_t *len)
+{
+ int i;
+ size_t sg_len = 0, l2 = 0;
+ struct page *page;
+
+ for (i = 0; i < sg_count; i++) {
+ l2 = sg_len; /* Complete sg-entries */
+ sg_len += sg[i].length;
+ if (sg_len > *offset)
+ break;
+ }
+
+ BUG_ON(i == sg_count);
+
+ /* Offset starting from the beginning of first page in this sg-entry */
+ *offset = *offset - l2 + sg[i].offset;
+
+ /* Assumption: contiguous pages can be accessed as "page + i" */
+ page = sg[i].page + (*offset >> PAGE_SHIFT);
+ *offset &= ~PAGE_MASK;
+
+ /* Bytes in this sg-entry from *offset to the end of the page */
+ *len = PAGE_SIZE - *offset;
+
+ return kmap_atomic(page, KM_BIO_SRC_IRQ);
+}
+
+static void dc395x_kunmap_atomic_sg(void *virt)
+{
+ kunmap_atomic(virt, KM_BIO_SRC_IRQ);
+}
static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
u16 *pscsi_status)
{
u16 scsi_status = *pscsi_status;
- u32 d_left_counter = 0;
dprintkdbg(DBG_0, "data_in_phase0: (pid#%li) <%02i-%i>\n",
srb->cmd->pid, srb->cmd->device->id, srb->cmd->device->lun);
@@ -2261,6 +2266,7 @@
* seem to be a bad idea, actually.
*/
if (!(srb->state & SRB_XFERPAD)) {
+ unsigned int d_left_counter, max_left;
if (scsi_status & PARITYERROR) {
dprintkl(KERN_INFO, "data_in_phase0: (pid#%li) "
"Parity Error\n", srb->cmd->pid);
@@ -2313,44 +2319,85 @@
DC395x_read32(acb, TRM_S1040_DMA_CXCNT),
srb->total_xfer_length, d_left_counter);
#if DC395x_LASTPIO
+ max_left = max(d_left_counter, srb->total_xfer_length);
/* KG: Less than or equal to 4 bytes can not be transfered via DMA, it seems. */
if (d_left_counter
&& srb->total_xfer_length <= DC395x_LASTPIO) {
+ size_t left_io = srb->total_xfer_length;
+
/*u32 addr = (srb->segment_x[srb->sg_index].address); */
/*sg_update_list (srb, d_left_counter); */
- dprintkdbg(DBG_PIO, "data_in_phase0: PIO (%i %s) to "
- "%p for remaining %i bytes:",
+ dprintkdbg(DBG_PIO, "data_in_phase0: PIO (%i %s) "
+ "for remaining %i bytes:",
DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT) & 0x1f,
(srb->dcb->sync_period & WIDE_SYNC) ?
"words" : "bytes",
- srb->virt_addr,
srb->total_xfer_length);
if (srb->dcb->sync_period & WIDE_SYNC)
DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2,
CFG2_WIDEFIFO);
- while (DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT) != 0x40) {
- u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
- pio_trigger();
- *(srb->virt_addr)++ = byte;
- if (debug_enabled(DBG_PIO))
- printk(" %02x", byte);
- d_left_counter--;
- sg_subtract_one(srb);
- }
- if (srb->dcb->sync_period & WIDE_SYNC) {
-#if 1
- /* Read the last byte ... */
- if (srb->total_xfer_length > 0) {
- u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
- pio_trigger();
- *(srb->virt_addr)++ = byte;
- srb->total_xfer_length--;
+
+ while (left_io) {
+ unsigned char *virt, *base = NULL;
+ unsigned long flags = 0;
+ size_t len;
+ u8 fifocnt = 0;
+
+ if (srb->cmd->use_sg) {
+ size_t offset = srb->request_length - left_io;
+ local_irq_save(flags);
+ /* Assumption: it's inside one page as it's at most 4 bytes and
+ I just assume it's on a 4-byte boundary */
+ base = dc395x_kmap_atomic_sg((struct scatterlist *)srb->cmd->request_buffer,
+ srb->sg_count, &offset, &len);
+ virt = base + offset;
+ } else {
+ virt = srb->cmd->request_buffer + srb->cmd->request_bufflen - left_io;
+ len = left_io;
+ }
+ left_io -= len;
+
+ while (len) {
+ u8 byte;
+ fifocnt = DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT);
+
+ if (fifocnt == 0x40) {
+ left_io = 0;
+ break;
+ }
+
+ byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
+ *virt++ = byte;
+
if (debug_enabled(DBG_PIO))
printk(" %02x", byte);
+
+ d_left_counter--;
+ sg_subtract_one(srb);
+
+ len--;
}
+
+ if (fifocnt == 0x40 && (srb->dcb->sync_period & WIDE_SYNC)) {
+#if 1
+ /* Read the last byte ... */
+ if (srb->total_xfer_length > 0) {
+ u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
+ *virt++ = byte;
+ srb->total_xfer_length--;
+ if (debug_enabled(DBG_PIO))
+ printk(" %02x", byte);
+ }
#endif
- DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2, 0);
+ DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2, 0);
+ }
+
+ if (srb->cmd->use_sg) {
+ dc395x_kunmap_atomic_sg(base);
+ local_irq_restore(flags);
+ }
}
+
/*printk(" %08x", *(u32*)(bus_to_virt (addr))); */
/*srb->total_xfer_length = 0; */
if (debug_enabled(DBG_PIO))
@@ -2463,7 +2510,7 @@
if (srb->cmd->use_sg) { /* with S/G */
io_dir |= DMACMD_SG;
DC395x_write32(acb, TRM_S1040_DMA_XLOWADDR,
- srb->sg_bus_addr +
+ (u32)srb->sg_bus_addr +
sizeof(struct SGentry) *
srb->sg_index);
/* load how many bytes in the sg list table */
@@ -2508,23 +2555,45 @@
SCMD_FIFO_IN);
} else { /* write */
int ln = srb->total_xfer_length;
+ size_t left_io = srb->total_xfer_length;
+
if (srb->dcb->sync_period & WIDE_SYNC)
DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2,
CFG2_WIDEFIFO);
- dprintkdbg(DBG_PIO,
- "data_io_transfer: PIO %i bytes from %p:",
- srb->total_xfer_length, srb->virt_addr);
-
- while (srb->total_xfer_length) {
- if (debug_enabled(DBG_PIO))
- printk(" %02x", (unsigned char) *(srb->virt_addr));
-
- pio_trigger();
- DC395x_write8(acb, TRM_S1040_SCSI_FIFO,
- *(srb->virt_addr)++);
- sg_subtract_one(srb);
+ while (left_io) {
+ unsigned char *virt, *base = NULL;
+ unsigned long flags = 0;
+ size_t len;
+
+ if (srb->cmd->use_sg) {
+ size_t offset = srb->request_length - left_io;
+ local_irq_save(flags);
+ /* Again, max 4 bytes */
+ base = dc395x_kmap_atomic_sg((struct scatterlist *)srb->cmd->request_buffer,
+ srb->sg_count, &offset, &len);
+ virt = base + offset;
+ } else {
+ virt = srb->cmd->request_buffer + srb->cmd->request_bufflen - left_io;
+ len = left_io;
+ }
+ left_io -= len;
+
+ while (len--) {
+ if (debug_enabled(DBG_PIO))
+ printk(" %02x", *virt);
+
+ DC395x_write8(acb, TRM_S1040_SCSI_FIFO, *virt++);
+
+ sg_subtract_one(srb);
+ }
+
+ if (srb->cmd->use_sg) {
+ dc395x_kunmap_atomic_sg(base);
+ local_irq_restore(flags);
+ }
}
+
if (srb->dcb->sync_period & WIDE_SYNC) {
if (ln % 2) {
DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 0);
@@ -3282,7 +3351,7 @@
if (cmd->use_sg && dir != PCI_DMA_NONE) {
/* unmap DC395x SG list */
dprintkdbg(DBG_SG, "pci_unmap_srb: list=%08x(%05x)\n",
- srb->sg_bus_addr, SEGMENTX_LEN);
+ (u32)srb->sg_bus_addr, SEGMENTX_LEN);
pci_unmap_single(acb->dev, srb->sg_bus_addr,
SEGMENTX_LEN,
PCI_DMA_TODEVICE);
@@ -4820,6 +4889,7 @@
unsigned long io_port_base;
unsigned int io_port_len;
unsigned int irq;
+ int ret = -ENODEV;
dprintkdbg(DBG_0, "Init one instance (%s)\n", pci_name(dev));
banner_display();
@@ -4834,6 +4904,9 @@
irq = dev->irq;
dprintkdbg(DBG_0, "IO_PORT=0x%04lx, IRQ=0x%x\n", io_port_base, dev->irq);
+ if ((ret = pci_set_dma_mask(dev, DMA_32BIT_MASK)))
+ goto fail;
+
/* allocate scsi host information (includes out adapter) */
scsi_host = scsi_host_alloc(&dc395x_driver_template,
sizeof(struct AdapterCtlBlk));
@@ -4869,7 +4942,7 @@
if (scsi_host != NULL)
scsi_host_put(scsi_host);
pci_disable_device(dev);
- return -ENODEV;
+ return ret;
}
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-11 21:06 ` Guennadi Liakhovetski
2006-02-12 23:47 ` Guennadi Liakhovetski
@ 2006-02-13 17:10 ` Fredrik Roubert
2006-02-13 23:15 ` Guennadi Liakhovetski
1 sibling, 1 reply; 27+ messages in thread
From: Fredrik Roubert @ 2006-02-13 17:10 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
On Sat 11 Feb 22:06 CET 2006, Guennadi Liakhovetski wrote:
> We know that, but because noone could reproduce such a situation, we
> couldn't test any fixes.
;-)
> ...and your 64-bit dual-core CPU makes it even more fun. On the other
> hand, it means we won't be able to test it on highmem... Unless you
> agree to swap it to a 32-bit machine for a test:-)
I actually have an old Pentium machine standing by that I could use for
testing (when the driver seems to work).
> Do you have, maybe, a test machine without important data on it for
> first tests, or at least, backup all your valuables. You've been
> warned:-)
;-) I depend on ReiserFS and good luck ... That's enough most of the time.
On Mon 13 Feb 00:47 CET 2006, Guennadi Liakhovetski wrote:
> Ok, if you feel adventurous, you might try the patch below.
OK, that patch compiles with the following warnings:
drivers/scsi/dc395x.c: In function ‘dump_register_info’:
drivers/scsi/dc395x.c:1226: warning: format ‘%i’ expects type ‘int’, but argument 5 has type ‘size_t’
drivers/scsi/dc395x.c: In function ‘data_in_phase0’:
drivers/scsi/dc395x.c:2322: warning: comparison of distinct pointer types lacks a cast
drivers/scsi/dc395x.c: In function ‘dc395x_init_one’:
drivers/scsi/dc395x.c:4357: warning: ‘ptr’ may be used uninitialized in this function
Then it gives the following syslog output when I load the module and try
to scan an image:
Feb 13 18:00:39 skalman kernel: dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
Feb 13 18:00:39 skalman kernel: ACPI: PCI Interrupt 0000:04:05.0[A] -> GSI 20 (level, low) -> IRQ 19
Feb 13 18:00:39 skalman kernel: dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x57
Feb 13 18:00:39 skalman kernel: dc395x: AdaptMode=0x0f, Tags=4(16), DelayReset=1s
Feb 13 18:00:39 skalman kernel: dc395x: Connectors: Termination: Auto Low High
Feb 13 18:00:39 skalman kernel: dc395x: Performing initial SCSI bus reset
Feb 13 18:00:39 skalman kernel: scsi3 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
Feb 13 18:00:41 skalman kernel: Vendor: HP Model: C2520A Rev: 3503
Feb 13 18:00:41 skalman kernel: Type: Processor ANSI SCSI revision: 02
Feb 13 18:00:41 skalman kernel: 3:0:2:0: Attached scsi generic sg2 type 3
Feb 13 18:02:57 skalman kernel: dc395x: reselect: w/o disconnected cmds <02-0>
Feb 13 18:02:57 skalman kernel: dc395x: disconnect: Unexpected reselection <02-0>
Feb 13 18:04:57 skalman kernel: dc395x: eh_abort: (pid#751) target=<02-0> cmd=ffff81007eb64080
Feb 13 18:04:57 skalman kernel: dc395x: eh_abort: Command in progress<6>dc395x: eh_bus_reset: (pid#751) target=<02-0> cmd=ffff81007eb64080
Feb 13 18:04:57 skalman kernel: dc395x: doing_srb_done: pids G:751(02-0)
Cheers // Fredrik Roubert
--
Sörbyplan 5 | +46 8 7609169 / +46 708 776974
SE-163 71 Spånga | http://www.df.lth.se/~roubert/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-13 17:10 ` Fredrik Roubert
@ 2006-02-13 23:15 ` Guennadi Liakhovetski
[not found] ` <20060214010138.GJ18853@igloo.df.lth.se>
0 siblings, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-02-13 23:15 UTC (permalink / raw)
To: Fredrik Roubert; +Cc: linux-scsi
[-- Attachment #1: Type: TEXT/PLAIN, Size: 6268 bytes --]
On Mon, 13 Feb 2006, Fredrik Roubert wrote:
> On Sat 11 Feb 22:06 CET 2006, Guennadi Liakhovetski wrote:
>
> > ...and your 64-bit dual-core CPU makes it even more fun. On the other
> > hand, it means we won't be able to test it on highmem... Unless you
> > agree to swap it to a 32-bit machine for a test:-)
>
> I actually have an old Pentium machine standing by that I could use for
> testing (when the driver seems to work).
...and you still use your presumably main desktop PC for testing... brave
man:-)
> > Ok, if you feel adventurous, you might try the patch below.
>
> OK, that patch compiles with the following warnings:
>
> drivers/scsi/dc395x.c: In function ‘dump_register_info’:
> drivers/scsi/dc395x.c:1226: warning: format ‘%i’ expects type ‘int’, but argument 5 has type ‘size_t’
> drivers/scsi/dc395x.c: In function ‘data_in_phase0’:
> drivers/scsi/dc395x.c:2322: warning: comparison of distinct pointer types lacks a cast
64 bit... the first one might be fixed with the attached, the second one I
removed altogether.
> drivers/scsi/dc395x.c: In function ‘dc395x_init_one’:
> drivers/scsi/dc395x.c:4357: warning: ‘ptr’ may be used uninitialized in this function
Actually, even a compiler can guess, that it cannot be used uninitialised
here. Mine, actually, doesn't complain. What version are you using?
> Then it gives the following syslog output when I load the module and try
> to scan an image:
>
> Feb 13 18:00:39 skalman kernel: dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> Feb 13 18:00:39 skalman kernel: ACPI: PCI Interrupt 0000:04:05.0[A] -> GSI 20 (level, low) -> IRQ 19
> Feb 13 18:00:39 skalman kernel: dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x57
> Feb 13 18:00:39 skalman kernel: dc395x: AdaptMode=0x0f, Tags=4(16), DelayReset=1s
> Feb 13 18:00:39 skalman kernel: dc395x: Connectors: Termination: Auto Low High
> Feb 13 18:00:39 skalman kernel: dc395x: Performing initial SCSI bus reset
> Feb 13 18:00:39 skalman kernel: scsi3 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> Feb 13 18:00:41 skalman kernel: Vendor: HP Model: C2520A Rev: 3503
> Feb 13 18:00:41 skalman kernel: Type: Processor ANSI SCSI revision: 02
> Feb 13 18:00:41 skalman kernel: 3:0:2:0: Attached scsi generic sg2 type 3
> Feb 13 18:02:57 skalman kernel: dc395x: reselect: w/o disconnected cmds <02-0>
> Feb 13 18:02:57 skalman kernel: dc395x: disconnect: Unexpected reselection <02-0>
> Feb 13 18:04:57 skalman kernel: dc395x: eh_abort: (pid#751) target=<02-0> cmd=ffff81007eb64080
> Feb 13 18:04:57 skalman kernel: dc395x: eh_abort: Command in progress<6>dc395x: eh_bus_reset: (pid#751) target=<02-0> cmd=ffff81007eb64080
> Feb 13 18:04:57 skalman kernel: dc395x: doing_srb_done: pids G:751(02-0)
It might indeed be a hardware error in the end... Please, try the attached
patch. It only adds a couple of printk's on the top of the previous one.
As the problem happens only ones, hopefully, nothing bad will happen. The
only thing I am not entirely sure about - you might get a warning for
calling printk under spinlock_irqsave, if you have respective debugging
enabled, I think. Then we'll hopefully see if at least for you the
original patch does the right thing...
Thanks
Guennadi
---
Guennadi Liakhovetski
diff -u a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
--- a/drivers/scsi/dc395x.c 2006-02-13 23:55:52.000000000 +0100
+++ b/drivers/scsi/dc395x.c 2006-02-13 23:53:37.000000000 +0100
@@ -1221,7 +1221,7 @@
srb, srb->cmd, srb->cmd->pid,
srb->cmd->cmnd[0], srb->cmd->device->id,
srb->cmd->device->lun);
- printk(" sglist=%p cnt=%i idx=%i len=%i\n",
+ printk(" sglist=%p cnt=%i idx=%i len=%u\n",
srb->segment_x, srb->sg_count, srb->sg_index,
srb->total_xfer_length);
printk(" state=0x%04x status=0x%02x phase=0x%02x (%sconn.)\n",
@@ -2227,6 +2227,9 @@
BUG_ON(i == sg_count);
+ printk(KERN_DEBUG "dc395x: Found sg-entry #%d[%u] of %d, offset %u after %u bytes for offset %u\n",
+ i, sg[i].length, sg_count, sg[i].offset, l2, *offset);
+
/* Offset starting from the beginning of first page in this sg-entry */
*offset = *offset - l2 + sg[i].offset;
@@ -2266,7 +2269,7 @@
* seem to be a bad idea, actually.
*/
if (!(srb->state & SRB_XFERPAD)) {
- unsigned int d_left_counter, max_left;
+ unsigned int d_left_counter;
if (scsi_status & PARITYERROR) {
dprintkl(KERN_INFO, "data_in_phase0: (pid#%li) "
"Parity Error\n", srb->cmd->pid);
@@ -2319,7 +2322,6 @@
DC395x_read32(acb, TRM_S1040_DMA_CXCNT),
srb->total_xfer_length, d_left_counter);
#if DC395x_LASTPIO
- max_left = max(d_left_counter, srb->total_xfer_length);
/* KG: Less than or equal to 4 bytes can not be transfered via DMA, it seems. */
if (d_left_counter
&& srb->total_xfer_length <= DC395x_LASTPIO) {
@@ -2351,6 +2353,8 @@
base = dc395x_kmap_atomic_sg((struct scatterlist *)srb->cmd->request_buffer,
srb->sg_count, &offset, &len);
virt = base + offset;
+ printk(KERN_DEBUG "dc395x: Needed %u bytes in, mapped %u at %p\n",
+ left_io, len, base);
} else {
virt = srb->cmd->request_buffer + srb->cmd->request_bufflen - left_io;
len = left_io;
@@ -2395,6 +2399,7 @@
if (srb->cmd->use_sg) {
dc395x_kunmap_atomic_sg(base);
local_irq_restore(flags);
+ printk(KERN_DEBUG "dc395x: Unmapped at %p\n", base);
}
}
@@ -2573,6 +2578,8 @@
base = dc395x_kmap_atomic_sg((struct scatterlist *)srb->cmd->request_buffer,
srb->sg_count, &offset, &len);
virt = base + offset;
+ printk(KERN_DEBUG "dc395x: Needed %u bytes out, mapped %u at %p\n",
+ left_io, len, base);
} else {
virt = srb->cmd->request_buffer + srb->cmd->request_bufflen - left_io;
len = left_io;
@@ -2591,6 +2598,7 @@
if (srb->cmd->use_sg) {
dc395x_kunmap_atomic_sg(base);
local_irq_restore(flags);
+ printk(KERN_DEBUG "dc395x: Unmapped at %p\n", base);
}
}
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
[not found] ` <20060214010138.GJ18853@igloo.df.lth.se>
@ 2006-02-14 5:59 ` Guennadi Liakhovetski
2006-02-15 20:15 ` Guennadi Liakhovetski
0 siblings, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-02-14 5:59 UTC (permalink / raw)
To: Fredrik Roubert; +Cc: linux-scsi
I think, it is better to keep linux-scsi in CC, if you don't mind.
On Tue, 14 Feb 2006, Fredrik Roubert wrote:
> Feb 14 01:55:12 skalman kernel: dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> Feb 14 01:55:12 skalman kernel: ACPI: PCI Interrupt 0000:04:05.0[A] -> GSI 20 (level, low) -> IRQ 19
> Feb 14 01:55:12 skalman kernel: dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x57
> Feb 14 01:55:12 skalman kernel: dc395x: AdaptMode=0x0f, Tags=4(16), DelayReset=1s
> Feb 14 01:55:12 skalman kernel: dc395x: Connectors: Termination: Auto Low High
> Feb 14 01:55:12 skalman kernel: dc395x: Performing initial SCSI bus reset
> Feb 14 01:55:12 skalman kernel: scsi4 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> Feb 14 01:55:13 skalman kernel: Vendor: HP Model: C2520A Rev: 3503
> Feb 14 01:55:13 skalman kernel: Type: Processor ANSI SCSI revision: 02
> Feb 14 01:55:13 skalman kernel: 4:0:2:0: Attached scsi generic sg2 type 3
> Feb 14 01:56:11 skalman kernel: dc395x: reselect: w/o disconnected cmds <02-0>
> Feb 14 01:56:11 skalman kernel: dc395x: disconnect: Unexpected reselection <02-0>
> Feb 14 01:58:11 skalman kernel: dc395x: eh_abort: (pid#669) target=<02-0> cmd=ffff810009067cc0
> Feb 14 01:58:11 skalman kernel: dc395x: eh_abort: Command in progress<6>dc395x: eh_bus_reset: (pid#669) target=<02-0> cmd=ffff810009067cc0
> Feb 14 01:58:11 skalman kernel: dc395x: doing_srb_done: pids G:669(02-0)
Hm, is it from /var/log/messages? Looks like your KERN_DEBUG messages do
not come there. Perhaps in /var/log/kern.log or similar? Please have a
look if you find them. Alternatively, I think, dmesg should also output
them.
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-14 5:59 ` Guennadi Liakhovetski
@ 2006-02-15 20:15 ` Guennadi Liakhovetski
2006-02-15 21:43 ` Fredrik Roubert
0 siblings, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-02-15 20:15 UTC (permalink / raw)
To: Fredrik Roubert; +Cc: linux-scsi
On Tue, 14 Feb 2006, Guennadi Liakhovetski wrote:
> On Tue, 14 Feb 2006, Fredrik Roubert wrote:
>
> > Feb 14 01:55:12 skalman kernel: dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> > Feb 14 01:55:12 skalman kernel: ACPI: PCI Interrupt 0000:04:05.0[A] -> GSI 20 (level, low) -> IRQ 19
> > Feb 14 01:55:12 skalman kernel: dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x57
> > Feb 14 01:55:12 skalman kernel: dc395x: AdaptMode=0x0f, Tags=4(16), DelayReset=1s
> > Feb 14 01:55:12 skalman kernel: dc395x: Connectors: Termination: Auto Low High
> > Feb 14 01:55:12 skalman kernel: dc395x: Performing initial SCSI bus reset
> > Feb 14 01:55:12 skalman kernel: scsi4 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> > Feb 14 01:55:13 skalman kernel: Vendor: HP Model: C2520A Rev: 3503
> > Feb 14 01:55:13 skalman kernel: Type: Processor ANSI SCSI revision: 02
> > Feb 14 01:55:13 skalman kernel: 4:0:2:0: Attached scsi generic sg2 type 3
> > Feb 14 01:56:11 skalman kernel: dc395x: reselect: w/o disconnected cmds <02-0>
> > Feb 14 01:56:11 skalman kernel: dc395x: disconnect: Unexpected reselection <02-0>
> > Feb 14 01:58:11 skalman kernel: dc395x: eh_abort: (pid#669) target=<02-0> cmd=ffff810009067cc0
> > Feb 14 01:58:11 skalman kernel: dc395x: eh_abort: Command in progress<6>dc395x: eh_bus_reset: (pid#669) target=<02-0> cmd=ffff810009067cc0
> > Feb 14 01:58:11 skalman kernel: dc395x: doing_srb_done: pids G:669(02-0)
>
> Hm, is it from /var/log/messages? Looks like your KERN_DEBUG messages do
> not come there. Perhaps in /var/log/kern.log or similar? Please have a
> look if you find them. Alternatively, I think, dmesg should also output
> them.
Fredrik, do you still have the detailed kernel-log from that test? It
really might give a hint. If not - you could additionally turn
SCSI-logging on and send that.
Here I also have an old AGFA scanner connected to a dc315(U) card in an
SMP - works without a glitch. Well, it is 32bit though. But my scanner
reports itself properly as a scanner, not as a processor. Is the problem
100% reproducible? What settings do you use for your scanning program?
What program?
Interesting also - my scanner is only supposed to work with the supplied
Adaptec ISA SCSI card - works with dc315 here...
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-15 20:15 ` Guennadi Liakhovetski
@ 2006-02-15 21:43 ` Fredrik Roubert
2006-02-15 22:33 ` Guennadi Liakhovetski
0 siblings, 1 reply; 27+ messages in thread
From: Fredrik Roubert @ 2006-02-15 21:43 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
Hi!
Now I applied your two patches to a fresh kernel source tree, added
"Verbose SCSI error reporting" and "Show timing information on printks"
to the configuration and rebooted with the newly built kernel and
modules. Then I ran "xscanimage hp:/dev/sg2" (using xscanimage from the
sane_1.0.14-1_amd64.deb Debian package), and scanned the same image a
few times, so that the driver hung two times.
Scanning an image doesn't fail every time, but almost every time. So if
one try succeeds, I just need to scan again to make the driver hang.
This is the output from dmesg, from boot until second failed scan:
[ 0.000000] Bootdata ok (command line is auto BOOT_IMAGE=Linux ro root=fd00)
[ 0.000000] Linux version 2.6.15 (Version: skalman.5.dev) (roubert@skalman) (gcc version 4.0.3 20060128 (prerelease) (Debian 4.0.2-8)) #1 SMP Wed Feb 15 22:08:56 CET 2006
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[ 0.000000] BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000007ffb0000 (usable)
[ 0.000000] BIOS-e820: 000000007ffb0000 - 000000007ffc0000 (ACPI data)
[ 0.000000] BIOS-e820: 000000007ffc0000 - 000000007fff0000 (ACPI NVS)
[ 0.000000] BIOS-e820: 000000007fff0000 - 0000000080000000 (reserved)
[ 0.000000] BIOS-e820: 00000000ff7c0000 - 0000000100000000 (reserved)
[ 0.000000] ACPI: RSDP (v000 ACPIAM ) @ 0x00000000000f9bb0
[ 0.000000] ACPI: RSDT (v001 A M I OEMRSDT 0x12000506 MSFT 0x00000097) @ 0x000000007ffb0000
[ 0.000000] ACPI: FADT (v002 A M I OEMFACP 0x12000506 MSFT 0x00000097) @ 0x000000007ffb0200
[ 0.000000] ACPI: MADT (v001 A M I OEMAPIC 0x12000506 MSFT 0x00000097) @ 0x000000007ffb0390
[ 0.000000] ACPI: OEMB (v001 A M I AMI_OEM 0x12000506 MSFT 0x00000097) @ 0x000000007ffc0040
[ 0.000000] ACPI: DSDT (v001 939M2 939M2150 0x00000150 INTL 0x02002026) @ 0x0000000000000000
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at 0000000000000000-000000007ffb0000
[ 0.000000] Bootmem setup node 0 0000000000000000-000000007ffb0000
[ 0.000000] On node 0 totalpages: 513614
[ 0.000000] DMA zone: 612 pages, LIFO batch:0
[ 0.000000] DMA32 zone: 513002 pages, LIFO batch:31
[ 0.000000] Normal zone: 0 pages, LIFO batch:0
[ 0.000000] HighMem zone: 0 pages, LIFO batch:0
[ 0.000000] ACPI: PM-Timer IO Port: 0x808
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[ 0.000000] Processor #0 15:11 APIC version 16
[ 0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
[ 0.000000] Processor #1 15:11 APIC version 16
[ 0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
[ 0.000000] IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: IOAPIC (id[0x03] address[0xfec10000] gsi_base[24])
[ 0.000000] IOAPIC[1]: apic_id 3, version 17, address 0xfec10000, GSI 24-39
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ2 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Setting APIC routing to flat
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] Allocating PCI resources starting at 88000000 (gap: 80000000:7f7c0000)
[ 0.000000] Built 1 zonelists
[ 0.000000] Kernel command line: auto BOOT_IMAGE=Linux ro root=fd00
[ 0.000000] Initializing CPU#0
[ 0.000000] PID hash table entries: 4096 (order: 12, 131072 bytes)
[ 0.000000] time.c: Using 3.579545 MHz PM timer.
[ 0.000000] time.c: Detected 2000.109 MHz processor.
[ 40.640391] Console: colour VGA+ 80x25
[ 40.644038] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 40.647571] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 40.679328] Memory: 2051108k/2096832k available (1587k kernel code, 45336k reserved, 821k data, 176k init)
[ 40.756066] Calibrating delay using timer specific routine.. 4004.81 BogoMIPS (lpj=8009629)
[ 40.756224] Mount-cache hash table entries: 256
[ 40.756389] CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
[ 40.756438] CPU: L2 Cache: 512K (64 bytes/line)
[ 40.756485] CPU 0(2) -> Node 0 -> Core 0
[ 40.756537] mtrr: v2.0 (20020519)
[ 40.804885] Using local APIC timer interrupts.
[ 40.854835] Detected 12.500 MHz APIC timer.
[ 40.854995] Booting processor 1/2 APIC 0x1
[ 40.864627] Initializing CPU#1
[ 40.943053] Calibrating delay using timer specific routine.. 4000.41 BogoMIPS (lpj=8000825)
[ 40.943060] CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
[ 40.943062] CPU: L2 Cache: 512K (64 bytes/line)
[ 40.943064] CPU 1(2) -> Node 0 -> Core 1
[ 40.943145] AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ stepping 01
[ 40.943154] CPU 1: Syncing TSC to CPU 0.
[ 40.943915] CPU 1: synchronized TSC with CPU 0 (last diff -77 cycles, maxerr 565 cycles)
[ 40.943921] Brought up 2 CPUs
[ 40.944433] Disabling vsyscall due to use of PM timer
[ 40.944480] time.c: Using PM based timekeeping.
[ 40.944525] testing NMI watchdog ... OK.
[ 40.984717] checking if image is initramfs... it is
[ 41.859424] NET: Registered protocol family 16
[ 41.859502] ACPI: bus type pci registered
[ 41.859552] PCI: Using configuration type 1
[ 41.860130] ACPI: Subsystem revision 20050902
[ 41.866093] ACPI: Interpreter enabled
[ 41.866139] ACPI: Using IOAPIC for interrupt routing
[ 41.866837] ACPI: PCI Root Bridge [PCI0] (0000:00)
[ 41.866884] PCI: Probing PCI hardware (bus 00)
[ 41.869317] PCI quirk: region 0800-083f claimed by ali7101 ACPI
[ 41.869748] Boot video device is 0000:01:00.0
[ 41.870029] PCI: Transparent bridge - 0000:00:06.0
[ 41.870109] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[ 41.884201] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P4._PRT]
[ 41.884441] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HTT_._PRT]
[ 41.890416] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEB1._PRT]
[ 41.890616] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEB2._PRT]
[ 41.891283] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 11 12 14 *15), disabled.
[ 41.892004] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)
[ 41.892682] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 *6 7 10 11 12 14 15)
[ 41.893356] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 *10 11 12 14 15)
[ 41.894028] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 *11 12 14 15)
[ 41.894707] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 *10 11 12 14 15)
[ 41.895381] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 *11 12 14 15)
[ 41.896056] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 11 12 14 15) *9
[ 41.896767] ACPI: PCI Interrupt Link [LNKP] (IRQs 3 4 5 6 7 *10 11 12 14 15)
[ 41.897252] Linux Plug and Play Support v0.97 (c) Adam Belay
[ 41.897313] pnp: PnP ACPI init
[ 41.897379] pnp: ACPI device : hid PNP0200
[ 41.897418] pnp: ACPI device : hid PNP0B00
[ 41.897453] pnp: ACPI device : hid PNP0800
[ 41.897487] pnp: ACPI device : hid PNP0C04
[ 41.897735] pnp: ACPI device : hid PNP0510
[ 41.898489] pnp: ACPI device : hid PNP0401
[ 41.899377] pnp: ACPI device : hid PNPB02F
[ 41.899785] pnp: ACPI device : hid PNPB006
[ 41.900034] pnp: ACPI device : hid PNP0C02
[ 41.900191] pnp: ACPI device : hid PNP0C02
[ 41.900347] pnp: ACPI device : hid PNP0303
[ 41.900426] pnp: ACPI device : hid PNP0F03
[ 41.900712] pnp: ACPI device : hid PNP0501
[ 41.901033] pnp: ACPI device : hid PNP0C02
[ 41.901211] pnp: ACPI device : hid PNP0C01
[ 41.901774] pnp: PnP ACPI: found 15 devices
[ 41.901836] PCI: Using ACPI for IRQ routing
[ 41.901883] PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
[ 41.902577] pnp: the driver 'system' has been registered
[ 41.902606] pnp: match found with the PnP device '00:08' and the driver 'system'
[ 41.902610] pnp: match found with the PnP device '00:09' and the driver 'system'
[ 41.902615] pnp: match found with the PnP device '00:0d' and the driver 'system'
[ 41.902620] pnp: 00:0d: ioport range 0x290-0x29f has been reserved
[ 41.902670] pnp: match found with the PnP device '00:0e' and the driver 'system'
[ 41.902854] PCI: Bridge: 0000:00:01.0
[ 41.902899] IO window: disabled.
[ 41.902946] MEM window: f4700000-fe7fffff
[ 41.902993] PREFETCH window: c7e00000-d7dfffff
[ 41.903040] PCI: Bridge: 0000:00:02.0
[ 41.903084] IO window: disabled.
[ 41.903130] MEM window: fe800000-fe8fffff
[ 41.903176] PREFETCH window: disabled.
[ 41.903223] PCI: Bridge: 0000:00:05.0
[ 41.903267] IO window: disabled.
[ 41.903315] MEM window: fe900000-fe9fffff
[ 41.903361] PREFETCH window: disabled.
[ 41.903413] PCI: Bridge: 0000:00:06.0
[ 41.903459] IO window: c000-cfff
[ 41.903506] MEM window: fea00000-feafffff
[ 41.903554] PREFETCH window: d7e00000-d7efffff
[ 41.903612] GSI 16 sharing vector 0xA9 and IRQ 16
[ 41.903660] ACPI: PCI Interrupt 0000:00:01.0[A] -> GSI 29 (level, low) -> IRQ 16
[ 41.903751] PCI: Setting latency timer of device 0000:00:01.0 to 64
[ 41.903759] GSI 17 sharing vector 0xB1 and IRQ 17
[ 41.903805] ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 34 (level, low) -> IRQ 17
[ 41.903895] PCI: Setting latency timer of device 0000:00:02.0 to 64
[ 41.903903] PCI: Setting latency timer of device 0000:00:05.0 to 64
[ 41.903910] PCI: Setting latency timer of device 0000:00:06.0 to 64
[ 41.904180] IA32 emulation $Id: sys_ia32.c,v 1.32 2002/03/24 13:02:28 ak Exp $
[ 41.904647] io scheduler noop registered
[ 41.904728] io scheduler anticipatory registered
[ 41.953277] ACPI: PCI Interrupt 0000:00:01.0[A] -> GSI 29 (level, low) -> IRQ 16
[ 41.953373] PCI: Setting latency timer of device 0000:00:01.0 to 64
[ 41.953397] assign_interrupt_mode Found MSI capability
[ 41.953444] Allocate Port Service[pcie00]
[ 41.953482] ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 34 (level, low) -> IRQ 17
[ 41.953573] PCI: Setting latency timer of device 0000:00:02.0 to 64
[ 41.953596] assign_interrupt_mode Found MSI capability
[ 41.953643] Allocate Port Service[pcie00]
[ 41.954984] pnp: the driver 'i8042 kbd' has been registered
[ 41.955012] pnp: match found with the PnP device '00:0a' and the driver 'i8042 kbd'
[ 41.955021] pnp: the driver 'i8042 aux' has been registered
[ 41.955047] pnp: match found with the PnP device '00:0b' and the driver 'i8042 aux'
[ 41.955057] PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12
[ 41.956645] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 41.956789] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 41.957169] RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
[ 41.957272] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
[ 41.957322] ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
[ 41.957425] ALI15X3: IDE controller at PCI slot 0000:00:12.0
[ 41.957481] GSI 18 sharing vector 0xB9 and IRQ 18
[ 41.957528] ACPI: PCI Interrupt 0000:00:12.0[A] -> GSI 19 (level, low) -> IRQ 18
[ 41.957626] ALI15X3: chipset revision 199
[ 41.957671] ALI15X3: not 100% native mode: will probe irqs later
[ 41.957730] ide0: BM-DMA at 0xff00-0xff07, BIOS settings: hda:DMA, hdb:pio
[ 41.957863] ide1: BM-DMA at 0xff08-0xff0f, BIOS settings: hdc:pio, hdd:pio
[ 41.957988] Probing IDE interface ide0...
[ 42.695555] hda: BENQ DVD DD DW1640, ATAPI CD/DVD-ROM drive
[ 43.366504] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
[ 43.366619] Probing IDE interface ide1...
[ 43.937041] mice: PS/2 mouse device common for all mice
[ 43.937382] NET: Registered protocol family 2
[ 43.962495] input: AT Translated Set 2 keyboard as /class/input/input0
[ 43.972964] IP route cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 43.973562] TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
[ 43.978388] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[ 43.979619] TCP: Hash tables configured (established 262144 bind 65536)
[ 43.979671] TCP reno registered
[ 43.979779] TCP bic registered
[ 43.979842] NET: Registered protocol family 1
[ 43.980244] Freeing unused kernel memory: 176k freed
[ 44.107514] usbcore: registered new driver usbfs
[ 44.107585] usbcore: registered new driver hub
[ 44.109254] ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
[ 44.109291] GSI 19 sharing vector 0xC1 and IRQ 19
[ 44.109344] ACPI: PCI Interrupt 0000:00:13.0[A] -> GSI 20 (level, low) -> IRQ 19
[ 44.109755] ohci_hcd 0000:00:13.0: OHCI Host Controller
[ 44.109919] ohci_hcd 0000:00:13.0: new USB bus registered, assigned bus number 1
[ 44.109990] ohci_hcd 0000:00:13.0: irq 19, io mem 0xfebfd000
[ 44.145627] SCSI subsystem initialized
[ 44.149684] libata version 1.20 loaded.
[ 44.150943] sata_uli 0000:00:12.1: version 0.5
[ 44.151008] ACPI: PCI Interrupt 0000:00:12.1[A] -> GSI 19 (level, low) -> IRQ 18
[ 44.151158] ata1: SATA max UDMA/133 cmd 0xEC00 ctl 0xE082 bmdma 0xD880 irq 18
[ 44.170724] hub 1-0:1.0: USB hub found
[ 44.170786] hub 1-0:1.0: 3 ports detected
[ 44.205168] ata2: SATA max UDMA/133 cmd 0xE000 ctl 0xDC02 bmdma 0xD888 irq 18
[ 44.276441] GSI 20 sharing vector 0xC9 and IRQ 20
[ 44.276495] ACPI: PCI Interrupt 0000:00:13.1[B] -> GSI 21 (level, low) -> IRQ 20
[ 44.276866] ohci_hcd 0000:00:13.1: OHCI Host Controller
[ 44.276977] ohci_hcd 0000:00:13.1: new USB bus registered, assigned bus number 2
[ 44.277049] ohci_hcd 0000:00:13.1: irq 20, io mem 0xfebfc000
[ 44.334350] hub 2-0:1.0: USB hub found
[ 44.334411] hub 2-0:1.0: 3 ports detected
[ 44.420250] ata1: dev 0 cfg 49:2f00 82:746b 83:7f01 84:4023 85:7468 86:3c01 87:4023 88:40ff
[ 44.420256] ata1: dev 0 ATA-7, max UDMA7, 488397168 sectors: LBA48
[ 44.420405] ata1: dev 0 configured for UDMA/133
[ 44.420458] scsi0 : sata_uli
[ 44.440679] GSI 21 sharing vector 0xD1 and IRQ 21
[ 44.440732] ACPI: PCI Interrupt 0000:00:13.2[C] -> GSI 22 (level, low) -> IRQ 21
[ 44.440967] ohci_hcd 0000:00:13.2: OHCI Host Controller
[ 44.441081] ohci_hcd 0000:00:13.2: new USB bus registered, assigned bus number 3
[ 44.441152] ohci_hcd 0000:00:13.2: irq 21, io mem 0xfebfb000
[ 44.501994] hub 3-0:1.0: USB hub found
[ 44.502051] hub 3-0:1.0: 3 ports detected
[ 44.607891] GSI 22 sharing vector 0xD9 and IRQ 22
[ 44.607945] ACPI: PCI Interrupt 0000:00:13.3[D] -> GSI 23 (level, low) -> IRQ 22
[ 44.608224] ehci_hcd 0000:00:13.3: EHCI Host Controller
[ 44.608972] ehci_hcd 0000:00:13.3: debug port 1
[ 44.636773] ehci_hcd 0000:00:13.3: new USB bus registered, assigned bus number 4
[ 44.636859] ehci_hcd 0000:00:13.3: irq 22, io mem 0xfebfe800
[ 44.636914] ehci_hcd 0000:00:13.3: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
[ 44.637050] hub 4-0:1.0: USB hub found
[ 44.637101] hub 4-0:1.0: 8 ports detected
[ 44.640916] ata2: dev 0 cfg 49:2f00 82:746b 83:7f01 84:4023 85:7468 86:3c01 87:4023 88:40ff
[ 44.640922] ata2: dev 0 ATA-7, max UDMA7, 488397168 sectors: LBA48
[ 44.641074] ata2: dev 0 configured for UDMA/133
[ 44.641121] scsi1 : sata_uli
[ 44.641298] Vendor: ATA Model: SAMSUNG SP2504C Rev: VT10
[ 44.642261] Type: Direct-Access ANSI SCSI revision: 05
[ 44.642449] Vendor: ATA Model: SAMSUNG SP2504C Rev: VT10
[ 44.643412] Type: Direct-Access ANSI SCSI revision: 05
[ 44.744928] ACPI: PCI Interrupt 0000:04:07.0[A] -> GSI 22 (level, low) -> IRQ 21
[ 44.745021] 3c59x: Donald Becker and others. www.scyld.com/network/vortex.html
[ 44.745083] 0000:04:07.0: 3Com PCI 3c900 Boomerang 10baseT at 000000000001cc00. Vers LK1.1.19
[ 44.759178] dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
[ 44.759260] ACPI: PCI Interrupt 0000:04:05.0[A] -> GSI 20 (level, low) -> IRQ 19
[ 45.001435] dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x57
[ 45.001495] dc395x: AdaptMode=0x0f, Tags=4(16), DelayReset=1s
[ 45.001545] dc395x: Connectors: Termination: Auto Low High
[ 45.001763] dc395x: Performing initial SCSI bus reset
[ 45.002336] scsi2 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
[ 46.505989] Vendor: HP Model: C2520A Rev: 3503
[ 46.506957] Type: Processor ANSI SCSI revision: 02
[ 49.521068] SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
[ 49.521134] SCSI device sda: drive cache: write back
[ 49.521310] SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
[ 49.521368] SCSI device sda: drive cache: write back
[ 49.521418] sda: sda1 sda2 sda3
[ 49.532840] sd 0:0:0:0: Attached scsi disk sda
[ 49.532954] SCSI device sdb: 488397168 512-byte hdwr sectors (250059 MB)
[ 49.533015] SCSI device sdb: drive cache: write back
[ 49.538723] SCSI device sdb: 488397168 512-byte hdwr sectors (250059 MB)
[ 49.538788] SCSI device sdb: drive cache: write back
[ 49.538836] sdb: sdb1 sdb2 sdb3
[ 49.546372] sd 1:0:0:0: Attached scsi disk sdb
[ 50.245898] hda: ATAPI 48X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)
[ 50.246211] Uniform CD-ROM driver Revision: 3.20
[ 50.285481] md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
[ 50.285536] md: bitmap version 4.39
[ 50.288382] md: raid1 personality registered as nr 3
[ 50.295375] md: raid0 personality registered as nr 2
[ 50.371093] md: md0 stopped.
[ 50.372014] md: bind<sdb1>
[ 50.372233] md: bind<sda1>
[ 50.372363] raid1: raid set md0 active with 2 out of 2 mirrors
[ 50.384641] md: md1 stopped.
[ 50.385487] md: bind<sdb2>
[ 50.385702] md: bind<sda2>
[ 50.385761] md1: setting max_sectors to 128, segment boundary to 32767
[ 50.385814] raid0: looking at sda2
[ 50.385858] raid0: comparing sda2(8787456) with sda2(8787456)
[ 50.385936] raid0: END
[ 50.385979] raid0: ==> UNIQUE
[ 50.386023] raid0: 1 zones
[ 50.386075] raid0: looking at sdb2
[ 50.386120] raid0: comparing sdb2(8787456) with sda2(8787456)
[ 50.386198] raid0: EQUAL
[ 50.386241] raid0: FINAL 1 zones
[ 50.386286] raid0: done.
[ 50.386330] raid0 : md_size is 17574912 blocks.
[ 50.386376] raid0 : conf->hash_spacing is 17574912 blocks.
[ 50.386423] raid0 : nb_zone is 1.
[ 50.386467] raid0 : Allocating 8 bytes for hash.
[ 50.398699] device-mapper: 4.4.0-ioctl (2005-01-12) initialised: dm-devel@redhat.com
[ 50.415941] cdrom: open failed.
[ 50.497161] ReiserFS: dm-0: found reiserfs format "3.6" with standard journal
[ 51.088548] ReiserFS: dm-0: using ordered data mode
[ 51.094115] ReiserFS: dm-0: journal params: device dm-0, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
[ 51.096598] ReiserFS: dm-0: checking transaction log (dm-0)
[ 51.138663] ReiserFS: dm-0: Using r5 hash to sort names
[ 52.678502] uli526x: ULi M5261/M5263 net driver, version 0.9.3 (2005-7-29)
[ 52.678630] GSI 23 sharing vector 0xE1 and IRQ 23
[ 52.678679] ACPI: PCI Interrupt 0000:00:11.0[A] -> GSI 17 (level, low) -> IRQ 23
[ 52.700514] eth1: ULi M5263 at pci0000:00:11.0, 00:13:8f:70:07:df, irq 23.
[ 52.737240] pnp: the driver 'parport_pc' has been registered
[ 52.737260] pnp: match found with the PnP device '00:05' and the driver 'parport_pc'
[ 52.737264] parport: PnPBIOS parport detected.
[ 52.737425] parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE,EPP]
[ 52.816544] input: PC Speaker as /class/input/input1
[ 52.837764] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 52.837835] sd 1:0:0:0: Attached scsi generic sg1 type 0
[ 52.837896] 2:0:2:0: Attached scsi generic sg2 type 3
[ 52.852344] Real Time Clock Driver v1.12
[ 52.884591] ali1563: SMBus control = 0403
[ 52.884690] ali1563_probe: Returning 0
[ 52.892825] Linux video capture interface: v1.00
[ 52.958455] logips2pp: Detected unknown logitech mouse model 1
[ 53.047483] input: PS/2 Logitech Mouse as /class/input/input2
[ 53.098652] Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
[ 53.114270] GSI 24 sharing vector 0xE9 and IRQ 24
[ 53.114326] ACPI: PCI Interrupt 0000:00:08.0[A] -> GSI 18 (level, low) -> IRQ 24
[ 53.158090] bttv: driver version 0.9.16 loaded
[ 53.158145] bttv: using 8 buffers with 2080k (520 pages) each for capture
[ 53.354981] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 53.407182] pnp: the driver 'serial' has been registered
[ 53.407249] pnp: match found with the PnP device '00:0c' and the driver 'serial'
[ 53.407407] 00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 54.134472] AC'97 1 does not respond - RESET
[ 54.135068] AC'97 1 access is not valid [0xffffffff], removing mixer.
[ 54.135118] Unable to initialize codec #1
[ 54.194358] intel8x0_measure_ac97_clock: measured 58726 usecs
[ 54.194406] intel8x0: clocking to 48000
[ 54.195061] bttv: Bt8xx card found (0).
[ 54.195125] ACPI: PCI Interrupt 0000:04:06.0[A] -> GSI 21 (level, low) -> IRQ 20
[ 54.195224] bttv0: Bt848 (rev 18) at 0000:04:06.0, irq: 20, latency: 32, mmio: 0xd7eff000
[ 54.195328] bttv0: using: *** UNKNOWN/GENERIC *** [card=0,autodetected]
[ 54.195412] bttv0: gpio: en=00000000, out=00000000 in=00fffffb [init]
[ 54.283702] bttv0: detected by eeprom: Hauppauge (bt848) [card=2]
[ 54.370868] tveeprom 1-0050: Hauppauge model 60114, rev CV , serial# 541274
[ 54.370919] tveeprom 1-0050: tuner model is Temic 4002FH5 (idx 14, type 0)
[ 54.370968] tveeprom 1-0050: TV standards PAL(B/G) (eeprom 0x04)
[ 54.371017] tveeprom 1-0050: audio processor is MSP3410D (idx 5)
[ 54.371065] tveeprom 1-0050: has no radio
[ 54.371110] bttv0: using tuner=0
[ 54.371156] bttv0: i2c: checking for MSP34xx @ 0x80... found
[ 54.421132] msp3400 1-0040: chip=MSP3410D-B4 +nicam +simple mode=simple
[ 54.421319] msp3400 1-0040: msp3410 daemon started
[ 54.441181] bttv0: i2c: checking for TDA9875 @ 0xb0... not found
[ 54.443399] bttv0: i2c: checking for TDA7432 @ 0x8a... not found
[ 54.476039] bttv0: i2c: checking for TDA9887 @ 0x86... not found
[ 54.509062] tuner 1-0061: chip found @ 0xc2 (bt848 #0 [sw])
[ 54.509145] tuner 1-0061: type set to 0 (Temic PAL (4002 FH5))
[ 54.540471] bttv0: registered device video0
[ 54.540534] bttv0: registered device vbi0
[ 55.353395] Adding 1911724k swap on /dev/sda3. Priority:-1 extents:1 across:1911724k
[ 55.372582] Adding 1911724k swap on /dev/sdb3. Priority:-2 extents:1 across:1911724k
[ 86.145612] ReiserFS: dm-1: found reiserfs format "3.6" with standard journal
[ 93.815153] ReiserFS: dm-1: using ordered data mode
[ 93.827359] ReiserFS: dm-1: journal params: device dm-1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
[ 93.829927] ReiserFS: dm-1: checking transaction log (dm-1)
[ 93.924830] ReiserFS: dm-1: Using r5 hash to sort names
[ 94.007660] ReiserFS: md1: found reiserfs format "3.6" with standard journal
[ 94.929992] ReiserFS: md1: using ordered data mode
[ 94.953085] ReiserFS: md1: journal params: device md1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
[ 94.955592] ReiserFS: md1: checking transaction log (md1)
[ 94.966630] ReiserFS: md1: Using r5 hash to sort names
[ 96.139055] ACPI: PCI Interrupt 0000:04:07.0[A] -> GSI 22 (level, low) -> IRQ 21
[ 97.173742] NET: Registered protocol family 17
[ 99.159228] ACPI: Power Button (FF) [PWRF]
[ 99.159324] ACPI: Power Button (CM) [PWRB]
[ 100.008805] lp0: using parport0 (interrupt-driven).
[ 105.609877] nvidia: module license 'NVIDIA' taints kernel.
[ 105.614825] GSI 25 sharing vector 0x32 and IRQ 25
[ 105.614832] ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 25 (level, low) -> IRQ 25
[ 105.615205] PCI: Setting latency timer of device 0000:01:00.0 to 64
[ 105.615676] NVRM: loading NVIDIA Linux x86_64 NVIDIA Kernel Module 1.0-8178 Wed Dec 14 16:58:07 PST 2005
[ 344.852017] dc395x: reselect: w/o disconnected cmds <02-0>
[ 344.852038] dc395x: disconnect: Unexpected reselection <02-0>
[ 464.630090] dc395x: eh_abort: (pid#2002) target=<02-0> cmd=ffff8100743c04c0
[ 464.630096] dc395x: eh_abort: Command in progress<6>dc395x: eh_bus_reset: (pid#2002) target=<02-0> cmd=ffff8100743c04c0
[ 464.630623] dc395x: doing_srb_done: pids G:2002(02-0)
[ 528.066303] dc395x: reselect: w/o disconnected cmds <02-0>
[ 528.066324] dc395x: disconnect: Unexpected reselection <02-0>
[ 647.842343] dc395x: eh_abort: (pid#2130) target=<02-0> cmd=ffff81007cc1b5c0
[ 647.842350] dc395x: eh_abort: Command in progress<6>dc395x: eh_abort: (pid#2131) target=<02-0> cmd=ffff81007cc1b780
[ 647.842356] dc395x: eh_abort: Command was waiting
[ 657.823181] dc395x: eh_abort: (pid#2131) target=<02-0> cmd=ffff81007cc1b780
[ 657.823188] dc395x: eh_abort: Command was waiting
[ 657.823196] dc395x: eh_bus_reset: (pid#2130) target=<02-0> cmd=ffff81007cc1b5c0
[ 657.823717] dc395x: doing_srb_done: pids G:2130(02-0)
Do you need any other information?
Cheers // Fredrik Roubert
--
Sörbyplan 5 | +46 8 7609169 / +46 708 776974
SE-163 71 Spånga | http://www.df.lth.se/~roubert/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-15 21:43 ` Fredrik Roubert
@ 2006-02-15 22:33 ` Guennadi Liakhovetski
2006-02-16 11:30 ` Fredrik Roubert
0 siblings, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-02-15 22:33 UTC (permalink / raw)
To: Fredrik Roubert; +Cc: linux-scsi
Thanks for the dump.
On Wed, 15 Feb 2006, Fredrik Roubert wrote:
> This is the output from dmesg, from boot until second failed scan:
...
> [ 344.852017] dc395x: reselect: w/o disconnected cmds <02-0>
> [ 344.852038] dc395x: disconnect: Unexpected reselection <02-0>
> [ 464.630090] dc395x: eh_abort: (pid#2002) target=<02-0> cmd=ffff8100743c04c0
> [ 464.630096] dc395x: eh_abort: Command in progress<6>dc395x: eh_bus_reset: (pid#2002) target=<02-0> cmd=ffff8100743c04c0
> [ 464.630623] dc395x: doing_srb_done: pids G:2002(02-0)
> [ 528.066303] dc395x: reselect: w/o disconnected cmds <02-0>
> [ 528.066324] dc395x: disconnect: Unexpected reselection <02-0>
> [ 647.842343] dc395x: eh_abort: (pid#2130) target=<02-0> cmd=ffff81007cc1b5c0
> [ 647.842350] dc395x: eh_abort: Command in progress<6>dc395x: eh_abort: (pid#2131) target=<02-0> cmd=ffff81007cc1b780
> [ 647.842356] dc395x: eh_abort: Command was waiting
> [ 657.823181] dc395x: eh_abort: (pid#2131) target=<02-0> cmd=ffff81007cc1b780
> [ 657.823188] dc395x: eh_abort: Command was waiting
> [ 657.823196] dc395x: eh_bus_reset: (pid#2130) target=<02-0> cmd=ffff81007cc1b5c0
> [ 657.823717] dc395x: doing_srb_done: pids G:2130(02-0)
Ok, I will assume that this dump includes the KERN_DEBUG messages too now.
Still, could you, please, just verify that you don't have anything else
from dc395x in your /var/log/kern.log (if you have one)? If there's
nothing new there you don't have to send it.
This means, PIO is not entered now any more, although the same "reselect
without disconnect" events happen. The only reason for this I can think
about is my addition of dma_mask to drivers/scsi/dc395x.c:
@@ -4834,6 +4904,9 @@
irq = dev->irq;
dprintkdbg(DBG_0, "IO_PORT=0x%04lx, IRQ=0x%x\n", io_port_base, dev->irq);
+ if ((ret = pci_set_dma_mask(dev, DMA_32BIT_MASK)))
+ goto fail;
+
/* allocate scsi host information (includes out adapter) */
scsi_host = scsi_host_alloc(&dc395x_driver_template,
sizeof(struct AdapterCtlBlk));
Could you, please, remove / comment out these 2 lines and try again? If
then PIO comes back, I would first try to verify / debug / fix it, and
then, as it sems not to be the main problem, we'll study the 2nd problem.
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-15 22:33 ` Guennadi Liakhovetski
@ 2006-02-16 11:30 ` Fredrik Roubert
2006-02-16 20:33 ` Guennadi Liakhovetski
0 siblings, 1 reply; 27+ messages in thread
From: Fredrik Roubert @ 2006-02-16 11:30 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
On Wed 15 Feb 23:33 CET 2006, Guennadi Liakhovetski wrote:
> Ok, I will assume that this dump includes the KERN_DEBUG messages too now.
So would I, or else the "reselect: w/o disconnected cmds" wouldn't be
there.
> Still, could you, please, just verify that you don't have anything else
> from dc395x in your /var/log/kern.log (if you have one)?
There is nothing else there, or in /var/log/debug.
> Could you, please, remove / comment out these 2 lines and try again?
OK, this is the log from loading the new module until the second failed
scan:
[49712.862170] dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
[49712.862190] ACPI: PCI Interrupt 0000:04:05.0[A] -> GSI 20 (level, low) -> IRQ 19
[49713.104766] dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x57
[49713.104772] dc395x: AdaptMode=0x0f, Tags=4(16), DelayReset=1s
[49713.104778] dc395x: Connectors: Termination: Auto Low High
[49713.080481] dc395x: Performing initial SCSI bus reset
[49713.081006] scsi3 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
[49714.608526] Vendor: HP Model: C2520A Rev: 3503
[49714.608566] Type: Processor ANSI SCSI revision: 02
[49714.608654] 3:0:2:0: Attached scsi generic sg2 type 3
[49787.196864] dc395x: reselect: w/o disconnected cmds <02-0>
[49787.196886] dc395x: disconnect: Unexpected reselection <02-0>
[49906.975135] dc395x: eh_abort: (pid#899) target=<02-0> cmd=ffff81006cbd6d40
[49906.975148] dc395x: eh_abort: Command in progress<6>dc395x: eh_bus_reset: (pid#899) target=<02-0> cmd=ffff81006cbd6d40
[49906.975675] dc395x: doing_srb_done: pids G:899(02-0)
[50083.137467] dc395x: reselect: w/o disconnected cmds <02-0>
[50083.137487] dc395x: disconnect: Unexpected reselection <02-0>
[50202.914281] dc395x: eh_abort: (pid#3210) target=<02-0> cmd=ffff81006cbd6640
[50202.914288] dc395x: eh_abort: Command in progress<6>dc395x: eh_bus_reset: (pid#3210) target=<02-0> cmd=ffff81006cbd6640
[50202.914816] dc395x: doing_srb_done: pids G:3210(02-0)
Cheers // Fredrik Roubert
--
Sörbyplan 5 | +46 8 7609169 / +46 708 776974
SE-163 71 Spånga | http://www.df.lth.se/~roubert/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-16 11:30 ` Fredrik Roubert
@ 2006-02-16 20:33 ` Guennadi Liakhovetski
2006-02-18 22:41 ` Fredrik Roubert
0 siblings, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-02-16 20:33 UTC (permalink / raw)
To: Fredrik Roubert; +Cc: linux-scsi
Hi Fredrik
Thanks for your help so far, and, please, don't give up - I know it's,
probably, much easier for you to just through away the damn thing (dc315)
and get something modern, but - what about the fun?:-)
On Thu, 16 Feb 2006, Fredrik Roubert wrote:
> On Wed 15 Feb 23:33 CET 2006, Guennadi Liakhovetski wrote:
...
> > Could you, please, remove / comment out these 2 lines and try again?
>
> OK, this is the log from loading the new module until the second failed
> scan:
Looks like all those lengths / counters are somewhat less consistent than
what I'd hoped for. Please, try the patch below on the top of your
current version - it MUST trigger. With the vanilla 2.6.15 the first
"reselect w/o disconnect" message, after each boot / insmod dc395x, was
_always_ accompanied by requests to contact linux-scsi, right?
Thanks
Guennadi
---
Guennadi Liakhovetski
diff -u a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
--- a/drivers/scsi/dc395x.c 14 Feb 2006 06:25:54 -0000 1.1.1.9.4.2
+++ b/drivers/scsi/dc395x.c 16 Feb 2006 20:18:05 -0000
@@ -2269,7 +2269,7 @@
* seem to be a bad idea, actually.
*/
if (!(srb->state & SRB_XFERPAD)) {
- unsigned int d_left_counter;
+ unsigned int d_left_counter, sc, fc;
if (scsi_status & PARITYERROR) {
dprintkl(KERN_INFO, "data_in_phase0: (pid#%li) "
"Parity Error\n", srb->cmd->pid);
@@ -2306,18 +2306,18 @@
DC395x_read8(acb, TRM_S1040_DMA_FIFOSTAT));
}
/* Now: Check remainig data: The SCSI counters should tell us ... */
- d_left_counter = DC395x_read32(acb, TRM_S1040_SCSI_COUNTER)
- + ((DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT) & 0x1f)
- << ((srb->dcb->sync_period & WIDE_SYNC) ? 1 :
- 0));
+ sc = DC395x_read32(acb, TRM_S1040_SCSI_COUNTER);
+ fc = DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT);
+ d_left_counter = sc + ((fc & 0x1f) <<
+ ((srb->dcb->sync_period & WIDE_SYNC) ? 1 : 0));
dprintkdbg(DBG_KG, "data_in_phase0: "
"SCSI{fifocnt=0x%02x%s ctr=0x%08x} "
"DMA{fifocnt=0x%02x fifostat=0x%02x ctr=0x%08x} "
"Remain{totxfer=%i scsi_fifo+ctr=%i}\n",
- DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT),
+ fc,
(srb->dcb->sync_period & WIDE_SYNC) ? "words" : "bytes",
DC395x_read32(acb, TRM_S1040_SCSI_COUNTER),
- DC395x_read8(acb, TRM_S1040_DMA_FIFOCNT),
+ fc,
DC395x_read8(acb, TRM_S1040_DMA_FIFOSTAT),
DC395x_read32(acb, TRM_S1040_DMA_CXCNT),
srb->total_xfer_length, d_left_counter);
@@ -2331,7 +2331,7 @@
/*sg_update_list (srb, d_left_counter); */
dprintkdbg(DBG_PIO, "data_in_phase0: PIO (%i %s) "
"for remaining %i bytes:",
- DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT) & 0x1f,
+ fc & 0x1f,
(srb->dcb->sync_period & WIDE_SYNC) ?
"words" : "bytes",
srb->total_xfer_length);
@@ -2339,6 +2339,9 @@
DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2,
CFG2_WIDEFIFO);
+ printk(KERN_INFO "%s[%d]: %u, %u, %u, %u, %x, %d\n", __FILE__, __LINE__,
+ left_io, d_left_counter, sc, fc, srb->dcb->sync_period & WIDE_SYNC, srb->cmd->use_sg);
+
while (left_io) {
unsigned char *virt, *base = NULL;
unsigned long flags = 0;
@@ -2566,6 +2569,9 @@
DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2,
CFG2_WIDEFIFO);
+ printk(KERN_INFO "%s[%d]: %u, %x, %d\n", __FILE__, __LINE__,
+ left_io, srb->dcb->sync_period & WIDE_SYNC, srb->cmd->use_sg);
+
while (left_io) {
unsigned char *virt, *base = NULL;
unsigned long flags = 0;
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-16 20:33 ` Guennadi Liakhovetski
@ 2006-02-18 22:41 ` Fredrik Roubert
2006-02-19 20:54 ` Guennadi Liakhovetski
0 siblings, 1 reply; 27+ messages in thread
From: Fredrik Roubert @ 2006-02-18 22:41 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
On Thu 16 Feb 21:33 CET 2006, Guennadi Liakhovetski wrote:
> I know it's, probably, much easier for you to just through away the damn
> thing (dc315) and get something modern, but - what about the fun?:-)
Oh, just changing hardware to avoid having to solve a software problem
isn't really my style ... ;-)
> Please, try the patch below on the top of your current version - it MUST
> trigger.
Here is the dmesg output from that test run:
[262653.162293] dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
[262653.162314] ACPI: PCI Interrupt 0000:04:05.0[A] -> GSI 20 (level, low) -> IRQ 19
[262653.404392] dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x57
[262653.404398] dc395x: AdaptMode=0x0f, Tags=4(16), DelayReset=1s
[262653.404403] dc395x: Connectors: Termination: Auto Low High
[262653.404466] dc395x: Performing initial SCSI bus reset
[262653.404985] scsi4 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
[262655.033158] Vendor: HP Model: C2520A Rev: 3503
[262655.033171] Type: Processor ANSI SCSI revision: 02
[262655.034138] 4:0:2:0: Attached scsi generic sg2 type 3
[262675.061545] drivers/scsi/dc395x.c[2572]: 2, 0, 0
[262676.044080] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.073044] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.102258] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.131515] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.353526] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.402529] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.418709] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.434949] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.451199] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.467416] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.483808] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.500094] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.520097] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.536219] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.599101] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.615137] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.631210] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.647318] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.663580] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.683896] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.747918] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.774339] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.810508] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.813529] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.838307] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.864369] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.936742] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.952765] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.968897] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262676.985074] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262677.001171] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262683.504018] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262683.530334] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262683.566400] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262683.569421] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262683.594330] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262683.620404] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262687.173095] drivers/scsi/dc395x.c[2572]: 2, 0, 0
[262687.198697] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262713.038424] drivers/scsi/dc395x.c[2572]: 2, 0, 0
[262713.064027] drivers/scsi/dc395x.c[2572]: 4, 0, 0
[262725.911499] dc395x: reselect: w/o disconnected cmds <02-0>
[262725.911521] dc395x: disconnect: Unexpected reselection <02-0>
[262845.687267] dc395x: eh_abort: (pid#1007) target=<02-0> cmd=ffff810075fe3dc0
[262845.687274] dc395x: eh_abort: Command in progress<6>dc395x: eh_abort: (pid#1008) target=<02-0> cmd=ffff810075fe3880
[262845.687280] dc395x: eh_abort: Command was waiting
[262855.668103] dc395x: eh_abort: (pid#1008) target=<02-0> cmd=ffff810075fe3880
[262855.668111] dc395x: eh_abort: Command was waiting
[262855.668119] dc395x: eh_bus_reset: (pid#1007) target=<02-0> cmd=ffff810075fe3dc0
[262855.668640] dc395x: doing_srb_done: pids G:1007(02-0)
[262865.663561] drivers/scsi/dc395x.c[2572]: 2, 0, 0
> With the vanilla 2.6.15 the first "reselect w/o disconnect" message,
> after each boot / insmod dc395x, was _always_ accompanied by requests to
> contact linux-scsi, right?
Yes, it was. (But I didn't do it many times, so it _could_ have been a
coincidence that I got the message each time I tried.)
Cheers // Fredrik Roubert
--
Sörbyplan 5 | +46 8 7609169 / +46 708 776974
SE-163 71 Spånga | http://www.df.lth.se/~roubert/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-18 22:41 ` Fredrik Roubert
@ 2006-02-19 20:54 ` Guennadi Liakhovetski
2006-02-23 15:37 ` Fredrik Roubert
0 siblings, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-02-19 20:54 UTC (permalink / raw)
To: Fredrik Roubert; +Cc: linux-scsi
On Sat, 18 Feb 2006, Fredrik Roubert wrote:
> Here is the dmesg output from that test run:
>
> [262653.162293] dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> [262653.162314] ACPI: PCI Interrupt 0000:04:05.0[A] -> GSI 20 (level, low) -> IRQ 19
> [262653.404392] dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x57
> [262653.404398] dc395x: AdaptMode=0x0f, Tags=4(16), DelayReset=1s
> [262653.404403] dc395x: Connectors: Termination: Auto Low High
> [262653.404466] dc395x: Performing initial SCSI bus reset
> [262653.404985] scsi4 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> [262655.033158] Vendor: HP Model: C2520A Rev: 3503
> [262655.033171] Type: Processor ANSI SCSI revision: 02
> [262655.034138] 4:0:2:0: Attached scsi generic sg2 type 3
> [262675.061545] drivers/scsi/dc395x.c[2572]: 2, 0, 0
> [262676.044080] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.073044] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.102258] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.131515] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.353526] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.402529] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.418709] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.434949] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.451199] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.467416] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.483808] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.500094] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.520097] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.536219] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.599101] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.615137] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.631210] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.647318] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.663580] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.683896] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.747918] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.774339] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.810508] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.813529] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.838307] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.864369] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.936742] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.952765] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.968897] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.985074] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262677.001171] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262683.504018] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262683.530334] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262683.566400] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262683.569421] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262683.594330] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262683.620404] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262687.173095] drivers/scsi/dc395x.c[2572]: 2, 0, 0
> [262687.198697] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262713.038424] drivers/scsi/dc395x.c[2572]: 2, 0, 0
> [262713.064027] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262725.911499] dc395x: reselect: w/o disconnected cmds <02-0>
> [262725.911521] dc395x: disconnect: Unexpected reselection <02-0>
> [262845.687267] dc395x: eh_abort: (pid#1007) target=<02-0> cmd=ffff810075fe3dc0
> [262845.687274] dc395x: eh_abort: Command in progress<6>dc395x: eh_abort: (pid#1008) target=<02-0> cmd=ffff810075fe3880
> [262845.687280] dc395x: eh_abort: Command was waiting
> [262855.668103] dc395x: eh_abort: (pid#1008) target=<02-0> cmd=ffff810075fe3880
> [262855.668111] dc395x: eh_abort: Command was waiting
> [262855.668119] dc395x: eh_bus_reset: (pid#1007) target=<02-0> cmd=ffff810075fe3dc0
> [262855.668640] dc395x: doing_srb_done: pids G:1007(02-0)
> [262865.663561] drivers/scsi/dc395x.c[2572]: 2, 0, 0
Ok, this tells us, that on your system PIO is triggered only on the
"write" path and when scattergather are not used. This means that, 1) we
won't be able to test the most interesting part of the proposed PIO fix -
scattergather remapping, and 2) your problem might be in hardware rather
than in software. For the latter I have to ask you if your cables are ok?
Termination? Maybe replace the cable? Do you have any other SCSI card
where you also could test your scanner? If you don't think it's a hardware
problem, we might try to look more exactly how this error (unexpected
reselect) occurs, how it is related to failing DMA (that's when PIO is
invoked), and verify if the PIO code is correct / fix it.
After you confirm that your cables and termination are fine, I would ask
you to do a few more tests to look more exactly at what's happening, and
to verify at least the non-sg path of my patch. So, would you agree to
help me further with the tests or would you rather or would you prefer to
stop now?
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-19 20:54 ` Guennadi Liakhovetski
@ 2006-02-23 15:37 ` Fredrik Roubert
2006-02-23 22:25 ` Guennadi Liakhovetski
0 siblings, 1 reply; 27+ messages in thread
From: Fredrik Roubert @ 2006-02-23 15:37 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
On Sun 19 Feb 21:54 CET 2006, Guennadi Liakhovetski wrote:
> 2) your problem might be in hardware rather than in software. For the
> latter I have to ask you if your cables are ok? Termination? Maybe
> replace the cable? Do you have any other SCSI card where you also could
> test your scanner?
The scanner works OK when connected to my old AHA1542 controller in my
old computer. The two SCSI controllers have different connectors, so the
cable I'm using now is also new, and untested. It could, no doubt, be a
problem with either the cable or the SCSI controller hardware.
> After you confirm that your cables and termination are fine,
It's fine, as far as I know. It's a brand new cable and I just plugged
it in replacing the old cable. Do you have any suggestions as to how I
could test cable and termination?
> I would ask you to do a few more tests to look more exactly at what's
> happening, and to verify at least the non-sg path of my patch. So, would
> you agree to help me further with the tests or would you rather or would
> you prefer to stop now?
Of course I'd like to help out. (How else would Linux continue to
improve?) Just tell me what you want me to do.
Cheers // Fredrik Roubert
--
Sörbyplan 5 | +46 8 7609169 / +46 708 776974
SE-163 71 Spånga | http://www.df.lth.se/~roubert/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-23 15:37 ` Fredrik Roubert
@ 2006-02-23 22:25 ` Guennadi Liakhovetski
2006-02-24 22:16 ` Guennadi Liakhovetski
0 siblings, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-02-23 22:25 UTC (permalink / raw)
To: Fredrik Roubert; +Cc: linux-scsi
On Thu, 23 Feb 2006, Fredrik Roubert wrote:
> On Sun 19 Feb 21:54 CET 2006, Guennadi Liakhovetski wrote:
>
> > 2) your problem might be in hardware rather than in software. For the
> > latter I have to ask you if your cables are ok? Termination? Maybe
> > replace the cable? Do you have any other SCSI card where you also could
> > test your scanner?
>
> The scanner works OK when connected to my old AHA1542 controller in my
> old computer. The two SCSI controllers have different connectors, so the
> cable I'm using now is also new, and untested. It could, no doubt, be a
> problem with either the cable or the SCSI controller hardware.
Ok, if you could connect the scanner to the same PC but to a different
SCSI card, that would with a good probability confirm that the scanner is
ok. Still, it is at least theoretically possible, that a bug in the
scanner's firmware is triggered by some, e.g., timing pattern specific to
the dc315u, though within specs. Just to say I don't see a good way to
exclude the scanner as the cause of the problem with 100% probability.
> > After you confirm that your cables and termination are fine,
>
> It's fine, as far as I know. It's a brand new cable and I just plugged
> it in replacing the old cable. Do you have any suggestions as to how I
> could test cable and termination?
Not really. You have the same problem with the old and the new cable?
Then, most probably, it's not the cause of the problem. Termination is
switched on on the scanner or is it a passive terminator on the cable?
E.g., on my scanner there's no active termination (I think).
> > I would ask you to do a few more tests to look more exactly at what's
> > happening, and to verify at least the non-sg path of my patch. So, would
> > you agree to help me further with the tests or would you rather or would
> > you prefer to stop now?
>
> Of course I'd like to help out. (How else would Linux continue to
> improve?) Just tell me what you want me to do.
Great! While I am preparing a new debugging patch, could you, perhaps,
test your scanner + dc315u + pc with some live Linux CDs? Some 32-bit i386
like Knoppix, also interesting with 2.6 and 2.4 kernel?
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-02-23 22:25 ` Guennadi Liakhovetski
@ 2006-02-24 22:16 ` Guennadi Liakhovetski
0 siblings, 0 replies; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-02-24 22:16 UTC (permalink / raw)
To: Fredrik Roubert; +Cc: linux-scsi
On Thu, 23 Feb 2006, Guennadi Liakhovetski wrote:
> Great! While I am preparing a new debugging patch, could you, perhaps,
> test your scanner + dc315u + pc with some live Linux CDs? Some 32-bit i386
> like Knoppix, also interesting with 2.6 and 2.4 kernel?
While at it, at the bottom of this email there's a new debugging patch.
Please, try and send the output back as usual.
One more question to your previous report:
On Sat, 18 Feb 2006, Fredrik Roubert wrote:
> Here is the dmesg output from that test run:
>
> [262653.162293] dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> [262653.162314] ACPI: PCI Interrupt 0000:04:05.0[A] -> GSI 20 (level, low) -> IRQ 19
> [262653.404392] dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x57
> [262653.404398] dc395x: AdaptMode=0x0f, Tags=4(16), DelayReset=1s
> [262653.404403] dc395x: Connectors: Termination: Auto Low High
> [262653.404466] dc395x: Performing initial SCSI bus reset
> [262653.404985] scsi4 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> [262655.033158] Vendor: HP Model: C2520A Rev: 3503
> [262655.033171] Type: Processor ANSI SCSI revision: 02
> [262655.034138] 4:0:2:0: Attached scsi generic sg2 type 3
In this 20 seconds, I presume, you started the scan, right?
> [262675.061545] drivers/scsi/dc395x.c[2572]: 2, 0, 0
> [262676.044080] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.073044] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.102258] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.131515] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.353526] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.402529] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.418709] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.434949] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.451199] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.467416] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.483808] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.500094] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.520097] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.536219] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.599101] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.615137] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.631210] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.647318] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.663580] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.683896] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.747918] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.774339] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.810508] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.813529] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.838307] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.864369] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.936742] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.952765] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.968897] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262676.985074] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262677.001171] drivers/scsi/dc395x.c[2572]: 4, 0, 0
Do you have an idea what happened during these 7 seconds?
> [262683.504018] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262683.530334] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262683.566400] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262683.569421] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262683.594330] drivers/scsi/dc395x.c[2572]: 4, 0, 0
> [262683.620404] drivers/scsi/dc395x.c[2572]: 4, 0, 0
4 more seconds...
> [262687.173095] drivers/scsi/dc395x.c[2572]: 2, 0, 0
> [262687.198697] drivers/scsi/dc395x.c[2572]: 4, 0, 0
6 more...
> [262713.038424] drivers/scsi/dc395x.c[2572]: 2, 0, 0
> [262713.064027] drivers/scsi/dc395x.c[2572]: 4, 0, 0
Now, 12 seconds later - "unexpected reselect".
> [262725.911499] dc395x: reselect: w/o disconnected cmds <02-0>
> [262725.911521] dc395x: disconnect: Unexpected reselection <02-0>
> [262845.687267] dc395x: eh_abort: (pid#1007) target=<02-0> cmd=ffff810075fe3dc0
> [262845.687274] dc395x: eh_abort: Command in progress<6>dc395x: eh_abort: (pid#1008) target=<02-0> cmd=ffff810075fe3880
> [262845.687280] dc395x: eh_abort: Command was waiting
> [262855.668103] dc395x: eh_abort: (pid#1008) target=<02-0> cmd=ffff810075fe3880
> [262855.668111] dc395x: eh_abort: Command was waiting
> [262855.668119] dc395x: eh_bus_reset: (pid#1007) target=<02-0> cmd=ffff810075fe3dc0
> [262855.668640] dc395x: doing_srb_done: pids G:1007(02-0)
> [262865.663561] drivers/scsi/dc395x.c[2572]: 2, 0, 0
So, do you have an idea - is it really so that you start the scanning
in the first 20-second long interval, and then it just lasts all the time
after that, or was there a preview, or something else?
Thanks
Guennadi
---
Guennadi Liakhovetski
diff -u a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
--- a/drivers/scsi/dc395x.c 2006-02-24 22:43:53.000000000 +0100
+++ b/drivers/scsi/dc395x.c 2006-02-24 22:44:41.000000000 +0100
@@ -64,6 +64,7 @@
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
+#include <scsi/scsi_dbg.h>
#include "dc395x.h"
@@ -1403,10 +1404,10 @@
}
srb = find_cmd(cmd, &dcb->srb_going_list);
if (srb) {
- dprintkl(KERN_DEBUG, "eh_abort: Command in progress");
+ dprintkl(KERN_DEBUG, "eh_abort: Command in progress\n");
/* XXX: Should abort the command here */
} else {
- dprintkl(KERN_DEBUG, "eh_abort: Command not found");
+ dprintkl(KERN_DEBUG, "eh_abort: Command not found\n");
}
return FAILED;
}
@@ -2569,8 +2570,10 @@
DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2,
CFG2_WIDEFIFO);
- printk(KERN_INFO "%s[%d]: %u, %x, %d\n", __FILE__, __LINE__,
- left_io, srb->dcb->sync_period & WIDE_SYNC, srb->cmd->use_sg);
+ printk(KERN_INFO "%s[%d]: %u/%u, %p, %d\n", __FILE__, __LINE__,
+ left_io, srb->request_length,
+ srb->cmd, srb->cmd->use_sg);
+ __scsi_print_command(srb->cmd->data_cmnd);
while (left_io) {
unsigned char *virt, *base = NULL;
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
[not found] ` <Pine.LNX.4.60.0606042022540.24306@poirot.grange>
@ 2006-06-05 8:26 ` Lev A. Melnikovsky
2006-06-05 10:58 ` Guennadi Liakhovetski
0 siblings, 1 reply; 27+ messages in thread
From: Lev A. Melnikovsky @ 2006-06-05 8:26 UTC (permalink / raw)
To: linux-scsi; +Cc: Jamie Lenehan, Guennadi Liakhovetski
Hi!
I'm (also) having problems with my dc395x and HP C6270A scanner. The log
contains multiple "Unexpected reselection" messages, so I assume this has
something to do with the earlier report. Sorry, if my assumption is wrong.
I'm using [x]sane[d] (FC5 official rpm) to control the scanner. The
problem is ~50% reproducible. Sometimes the scanning is successful, but
sometimes it hangs for several minutes and reports and I/O Error
(earlier sane versions segfaulted here, but the modern one does not).
I have tried the patch from
http://marc.theaimsgroup.com/?l=linux-scsi&m=114400790021967&w=2
but it did not really change anything observable. The log (scsi_mod
scsi_logging_level=15) follows:
--------------------------------------------------------------------
00:25:46: SCSI subsystem initialized
00:25:46: dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
00:25:46: ACPI: PCI Interrupt 0000:00:09.0[A] -> Link [LNKD] -> GSI 5 (level, low) -> IRQ 5
00:25:46: Error handler scsi_eh_0 sleeping
00:25:46: dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x45
00:25:46: dc395x: AdaptMode=0x0f, Tags=4(16), DelayReset=1s
00:25:46: dc395x: Connectors: ext50 Termination: Auto Low High
00:25:46: dc395x: Performing initial SCSI bus reset
00:25:46: scsi0 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
00:25:46: scsi_add_timer: scmd: c9988cc0, time: 1375, (d09692d0)
00:25:47: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:25:47: scsi_add_timer: scmd: c9988cc0, time: 1375, (d09692d0)
00:25:47: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:25:47: scsi_add_timer: scmd: c9988cc0, time: 1375, (d09692d0)
00:25:47: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:25:47: Vendor: HP Model: C6270A Rev: 3828
00:25:47: Type: Processor ANSI SCSI revision: 02
00:25:47: scsi_add_timer: scmd: c9988cc0, time: 1375, (d09692d0)
00:25:47: 0:0:2:0: Attached scsi generic sg0 type 3
00:25:47: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:25:47: scsi_add_timer: scmd: c9988cc0, time: 1375, (d09692d0)
00:25:48: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:25:48: scsi_add_timer: scmd: c9988cc0, time: 1375, (d09692d0)
00:25:48: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:25:48: scsi_add_timer: scmd: c9988cc0, time: 1375, (d09692d0)
00:25:48: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:25:48: scsi_add_timer: scmd: c9988cc0, time: 1375, (d09692d0)
00:25:48: scsi_delete_timer: scmd: c9988cc0, rtn: 1
...
00:31:11: scsi_add_timer: scmd: c9988cc0, time: 30000, (d09692d0)
00:31:11: scsi_delete_timer: scmd: c99881c0, rtn: 1
00:31:11: scsi_add_timer: scmd: c99881c0, time: 30000, (d09692d0)
00:31:11: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:31:11: scsi_add_timer: scmd: c9988cc0, time: 30000, (d09692d0)
00:31:12: scsi_delete_timer: scmd: c99881c0, rtn: 1
00:31:12: scsi_add_timer: scmd: c99881c0, time: 30000, (d09692d0)
00:31:12: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:31:12: dc395x: disconnect: Unexpected reselection <02-0>
00:31:12: scsi_add_timer: scmd: c9988cc0, time: 30000, (d09692d0)
00:33:12: Waking error handler thread
00:33:12: Error handler scsi_eh_0 waking up
00:33:12: 0:0:2:0: scsi_eh_prt_fail_stats: cmds failed: 0, cancel: 2
00:33:12: Total of 2 commands on 1 devices require eh work
00:33:12: scsi_eh_0: aborting cmd:0xc99881c0
00:33:12: dc395x: eh_abort: (pid#4496) target=<02-0> cmd=c99881c0
00:33:12: scsi_eh_0: aborting cmd failed:0xc99881c0
00:33:12: scsi_eh_0: aborting cmd:0xc9988cc0
00:33:12: dc395x: eh_abort: (pid#4497) target=<02-0> cmd=c9988cc0
00:33:22: scsi_send_eh_cmnd: scmd: c9988cc0, timeleft: 0
00:33:22: dc395x: eh_abort: (pid#4497) target=<02-0> cmd=c9988cc0
00:33:22: scsi_eh_tur: scmd c9988cc0 rtn 2003
00:33:22: scsi_eh_0: Sending BDR sdev: 0xcf141c00
00:33:22: scsi_eh_0: BDR failed sdev:0xcf141c00
00:33:22: scsi_eh_0: Sending BRST chan: 0
00:33:22: scsi_try_bus_reset: Snd Bus RST
00:33:22: dc395x: eh_bus_reset: (pid#4496) target=<02-0> cmd=c99881c0
00:33:22: dc395x: doing_srb_done: pids G:4496(02-0)
00:33:32: scsi_eh_done scmd: c99881c0 result: 8000002
00:33:32: scsi_send_eh_cmnd: scmd: c99881c0, timeleft: 2492
00:33:32: scsi_send_eh_cmnd: scsi_eh_completed_normally 2001
00:33:32: scsi_eh_tur: scmd c99881c0 rtn 2001
00:33:32: scsi_eh_done scmd: c99881c0 result: 0
00:33:32: scsi_send_eh_cmnd: scmd: c99881c0, timeleft: 2500
00:33:32: scsi_send_eh_cmnd: scsi_eh_completed_normally 2002
00:33:32: scsi_eh_tur: scmd c99881c0 rtn 2002
00:33:32: scsi_eh_done scmd: c9988cc0 result: 0
00:33:32: scsi_send_eh_cmnd: scmd: c9988cc0, timeleft: 2500
00:33:32: scsi_send_eh_cmnd: scsi_eh_completed_normally 2002
00:33:32: scsi_eh_tur: scmd c9988cc0 rtn 2002
00:33:32: scsi_eh_0: flush finish cmd: c99881c0
00:33:32: scsi_eh_0: flush finish cmd: c9988cc0
00:33:32: scsi_restart_operations: waking up host to restart
00:33:32: Error handler scsi_eh_0 sleeping
00:33:32: scsi_add_timer: scmd: c9988cc0, time: 30000, (d09692d0)
00:33:32: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:33:32: scsi_add_timer: scmd: c9988cc0, time: 30000, (d09692d0)
00:33:32: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:33:32: scsi_add_timer: scmd: c9988cc0, time: 30000, (d09692d0)
00:33:32: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:33:32: scsi_add_timer: scmd: c9988cc0, time: 30000, (d09692d0)
00:33:32: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:33:32: scsi_add_timer: scmd: c9988cc0, time: 30000, (d09692d0)
00:33:32: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:33:32: scsi_add_timer: scmd: c9988cc0, time: 30000, (d09692d0)
00:33:32: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:33:32: scsi_add_timer: scmd: c9988cc0, time: 30000, (d09692d0)
00:33:32: scsi_delete_timer: scmd: c9988cc0, rtn: 1
00:33:32: scsi_add_timer: scmd: c9988cc0, time: 30000, (d09692d0)
...
--------------------------------------------------------------------
This scanner is the only device on the bus. My understanding is that I
don't need to manually terminate anything, please correct me if I'm wrong.
I can not guarantee that this is not a hardware problem, but, as far as I
remember, it did not show (this often) under 2.4 kernel (with the same
hardware setup).
My configuration follows:
Linux 2.6.16.19 #9 Sun Jun 4 22:30:07 MSD 2006 i686 i686 i386 GNU/Linux
$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 11
model name : Intel(R) Celeron(TM) CPU 1300MHz
stepping : 1
cpu MHz : 1303.107
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips : 2608.88
$ free
total used free shared buffers cached
Mem: 256164 242876 13288 0 13456 176828
-/+ buffers/cache: 52592 203572
Swap: 530136 0 530136
$lspci -v
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 03)
Subsystem: ASUSTeK Computer Inc. Unknown device 8024
Flags: bus master, medium devsel, latency 64
Memory at e4000000 (32-bit, prefetchable) [size=64M]
Capabilities: [a0] AGP version 1.0
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03) (prog-if 00 [Normal decode])
Flags: bus master, 66MHz, medium devsel, latency 64
Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
Memory behind bridge: d4000000-d5efffff
Prefetchable memory behind bridge: d7700000-e3ffffff
...
00:09.0 SCSI storage controller: Tekram Technology Co.,Ltd. TRM-S1040 (rev 01)
Subsystem: Tekram Technology Co.,Ltd. TRM-S1040
Flags: medium devsel, IRQ 5
I/O ports at d000 [size=256]
Memory at d3800000 (32-bit, non-prefetchable) [size=4K]
[virtual] Expansion ROM at 20080000 [disabled] [size=64K]
Capabilities: [dc] Power Management version 1
This is Asus P3B-F motherboard.
I will appreciate any help.
Thanks
-L.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-06-05 8:26 ` Lev A. Melnikovsky
@ 2006-06-05 10:58 ` Guennadi Liakhovetski
2006-06-05 21:37 ` Lev A. Melnikovsky
0 siblings, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-06-05 10:58 UTC (permalink / raw)
To: Lev A. Melnikovsky; +Cc: linux-scsi, Jamie Lenehan
On Mon, 5 Jun 2006, Lev A. Melnikovsky wrote:
> I'm (also) having problems with my dc395x and HP C6270A scanner. The log
> contains multiple "Unexpected reselection" messages, so I assume this has
> something to do with the earlier report. Sorry, if my assumption is wrong.
I'm afraid your assumption is correct:-)
> I'm using [x]sane[d] (FC5 official rpm) to control the scanner. The problem is
> ~50% reproducible. Sometimes the scanning is successful, but sometimes it
> hangs for several minutes and reports and I/O Error (earlier sane versions
> segfaulted here, but the modern one does not).
>
> I have tried the patch from
> http://marc.theaimsgroup.com/?l=linux-scsi&m=114400790021967&w=2
> but it did not really change anything observable.
Same as with other 2 (I think) reporters.
> The log (scsi_mod scsi_logging_level=15) follows:
Well, 15 is a little too small. As you've probably seen in
drivers/scsi/scsi_logging.h logging is a bitfield with 3 bits allocated
for every event-type (error, timer, etc.). Actually, if you have no other
SCSI devices in the system (including USB storage), I would try raising it
to the maximum ((1 << 30) - 1). The goal would be to try to see which
command exactly leads to unexpected reselect. Apart from that I have
little idea on how to debug it. If the log gets too big to be sent to the
list, please upload it somewhere and provide a link.
> This scanner is the only device on the bus. My understanding is that I don't
> need to manually terminate anything, please correct me if I'm wrong. I can not
The bus has to be terminated on both ends. The HBA is, probably,
terminating automatically, but the external end has to be terminated.
Either with an external terminator or with a switch / jumper on your
scanner.
> guarantee that this is not a hardware problem, but, as far as I remember, it
> did not show (this often) under 2.4 kernel (with the same hardware setup).
But it did show sometimes? On the same hardware?
> My configuration follows:
>
> Linux 2.6.16.19 #9 Sun Jun 4 22:30:07 MSD 2006 i686 i686 i386 GNU/Linux
>
> $ cat /proc/cpuinfo
>
> processor : 0
> vendor_id : GenuineIntel
> cpu family : 6
> model : 11
> model name : Intel(R) Celeron(TM) CPU 1300MHz
> stepping : 1
> cpu MHz : 1303.107
> cache size : 256 KB
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid level : 2
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
> pse36 mmx fxsr sse
> bogomips : 2608.88
>
> $ free
> total used free shared buffers cached
> Mem: 256164 242876 13288 0 13456 176828
> -/+ buffers/cache: 52592 203572
> Swap: 530136 0 530136
Which confirms that this problem is not 64 bit or highmem specific.
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-06-05 10:58 ` Guennadi Liakhovetski
@ 2006-06-05 21:37 ` Lev A. Melnikovsky
2006-06-05 22:14 ` Guennadi Liakhovetski
0 siblings, 1 reply; 27+ messages in thread
From: Lev A. Melnikovsky @ 2006-06-05 21:37 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi, Jamie Lenehan
Dear Guennadi,
On Mon, 5 Jun 2006 at 12:58pm, Guennadi Liakhovetski wrote:
> I would try raising it to the maximum ((1 << 30) - 1). The goal would be
> to try to see which command exactly leads to unexpected reselect.
OK, scsi_logging_level=4294967295
Now it was very difficult to reproduce the problem, probably due
to different timing. I have eventually managed to reproduce it, but the
log size is over 10MB. You can fetch the compressed file (~100KB) from
http://kapitza.ras.ru/~leva/dc395x.log.bz2
sane stops at 00:47:47 and reports "Error during read: Error during device
I/O" at 00:49:47.
Here's just a short piece from the log:
-----------------------------------------------------------
00:47:47: scsi_add_timer: scmd: c39e6b60, time: 30000, (d09862d0)
00:47:47: 0:0:2:0: send 0xc39e6b60 0:0:2:0:
00:47:47: command: Read (6): 08 00 00 80 00 00
00:47:47: buffer = 0xc5736dc0, bufflen = 32768, done = 0xd0988510, queuecommand 0xd0903c90
00:47:47: leaving scsi_dispatch_cmnd()
00:47:47: sg_poll: sg0, res=0x104
00:47:47: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:47:47: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:47:47: command: Read (6): 08 00 00 80 00 00
00:47:47: scsi host busy 2 failed 0
00:47:47: 0:0:2:0: Notifying upper driver of completion (result 0)
00:47:47: 64 sectors total, 32768 bytes done.
00:47:47: use_sg is 8
00:47:47: sg_cmd_done: sg0, pack_id=5190, res=0x0
00:47:47: sg_poll: sg0, res=0x145
00:47:47: sg_read: sg0, count=64
00:47:47: sg_read_xfer: num_xfer=32768, iovec_count=0, k_use_sg=1
00:47:47: sg_finish_rem_req: res_used=0
00:47:47: sg_remove_scat: k_use_sg=1
00:47:47: sg_remove_scat: k=0, a=0xc105b500, len=32768
00:47:47: sg_write: sg0, count=64
00:47:47: sg_common_write: scsi opcode=0x08, cmd_size=6
00:47:47: sg_start_req: dxfer_len=32768
00:47:47: sg_build_indirect: buff_size=32768, blk_size=32768
00:47:47: sg_build_build: k=0, a=0xc105b500, len=32768
00:47:47: sg_build_indirect: k_use_sg=1, rem_sz=0
00:47:47: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:47:47: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:47:47: command: Read (6): 08 00 00 80 00 00
00:47:47: buffer = 0xc57360c0, bufflen = 32768, done = 0xd0988510, queuecommand 0xd0903c90
00:47:47: leaving scsi_dispatch_cmnd()
00:47:47: sg_poll: sg0, res=0x104
00:47:47: scsi_delete_timer: scmd: c39e6b60, rtn: 1
00:47:47: 0:0:2:0: done 0xc39e6b60 SUCCESS 0 0:0:2:0:
00:47:47: command: Read (6): 08 00 00 80 00 00
00:47:47: scsi host busy 2 failed 0
00:47:47: 0:0:2:0: Notifying upper driver of completion (result 0)
00:47:47: 64 sectors total, 32768 bytes done.
00:47:47: use_sg is 8
00:47:47: sg_cmd_done: sg0, pack_id=5191, res=0x0
00:47:47: sg_poll: sg0, res=0x145
00:47:47: sg_read: sg0, count=64
00:47:47: sg_read_xfer: num_xfer=32768, iovec_count=0, k_use_sg=1
00:47:47: sg_finish_rem_req: res_used=1
00:47:47: sg_unlink_reserve: req->k_use_sg=1
00:47:47: sg_write: sg0, count=64
00:47:47: sg_common_write: scsi opcode=0x08, cmd_size=6
00:47:47: sg_start_req: dxfer_len=32768
00:47:47: sg_link_reserve: size=32768
00:47:47: scsi_add_timer: scmd: c39e6b60, time: 30000, (d09862d0)
00:47:47: 0:0:2:0: send 0xc39e6b60 0:0:2:0:
00:47:47: command: Read (6): 08 00 00 80 00 00
00:47:47: buffer = 0xc5736dc0, bufflen = 32768, done = 0xd0988510, queuecommand 0xd0903c90
00:47:47: leaving scsi_dispatch_cmnd()
00:47:47: sg_poll: sg0, res=0x104
00:47:47: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:47:47: 0:0:2:0: done 0xc39e61c0 SUCCESS<7>dc395x: reselect: w/o disconnected cmds <02-0>
00:47:47: dc395x: disconnect: Unexpected reselection <02-0>
00:47:47: 0 0:0:2:0:
00:47:47: command: Read (6): 08 00 00 80 00 00
00:47:47: scsi host busy 2 failed 0
00:47:47: 0:0:2:0: Notifying upper driver of completion (result 0)
00:47:47: 64 sectors total, 32768 bytes done.
00:47:47: use_sg is 8
00:47:47: sg_cmd_done: sg0, pack_id=5192, res=0x0
00:47:47: sg_poll: sg0, res=0x145
00:47:47: sg_read: sg0, count=64
00:47:47: sg_read_xfer: num_xfer=32768, iovec_count=0, k_use_sg=1
00:47:47: sg_finish_rem_req: res_used=0
00:47:47: sg_remove_scat: k_use_sg=1
00:47:47: sg_remove_scat: k=0, a=0xc105b500, len=32768
00:47:47: sg_write: sg0, count=64
00:47:47: sg_common_write: scsi opcode=0x08, cmd_size=6
00:47:47: sg_start_req: dxfer_len=32768
00:47:47: sg_build_indirect: buff_size=32768, blk_size=32768
00:47:47: sg_build_build: k=0, a=0xc105b500, len=32768
00:47:47: sg_build_indirect: k_use_sg=1, rem_sz=0
00:47:47: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:47:47: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:47:47: command: Read (6): 08 00 00 80 00 00
00:47:47: buffer = 0xc57360c0, bufflen = 32768, done = 0xd0988510, queuecommand 0xd0903c90
00:47:47: leaving scsi_dispatch_cmnd()
00:47:47: sg_poll: sg0, res=0x104
00:49:47: 0:0:2:0: done 0xc39e6b60 TIMEOUT 0 0:0:2:0:
00:49:47: command: Read (6): 08 00 00 80 00 00
00:49:47: scsi host busy 2 failed 0
00:49:47: 0:0:2:0: done 0xc39e61c0 TIMEOUT 0 0:0:2:0:
00:49:47: command: Read (6): 08 00 00 80 00 00
00:49:47: scsi host busy 2 failed 1
00:49:47: Waking error handler thread
00:49:47: Error handler scsi_eh_0 waking up
00:49:47: 0:0:2:0: scsi_eh_prt_fail_stats: cmds failed: 0, cancel: 2
00:49:47: Total of 2 commands on 1 devices require eh work
00:49:47: scsi_eh_0: aborting cmd:0xc39e6b60
00:49:47: dc395x: eh_abort: (pid#9382) target=<02-0> cmd=c39e6b60
00:49:47: scsi_eh_0: aborting cmd failed:0xc39e6b60
00:49:47: scsi_eh_0: aborting cmd:0xc39e61c0
00:49:47: dc395x: eh_abort: (pid#9383) target=<02-0> cmd=c39e61c0
00:49:47: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:49:47: command: Test Unit Ready: 00 00 00 00 00 00
00:49:47: buffer = 0xc57360c0, bufflen = 32768, done = 0xd0988510, queuecommand 0xd0903c90
00:49:57: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:49:57: command: Test Unit Ready: 00 00 00 00 00 00
00:49:57: scsi host busy 2 failed 2
00:49:57: scsi_send_eh_cmnd: scmd: c39e61c0, timeleft: 0
00:49:57: dc395x: eh_abort: (pid#9383) target=<02-0> cmd=c39e61c0
00:49:57: scsi_eh_tur: scmd c39e61c0 rtn 2003
00:49:57: scsi_eh_0: Sending BDR sdev: 0xce976800
00:49:57: scsi_eh_0: BDR failed sdev:0xce976800
00:49:57: scsi_eh_0: Sending BRST chan: 0
00:49:57: scsi_try_bus_reset: Snd Bus RST
00:49:57: dc395x: eh_bus_reset: (pid#9382) target=<02-0> cmd=c39e6b60
00:49:57: dc395x: doing_srb_done: pids G:9382(02-0)
00:50:07: 0:0:2:0: send 0xc39e6b60 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0xc5736dc0, bufflen = 32768, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: scsi_eh_done scmd: c39e6b60 result: 8000002
00:50:07: 0:0:2:0: done 0xc39e6b60 SUCCESS 8000002 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: : Current: sense key: Unit Attention
00:50:07: Additional sense: No additional sense information
00:50:07: Info fld=0x0
00:50:07: scsi host busy 2 failed 2
00:50:07: scsi_send_eh_cmnd: scmd: c39e6b60, timeleft: 2492
00:50:07: scsi_send_eh_cmnd: scsi_eh_completed_normally 2001
00:50:07: scsi_eh_tur: scmd c39e6b60 rtn 2001
00:50:07: 0:0:2:0: send 0xc39e6b60 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0xc5736dc0, bufflen = 32768, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: scsi_eh_done scmd: c39e6b60 result: 0
00:50:07: 0:0:2:0: done 0xc39e6b60 SUCCESS 0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: scsi host busy 2 failed 2
00:50:07: scsi_send_eh_cmnd: scmd: c39e6b60, timeleft: 2500
00:50:07: scsi_send_eh_cmnd: scsi_eh_completed_normally 2002
00:50:07: scsi_eh_tur: scmd c39e6b60 rtn 2002
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0xc57360c0, bufflen = 32768, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: scsi_eh_done scmd: c39e61c0 result: 0
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: scsi host busy 2 failed 1
00:50:07: scsi_send_eh_cmnd: scmd: c39e61c0, timeleft: 2500
00:50:07: scsi_send_eh_cmnd: scsi_eh_completed_normally 2002
00:50:07: scsi_eh_tur: scmd c39e61c0 rtn 2002
00:50:07: scsi_eh_0: flush finish cmd: c39e6b60
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 80000)
00:50:07: 64 sectors total, 32768 bytes done.
00:50:07: use_sg is 8
00:50:07: sg_cmd_done: sg0, pack_id=5193, res=0x80000
00:50:07: scsi_eh_0: flush finish cmd: c39e61c0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 50000)
00:50:07: 64 sectors total, 32768 bytes done.
00:50:07: use_sg is 8
00:50:07: sg_cmd_done: sg0, pack_id=5194, res=0x50000
00:50:07: scsi_restart_operations: waking up host to restart
00:50:07: Error handler scsi_eh_0 sleeping
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_read_xfer: num_xfer=32768, iovec_count=0, k_use_sg=1
00:50:07: sg_finish_rem_req: res_used=1
00:50:07: sg_unlink_reserve: req->k_use_sg=1
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_read_xfer: num_xfer=32768, iovec_count=0, k_use_sg=1
00:50:07: sg_finish_rem_req: res_used=0
00:50:07: sg_remove_scat: k_use_sg=1
00:50:07: sg_remove_scat: k=0, a=0xc105b500, len=32768
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x12, cmd_size=6
00:50:07: sg_start_req: dxfer_len=36
00:50:07: sg_link_reserve: size=36
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: buffer = 0xc57360c0, bufflen = 36, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 36 bytes done.
00:50:07: use_sg is 1
00:50:07: sg_cmd_done: sg0, pack_id=4799, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_read_xfer: num_xfer=36, iovec_count=0, k_use_sg=1
00:50:07: sg_finish_rem_req: res_used=1
00:50:07: sg_unlink_reserve: req->k_use_sg=1
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x00, cmd_size=6
00:50:07: sg_start_req: dxfer_len=0
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0x00000000, bufflen = 0, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 0 bytes done.
00:50:07: use_sg is 0
00:50:07: sg_cmd_done: sg0, pack_id=4800, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_finish_rem_req: res_used=0
00:50:07: sg_remove_scat: k_use_sg=0
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x12, cmd_size=6
00:50:07: sg_start_req: dxfer_len=36
00:50:07: sg_link_reserve: size=36
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: buffer = 0xc57360c0, bufflen = 36, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 36 bytes done.
00:50:07: use_sg is 1
00:50:07: sg_cmd_done: sg0, pack_id=4801, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_read_xfer: num_xfer=36, iovec_count=0, k_use_sg=1
00:50:07: sg_finish_rem_req: res_used=1
00:50:07: sg_unlink_reserve: req->k_use_sg=1
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x00, cmd_size=6
00:50:07: sg_start_req: dxfer_len=0
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0x00000000, bufflen = 0, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 0 bytes done.
00:50:07: use_sg is 0
00:50:07: sg_cmd_done: sg0, pack_id=4802, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_finish_rem_req: res_used=0
00:50:07: sg_remove_scat: k_use_sg=0
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x12, cmd_size=6
00:50:07: sg_start_req: dxfer_len=36
00:50:07: sg_link_reserve: size=36
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: buffer = 0xc57360c0, bufflen = 36, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 36 bytes done.
00:50:07: use_sg is 1
00:50:07: sg_cmd_done: sg0, pack_id=4803, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_read_xfer: num_xfer=36, iovec_count=0, k_use_sg=1
00:50:07: sg_finish_rem_req: res_used=1
00:50:07: sg_unlink_reserve: req->k_use_sg=1
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x00, cmd_size=6
00:50:07: sg_start_req: dxfer_len=0
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0x00000000, bufflen = 0, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 0 bytes done.
00:50:07: use_sg is 0
00:50:07: sg_cmd_done: sg0, pack_id=4804, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_finish_rem_req: res_used=0
00:50:07: sg_remove_scat: k_use_sg=0
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x12, cmd_size=6
00:50:07: sg_start_req: dxfer_len=36
00:50:07: sg_link_reserve: size=36
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: buffer = 0xc57360c0, bufflen = 36, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 36 bytes done.
00:50:07: use_sg is 1
00:50:07: sg_cmd_done: sg0, pack_id=4805, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_read_xfer: num_xfer=36, iovec_count=0, k_use_sg=1
00:50:07: sg_finish_rem_req: res_used=1
00:50:07: sg_unlink_reserve: req->k_use_sg=1
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x00, cmd_size=6
00:50:07: sg_start_req: dxfer_len=0
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0x00000000, bufflen = 0, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 0 bytes done.
00:50:07: use_sg is 0
00:50:07: sg_cmd_done: sg0, pack_id=4806, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_finish_rem_req: res_used=0
00:50:07: sg_remove_scat: k_use_sg=0
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x12, cmd_size=6
00:50:07: sg_start_req: dxfer_len=36
00:50:07: sg_link_reserve: size=36
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: buffer = 0xc57360c0, bufflen = 36, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 36 bytes done.
00:50:07: use_sg is 1
00:50:07: sg_cmd_done: sg0, pack_id=4807, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_read_xfer: num_xfer=36, iovec_count=0, k_use_sg=1
00:50:07: sg_finish_rem_req: res_used=1
00:50:07: sg_unlink_reserve: req->k_use_sg=1
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x00, cmd_size=6
00:50:07: sg_start_req: dxfer_len=0
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0x00000000, bufflen = 0, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 0 bytes done.
00:50:07: use_sg is 0
00:50:07: sg_cmd_done: sg0, pack_id=4808, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_finish_rem_req: res_used=0
00:50:07: sg_remove_scat: k_use_sg=0
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x12, cmd_size=6
00:50:07: sg_start_req: dxfer_len=36
00:50:07: sg_link_reserve: size=36
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: buffer = 0xc57360c0, bufflen = 36, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 36 bytes done.
00:50:07: use_sg is 1
00:50:07: sg_cmd_done: sg0, pack_id=4809, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_read_xfer: num_xfer=36, iovec_count=0, k_use_sg=1
00:50:07: sg_finish_rem_req: res_used=1
00:50:07: sg_unlink_reserve: req->k_use_sg=1
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x00, cmd_size=6
00:50:07: sg_start_req: dxfer_len=0
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0x00000000, bufflen = 0, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 0 bytes done.
00:50:07: use_sg is 0
00:50:07: sg_cmd_done: sg0, pack_id=4810, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_finish_rem_req: res_used=0
00:50:07: sg_remove_scat: k_use_sg=0
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x12, cmd_size=6
00:50:07: sg_start_req: dxfer_len=36
00:50:07: sg_link_reserve: size=36
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: buffer = 0xc57360c0, bufflen = 36, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 36 bytes done.
00:50:07: use_sg is 1
00:50:07: sg_cmd_done: sg0, pack_id=4811, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_read_xfer: num_xfer=36, iovec_count=0, k_use_sg=1
00:50:07: sg_finish_rem_req: res_used=1
00:50:07: sg_unlink_reserve: req->k_use_sg=1
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x00, cmd_size=6
00:50:07: sg_start_req: dxfer_len=0
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0x00000000, bufflen = 0, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 0 bytes done.
00:50:07: use_sg is 0
00:50:07: sg_cmd_done: sg0, pack_id=4812, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_finish_rem_req: res_used=0
00:50:07: sg_remove_scat: k_use_sg=0
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x12, cmd_size=6
00:50:07: sg_start_req: dxfer_len=36
00:50:07: sg_link_reserve: size=36
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: buffer = 0xc57360c0, bufflen = 36, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 36 bytes done.
00:50:07: use_sg is 1
00:50:07: sg_cmd_done: sg0, pack_id=4813, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_read_xfer: num_xfer=36, iovec_count=0, k_use_sg=1
00:50:07: sg_finish_rem_req: res_used=1
00:50:07: sg_unlink_reserve: req->k_use_sg=1
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x00, cmd_size=6
00:50:07: sg_start_req: dxfer_len=0
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0x00000000, bufflen = 0, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 0 bytes done.
00:50:07: use_sg is 0
00:50:07: sg_cmd_done: sg0, pack_id=4814, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_finish_rem_req: res_used=0
00:50:07: sg_remove_scat: k_use_sg=0
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x12, cmd_size=6
00:50:07: sg_start_req: dxfer_len=36
00:50:07: sg_link_reserve: size=36
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: buffer = 0xc57360c0, bufflen = 36, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Inquiry: 12 00 00 00 24 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 36 bytes done.
00:50:07: use_sg is 1
00:50:07: sg_cmd_done: sg0, pack_id=4815, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_read_xfer: num_xfer=36, iovec_count=0, k_use_sg=1
00:50:07: sg_finish_rem_req: res_used=1
00:50:07: sg_unlink_reserve: req->k_use_sg=1
00:50:07: sg_write: sg0, count=64
00:50:07: sg_common_write: scsi opcode=0x00, cmd_size=6
00:50:07: sg_start_req: dxfer_len=0
00:50:07: scsi_add_timer: scmd: c39e61c0, time: 30000, (d09862d0)
00:50:07: 0:0:2:0: send 0xc39e61c0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: buffer = 0x00000000, bufflen = 0, done = 0xd0988510, queuecommand 0xd0903c90
00:50:07: leaving scsi_dispatch_cmnd()
00:50:07: sg_poll: sg0, res=0x104
00:50:07: scsi_delete_timer: scmd: c39e61c0, rtn: 1
00:50:07: 0:0:2:0: done 0xc39e61c0 SUCCESS 0 0:0:2:0:
00:50:07: command: Test Unit Ready: 00 00 00 00 00 00
00:50:07: scsi host busy 1 failed 0
00:50:07: 0:0:2:0: Notifying upper driver of completion (result 0)
00:50:07: 0 sectors total, 0 bytes done.
00:50:07: use_sg is 0
00:50:07: sg_cmd_done: sg0, pack_id=4816, res=0x0
00:50:07: sg_poll: sg0, res=0x145
00:50:07: sg_read: sg0, count=64
00:50:07: sg_finish_rem_req: res_used=0
00:50:07: sg_remove_scat: k_use_sg=0
-----------------------------------------------------------
>> This scanner is the only device on the bus. My understanding is that I don't
>> need to manually terminate anything, please correct me if I'm wrong. I can not
> The bus has to be terminated on both ends. The HBA is, probably,
> terminating automatically, but the external end has to be terminated.
> Either with an external terminator or with a switch / jumper on your
> scanner.
OK, let's put it in the following way: I can find neither switches nor
jumpers in it.
>> it did not show (this often) under 2.4 kernel (with the same hardware
> But it did show sometimes? On the same hardware?
The hardware is exactly the same. The card was driven by a separate
dc395x_trm module (by Kurt Garloff; I remember I was fixing something
myself since it did not compile under later 2.4 kernels). The problem
(I/O error during scanning) was rare and I did not care too much about it
(so I can not tell whether the log said something about reselects).
Thanks
-L.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-06-05 21:37 ` Lev A. Melnikovsky
@ 2006-06-05 22:14 ` Guennadi Liakhovetski
2006-06-06 22:57 ` Lev A. Melnikovsky
0 siblings, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-06-05 22:14 UTC (permalink / raw)
To: Lev A. Melnikovsky; +Cc: linux-scsi, Jamie Lenehan
On Tue, 6 Jun 2006, Lev A. Melnikovsky wrote:
> On Mon, 5 Jun 2006 at 12:58pm, Guennadi Liakhovetski wrote:
>
> > I would try raising it to the maximum ((1 << 30) - 1). The goal would be to
> > try to see which command exactly leads to unexpected reselect.
> OK, scsi_logging_level=4294967295
>
> Now it was very difficult to reproduce the problem, probably due to different
> timing. I have eventually managed to reproduce it, but the log size is over
> 10MB. You can fetch the compressed file (~100KB) from
> http://kapitza.ras.ru/~leva/dc395x.log.bz2
Great! Thanks for the effort! Now, I am very much hoping somebody more
knowledgeable about SCSI, this driver and / or having the datasheet could
have a look at the logs. I will do that too but it won't be easy for me to
understand what's going wrong there.
[skipped the log]
> > > This scanner is the only device on the bus. My understanding is that I
> > > don't
> > > need to manually terminate anything, please correct me if I'm wrong. I can
> > > not
> > The bus has to be terminated on both ends. The HBA is, probably,
> > terminating automatically, but the external end has to be terminated.
> > Either with an external terminator or with a switch / jumper on your
> > scanner.
> OK, let's put it in the following way: I can find neither switches nor jumpers
> in it.
Do you have the manual for the scanner? I don't know, maybe it has an
automatic internal terminator. If not, you need an external one. It has 2
SCSI connectors, right?
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-06-05 22:14 ` Guennadi Liakhovetski
@ 2006-06-06 22:57 ` Lev A. Melnikovsky
2006-06-07 21:28 ` Guennadi Liakhovetski
0 siblings, 1 reply; 27+ messages in thread
From: Lev A. Melnikovsky @ 2006-06-06 22:57 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
Dear Guennadi,
On Tue, 6 Jun 2006 at 12:14am, Guennadi Liakhovetski wrote:
>>>> This scanner is the only device on the bus. My understanding is that
>>>> I don't need to manually terminate anything, please correct me if I'm
>>>> wrong.
>>> The bus has to be terminated on both ends. The HBA is, probably,
>>> terminating automatically, but the external end has to be terminated.
>>> Either with an external terminator or with a switch / jumper on your
>>> scanner.
>> OK, let's put it in the following way: I can find neither switches nor jumpers
>> in it.
> Do you have the manual for the scanner?
No, I don't. And I can't find it at HP's site.
> I don't know, maybe it has an automatic internal terminator. If not, you
> need an external one. It has 2 SCSI connectors, right?
No. It has only one SCSI connector and this is why I assumed that I
shouldn't care about terminators.
Thanks
-L.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-06-06 22:57 ` Lev A. Melnikovsky
@ 2006-06-07 21:28 ` Guennadi Liakhovetski
2006-06-08 21:13 ` Lev A. Melnikovsky
0 siblings, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-06-07 21:28 UTC (permalink / raw)
To: Lev A. Melnikovsky; +Cc: linux-scsi
On Wed, 7 Jun 2006, Lev A. Melnikovsky wrote:
> No. It has only one SCSI connector and this is why I assumed that I shouldn't
> care about terminators.
Ok, let's assume for now it knows what to do...
Now, below is a patch... That's about all I can say about it:-) The
reselect routine didn't seem right to me, specifically, it checks for "no
active request-block or active request-block is not disconnected" and then
sends an abort to the device, but if there was indeed an active srb, it
gets lost, AFAICS. FWIW, tmscsim does the same... The patch below tries to
complete the command before dropping it on the floor... Any reviews
appreciated.
And there's one more page_address there in dc395x...
Warning, Lev - this patch may explode your scanner, or upload your bank
account info to p2p servers, or send your gpg keys to microsoft, or...
You've been warned:-) You might want to wait for some comments to the
patch...
Thanks
Guennadi
---
Guennadi Liakhovetski
Return the active request for retry to the upper layer in case of
"reselect without disconnect" instead of just losing it.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
diff -u -p a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
--- a/drivers/scsi/dc395x.c 30 Mar 2006 19:19:15 -0000
+++ b/drivers/scsi/dc395x.c 7 Jun 2006 21:07:34 -0000
@@ -3198,9 +3198,13 @@ static void reselect(struct AdapterCtlBl
/*
* abort command
*/
- dprintkl(KERN_DEBUG,
- "reselect: w/o disconnected cmds <%02i-%i>\n",
- dcb->target_id, dcb->target_lun);
+ dprintkl(KERN_WARNING,
+ "reselect: w/o disconnected cmds <%02i-%i> with%s active srb\n",
+ dcb->target_id, dcb->target_lun, srb ? "" : "out");
+ if (srb) {
+ SET_RES_DID(srb->cmd->result, DID_SOFT_ERROR);
+ srb_done(acb, dcb, srb);
+ }
srb = acb->tmp_srb;
srb->state = SRB_UNEXPECT_RESEL;
dcb->active_srb = srb;
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-06-07 21:28 ` Guennadi Liakhovetski
@ 2006-06-08 21:13 ` Lev A. Melnikovsky
2006-06-08 22:00 ` Guennadi Liakhovetski
2006-06-13 16:10 ` Guennadi Liakhovetski
0 siblings, 2 replies; 27+ messages in thread
From: Lev A. Melnikovsky @ 2006-06-08 21:13 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
Dear Guennadi,
> Return the active request for retry to the upper layer in case of
> "reselect without disconnect" instead of just losing it.
Oh, thank you for the patch. Now the scan is finished even if several
"reselect: w/o disconnected cmds <02-0> with active srb" happened during
the operation. A funny artifact though can be seen at the picture (this is
a ~800KB map of Japan http://kapitza.ras.ru/~leva/Japan.jpg ). It looks
like during each reselect a chunk of data is lost (or maybe transferred
twice?) and the data stream gets an offset. My understanding is that the
scan data are 8bits per color component which gives 24bits/pixel.
Any idea why it happens and how to fix it?
On Wed, 7 Jun 2006 at 11:28pm, Guennadi Liakhovetski wrote:
> Now, below is a patch... That's about all I can say about it:-) The
> reselect routine didn't seem right to me, specifically, it checks for "no
> active request-block or active request-block is not disconnected" and then
> sends an abort to the device, but if there was indeed an active srb, it
> gets lost, AFAICS. FWIW, tmscsim does the same... The patch below tries to
> complete the command before dropping it on the floor... Any reviews
> appreciated.
>
> And there's one more page_address there in dc395x...
>
> Warning, Lev - this patch may explode your scanner, or upload your bank
> account info to p2p servers, or send your gpg keys to microsoft, or...
> You've been warned:-) You might want to wait for some comments to the
> patch...
Thanks for the warning :-)
-L.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-06-08 21:13 ` Lev A. Melnikovsky
@ 2006-06-08 22:00 ` Guennadi Liakhovetski
2006-06-13 21:08 ` Lev A. Melnikovsky
2006-06-13 16:10 ` Guennadi Liakhovetski
1 sibling, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-06-08 22:00 UTC (permalink / raw)
To: Lev A. Melnikovsky; +Cc: linux-scsi, James Bottomley
On Fri, 9 Jun 2006, Lev A. Melnikovsky wrote:
> Dear Guennadi,
>
> > Return the active request for retry to the upper layer in case of
> > "reselect without disconnect" instead of just losing it.
> Oh, thank you for the patch. Now the scan is finished even if several
> "reselect: w/o disconnected cmds <02-0> with active srb" happened during the
> operation.
Wow, really! So, we are on the right track.
> A funny artifact though can be seen at the picture (this is a
> ~800KB map of Japan http://kapitza.ras.ru/~leva/Japan.jpg ). It looks like
> during each reselect a chunk of data is lost (or maybe transferred twice?) and
> the data stream gets an offset. My understanding is that the scan data are
> 8bits per color component which gives 24bits/pixel.
Nice pic, if you took a bit further West you'd scan Vladivostok - that's
where I come from:-)
> Any idea why it happens and how to fix it?
Well, I think, we just have to chose the right error-cods to return, this
controls the mid-layer bahaviour - whether to abort, or to resubmit, or
whatever. The error I returned (DID_SOFT_ERROR) means "retry". Honestly, I
don't know what's the correct error-code here. I can only guess. Well,
please, try DID_ABORT. Also, you can strace the application with complete
data log (strace -xx -s 1024 -o/tmp/scan.trace) and try to find if there
are duplicated blocks... Maybe we should just report an error to the
application and let it re-try? It seemed logical to me to ask for a retry.
James?
> On Wed, 7 Jun 2006 at 11:28pm, Guennadi Liakhovetski wrote:
>
> > Warning, Lev - this patch may explode your scanner, or upload your bank
> > account info to p2p servers, or send your gpg keys to microsoft, or...
> > You've been warned:-) You might want to wait for some comments to the
> > patch...
> Thanks for the warning :-)
Thanks for your courage:-)
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-06-08 21:13 ` Lev A. Melnikovsky
2006-06-08 22:00 ` Guennadi Liakhovetski
@ 2006-06-13 16:10 ` Guennadi Liakhovetski
1 sibling, 0 replies; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-06-13 16:10 UTC (permalink / raw)
To: Lev A. Melnikovsky; +Cc: Guennadi Liakhovetski, linux-scsi
On Fri, 9 Jun 2006, Lev A. Melnikovsky wrote:
> operation. A funny artifact though can be seen at the picture (this is a
> ~800KB map of Japan http://kapitza.ras.ru/~leva/Japan.jpg ). It looks like
> during each reselect a chunk of data is lost (or maybe transferred twice?) and
> the data stream gets an offset. My understanding is that the scan data are
> 8bits per color component which gives 24bits/pixel.
Lev, an easier possibility to test if bytes are lost or repeated: just
scan an image several times, saving it in an UNcompressed format, then, I
think, the size should always be the same, right? Then you can just
compare which file is bigger - the correct or the damaged one.
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-06-08 22:00 ` Guennadi Liakhovetski
@ 2006-06-13 21:08 ` Lev A. Melnikovsky
2006-06-13 21:44 ` Guennadi Liakhovetski
0 siblings, 1 reply; 27+ messages in thread
From: Lev A. Melnikovsky @ 2006-06-13 21:08 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi, James Bottomley
Dear Guennadi,
On Fri, 9 Jun 2006 at 12:00am, Guennadi Liakhovetski wrote:
> Nice pic, if you took a bit further West you'd scan Vladivostok - that's
> where I come from:-)
OK, moving West :-)
http://kapitza.ras.ru/~leva/Vladik.jpg
> Well, I think, we just have to chose the right error-cods to return,
> this controls the mid-layer bahaviour - whether to abort, or to
> resubmit, or whatever. The error I returned (DID_SOFT_ERROR) means
> "retry". Honestly, I don't know what's the correct error-code here. I
> can only guess. Well, please, try DID_ABORT.
Unfortunately this does not help. The picture above was acquired using
DID_ABORT. There's probably some minor difference in the driver behaviour
but I can not reliably say anything yet.
> Also, you can strace the application with complete
Well, stracing sane will be the last thing I'm going to try, honestly :-)
On Tue, 13 Jun 2006 at 6:10pm, Guennadi Liakhovetski wrote:
> Lev, an easier possibility to test if bytes are lost or repeated: just
> scan an image several times, saving it in an UNcompressed format, then,
> I think, the size should always be the same, right? Then you can just
> compare which file is bigger - the correct or the damaged one.
Image compression (jpeg) does not change the image dimensions. And
dimensions are always the same. Anyway, "sane" knows these dimensions
beforehand...
I remember you mentioned TRM-S1040 datasheet, is it publicly available?
How do I get one?
Thanks
-L.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Error using DC315U to drive ScanJet 4c
2006-06-13 21:08 ` Lev A. Melnikovsky
@ 2006-06-13 21:44 ` Guennadi Liakhovetski
0 siblings, 0 replies; 27+ messages in thread
From: Guennadi Liakhovetski @ 2006-06-13 21:44 UTC (permalink / raw)
To: Lev A. Melnikovsky; +Cc: linux-scsi, James Bottomley
On Wed, 14 Jun 2006, Lev A. Melnikovsky wrote:
> Dear Guennadi,
>
> On Fri, 9 Jun 2006 at 12:00am, Guennadi Liakhovetski wrote:
>
> > Nice pic, if you took a bit further West you'd scan Vladivostok - that's
> > where I come from:-)
> OK, moving West :-)
>
> http://kapitza.ras.ru/~leva/Vladik.jpg
Nice, thanks, but, unfortunately
"You don't have permission to access /~leva/Vladik.jpg on this server."
:-)
> > Well, I think, we just have to chose the right error-cods to return, this
> > controls the mid-layer bahaviour - whether to abort, or to resubmit, or
> > whatever. The error I returned (DID_SOFT_ERROR) means "retry". Honestly, I
> > don't know what's the correct error-code here. I can only guess. Well,
> > please, try DID_ABORT.
> Unfortunately this does not help. The picture above was acquired using
> DID_ABORT. There's probably some minor difference in the driver behaviour but
> I can not reliably say anything yet.
As you see, I couldn't see the picture, but I believe you it is not
pretty:-)
> > Also, you can strace the application with complete
> Well, stracing sane will be the last thing I'm going to try, honestly :-)
I would've thought so... But, actually, I don't think it would be bigger
than the scsi log you took... So, if you directly save the output to a
file, like
strace -tt -xx -s4096 -o/tmp/scan.strace ...
and, no, not sane but scanimage - just call it from the command line under
strace, but only if just comparing sizes fails (below)
> > Lev, an easier possibility to test if bytes are lost or repeated: just scan
> > an image several times, saving it in an UNcompressed format, then, I think,
> > the size should always be the same, right? Then you can just compare which
> > file is bigger - the correct or the damaged one.
> Image compression (jpeg) does not change the image dimensions. And dimensions
> are always the same. Anyway, "sane" knows these dimensions beforehand...
Emn, no, not image dimensions, but file-size. I would just put an image in
the scanner, and without further touching it just call scanimage from the
command-line several times, waiting to get 1 corrupted and 1 proper image.
And, I think, jpeg compresses "graphically", so, jpeg files might differ
even if you don't the image being scanned. Whereas uncompressed
image-formats should produce constant-size files. That's what I would
compare. Still, I think, at some point it would be interesting to compare
the actual data coming from /dev/sg* in error and error-free cases.
> I remember you mentioned TRM-S1040 datasheet, is it publicly available? How do
> I get one?
I think, I also mentioned that I wouldn't mind having it too. No, I didn't
find it online and nobody offered me one until now.
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2006-06-13 21:44 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-11 1:14 Error using DC315U to drive ScanJet 4c Fredrik Roubert
2006-02-11 21:06 ` Guennadi Liakhovetski
2006-02-12 23:47 ` Guennadi Liakhovetski
2006-02-13 17:10 ` Fredrik Roubert
2006-02-13 23:15 ` Guennadi Liakhovetski
[not found] ` <20060214010138.GJ18853@igloo.df.lth.se>
2006-02-14 5:59 ` Guennadi Liakhovetski
2006-02-15 20:15 ` Guennadi Liakhovetski
2006-02-15 21:43 ` Fredrik Roubert
2006-02-15 22:33 ` Guennadi Liakhovetski
2006-02-16 11:30 ` Fredrik Roubert
2006-02-16 20:33 ` Guennadi Liakhovetski
2006-02-18 22:41 ` Fredrik Roubert
2006-02-19 20:54 ` Guennadi Liakhovetski
2006-02-23 15:37 ` Fredrik Roubert
2006-02-23 22:25 ` Guennadi Liakhovetski
2006-02-24 22:16 ` Guennadi Liakhovetski
[not found] <Pine.LNX.4.64.0606042013200.14649@nev.ubzr>
[not found] ` <Pine.LNX.4.60.0606041850090.13574@poirot.grange>
[not found] ` <Pine.LNX.4.64.0606042201460.14649@nev.ubzr>
[not found] ` <Pine.LNX.4.60.0606042022540.24306@poirot.grange>
2006-06-05 8:26 ` Lev A. Melnikovsky
2006-06-05 10:58 ` Guennadi Liakhovetski
2006-06-05 21:37 ` Lev A. Melnikovsky
2006-06-05 22:14 ` Guennadi Liakhovetski
2006-06-06 22:57 ` Lev A. Melnikovsky
2006-06-07 21:28 ` Guennadi Liakhovetski
2006-06-08 21:13 ` Lev A. Melnikovsky
2006-06-08 22:00 ` Guennadi Liakhovetski
2006-06-13 21:08 ` Lev A. Melnikovsky
2006-06-13 21:44 ` Guennadi Liakhovetski
2006-06-13 16:10 ` Guennadi Liakhovetski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).