diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-06 11:34:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-06 11:34:06 -0400 |
commit | cb4361c1dc29cd870f664c004b1817106fbce0fa (patch) | |
tree | c31533210d738c9074b21b8f31fe0399b39545f0 /drivers/net/benet | |
parent | 309361e09ca9e9670dc8664e5d14125bf82078af (diff) | |
parent | fb9e2d887243499b8d28efcf80821c4f6a092395 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
smc91c92_cs: fix the problem of "Unable to find hardware address"
r8169: clean up my printk uglyness
net: Hook up cxgb4 to Kconfig and Makefile
cxgb4: Add main driver file and driver Makefile
cxgb4: Add remaining driver headers and L2T management
cxgb4: Add packet queues and packet DMA code
cxgb4: Add HW and FW support code
cxgb4: Add register, message, and FW definitions
netlabel: Fix several rcu_dereference() calls used without RCU read locks
bonding: fix potential deadlock in bond_uninit()
net: check the length of the socket address passed to connect(2)
stmmac: add documentation for the driver.
stmmac: fix kconfig for crc32 build error
be2net: fix bug in vlan rx path for big endian architecture
be2net: fix flashing on big endian architectures
be2net: fix a bug in flashing the redboot section
bonding: bond_xmit_roundrobin() fix
drivers/net: Add missing unlock
net: gianfar - align BD ring size console messages
net: gianfar - initialize per-queue statistics
...
Diffstat (limited to 'drivers/net/benet')
-rw-r--r-- | drivers/net/benet/be_cmds.c | 4 | ||||
-rw-r--r-- | drivers/net/benet/be_main.c | 21 |
2 files changed, 12 insertions, 13 deletions
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 50e6259b50e4..d0ef4ac987cd 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
@@ -1464,8 +1464,8 @@ int be_cmd_get_flash_crc(struct be_adapter *adapter, u8 *flashed_crc, | |||
1464 | 1464 | ||
1465 | req->params.op_type = cpu_to_le32(IMG_TYPE_REDBOOT); | 1465 | req->params.op_type = cpu_to_le32(IMG_TYPE_REDBOOT); |
1466 | req->params.op_code = cpu_to_le32(FLASHROM_OPER_REPORT); | 1466 | req->params.op_code = cpu_to_le32(FLASHROM_OPER_REPORT); |
1467 | req->params.offset = offset; | 1467 | req->params.offset = cpu_to_le32(offset); |
1468 | req->params.data_buf_size = 0x4; | 1468 | req->params.data_buf_size = cpu_to_le32(0x4); |
1469 | 1469 | ||
1470 | status = be_mcc_notify_wait(adapter); | 1470 | status = be_mcc_notify_wait(adapter); |
1471 | if (!status) | 1471 | if (!status) |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 43e8032f9236..ec6ace802256 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -807,7 +807,7 @@ static void be_rx_compl_process(struct be_adapter *adapter, | |||
807 | return; | 807 | return; |
808 | } | 808 | } |
809 | vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); | 809 | vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); |
810 | vid = be16_to_cpu(vid); | 810 | vid = swab16(vid); |
811 | vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, vid); | 811 | vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, vid); |
812 | } else { | 812 | } else { |
813 | netif_receive_skb(skb); | 813 | netif_receive_skb(skb); |
@@ -884,7 +884,7 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter, | |||
884 | napi_gro_frags(&eq_obj->napi); | 884 | napi_gro_frags(&eq_obj->napi); |
885 | } else { | 885 | } else { |
886 | vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); | 886 | vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); |
887 | vid = be16_to_cpu(vid); | 887 | vid = swab16(vid); |
888 | 888 | ||
889 | if (!adapter->vlan_grp || adapter->vlans_added == 0) | 889 | if (!adapter->vlan_grp || adapter->vlans_added == 0) |
890 | return; | 890 | return; |
@@ -1855,7 +1855,7 @@ static bool be_flash_redboot(struct be_adapter *adapter, | |||
1855 | p += crc_offset; | 1855 | p += crc_offset; |
1856 | 1856 | ||
1857 | status = be_cmd_get_flash_crc(adapter, flashed_crc, | 1857 | status = be_cmd_get_flash_crc(adapter, flashed_crc, |
1858 | (img_start + image_size - 4)); | 1858 | (image_size - 4)); |
1859 | if (status) { | 1859 | if (status) { |
1860 | dev_err(&adapter->pdev->dev, | 1860 | dev_err(&adapter->pdev->dev, |
1861 | "could not get crc from flash, not flashing redboot\n"); | 1861 | "could not get crc from flash, not flashing redboot\n"); |
@@ -1991,7 +1991,7 @@ int be_load_fw(struct be_adapter *adapter, u8 *func) | |||
1991 | struct flash_file_hdr_g3 *fhdr3; | 1991 | struct flash_file_hdr_g3 *fhdr3; |
1992 | struct image_hdr *img_hdr_ptr = NULL; | 1992 | struct image_hdr *img_hdr_ptr = NULL; |
1993 | struct be_dma_mem flash_cmd; | 1993 | struct be_dma_mem flash_cmd; |
1994 | int status, i = 0; | 1994 | int status, i = 0, num_imgs = 0; |
1995 | const u8 *p; | 1995 | const u8 *p; |
1996 | 1996 | ||
1997 | strcpy(fw_file, func); | 1997 | strcpy(fw_file, func); |
@@ -2017,15 +2017,14 @@ int be_load_fw(struct be_adapter *adapter, u8 *func) | |||
2017 | if ((adapter->generation == BE_GEN3) && | 2017 | if ((adapter->generation == BE_GEN3) && |
2018 | (get_ufigen_type(fhdr) == BE_GEN3)) { | 2018 | (get_ufigen_type(fhdr) == BE_GEN3)) { |
2019 | fhdr3 = (struct flash_file_hdr_g3 *) fw->data; | 2019 | fhdr3 = (struct flash_file_hdr_g3 *) fw->data; |
2020 | for (i = 0; i < fhdr3->num_imgs; i++) { | 2020 | num_imgs = le32_to_cpu(fhdr3->num_imgs); |
2021 | for (i = 0; i < num_imgs; i++) { | ||
2021 | img_hdr_ptr = (struct image_hdr *) (fw->data + | 2022 | img_hdr_ptr = (struct image_hdr *) (fw->data + |
2022 | (sizeof(struct flash_file_hdr_g3) + | 2023 | (sizeof(struct flash_file_hdr_g3) + |
2023 | i * sizeof(struct image_hdr))); | 2024 | i * sizeof(struct image_hdr))); |
2024 | if (img_hdr_ptr->imageid == 1) { | 2025 | if (le32_to_cpu(img_hdr_ptr->imageid) == 1) |
2025 | status = be_flash_data(adapter, fw, | 2026 | status = be_flash_data(adapter, fw, &flash_cmd, |
2026 | &flash_cmd, fhdr3->num_imgs); | 2027 | num_imgs); |
2027 | } | ||
2028 | |||
2029 | } | 2028 | } |
2030 | } else if ((adapter->generation == BE_GEN2) && | 2029 | } else if ((adapter->generation == BE_GEN2) && |
2031 | (get_ufigen_type(fhdr) == BE_GEN2)) { | 2030 | (get_ufigen_type(fhdr) == BE_GEN2)) { |