Commit 0d414727 authored by Mithlesh Thukral's avatar Mithlesh Thukral Committed by Greg Kroah-Hartman

Staging: sxg: Fix to load card on low memory machines

* Fix problem of crash on 50MB machine.
* Fixed dma_addr_t bug, which resolves issues on x86_32 bit machines.
Signed-off-by: default avatarLinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: default avatarChristopher Harrer <charrer@alacritech.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a3915dd8
This diff is collapsed.
......@@ -497,6 +497,13 @@ struct ether_header {
#define NUM_CFG_SPACES 2
#define NUM_CFG_REGS 64
/*
* We split LSS sends across four microcode queues derived from
* destination TCP port (if TCP/IP).
*/
#define SXG_LARGE_SEND_QUEUE_MASK 0x3
#define ISCSI_PORT 0xbc0c /* 3260 */
struct physcard {
struct adapter_t *adapter[SLIC_MAX_PORTS];
struct physcard *next;
......
......@@ -525,7 +525,7 @@ static inline int sxg_ring_get_forward_diff (struct sxg_ring_info *ringinfo,
****************************************************************/
#pragma pack(push, 1)
struct sxg_cmd {
dma_addr_t Sgl; /* Physical address of SGL */
dma64_addr_t Sgl; /* Physical address of SGL */
union {
struct {
dma64_addr_t FirstSgeAddress; /* Address of first SGE */
......@@ -716,7 +716,7 @@ enum sxg_buffer_type {
/* Receive buffer header */
struct sxg_rcv_data_buffer_hdr {
dma_addr_t PhysicalAddress; /* Buffer physical address */
dma64_addr_t PhysicalAddress; /* Buffer physical address */
/*
* Note - DO NOT USE the VirtualAddress field to locate data.
* Use the sxg.h:SXG_RECEIVE_DATA_LOCATION macro instead.
......@@ -745,7 +745,7 @@ struct sxg_rcv_data_descriptor {
struct sk_buff *VirtualAddress; /* Host handle */
u64 ForceTo8Bytes; /*Force x86 to 8-byte boundary*/
};
dma_addr_t PhysicalAddress;
dma64_addr_t PhysicalAddress;
};
/* Receive descriptor block */
......@@ -759,7 +759,7 @@ struct sxg_rcv_descriptor_block {
/* Receive descriptor block header */
struct sxg_rcv_descriptor_block_hdr {
void *VirtualAddress; /* start of 2k buffer */
dma_addr_t PhysicalAddress; /* ..and it's physical address */
dma64_addr_t PhysicalAddress;/* and it's physical address */
struct list_entry FreeList;/* free queue of descriptor blocks */
unsigned char State; /* see sxg_buffer state above */
};
......@@ -767,7 +767,7 @@ struct sxg_rcv_descriptor_block_hdr {
/* Receive block header */
struct sxg_rcv_block_hdr {
void *VirtualAddress; /* Start of virtual memory */
dma_addr_t PhysicalAddress; /* ..and it's physical address*/
dma64_addr_t PhysicalAddress;/* ..and it's physical address*/
struct list_entry AllList; /* Queue of all SXG_RCV_BLOCKS*/
};
......@@ -945,7 +945,7 @@ struct sxg_scatter_gather {
struct list_entry FreeList;
/* All struct sxg_scatter_gather blocks */
struct list_entry AllList;
dma_addr_t PhysicalAddress;/* physical address */
dma64_addr_t PhysicalAddress;/* physical address */
unsigned char State; /* See SXG_BUFFER state above */
unsigned char CmdIndex; /* Command ring index */
struct sk_buff *DumbPacket; /* Associated Packet */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment