Re: [PATCH 3/5] staging: r8712u: Merging Realtek's latest. A few types and definitions.

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

 



Hi Larry,


On Tue, Aug 23, 2011 at 10:38:57AM -0500, Larry Finger wrote:
> On 08/23/2011 12:53 AM, Ali Bahar wrote:
> >Realtek's latest is v2.6.6. A few types and definitions have been updated in
> >these files.
> >But rtl871x_recv.h's addr_t change has not been accepted: it will break on
> >64-bit platforms.
> >
> >Signed-off-by: Ali Bahar<ali@xxxxxxxxxxxxxxx>


> >index c48757f..3c766c0 100644
> >--- a/drivers/staging/rtl8712/rtl8712_recv.h
> >+++ b/drivers/staging/rtl8712/rtl8712_recv.h
> -- snip --
> 
> >+ ******************************************************************************/
> >  #ifndef _RTL8712_RECV_H_
> >  #define _RTL8712_RECV_H_
> >
> >  #include "osdep_service.h"
> >  #include "drv_types.h"
> >
> >-#define NR_RECVBUFF (8)
> >+#define NR_RECVBUFF (4)
> 
> Realtek may have made this change, but I'm not sure it should be
> done here. Under heavy network and CPU loads, I'm not sure that 8
> receive buffers would be enough, but cutting it to 4 seems unwise.
> Perhaps an embedded system with limited RAM would find that change
> useful. I propose leaving it at 8, but add a comment.

OK.



 
> >  #define NR_PREALLOC_RECV_SKB (8)
> >  #define RXDESC_SIZE	24
> >  #define RXDESC_OFFSET RXDESC_SIZE
> >@@ -115,7 +140,7 @@ union recv_frame {
> >  	union {
> >  		struct list_head list;
> >  		struct recv_frame_hdr hdr;
> >-		addr_t mem[RECVFRAME_HDR_ALIGN>>2];
> >+		uint mem[RECVFRAME_HDR_ALIGN>>2];
> 
> Does this work with 64-bit systems? I have not tested, but changing
> from addr_t to uint looks wrong.

Yeah, I spent a fair bit of time looking at this, back then. 
The key point is that 'mem' is not used anymore! The function which
used it, mp_ioctl_xmit_packet_hdl, has been gutted. 

That aside, I checked it for size; but .hdr is still its biggest
member. So the size has not been affected. 
And I did not think of any unorthodox manipulations of the other
members which may choke on this change. So I did not go thru all the
references to recv_frame.

thanks,
ali


> 
> 
> Larry
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux