Date: Sat, 11 Mar 1995 18:43:53 -0800 (PST) From: "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com> To: wilko@yedi.iaf.nl (Wilko Bulte) Cc: FreeBSD-hackers@FreeBSD.org Subject: Re: configuring 2 Ultrastore U24F cards in 1 system Message-ID: <199503120243.SAA04768@gndrsh.aac.dev.com> In-Reply-To: <199503112138.WAA00159@yedi.iaf.nl> from "Wilko Bulte" at Mar 11, 95 10:38:52 pm
next in thread | previous in thread | raw e-mail | index | archive | help
>
> Hi
>
> Has anybody ever tried to use 2 (or more) Ultrastore U24F EISA scsi cards
> in one system? If so, how does the kernel config file look like?
>
> I have 2 of these boards, and it looks like the driver doesnot correctly
> probe the cards. It finds the first card twice(..). ioconf.c as generated
> by config looks OK to me
>
I just took a quick look at the ultra14f.c driver, the code in routine
uha24_init(unit) is seriously broken with respect to more than one card.
It will always return the lowest slot numbered 24F it finds, try this
patch it should fix it.
Index: ultra14f.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/isa/ultra14f.c,v
retrieving revision 1.27
diff -c -r1.27 ultra14f.c
*** 1.27 1995/01/07 23:23:40
--- ultra14f.c 1995/03/12 02:43:20
***************
*** 274,279 ****
--- 274,281 ----
struct mscp *cheat;
unsigned long int scratch;
+ #define EISA_MAX_SLOTS 16 /* XXX This should go into a comon header */
+ static uha_slot = 0; /* slot last board was found in */
static uha_unit = 0;
#define UHA_SHOWMSCPS 0x01
#define UHA_SHOWINTS 0x02
***************
*** 923,940 ****
{
unsigned char p0, p1, p2, p3, p5, p7;
unsigned char id[7], rev, haid;
! int slot, port, irq, i;
int resetcount = 4000;
struct uha_data *uha = uhadata[unit];
struct uha_reg *ur = uhareg[unit];
struct uha_bits *ub = uhabits[unit];
/* Search for the 24F's product ID */
! for (slot = 1; slot < 15; slot++) {
/*
* Prepare to use a 24F.
*/
! port = EISA_CONFIG | (slot << 12);
ur->id = port + 0x00;
ur->type = port + 0x02;
ur->ectl = port + 0x04;
--- 925,943 ----
{
unsigned char p0, p1, p2, p3, p5, p7;
unsigned char id[7], rev, haid;
! int port = 0, irq, i;
int resetcount = 4000;
struct uha_data *uha = uhadata[unit];
struct uha_reg *ur = uhareg[unit];
struct uha_bits *ub = uhabits[unit];
/* Search for the 24F's product ID */
! while (uha_slot < EISA_MAX_SLOTS) {
! uha_slot++;
/*
* Prepare to use a 24F.
*/
! port = EISA_CONFIG | (uha_slot << 12);
ur->id = port + 0x00;
ur->type = port + 0x02;
ur->ectl = port + 0x04;
***************
*** 984,990 ****
/* We only want the 24F product ID. */
if (!strcmp(id, "USC024")) break;
}
! if (slot == 15) return(ENODEV);
/* We have the card! Grab remaining config. */
p5 = inb(ur->config);
--- 987,993 ----
/* We only want the 24F product ID. */
if (!strcmp(id, "USC024")) break;
}
! if (uha_slot == EISA_MAX_SLOTS) return(ENODEV);
/* We have the card! Grab remaining config. */
p5 = inb(ur->config);
--
Rod Grimes rgrimes@gndrsh.aac.dev.com
Accurate Automation Company Custom computers for FreeBSD
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503120243.SAA04768>
