diff options
author | David S. Miller <davem@davemloft.net> | 2009-10-07 01:43:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-07 01:43:16 -0400 |
commit | 7ecc59c1b7fd5749667fc31f8683099cbef38977 (patch) | |
tree | 560d8ce48fac50758d1af6d722bc0bb0c7de2a34 | |
parent | bcdce7195e0eab55b37dbd53be53057f38006380 (diff) | |
parent | 1cec9727fbfd7baff2034796154be1a0297bcedd (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
36 files changed, 454 insertions, 188 deletions
diff --git a/Documentation/isdn/INTERFACE.CAPI b/Documentation/isdn/INTERFACE.CAPI index 686e107923ec..5fe8de5cc727 100644 --- a/Documentation/isdn/INTERFACE.CAPI +++ b/Documentation/isdn/INTERFACE.CAPI | |||
@@ -60,10 +60,9 @@ open() operation on regular files or character devices. | |||
60 | 60 | ||
61 | After a successful return from register_appl(), CAPI messages from the | 61 | After a successful return from register_appl(), CAPI messages from the |
62 | application may be passed to the driver for the device via calls to the | 62 | application may be passed to the driver for the device via calls to the |
63 | send_message() callback function. The CAPI message to send is stored in the | 63 | send_message() callback function. Conversely, the driver may call Kernel |
64 | data portion of an skb. Conversely, the driver may call Kernel CAPI's | 64 | CAPI's capi_ctr_handle_message() function to pass a received CAPI message to |
65 | capi_ctr_handle_message() function to pass a received CAPI message to Kernel | 65 | Kernel CAPI for forwarding to an application, specifying its ApplID. |
66 | CAPI for forwarding to an application, specifying its ApplID. | ||
67 | 66 | ||
68 | Deregistration requests (CAPI operation CAPI_RELEASE) from applications are | 67 | Deregistration requests (CAPI operation CAPI_RELEASE) from applications are |
69 | forwarded as calls to the release_appl() callback function, passing the same | 68 | forwarded as calls to the release_appl() callback function, passing the same |
@@ -142,6 +141,7 @@ u16 (*send_message)(struct capi_ctr *ctrlr, struct sk_buff *skb) | |||
142 | to accepting or queueing the message. Errors occurring during the | 141 | to accepting or queueing the message. Errors occurring during the |
143 | actual processing of the message should be signaled with an | 142 | actual processing of the message should be signaled with an |
144 | appropriate reply message. | 143 | appropriate reply message. |
144 | May be called in process or interrupt context. | ||
145 | Calls to this function are not serialized by Kernel CAPI, ie. it must | 145 | Calls to this function are not serialized by Kernel CAPI, ie. it must |
146 | be prepared to be re-entered. | 146 | be prepared to be re-entered. |
147 | 147 | ||
@@ -154,7 +154,8 @@ read_proc_t *ctr_read_proc | |||
154 | system entry, /proc/capi/controllers/<n>; will be called with a | 154 | system entry, /proc/capi/controllers/<n>; will be called with a |
155 | pointer to the device's capi_ctr structure as the last (data) argument | 155 | pointer to the device's capi_ctr structure as the last (data) argument |
156 | 156 | ||
157 | Note: Callback functions are never called in interrupt context. | 157 | Note: Callback functions except send_message() are never called in interrupt |
158 | context. | ||
158 | 159 | ||
159 | - to be filled in before calling capi_ctr_ready(): | 160 | - to be filled in before calling capi_ctr_ready(): |
160 | 161 | ||
@@ -171,14 +172,40 @@ u8 serial[CAPI_SERIAL_LEN] | |||
171 | value to return for CAPI_GET_SERIAL | 172 | value to return for CAPI_GET_SERIAL |
172 | 173 | ||
173 | 174 | ||
174 | 4.3 The _cmsg Structure | 175 | 4.3 SKBs |
176 | |||
177 | CAPI messages are passed between Kernel CAPI and the driver via send_message() | ||
178 | and capi_ctr_handle_message(), stored in the data portion of a socket buffer | ||
179 | (skb). Each skb contains a single CAPI message coded according to the CAPI 2.0 | ||
180 | standard. | ||
181 | |||
182 | For the data transfer messages, DATA_B3_REQ and DATA_B3_IND, the actual | ||
183 | payload data immediately follows the CAPI message itself within the same skb. | ||
184 | The Data and Data64 parameters are not used for processing. The Data64 | ||
185 | parameter may be omitted by setting the length field of the CAPI message to 22 | ||
186 | instead of 30. | ||
187 | |||
188 | |||
189 | 4.4 The _cmsg Structure | ||
175 | 190 | ||
176 | (declared in <linux/isdn/capiutil.h>) | 191 | (declared in <linux/isdn/capiutil.h>) |
177 | 192 | ||
178 | The _cmsg structure stores the contents of a CAPI 2.0 message in an easily | 193 | The _cmsg structure stores the contents of a CAPI 2.0 message in an easily |
179 | accessible form. It contains members for all possible CAPI 2.0 parameters, of | 194 | accessible form. It contains members for all possible CAPI 2.0 parameters, |
180 | which only those appearing in the message type currently being processed are | 195 | including subparameters of the Additional Info and B Protocol structured |
181 | actually used. Unused members should be set to zero. | 196 | parameters, with the following exceptions: |
197 | |||
198 | * second Calling party number (CONNECT_IND) | ||
199 | |||
200 | * Data64 (DATA_B3_REQ and DATA_B3_IND) | ||
201 | |||
202 | * Sending complete (subparameter of Additional Info, CONNECT_REQ and INFO_REQ) | ||
203 | |||
204 | * Global Configuration (subparameter of B Protocol, CONNECT_REQ, CONNECT_RESP | ||
205 | and SELECT_B_PROTOCOL_REQ) | ||
206 | |||
207 | Only those parameters appearing in the message type currently being processed | ||
208 | are actually used. Unused members should be set to zero. | ||
182 | 209 | ||
183 | Members are named after the CAPI 2.0 standard names of the parameters they | 210 | Members are named after the CAPI 2.0 standard names of the parameters they |
184 | represent. See <linux/isdn/capiutil.h> for the exact spelling. Member data | 211 | represent. See <linux/isdn/capiutil.h> for the exact spelling. Member data |
@@ -190,18 +217,19 @@ u16 for CAPI parameters of type 'word' | |||
190 | 217 | ||
191 | u32 for CAPI parameters of type 'dword' | 218 | u32 for CAPI parameters of type 'dword' |
192 | 219 | ||
193 | _cstruct for CAPI parameters of type 'struct' not containing any | 220 | _cstruct for CAPI parameters of type 'struct' |
194 | variably-sized (struct) subparameters (eg. 'Called Party Number') | ||
195 | The member is a pointer to a buffer containing the parameter in | 221 | The member is a pointer to a buffer containing the parameter in |
196 | CAPI encoding (length + content). It may also be NULL, which will | 222 | CAPI encoding (length + content). It may also be NULL, which will |
197 | be taken to represent an empty (zero length) parameter. | 223 | be taken to represent an empty (zero length) parameter. |
224 | Subparameters are stored in encoded form within the content part. | ||
198 | 225 | ||
199 | _cmstruct for CAPI parameters of type 'struct' containing 'struct' | 226 | _cmstruct alternative representation for CAPI parameters of type 'struct' |
200 | subparameters ('Additional Info' and 'B Protocol') | 227 | (used only for the 'Additional Info' and 'B Protocol' parameters) |
201 | The representation is a single byte containing one of the values: | 228 | The representation is a single byte containing one of the values: |
202 | CAPI_DEFAULT: the parameter is empty | 229 | CAPI_DEFAULT: The parameter is empty/absent. |
203 | CAPI_COMPOSE: the values of the subparameters are stored | 230 | CAPI_COMPOSE: The parameter is present. |
204 | individually in the corresponding _cmsg structure members | 231 | Subparameter values are stored individually in the corresponding |
232 | _cmsg structure members. | ||
205 | 233 | ||
206 | Functions capi_cmsg2message() and capi_message2cmsg() are provided to convert | 234 | Functions capi_cmsg2message() and capi_message2cmsg() are provided to convert |
207 | messages between their transport encoding described in the CAPI 2.0 standard | 235 | messages between their transport encoding described in the CAPI 2.0 standard |
@@ -297,3 +325,26 @@ char *capi_cmd2str(u8 Command, u8 Subcommand) | |||
297 | be NULL if the command/subcommand is not one of those defined in the | 325 | be NULL if the command/subcommand is not one of those defined in the |
298 | CAPI 2.0 standard. | 326 | CAPI 2.0 standard. |
299 | 327 | ||
328 | |||
329 | 7. Debugging | ||
330 | |||
331 | The module kernelcapi has a module parameter showcapimsgs controlling some | ||
332 | debugging output produced by the module. It can only be set when the module is | ||
333 | loaded, via a parameter "showcapimsgs=<n>" to the modprobe command, either on | ||
334 | the command line or in the configuration file. | ||
335 | |||
336 | If the lowest bit of showcapimsgs is set, kernelcapi logs controller and | ||
337 | application up and down events. | ||
338 | |||
339 | In addition, every registered CAPI controller has an associated traceflag | ||
340 | parameter controlling how CAPI messages sent from and to tha controller are | ||
341 | logged. The traceflag parameter is initialized with the value of the | ||
342 | showcapimsgs parameter when the controller is registered, but can later be | ||
343 | changed via the MANUFACTURER_REQ command KCAPI_CMD_TRACE. | ||
344 | |||
345 | If the value of traceflag is non-zero, CAPI messages are logged. | ||
346 | DATA_B3 messages are only logged if the value of traceflag is > 2. | ||
347 | |||
348 | If the lowest bit of traceflag is set, only the command/subcommand and message | ||
349 | length are logged. Otherwise, kernelcapi logs a readable representation of | ||
350 | the entire message. | ||
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt index c6cf4a3c16e0..61bb645d50e0 100644 --- a/Documentation/networking/pktgen.txt +++ b/Documentation/networking/pktgen.txt | |||
@@ -90,6 +90,11 @@ Examples: | |||
90 | pgset "dstmac 00:00:00:00:00:00" sets MAC destination address | 90 | pgset "dstmac 00:00:00:00:00:00" sets MAC destination address |
91 | pgset "srcmac 00:00:00:00:00:00" sets MAC source address | 91 | pgset "srcmac 00:00:00:00:00:00" sets MAC source address |
92 | 92 | ||
93 | pgset "queue_map_min 0" Sets the min value of tx queue interval | ||
94 | pgset "queue_map_max 7" Sets the max value of tx queue interval, for multiqueue devices | ||
95 | To select queue 1 of a given device, | ||
96 | use queue_map_min=1 and queue_map_max=1 | ||
97 | |||
93 | pgset "src_mac_count 1" Sets the number of MACs we'll range through. | 98 | pgset "src_mac_count 1" Sets the number of MACs we'll range through. |
94 | The 'minimum' MAC is what you set with srcmac. | 99 | The 'minimum' MAC is what you set with srcmac. |
95 | 100 | ||
@@ -101,6 +106,9 @@ Examples: | |||
101 | IPDST_RND, UDPSRC_RND, | 106 | IPDST_RND, UDPSRC_RND, |
102 | UDPDST_RND, MACSRC_RND, MACDST_RND | 107 | UDPDST_RND, MACSRC_RND, MACDST_RND |
103 | MPLS_RND, VID_RND, SVID_RND | 108 | MPLS_RND, VID_RND, SVID_RND |
109 | QUEUE_MAP_RND # queue map random | ||
110 | QUEUE_MAP_CPU # queue map mirrors smp_processor_id() | ||
111 | |||
104 | 112 | ||
105 | pgset "udp_src_min 9" set UDP source port min, If < udp_src_max, then | 113 | pgset "udp_src_min 9" set UDP source port min, If < udp_src_max, then |
106 | cycle through the port range. | 114 | cycle through the port range. |
diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c index abf4a2529f80..60697909ebdb 100644 --- a/drivers/connector/cn_proc.c +++ b/drivers/connector/cn_proc.c | |||
@@ -227,7 +227,8 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack) | |||
227 | * cn_proc_mcast_ctl | 227 | * cn_proc_mcast_ctl |
228 | * @data: message sent from userspace via the connector | 228 | * @data: message sent from userspace via the connector |
229 | */ | 229 | */ |
230 | static void cn_proc_mcast_ctl(struct cn_msg *msg) | 230 | static void cn_proc_mcast_ctl(struct cn_msg *msg, |
231 | struct netlink_skb_parms *nsp) | ||
231 | { | 232 | { |
232 | enum proc_cn_mcast_op *mc_op = NULL; | 233 | enum proc_cn_mcast_op *mc_op = NULL; |
233 | int err = 0; | 234 | int err = 0; |
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 2d8352419c0d..65bf91e16a42 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -603,7 +603,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb) | |||
603 | 603 | ||
604 | if (CAPIMSG_CMD(skb->data) == CAPI_CONNECT_B3_CONF) { | 604 | if (CAPIMSG_CMD(skb->data) == CAPI_CONNECT_B3_CONF) { |
605 | u16 info = CAPIMSG_U16(skb->data, 12); // Info field | 605 | u16 info = CAPIMSG_U16(skb->data, 12); // Info field |
606 | if (info == 0) { | 606 | if ((info & 0xff00) == 0) { |
607 | mutex_lock(&cdev->ncci_list_mtx); | 607 | mutex_lock(&cdev->ncci_list_mtx); |
608 | capincci_alloc(cdev, CAPIMSG_NCCI(skb->data)); | 608 | capincci_alloc(cdev, CAPIMSG_NCCI(skb->data)); |
609 | mutex_unlock(&cdev->ncci_list_mtx); | 609 | mutex_unlock(&cdev->ncci_list_mtx); |
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c index 650120261abf..3e6d17f42a98 100644 --- a/drivers/isdn/capi/capidrv.c +++ b/drivers/isdn/capi/capidrv.c | |||
@@ -40,7 +40,7 @@ static int debugmode = 0; | |||
40 | MODULE_DESCRIPTION("CAPI4Linux: Interface to ISDN4Linux"); | 40 | MODULE_DESCRIPTION("CAPI4Linux: Interface to ISDN4Linux"); |
41 | MODULE_AUTHOR("Carsten Paeth"); | 41 | MODULE_AUTHOR("Carsten Paeth"); |
42 | MODULE_LICENSE("GPL"); | 42 | MODULE_LICENSE("GPL"); |
43 | module_param(debugmode, uint, 0); | 43 | module_param(debugmode, uint, S_IRUGO|S_IWUSR); |
44 | 44 | ||
45 | /* -------- type definitions ----------------------------------------- */ | 45 | /* -------- type definitions ----------------------------------------- */ |
46 | 46 | ||
@@ -671,8 +671,8 @@ static void n0(capidrv_contr * card, capidrv_ncci * ncci) | |||
671 | NULL, /* Useruserdata */ /* $$$$ */ | 671 | NULL, /* Useruserdata */ /* $$$$ */ |
672 | NULL /* Facilitydataarray */ | 672 | NULL /* Facilitydataarray */ |
673 | ); | 673 | ); |
674 | send_message(card, &cmsg); | ||
675 | plci_change_state(card, ncci->plcip, EV_PLCI_DISCONNECT_REQ); | 674 | plci_change_state(card, ncci->plcip, EV_PLCI_DISCONNECT_REQ); |
675 | send_message(card, &cmsg); | ||
676 | 676 | ||
677 | cmd.command = ISDN_STAT_BHUP; | 677 | cmd.command = ISDN_STAT_BHUP; |
678 | cmd.driver = card->myid; | 678 | cmd.driver = card->myid; |
@@ -924,8 +924,8 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg) | |||
924 | */ | 924 | */ |
925 | capi_cmsg_answer(cmsg); | 925 | capi_cmsg_answer(cmsg); |
926 | cmsg->Reject = 1; /* ignore */ | 926 | cmsg->Reject = 1; /* ignore */ |
927 | send_message(card, cmsg); | ||
928 | plci_change_state(card, plcip, EV_PLCI_CONNECT_REJECT); | 927 | plci_change_state(card, plcip, EV_PLCI_CONNECT_REJECT); |
928 | send_message(card, cmsg); | ||
929 | printk(KERN_INFO "capidrv-%d: incoming call %s,%d,%d,%s ignored\n", | 929 | printk(KERN_INFO "capidrv-%d: incoming call %s,%d,%d,%s ignored\n", |
930 | card->contrnr, | 930 | card->contrnr, |
931 | cmd.parm.setup.phone, | 931 | cmd.parm.setup.phone, |
@@ -974,8 +974,8 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg) | |||
974 | case 2: /* Call will be rejected. */ | 974 | case 2: /* Call will be rejected. */ |
975 | capi_cmsg_answer(cmsg); | 975 | capi_cmsg_answer(cmsg); |
976 | cmsg->Reject = 2; /* reject call, normal call clearing */ | 976 | cmsg->Reject = 2; /* reject call, normal call clearing */ |
977 | send_message(card, cmsg); | ||
978 | plci_change_state(card, plcip, EV_PLCI_CONNECT_REJECT); | 977 | plci_change_state(card, plcip, EV_PLCI_CONNECT_REJECT); |
978 | send_message(card, cmsg); | ||
979 | break; | 979 | break; |
980 | 980 | ||
981 | default: | 981 | default: |
@@ -983,8 +983,8 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg) | |||
983 | capi_cmsg_answer(cmsg); | 983 | capi_cmsg_answer(cmsg); |
984 | cmsg->Reject = 8; /* reject call, | 984 | cmsg->Reject = 8; /* reject call, |
985 | destination out of order */ | 985 | destination out of order */ |
986 | send_message(card, cmsg); | ||
987 | plci_change_state(card, plcip, EV_PLCI_CONNECT_REJECT); | 986 | plci_change_state(card, plcip, EV_PLCI_CONNECT_REJECT); |
987 | send_message(card, cmsg); | ||
988 | break; | 988 | break; |
989 | } | 989 | } |
990 | return; | 990 | return; |
@@ -1020,8 +1020,8 @@ static void handle_plci(_cmsg * cmsg) | |||
1020 | card->bchans[plcip->chan].disconnecting = 1; | 1020 | card->bchans[plcip->chan].disconnecting = 1; |
1021 | plci_change_state(card, plcip, EV_PLCI_DISCONNECT_IND); | 1021 | plci_change_state(card, plcip, EV_PLCI_DISCONNECT_IND); |
1022 | capi_cmsg_answer(cmsg); | 1022 | capi_cmsg_answer(cmsg); |
1023 | send_message(card, cmsg); | ||
1024 | plci_change_state(card, plcip, EV_PLCI_DISCONNECT_RESP); | 1023 | plci_change_state(card, plcip, EV_PLCI_DISCONNECT_RESP); |
1024 | send_message(card, cmsg); | ||
1025 | break; | 1025 | break; |
1026 | 1026 | ||
1027 | case CAPI_DISCONNECT_CONF: /* plci */ | 1027 | case CAPI_DISCONNECT_CONF: /* plci */ |
@@ -1078,8 +1078,8 @@ static void handle_plci(_cmsg * cmsg) | |||
1078 | 1078 | ||
1079 | if (card->bchans[plcip->chan].incoming) { | 1079 | if (card->bchans[plcip->chan].incoming) { |
1080 | capi_cmsg_answer(cmsg); | 1080 | capi_cmsg_answer(cmsg); |
1081 | send_message(card, cmsg); | ||
1082 | plci_change_state(card, plcip, EV_PLCI_CONNECT_ACTIVE_IND); | 1081 | plci_change_state(card, plcip, EV_PLCI_CONNECT_ACTIVE_IND); |
1082 | send_message(card, cmsg); | ||
1083 | } else { | 1083 | } else { |
1084 | capidrv_ncci *nccip; | 1084 | capidrv_ncci *nccip; |
1085 | capi_cmsg_answer(cmsg); | 1085 | capi_cmsg_answer(cmsg); |
@@ -1098,13 +1098,14 @@ static void handle_plci(_cmsg * cmsg) | |||
1098 | NULL /* NCPI */ | 1098 | NULL /* NCPI */ |
1099 | ); | 1099 | ); |
1100 | nccip->msgid = cmsg->Messagenumber; | 1100 | nccip->msgid = cmsg->Messagenumber; |
1101 | plci_change_state(card, plcip, | ||
1102 | EV_PLCI_CONNECT_ACTIVE_IND); | ||
1103 | ncci_change_state(card, nccip, EV_NCCI_CONNECT_B3_REQ); | ||
1101 | send_message(card, cmsg); | 1104 | send_message(card, cmsg); |
1102 | cmd.command = ISDN_STAT_DCONN; | 1105 | cmd.command = ISDN_STAT_DCONN; |
1103 | cmd.driver = card->myid; | 1106 | cmd.driver = card->myid; |
1104 | cmd.arg = plcip->chan; | 1107 | cmd.arg = plcip->chan; |
1105 | card->interface.statcallb(&cmd); | 1108 | card->interface.statcallb(&cmd); |
1106 | plci_change_state(card, plcip, EV_PLCI_CONNECT_ACTIVE_IND); | ||
1107 | ncci_change_state(card, nccip, EV_NCCI_CONNECT_B3_REQ); | ||
1108 | } | 1109 | } |
1109 | break; | 1110 | break; |
1110 | 1111 | ||
@@ -1193,8 +1194,8 @@ static void handle_ncci(_cmsg * cmsg) | |||
1193 | goto notfound; | 1194 | goto notfound; |
1194 | 1195 | ||
1195 | capi_cmsg_answer(cmsg); | 1196 | capi_cmsg_answer(cmsg); |
1196 | send_message(card, cmsg); | ||
1197 | ncci_change_state(card, nccip, EV_NCCI_CONNECT_B3_ACTIVE_IND); | 1197 | ncci_change_state(card, nccip, EV_NCCI_CONNECT_B3_ACTIVE_IND); |
1198 | send_message(card, cmsg); | ||
1198 | 1199 | ||
1199 | cmd.command = ISDN_STAT_BCONN; | 1200 | cmd.command = ISDN_STAT_BCONN; |
1200 | cmd.driver = card->myid; | 1201 | cmd.driver = card->myid; |
@@ -1222,8 +1223,8 @@ static void handle_ncci(_cmsg * cmsg) | |||
1222 | 0, /* Reject */ | 1223 | 0, /* Reject */ |
1223 | NULL /* NCPI */ | 1224 | NULL /* NCPI */ |
1224 | ); | 1225 | ); |
1225 | send_message(card, cmsg); | ||
1226 | ncci_change_state(card, nccip, EV_NCCI_CONNECT_B3_RESP); | 1226 | ncci_change_state(card, nccip, EV_NCCI_CONNECT_B3_RESP); |
1227 | send_message(card, cmsg); | ||
1227 | break; | 1228 | break; |
1228 | } | 1229 | } |
1229 | printk(KERN_ERR "capidrv-%d: no mem for ncci, sorry\n", card->contrnr); | 1230 | printk(KERN_ERR "capidrv-%d: no mem for ncci, sorry\n", card->contrnr); |
@@ -1299,8 +1300,8 @@ static void handle_ncci(_cmsg * cmsg) | |||
1299 | card->bchans[nccip->chan].disconnecting = 1; | 1300 | card->bchans[nccip->chan].disconnecting = 1; |
1300 | ncci_change_state(card, nccip, EV_NCCI_DISCONNECT_B3_IND); | 1301 | ncci_change_state(card, nccip, EV_NCCI_DISCONNECT_B3_IND); |
1301 | capi_cmsg_answer(cmsg); | 1302 | capi_cmsg_answer(cmsg); |
1302 | send_message(card, cmsg); | ||
1303 | ncci_change_state(card, nccip, EV_NCCI_DISCONNECT_B3_RESP); | 1303 | ncci_change_state(card, nccip, EV_NCCI_DISCONNECT_B3_RESP); |
1304 | send_message(card, cmsg); | ||
1304 | break; | 1305 | break; |
1305 | 1306 | ||
1306 | case CAPI_DISCONNECT_B3_CONF: /* ncci */ | 1307 | case CAPI_DISCONNECT_B3_CONF: /* ncci */ |
@@ -2014,8 +2015,8 @@ static void send_listen(capidrv_contr *card) | |||
2014 | card->cipmask, | 2015 | card->cipmask, |
2015 | card->cipmask2, | 2016 | card->cipmask2, |
2016 | NULL, NULL); | 2017 | NULL, NULL); |
2017 | send_message(card, &cmdcmsg); | ||
2018 | listen_change_state(card, EV_LISTEN_REQ); | 2018 | listen_change_state(card, EV_LISTEN_REQ); |
2019 | send_message(card, &cmdcmsg); | ||
2019 | } | 2020 | } |
2020 | 2021 | ||
2021 | static void listentimerfunc(unsigned long x) | 2022 | static void listentimerfunc(unsigned long x) |
diff --git a/drivers/isdn/gigaset/asyncdata.c b/drivers/isdn/gigaset/asyncdata.c index 234cc5d53312..44a58e6f8f65 100644 --- a/drivers/isdn/gigaset/asyncdata.c +++ b/drivers/isdn/gigaset/asyncdata.c | |||
@@ -334,7 +334,14 @@ static inline int iraw_loop(unsigned char c, unsigned char *src, int numbytes, | |||
334 | return startbytes - numbytes; | 334 | return startbytes - numbytes; |
335 | } | 335 | } |
336 | 336 | ||
337 | /* process a block of data received from the device | 337 | /** |
338 | * gigaset_m10x_input() - process a block of data received from the device | ||
339 | * @inbuf: received data and device descriptor structure. | ||
340 | * | ||
341 | * Called by hardware module {ser,usb}_gigaset with a block of received | ||
342 | * bytes. Separates the bytes received over the serial data channel into | ||
343 | * user data and command replies (locked/unlocked) according to the | ||
344 | * current state of the interface. | ||
338 | */ | 345 | */ |
339 | void gigaset_m10x_input(struct inbuf_t *inbuf) | 346 | void gigaset_m10x_input(struct inbuf_t *inbuf) |
340 | { | 347 | { |
@@ -543,16 +550,17 @@ static struct sk_buff *iraw_encode(struct sk_buff *skb, int head, int tail) | |||
543 | return iraw_skb; | 550 | return iraw_skb; |
544 | } | 551 | } |
545 | 552 | ||
546 | /* gigaset_send_skb | 553 | /** |
547 | * called by common.c to queue an skb for sending | 554 | * gigaset_m10x_send_skb() - queue an skb for sending |
548 | * and start transmission if necessary | 555 | * @bcs: B channel descriptor structure. |
549 | * parameters: | 556 | * @skb: data to send. |
550 | * B Channel control structure | 557 | * |
551 | * skb | 558 | * Called by i4l.c to encode and queue an skb for sending, and start |
559 | * transmission if necessary. | ||
560 | * | ||
552 | * Return value: | 561 | * Return value: |
553 | * number of bytes accepted for sending | 562 | * number of bytes accepted for sending (skb->len) if ok, |
554 | * (skb->len if ok, 0 if out of buffer space) | 563 | * error code < 0 (eg. -ENOMEM) on error |
555 | * or error code (< 0, eg. -EINVAL) | ||
556 | */ | 564 | */ |
557 | int gigaset_m10x_send_skb(struct bc_state *bcs, struct sk_buff *skb) | 565 | int gigaset_m10x_send_skb(struct bc_state *bcs, struct sk_buff *skb) |
558 | { | 566 | { |
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 781c4041f7b0..5ed1d99eb9f3 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
@@ -134,6 +134,7 @@ struct bas_cardstate { | |||
134 | #define BS_ATRDPEND 0x040 /* urb_cmd_in in use */ | 134 | #define BS_ATRDPEND 0x040 /* urb_cmd_in in use */ |
135 | #define BS_ATWRPEND 0x080 /* urb_cmd_out in use */ | 135 | #define BS_ATWRPEND 0x080 /* urb_cmd_out in use */ |
136 | #define BS_SUSPEND 0x100 /* USB port suspended */ | 136 | #define BS_SUSPEND 0x100 /* USB port suspended */ |
137 | #define BS_RESETTING 0x200 /* waiting for HD_RESET_INTERRUPT_PIPE_ACK */ | ||
137 | 138 | ||
138 | 139 | ||
139 | static struct gigaset_driver *driver = NULL; | 140 | static struct gigaset_driver *driver = NULL; |
@@ -319,6 +320,21 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag) | |||
319 | return -EINVAL; | 320 | return -EINVAL; |
320 | } | 321 | } |
321 | 322 | ||
323 | /* set/clear bits in base connection state, return previous state | ||
324 | */ | ||
325 | static inline int update_basstate(struct bas_cardstate *ucs, | ||
326 | int set, int clear) | ||
327 | { | ||
328 | unsigned long flags; | ||
329 | int state; | ||
330 | |||
331 | spin_lock_irqsave(&ucs->lock, flags); | ||
332 | state = ucs->basstate; | ||
333 | ucs->basstate = (state & ~clear) | set; | ||
334 | spin_unlock_irqrestore(&ucs->lock, flags); | ||
335 | return state; | ||
336 | } | ||
337 | |||
322 | /* error_hangup | 338 | /* error_hangup |
323 | * hang up any existing connection because of an unrecoverable error | 339 | * hang up any existing connection because of an unrecoverable error |
324 | * This function may be called from any context and takes care of scheduling | 340 | * This function may be called from any context and takes care of scheduling |
@@ -350,12 +366,9 @@ static inline void error_hangup(struct bc_state *bcs) | |||
350 | */ | 366 | */ |
351 | static inline void error_reset(struct cardstate *cs) | 367 | static inline void error_reset(struct cardstate *cs) |
352 | { | 368 | { |
353 | /* close AT command channel to recover (ignore errors) */ | 369 | /* reset interrupt pipe to recover (ignore errors) */ |
354 | req_submit(cs->bcs, HD_CLOSE_ATCHANNEL, 0, BAS_TIMEOUT); | 370 | update_basstate(cs->hw.bas, BS_RESETTING, 0); |
355 | 371 | req_submit(cs->bcs, HD_RESET_INTERRUPT_PIPE, 0, BAS_TIMEOUT); | |
356 | //FIXME try to recover without bothering the user | ||
357 | dev_err(cs->dev, | ||
358 | "unrecoverable error - please disconnect Gigaset base to reset\n"); | ||
359 | } | 372 | } |
360 | 373 | ||
361 | /* check_pending | 374 | /* check_pending |
@@ -398,8 +411,13 @@ static void check_pending(struct bas_cardstate *ucs) | |||
398 | case HD_DEVICE_INIT_ACK: /* no reply expected */ | 411 | case HD_DEVICE_INIT_ACK: /* no reply expected */ |
399 | ucs->pending = 0; | 412 | ucs->pending = 0; |
400 | break; | 413 | break; |
401 | /* HD_READ_ATMESSAGE, HD_WRITE_ATMESSAGE, HD_RESET_INTERRUPTPIPE | 414 | case HD_RESET_INTERRUPT_PIPE: |
402 | * are handled separately and should never end up here | 415 | if (!(ucs->basstate & BS_RESETTING)) |
416 | ucs->pending = 0; | ||
417 | break; | ||
418 | /* | ||
419 | * HD_READ_ATMESSAGE and HD_WRITE_ATMESSAGE are handled separately | ||
420 | * and should never end up here | ||
403 | */ | 421 | */ |
404 | default: | 422 | default: |
405 | dev_warn(&ucs->interface->dev, | 423 | dev_warn(&ucs->interface->dev, |
@@ -449,21 +467,6 @@ static void cmd_in_timeout(unsigned long data) | |||
449 | error_reset(cs); | 467 | error_reset(cs); |
450 | } | 468 | } |
451 | 469 | ||
452 | /* set/clear bits in base connection state, return previous state | ||
453 | */ | ||
454 | inline static int update_basstate(struct bas_cardstate *ucs, | ||
455 | int set, int clear) | ||
456 | { | ||
457 | unsigned long flags; | ||
458 | int state; | ||
459 | |||
460 | spin_lock_irqsave(&ucs->lock, flags); | ||
461 | state = ucs->basstate; | ||
462 | ucs->basstate = (state & ~clear) | set; | ||
463 | spin_unlock_irqrestore(&ucs->lock, flags); | ||
464 | return state; | ||
465 | } | ||
466 | |||
467 | /* read_ctrl_callback | 470 | /* read_ctrl_callback |
468 | * USB completion handler for control pipe input | 471 | * USB completion handler for control pipe input |
469 | * called by the USB subsystem in interrupt context | 472 | * called by the USB subsystem in interrupt context |
@@ -762,7 +765,8 @@ static void read_int_callback(struct urb *urb) | |||
762 | break; | 765 | break; |
763 | 766 | ||
764 | case HD_RESET_INTERRUPT_PIPE_ACK: | 767 | case HD_RESET_INTERRUPT_PIPE_ACK: |
765 | gig_dbg(DEBUG_USBREQ, "HD_RESET_INTERRUPT_PIPE_ACK"); | 768 | update_basstate(ucs, 0, BS_RESETTING); |
769 | dev_notice(cs->dev, "interrupt pipe reset\n"); | ||
766 | break; | 770 | break; |
767 | 771 | ||
768 | case HD_SUSPEND_END: | 772 | case HD_SUSPEND_END: |
@@ -1331,28 +1335,24 @@ static void read_iso_tasklet(unsigned long data) | |||
1331 | rcvbuf = urb->transfer_buffer; | 1335 | rcvbuf = urb->transfer_buffer; |
1332 | totleft = urb->actual_length; | 1336 | totleft = urb->actual_length; |
1333 | for (frame = 0; totleft > 0 && frame < BAS_NUMFRAMES; frame++) { | 1337 | for (frame = 0; totleft > 0 && frame < BAS_NUMFRAMES; frame++) { |
1334 | if (unlikely(urb->iso_frame_desc[frame].status)) { | 1338 | numbytes = urb->iso_frame_desc[frame].actual_length; |
1339 | if (unlikely(urb->iso_frame_desc[frame].status)) | ||
1335 | dev_warn(cs->dev, | 1340 | dev_warn(cs->dev, |
1336 | "isochronous read: frame %d: %s\n", | 1341 | "isochronous read: frame %d[%d]: %s\n", |
1337 | frame, | 1342 | frame, numbytes, |
1338 | get_usb_statmsg( | 1343 | get_usb_statmsg( |
1339 | urb->iso_frame_desc[frame].status)); | 1344 | urb->iso_frame_desc[frame].status)); |
1340 | break; | 1345 | if (unlikely(numbytes > BAS_MAXFRAME)) |
1341 | } | ||
1342 | numbytes = urb->iso_frame_desc[frame].actual_length; | ||
1343 | if (unlikely(numbytes > BAS_MAXFRAME)) { | ||
1344 | dev_warn(cs->dev, | 1346 | dev_warn(cs->dev, |
1345 | "isochronous read: frame %d: " | 1347 | "isochronous read: frame %d: " |
1346 | "numbytes (%d) > BAS_MAXFRAME\n", | 1348 | "numbytes (%d) > BAS_MAXFRAME\n", |
1347 | frame, numbytes); | 1349 | frame, numbytes); |
1348 | break; | ||
1349 | } | ||
1350 | if (unlikely(numbytes > totleft)) { | 1350 | if (unlikely(numbytes > totleft)) { |
1351 | dev_warn(cs->dev, | 1351 | dev_warn(cs->dev, |
1352 | "isochronous read: frame %d: " | 1352 | "isochronous read: frame %d: " |
1353 | "numbytes (%d) > totleft (%d)\n", | 1353 | "numbytes (%d) > totleft (%d)\n", |
1354 | frame, numbytes, totleft); | 1354 | frame, numbytes, totleft); |
1355 | break; | 1355 | numbytes = totleft; |
1356 | } | 1356 | } |
1357 | offset = urb->iso_frame_desc[frame].offset; | 1357 | offset = urb->iso_frame_desc[frame].offset; |
1358 | if (unlikely(offset + numbytes > BAS_INBUFSIZE)) { | 1358 | if (unlikely(offset + numbytes > BAS_INBUFSIZE)) { |
@@ -1361,7 +1361,7 @@ static void read_iso_tasklet(unsigned long data) | |||
1361 | "offset (%d) + numbytes (%d) " | 1361 | "offset (%d) + numbytes (%d) " |
1362 | "> BAS_INBUFSIZE\n", | 1362 | "> BAS_INBUFSIZE\n", |
1363 | frame, offset, numbytes); | 1363 | frame, offset, numbytes); |
1364 | break; | 1364 | numbytes = BAS_INBUFSIZE - offset; |
1365 | } | 1365 | } |
1366 | gigaset_isoc_receive(rcvbuf + offset, numbytes, bcs); | 1366 | gigaset_isoc_receive(rcvbuf + offset, numbytes, bcs); |
1367 | totleft -= numbytes; | 1367 | totleft -= numbytes; |
@@ -1433,6 +1433,7 @@ static void req_timeout(unsigned long data) | |||
1433 | 1433 | ||
1434 | case HD_CLOSE_ATCHANNEL: | 1434 | case HD_CLOSE_ATCHANNEL: |
1435 | dev_err(bcs->cs->dev, "timeout closing AT channel\n"); | 1435 | dev_err(bcs->cs->dev, "timeout closing AT channel\n"); |
1436 | error_reset(bcs->cs); | ||
1436 | break; | 1437 | break; |
1437 | 1438 | ||
1438 | case HD_CLOSE_B2CHANNEL: | 1439 | case HD_CLOSE_B2CHANNEL: |
@@ -1442,6 +1443,13 @@ static void req_timeout(unsigned long data) | |||
1442 | error_reset(bcs->cs); | 1443 | error_reset(bcs->cs); |
1443 | break; | 1444 | break; |
1444 | 1445 | ||
1446 | case HD_RESET_INTERRUPT_PIPE: | ||
1447 | /* error recovery escalation */ | ||
1448 | dev_err(bcs->cs->dev, | ||
1449 | "reset interrupt pipe timeout, attempting USB reset\n"); | ||
1450 | usb_queue_reset_device(bcs->cs->hw.bas->interface); | ||
1451 | break; | ||
1452 | |||
1445 | default: | 1453 | default: |
1446 | dev_warn(bcs->cs->dev, "request 0x%02x timed out, clearing\n", | 1454 | dev_warn(bcs->cs->dev, "request 0x%02x timed out, clearing\n", |
1447 | pending); | 1455 | pending); |
@@ -1934,6 +1942,15 @@ static int gigaset_write_cmd(struct cardstate *cs, | |||
1934 | goto notqueued; | 1942 | goto notqueued; |
1935 | } | 1943 | } |
1936 | 1944 | ||
1945 | /* translate "+++" escape sequence sent as a single separate command | ||
1946 | * into "close AT channel" command for error recovery | ||
1947 | * The next command will reopen the AT channel automatically. | ||
1948 | */ | ||
1949 | if (len == 3 && !memcmp(buf, "+++", 3)) { | ||
1950 | rc = req_submit(cs->bcs, HD_CLOSE_ATCHANNEL, 0, BAS_TIMEOUT); | ||
1951 | goto notqueued; | ||
1952 | } | ||
1953 | |||
1937 | if (len > IF_WRITEBUF) | 1954 | if (len > IF_WRITEBUF) |
1938 | len = IF_WRITEBUF; | 1955 | len = IF_WRITEBUF; |
1939 | if (!(cb = kmalloc(sizeof(struct cmdbuf_t) + len, GFP_ATOMIC))) { | 1956 | if (!(cb = kmalloc(sizeof(struct cmdbuf_t) + len, GFP_ATOMIC))) { |
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index e4141bf8b2f3..33dcd8d72b7c 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c | |||
@@ -22,6 +22,12 @@ | |||
22 | #define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers" | 22 | #define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers" |
23 | #define DRIVER_DESC "Driver for Gigaset 307x" | 23 | #define DRIVER_DESC "Driver for Gigaset 307x" |
24 | 24 | ||
25 | #ifdef CONFIG_GIGASET_DEBUG | ||
26 | #define DRIVER_DESC_DEBUG " (debug build)" | ||
27 | #else | ||
28 | #define DRIVER_DESC_DEBUG "" | ||
29 | #endif | ||
30 | |||
25 | /* Module parameters */ | 31 | /* Module parameters */ |
26 | int gigaset_debuglevel = DEBUG_DEFAULT; | 32 | int gigaset_debuglevel = DEBUG_DEFAULT; |
27 | EXPORT_SYMBOL_GPL(gigaset_debuglevel); | 33 | EXPORT_SYMBOL_GPL(gigaset_debuglevel); |
@@ -32,6 +38,17 @@ MODULE_PARM_DESC(debug, "debug level"); | |||
32 | #define VALID_MINOR 0x01 | 38 | #define VALID_MINOR 0x01 |
33 | #define VALID_ID 0x02 | 39 | #define VALID_ID 0x02 |
34 | 40 | ||
41 | /** | ||
42 | * gigaset_dbg_buffer() - dump data in ASCII and hex for debugging | ||
43 | * @level: debugging level. | ||
44 | * @msg: message prefix. | ||
45 | * @len: number of bytes to dump. | ||
46 | * @buf: data to dump. | ||
47 | * | ||
48 | * If the current debugging level includes one of the bits set in @level, | ||
49 | * @len bytes starting at @buf are logged to dmesg at KERN_DEBUG prio, | ||
50 | * prefixed by the text @msg. | ||
51 | */ | ||
35 | void gigaset_dbg_buffer(enum debuglevel level, const unsigned char *msg, | 52 | void gigaset_dbg_buffer(enum debuglevel level, const unsigned char *msg, |
36 | size_t len, const unsigned char *buf) | 53 | size_t len, const unsigned char *buf) |
37 | { | 54 | { |
@@ -274,6 +291,20 @@ static void clear_events(struct cardstate *cs) | |||
274 | spin_unlock_irqrestore(&cs->ev_lock, flags); | 291 | spin_unlock_irqrestore(&cs->ev_lock, flags); |
275 | } | 292 | } |
276 | 293 | ||
294 | /** | ||
295 | * gigaset_add_event() - add event to device event queue | ||
296 | * @cs: device descriptor structure. | ||
297 | * @at_state: connection state structure. | ||
298 | * @type: event type. | ||
299 | * @ptr: pointer parameter for event. | ||
300 | * @parameter: integer parameter for event. | ||
301 | * @arg: pointer parameter for event. | ||
302 | * | ||
303 | * Allocate an event queue entry from the device's event queue, and set it up | ||
304 | * with the parameters given. | ||
305 | * | ||
306 | * Return value: added event | ||
307 | */ | ||
277 | struct event_t *gigaset_add_event(struct cardstate *cs, | 308 | struct event_t *gigaset_add_event(struct cardstate *cs, |
278 | struct at_state_t *at_state, int type, | 309 | struct at_state_t *at_state, int type, |
279 | void *ptr, int parameter, void *arg) | 310 | void *ptr, int parameter, void *arg) |
@@ -398,6 +429,15 @@ static void make_invalid(struct cardstate *cs, unsigned mask) | |||
398 | spin_unlock_irqrestore(&drv->lock, flags); | 429 | spin_unlock_irqrestore(&drv->lock, flags); |
399 | } | 430 | } |
400 | 431 | ||
432 | /** | ||
433 | * gigaset_freecs() - free all associated ressources of a device | ||
434 | * @cs: device descriptor structure. | ||
435 | * | ||
436 | * Stops all tasklets and timers, unregisters the device from all | ||
437 | * subsystems it was registered to, deallocates the device structure | ||
438 | * @cs and all structures referenced from it. | ||
439 | * Operations on the device should be stopped before calling this. | ||
440 | */ | ||
401 | void gigaset_freecs(struct cardstate *cs) | 441 | void gigaset_freecs(struct cardstate *cs) |
402 | { | 442 | { |
403 | int i; | 443 | int i; |
@@ -506,7 +546,12 @@ static void gigaset_inbuf_init(struct inbuf_t *inbuf, struct bc_state *bcs, | |||
506 | inbuf->inputstate = inputstate; | 546 | inbuf->inputstate = inputstate; |
507 | } | 547 | } |
508 | 548 | ||
509 | /* append received bytes to inbuf */ | 549 | /** |
550 | * gigaset_fill_inbuf() - append received data to input buffer | ||
551 | * @inbuf: buffer structure. | ||
552 | * @src: received data. | ||
553 | * @numbytes: number of bytes received. | ||
554 | */ | ||
510 | int gigaset_fill_inbuf(struct inbuf_t *inbuf, const unsigned char *src, | 555 | int gigaset_fill_inbuf(struct inbuf_t *inbuf, const unsigned char *src, |
511 | unsigned numbytes) | 556 | unsigned numbytes) |
512 | { | 557 | { |
@@ -606,20 +651,22 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs, | |||
606 | return NULL; | 651 | return NULL; |
607 | } | 652 | } |
608 | 653 | ||
609 | /* gigaset_initcs | 654 | /** |
655 | * gigaset_initcs() - initialize device structure | ||
656 | * @drv: hardware driver the device belongs to | ||
657 | * @channels: number of B channels supported by device | ||
658 | * @onechannel: !=0 if B channel data and AT commands share one | ||
659 | * communication channel (M10x), | ||
660 | * ==0 if B channels have separate communication channels (base) | ||
661 | * @ignoreframes: number of frames to ignore after setting up B channel | ||
662 | * @cidmode: !=0: start in CallID mode | ||
663 | * @modulename: name of driver module for LL registration | ||
664 | * | ||
610 | * Allocate and initialize cardstate structure for Gigaset driver | 665 | * Allocate and initialize cardstate structure for Gigaset driver |
611 | * Calls hardware dependent gigaset_initcshw() function | 666 | * Calls hardware dependent gigaset_initcshw() function |
612 | * Calls B channel initialization function gigaset_initbcs() for each B channel | 667 | * Calls B channel initialization function gigaset_initbcs() for each B channel |
613 | * parameters: | 668 | * |
614 | * drv hardware driver the device belongs to | 669 | * Return value: |
615 | * channels number of B channels supported by device | ||
616 | * onechannel !=0: B channel data and AT commands share one | ||
617 | * communication channel | ||
618 | * ==0: B channels have separate communication channels | ||
619 | * ignoreframes number of frames to ignore after setting up B channel | ||
620 | * cidmode !=0: start in CallID mode | ||
621 | * modulename name of driver module (used for I4L registration) | ||
622 | * return value: | ||
623 | * pointer to cardstate structure | 670 | * pointer to cardstate structure |
624 | */ | 671 | */ |
625 | struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, | 672 | struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, |
@@ -837,6 +884,17 @@ static void cleanup_cs(struct cardstate *cs) | |||
837 | } | 884 | } |
838 | 885 | ||
839 | 886 | ||
887 | /** | ||
888 | * gigaset_start() - start device operations | ||
889 | * @cs: device descriptor structure. | ||
890 | * | ||
891 | * Prepares the device for use by setting up communication parameters, | ||
892 | * scheduling an EV_START event to initiate device initialization, and | ||
893 | * waiting for completion of the initialization. | ||
894 | * | ||
895 | * Return value: | ||
896 | * 1 - success, 0 - error | ||
897 | */ | ||
840 | int gigaset_start(struct cardstate *cs) | 898 | int gigaset_start(struct cardstate *cs) |
841 | { | 899 | { |
842 | unsigned long flags; | 900 | unsigned long flags; |
@@ -879,9 +937,15 @@ error: | |||
879 | } | 937 | } |
880 | EXPORT_SYMBOL_GPL(gigaset_start); | 938 | EXPORT_SYMBOL_GPL(gigaset_start); |
881 | 939 | ||
882 | /* gigaset_shutdown | 940 | /** |
883 | * check if a device is associated to the cardstate structure and stop it | 941 | * gigaset_shutdown() - shut down device operations |
884 | * return value: 0 if ok, -1 if no device was associated | 942 | * @cs: device descriptor structure. |
943 | * | ||
944 | * Deactivates the device by scheduling an EV_SHUTDOWN event and | ||
945 | * waiting for completion of the shutdown. | ||
946 | * | ||
947 | * Return value: | ||
948 | * 0 - success, -1 - error (no device associated) | ||
885 | */ | 949 | */ |
886 | int gigaset_shutdown(struct cardstate *cs) | 950 | int gigaset_shutdown(struct cardstate *cs) |
887 | { | 951 | { |
@@ -912,6 +976,13 @@ exit: | |||
912 | } | 976 | } |
913 | EXPORT_SYMBOL_GPL(gigaset_shutdown); | 977 | EXPORT_SYMBOL_GPL(gigaset_shutdown); |
914 | 978 | ||
979 | /** | ||
980 | * gigaset_stop() - stop device operations | ||
981 | * @cs: device descriptor structure. | ||
982 | * | ||
983 | * Stops operations on the device by scheduling an EV_STOP event and | ||
984 | * waiting for completion of the shutdown. | ||
985 | */ | ||
915 | void gigaset_stop(struct cardstate *cs) | 986 | void gigaset_stop(struct cardstate *cs) |
916 | { | 987 | { |
917 | mutex_lock(&cs->mutex); | 988 | mutex_lock(&cs->mutex); |
@@ -1020,6 +1091,14 @@ struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty) | |||
1020 | return gigaset_get_cs_by_minor(tty->index + tty->driver->minor_start); | 1091 | return gigaset_get_cs_by_minor(tty->index + tty->driver->minor_start); |
1021 | } | 1092 | } |
1022 | 1093 | ||
1094 | /** | ||
1095 | * gigaset_freedriver() - free all associated ressources of a driver | ||
1096 | * @drv: driver descriptor structure. | ||
1097 | * | ||
1098 | * Unregisters the driver from the system and deallocates the driver | ||
1099 | * structure @drv and all structures referenced from it. | ||
1100 | * All devices should be shut down before calling this. | ||
1101 | */ | ||
1023 | void gigaset_freedriver(struct gigaset_driver *drv) | 1102 | void gigaset_freedriver(struct gigaset_driver *drv) |
1024 | { | 1103 | { |
1025 | unsigned long flags; | 1104 | unsigned long flags; |
@@ -1035,14 +1114,16 @@ void gigaset_freedriver(struct gigaset_driver *drv) | |||
1035 | } | 1114 | } |
1036 | EXPORT_SYMBOL_GPL(gigaset_freedriver); | 1115 | EXPORT_SYMBOL_GPL(gigaset_freedriver); |
1037 | 1116 | ||
1038 | /* gigaset_initdriver | 1117 | /** |
1118 | * gigaset_initdriver() - initialize driver structure | ||
1119 | * @minor: First minor number | ||
1120 | * @minors: Number of minors this driver can handle | ||
1121 | * @procname: Name of the driver | ||
1122 | * @devname: Name of the device files (prefix without minor number) | ||
1123 | * | ||
1039 | * Allocate and initialize gigaset_driver structure. Initialize interface. | 1124 | * Allocate and initialize gigaset_driver structure. Initialize interface. |
1040 | * parameters: | 1125 | * |
1041 | * minor First minor number | 1126 | * Return value: |
1042 | * minors Number of minors this driver can handle | ||
1043 | * procname Name of the driver | ||
1044 | * devname Name of the device files (prefix without minor number) | ||
1045 | * return value: | ||
1046 | * Pointer to the gigaset_driver structure on success, NULL on failure. | 1127 | * Pointer to the gigaset_driver structure on success, NULL on failure. |
1047 | */ | 1128 | */ |
1048 | struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors, | 1129 | struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors, |
@@ -1095,6 +1176,13 @@ error: | |||
1095 | } | 1176 | } |
1096 | EXPORT_SYMBOL_GPL(gigaset_initdriver); | 1177 | EXPORT_SYMBOL_GPL(gigaset_initdriver); |
1097 | 1178 | ||
1179 | /** | ||
1180 | * gigaset_blockdriver() - block driver | ||
1181 | * @drv: driver descriptor structure. | ||
1182 | * | ||
1183 | * Prevents the driver from attaching new devices, in preparation for | ||
1184 | * deregistration. | ||
1185 | */ | ||
1098 | void gigaset_blockdriver(struct gigaset_driver *drv) | 1186 | void gigaset_blockdriver(struct gigaset_driver *drv) |
1099 | { | 1187 | { |
1100 | drv->blocked = 1; | 1188 | drv->blocked = 1; |
@@ -1110,7 +1198,7 @@ static int __init gigaset_init_module(void) | |||
1110 | if (gigaset_debuglevel == 1) | 1198 | if (gigaset_debuglevel == 1) |
1111 | gigaset_debuglevel = DEBUG_DEFAULT; | 1199 | gigaset_debuglevel = DEBUG_DEFAULT; |
1112 | 1200 | ||
1113 | pr_info(DRIVER_DESC "\n"); | 1201 | pr_info(DRIVER_DESC DRIVER_DESC_DEBUG "\n"); |
1114 | return 0; | 1202 | return 0; |
1115 | } | 1203 | } |
1116 | 1204 | ||
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index 2d91049571a4..cc768caa38f5 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c | |||
@@ -207,7 +207,6 @@ struct reply_t gigaset_tab_nocid[] = | |||
207 | /* leave dle mode */ | 207 | /* leave dle mode */ |
208 | {RSP_INIT, 0, 0,SEQ_DLE0, 201, 5, {0}, "^SDLE=0\r"}, | 208 | {RSP_INIT, 0, 0,SEQ_DLE0, 201, 5, {0}, "^SDLE=0\r"}, |
209 | {RSP_OK, 201,201, -1, 202,-1}, | 209 | {RSP_OK, 201,201, -1, 202,-1}, |
210 | //{RSP_ZDLE, 202,202, 0, 202, 0, {ACT_ERROR}},//DELETE | ||
211 | {RSP_ZDLE, 202,202, 0, 0, 0, {ACT_DLE0}}, | 210 | {RSP_ZDLE, 202,202, 0, 0, 0, {ACT_DLE0}}, |
212 | {RSP_NODEV, 200,249, -1, 0, 0, {ACT_FAKEDLE0}}, | 211 | {RSP_NODEV, 200,249, -1, 0, 0, {ACT_FAKEDLE0}}, |
213 | {RSP_ERROR, 200,249, -1, 0, 0, {ACT_FAILDLE0}}, | 212 | {RSP_ERROR, 200,249, -1, 0, 0, {ACT_FAILDLE0}}, |
@@ -265,6 +264,7 @@ struct reply_t gigaset_tab_nocid[] = | |||
265 | {EV_SHUTDOWN, -1, -1, -1, -1,-1, {ACT_SHUTDOWN}}, //FIXME | 264 | {EV_SHUTDOWN, -1, -1, -1, -1,-1, {ACT_SHUTDOWN}}, //FIXME |
266 | 265 | ||
267 | /* misc. */ | 266 | /* misc. */ |
267 | {RSP_ERROR, -1, -1, -1, -1, -1, {ACT_ERROR} }, | ||
268 | {RSP_EMPTY, -1, -1, -1, -1,-1, {ACT_DEBUG}}, //FIXME | 268 | {RSP_EMPTY, -1, -1, -1, -1,-1, {ACT_DEBUG}}, //FIXME |
269 | {RSP_ZCFGT, -1, -1, -1, -1,-1, {ACT_DEBUG}}, //FIXME | 269 | {RSP_ZCFGT, -1, -1, -1, -1,-1, {ACT_DEBUG}}, //FIXME |
270 | {RSP_ZCFG, -1, -1, -1, -1,-1, {ACT_DEBUG}}, //FIXME | 270 | {RSP_ZCFG, -1, -1, -1, -1,-1, {ACT_DEBUG}}, //FIXME |
@@ -328,10 +328,9 @@ struct reply_t gigaset_tab_cid[] = | |||
328 | {RSP_INIT, -1, -1,SEQ_HUP, 401, 5, {0}, "+VLS=0\r"}, /* hang up */ //-1,-1? | 328 | {RSP_INIT, -1, -1,SEQ_HUP, 401, 5, {0}, "+VLS=0\r"}, /* hang up */ //-1,-1? |
329 | {RSP_OK, 401,401, -1, 402, 5}, | 329 | {RSP_OK, 401,401, -1, 402, 5}, |
330 | {RSP_ZVLS, 402,402, 0, 403, 5}, | 330 | {RSP_ZVLS, 402,402, 0, 403, 5}, |
331 | {RSP_ZSAU, 403,403,ZSAU_DISCONNECT_REQ, -1,-1, {ACT_DEBUG}}, /* if not remote hup */ | 331 | {RSP_ZSAU, 403, 403, ZSAU_DISCONNECT_REQ, -1, -1, {ACT_DEBUG} }, |
332 | //{RSP_ZSAU, 403,403,ZSAU_NULL, 401, 0, {ACT_ERROR}}, //DELETE//FIXME -> DLE0 // should we do this _before_ hanging up for base driver? | 332 | {RSP_ZSAU, 403, 403, ZSAU_NULL, 0, 0, {ACT_DISCONNECT} }, |
333 | {RSP_ZSAU, 403,403,ZSAU_NULL, 0, 0, {ACT_DISCONNECT}}, //FIXME -> DLE0 // should we do this _before_ hanging up for base driver? | 333 | {RSP_NODEV, 401, 403, -1, 0, 0, {ACT_FAKEHUP} }, |
334 | {RSP_NODEV, 401,403, -1, 0, 0, {ACT_FAKEHUP}}, //FIXME -> DLE0 // should we do this _before_ hanging up for base driver? | ||
335 | {RSP_ERROR, 401,401, -1, 0, 0, {ACT_ABORTHUP}}, | 334 | {RSP_ERROR, 401,401, -1, 0, 0, {ACT_ABORTHUP}}, |
336 | {EV_TIMEOUT, 401,403, -1, 0, 0, {ACT_ABORTHUP}}, | 335 | {EV_TIMEOUT, 401,403, -1, 0, 0, {ACT_ABORTHUP}}, |
337 | 336 | ||
@@ -474,8 +473,13 @@ static int cid_of_response(char *s) | |||
474 | //FIXME is ;<digit>+ at end of non-CID response really impossible? | 473 | //FIXME is ;<digit>+ at end of non-CID response really impossible? |
475 | } | 474 | } |
476 | 475 | ||
477 | /* This function will be called via task queue from the callback handler. | 476 | /** |
478 | * We received a modem response and have to handle it.. | 477 | * gigaset_handle_modem_response() - process received modem response |
478 | * @cs: device descriptor structure. | ||
479 | * | ||
480 | * Called by asyncdata/isocdata if a block of data received from the | ||
481 | * device must be processed as a modem command response. The data is | ||
482 | * already in the cs structure. | ||
479 | */ | 483 | */ |
480 | void gigaset_handle_modem_response(struct cardstate *cs) | 484 | void gigaset_handle_modem_response(struct cardstate *cs) |
481 | { | 485 | { |
@@ -707,6 +711,11 @@ static void disconnect(struct at_state_t **at_state_p) | |||
707 | if (bcs) { | 711 | if (bcs) { |
708 | /* B channel assigned: invoke hardware specific handler */ | 712 | /* B channel assigned: invoke hardware specific handler */ |
709 | cs->ops->close_bchannel(bcs); | 713 | cs->ops->close_bchannel(bcs); |
714 | /* notify LL */ | ||
715 | if (bcs->chstate & (CHS_D_UP | CHS_NOTIFY_LL)) { | ||
716 | bcs->chstate &= ~(CHS_D_UP | CHS_NOTIFY_LL); | ||
717 | gigaset_i4l_channel_cmd(bcs, ISDN_STAT_DHUP); | ||
718 | } | ||
710 | } else { | 719 | } else { |
711 | /* no B channel assigned: just deallocate */ | 720 | /* no B channel assigned: just deallocate */ |
712 | spin_lock_irqsave(&cs->lock, flags); | 721 | spin_lock_irqsave(&cs->lock, flags); |
@@ -1429,11 +1438,12 @@ static void do_action(int action, struct cardstate *cs, | |||
1429 | cs->gotfwver = -1; | 1438 | cs->gotfwver = -1; |
1430 | dev_err(cs->dev, "could not read firmware version.\n"); | 1439 | dev_err(cs->dev, "could not read firmware version.\n"); |
1431 | break; | 1440 | break; |
1432 | #ifdef CONFIG_GIGASET_DEBUG | ||
1433 | case ACT_ERROR: | 1441 | case ACT_ERROR: |
1434 | *p_genresp = 1; | 1442 | gig_dbg(DEBUG_ANY, "%s: ERROR response in ConState %d", |
1435 | *p_resp_code = RSP_ERROR; | 1443 | __func__, at_state->ConState); |
1444 | cs->cur_at_seq = SEQ_NONE; | ||
1436 | break; | 1445 | break; |
1446 | #ifdef CONFIG_GIGASET_DEBUG | ||
1437 | case ACT_TEST: | 1447 | case ACT_TEST: |
1438 | { | 1448 | { |
1439 | static int count = 3; //2; //1; | 1449 | static int count = 3; //2; //1; |
diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c index 9b22f9cf2f33..654489d836cd 100644 --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c | |||
@@ -51,6 +51,12 @@ static int writebuf_from_LL(int driverID, int channel, int ack, | |||
51 | return -ENODEV; | 51 | return -ENODEV; |
52 | } | 52 | } |
53 | bcs = &cs->bcs[channel]; | 53 | bcs = &cs->bcs[channel]; |
54 | |||
55 | /* can only handle linear sk_buffs */ | ||
56 | if (skb_linearize(skb) < 0) { | ||
57 | dev_err(cs->dev, "%s: skb_linearize failed\n", __func__); | ||
58 | return -ENOMEM; | ||
59 | } | ||
54 | len = skb->len; | 60 | len = skb->len; |
55 | 61 | ||
56 | gig_dbg(DEBUG_LLDATA, | 62 | gig_dbg(DEBUG_LLDATA, |
@@ -79,6 +85,14 @@ static int writebuf_from_LL(int driverID, int channel, int ack, | |||
79 | return cs->ops->send_skb(bcs, skb); | 85 | return cs->ops->send_skb(bcs, skb); |
80 | } | 86 | } |
81 | 87 | ||
88 | /** | ||
89 | * gigaset_skb_sent() - acknowledge sending an skb | ||
90 | * @bcs: B channel descriptor structure. | ||
91 | * @skb: sent data. | ||
92 | * | ||
93 | * Called by hardware module {bas,ser,usb}_gigaset when the data in a | ||
94 | * skb has been successfully sent, for signalling completion to the LL. | ||
95 | */ | ||
82 | void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *skb) | 96 | void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *skb) |
83 | { | 97 | { |
84 | unsigned len; | 98 | unsigned len; |
@@ -455,6 +469,15 @@ int gigaset_isdn_setup_accept(struct at_state_t *at_state) | |||
455 | return 0; | 469 | return 0; |
456 | } | 470 | } |
457 | 471 | ||
472 | /** | ||
473 | * gigaset_isdn_icall() - signal incoming call | ||
474 | * @at_state: connection state structure. | ||
475 | * | ||
476 | * Called by main module to notify the LL that an incoming call has been | ||
477 | * received. @at_state contains the parameters of the call. | ||
478 | * | ||
479 | * Return value: call disposition (ICALL_*) | ||
480 | */ | ||
458 | int gigaset_isdn_icall(struct at_state_t *at_state) | 481 | int gigaset_isdn_icall(struct at_state_t *at_state) |
459 | { | 482 | { |
460 | struct cardstate *cs = at_state->cs; | 483 | struct cardstate *cs = at_state->cs; |
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index f33ac27de643..6a8e1384e7bd 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -616,6 +616,15 @@ void gigaset_if_free(struct cardstate *cs) | |||
616 | tty_unregister_device(drv->tty, cs->minor_index); | 616 | tty_unregister_device(drv->tty, cs->minor_index); |
617 | } | 617 | } |
618 | 618 | ||
619 | /** | ||
620 | * gigaset_if_receive() - pass a received block of data to the tty device | ||
621 | * @cs: device descriptor structure. | ||
622 | * @buffer: received data. | ||
623 | * @len: number of bytes received. | ||
624 | * | ||
625 | * Called by asyncdata/isocdata if a block of data received from the | ||
626 | * device must be sent to userspace through the ttyG* device. | ||
627 | */ | ||
619 | void gigaset_if_receive(struct cardstate *cs, | 628 | void gigaset_if_receive(struct cardstate *cs, |
620 | unsigned char *buffer, size_t len) | 629 | unsigned char *buffer, size_t len) |
621 | { | 630 | { |
diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c index bed38fcc432b..9f3ef7b4248c 100644 --- a/drivers/isdn/gigaset/isocdata.c +++ b/drivers/isdn/gigaset/isocdata.c | |||
@@ -429,7 +429,7 @@ static inline int hdlc_buildframe(struct isowbuf_t *iwb, | |||
429 | return -EAGAIN; | 429 | return -EAGAIN; |
430 | } | 430 | } |
431 | 431 | ||
432 | dump_bytes(DEBUG_STREAM, "snd data", in, count); | 432 | dump_bytes(DEBUG_STREAM_DUMP, "snd data", in, count); |
433 | 433 | ||
434 | /* bitstuff and checksum input data */ | 434 | /* bitstuff and checksum input data */ |
435 | fcs = PPP_INITFCS; | 435 | fcs = PPP_INITFCS; |
@@ -448,7 +448,6 @@ static inline int hdlc_buildframe(struct isowbuf_t *iwb, | |||
448 | /* put closing flag and repeat byte for flag idle */ | 448 | /* put closing flag and repeat byte for flag idle */ |
449 | isowbuf_putflag(iwb); | 449 | isowbuf_putflag(iwb); |
450 | end = isowbuf_donewrite(iwb); | 450 | end = isowbuf_donewrite(iwb); |
451 | dump_bytes(DEBUG_STREAM_DUMP, "isowbuf", iwb->data, end + 1); | ||
452 | return end; | 451 | return end; |
453 | } | 452 | } |
454 | 453 | ||
@@ -482,6 +481,8 @@ static inline int trans_buildframe(struct isowbuf_t *iwb, | |||
482 | } | 481 | } |
483 | 482 | ||
484 | gig_dbg(DEBUG_STREAM, "put %d bytes", count); | 483 | gig_dbg(DEBUG_STREAM, "put %d bytes", count); |
484 | dump_bytes(DEBUG_STREAM_DUMP, "snd data", in, count); | ||
485 | |||
485 | write = iwb->write; | 486 | write = iwb->write; |
486 | do { | 487 | do { |
487 | c = bitrev8(*in++); | 488 | c = bitrev8(*in++); |
@@ -583,7 +584,7 @@ static inline void hdlc_done(struct bc_state *bcs) | |||
583 | procskb->tail -= 2; | 584 | procskb->tail -= 2; |
584 | gig_dbg(DEBUG_ISO, "%s: good frame (%d octets)", | 585 | gig_dbg(DEBUG_ISO, "%s: good frame (%d octets)", |
585 | __func__, procskb->len); | 586 | __func__, procskb->len); |
586 | dump_bytes(DEBUG_STREAM, | 587 | dump_bytes(DEBUG_STREAM_DUMP, |
587 | "rcv data", procskb->data, procskb->len); | 588 | "rcv data", procskb->data, procskb->len); |
588 | bcs->hw.bas->goodbytes += procskb->len; | 589 | bcs->hw.bas->goodbytes += procskb->len; |
589 | gigaset_rcv_skb(procskb, bcs->cs, bcs); | 590 | gigaset_rcv_skb(procskb, bcs->cs, bcs); |
@@ -878,6 +879,8 @@ static inline void trans_receive(unsigned char *src, unsigned count, | |||
878 | dobytes--; | 879 | dobytes--; |
879 | } | 880 | } |
880 | if (dobytes == 0) { | 881 | if (dobytes == 0) { |
882 | dump_bytes(DEBUG_STREAM_DUMP, | ||
883 | "rcv data", skb->data, skb->len); | ||
881 | gigaset_rcv_skb(skb, bcs->cs, bcs); | 884 | gigaset_rcv_skb(skb, bcs->cs, bcs); |
882 | bcs->skb = skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN); | 885 | bcs->skb = skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN); |
883 | if (!skb) { | 886 | if (!skb) { |
@@ -973,16 +976,17 @@ void gigaset_isoc_input(struct inbuf_t *inbuf) | |||
973 | 976 | ||
974 | /* == data output ========================================================== */ | 977 | /* == data output ========================================================== */ |
975 | 978 | ||
976 | /* gigaset_send_skb | 979 | /** |
977 | * called by common.c to queue an skb for sending | 980 | * gigaset_isoc_send_skb() - queue an skb for sending |
978 | * and start transmission if necessary | 981 | * @bcs: B channel descriptor structure. |
979 | * parameters: | 982 | * @skb: data to send. |
980 | * B Channel control structure | 983 | * |
981 | * skb | 984 | * Called by i4l.c to queue an skb for sending, and start transmission if |
982 | * return value: | 985 | * necessary. |
983 | * number of bytes accepted for sending | 986 | * |
984 | * (skb->len if ok, 0 if out of buffer space) | 987 | * Return value: |
985 | * or error code (< 0, eg. -EINVAL) | 988 | * number of bytes accepted for sending (skb->len) if ok, |
989 | * error code < 0 (eg. -ENODEV) on error | ||
986 | */ | 990 | */ |
987 | int gigaset_isoc_send_skb(struct bc_state *bcs, struct sk_buff *skb) | 991 | int gigaset_isoc_send_skb(struct bc_state *bcs, struct sk_buff *skb) |
988 | { | 992 | { |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 79d35d122c08..89876ade5e33 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
@@ -1129,7 +1129,6 @@ int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd, | |||
1129 | spin_lock_bh(&adapter->mcc_lock); | 1129 | spin_lock_bh(&adapter->mcc_lock); |
1130 | 1130 | ||
1131 | wrb = wrb_from_mccq(adapter); | 1131 | wrb = wrb_from_mccq(adapter); |
1132 | req = embedded_payload(wrb); | ||
1133 | sge = nonembedded_sgl(wrb); | 1132 | sge = nonembedded_sgl(wrb); |
1134 | 1133 | ||
1135 | be_wrb_hdr_prepare(wrb, cmd->size, false, 1); | 1134 | be_wrb_hdr_prepare(wrb, cmd->size, false, 1); |
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h index 8b4c2cb9ad62..a86f917f85f4 100644 --- a/drivers/net/benet/be_cmds.h +++ b/drivers/net/benet/be_cmds.h | |||
@@ -62,7 +62,7 @@ enum { | |||
62 | MCC_STATUS_QUEUE_FLUSHING = 0x4, | 62 | MCC_STATUS_QUEUE_FLUSHING = 0x4, |
63 | /* The command is completing with a DMA error */ | 63 | /* The command is completing with a DMA error */ |
64 | MCC_STATUS_DMA_FAILED = 0x5, | 64 | MCC_STATUS_DMA_FAILED = 0x5, |
65 | MCC_STATUS_NOT_SUPPORTED = 0x66 | 65 | MCC_STATUS_NOT_SUPPORTED = 66 |
66 | }; | 66 | }; |
67 | 67 | ||
68 | #define CQE_STATUS_COMPL_MASK 0xFFFF | 68 | #define CQE_STATUS_COMPL_MASK 0xFFFF |
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c index 851543a040cb..77c66da8738c 100644 --- a/drivers/net/benet/be_ethtool.c +++ b/drivers/net/benet/be_ethtool.c | |||
@@ -363,7 +363,7 @@ const struct ethtool_ops be_ethtool_ops = { | |||
363 | .get_rx_csum = be_get_rx_csum, | 363 | .get_rx_csum = be_get_rx_csum, |
364 | .set_rx_csum = be_set_rx_csum, | 364 | .set_rx_csum = be_set_rx_csum, |
365 | .get_tx_csum = ethtool_op_get_tx_csum, | 365 | .get_tx_csum = ethtool_op_get_tx_csum, |
366 | .set_tx_csum = ethtool_op_set_tx_csum, | 366 | .set_tx_csum = ethtool_op_set_tx_hw_csum, |
367 | .get_sg = ethtool_op_get_sg, | 367 | .get_sg = ethtool_op_get_sg, |
368 | .set_sg = ethtool_op_set_sg, | 368 | .set_sg = ethtool_op_set_sg, |
369 | .get_tso = ethtool_op_get_tso, | 369 | .get_tso = ethtool_op_get_tso, |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 2f9b50156e0c..6d5e81f7046f 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -197,7 +197,7 @@ void netdev_stats_update(struct be_adapter *adapter) | |||
197 | /* no space available in linux */ | 197 | /* no space available in linux */ |
198 | dev_stats->tx_dropped = 0; | 198 | dev_stats->tx_dropped = 0; |
199 | 199 | ||
200 | dev_stats->multicast = port_stats->tx_multicastframes; | 200 | dev_stats->multicast = port_stats->rx_multicast_frames; |
201 | dev_stats->collisions = 0; | 201 | dev_stats->collisions = 0; |
202 | 202 | ||
203 | /* detailed tx_errors */ | 203 | /* detailed tx_errors */ |
@@ -1899,8 +1899,8 @@ static void be_netdev_init(struct net_device *netdev) | |||
1899 | struct be_adapter *adapter = netdev_priv(netdev); | 1899 | struct be_adapter *adapter = netdev_priv(netdev); |
1900 | 1900 | ||
1901 | netdev->features |= NETIF_F_SG | NETIF_F_HW_VLAN_RX | NETIF_F_TSO | | 1901 | netdev->features |= NETIF_F_SG | NETIF_F_HW_VLAN_RX | NETIF_F_TSO | |
1902 | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | NETIF_F_IP_CSUM | | 1902 | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | NETIF_F_HW_CSUM | |
1903 | NETIF_F_IPV6_CSUM | NETIF_F_GRO; | 1903 | NETIF_F_GRO; |
1904 | 1904 | ||
1905 | netdev->flags |= IFF_MULTICAST; | 1905 | netdev->flags |= IFF_MULTICAST; |
1906 | 1906 | ||
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index b53b40ba88a8..d1e0563a67df 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c | |||
@@ -1803,7 +1803,7 @@ struct e1000_info e1000_82574_info = { | |||
1803 | | FLAG_HAS_AMT | 1803 | | FLAG_HAS_AMT |
1804 | | FLAG_HAS_CTRLEXT_ON_LOAD, | 1804 | | FLAG_HAS_CTRLEXT_ON_LOAD, |
1805 | .pba = 20, | 1805 | .pba = 20, |
1806 | .max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN, | 1806 | .max_hw_frame_size = DEFAULT_JUMBO, |
1807 | .get_variants = e1000_get_variants_82571, | 1807 | .get_variants = e1000_get_variants_82571, |
1808 | .mac_ops = &e82571_mac_ops, | 1808 | .mac_ops = &e82571_mac_ops, |
1809 | .phy_ops = &e82_phy_ops_bm, | 1809 | .phy_ops = &e82_phy_ops_bm, |
@@ -1820,7 +1820,7 @@ struct e1000_info e1000_82583_info = { | |||
1820 | | FLAG_HAS_AMT | 1820 | | FLAG_HAS_AMT |
1821 | | FLAG_HAS_CTRLEXT_ON_LOAD, | 1821 | | FLAG_HAS_CTRLEXT_ON_LOAD, |
1822 | .pba = 20, | 1822 | .pba = 20, |
1823 | .max_hw_frame_size = DEFAULT_JUMBO, | 1823 | .max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN, |
1824 | .get_variants = e1000_get_variants_82571, | 1824 | .get_variants = e1000_get_variants_82571, |
1825 | .mac_ops = &e82571_mac_ops, | 1825 | .mac_ops = &e82571_mac_ops, |
1826 | .phy_ops = &e82_phy_ops_bm, | 1826 | .phy_ops = &e82_phy_ops_bm, |
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index 2ec58dcdb82b..34b04924c8a1 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c | |||
@@ -330,6 +330,8 @@ static enum ixgbe_media_type ixgbe_get_media_type_82599(struct ixgbe_hw *hw) | |||
330 | 330 | ||
331 | switch (hw->device_id) { | 331 | switch (hw->device_id) { |
332 | case IXGBE_DEV_ID_82599_KX4: | 332 | case IXGBE_DEV_ID_82599_KX4: |
333 | case IXGBE_DEV_ID_82599_KX4_MEZZ: | ||
334 | case IXGBE_DEV_ID_82599_COMBO_BACKPLANE: | ||
333 | case IXGBE_DEV_ID_82599_XAUI_LOM: | 335 | case IXGBE_DEV_ID_82599_XAUI_LOM: |
334 | /* Default device ID is mezzanine card KX/KX4 */ | 336 | /* Default device ID is mezzanine card KX/KX4 */ |
335 | media_type = ixgbe_media_type_backplane; | 337 | media_type = ixgbe_media_type_backplane; |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 28fbb9d281f9..cbb143ca1eb8 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -97,8 +97,12 @@ static struct pci_device_id ixgbe_pci_tbl[] = { | |||
97 | board_82599 }, | 97 | board_82599 }, |
98 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP), | 98 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP), |
99 | board_82599 }, | 99 | board_82599 }, |
100 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ), | ||
101 | board_82599 }, | ||
100 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_CX4), | 102 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_CX4), |
101 | board_82599 }, | 103 | board_82599 }, |
104 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_COMBO_BACKPLANE), | ||
105 | board_82599 }, | ||
102 | 106 | ||
103 | /* required last entry */ | 107 | /* required last entry */ |
104 | {0, } | 108 | {0, } |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index 7c93e923bf2e..ef4bdd58e016 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
@@ -49,9 +49,11 @@ | |||
49 | #define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM 0x10E1 | 49 | #define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM 0x10E1 |
50 | #define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4 | 50 | #define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4 |
51 | #define IXGBE_DEV_ID_82599_KX4 0x10F7 | 51 | #define IXGBE_DEV_ID_82599_KX4 0x10F7 |
52 | #define IXGBE_DEV_ID_82599_KX4_MEZZ 0x1514 | ||
52 | #define IXGBE_DEV_ID_82599_CX4 0x10F9 | 53 | #define IXGBE_DEV_ID_82599_CX4 0x10F9 |
53 | #define IXGBE_DEV_ID_82599_SFP 0x10FB | 54 | #define IXGBE_DEV_ID_82599_SFP 0x10FB |
54 | #define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC | 55 | #define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC |
56 | #define IXGBE_DEV_ID_82599_COMBO_BACKPLANE 0x10F8 | ||
55 | 57 | ||
56 | /* General Registers */ | 58 | /* General Registers */ |
57 | #define IXGBE_CTRL 0x00000 | 59 | #define IXGBE_CTRL 0x00000 |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 474876c879cb..bd3447f04902 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -1754,14 +1754,14 @@ static struct pcmcia_device_id pcnet_ids[] = { | |||
1754 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"), | 1754 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"), |
1755 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "cis/PCMLM28.cis"), | 1755 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "cis/PCMLM28.cis"), |
1756 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "cis/PCMLM28.cis"), | 1756 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "cis/PCMLM28.cis"), |
1757 | PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "DP83903.cis"), | 1757 | PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "cis/DP83903.cis"), |
1758 | PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, "NSC MF LAN/Modem", 0x58fc6056, "DP83903.cis"), | 1758 | PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"), |
1759 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "DP83903.cis"), | 1759 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "cis/DP83903.cis"), |
1760 | PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, "cis/LA-PCM.cis"), | 1760 | PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, "cis/LA-PCM.cis"), |
1761 | PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "PE520.cis"), | 1761 | PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "PE520.cis"), |
1762 | PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "NE2K.cis"), | 1762 | PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "cis/NE2K.cis"), |
1763 | PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"), | 1763 | PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"), |
1764 | PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "tamarack.cis"), | 1764 | PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "cis/tamarack.cis"), |
1765 | PCMCIA_DEVICE_PROD_ID12("Ethernet", "CF Size PC Card", 0x00b2e941, 0x43ac239b), | 1765 | PCMCIA_DEVICE_PROD_ID12("Ethernet", "CF Size PC Card", 0x00b2e941, 0x43ac239b), |
1766 | PCMCIA_DEVICE_PROD_ID123("Fast Ethernet", "CF Size PC Card", "1.0", | 1766 | PCMCIA_DEVICE_PROD_ID123("Fast Ethernet", "CF Size PC Card", "1.0", |
1767 | 0xb4be14e3, 0x43ac239b, 0x0877b627), | 1767 | 0xb4be14e3, 0x43ac239b, 0x0877b627), |
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index 30d5585beeee..3ec6e85587a2 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
11 | #include <linux/netdevice.h> | 11 | #include <linux/netdevice.h> |
12 | #include <linux/rtnetlink.h> | ||
12 | 13 | ||
13 | /* | 14 | /* |
14 | * General definitions... | 15 | * General definitions... |
@@ -135,9 +136,9 @@ enum { | |||
135 | RST_FO_TFO = (1 << 0), | 136 | RST_FO_TFO = (1 << 0), |
136 | RST_FO_RR_MASK = 0x00060000, | 137 | RST_FO_RR_MASK = 0x00060000, |
137 | RST_FO_RR_CQ_CAM = 0x00000000, | 138 | RST_FO_RR_CQ_CAM = 0x00000000, |
138 | RST_FO_RR_DROP = 0x00000001, | 139 | RST_FO_RR_DROP = 0x00000002, |
139 | RST_FO_RR_DQ = 0x00000002, | 140 | RST_FO_RR_DQ = 0x00000004, |
140 | RST_FO_RR_RCV_FUNC_CQ = 0x00000003, | 141 | RST_FO_RR_RCV_FUNC_CQ = 0x00000006, |
141 | RST_FO_FRB = (1 << 12), | 142 | RST_FO_FRB = (1 << 12), |
142 | RST_FO_MOP = (1 << 13), | 143 | RST_FO_MOP = (1 << 13), |
143 | RST_FO_REG = (1 << 14), | 144 | RST_FO_REG = (1 << 14), |
@@ -1477,7 +1478,6 @@ struct ql_adapter { | |||
1477 | u32 mailbox_in; | 1478 | u32 mailbox_in; |
1478 | u32 mailbox_out; | 1479 | u32 mailbox_out; |
1479 | struct mbox_params idc_mbc; | 1480 | struct mbox_params idc_mbc; |
1480 | struct mutex mpi_mutex; | ||
1481 | 1481 | ||
1482 | int tx_ring_size; | 1482 | int tx_ring_size; |
1483 | int rx_ring_size; | 1483 | int rx_ring_size; |
diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c index 68f9bd280f86..52073946bce3 100644 --- a/drivers/net/qlge/qlge_ethtool.c +++ b/drivers/net/qlge/qlge_ethtool.c | |||
@@ -45,7 +45,6 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev) | |||
45 | if (!netif_running(qdev->ndev)) | 45 | if (!netif_running(qdev->ndev)) |
46 | return status; | 46 | return status; |
47 | 47 | ||
48 | spin_lock(&qdev->hw_lock); | ||
49 | /* Skip the default queue, and update the outbound handler | 48 | /* Skip the default queue, and update the outbound handler |
50 | * queues if they changed. | 49 | * queues if they changed. |
51 | */ | 50 | */ |
@@ -92,7 +91,6 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev) | |||
92 | } | 91 | } |
93 | } | 92 | } |
94 | exit: | 93 | exit: |
95 | spin_unlock(&qdev->hw_lock); | ||
96 | return status; | 94 | return status; |
97 | } | 95 | } |
98 | 96 | ||
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 3d0efea32111..61680715cde0 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/etherdevice.h> | 34 | #include <linux/etherdevice.h> |
35 | #include <linux/ethtool.h> | 35 | #include <linux/ethtool.h> |
36 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
37 | #include <linux/rtnetlink.h> | ||
38 | #include <linux/if_vlan.h> | 37 | #include <linux/if_vlan.h> |
39 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
40 | #include <linux/mm.h> | 39 | #include <linux/mm.h> |
@@ -1926,12 +1925,10 @@ static void ql_vlan_rx_add_vid(struct net_device *ndev, u16 vid) | |||
1926 | status = ql_sem_spinlock(qdev, SEM_MAC_ADDR_MASK); | 1925 | status = ql_sem_spinlock(qdev, SEM_MAC_ADDR_MASK); |
1927 | if (status) | 1926 | if (status) |
1928 | return; | 1927 | return; |
1929 | spin_lock(&qdev->hw_lock); | ||
1930 | if (ql_set_mac_addr_reg | 1928 | if (ql_set_mac_addr_reg |
1931 | (qdev, (u8 *) &enable_bit, MAC_ADDR_TYPE_VLAN, vid)) { | 1929 | (qdev, (u8 *) &enable_bit, MAC_ADDR_TYPE_VLAN, vid)) { |
1932 | QPRINTK(qdev, IFUP, ERR, "Failed to init vlan address.\n"); | 1930 | QPRINTK(qdev, IFUP, ERR, "Failed to init vlan address.\n"); |
1933 | } | 1931 | } |
1934 | spin_unlock(&qdev->hw_lock); | ||
1935 | ql_sem_unlock(qdev, SEM_MAC_ADDR_MASK); | 1932 | ql_sem_unlock(qdev, SEM_MAC_ADDR_MASK); |
1936 | } | 1933 | } |
1937 | 1934 | ||
@@ -1945,12 +1942,10 @@ static void ql_vlan_rx_kill_vid(struct net_device *ndev, u16 vid) | |||
1945 | if (status) | 1942 | if (status) |
1946 | return; | 1943 | return; |
1947 | 1944 | ||
1948 | spin_lock(&qdev->hw_lock); | ||
1949 | if (ql_set_mac_addr_reg | 1945 | if (ql_set_mac_addr_reg |
1950 | (qdev, (u8 *) &enable_bit, MAC_ADDR_TYPE_VLAN, vid)) { | 1946 | (qdev, (u8 *) &enable_bit, MAC_ADDR_TYPE_VLAN, vid)) { |
1951 | QPRINTK(qdev, IFUP, ERR, "Failed to clear vlan address.\n"); | 1947 | QPRINTK(qdev, IFUP, ERR, "Failed to clear vlan address.\n"); |
1952 | } | 1948 | } |
1953 | spin_unlock(&qdev->hw_lock); | ||
1954 | ql_sem_unlock(qdev, SEM_MAC_ADDR_MASK); | 1949 | ql_sem_unlock(qdev, SEM_MAC_ADDR_MASK); |
1955 | 1950 | ||
1956 | } | 1951 | } |
@@ -2001,15 +1996,17 @@ static irqreturn_t qlge_isr(int irq, void *dev_id) | |||
2001 | /* | 1996 | /* |
2002 | * Check MPI processor activity. | 1997 | * Check MPI processor activity. |
2003 | */ | 1998 | */ |
2004 | if (var & STS_PI) { | 1999 | if ((var & STS_PI) && |
2000 | (ql_read32(qdev, INTR_MASK) & INTR_MASK_PI)) { | ||
2005 | /* | 2001 | /* |
2006 | * We've got an async event or mailbox completion. | 2002 | * We've got an async event or mailbox completion. |
2007 | * Handle it and clear the source of the interrupt. | 2003 | * Handle it and clear the source of the interrupt. |
2008 | */ | 2004 | */ |
2009 | QPRINTK(qdev, INTR, ERR, "Got MPI processor interrupt.\n"); | 2005 | QPRINTK(qdev, INTR, ERR, "Got MPI processor interrupt.\n"); |
2010 | ql_disable_completion_interrupt(qdev, intr_context->intr); | 2006 | ql_disable_completion_interrupt(qdev, intr_context->intr); |
2011 | queue_delayed_work_on(smp_processor_id(), qdev->workqueue, | 2007 | ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16)); |
2012 | &qdev->mpi_work, 0); | 2008 | queue_delayed_work_on(smp_processor_id(), |
2009 | qdev->workqueue, &qdev->mpi_work, 0); | ||
2013 | work_done++; | 2010 | work_done++; |
2014 | } | 2011 | } |
2015 | 2012 | ||
@@ -3585,7 +3582,6 @@ static void qlge_set_multicast_list(struct net_device *ndev) | |||
3585 | status = ql_sem_spinlock(qdev, SEM_RT_IDX_MASK); | 3582 | status = ql_sem_spinlock(qdev, SEM_RT_IDX_MASK); |
3586 | if (status) | 3583 | if (status) |
3587 | return; | 3584 | return; |
3588 | spin_lock(&qdev->hw_lock); | ||
3589 | /* | 3585 | /* |
3590 | * Set or clear promiscuous mode if a | 3586 | * Set or clear promiscuous mode if a |
3591 | * transition is taking place. | 3587 | * transition is taking place. |
@@ -3662,7 +3658,6 @@ static void qlge_set_multicast_list(struct net_device *ndev) | |||
3662 | } | 3658 | } |
3663 | } | 3659 | } |
3664 | exit: | 3660 | exit: |
3665 | spin_unlock(&qdev->hw_lock); | ||
3666 | ql_sem_unlock(qdev, SEM_RT_IDX_MASK); | 3661 | ql_sem_unlock(qdev, SEM_RT_IDX_MASK); |
3667 | } | 3662 | } |
3668 | 3663 | ||
@@ -3682,10 +3677,8 @@ static int qlge_set_mac_address(struct net_device *ndev, void *p) | |||
3682 | status = ql_sem_spinlock(qdev, SEM_MAC_ADDR_MASK); | 3677 | status = ql_sem_spinlock(qdev, SEM_MAC_ADDR_MASK); |
3683 | if (status) | 3678 | if (status) |
3684 | return status; | 3679 | return status; |
3685 | spin_lock(&qdev->hw_lock); | ||
3686 | status = ql_set_mac_addr_reg(qdev, (u8 *) ndev->dev_addr, | 3680 | status = ql_set_mac_addr_reg(qdev, (u8 *) ndev->dev_addr, |
3687 | MAC_ADDR_TYPE_CAM_MAC, qdev->func * MAX_CQ); | 3681 | MAC_ADDR_TYPE_CAM_MAC, qdev->func * MAX_CQ); |
3688 | spin_unlock(&qdev->hw_lock); | ||
3689 | if (status) | 3682 | if (status) |
3690 | QPRINTK(qdev, HW, ERR, "Failed to load MAC address.\n"); | 3683 | QPRINTK(qdev, HW, ERR, "Failed to load MAC address.\n"); |
3691 | ql_sem_unlock(qdev, SEM_MAC_ADDR_MASK); | 3684 | ql_sem_unlock(qdev, SEM_MAC_ADDR_MASK); |
@@ -3928,7 +3921,6 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
3928 | INIT_DELAYED_WORK(&qdev->mpi_work, ql_mpi_work); | 3921 | INIT_DELAYED_WORK(&qdev->mpi_work, ql_mpi_work); |
3929 | INIT_DELAYED_WORK(&qdev->mpi_port_cfg_work, ql_mpi_port_cfg_work); | 3922 | INIT_DELAYED_WORK(&qdev->mpi_port_cfg_work, ql_mpi_port_cfg_work); |
3930 | INIT_DELAYED_WORK(&qdev->mpi_idc_work, ql_mpi_idc_work); | 3923 | INIT_DELAYED_WORK(&qdev->mpi_idc_work, ql_mpi_idc_work); |
3931 | mutex_init(&qdev->mpi_mutex); | ||
3932 | init_completion(&qdev->ide_completion); | 3924 | init_completion(&qdev->ide_completion); |
3933 | 3925 | ||
3934 | if (!cards_found) { | 3926 | if (!cards_found) { |
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c index 6685bd97da91..c2e43073047e 100644 --- a/drivers/net/qlge/qlge_mpi.c +++ b/drivers/net/qlge/qlge_mpi.c | |||
@@ -472,7 +472,6 @@ static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp) | |||
472 | { | 472 | { |
473 | int status, count; | 473 | int status, count; |
474 | 474 | ||
475 | mutex_lock(&qdev->mpi_mutex); | ||
476 | 475 | ||
477 | /* Begin polled mode for MPI */ | 476 | /* Begin polled mode for MPI */ |
478 | ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16)); | 477 | ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16)); |
@@ -541,7 +540,6 @@ static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp) | |||
541 | status = -EIO; | 540 | status = -EIO; |
542 | } | 541 | } |
543 | end: | 542 | end: |
544 | mutex_unlock(&qdev->mpi_mutex); | ||
545 | /* End polled mode for MPI */ | 543 | /* End polled mode for MPI */ |
546 | ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16) | INTR_MASK_PI); | 544 | ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16) | INTR_MASK_PI); |
547 | return status; | 545 | return status; |
@@ -776,7 +774,9 @@ static int ql_idc_wait(struct ql_adapter *qdev) | |||
776 | static int ql_set_port_cfg(struct ql_adapter *qdev) | 774 | static int ql_set_port_cfg(struct ql_adapter *qdev) |
777 | { | 775 | { |
778 | int status; | 776 | int status; |
777 | rtnl_lock(); | ||
779 | status = ql_mb_set_port_cfg(qdev); | 778 | status = ql_mb_set_port_cfg(qdev); |
779 | rtnl_unlock(); | ||
780 | if (status) | 780 | if (status) |
781 | return status; | 781 | return status; |
782 | status = ql_idc_wait(qdev); | 782 | status = ql_idc_wait(qdev); |
@@ -797,7 +797,9 @@ void ql_mpi_port_cfg_work(struct work_struct *work) | |||
797 | container_of(work, struct ql_adapter, mpi_port_cfg_work.work); | 797 | container_of(work, struct ql_adapter, mpi_port_cfg_work.work); |
798 | int status; | 798 | int status; |
799 | 799 | ||
800 | rtnl_lock(); | ||
800 | status = ql_mb_get_port_cfg(qdev); | 801 | status = ql_mb_get_port_cfg(qdev); |
802 | rtnl_unlock(); | ||
801 | if (status) { | 803 | if (status) { |
802 | QPRINTK(qdev, DRV, ERR, | 804 | QPRINTK(qdev, DRV, ERR, |
803 | "Bug: Failed to get port config data.\n"); | 805 | "Bug: Failed to get port config data.\n"); |
@@ -855,7 +857,9 @@ void ql_mpi_idc_work(struct work_struct *work) | |||
855 | * needs to be set. | 857 | * needs to be set. |
856 | * */ | 858 | * */ |
857 | set_bit(QL_CAM_RT_SET, &qdev->flags); | 859 | set_bit(QL_CAM_RT_SET, &qdev->flags); |
860 | rtnl_lock(); | ||
858 | status = ql_mb_idc_ack(qdev); | 861 | status = ql_mb_idc_ack(qdev); |
862 | rtnl_unlock(); | ||
859 | if (status) { | 863 | if (status) { |
860 | QPRINTK(qdev, DRV, ERR, | 864 | QPRINTK(qdev, DRV, ERR, |
861 | "Bug: No pending IDC!\n"); | 865 | "Bug: No pending IDC!\n"); |
@@ -871,7 +875,7 @@ void ql_mpi_work(struct work_struct *work) | |||
871 | struct mbox_params *mbcp = &mbc; | 875 | struct mbox_params *mbcp = &mbc; |
872 | int err = 0; | 876 | int err = 0; |
873 | 877 | ||
874 | mutex_lock(&qdev->mpi_mutex); | 878 | rtnl_lock(); |
875 | 879 | ||
876 | while (ql_read32(qdev, STS) & STS_PI) { | 880 | while (ql_read32(qdev, STS) & STS_PI) { |
877 | memset(mbcp, 0, sizeof(struct mbox_params)); | 881 | memset(mbcp, 0, sizeof(struct mbox_params)); |
@@ -884,7 +888,7 @@ void ql_mpi_work(struct work_struct *work) | |||
884 | break; | 888 | break; |
885 | } | 889 | } |
886 | 890 | ||
887 | mutex_unlock(&qdev->mpi_mutex); | 891 | rtnl_unlock(); |
888 | ql_enable_completion_interrupt(qdev, 0); | 892 | ql_enable_completion_interrupt(qdev, 0); |
889 | } | 893 | } |
890 | 894 | ||
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index a3bb49031a7f..ff4617e21426 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -873,10 +873,10 @@ static struct pcmcia_device_id serial_ids[] = { | |||
873 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"), | 873 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"), |
874 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "cis/PCMLM28.cis"), | 874 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "cis/PCMLM28.cis"), |
875 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "cis/PCMLM28.cis"), | 875 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "cis/PCMLM28.cis"), |
876 | PCMCIA_MFC_DEVICE_CIS_PROD_ID12(1, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "DP83903.cis"), | 876 | PCMCIA_MFC_DEVICE_CIS_PROD_ID12(1, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "cis/DP83903.cis"), |
877 | PCMCIA_MFC_DEVICE_CIS_PROD_ID4(1, "NSC MF LAN/Modem", 0x58fc6056, "DP83903.cis"), | 877 | PCMCIA_MFC_DEVICE_CIS_PROD_ID4(1, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"), |
878 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x0556, "cis/3CCFEM556.cis"), | 878 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x0556, "cis/3CCFEM556.cis"), |
879 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0175, 0x0000, "DP83903.cis"), | 879 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0175, 0x0000, "cis/DP83903.cis"), |
880 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x0035, "cis/3CXEM556.cis"), | 880 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x0035, "cis/3CXEM556.cis"), |
881 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x003d, "cis/3CXEM556.cis"), | 881 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x003d, "cis/3CXEM556.cis"), |
882 | PCMCIA_DEVICE_CIS_PROD_ID12("Sierra Wireless", "AC850", 0xd85f6206, 0x42a2c018, "SW_8xx_SER.cis"), /* Sierra Wireless AC850 3G Network Adapter R1 */ | 882 | PCMCIA_DEVICE_CIS_PROD_ID12("Sierra Wireless", "AC850", 0xd85f6206, 0x42a2c018, "SW_8xx_SER.cis"), /* Sierra Wireless AC850 3G Network Adapter R1 */ |
@@ -884,9 +884,9 @@ static struct pcmcia_device_id serial_ids[] = { | |||
884 | PCMCIA_DEVICE_CIS_MANF_CARD(0x0192, 0xa555, "SW_555_SER.cis"), /* Sierra Aircard 555 CDMA 1xrtt Modem -- pre update */ | 884 | PCMCIA_DEVICE_CIS_MANF_CARD(0x0192, 0xa555, "SW_555_SER.cis"), /* Sierra Aircard 555 CDMA 1xrtt Modem -- pre update */ |
885 | PCMCIA_DEVICE_CIS_MANF_CARD(0x013f, 0xa555, "SW_555_SER.cis"), /* Sierra Aircard 555 CDMA 1xrtt Modem -- post update */ | 885 | PCMCIA_DEVICE_CIS_MANF_CARD(0x013f, 0xa555, "SW_555_SER.cis"), /* Sierra Aircard 555 CDMA 1xrtt Modem -- post update */ |
886 | PCMCIA_DEVICE_CIS_PROD_ID12("MultiTech", "PCMCIA 56K DataFax", 0x842047ee, 0xc2efcf03, "cis/MT5634ZLX.cis"), | 886 | PCMCIA_DEVICE_CIS_PROD_ID12("MultiTech", "PCMCIA 56K DataFax", 0x842047ee, 0xc2efcf03, "cis/MT5634ZLX.cis"), |
887 | PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-2", 0x96913a85, 0x27ab5437, "COMpad2.cis"), | 887 | PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-2", 0x96913a85, 0x27ab5437, "cis/COMpad2.cis"), |
888 | PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-4", 0x96913a85, 0xcec8f102, "COMpad4.cis"), | 888 | PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-4", 0x96913a85, 0xcec8f102, "cis/COMpad4.cis"), |
889 | PCMCIA_DEVICE_CIS_PROD_ID123("ADVANTECH", "COMpad-32/85", "1.0", 0x96913a85, 0x8fbe92ae, 0x0877b627, "COMpad2.cis"), | 889 | PCMCIA_DEVICE_CIS_PROD_ID123("ADVANTECH", "COMpad-32/85", "1.0", 0x96913a85, 0x8fbe92ae, 0x0877b627, "cis/COMpad2.cis"), |
890 | PCMCIA_DEVICE_CIS_PROD_ID2("RS-COM 2P", 0xad20b156, "cis/RS-COM-2P.cis"), | 890 | PCMCIA_DEVICE_CIS_PROD_ID2("RS-COM 2P", 0xad20b156, "cis/RS-COM-2P.cis"), |
891 | PCMCIA_DEVICE_CIS_MANF_CARD(0x0013, 0x0000, "GLOBETROTTER.cis"), | 891 | PCMCIA_DEVICE_CIS_MANF_CARD(0x0013, 0x0000, "GLOBETROTTER.cis"), |
892 | PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.","SERIAL CARD: SL100 1.00.",0x19ca78af,0xf964f42b), | 892 | PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.","SERIAL CARD: SL100 1.00.",0x19ca78af,0xf964f42b), |
diff --git a/firmware/Makefile b/firmware/Makefile index 5ea80b19785b..a6c7c3e47e42 100644 --- a/firmware/Makefile +++ b/firmware/Makefile | |||
@@ -67,10 +67,13 @@ fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin | |||
67 | fw-shipped-$(CONFIG_E100) += e100/d101m_ucode.bin e100/d101s_ucode.bin \ | 67 | fw-shipped-$(CONFIG_E100) += e100/d101m_ucode.bin e100/d101s_ucode.bin \ |
68 | e100/d102e_ucode.bin | 68 | e100/d102e_ucode.bin |
69 | fw-shipped-$(CONFIG_MYRI_SBUS) += myricom/lanai.bin | 69 | fw-shipped-$(CONFIG_MYRI_SBUS) += myricom/lanai.bin |
70 | fw-shipped-$(CONFIG_PCMCIA_PCNET) += cis/LA-PCM.cis cis/PCMLM28.cis | 70 | fw-shipped-$(CONFIG_PCMCIA_PCNET) += cis/LA-PCM.cis cis/PCMLM28.cis \ |
71 | cis/DP83903.cis cis/NE2K.cis \ | ||
72 | cis/tamarack.cis | ||
71 | fw-shipped-$(CONFIG_PCMCIA_3C589) += cis/3CXEM556.cis | 73 | fw-shipped-$(CONFIG_PCMCIA_3C589) += cis/3CXEM556.cis |
72 | fw-shipped-$(CONFIG_PCMCIA_3C574) += cis/3CCFEM556.cis | 74 | fw-shipped-$(CONFIG_PCMCIA_3C574) += cis/3CCFEM556.cis |
73 | fw-shipped-$(CONFIG_SERIAL_8250_CS) += cis/MT5634ZLX.cis cis/RS-COM-2P.cis | 75 | fw-shipped-$(CONFIG_SERIAL_8250_CS) += cis/MT5634ZLX.cis cis/RS-COM-2P.cis \ |
76 | cis/COMpad2.cis cis/COMpad4.cis | ||
74 | fw-shipped-$(CONFIG_PCMCIA_SMC91C92) += ositech/Xilinx7OD.bin | 77 | fw-shipped-$(CONFIG_PCMCIA_SMC91C92) += ositech/Xilinx7OD.bin |
75 | fw-shipped-$(CONFIG_SCSI_ADVANSYS) += advansys/mcode.bin advansys/38C1600.bin \ | 78 | fw-shipped-$(CONFIG_SCSI_ADVANSYS) += advansys/mcode.bin advansys/38C1600.bin \ |
76 | advansys/3550.bin advansys/38C0800.bin | 79 | advansys/3550.bin advansys/38C0800.bin |
diff --git a/firmware/WHENCE b/firmware/WHENCE index 3f8c4f6bc43f..c437e14f0b11 100644 --- a/firmware/WHENCE +++ b/firmware/WHENCE | |||
@@ -597,6 +597,9 @@ Driver: PCMCIA_PCNET - NE2000 compatible PCMCIA adapter | |||
597 | 597 | ||
598 | File: cis/LA-PCM.cis | 598 | File: cis/LA-PCM.cis |
599 | cis/PCMLM28.cis | 599 | cis/PCMLM28.cis |
600 | cis/DP83903.cis | ||
601 | cis/NE2K.cis | ||
602 | cis/tamarack.cis | ||
600 | 603 | ||
601 | Licence: GPL | 604 | Licence: GPL |
602 | 605 | ||
@@ -628,6 +631,8 @@ Driver: SERIAL_8250_CS - Serial PCMCIA adapter | |||
628 | 631 | ||
629 | File: cis/MT5634ZLX.cis | 632 | File: cis/MT5634ZLX.cis |
630 | cis/RS-COM-2P.cis | 633 | cis/RS-COM-2P.cis |
634 | cis/COMpad2.cis | ||
635 | cis/COMpad4.cis | ||
631 | 636 | ||
632 | Licence: GPL | 637 | Licence: GPL |
633 | 638 | ||
diff --git a/firmware/cis/COMpad2.cis.ihex b/firmware/cis/COMpad2.cis.ihex new file mode 100644 index 000000000000..1671c5e48caa --- /dev/null +++ b/firmware/cis/COMpad2.cis.ihex | |||
@@ -0,0 +1,11 @@ | |||
1 | :1000000001030000FF151F0401414456414E5445B1 | ||
2 | :10001000434800434F4D7061642D33322F38350013 | ||
3 | :10002000312E300000FF210202011A0501050001F6 | ||
4 | :10003000031B0EC18118AA61E80207E8030730B864 | ||
5 | :100040009E1B08820108AA6030030F1B0883010869 | ||
6 | :10005000AA6040030F1B08840108AA6050030F1B0D | ||
7 | :0D00600008850108AA6060030F1400FF006E | ||
8 | :00000001FF | ||
9 | # | ||
10 | # Replacement CIS for Advantech COMpad-32/85 | ||
11 | # | ||
diff --git a/firmware/cis/COMpad4.cis.ihex b/firmware/cis/COMpad4.cis.ihex new file mode 100644 index 000000000000..27bbec1921b3 --- /dev/null +++ b/firmware/cis/COMpad4.cis.ihex | |||
@@ -0,0 +1,9 @@ | |||
1 | :1000000001030000FF151F0401414456414E5445B1 | ||
2 | :10001000434800434F4D7061642D33322F383542D1 | ||
3 | :100020002D34000000FF210202011A050102000127 | ||
4 | :10003000011B0BC18118AA6040021F30B89E1B082B | ||
5 | :0C004000820108AA6040031F1400FF00AA | ||
6 | :00000001FF | ||
7 | # | ||
8 | # Replacement CIS for Advantech COMpad-32/85B-4 | ||
9 | # | ||
diff --git a/firmware/cis/DP83903.cis.ihex b/firmware/cis/DP83903.cis.ihex new file mode 100644 index 000000000000..6d73ea3cf1b8 --- /dev/null +++ b/firmware/cis/DP83903.cis.ihex | |||
@@ -0,0 +1,14 @@ | |||
1 | :1000000001030000FF152904014D756C74696675C4 | ||
2 | :100010006E6374696F6E20436172640000004E531A | ||
3 | :1000200043204D46204C414E2F4D6F64656D00FFBF | ||
4 | :1000300020047501000021020000060B02004900A7 | ||
5 | :100040000000006A000000FF00130343495321022F | ||
6 | :1000500006001A060517201077021B0C970179017C | ||
7 | :10006000556530FFFF284000FF001303434953212B | ||
8 | :100070000202001A060507401077021B09870119C2 | ||
9 | :0800800001552330FFFFFF00D2 | ||
10 | :00000001FF | ||
11 | # | ||
12 | # This CIS is for cards based on the National Semiconductor | ||
13 | # DP83903 Multiple Function Interface Chip | ||
14 | # | ||
diff --git a/firmware/cis/NE2K.cis.ihex b/firmware/cis/NE2K.cis.ihex new file mode 100644 index 000000000000..1bb40fc4759f --- /dev/null +++ b/firmware/cis/NE2K.cis.ihex | |||
@@ -0,0 +1,8 @@ | |||
1 | :1000000001030000FF1515040150434D4349410011 | ||
2 | :1000100045746865726E6574000000FF2102060079 | ||
3 | :100020001A050120F803031B09E001190155653089 | ||
4 | :06003000FFFF1400FF00B9 | ||
5 | :00000001FF | ||
6 | # | ||
7 | # Replacement CIS for various busted NE2000-compatible cards | ||
8 | # | ||
diff --git a/firmware/cis/tamarack.cis.ihex b/firmware/cis/tamarack.cis.ihex new file mode 100644 index 000000000000..1e86547fb361 --- /dev/null +++ b/firmware/cis/tamarack.cis.ihex | |||
@@ -0,0 +1,10 @@ | |||
1 | :100000000103D400FF17034100FF152404015441EC | ||
2 | :100010004D415241434B0045746865726E657400F2 | ||
3 | :10002000410030303437343331313830303100FF33 | ||
4 | :10003000210206001A050120F803031B14E08119B0 | ||
5 | :100040003F554D5D06864626E551000F100F30FFE7 | ||
6 | :05005000FF1400FF0099 | ||
7 | :00000001FF | ||
8 | # | ||
9 | # Replacement CIS for Surecom, Tamarack NE2000 cards | ||
10 | # | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index 3b461dffe244..3273a0c5043b 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage { | |||
16 | /* _SS_MAXSIZE value minus size of ss_family */ | 16 | /* _SS_MAXSIZE value minus size of ss_family */ |
17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ | 17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ |
18 | 18 | ||
19 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 19 | #ifdef __KERNEL__ |
20 | 20 | ||
21 | #include <asm/socket.h> /* arch-dependent defines */ | 21 | #include <asm/socket.h> /* arch-dependent defines */ |
22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ | 22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ |
@@ -101,21 +101,6 @@ struct cmsghdr { | |||
101 | ((char *)(cmsg) - (char *)(mhdr)->msg_control))) | 101 | ((char *)(cmsg) - (char *)(mhdr)->msg_control))) |
102 | 102 | ||
103 | /* | 103 | /* |
104 | * This mess will go away with glibc | ||
105 | */ | ||
106 | |||
107 | #ifdef __KERNEL__ | ||
108 | #define __KINLINE static inline | ||
109 | #elif defined(__GNUC__) | ||
110 | #define __KINLINE static __inline__ | ||
111 | #elif defined(__cplusplus) | ||
112 | #define __KINLINE static inline | ||
113 | #else | ||
114 | #define __KINLINE static | ||
115 | #endif | ||
116 | |||
117 | |||
118 | /* | ||
119 | * Get the next cmsg header | 104 | * Get the next cmsg header |
120 | * | 105 | * |
121 | * PLEASE, do not touch this function. If you think, that it is | 106 | * PLEASE, do not touch this function. If you think, that it is |
@@ -128,7 +113,7 @@ struct cmsghdr { | |||
128 | * ancillary object DATA. --ANK (980731) | 113 | * ancillary object DATA. --ANK (980731) |
129 | */ | 114 | */ |
130 | 115 | ||
131 | __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, | 116 | static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, |
132 | struct cmsghdr *__cmsg) | 117 | struct cmsghdr *__cmsg) |
133 | { | 118 | { |
134 | struct cmsghdr * __ptr; | 119 | struct cmsghdr * __ptr; |
@@ -140,7 +125,7 @@ __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, | |||
140 | return __ptr; | 125 | return __ptr; |
141 | } | 126 | } |
142 | 127 | ||
143 | __KINLINE struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) | 128 | static inline struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) |
144 | { | 129 | { |
145 | return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); | 130 | return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); |
146 | } | 131 | } |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index effb78410eb2..4242e94ff1a5 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -406,13 +406,13 @@ static ssize_t wireless_show(struct device *d, char *buf, | |||
406 | const struct iw_statistics *iw; | 406 | const struct iw_statistics *iw; |
407 | ssize_t ret = -EINVAL; | 407 | ssize_t ret = -EINVAL; |
408 | 408 | ||
409 | read_lock(&dev_base_lock); | 409 | rtnl_lock(); |
410 | if (dev_isalive(dev)) { | 410 | if (dev_isalive(dev)) { |
411 | iw = get_wireless_stats(dev); | 411 | iw = get_wireless_stats(dev); |
412 | if (iw) | 412 | if (iw) |
413 | ret = (*format)(iw, buf); | 413 | ret = (*format)(iw, buf); |
414 | } | 414 | } |
415 | read_unlock(&dev_base_lock); | 415 | rtnl_unlock(); |
416 | 416 | ||
417 | return ret; | 417 | return ret; |
418 | } | 418 | } |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index e856ab0d0745..1da0e038df78 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -964,7 +964,7 @@ static ssize_t pktgen_if_write(struct file *file, | |||
964 | if (value == 0x7FFFFFFF) | 964 | if (value == 0x7FFFFFFF) |
965 | pkt_dev->delay = ULLONG_MAX; | 965 | pkt_dev->delay = ULLONG_MAX; |
966 | else | 966 | else |
967 | pkt_dev->delay = (u64)value * NSEC_PER_USEC; | 967 | pkt_dev->delay = (u64)value; |
968 | 968 | ||
969 | sprintf(pg_result, "OK: delay=%llu", | 969 | sprintf(pg_result, "OK: delay=%llu", |
970 | (unsigned long long) pkt_dev->delay); | 970 | (unsigned long long) pkt_dev->delay); |
@@ -2212,7 +2212,7 @@ static void set_cur_queue_map(struct pktgen_dev *pkt_dev) | |||
2212 | if (pkt_dev->flags & F_QUEUE_MAP_CPU) | 2212 | if (pkt_dev->flags & F_QUEUE_MAP_CPU) |
2213 | pkt_dev->cur_queue_map = smp_processor_id(); | 2213 | pkt_dev->cur_queue_map = smp_processor_id(); |
2214 | 2214 | ||
2215 | else if (pkt_dev->queue_map_min < pkt_dev->queue_map_max) { | 2215 | else if (pkt_dev->queue_map_min <= pkt_dev->queue_map_max) { |
2216 | __u16 t; | 2216 | __u16 t; |
2217 | if (pkt_dev->flags & F_QUEUE_MAP_RND) { | 2217 | if (pkt_dev->flags & F_QUEUE_MAP_RND) { |
2218 | t = random32() % | 2218 | t = random32() % |