[Prism54-devel] main prism54 PCI driver question

Luis R. Rodriguez mcgrof at ruslug.rutgers.edu
Wed Mar 16 15:08:32 UTC 2005


On Mon, Mar 14, 2005 at 07:49:41PM +0100, Jean-Baptiste Note wrote:
> 
> Dear list,
> 
> I'm investigating tonight the fullmac/softmac differences pci-wise, and have a
> question about the "control block" :
> 
> (fullmac driver control block)
> struct isl38xx_cb {
> 	u32 driver_curr_frag[ISL38XX_CB_QCOUNT];
> 	u32 device_curr_frag[ISL38XX_CB_QCOUNT];
> 	isl38xx_fragment rx_data_low[ISL38XX_CB_RX_QSIZE];
> 	isl38xx_fragment tx_data_low[ISL38XX_CB_TX_QSIZE];
> 	isl38xx_fragment rx_data_high[ISL38XX_CB_RX_QSIZE];
> 	isl38xx_fragment tx_data_high[ISL38XX_CB_TX_QSIZE];
> 	isl38xx_fragment rx_data_mgmt[ISL38XX_CB_MGMT_QSIZE];
> 	isl38xx_fragment tx_data_mgmt[ISL38XX_CB_MGMT_QSIZE];
> };
> 
> (softmac control block)
> struct control_block
> {
>     uint32_t driver_curr_frag[CB_QCOUNT];
>     uint32_t device_curr_frag[CB_QCOUNT];
>     struct fragment rx_data[CB_RX_DATA_QSIZE];
>     struct fragment tx_data[CB_TX_DATA_QSIZE];
>     struct fragment rx_control[CB_RX_CTRL_QSIZE];
>     struct fragment tx_control[CB_TX_CTRL_QSIZE];
> };
> 
> >From what i understand, this structure is shared with the PCI Card and
> controls the DMA engine. This seems to be the case for the softmac
> driver too, though the structure is a bit different (the frag struct is
> not the same either). Is this true, or am i missing something ?
> 
> If this is the case, why isn't it declared __attribute__(packed) (along
> with the fragment struct); to prevent compiler reorganization of the
> fields ?

You have a point, it seems it would just waste a bit of memory as is
though. We can try attribute ((packed)). I have no cardbus card to test
yet though.

	Luis

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://prism54.org/pipermail/prism54-devel/attachments/20050316/14c3f78a/attachment.pgp


More information about the Prism54-devel mailing list