Subject: Re: Adaptec 1480 Cardbus not working on macppc
To: None <>
From: Izumi Tsutsui <>
List: tech-kern
Date: 10/21/2000 02:24:25
In <> wrote:

> On Fri, Oct 20, 2000 at 12:52:36AM -0400, Michael Wolfson wrote:

>  > I tried a kernel with ahc enabled (as of a week ago).  Here's what the
>  > kernel reported:
>  > ahc0 at cardbus0 dev 0 function 0: Adaptec ADP-1480 SCSI
>  > ahc0: interrupting at 58
>  > ahc0: CardBus device requires an SEEPROM
> It's not working quite properly on PCs, either.  I need to sit down
> and fix it.  It wasn't quite working right, then the ahc driver was
> totally revamped, and so now I'm sure it's broken...

I take a look at sys/dev/aic/aic7xxx_seeprom.c,
and it smells there are some endiannness problems.

In line 128 in aic7xxx_seeprom.c:

>			have_seeprom = read_seeprom(&sd, (u_int16_t *)&sc,
>						    start_addr, sizeof(sc)/2);

It looks a cast from sc (== struct seeprom_config) to (u_int16_t *)
has endian dependency.

Many drivers which have 93cx6 EEPROM access code in FreeBSD
have the same problem...
Izumi Tsutsui