Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Oct 2003 16:27:04 +0530
From:      "Sarnath Kannan" <stellium_79@hotmail.com>
To:        aic7xxx@freebsd.org
Subject:   Data Overruns while WRITING in Ultra Wide Transfers in AHC2940
Message-ID:  <BAY2-F121moav8ObGEl000024e0@hotmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

Setup:
---------
I have ported the FreeBSD Aic7xxx driver to a proprietary OS. The OS runs on 
a MP box and has the AHC2940U card programmed in Target Mode. I have also 
implemented a "SD" device server that uses the AHC2940U card as a target 
port. The intent is to provide a high-IO-throughput-interface via the 
AHC2940U card. A Linux initiator is connected to the AHC2940U card via a 
68-pin SCSI-3 connector. The Linux box also uses a AHC2940U card as the 
initiator port. These are the only 2 devices sitting on the cable and the 
cable length is roughly 0.5 Meter.
Both the devices have negotiated synchronous FAST20 and WIDE transfers. i.e. 
40MegaTransfers per second. Linux detects my target as "sda" and I generate 
all IOs using this interface. I use
the "dd" program to generate IO on the target.
My driver works via Polling and I have disabled CMD_CMPLT interrupts in 
firmware. So I get interrupted only for SEQUENCER and SCSI interrupts.

Problem Description:
----------------------------
1) All reads go thru properly.
2) All WRITES cause DATA OVERRUN to occur on the INITIATOR SIDE (DATA OUT 
PHASE). The target side does not complain anything. IO finishes without 
residuals in the target side. I queue the correct amount of data for each 
IO. I have verified this. If I queue 2 bytes less than the actual data 
required, the initiator does NOT complain of any OVERRUNS. However an FS 
created over such a SCSI
target complains about corrupted free lists etc...
After this, I MESSAGE REJECTed WDTR messages thereby stopping WIDE 
transfers. (20 MegaTransfers per second.) With this Setup, WRITES go through 
properly without any problem. No overruns, No underruns. Just perfect.

What could be the problem ?  Am I missing something in the driver path OR 
WRITE path ? OR Has Ultra Transfers got something to do with cable length ? 
Should I go for a longer cable ? I currently dont have any alternate cable 
with me. I will buy one if the problem is in the cable.

As i understand therez no difference between a SCB queued for READ and WRITE 
except for the data direction. Each SCB carries information about the 
transfer settings. The SCB_SCSI_RATE - Has info on Synch Transfers, sync 
offset and Wide Transfers. FAST20 can be enabled via the SCB_CONTROL field.  
The tranfer period requested by the initiator is 0x0C and the req_ack_offset 
is 8, which I believe is FAST20 transfers. Please let me know if I am wrong 
in my understanding.

Thanks for ur patience,
Regds,
Sarnath

_________________________________________________________________
The coolest deals. The hottest offers. http://www.msn.co.in/shopping All now 
online for you!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY2-F121moav8ObGEl000024e0>