Subject: Re: Tekram DC395/DC315 SCSI Adapter driver update
To: Izumi Tsutsui <firstname.lastname@example.org>
From: Rui-Xiang Guo <email@example.com>
Date: 09/16/2001 21:52:57
> 1) The PCI vendor ID and device ID are defined in sys/dev/pcidevs.h,
> so we should use them rather than define locally.
> 2) The driver now uses bus_space(9) properly, so it seems
> IOPortBase member of struct ACB is no longer needed.
> 3) All SRBs are allocated by bus_dmamem_alloc(), but
> it is better to use bus_dmamem_alloc() only for memory
> used to pass parameters to the adapter via DMA,
> i.e. only memory for SegmentX member should be
> allocated by bus_dmamem_alloc(). (see sys/dev/ic/iha*.[ch])
Can we just split the member from strcut _SRB?
> Otherwise it causes some performance penalty because
> allocated memory by bus_dmamem_alloc() with BUS_DMA_COHERENT
> does not use cache on some architectures (like arm and mips).
It seems to other drivers also do this. :)
> 4) bus_dmamap_sync with BUS_DMASYNC_PREWRITE is also needed
> for SegmentX before transfer.
Please tell me more about this, thanks.
> 5) It seems SRBSGPhyAddr member of struct SRB is not needed.
> It is refered only in trm_DataIO_transfer().
> 6) Maybe some byteswap code is required for big-endian machines.
> (But it should be trivial.)
> 7) It is much better to adapt these sources to KNF :-)
> (see /usr/share/misc/style)
Need more time to do this. X-)
Thanks for your reply and suggestions!