aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-04-07 02:53:30 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-07 02:53:30 -0400
commit4a35ecf8bf1c4b039503fa554100fe85c761de76 (patch)
tree9b75f5d5636004d9a9aa496924377379be09aa1f /drivers/net/benet
parentb4d562e3c3553ac58c7120555c4e4aefbb090a2a (diff)
parentfb9e2d887243499b8d28efcf80821c4f6a092395 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/bonding/bond_main.c drivers/net/via-velocity.c drivers/net/wireless/iwlwifi/iwl-agn.c
Diffstat (limited to 'drivers/net/benet')
-rw-r--r--drivers/net/benet/be_cmds.c4
-rw-r--r--drivers/net/benet/be_ethtool.c2
-rw-r--r--drivers/net/benet/be_main.c21
3 files changed, 13 insertions, 14 deletions
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 61a9afdb83f4..da8793026bb1 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1466,8 +1466,8 @@ int be_cmd_get_flash_crc(struct be_adapter *adapter, u8 *flashed_crc,
1466 1466
1467 req->params.op_type = cpu_to_le32(IMG_TYPE_REDBOOT); 1467 req->params.op_type = cpu_to_le32(IMG_TYPE_REDBOOT);
1468 req->params.op_code = cpu_to_le32(FLASHROM_OPER_REPORT); 1468 req->params.op_code = cpu_to_le32(FLASHROM_OPER_REPORT);
1469 req->params.offset = offset; 1469 req->params.offset = cpu_to_le32(offset);
1470 req->params.data_buf_size = 0x4; 1470 req->params.data_buf_size = cpu_to_le32(0x4);
1471 1471
1472 status = be_mcc_notify_wait(adapter); 1472 status = be_mcc_notify_wait(adapter);
1473 if (!status) 1473 if (!status)
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
index d7390da470cd..d488d52d710a 100644
--- a/drivers/net/benet/be_ethtool.c
+++ b/drivers/net/benet/be_ethtool.c
@@ -490,7 +490,7 @@ be_test_ddr_dma(struct be_adapter *adapter)
490{ 490{
491 int ret, i; 491 int ret, i;
492 struct be_dma_mem ddrdma_cmd; 492 struct be_dma_mem ddrdma_cmd;
493 u64 pattern[2] = {0x5a5a5a5a5a5a5a5a, 0xa5a5a5a5a5a5a5a5}; 493 u64 pattern[2] = {0x5a5a5a5a5a5a5a5aULL, 0xa5a5a5a5a5a5a5a5ULL};
494 494
495 ddrdma_cmd.size = sizeof(struct be_cmd_req_ddrdma_test); 495 ddrdma_cmd.size = sizeof(struct be_cmd_req_ddrdma_test);
496 ddrdma_cmd.va = pci_alloc_consistent(adapter->pdev, ddrdma_cmd.size, 496 ddrdma_cmd.va = pci_alloc_consistent(adapter->pdev, ddrdma_cmd.size,
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index cb0a4a6d5dea..49d51965312e 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -879,7 +879,7 @@ static void be_rx_compl_process(struct be_adapter *adapter,
879 return; 879 return;
880 } 880 }
881 vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); 881 vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp);
882 vid = be16_to_cpu(vid); 882 vid = swab16(vid);
883 vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, vid); 883 vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, vid);
884 } else { 884 } else {
885 netif_receive_skb(skb); 885 netif_receive_skb(skb);
@@ -956,7 +956,7 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
956 napi_gro_frags(&eq_obj->napi); 956 napi_gro_frags(&eq_obj->napi);
957 } else { 957 } else {
958 vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); 958 vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp);
959 vid = be16_to_cpu(vid); 959 vid = swab16(vid);
960 960
961 if (!adapter->vlan_grp || adapter->vlans_added == 0) 961 if (!adapter->vlan_grp || adapter->vlans_added == 0)
962 return; 962 return;
@@ -1977,7 +1977,7 @@ static bool be_flash_redboot(struct be_adapter *adapter,
1977 p += crc_offset; 1977 p += crc_offset;
1978 1978
1979 status = be_cmd_get_flash_crc(adapter, flashed_crc, 1979 status = be_cmd_get_flash_crc(adapter, flashed_crc,
1980 (img_start + image_size - 4)); 1980 (image_size - 4));
1981 if (status) { 1981 if (status) {
1982 dev_err(&adapter->pdev->dev, 1982 dev_err(&adapter->pdev->dev,
1983 "could not get crc from flash, not flashing redboot\n"); 1983 "could not get crc from flash, not flashing redboot\n");
@@ -2113,7 +2113,7 @@ int be_load_fw(struct be_adapter *adapter, u8 *func)
2113 struct flash_file_hdr_g3 *fhdr3; 2113 struct flash_file_hdr_g3 *fhdr3;
2114 struct image_hdr *img_hdr_ptr = NULL; 2114 struct image_hdr *img_hdr_ptr = NULL;
2115 struct be_dma_mem flash_cmd; 2115 struct be_dma_mem flash_cmd;
2116 int status, i = 0; 2116 int status, i = 0, num_imgs = 0;
2117 const u8 *p; 2117 const u8 *p;
2118 2118
2119 strcpy(fw_file, func); 2119 strcpy(fw_file, func);
@@ -2139,15 +2139,14 @@ int be_load_fw(struct be_adapter *adapter, u8 *func)
2139 if ((adapter->generation == BE_GEN3) && 2139 if ((adapter->generation == BE_GEN3) &&
2140 (get_ufigen_type(fhdr) == BE_GEN3)) { 2140 (get_ufigen_type(fhdr) == BE_GEN3)) {
2141 fhdr3 = (struct flash_file_hdr_g3 *) fw->data; 2141 fhdr3 = (struct flash_file_hdr_g3 *) fw->data;
2142 for (i = 0; i < fhdr3->num_imgs; i++) { 2142 num_imgs = le32_to_cpu(fhdr3->num_imgs);
2143 for (i = 0; i < num_imgs; i++) {
2143 img_hdr_ptr = (struct image_hdr *) (fw->data + 2144 img_hdr_ptr = (struct image_hdr *) (fw->data +
2144 (sizeof(struct flash_file_hdr_g3) + 2145 (sizeof(struct flash_file_hdr_g3) +
2145 i * sizeof(struct image_hdr))); 2146 i * sizeof(struct image_hdr)));
2146 if (img_hdr_ptr->imageid == 1) { 2147 if (le32_to_cpu(img_hdr_ptr->imageid) == 1)
2147 status = be_flash_data(adapter, fw, 2148 status = be_flash_data(adapter, fw, &flash_cmd,
2148 &flash_cmd, fhdr3->num_imgs); 2149 num_imgs);
2149 }
2150
2151 } 2150 }
2152 } else if ((adapter->generation == BE_GEN2) && 2151 } else if ((adapter->generation == BE_GEN2) &&
2153 (get_ufigen_type(fhdr) == BE_GEN2)) { 2152 (get_ufigen_type(fhdr) == BE_GEN2)) {