.. | .. |
---|
23 | 23 | |
---|
24 | 24 | /* -------------------------------------------------------------------------- */ |
---|
25 | 25 | |
---|
26 | | -/** |
---|
| 26 | +/* |
---|
27 | 27 | * struct c67x00_ep_data: Host endpoint data structure |
---|
28 | 28 | */ |
---|
29 | 29 | struct c67x00_ep_data { |
---|
.. | .. |
---|
34 | 34 | u16 next_frame; /* For int/isoc transactions */ |
---|
35 | 35 | }; |
---|
36 | 36 | |
---|
37 | | -/** |
---|
| 37 | +/* |
---|
38 | 38 | * struct c67x00_td |
---|
39 | 39 | * |
---|
40 | 40 | * Hardware parts are little endiannes, SW in CPU endianess. |
---|
.. | .. |
---|
130 | 130 | |
---|
131 | 131 | /* -------------------------------------------------------------------------- */ |
---|
132 | 132 | |
---|
133 | | -/** |
---|
| 133 | +/* |
---|
134 | 134 | * dbg_td - Dump the contents of the TD |
---|
135 | 135 | */ |
---|
136 | 136 | static void dbg_td(struct c67x00_hcd *c67x00, struct c67x00_td *td, char *msg) |
---|
.. | .. |
---|
161 | 161 | return c67x00_ll_husb_get_frame(c67x00->sie) & HOST_FRAME_MASK; |
---|
162 | 162 | } |
---|
163 | 163 | |
---|
164 | | -/** |
---|
| 164 | +/* |
---|
165 | 165 | * frame_add |
---|
166 | 166 | * Software wraparound for framenumbers. |
---|
167 | 167 | */ |
---|
.. | .. |
---|
170 | 170 | return (a + b) & HOST_FRAME_MASK; |
---|
171 | 171 | } |
---|
172 | 172 | |
---|
173 | | -/** |
---|
| 173 | +/* |
---|
174 | 174 | * frame_after - is frame a after frame b |
---|
175 | 175 | */ |
---|
176 | 176 | static inline int frame_after(u16 a, u16 b) |
---|
.. | .. |
---|
179 | 179 | (HOST_FRAME_MASK / 2); |
---|
180 | 180 | } |
---|
181 | 181 | |
---|
182 | | -/** |
---|
| 182 | +/* |
---|
183 | 183 | * frame_after_eq - is frame a after or equal to frame b |
---|
184 | 184 | */ |
---|
185 | 185 | static inline int frame_after_eq(u16 a, u16 b) |
---|
.. | .. |
---|
190 | 190 | |
---|
191 | 191 | /* -------------------------------------------------------------------------- */ |
---|
192 | 192 | |
---|
193 | | -/** |
---|
| 193 | +/* |
---|
194 | 194 | * c67x00_release_urb - remove link from all tds to this urb |
---|
195 | 195 | * Disconnects the urb from it's tds, so that it can be given back. |
---|
196 | 196 | * pre: urb->hcpriv != NULL |
---|
.. | .. |
---|
557 | 557 | |
---|
558 | 558 | /* -------------------------------------------------------------------------- */ |
---|
559 | 559 | |
---|
560 | | -/** |
---|
| 560 | +/* |
---|
561 | 561 | * td_addr and buf_addr must be word aligned |
---|
562 | 562 | */ |
---|
563 | 563 | static int c67x00_create_td(struct c67x00_hcd *c67x00, struct urb *urb, |
---|
.. | .. |
---|
685 | 685 | return 0; |
---|
686 | 686 | } |
---|
687 | 687 | |
---|
688 | | -/** |
---|
| 688 | +/* |
---|
689 | 689 | * return 0 in case more bandwidth is available, else errorcode |
---|
690 | 690 | */ |
---|
691 | 691 | static int c67x00_add_ctrl_urb(struct c67x00_hcd *c67x00, struct urb *urb) |
---|
.. | .. |
---|
710 | 710 | if (ret) |
---|
711 | 711 | return ret; |
---|
712 | 712 | break; |
---|
713 | | - } /* else fallthrough */ |
---|
| 713 | + } |
---|
| 714 | + fallthrough; |
---|
714 | 715 | case STATUS_STAGE: |
---|
715 | 716 | pid = !usb_pipeout(urb->pipe) ? USB_PID_OUT : USB_PID_IN; |
---|
716 | 717 | ret = c67x00_create_td(c67x00, urb, NULL, 0, pid, 1, |
---|
.. | .. |
---|
822 | 823 | |
---|
823 | 824 | /* -------------------------------------------------------------------------- */ |
---|
824 | 825 | |
---|
825 | | -/** |
---|
| 826 | +/* |
---|
826 | 827 | * Get TD from C67X00 |
---|
827 | 828 | */ |
---|
828 | 829 | static inline void |
---|
.. | .. |
---|
970 | 971 | |
---|
971 | 972 | /* -------------------------------------------------------------------------- */ |
---|
972 | 973 | |
---|
973 | | -/** |
---|
| 974 | +/* |
---|
974 | 975 | * c67x00_check_td_list - handle tds which have been processed by the c67x00 |
---|
975 | 976 | * pre: current_td == 0 |
---|
976 | 977 | */ |
---|
.. | .. |
---|
1045 | 1046 | return !c67x00_ll_husb_get_current_td(c67x00->sie); |
---|
1046 | 1047 | } |
---|
1047 | 1048 | |
---|
1048 | | -/** |
---|
| 1049 | +/* |
---|
1049 | 1050 | * Send td to C67X00 |
---|
1050 | 1051 | */ |
---|
1051 | 1052 | static void c67x00_send_td(struct c67x00_hcd *c67x00, struct c67x00_td *td) |
---|
.. | .. |
---|
1081 | 1082 | |
---|
1082 | 1083 | /* -------------------------------------------------------------------------- */ |
---|
1083 | 1084 | |
---|
1084 | | -/** |
---|
| 1085 | +/* |
---|
1085 | 1086 | * c67x00_do_work - Schedulers state machine |
---|
1086 | 1087 | */ |
---|
1087 | 1088 | static void c67x00_do_work(struct c67x00_hcd *c67x00) |
---|
.. | .. |
---|
1122 | 1123 | |
---|
1123 | 1124 | /* -------------------------------------------------------------------------- */ |
---|
1124 | 1125 | |
---|
1125 | | -static void c67x00_sched_tasklet(unsigned long __c67x00) |
---|
| 1126 | +static void c67x00_sched_tasklet(struct tasklet_struct *t) |
---|
1126 | 1127 | { |
---|
1127 | | - struct c67x00_hcd *c67x00 = (struct c67x00_hcd *)__c67x00; |
---|
| 1128 | + struct c67x00_hcd *c67x00 = from_tasklet(c67x00, t, tasklet); |
---|
1128 | 1129 | c67x00_do_work(c67x00); |
---|
1129 | 1130 | } |
---|
1130 | 1131 | |
---|
.. | .. |
---|
1135 | 1136 | |
---|
1136 | 1137 | int c67x00_sched_start_scheduler(struct c67x00_hcd *c67x00) |
---|
1137 | 1138 | { |
---|
1138 | | - tasklet_init(&c67x00->tasklet, c67x00_sched_tasklet, |
---|
1139 | | - (unsigned long)c67x00); |
---|
| 1139 | + tasklet_setup(&c67x00->tasklet, c67x00_sched_tasklet); |
---|
1140 | 1140 | return 0; |
---|
1141 | 1141 | } |
---|
1142 | 1142 | |
---|