Re: dc395x: Report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, was on a holiday...

On Thu, 3 Aug 2006, Robert Annessi wrote:

> dc395x: Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> PCI: setting IRQ 11 as level-triggered
> PCI: Found IRQ 11 for device 0000:00:02.0
> dc395x: Used settings: AdapterID=07, Speed=0(20.0MHz), dev_mode=0x37
> dc395x:                AdaptMode=0x4e, Tags=0(01), DelayReset=1s
> dc395x: (Wide) Connectors: int68  Termination: Auto Low High
> dc395x: Performing initial SCSI bus reset
> scsi0 : Tekram DC395(U/UW/F), DC315(U) - ASIC TRM-S1040 v2.05, 2004/03/08
> dc395x: Target 00: Wide16 Sync: 48ns Offset 15 (41.7 MB/s)
>   Vendor: SEAGATE   Model: ST3146807LC       Rev: 0007
>   Type:   Direct-Access                      ANSI SCSI revision: 03
> SCSI device sda: 286749488 512-byte hdwr sectors (146816 MB)
> dc395x: inconsistent counters: FIFOCNT 64, left 16777215, wide

Ok, "left 16777215" = 0xffffff, which means we have read 0x01000000 from 
TRM_S1040_SCSI_COUNTER. There's a comment in the driver: 
".....TRM_S1040_SCSI_COUNTER (24bits)"

> > Well, this looks much better to me. So, I think, we may say for you the 
> > problem is solved. Globally, I think, the reason why other drivers have no 
> 
> For me the problem is definetely solved. Thank you!

Great, maybe you still could test the patch below (applied on the top of 
all my patches until now)?

Thanks
Guennadi
---
Guennadi Liakhovetski

--- drivers/scsi/dc395x.c-20060811	2006-08-12 19:56:50.000000000 +0200
+++ drivers/scsi/dc395x.c	2006-08-12 20:01:42.000000000 +0200
@@ -2123,7 +2123,7 @@
 		 */
 		if (srb->total_xfer_length > DC395x_LASTPIO)
 			d_left_counter +=
-			    DC395x_read32(acb, TRM_S1040_SCSI_COUNTER);
+			    DC395x_read32(acb, TRM_S1040_SCSI_COUNTER) & ((1 << 24) - 1);
 
 		/* Is this a good idea? */
 		/*clear_fifo(acb, "DOP1"); */
@@ -2253,7 +2253,7 @@
 				DC395x_read8(acb, TRM_S1040_DMA_FIFOSTAT));
 		}
 		/* Now: Check remainig data: The SCSI counters should tell us ... */
-		sc = DC395x_read32(acb, TRM_S1040_SCSI_COUNTER);
+		sc = DC395x_read32(acb, TRM_S1040_SCSI_COUNTER) & ((1 << 24) - 1);
 		fc = DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT);
 		d_left_counter = sc + ((fc & 0x1f)
 		       << ((srb->dcb->sync_period & WIDE_SYNC) ? 1 :
@@ -2307,6 +2307,14 @@
 
 				while (len) {
 					u8 byte;
+
+					fc = DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT);
+
+					if (fc == 0x40) {
+						left_io = 0;
+						break;
+					}
+
 					byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
 					*virt++ = byte;
 
@@ -2317,13 +2325,6 @@
 					sg_subtract_one(srb);
 
 					len--;
-
-					fc = DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT);
-
-					if (fc == 0x40) {
-						left_io = 0;
-						break;
-					}
 				}
 
 				if (((fc != 0x40) && !d_left_counter) ||
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux