Re: Removing BROKEN scsi drivers

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

 



On Tue, 2005-11-22 at 22:43 +0100, Kars de Jong wrote:
> I don't really understand the current mechanism. It seems to result in
> different behaviour for BE systems depending on the definition of
> CONFIG_53C700_LE_ON_BE.
> 
> I would have expected the behaviour on BE systems without defining
> CONFIG_53C700_LE_ON_BE to be the same as on BE systems with
> CONFIG_53C700_LE_ON_BE defined but with hostdata->force_le_on_be set to
> 0.
> 
> Was this driver ever used on BE systems without CONFIG_53C700_LE_ON_BE
> being defined?
> 
> For reference:
> 
> BE with CONFIG_53C700_LE_ON_BE defined but hostdata->force_le_on_be set
> to 0:
> 
> /* This is terrible, but there's no raw version of ioread32.  That means
>  * that on a be board we swap twice (once in ioread32 and once again to
>  * get the value correct) */
> #define bS_to_io(x)     ((hostdata->force_le_on_be) ? (x) : cpu_to_le32(x))
> 
> evaluates to
>                                       0   ---------->       cpu_to_le32(x)
> 
> And without CONFIG_53C700_LE_ON_BE defined:
> 
> #define bS_to_io(x)     (x)
> 
> I think this last define should be cpu_to_le32() as well, then the
> driver would work on m68k out-of-the-box.
> 
> James, can you comment on this?

OK, let me try to explain.

ioread/write32 came with a slight design flaw in that it *always*
converts to LE.  By and large, no-one notices this because almost every
platform has the PCI bus, which is LE.  However, PA also has the GSC
bus, which is BE.  We already introduced the ioread/write<n>be macros
which work for a BE bus.  You're right, the only current BE consumer of
the driver is PA-RISC, which has a cockup on one of the 53c700 chips
which is wired in LE mode on the BE GSC bus, so we need that flag.

I assume your problems is also that the 53c7x0 chip on the MAC is also
on a BE bus, so I think what you want is another flag:

53c700_BE_BUS

which causes all the io macros to be ioread/write<n>be.  Which will
avoid the nasty double swap we do on PA.

James


-
: 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