Index: uspace/drv/bus/usb/xhci/bus.h
===================================================================
--- uspace/drv/bus/usb/xhci/bus.h	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
+++ uspace/drv/bus/usb/xhci/bus.h	(revision 3dd80f8125dbca151590cbed383c0fad189d40fd)
@@ -52,6 +52,6 @@
 } xhci_bus_t;
 
-int xhci_bus_init(xhci_bus_t *, xhci_hc_t *);
-void xhci_bus_fini(xhci_bus_t *);
+extern int xhci_bus_init(xhci_bus_t *, xhci_hc_t *);
+extern void xhci_bus_fini(xhci_bus_t *);
 
 static inline xhci_bus_t *bus_to_xhci_bus(bus_t *bus_base)
Index: uspace/drv/bus/usb/xhci/commands.h
===================================================================
--- uspace/drv/bus/usb/xhci/commands.h	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
+++ uspace/drv/bus/usb/xhci/commands.h	(revision 3dd80f8125dbca151590cbed383c0fad189d40fd)
@@ -125,21 +125,21 @@
 
 /* Command handling control */
-int xhci_init_commands(xhci_hc_t *);
-void xhci_fini_commands(xhci_hc_t *);
+extern int xhci_init_commands(xhci_hc_t *);
+extern void xhci_fini_commands(xhci_hc_t *);
 
-void xhci_stop_command_ring(xhci_hc_t *);
-void xhci_abort_command_ring(xhci_hc_t *);
-void xhci_start_command_ring(xhci_hc_t *);
+extern void xhci_stop_command_ring(xhci_hc_t *);
+extern void xhci_abort_command_ring(xhci_hc_t *);
+extern void xhci_start_command_ring(xhci_hc_t *);
 
-int xhci_handle_command_completion(xhci_hc_t *, xhci_trb_t *);
+extern int xhci_handle_command_completion(xhci_hc_t *, xhci_trb_t *);
 
 /* Command lifecycle */
-void xhci_cmd_init(xhci_cmd_t *, xhci_cmd_type_t);
-void xhci_cmd_fini(xhci_cmd_t *);
+extern void xhci_cmd_init(xhci_cmd_t *, xhci_cmd_type_t);
+extern void xhci_cmd_fini(xhci_cmd_t *);
 
 /* Issuing commands */
-int xhci_cmd_sync(xhci_hc_t *, xhci_cmd_t *);
-int xhci_cmd_sync_fini(xhci_hc_t *, xhci_cmd_t *);
-int xhci_cmd_async_fini(xhci_hc_t *, xhci_cmd_t *);
+extern int xhci_cmd_sync(xhci_hc_t *, xhci_cmd_t *);
+extern int xhci_cmd_sync_fini(xhci_hc_t *, xhci_cmd_t *);
+extern int xhci_cmd_async_fini(xhci_hc_t *, xhci_cmd_t *);
 
 static inline int xhci_cmd_sync_inline_wrapper(xhci_hc_t *hc, xhci_cmd_t cmd)
Index: uspace/drv/bus/usb/xhci/debug.h
===================================================================
--- uspace/drv/bus/usb/xhci/debug.h	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
+++ uspace/drv/bus/usb/xhci/debug.h	(revision 3dd80f8125dbca151590cbed383c0fad189d40fd)
@@ -50,18 +50,18 @@
 struct xhci_input_ctx;
 
-void xhci_dump_cap_regs(const struct xhci_cap_regs *);
-void xhci_dump_port(const struct xhci_port_regs *);
-void xhci_dump_state(const struct xhci_hc *);
-void xhci_dump_ports(const struct xhci_hc *);
+extern void xhci_dump_cap_regs(const struct xhci_cap_regs *);
+extern void xhci_dump_port(const struct xhci_port_regs *);
+extern void xhci_dump_state(const struct xhci_hc *);
+extern void xhci_dump_ports(const struct xhci_hc *);
 
