* [RFC] potential bugs in nexten
@ 2007-12-23 20:01 Al Viro
2007-12-25 1:04 ` Dhananjay Phadke
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2007-12-23 20:01 UTC (permalink / raw)
To: dhananjay; +Cc: jgarzik, netdev
* what are default: doing in netxen_nic_hw_write_wx()/netxen_nic_hw_read_wx()?
Unlike all other cases they do iomem->iomem copying and AFAICS they are never
actually triggered.
* netxen_nic_flash_print() reads the entire user_info from card *in* *host-endian*,
then uses user_info.serial_number[].
a) do we need to read the rest?
b) more interesting question, don't we need cpu_to_le32() here? After
all, that sucker is an array of char, so we want it in the same order regardless
of the host...
* in netxen_nic_xmit_frame() we do
hw->cmd_desc_head[saved_producer].flags_opcode =
cpu_to_le16(hw->cmd_desc_head[saved_producer].flags_opcode);
hw->cmd_desc_head[saved_producer].num_of_buffers_total_length =
cpu_to_le32(hw->cmd_desc_head[saved_producer].
num_of_buffers_total_length);
Huh? Everything that modifies either of those does so in little-endian already.
This code appeared in commit 6c80b18df3537d1221ab34555c150bccbfd90260 (NetXen:
Port swap feature for multi port cards); what's going on there?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFC] potential bugs in nexten
2007-12-23 20:01 [RFC] potential bugs in nexten Al Viro
@ 2007-12-25 1:04 ` Dhananjay Phadke
0 siblings, 0 replies; 2+ messages in thread
From: Dhananjay Phadke @ 2007-12-25 1:04 UTC (permalink / raw)
To: Al Viro; +Cc: jgarzik, netdev
Probably I need to clean up much more junk like that from days before I
took over. I recently cleaned up a bit of rx and tx code, which is more
frequently executed.
The last one (byte swapping) is serious and I am gonna take care of that
in next patch.
Thanks,
-Dhananjay
On Sun, 23 Dec 2007, Al Viro wrote:
>
> * what are default: doing in netxen_nic_hw_write_wx()/netxen_nic_hw_read_wx()?
> Unlike all other cases they do iomem->iomem copying and AFAICS they are never
> actually triggered.
>
> * netxen_nic_flash_print() reads the entire user_info from card *in* *host-endian*,
> then uses user_info.serial_number[].
> a) do we need to read the rest?
> b) more interesting question, don't we need cpu_to_le32() here? After
> all, that sucker is an array of char, so we want it in the same order regardless
> of the host...
>
> * in netxen_nic_xmit_frame() we do
> hw->cmd_desc_head[saved_producer].flags_opcode =
> cpu_to_le16(hw->cmd_desc_head[saved_producer].flags_opcode);
> hw->cmd_desc_head[saved_producer].num_of_buffers_total_length =
> cpu_to_le32(hw->cmd_desc_head[saved_producer].
> num_of_buffers_total_length);
> Huh? Everything that modifies either of those does so in little-endian already.
> This code appeared in commit 6c80b18df3537d1221ab34555c150bccbfd90260 (NetXen:
> Port swap feature for multi port cards); what's going on there?
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-25 1:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-23 20:01 [RFC] potential bugs in nexten Al Viro
2007-12-25 1:04 ` Dhananjay Phadke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox