lkml.org 
[lkml]   [2001]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: Initio 9100 Driver for Linux
On Thu, 5 Jul 2001 11:32:12, bvermeul@devel.blackstar.nl wrote:

> > I have a problem with the driver for Initio SCSI Controller 9100 SCSI,
> > a dual channel UW SCSI-Controller. On checking the SCSI bus the systems
> > has problems to initialize the CD-RW Sanyo (aka Brainwave) BP4-N SCSI
> > The CD-RW has SCSI-ID 6 on the second Controller. It is shown on
> > system startup an GENERIC CRD-BP4
> >
> > I had this problem both with Kernel 2.2.17 and 2.2.19.
>
> Check your termination. The initio drivers are very sensitive to
> termination errors (use active if possible), and make sure you follow all
> the normal rules regarding scsi.
>
> Most problems I've seen are caused by lousy termination, or using three
> way busses. I've also seen some problems with some cd writers (Yamaha to
> be exact), that I haven't been able to solve yet.

There's a bug in i91uscsi.c, init_tulip where it cycles through the onboard NVRAM
config. On the controller there's a single byte per device but it cycles through the
NVRAM in words. Since x86 words are two bytes a piece this means that the
code uses the NVRAM config for the device on twice the SCSI id - the only one
that's right is the one on id 0.

The patch below has been working here since January - though I've just extracted
this one fix from a much larger modification that I've done to the driver - proc fs
support, merging of i91uscsi.h and ini9100u.h since they contain many of the
same definitions but the two definitions are different which looks extremely
dangerous to me! i91uscsi.h is no more here.

I may have missed something with this one fix.

--- drivers/scsi/i91uscsi.cold Thu Jul 5 20:50:04 2001
+++ drivers/scsi/i91uscsi.c Thu Jul 5 20:55:03 2001
@@ -590,8 +590,8 @@
int init_tulip(HCS * pCurHcb, SCB * scbp, int tul_num_scb, BYTE * pbBiosAdr, int seconds)
{
int i;
- BYTE *pwFlags;
BYTE *pbHeads;
+ UCHAR *pTarg;
SCB *pTmpScb, *pPrevScb = NULL;

pCurHcb->HCS_NumScbs = tul_num_scb;
@@ -673,12 +673,12 @@
TUL_WR(pCurHcb->HCS_Base + TUL_GCTRL1,
((pCurHcb->HCS_Config & HCC_AUTO_TERM) >> 4) | (TUL_RD(pCurHcb->HCS_Base, TUL_GCTRL1) & 0xFE));

+ pTarg = &i91unvramp->NVMSCSIInfo[0].MVM_Targ0Config;
for (i = 0,
- pwFlags = & (i91unvramp->NVM_SCSIInfo[0].NVM_Targ0Config),
pbHeads = pbBiosAdr + 0x180;
i < pCurHcb->HCS_MaxTar;
- i++, pwFlags++) {
- pCurHcb->HCS_Tcs[i].TCS_Flags = *pwFlags & ~(TCF_SYNC_DONE | TCF_WDTR_DONE);
+ i++) {
+ pCurHcb->HCS_Tcs[i].TCS_Flags = *(pTarg+i);
if (pCurHcb->HCS_Tcs[i].TCS_Flags & TCF_EN_255)
pCurHcb->HCS_Tcs[i].TCS_DrvFlags = TCF_DRV_255_63;
else

Trevor Hemsley, Brighton, UK.
Trevor-Hemsley@dial.pipex.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:56    [W:0.023 / U:2.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site