-const char *xhci_trb_str_type(unsigned);
-void xhci_dump_trb(const struct xhci_trb *trb);
+extern const char *xhci_trb_str_type(unsigned);
+extern void xhci_dump_trb(const struct xhci_trb *trb);
 
-const char *xhci_ec_str_id(unsigned);
-void xhci_dump_extcap(const struct xhci_extcap *);
+extern const char *xhci_ec_str_id(unsigned);
+extern void xhci_dump_extcap(const struct xhci_extcap *);
 
-void xhci_dump_slot_ctx(const struct xhci_slot_ctx *);
-void xhci_dump_endpoint_ctx(const struct xhci_endpoint_ctx *);
-void xhci_dump_input_ctx(const struct xhci_hc *, const struct xhci_input_ctx *);
+extern void xhci_dump_slot_ctx(const struct xhci_slot_ctx *);
+extern void xhci_dump_endpoint_ctx(const struct xhci_endpoint_ctx *);
+extern void xhci_dump_input_ctx(const struct xhci_hc *, const struct xhci_input_ctx *);
 
 #endif
Index: uspace/drv/bus/usb/xhci/endpoint.h
===================================================================
--- uspace/drv/bus/usb/xhci/endpoint.h	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
+++ uspace/drv/bus/usb/xhci/endpoint.h	(revision 3dd80f8125dbca151590cbed383c0fad189d40fd)
@@ -109,16 +109,16 @@
 	(usb_str_transfer_type((ep).base.transfer_type))
 
-int xhci_endpoint_type(xhci_endpoint_t *ep);
+extern int xhci_endpoint_type(xhci_endpoint_t *ep);
 
-endpoint_t *xhci_endpoint_create(device_t *, const usb_endpoint_descriptors_t *);
-int xhci_endpoint_register(endpoint_t *);
-void xhci_endpoint_unregister(endpoint_t *);
-void xhci_endpoint_destroy(endpoint_t *);
+extern endpoint_t *xhci_endpoint_create(device_t *, const usb_endpoint_descriptors_t *);
+extern int xhci_endpoint_register(endpoint_t *);
+extern void xhci_endpoint_unregister(endpoint_t *);
+extern void xhci_endpoint_destroy(endpoint_t *);
 
-void xhci_endpoint_free_transfer_ds(xhci_endpoint_t *);
-xhci_trb_ring_t *xhci_endpoint_get_ring(xhci_endpoint_t *, uint32_t);
+extern void xhci_endpoint_free_transfer_ds(xhci_endpoint_t *);
+extern xhci_trb_ring_t *xhci_endpoint_get_ring(xhci_endpoint_t *, uint32_t);
 
-void xhci_setup_endpoint_context(xhci_endpoint_t *, xhci_ep_ctx_t *);
-int xhci_endpoint_clear_halt(xhci_endpoint_t *, unsigned);
+extern void xhci_setup_endpoint_context(xhci_endpoint_t *, xhci_ep_ctx_t *);
+extern int xhci_endpoint_clear_halt(xhci_endpoint_t *, unsigned);
 
 static inline xhci_endpoint_t * xhci_endpoint_get(endpoint_t *ep)
Index: uspace/drv/bus/usb/xhci/hc.h
===================================================================
--- uspace/drv/bus/usb/xhci/hc.h	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
+++ uspace/drv/bus/usb/xhci/hc.h	(revision 3dd80f8125dbca151590cbed383c0fad189d40fd)
@@ -114,29 +114,29 @@
 typedef struct xhci_device xhci_device_t;
 
-int hc_init_mmio(xhci_hc_t *, const hw_res_list_parsed_t *);
-int hc_init_memory(xhci_hc_t *, ddf_dev_t *);
-int hc_claim(xhci_hc_t *, ddf_dev_t *);
-int hc_irq_code_gen(irq_code_t *, xhci_hc_t *, const hw_res_list_parsed_t *);
-int hc_start(xhci_hc_t *, bool);
-void hc_fini(xhci_hc_t *);
+extern int hc_init_mmio(xhci_hc_t *, const hw_res_list_parsed_t *);
+extern int hc_init_memory(xhci_hc_t *, ddf_dev_t *);
+extern int hc_claim(xhci_hc_t *, ddf_dev_t *);
+extern int hc_irq_code_gen(irq_code_t *, xhci_hc_t *, const hw_res_list_parsed_t *);
+extern int hc_start(xhci_hc_t *, bool);
+extern void hc_fini(xhci_hc_t *);
 
-void hc_ring_doorbell(xhci_hc_t *, unsigned, unsigned);
-void hc_ring_ep_doorbell(xhci_endpoint_t *, uint32_t);
-unsigned hc_speed_to_psiv(usb_speed_t);
+extern void hc_ring_doorbell(xhci_hc_t *, unsigned, unsigned);
+extern void hc_ring_ep_doorbell(xhci_endpoint_t *, uint32_t);
+extern unsigned hc_speed_to_psiv(usb_speed_t);
 
-int hc_enable_slot(xhci_device_t *);
-int hc_disable_slot(xhci_device_t *);
-int hc_address_device(xhci_device_t *);
-int hc_configure_device(xhci_device_t *);
-int hc_deconfigure_device(xhci_device_t *);
-int hc_add_endpoint(xhci_endpoint_t *);
-int hc_drop_endpoint(xhci_endpoint_t *);
-int hc_update_endpoint(xhci_endpoint_t *);
-int hc_stop_endpoint(xhci_endpoint_t *);
-int hc_reset_endpoint(xhci_endpoint_t *);
-int hc_reset_ring(xhci_endpoint_t *, uint32_t);
+extern int hc_enable_slot(xhci_device_t *);
+extern int hc_disable_slot(xhci_device_t *);
+extern int hc_address_device(xhci_device_t *);
+extern int hc_configure_device(xhci_device_t *);
+extern int hc_deconfigure_device(xhci_device_t *);
+extern int hc_add_endpoint(xhci_endpoint_t *);
+extern int hc_drop_endpoint(xhci_endpoint_t *);
+extern int hc_update_endpoint(xhci_endpoint_t *);
+extern int hc_stop_endpoint(xhci_endpoint_t *);
+extern int hc_reset_endpoint(xhci_endpoint_t *);
+extern int hc_reset_ring(xhci_endpoint_t *, uint32_t);
 
-int hc_status(bus_t *, uint32_t *);
-void hc_interrupt(bus_t *, uint32_t);
+extern int hc_status(bus_t *, uint32_t *);
+extern void hc_interrupt(bus_t *, uint32_t);
 
 #endif
Index: uspace/drv/bus/usb/xhci/isoch.h
===================================================================
--- uspace/drv/bus/usb/xhci/isoch.h	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
+++ uspace/drv/bus/usb/xhci/isoch.h	(revision 3dd80f8125dbca151590cbed383c0fad189d40fd)
@@ -117,11 +117,11 @@
 typedef struct usb_endpoint_descriptors usb_endpoint_descriptors_t;
 
-void isoch_init(xhci_endpoint_t *, const usb_endpoint_descriptors_t *);
-void isoch_fini(xhci_endpoint_t *);
-int isoch_alloc_transfers(xhci_endpoint_t *);
+extern void isoch_init(xhci_endpoint_t *, const usb_endpoint_descriptors_t *);
+extern void isoch_fini(xhci_endpoint_t *);
+extern int isoch_alloc_transfers(xhci_endpoint_t *);
 
-int isoch_schedule_out(xhci_transfer_t *);
-int isoch_schedule_in(xhci_transfer_t *);
-void isoch_handle_transfer_event(xhci_hc_t *, xhci_endpoint_t *, xhci_trb_t *);
+extern int isoch_schedule_out(xhci_transfer_t *);
+extern int isoch_schedule_in(xhci_transfer_t *);
+extern void isoch_handle_transfer_event(xhci_hc_t *, xhci_endpoint_t *, xhci_trb_t *);
 
 #endif
