diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-10-21 03:50:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-24 18:07:12 -0400 |
commit | 42821a5b393e36f5c0b267473d59d375578df7ec (patch) | |
tree | beeaa5a6ac9211567d9b13687585959a63ba1c8a /drivers/net/vxge/vxge-traffic.c | |
parent | 89ff05ec553f3e70b8773c501da01bf7ad952cab (diff) |
vxge: make functions local and remove dead code
Use results of make namespacecheck to make functions local and
remove code that is not used.
Also rename initialize_ethtool_ops to vxge_initialize_ethtool_ops.
Compile tested only.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxge/vxge-traffic.c')
-rw-r--r-- | drivers/net/vxge/vxge-traffic.c | 101 |
1 files changed, 16 insertions, 85 deletions
diff --git a/drivers/net/vxge/vxge-traffic.c b/drivers/net/vxge/vxge-traffic.c index cedf08f99cb3..4bdb611a6842 100644 --- a/drivers/net/vxge/vxge-traffic.c +++ b/drivers/net/vxge/vxge-traffic.c | |||
@@ -17,6 +17,13 @@ | |||
17 | #include "vxge-config.h" | 17 | #include "vxge-config.h" |
18 | #include "vxge-main.h" | 18 | #include "vxge-main.h" |
19 | 19 | ||
20 | static enum vxge_hw_status | ||
21 | __vxge_hw_device_handle_error(struct __vxge_hw_device *hldev, | ||
22 | u32 vp_id, enum vxge_hw_event type); | ||
23 | static enum vxge_hw_status | ||
24 | __vxge_hw_vpath_alarm_process(struct __vxge_hw_virtualpath *vpath, | ||
25 | u32 skip_alarms); | ||
26 | |||
20 | /* | 27 | /* |
21 | * vxge_hw_vpath_intr_enable - Enable vpath interrupts. | 28 | * vxge_hw_vpath_intr_enable - Enable vpath interrupts. |
22 | * @vp: Virtual Path handle. | 29 | * @vp: Virtual Path handle. |
@@ -513,7 +520,7 @@ exit: | |||
513 | * Link up indication handler. The function is invoked by HW when | 520 | * Link up indication handler. The function is invoked by HW when |
514 | * Titan indicates that the link is up for programmable amount of time. | 521 | * Titan indicates that the link is up for programmable amount of time. |
515 | */ | 522 | */ |
516 | enum vxge_hw_status | 523 | static enum vxge_hw_status |
517 | __vxge_hw_device_handle_link_up_ind(struct __vxge_hw_device *hldev) | 524 | __vxge_hw_device_handle_link_up_ind(struct __vxge_hw_device *hldev) |
518 | { | 525 | { |
519 | /* | 526 | /* |
@@ -538,7 +545,7 @@ exit: | |||
538 | * Link down indication handler. The function is invoked by HW when | 545 | * Link down indication handler. The function is invoked by HW when |
539 | * Titan indicates that the link is down. | 546 | * Titan indicates that the link is down. |
540 | */ | 547 | */ |
541 | enum vxge_hw_status | 548 | static enum vxge_hw_status |
542 | __vxge_hw_device_handle_link_down_ind(struct __vxge_hw_device *hldev) | 549 | __vxge_hw_device_handle_link_down_ind(struct __vxge_hw_device *hldev) |
543 | { | 550 | { |
544 | /* | 551 | /* |
@@ -564,7 +571,7 @@ exit: | |||
564 | * | 571 | * |
565 | * Handle error. | 572 | * Handle error. |
566 | */ | 573 | */ |
567 | enum vxge_hw_status | 574 | static enum vxge_hw_status |
568 | __vxge_hw_device_handle_error( | 575 | __vxge_hw_device_handle_error( |
569 | struct __vxge_hw_device *hldev, | 576 | struct __vxge_hw_device *hldev, |
570 | u32 vp_id, | 577 | u32 vp_id, |
@@ -646,7 +653,7 @@ void vxge_hw_device_clear_tx_rx(struct __vxge_hw_device *hldev) | |||
646 | * it swaps the reserve and free arrays. | 653 | * it swaps the reserve and free arrays. |
647 | * | 654 | * |
648 | */ | 655 | */ |
649 | enum vxge_hw_status | 656 | static enum vxge_hw_status |
650 | vxge_hw_channel_dtr_alloc(struct __vxge_hw_channel *channel, void **dtrh) | 657 | vxge_hw_channel_dtr_alloc(struct __vxge_hw_channel *channel, void **dtrh) |
651 | { | 658 | { |
652 | void **tmp_arr; | 659 | void **tmp_arr; |
@@ -692,7 +699,8 @@ _alloc_after_swap: | |||
692 | * Posts a dtr to work array. | 699 | * Posts a dtr to work array. |
693 | * | 700 | * |
694 | */ | 701 | */ |
695 | void vxge_hw_channel_dtr_post(struct __vxge_hw_channel *channel, void *dtrh) | 702 | static void vxge_hw_channel_dtr_post(struct __vxge_hw_channel *channel, |
703 | void *dtrh) | ||
696 | { | 704 | { |
697 | vxge_assert(channel->work_arr[channel->post_index] == NULL); | 705 | vxge_assert(channel->work_arr[channel->post_index] == NULL); |
698 | 706 | ||
@@ -1658,37 +1666,6 @@ exit: | |||
1658 | } | 1666 | } |
1659 | 1667 | ||
1660 | /** | 1668 | /** |
1661 | * vxge_hw_vpath_vid_get_next - Get the next vid entry for this vpath | ||
1662 | * from vlan id table. | ||
1663 | * @vp: Vpath handle. | ||
1664 | * @vid: Buffer to return vlan id | ||
1665 | * | ||
1666 | * Returns the next vlan id in the list for this vpath. | ||
1667 | * see also: vxge_hw_vpath_vid_get | ||
1668 | * | ||
1669 | */ | ||
1670 | enum vxge_hw_status | ||
1671 | vxge_hw_vpath_vid_get_next(struct __vxge_hw_vpath_handle *vp, u64 *vid) | ||
1672 | { | ||
1673 | u64 data; | ||
1674 | enum vxge_hw_status status = VXGE_HW_OK; | ||
1675 | |||
1676 | if (vp == NULL) { | ||
1677 | status = VXGE_HW_ERR_INVALID_HANDLE; | ||
1678 | goto exit; | ||
1679 | } | ||
1680 | |||
1681 | status = __vxge_hw_vpath_rts_table_get(vp, | ||
1682 | VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION_LIST_NEXT_ENTRY, | ||
1683 | VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_VID, | ||
1684 | 0, vid, &data); | ||
1685 | |||
1686 | *vid = VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_VLAN_ID(*vid); | ||
1687 | exit: | ||
1688 | return status; | ||
1689 | } | ||
1690 | |||
1691 | /** | ||
1692 | * vxge_hw_vpath_vid_delete - Delete the vlan id entry for this vpath | 1669 | * vxge_hw_vpath_vid_delete - Delete the vlan id entry for this vpath |
1693 | * to vlan id table. | 1670 | * to vlan id table. |
1694 | * @vp: Vpath handle. | 1671 | * @vp: Vpath handle. |
@@ -1898,9 +1875,9 @@ exit: | |||
1898 | * Process vpath alarms. | 1875 | * Process vpath alarms. |
1899 | * | 1876 | * |
1900 | */ | 1877 | */ |
1901 | enum vxge_hw_status __vxge_hw_vpath_alarm_process( | 1878 | static enum vxge_hw_status |
1902 | struct __vxge_hw_virtualpath *vpath, | 1879 | __vxge_hw_vpath_alarm_process(struct __vxge_hw_virtualpath *vpath, |
1903 | u32 skip_alarms) | 1880 | u32 skip_alarms) |
1904 | { | 1881 | { |
1905 | u64 val64; | 1882 | u64 val64; |
1906 | u64 alarm_status; | 1883 | u64 alarm_status; |
@@ -2265,36 +2242,6 @@ vxge_hw_vpath_msix_mask(struct __vxge_hw_vpath_handle *vp, int msix_id) | |||
2265 | } | 2242 | } |
2266 | 2243 | ||
2267 | /** | 2244 | /** |
2268 | * vxge_hw_vpath_msix_clear - Clear MSIX Vector. | ||
2269 | * @vp: Virtual Path handle. | ||
2270 | * @msix_id: MSI ID | ||
2271 | * | ||
2272 | * The function clears the msix interrupt for the given msix_id | ||
2273 | * | ||
2274 | * Returns: 0, | ||
2275 | * Otherwise, VXGE_HW_ERR_WRONG_IRQ if the msix index is out of range | ||
2276 | * status. | ||
2277 | * See also: | ||
2278 | */ | ||
2279 | void | ||
2280 | vxge_hw_vpath_msix_clear(struct __vxge_hw_vpath_handle *vp, int msix_id) | ||
2281 | { | ||
2282 | struct __vxge_hw_device *hldev = vp->vpath->hldev; | ||
2283 | if (hldev->config.intr_mode == | ||
2284 | VXGE_HW_INTR_MODE_MSIX_ONE_SHOT) { | ||
2285 | __vxge_hw_pio_mem_write32_upper( | ||
2286 | (u32)vxge_bVALn(vxge_mBIT(msix_id >> 2), 0, 32), | ||
2287 | &hldev->common_reg-> | ||
2288 | clr_msix_one_shot_vec[msix_id%4]); | ||
2289 | } else { | ||
2290 | __vxge_hw_pio_mem_write32_upper( | ||
2291 | (u32)vxge_bVALn(vxge_mBIT(msix_id >> 2), 0, 32), | ||
2292 | &hldev->common_reg-> | ||
2293 | clear_msix_mask_vect[msix_id%4]); | ||
2294 | } | ||
2295 | } | ||
2296 | |||
2297 | /** | ||
2298 | * vxge_hw_vpath_msix_unmask - Unmask the MSIX Vector. | 2245 | * vxge_hw_vpath_msix_unmask - Unmask the MSIX Vector. |
2299 | * @vp: Virtual Path handle. | 2246 | * @vp: Virtual Path handle. |
2300 | * @msix_id: MSI ID | 2247 | * @msix_id: MSI ID |
@@ -2316,22 +2263,6 @@ vxge_hw_vpath_msix_unmask(struct __vxge_hw_vpath_handle *vp, int msix_id) | |||
2316 | } | 2263 | } |
2317 | 2264 | ||
2318 | /** | 2265 | /** |
2319 | * vxge_hw_vpath_msix_mask_all - Mask all MSIX vectors for the vpath. | ||
2320 | * @vp: Virtual Path handle. | ||
2321 | * | ||
2322 | * The function masks all msix interrupt for the given vpath | ||
2323 | * | ||
2324 | */ | ||
2325 | void | ||
2326 | vxge_hw_vpath_msix_mask_all(struct __vxge_hw_vpath_handle *vp) | ||
2327 | { | ||
2328 | |||
2329 | __vxge_hw_pio_mem_write32_upper( | ||
2330 | (u32)vxge_bVALn(vxge_mBIT(vp->vpath->vp_id), 0, 32), | ||
2331 | &vp->vpath->hldev->common_reg->set_msix_mask_all_vect); | ||
2332 | } | ||
2333 | |||
2334 | /** | ||
2335 | * vxge_hw_vpath_inta_mask_tx_rx - Mask Tx and Rx interrupts. | 2266 | * vxge_hw_vpath_inta_mask_tx_rx - Mask Tx and Rx interrupts. |
2336 | * @vp: Virtual Path handle. | 2267 | * @vp: Virtual Path handle. |
2337 | * | 2268 | * |