Index: uspace/drv/bus/usb/xhci/rh.h
===================================================================
--- uspace/drv/bus/usb/xhci/rh.h	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
+++ uspace/drv/bus/usb/xhci/rh.h	(revision 3dd80f8125dbca151590cbed383c0fad189d40fd)
@@ -75,10 +75,10 @@
 } xhci_rh_t;
 
-int xhci_rh_init(xhci_rh_t *, xhci_hc_t *);
-int xhci_rh_fini(xhci_rh_t *);
+extern int xhci_rh_init(xhci_rh_t *, xhci_hc_t *);
+extern int xhci_rh_fini(xhci_rh_t *);
 
-void xhci_rh_handle_port_change(xhci_rh_t *, uint8_t);
-void xhci_rh_set_ports_protocol(xhci_rh_t *, unsigned, unsigned, unsigned);
-void xhci_rh_startup(xhci_rh_t *);
+extern void xhci_rh_handle_port_change(xhci_rh_t *, uint8_t);
+extern void xhci_rh_set_ports_protocol(xhci_rh_t *, unsigned, unsigned, unsigned);
+extern void xhci_rh_startup(xhci_rh_t *);
 
 #endif
Index: uspace/drv/bus/usb/xhci/scratchpad.h
===================================================================
--- uspace/drv/bus/usb/xhci/scratchpad.h	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
+++ uspace/drv/bus/usb/xhci/scratchpad.h	(revision 3dd80f8125dbca151590cbed383c0fad189d40fd)
@@ -45,6 +45,6 @@
 typedef struct xhci_hc xhci_hc_t;
 
-int xhci_scratchpad_alloc(xhci_hc_t *);
-void xhci_scratchpad_free(xhci_hc_t *);
+extern int xhci_scratchpad_alloc(xhci_hc_t *);
+extern void xhci_scratchpad_free(xhci_hc_t *);
 
 #endif
Index: uspace/drv/bus/usb/xhci/streams.h
===================================================================
--- uspace/drv/bus/usb/xhci/streams.h	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
+++ uspace/drv/bus/usb/xhci/streams.h	(revision 3dd80f8125dbca151590cbed383c0fad189d40fd)
@@ -61,11 +61,11 @@
 } xhci_stream_data_t;
 
-xhci_stream_data_t *xhci_get_stream_ctx_data(xhci_endpoint_t *ep, uint32_t stream_id);
-void xhci_stream_free_ds(xhci_endpoint_t *xhci_ep);
+extern xhci_stream_data_t *xhci_get_stream_ctx_data(xhci_endpoint_t *ep, uint32_t stream_id);
+extern void xhci_stream_free_ds(xhci_endpoint_t *xhci_ep);
 
-int xhci_endpoint_remove_streams(xhci_hc_t *hc, xhci_device_t *dev, xhci_endpoint_t *xhci_ep);
-int xhci_endpoint_request_primary_streams(xhci_hc_t *hc, xhci_device_t *dev,
+extern int xhci_endpoint_remove_streams(xhci_hc_t *hc, xhci_device_t *dev, xhci_endpoint_t *xhci_ep);
+extern int xhci_endpoint_request_primary_streams(xhci_hc_t *hc, xhci_device_t *dev,
 	xhci_endpoint_t *xhci_ep, unsigned count);
-int xhci_endpoint_request_secondary_streams(xhci_hc_t *hc, xhci_device_t *dev,
+extern int xhci_endpoint_request_secondary_streams(xhci_hc_t *hc, xhci_device_t *dev,
 	xhci_endpoint_t *xhci_ep, unsigned *sizes, unsigned count);
 
Index: uspace/drv/bus/usb/xhci/transfers.h
===================================================================
--- uspace/drv/bus/usb/xhci/transfers.h	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
+++ uspace/drv/bus/usb/xhci/transfers.h	(revision 3dd80f8125dbca151590cbed383c0fad189d40fd)
@@ -55,9 +55,9 @@
 } xhci_transfer_t;
 
-usb_transfer_batch_t* xhci_transfer_create(endpoint_t *);
-int xhci_transfer_schedule(usb_transfer_batch_t *);
+extern usb_transfer_batch_t* xhci_transfer_create(endpoint_t *);
+extern int xhci_transfer_schedule(usb_transfer_batch_t *);
 
-int xhci_handle_transfer_event(xhci_hc_t *, xhci_trb_t *);
-void xhci_transfer_destroy(usb_transfer_batch_t *);
+extern int xhci_handle_transfer_event(xhci_hc_t *, xhci_trb_t *);
+extern void xhci_transfer_destroy(usb_transfer_batch_t *);
 
 static inline xhci_transfer_t *xhci_transfer_from_batch(usb_transfer_batch_t *batch)
Index: uspace/drv/bus/usb/xhci/trb_ring.h
===================================================================
--- uspace/drv/bus/usb/xhci/trb_ring.h	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
+++ uspace/drv/bus/usb/xhci/trb_ring.h	(revision 3dd80f8125dbca151590cbed383c0fad189d40fd)
@@ -74,10 +74,10 @@
 } xhci_trb_ring_t;
 
-int xhci_trb_ring_init(xhci_trb_ring_t *, size_t);
-void xhci_trb_ring_fini(xhci_trb_ring_t *);
-int xhci_trb_ring_enqueue(xhci_trb_ring_t *, xhci_trb_t *, uintptr_t *);
-int xhci_trb_ring_enqueue_multiple(xhci_trb_ring_t *, xhci_trb_t *, size_t, uintptr_t *);
+extern int xhci_trb_ring_init(xhci_trb_ring_t *, size_t);
+extern void xhci_trb_ring_fini(xhci_trb_ring_t *);
+extern int xhci_trb_ring_enqueue(xhci_trb_ring_t *, xhci_trb_t *, uintptr_t *);
+extern int xhci_trb_ring_enqueue_multiple(xhci_trb_ring_t *, xhci_trb_t *, size_t, uintptr_t *);
 
-void xhci_trb_ring_reset_dequeue_state(xhci_trb_ring_t *ring, uintptr_t *addr);
+extern void xhci_trb_ring_reset_dequeue_state(xhci_trb_ring_t *ring, uintptr_t *addr);
 
 /**
@@ -107,7 +107,7 @@
 } xhci_event_ring_t;
 
-int xhci_event_ring_init(xhci_event_ring_t *, size_t);
-void xhci_event_ring_fini(xhci_event_ring_t *);
-int xhci_event_ring_dequeue(xhci_event_ring_t *, xhci_trb_t *);
+extern int xhci_event_ring_init(xhci_event_ring_t *, size_t);
+extern void xhci_event_ring_fini(xhci_event_ring_t *);
+extern int xhci_event_ring_dequeue(xhci_event_ring_t *, xhci_trb_t *);
 
 /**
@@ -124,12 +124,12 @@
 } xhci_sw_ring_t;
 
-void xhci_sw_ring_init(xhci_sw_ring_t *, size_t);
+extern void xhci_sw_ring_init(xhci_sw_ring_t *, size_t);
 
 /* Both may block if the ring is full/empty. */
-int xhci_sw_ring_enqueue(xhci_sw_ring_t *, xhci_trb_t *);
-int xhci_sw_ring_dequeue(xhci_sw_ring_t *, xhci_trb_t *);
+extern int xhci_sw_ring_enqueue(xhci_sw_ring_t *, xhci_trb_t *);
+extern int xhci_sw_ring_dequeue(xhci_sw_ring_t *, xhci_trb_t *);
 
-void xhci_sw_ring_stop(xhci_sw_ring_t *);
-void xhci_sw_ring_fini(xhci_sw_ring_t *);
+extern void xhci_sw_ring_stop(xhci_sw_ring_t *);
+extern void xhci_sw_ring_fini(xhci_sw_ring_t *);
 
 #endif
