diff options
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/gigaset/asyncdata.c | 4 | ||||
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 18 | ||||
-rw-r--r-- | drivers/isdn/gigaset/capi.c | 15 | ||||
-rw-r--r-- | drivers/isdn/gigaset/common.c | 49 | ||||
-rw-r--r-- | drivers/isdn/gigaset/ev-layer.c | 63 | ||||
-rw-r--r-- | drivers/isdn/gigaset/gigaset.h | 7 | ||||
-rw-r--r-- | drivers/isdn/gigaset/i4l.c | 52 | ||||
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 12 | ||||
-rw-r--r-- | drivers/isdn/gigaset/proc.c | 2 | ||||
-rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 2 |
10 files changed, 77 insertions, 147 deletions
diff --git a/drivers/isdn/gigaset/asyncdata.c b/drivers/isdn/gigaset/asyncdata.c index e913beb63f24..c5016bd2d94f 100644 --- a/drivers/isdn/gigaset/asyncdata.c +++ b/drivers/isdn/gigaset/asyncdata.c | |||
@@ -67,14 +67,14 @@ static unsigned cmd_loop(unsigned numbytes, struct inbuf_t *inbuf) | |||
67 | /* --v-- fall through --v-- */ | 67 | /* --v-- fall through --v-- */ |
68 | case '\r': | 68 | case '\r': |
69 | /* end of message line, pass to response handler */ | 69 | /* end of message line, pass to response handler */ |
70 | gig_dbg(DEBUG_TRANSCMD, "%s: End of Message (%d Bytes)", | ||
71 | __func__, cbytes); | ||
72 | if (cbytes >= MAX_RESP_SIZE) { | 70 | if (cbytes >= MAX_RESP_SIZE) { |
73 | dev_warn(cs->dev, "response too large (%d)\n", | 71 | dev_warn(cs->dev, "response too large (%d)\n", |
74 | cbytes); | 72 | cbytes); |
75 | cbytes = MAX_RESP_SIZE; | 73 | cbytes = MAX_RESP_SIZE; |
76 | } | 74 | } |
77 | cs->cbytes = cbytes; | 75 | cs->cbytes = cbytes; |
76 | gigaset_dbg_buffer(DEBUG_TRANSCMD, "received response", | ||
77 | cbytes, cs->respdata); | ||
78 | gigaset_handle_modem_response(cs); | 78 | gigaset_handle_modem_response(cs); |
79 | cbytes = 0; | 79 | cbytes = 0; |
80 | 80 | ||
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 95ebc5129895..0be15c70c16d 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
@@ -347,12 +347,7 @@ static inline void error_hangup(struct bc_state *bcs) | |||
347 | { | 347 | { |
348 | struct cardstate *cs = bcs->cs; | 348 | struct cardstate *cs = bcs->cs; |
349 | 349 | ||
350 | gig_dbg(DEBUG_ANY, "%s: scheduling HUP for channel %d", | 350 | gigaset_add_event(cs, &bcs->at_state, EV_HUP, NULL, 0, NULL); |
351 | __func__, bcs->channel); | ||
352 | |||
353 | if (!gigaset_add_event(cs, &bcs->at_state, EV_HUP, NULL, 0, NULL)) | ||
354 | dev_err(cs->dev, "event queue full\n"); | ||
355 | |||
356 | gigaset_schedule_event(cs); | 351 | gigaset_schedule_event(cs); |
357 | } | 352 | } |
358 | 353 | ||
@@ -1706,8 +1701,7 @@ static void complete_cb(struct cardstate *cs) | |||
1706 | 1701 | ||
1707 | /* unqueue completed buffer */ | 1702 | /* unqueue completed buffer */ |
1708 | cs->cmdbytes -= cs->curlen; | 1703 | cs->cmdbytes -= cs->curlen; |
1709 | gig_dbg(DEBUG_TRANSCMD|DEBUG_LOCKCMD, | 1704 | gig_dbg(DEBUG_OUTPUT, "write_command: sent %u bytes, %u left", |
1710 | "write_command: sent %u bytes, %u left", | ||
1711 | cs->curlen, cs->cmdbytes); | 1705 | cs->curlen, cs->cmdbytes); |
1712 | if (cb->next != NULL) { | 1706 | if (cb->next != NULL) { |
1713 | cs->cmdbuf = cb->next; | 1707 | cs->cmdbuf = cb->next; |
@@ -1881,13 +1875,13 @@ static int start_cbsend(struct cardstate *cs) | |||
1881 | 1875 | ||
1882 | /* check if suspend requested */ | 1876 | /* check if suspend requested */ |
1883 | if (ucs->basstate & BS_SUSPEND) { | 1877 | if (ucs->basstate & BS_SUSPEND) { |
1884 | gig_dbg(DEBUG_TRANSCMD|DEBUG_LOCKCMD, "suspending"); | 1878 | gig_dbg(DEBUG_OUTPUT, "suspending"); |
1885 | return -EHOSTUNREACH; | 1879 | return -EHOSTUNREACH; |
1886 | } | 1880 | } |
1887 | 1881 | ||
1888 | /* check if AT channel is open */ | 1882 | /* check if AT channel is open */ |
1889 | if (!(ucs->basstate & BS_ATOPEN)) { | 1883 | if (!(ucs->basstate & BS_ATOPEN)) { |
1890 | gig_dbg(DEBUG_TRANSCMD|DEBUG_LOCKCMD, "AT channel not open"); | 1884 | gig_dbg(DEBUG_OUTPUT, "AT channel not open"); |
1891 | rc = req_submit(cs->bcs, HD_OPEN_ATCHANNEL, 0, BAS_TIMEOUT); | 1885 | rc = req_submit(cs->bcs, HD_OPEN_ATCHANNEL, 0, BAS_TIMEOUT); |
1892 | if (rc < 0) { | 1886 | if (rc < 0) { |
1893 | /* flush command queue */ | 1887 | /* flush command queue */ |
@@ -2251,7 +2245,7 @@ static int gigaset_probe(struct usb_interface *interface, | |||
2251 | int i, j; | 2245 | int i, j; |
2252 | int rc; | 2246 | int rc; |
2253 | 2247 | ||
2254 | gig_dbg(DEBUG_ANY, | 2248 | gig_dbg(DEBUG_INIT, |
2255 | "%s: Check if device matches .. (Vendor: 0x%x, Product: 0x%x)", | 2249 | "%s: Check if device matches .. (Vendor: 0x%x, Product: 0x%x)", |
2256 | __func__, le16_to_cpu(udev->descriptor.idVendor), | 2250 | __func__, le16_to_cpu(udev->descriptor.idVendor), |
2257 | le16_to_cpu(udev->descriptor.idProduct)); | 2251 | le16_to_cpu(udev->descriptor.idProduct)); |
@@ -2259,7 +2253,7 @@ static int gigaset_probe(struct usb_interface *interface, | |||
2259 | /* set required alternate setting */ | 2253 | /* set required alternate setting */ |
2260 | hostif = interface->cur_altsetting; | 2254 | hostif = interface->cur_altsetting; |
2261 | if (hostif->desc.bAlternateSetting != 3) { | 2255 | if (hostif->desc.bAlternateSetting != 3) { |
2262 | gig_dbg(DEBUG_ANY, | 2256 | gig_dbg(DEBUG_INIT, |
2263 | "%s: wrong alternate setting %d - trying to switch", | 2257 | "%s: wrong alternate setting %d - trying to switch", |
2264 | __func__, hostif->desc.bAlternateSetting); | 2258 | __func__, hostif->desc.bAlternateSetting); |
2265 | if (usb_set_interface(udev, hostif->desc.bInterfaceNumber, 3) | 2259 | if (usb_set_interface(udev, hostif->desc.bInterfaceNumber, 3) |
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c index 6f0ae32906bf..20ebcee9b0c0 100644 --- a/drivers/isdn/gigaset/capi.c +++ b/drivers/isdn/gigaset/capi.c | |||
@@ -1427,9 +1427,10 @@ static void do_connect_req(struct gigaset_capi_ctr *iif, | |||
1427 | 1427 | ||
1428 | /* queue & schedule EV_DIAL event */ | 1428 | /* queue & schedule EV_DIAL event */ |
1429 | if (!gigaset_add_event(cs, &bcs->at_state, EV_DIAL, commands, | 1429 | if (!gigaset_add_event(cs, &bcs->at_state, EV_DIAL, commands, |
1430 | bcs->at_state.seq_index, NULL)) | 1430 | bcs->at_state.seq_index, NULL)) { |
1431 | goto oom; | 1431 | info = CAPI_MSGOSRESOURCEERR; |
1432 | gig_dbg(DEBUG_CMD, "scheduling DIAL"); | 1432 | goto error; |
1433 | } | ||
1433 | gigaset_schedule_event(cs); | 1434 | gigaset_schedule_event(cs); |
1434 | ap->connected = APCONN_SETUP; | 1435 | ap->connected = APCONN_SETUP; |
1435 | send_conf(iif, ap, skb, CapiSuccess); | 1436 | send_conf(iif, ap, skb, CapiSuccess); |
@@ -1543,7 +1544,6 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif, | |||
1543 | if (!gigaset_add_event(cs, &cs->bcs[channel-1].at_state, | 1544 | if (!gigaset_add_event(cs, &cs->bcs[channel-1].at_state, |
1544 | EV_ACCEPT, NULL, 0, NULL)) | 1545 | EV_ACCEPT, NULL, 0, NULL)) |
1545 | return; | 1546 | return; |
1546 | gig_dbg(DEBUG_CMD, "scheduling ACCEPT"); | ||
1547 | gigaset_schedule_event(cs); | 1547 | gigaset_schedule_event(cs); |
1548 | return; | 1548 | return; |
1549 | 1549 | ||
@@ -1584,7 +1584,6 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif, | |||
1584 | if (!gigaset_add_event(cs, &cs->bcs[channel-1].at_state, | 1584 | if (!gigaset_add_event(cs, &cs->bcs[channel-1].at_state, |
1585 | EV_HUP, NULL, 0, NULL)) | 1585 | EV_HUP, NULL, 0, NULL)) |
1586 | return; | 1586 | return; |
1587 | gig_dbg(DEBUG_CMD, "scheduling HUP"); | ||
1588 | gigaset_schedule_event(cs); | 1587 | gigaset_schedule_event(cs); |
1589 | return; | 1588 | return; |
1590 | } | 1589 | } |
@@ -1667,11 +1666,9 @@ static void do_connect_b3_resp(struct gigaset_capi_ctr *iif, | |||
1667 | /* trigger hangup, causing eventual DISCONNECT_IND */ | 1666 | /* trigger hangup, causing eventual DISCONNECT_IND */ |
1668 | if (!gigaset_add_event(cs, &bcs->at_state, | 1667 | if (!gigaset_add_event(cs, &bcs->at_state, |
1669 | EV_HUP, NULL, 0, NULL)) { | 1668 | EV_HUP, NULL, 0, NULL)) { |
1670 | dev_err(cs->dev, "%s: out of memory\n", __func__); | ||
1671 | dev_kfree_skb_any(skb); | 1669 | dev_kfree_skb_any(skb); |
1672 | return; | 1670 | return; |
1673 | } | 1671 | } |
1674 | gig_dbg(DEBUG_CMD, "scheduling HUP"); | ||
1675 | gigaset_schedule_event(cs); | 1672 | gigaset_schedule_event(cs); |
1676 | 1673 | ||
1677 | /* emit DISCONNECT_B3_IND */ | 1674 | /* emit DISCONNECT_B3_IND */ |
@@ -1770,11 +1767,9 @@ static void do_disconnect_req(struct gigaset_capi_ctr *iif, | |||
1770 | 1767 | ||
1771 | /* trigger hangup, causing eventual DISCONNECT_IND */ | 1768 | /* trigger hangup, causing eventual DISCONNECT_IND */ |
1772 | if (!gigaset_add_event(cs, &bcs->at_state, EV_HUP, NULL, 0, NULL)) { | 1769 | if (!gigaset_add_event(cs, &bcs->at_state, EV_HUP, NULL, 0, NULL)) { |
1773 | dev_err(cs->dev, "%s: out of memory\n", __func__); | ||
1774 | send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR); | 1770 | send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR); |
1775 | return; | 1771 | return; |
1776 | } | 1772 | } |
1777 | gig_dbg(DEBUG_CMD, "scheduling HUP"); | ||
1778 | gigaset_schedule_event(cs); | 1773 | gigaset_schedule_event(cs); |
1779 | 1774 | ||
1780 | /* emit reply */ | 1775 | /* emit reply */ |
@@ -1817,11 +1812,9 @@ static void do_disconnect_b3_req(struct gigaset_capi_ctr *iif, | |||
1817 | /* trigger hangup, causing eventual DISCONNECT_B3_IND */ | 1812 | /* trigger hangup, causing eventual DISCONNECT_B3_IND */ |
1818 | if (!gigaset_add_event(cs, &cs->bcs[channel-1].at_state, | 1813 | if (!gigaset_add_event(cs, &cs->bcs[channel-1].at_state, |
1819 | EV_HUP, NULL, 0, NULL)) { | 1814 | EV_HUP, NULL, 0, NULL)) { |
1820 | dev_err(cs->dev, "%s: out of memory\n", __func__); | ||
1821 | send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR); | 1815 | send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR); |
1822 | return; | 1816 | return; |
1823 | } | 1817 | } |
1824 | gig_dbg(DEBUG_CMD, "scheduling HUP"); | ||
1825 | gigaset_schedule_event(cs); | 1818 | gigaset_schedule_event(cs); |
1826 | 1819 | ||
1827 | /* NCPI parameter: not applicable for B3 Transparent */ | 1820 | /* NCPI parameter: not applicable for B3 Transparent */ |
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index 664b0c519c3e..85de3399a2f2 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c | |||
@@ -149,10 +149,8 @@ static int test_timeout(struct at_state_t *at_state) | |||
149 | return 0; | 149 | return 0; |
150 | } | 150 | } |
151 | 151 | ||
152 | if (!gigaset_add_event(at_state->cs, at_state, EV_TIMEOUT, NULL, | 152 | gigaset_add_event(at_state->cs, at_state, EV_TIMEOUT, NULL, |
153 | at_state->timer_index, NULL)) | 153 | at_state->timer_index, NULL); |
154 | dev_err(at_state->cs->dev, "%s: out of memory\n", | ||
155 | __func__); | ||
156 | return 1; | 154 | return 1; |
157 | } | 155 | } |
158 | 156 | ||
@@ -180,7 +178,7 @@ static void timer_tick(unsigned long data) | |||
180 | if (cs->running) { | 178 | if (cs->running) { |
181 | mod_timer(&cs->timer, jiffies + msecs_to_jiffies(GIG_TICK)); | 179 | mod_timer(&cs->timer, jiffies + msecs_to_jiffies(GIG_TICK)); |
182 | if (timeout) { | 180 | if (timeout) { |
183 | gig_dbg(DEBUG_CMD, "scheduling timeout"); | 181 | gig_dbg(DEBUG_EVENT, "scheduling timeout"); |
184 | tasklet_schedule(&cs->event_tasklet); | 182 | tasklet_schedule(&cs->event_tasklet); |
185 | } | 183 | } |
186 | } | 184 | } |
@@ -194,14 +192,14 @@ int gigaset_get_channel(struct bc_state *bcs) | |||
194 | 192 | ||
195 | spin_lock_irqsave(&bcs->cs->lock, flags); | 193 | spin_lock_irqsave(&bcs->cs->lock, flags); |
196 | if (bcs->use_count || !try_module_get(bcs->cs->driver->owner)) { | 194 | if (bcs->use_count || !try_module_get(bcs->cs->driver->owner)) { |
197 | gig_dbg(DEBUG_ANY, "could not allocate channel %d", | 195 | gig_dbg(DEBUG_CHANNEL, "could not allocate channel %d", |
198 | bcs->channel); | 196 | bcs->channel); |
199 | spin_unlock_irqrestore(&bcs->cs->lock, flags); | 197 | spin_unlock_irqrestore(&bcs->cs->lock, flags); |
200 | return 0; | 198 | return 0; |
201 | } | 199 | } |
202 | ++bcs->use_count; | 200 | ++bcs->use_count; |
203 | bcs->busy = 1; | 201 | bcs->busy = 1; |
204 | gig_dbg(DEBUG_ANY, "allocated channel %d", bcs->channel); | 202 | gig_dbg(DEBUG_CHANNEL, "allocated channel %d", bcs->channel); |
205 | spin_unlock_irqrestore(&bcs->cs->lock, flags); | 203 | spin_unlock_irqrestore(&bcs->cs->lock, flags); |
206 | return 1; | 204 | return 1; |
207 | } | 205 | } |
@@ -213,7 +211,7 @@ struct bc_state *gigaset_get_free_channel(struct cardstate *cs) | |||
213 | 211 | ||
214 | spin_lock_irqsave(&cs->lock, flags); | 212 | spin_lock_irqsave(&cs->lock, flags); |
215 | if (!try_module_get(cs->driver->owner)) { | 213 | if (!try_module_get(cs->driver->owner)) { |
216 | gig_dbg(DEBUG_ANY, | 214 | gig_dbg(DEBUG_CHANNEL, |
217 | "could not get module for allocating channel"); | 215 | "could not get module for allocating channel"); |
218 | spin_unlock_irqrestore(&cs->lock, flags); | 216 | spin_unlock_irqrestore(&cs->lock, flags); |
219 | return NULL; | 217 | return NULL; |
@@ -223,12 +221,12 @@ struct bc_state *gigaset_get_free_channel(struct cardstate *cs) | |||
223 | ++cs->bcs[i].use_count; | 221 | ++cs->bcs[i].use_count; |
224 | cs->bcs[i].busy = 1; | 222 | cs->bcs[i].busy = 1; |
225 | spin_unlock_irqrestore(&cs->lock, flags); | 223 | spin_unlock_irqrestore(&cs->lock, flags); |
226 | gig_dbg(DEBUG_ANY, "allocated channel %d", i); | 224 | gig_dbg(DEBUG_CHANNEL, "allocated channel %d", i); |
227 | return cs->bcs + i; | 225 | return cs->bcs + i; |
228 | } | 226 | } |
229 | module_put(cs->driver->owner); | 227 | module_put(cs->driver->owner); |
230 | spin_unlock_irqrestore(&cs->lock, flags); | 228 | spin_unlock_irqrestore(&cs->lock, flags); |
231 | gig_dbg(DEBUG_ANY, "no free channel"); | 229 | gig_dbg(DEBUG_CHANNEL, "no free channel"); |
232 | return NULL; | 230 | return NULL; |
233 | } | 231 | } |
234 | 232 | ||
@@ -238,14 +236,15 @@ void gigaset_free_channel(struct bc_state *bcs) | |||
238 | 236 | ||
239 | spin_lock_irqsave(&bcs->cs->lock, flags); | 237 | spin_lock_irqsave(&bcs->cs->lock, flags); |
240 | if (!bcs->busy) { | 238 | if (!bcs->busy) { |
241 | gig_dbg(DEBUG_ANY, "could not free channel %d", bcs->channel); | 239 | gig_dbg(DEBUG_CHANNEL, "could not free channel %d", |
240 | bcs->channel); | ||
242 | spin_unlock_irqrestore(&bcs->cs->lock, flags); | 241 | spin_unlock_irqrestore(&bcs->cs->lock, flags); |
243 | return; | 242 | return; |
244 | } | 243 | } |
245 | --bcs->use_count; | 244 | --bcs->use_count; |
246 | bcs->busy = 0; | 245 | bcs->busy = 0; |
247 | module_put(bcs->cs->driver->owner); | 246 | module_put(bcs->cs->driver->owner); |
248 | gig_dbg(DEBUG_ANY, "freed channel %d", bcs->channel); | 247 | gig_dbg(DEBUG_CHANNEL, "freed channel %d", bcs->channel); |
249 | spin_unlock_irqrestore(&bcs->cs->lock, flags); | 248 | spin_unlock_irqrestore(&bcs->cs->lock, flags); |
250 | } | 249 | } |
251 | 250 | ||
@@ -258,14 +257,15 @@ int gigaset_get_channels(struct cardstate *cs) | |||
258 | for (i = 0; i < cs->channels; ++i) | 257 | for (i = 0; i < cs->channels; ++i) |
259 | if (cs->bcs[i].use_count) { | 258 | if (cs->bcs[i].use_count) { |
260 | spin_unlock_irqrestore(&cs->lock, flags); | 259 | spin_unlock_irqrestore(&cs->lock, flags); |
261 | gig_dbg(DEBUG_ANY, "could not allocate all channels"); | 260 | gig_dbg(DEBUG_CHANNEL, |
261 | "could not allocate all channels"); | ||
262 | return 0; | 262 | return 0; |
263 | } | 263 | } |
264 | for (i = 0; i < cs->channels; ++i) | 264 | for (i = 0; i < cs->channels; ++i) |
265 | ++cs->bcs[i].use_count; | 265 | ++cs->bcs[i].use_count; |
266 | spin_unlock_irqrestore(&cs->lock, flags); | 266 | spin_unlock_irqrestore(&cs->lock, flags); |
267 | 267 | ||
268 | gig_dbg(DEBUG_ANY, "allocated all channels"); | 268 | gig_dbg(DEBUG_CHANNEL, "allocated all channels"); |
269 | 269 | ||
270 | return 1; | 270 | return 1; |
271 | } | 271 | } |
@@ -275,7 +275,7 @@ void gigaset_free_channels(struct cardstate *cs) | |||
275 | unsigned long flags; | 275 | unsigned long flags; |
276 | int i; | 276 | int i; |
277 | 277 | ||
278 | gig_dbg(DEBUG_ANY, "unblocking all channels"); | 278 | gig_dbg(DEBUG_CHANNEL, "unblocking all channels"); |
279 | spin_lock_irqsave(&cs->lock, flags); | 279 | spin_lock_irqsave(&cs->lock, flags); |
280 | for (i = 0; i < cs->channels; ++i) | 280 | for (i = 0; i < cs->channels; ++i) |
281 | --cs->bcs[i].use_count; | 281 | --cs->bcs[i].use_count; |
@@ -287,7 +287,7 @@ void gigaset_block_channels(struct cardstate *cs) | |||
287 | unsigned long flags; | 287 | unsigned long flags; |
288 | int i; | 288 | int i; |
289 | 289 | ||
290 | gig_dbg(DEBUG_ANY, "blocking all channels"); | 290 | gig_dbg(DEBUG_CHANNEL, "blocking all channels"); |
291 | spin_lock_irqsave(&cs->lock, flags); | 291 | spin_lock_irqsave(&cs->lock, flags); |
292 | for (i = 0; i < cs->channels; ++i) | 292 | for (i = 0; i < cs->channels; ++i) |
293 | ++cs->bcs[i].use_count; | 293 | ++cs->bcs[i].use_count; |
@@ -338,6 +338,8 @@ struct event_t *gigaset_add_event(struct cardstate *cs, | |||
338 | unsigned next, tail; | 338 | unsigned next, tail; |
339 | struct event_t *event = NULL; | 339 | struct event_t *event = NULL; |
340 | 340 | ||
341 | gig_dbg(DEBUG_EVENT, "queueing event %d", type); | ||
342 | |||
341 | spin_lock_irqsave(&cs->ev_lock, flags); | 343 | spin_lock_irqsave(&cs->ev_lock, flags); |
342 | 344 | ||
343 | tail = cs->ev_tail; | 345 | tail = cs->ev_tail; |
@@ -934,11 +936,8 @@ int gigaset_start(struct cardstate *cs) | |||
934 | 936 | ||
935 | if (!gigaset_add_event(cs, &cs->at_state, EV_START, NULL, 0, NULL)) { | 937 | if (!gigaset_add_event(cs, &cs->at_state, EV_START, NULL, 0, NULL)) { |
936 | cs->waiting = 0; | 938 | cs->waiting = 0; |
937 | dev_err(cs->dev, "%s: out of memory\n", __func__); | ||
938 | goto error; | 939 | goto error; |
939 | } | 940 | } |
940 | |||
941 | gig_dbg(DEBUG_CMD, "scheduling START"); | ||
942 | gigaset_schedule_event(cs); | 941 | gigaset_schedule_event(cs); |
943 | 942 | ||
944 | wait_event(cs->waitqueue, !cs->waiting); | 943 | wait_event(cs->waitqueue, !cs->waiting); |
@@ -973,12 +972,8 @@ int gigaset_shutdown(struct cardstate *cs) | |||
973 | 972 | ||
974 | cs->waiting = 1; | 973 | cs->waiting = 1; |
975 | 974 | ||
976 | if (!gigaset_add_event(cs, &cs->at_state, EV_SHUTDOWN, NULL, 0, NULL)) { | 975 | if (!gigaset_add_event(cs, &cs->at_state, EV_SHUTDOWN, NULL, 0, NULL)) |
977 | dev_err(cs->dev, "%s: out of memory\n", __func__); | ||
978 | goto exit; | 976 | goto exit; |
979 | } | ||
980 | |||
981 | gig_dbg(DEBUG_CMD, "scheduling SHUTDOWN"); | ||
982 | gigaset_schedule_event(cs); | 977 | gigaset_schedule_event(cs); |
983 | 978 | ||
984 | wait_event(cs->waitqueue, !cs->waiting); | 979 | wait_event(cs->waitqueue, !cs->waiting); |
@@ -1004,12 +999,8 @@ void gigaset_stop(struct cardstate *cs) | |||
1004 | 999 | ||
1005 | cs->waiting = 1; | 1000 | cs->waiting = 1; |
1006 | 1001 | ||
1007 | if (!gigaset_add_event(cs, &cs->at_state, EV_STOP, NULL, 0, NULL)) { | 1002 | if (!gigaset_add_event(cs, &cs->at_state, EV_STOP, NULL, 0, NULL)) |
1008 | dev_err(cs->dev, "%s: out of memory\n", __func__); | ||
1009 | goto exit; | 1003 | goto exit; |
1010 | } | ||
1011 | |||
1012 | gig_dbg(DEBUG_CMD, "scheduling STOP"); | ||
1013 | gigaset_schedule_event(cs); | 1004 | gigaset_schedule_event(cs); |
1014 | 1005 | ||
1015 | wait_event(cs->waitqueue, !cs->waiting); | 1006 | wait_event(cs->waitqueue, !cs->waiting); |
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index ddeb0456d202..c8f89b78b233 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c | |||
@@ -427,7 +427,7 @@ static int isdn_getnum(char *p) | |||
427 | { | 427 | { |
428 | int v = -1; | 428 | int v = -1; |
429 | 429 | ||
430 | gig_dbg(DEBUG_TRANSCMD, "string: %s", p); | 430 | gig_dbg(DEBUG_EVENT, "string: %s", p); |
431 | 431 | ||
432 | while (*p >= '0' && *p <= '9') | 432 | while (*p >= '0' && *p <= '9') |
433 | v = ((v < 0) ? 0 : (v * 10)) + (int) ((*p++) - '0'); | 433 | v = ((v < 0) ? 0 : (v * 10)) + (int) ((*p++) - '0'); |
@@ -444,7 +444,7 @@ static int isdn_gethex(char *p) | |||
444 | int v = 0; | 444 | int v = 0; |
445 | int c; | 445 | int c; |
446 | 446 | ||
447 | gig_dbg(DEBUG_TRANSCMD, "string: %s", p); | 447 | gig_dbg(DEBUG_EVENT, "string: %s", p); |
448 | 448 | ||
449 | if (!*p) | 449 | if (!*p) |
450 | return -1; | 450 | return -1; |
@@ -517,7 +517,6 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
517 | return; | 517 | return; |
518 | } | 518 | } |
519 | cs->respdata[len] = 0; | 519 | cs->respdata[len] = 0; |
520 | gig_dbg(DEBUG_TRANSCMD, "raw string: '%s'", cs->respdata); | ||
521 | argv[0] = cs->respdata; | 520 | argv[0] = cs->respdata; |
522 | params = 1; | 521 | params = 1; |
523 | if (cs->at_state.getstring) { | 522 | if (cs->at_state.getstring) { |
@@ -552,14 +551,14 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
552 | for (j = 1; j < params; ++j) | 551 | for (j = 1; j < params; ++j) |
553 | argv[j][-1] = 0; | 552 | argv[j][-1] = 0; |
554 | 553 | ||
555 | gig_dbg(DEBUG_TRANSCMD, "CMD received: %s", argv[0]); | 554 | gig_dbg(DEBUG_EVENT, "CMD received: %s", argv[0]); |
556 | if (cid) { | 555 | if (cid) { |
557 | --params; | 556 | --params; |
558 | gig_dbg(DEBUG_TRANSCMD, "CID: %s", argv[params]); | 557 | gig_dbg(DEBUG_EVENT, "CID: %s", argv[params]); |
559 | } | 558 | } |
560 | gig_dbg(DEBUG_TRANSCMD, "available params: %d", params - 1); | 559 | gig_dbg(DEBUG_EVENT, "available params: %d", params - 1); |
561 | for (j = 1; j < params; j++) | 560 | for (j = 1; j < params; j++) |
562 | gig_dbg(DEBUG_TRANSCMD, "param %d: %s", j, argv[j]); | 561 | gig_dbg(DEBUG_EVENT, "param %d: %s", j, argv[j]); |
563 | } | 562 | } |
564 | 563 | ||
565 | spin_lock_irqsave(&cs->ev_lock, flags); | 564 | spin_lock_irqsave(&cs->ev_lock, flags); |
@@ -642,7 +641,7 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
642 | dev_err(cs->dev, "out of memory\n"); | 641 | dev_err(cs->dev, "out of memory\n"); |
643 | ++curarg; | 642 | ++curarg; |
644 | } | 643 | } |
645 | gig_dbg(DEBUG_CMD, "string==%s", | 644 | gig_dbg(DEBUG_EVENT, "string==%s", |
646 | event->ptr ? (char *) event->ptr : "NULL"); | 645 | event->ptr ? (char *) event->ptr : "NULL"); |
647 | break; | 646 | break; |
648 | case RT_ZCAU: | 647 | case RT_ZCAU: |
@@ -669,7 +668,7 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
669 | ++curarg; | 668 | ++curarg; |
670 | } else | 669 | } else |
671 | event->parameter = -1; | 670 | event->parameter = -1; |
672 | gig_dbg(DEBUG_CMD, "parameter==%d", event->parameter); | 671 | gig_dbg(DEBUG_EVENT, "parameter==%d", event->parameter); |
673 | break; | 672 | break; |
674 | } | 673 | } |
675 | 674 | ||
@@ -684,7 +683,7 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
684 | spin_unlock_irqrestore(&cs->ev_lock, flags); | 683 | spin_unlock_irqrestore(&cs->ev_lock, flags); |
685 | 684 | ||
686 | if (curarg != params) | 685 | if (curarg != params) |
687 | gig_dbg(DEBUG_ANY, | 686 | gig_dbg(DEBUG_EVENT, |
688 | "invalid number of processed parameters: %d/%d", | 687 | "invalid number of processed parameters: %d/%d", |
689 | curarg, params); | 688 | curarg, params); |
690 | } | 689 | } |
@@ -705,8 +704,8 @@ static void disconnect(struct at_state_t **at_state_p) | |||
705 | /* revert to selected idle mode */ | 704 | /* revert to selected idle mode */ |
706 | if (!cs->cidmode) { | 705 | if (!cs->cidmode) { |
707 | cs->at_state.pending_commands |= PC_UMMODE; | 706 | cs->at_state.pending_commands |= PC_UMMODE; |
707 | gig_dbg(DEBUG_EVENT, "Scheduling PC_UMMODE"); | ||
708 | cs->commands_pending = 1; | 708 | cs->commands_pending = 1; |
709 | gig_dbg(DEBUG_CMD, "Scheduling PC_UMMODE"); | ||
710 | } | 709 | } |
711 | spin_unlock_irqrestore(&cs->lock, flags); | 710 | spin_unlock_irqrestore(&cs->lock, flags); |
712 | 711 | ||
@@ -784,15 +783,15 @@ static void init_failed(struct cardstate *cs, int mode) | |||
784 | static void schedule_init(struct cardstate *cs, int state) | 783 | static void schedule_init(struct cardstate *cs, int state) |
785 | { | 784 | { |
786 | if (cs->at_state.pending_commands & PC_INIT) { | 785 | if (cs->at_state.pending_commands & PC_INIT) { |
787 | gig_dbg(DEBUG_CMD, "not scheduling PC_INIT again"); | 786 | gig_dbg(DEBUG_EVENT, "not scheduling PC_INIT again"); |
788 | return; | 787 | return; |
789 | } | 788 | } |
790 | cs->mstate = state; | 789 | cs->mstate = state; |
791 | cs->mode = M_UNKNOWN; | 790 | cs->mode = M_UNKNOWN; |
792 | gigaset_block_channels(cs); | 791 | gigaset_block_channels(cs); |
793 | cs->at_state.pending_commands |= PC_INIT; | 792 | cs->at_state.pending_commands |= PC_INIT; |
793 | gig_dbg(DEBUG_EVENT, "Scheduling PC_INIT"); | ||
794 | cs->commands_pending = 1; | 794 | cs->commands_pending = 1; |
795 | gig_dbg(DEBUG_CMD, "Scheduling PC_INIT"); | ||
796 | } | 795 | } |
797 | 796 | ||
798 | /* Add "AT" to a command, add the cid, dle encode it, send the result to the | 797 | /* Add "AT" to a command, add the cid, dle encode it, send the result to the |
@@ -923,7 +922,7 @@ static void start_dial(struct at_state_t *at_state, void *data, | |||
923 | } | 922 | } |
924 | 923 | ||
925 | at_state->pending_commands |= PC_CID; | 924 | at_state->pending_commands |= PC_CID; |
926 | gig_dbg(DEBUG_CMD, "Scheduling PC_CID"); | 925 | gig_dbg(DEBUG_EVENT, "Scheduling PC_CID"); |
927 | cs->commands_pending = 1; | 926 | cs->commands_pending = 1; |
928 | return; | 927 | return; |
929 | 928 | ||
@@ -933,7 +932,7 @@ error: | |||
933 | commands[i] = NULL; | 932 | commands[i] = NULL; |
934 | } | 933 | } |
935 | at_state->pending_commands |= PC_NOCID; | 934 | at_state->pending_commands |= PC_NOCID; |
936 | gig_dbg(DEBUG_CMD, "Scheduling PC_NOCID"); | 935 | gig_dbg(DEBUG_EVENT, "Scheduling PC_NOCID"); |
937 | cs->commands_pending = 1; | 936 | cs->commands_pending = 1; |
938 | return; | 937 | return; |
939 | } | 938 | } |
@@ -955,7 +954,7 @@ static void start_accept(struct at_state_t *at_state) | |||
955 | dev_err(at_state->cs->dev, "out of memory\n"); | 954 | dev_err(at_state->cs->dev, "out of memory\n"); |
956 | /* error reset */ | 955 | /* error reset */ |
957 | at_state->pending_commands |= PC_HUP; | 956 | at_state->pending_commands |= PC_HUP; |
958 | gig_dbg(DEBUG_CMD, "Scheduling PC_HUP"); | 957 | gig_dbg(DEBUG_EVENT, "Scheduling PC_HUP"); |
959 | cs->commands_pending = 1; | 958 | cs->commands_pending = 1; |
960 | return; | 959 | return; |
961 | } | 960 | } |
@@ -964,7 +963,7 @@ static void start_accept(struct at_state_t *at_state) | |||
964 | snprintf(bcs->commands[AT_ISO], 9, "^SISO=%u\r", bcs->channel + 1); | 963 | snprintf(bcs->commands[AT_ISO], 9, "^SISO=%u\r", bcs->channel + 1); |
965 | 964 | ||
966 | at_state->pending_commands |= PC_ACCEPT; | 965 | at_state->pending_commands |= PC_ACCEPT; |
967 | gig_dbg(DEBUG_CMD, "Scheduling PC_ACCEPT"); | 966 | gig_dbg(DEBUG_EVENT, "Scheduling PC_ACCEPT"); |
968 | cs->commands_pending = 1; | 967 | cs->commands_pending = 1; |
969 | } | 968 | } |
970 | 969 | ||
@@ -1009,8 +1008,8 @@ static void do_shutdown(struct cardstate *cs) | |||
1009 | if (cs->mstate == MS_READY) { | 1008 | if (cs->mstate == MS_READY) { |
1010 | cs->mstate = MS_SHUTDOWN; | 1009 | cs->mstate = MS_SHUTDOWN; |
1011 | cs->at_state.pending_commands |= PC_SHUTDOWN; | 1010 | cs->at_state.pending_commands |= PC_SHUTDOWN; |
1011 | gig_dbg(DEBUG_EVENT, "Scheduling PC_SHUTDOWN"); | ||
1012 | cs->commands_pending = 1; | 1012 | cs->commands_pending = 1; |
1013 | gig_dbg(DEBUG_CMD, "Scheduling PC_SHUTDOWN"); | ||
1014 | } else | 1013 | } else |
1015 | finish_shutdown(cs); | 1014 | finish_shutdown(cs); |
1016 | } | 1015 | } |
@@ -1191,8 +1190,8 @@ static void do_action(int action, struct cardstate *cs, | |||
1191 | } | 1190 | } |
1192 | spin_unlock_irqrestore(&cs->lock, flags); | 1191 | spin_unlock_irqrestore(&cs->lock, flags); |
1193 | cs->at_state.pending_commands |= PC_CIDMODE; | 1192 | cs->at_state.pending_commands |= PC_CIDMODE; |
1193 | gig_dbg(DEBUG_EVENT, "Scheduling PC_CIDMODE"); | ||
1194 | cs->commands_pending = 1; | 1194 | cs->commands_pending = 1; |
1195 | gig_dbg(DEBUG_CMD, "Scheduling PC_CIDMODE"); | ||
1196 | break; | 1195 | break; |
1197 | case ACT_FAILINIT: | 1196 | case ACT_FAILINIT: |
1198 | dev_warn(cs->dev, "Could not initialize the device.\n"); | 1197 | dev_warn(cs->dev, "Could not initialize the device.\n"); |
@@ -1443,7 +1442,7 @@ static void do_action(int action, struct cardstate *cs, | |||
1443 | case ACT_GOTVER: | 1442 | case ACT_GOTVER: |
1444 | if (cs->gotfwver == 0) { | 1443 | if (cs->gotfwver == 0) { |
1445 | cs->gotfwver = 1; | 1444 | cs->gotfwver = 1; |
1446 | gig_dbg(DEBUG_ANY, | 1445 | gig_dbg(DEBUG_EVENT, |
1447 | "firmware version %02d.%03d.%02d.%02d", | 1446 | "firmware version %02d.%03d.%02d.%02d", |
1448 | cs->fwver[0], cs->fwver[1], | 1447 | cs->fwver[0], cs->fwver[1], |
1449 | cs->fwver[2], cs->fwver[3]); | 1448 | cs->fwver[2], cs->fwver[3]); |
@@ -1481,8 +1480,8 @@ static void do_action(int action, struct cardstate *cs, | |||
1481 | break; | 1480 | break; |
1482 | case ACT_HUP: | 1481 | case ACT_HUP: |
1483 | at_state->pending_commands |= PC_HUP; | 1482 | at_state->pending_commands |= PC_HUP; |
1483 | gig_dbg(DEBUG_EVENT, "Scheduling PC_HUP"); | ||
1484 | cs->commands_pending = 1; | 1484 | cs->commands_pending = 1; |
1485 | gig_dbg(DEBUG_CMD, "Scheduling PC_HUP"); | ||
1486 | break; | 1485 | break; |
1487 | 1486 | ||
1488 | /* hotplug events */ | 1487 | /* hotplug events */ |
@@ -1519,10 +1518,10 @@ static void do_action(int action, struct cardstate *cs, | |||
1519 | cs->cidmode = ev->parameter; | 1518 | cs->cidmode = ev->parameter; |
1520 | if (ev->parameter) { | 1519 | if (ev->parameter) { |
1521 | cs->at_state.pending_commands |= PC_CIDMODE; | 1520 | cs->at_state.pending_commands |= PC_CIDMODE; |
1522 | gig_dbg(DEBUG_CMD, "Scheduling PC_CIDMODE"); | 1521 | gig_dbg(DEBUG_EVENT, "Scheduling PC_CIDMODE"); |
1523 | } else { | 1522 | } else { |
1524 | cs->at_state.pending_commands |= PC_UMMODE; | 1523 | cs->at_state.pending_commands |= PC_UMMODE; |
1525 | gig_dbg(DEBUG_CMD, "Scheduling PC_UMMODE"); | 1524 | gig_dbg(DEBUG_EVENT, "Scheduling PC_UMMODE"); |
1526 | } | 1525 | } |
1527 | cs->commands_pending = 1; | 1526 | cs->commands_pending = 1; |
1528 | } | 1527 | } |
@@ -1573,6 +1572,8 @@ static void process_event(struct cardstate *cs, struct event_t *ev) | |||
1573 | if (ev->cid >= 0) { | 1572 | if (ev->cid >= 0) { |
1574 | at_state = at_state_from_cid(cs, ev->cid); | 1573 | at_state = at_state_from_cid(cs, ev->cid); |
1575 | if (!at_state) { | 1574 | if (!at_state) { |
1575 | gig_dbg(DEBUG_EVENT, "event %d for invalid cid %d", | ||
1576 | ev->type, ev->cid); | ||
1576 | gigaset_add_event(cs, &cs->at_state, RSP_WRONG_CID, | 1577 | gigaset_add_event(cs, &cs->at_state, RSP_WRONG_CID, |
1577 | NULL, 0, NULL); | 1578 | NULL, 0, NULL); |
1578 | return; | 1579 | return; |
@@ -1580,13 +1581,13 @@ static void process_event(struct cardstate *cs, struct event_t *ev) | |||
1580 | } else { | 1581 | } else { |
1581 | at_state = ev->at_state; | 1582 | at_state = ev->at_state; |
1582 | if (at_state_invalid(cs, at_state)) { | 1583 | if (at_state_invalid(cs, at_state)) { |
1583 | gig_dbg(DEBUG_ANY, "event for invalid at_state %p", | 1584 | gig_dbg(DEBUG_EVENT, "event for invalid at_state %p", |
1584 | at_state); | 1585 | at_state); |
1585 | return; | 1586 | return; |
1586 | } | 1587 | } |
1587 | } | 1588 | } |
1588 | 1589 | ||
1589 | gig_dbg(DEBUG_CMD, "connection state %d, event %d", | 1590 | gig_dbg(DEBUG_EVENT, "connection state %d, event %d", |
1590 | at_state->ConState, ev->type); | 1591 | at_state->ConState, ev->type); |
1591 | 1592 | ||
1592 | bcs = at_state->bcs; | 1593 | bcs = at_state->bcs; |
@@ -1600,11 +1601,11 @@ static void process_event(struct cardstate *cs, struct event_t *ev) | |||
1600 | if (ev->parameter != at_state->timer_index | 1601 | if (ev->parameter != at_state->timer_index |
1601 | || !at_state->timer_active) { | 1602 | || !at_state->timer_active) { |
1602 | ev->type = RSP_NONE; /* old timeout */ | 1603 | ev->type = RSP_NONE; /* old timeout */ |
1603 | gig_dbg(DEBUG_ANY, "old timeout"); | 1604 | gig_dbg(DEBUG_EVENT, "old timeout"); |
1604 | } else if (!at_state->waiting) | 1605 | } else if (!at_state->waiting) |
1605 | gig_dbg(DEBUG_ANY, "timeout occurred"); | 1606 | gig_dbg(DEBUG_EVENT, "timeout occurred"); |
1606 | else | 1607 | else |
1607 | gig_dbg(DEBUG_ANY, "stopped waiting"); | 1608 | gig_dbg(DEBUG_EVENT, "stopped waiting"); |
1608 | } | 1609 | } |
1609 | spin_unlock_irqrestore(&cs->lock, flags); | 1610 | spin_unlock_irqrestore(&cs->lock, flags); |
1610 | 1611 | ||
@@ -1712,11 +1713,11 @@ static void process_command_flags(struct cardstate *cs) | |||
1712 | cs->commands_pending = 0; | 1713 | cs->commands_pending = 0; |
1713 | 1714 | ||
1714 | if (cs->cur_at_seq) { | 1715 | if (cs->cur_at_seq) { |
1715 | gig_dbg(DEBUG_CMD, "not searching scheduled commands: busy"); | 1716 | gig_dbg(DEBUG_EVENT, "not searching scheduled commands: busy"); |
1716 | return; | 1717 | return; |
1717 | } | 1718 | } |
1718 | 1719 | ||
1719 | gig_dbg(DEBUG_CMD, "searching scheduled commands"); | 1720 | gig_dbg(DEBUG_EVENT, "searching scheduled commands"); |
1720 | 1721 | ||
1721 | sequence = SEQ_NONE; | 1722 | sequence = SEQ_NONE; |
1722 | 1723 | ||
@@ -1857,7 +1858,7 @@ static void process_command_flags(struct cardstate *cs) | |||
1857 | switch (cs->mode) { | 1858 | switch (cs->mode) { |
1858 | case M_UNIMODEM: | 1859 | case M_UNIMODEM: |
1859 | cs->at_state.pending_commands |= PC_CIDMODE; | 1860 | cs->at_state.pending_commands |= PC_CIDMODE; |
1860 | gig_dbg(DEBUG_CMD, "Scheduling PC_CIDMODE"); | 1861 | gig_dbg(DEBUG_EVENT, "Scheduling PC_CIDMODE"); |
1861 | cs->commands_pending = 1; | 1862 | cs->commands_pending = 1; |
1862 | return; | 1863 | return; |
1863 | #ifdef GIG_MAYINITONDIAL | 1864 | #ifdef GIG_MAYINITONDIAL |
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index c9ccf7de2275..1875ab80b335 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h | |||
@@ -78,9 +78,10 @@ enum debuglevel { | |||
78 | DEBUG_STREAM = 0x00040, /* application data stream I/O events */ | 78 | DEBUG_STREAM = 0x00040, /* application data stream I/O events */ |
79 | DEBUG_STREAM_DUMP = 0x00080, /* application data stream content */ | 79 | DEBUG_STREAM_DUMP = 0x00080, /* application data stream content */ |
80 | DEBUG_LLDATA = 0x00100, /* sent/received LL data */ | 80 | DEBUG_LLDATA = 0x00100, /* sent/received LL data */ |
81 | DEBUG_EVENT = 0x00200, /* event processing */ | ||
81 | DEBUG_DRIVER = 0x00400, /* driver structure */ | 82 | DEBUG_DRIVER = 0x00400, /* driver structure */ |
82 | DEBUG_HDLC = 0x00800, /* M10x HDLC processing */ | 83 | DEBUG_HDLC = 0x00800, /* M10x HDLC processing */ |
83 | DEBUG_WRITE = 0x01000, /* M105 data write */ | 84 | DEBUG_CHANNEL = 0x01000, /* channel allocation/deallocation */ |
84 | DEBUG_TRANSCMD = 0x02000, /* AT-COMMANDS+RESPONSES */ | 85 | DEBUG_TRANSCMD = 0x02000, /* AT-COMMANDS+RESPONSES */ |
85 | DEBUG_MCMD = 0x04000, /* COMMANDS THAT ARE SENT VERY OFTEN */ | 86 | DEBUG_MCMD = 0x04000, /* COMMANDS THAT ARE SENT VERY OFTEN */ |
86 | DEBUG_INIT = 0x08000, /* (de)allocation+initialization of data | 87 | DEBUG_INIT = 0x08000, /* (de)allocation+initialization of data |
@@ -785,8 +786,6 @@ static inline void gigaset_schedule_event(struct cardstate *cs) | |||
785 | static inline void gigaset_bchannel_down(struct bc_state *bcs) | 786 | static inline void gigaset_bchannel_down(struct bc_state *bcs) |
786 | { | 787 | { |
787 | gigaset_add_event(bcs->cs, &bcs->at_state, EV_BC_CLOSED, NULL, 0, NULL); | 788 | gigaset_add_event(bcs->cs, &bcs->at_state, EV_BC_CLOSED, NULL, 0, NULL); |
788 | |||
789 | gig_dbg(DEBUG_CMD, "scheduling BC_CLOSED"); | ||
790 | gigaset_schedule_event(bcs->cs); | 789 | gigaset_schedule_event(bcs->cs); |
791 | } | 790 | } |
792 | 791 | ||
@@ -795,8 +794,6 @@ static inline void gigaset_bchannel_down(struct bc_state *bcs) | |||
795 | static inline void gigaset_bchannel_up(struct bc_state *bcs) | 794 | static inline void gigaset_bchannel_up(struct bc_state *bcs) |
796 | { | 795 | { |
797 | gigaset_add_event(bcs->cs, &bcs->at_state, EV_BC_OPEN, NULL, 0, NULL); | 796 | gigaset_add_event(bcs->cs, &bcs->at_state, EV_BC_OPEN, NULL, 0, NULL); |
798 | |||
799 | gig_dbg(DEBUG_CMD, "scheduling BC_OPEN"); | ||
800 | gigaset_schedule_event(bcs->cs); | 797 | gigaset_schedule_event(bcs->cs); |
801 | } | 798 | } |
802 | 799 | ||
diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c index c129ee47a8fb..f0acb9dc9e33 100644 --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c | |||
@@ -216,7 +216,7 @@ static int command_from_LL(isdn_ctrl *cntrl) | |||
216 | return -EINVAL; | 216 | return -EINVAL; |
217 | 217 | ||
218 | case ISDN_CMD_DIAL: | 218 | case ISDN_CMD_DIAL: |
219 | gig_dbg(DEBUG_ANY, | 219 | gig_dbg(DEBUG_CMD, |
220 | "ISDN_CMD_DIAL (phone: %s, msn: %s, si1: %d, si2: %d)", | 220 | "ISDN_CMD_DIAL (phone: %s, msn: %s, si1: %d, si2: %d)", |
221 | cntrl->parm.setup.phone, cntrl->parm.setup.eazmsn, | 221 | cntrl->parm.setup.phone, cntrl->parm.setup.eazmsn, |
222 | cntrl->parm.setup.si1, cntrl->parm.setup.si2); | 222 | cntrl->parm.setup.si1, cntrl->parm.setup.si2); |
@@ -304,11 +304,10 @@ static int command_from_LL(isdn_ctrl *cntrl) | |||
304 | gigaset_free_channel(bcs); | 304 | gigaset_free_channel(bcs); |
305 | return -ENOMEM; | 305 | return -ENOMEM; |
306 | } | 306 | } |
307 | |||
308 | gig_dbg(DEBUG_CMD, "scheduling DIAL"); | ||
309 | gigaset_schedule_event(cs); | 307 | gigaset_schedule_event(cs); |
310 | break; | 308 | break; |
311 | case ISDN_CMD_ACCEPTD: | 309 | case ISDN_CMD_ACCEPTD: |
310 | gig_dbg(DEBUG_CMD, "ISDN_CMD_ACCEPTD"); | ||
312 | if (ch >= cs->channels) { | 311 | if (ch >= cs->channels) { |
313 | dev_err(cs->dev, | 312 | dev_err(cs->dev, |
314 | "ISDN_CMD_ACCEPTD: invalid channel (%d)\n", ch); | 313 | "ISDN_CMD_ACCEPTD: invalid channel (%d)\n", ch); |
@@ -318,14 +317,11 @@ static int command_from_LL(isdn_ctrl *cntrl) | |||
318 | if (!gigaset_add_event(cs, &bcs->at_state, | 317 | if (!gigaset_add_event(cs, &bcs->at_state, |
319 | EV_ACCEPT, NULL, 0, NULL)) | 318 | EV_ACCEPT, NULL, 0, NULL)) |
320 | return -ENOMEM; | 319 | return -ENOMEM; |
321 | |||
322 | gig_dbg(DEBUG_CMD, "scheduling ACCEPT"); | ||
323 | gigaset_schedule_event(cs); | 320 | gigaset_schedule_event(cs); |
324 | 321 | ||
325 | break; | 322 | break; |
326 | case ISDN_CMD_ACCEPTB: | ||
327 | break; | ||
328 | case ISDN_CMD_HANGUP: | 323 | case ISDN_CMD_HANGUP: |
324 | gig_dbg(DEBUG_CMD, "ISDN_CMD_HANGUP"); | ||
329 | if (ch >= cs->channels) { | 325 | if (ch >= cs->channels) { |
330 | dev_err(cs->dev, | 326 | dev_err(cs->dev, |
331 | "ISDN_CMD_HANGUP: invalid channel (%d)\n", ch); | 327 | "ISDN_CMD_HANGUP: invalid channel (%d)\n", ch); |
@@ -335,8 +331,6 @@ static int command_from_LL(isdn_ctrl *cntrl) | |||
335 | if (!gigaset_add_event(cs, &bcs->at_state, | 331 | if (!gigaset_add_event(cs, &bcs->at_state, |
336 | EV_HUP, NULL, 0, NULL)) | 332 | EV_HUP, NULL, 0, NULL)) |
337 | return -ENOMEM; | 333 | return -ENOMEM; |
338 | |||
339 | gig_dbg(DEBUG_CMD, "scheduling HUP"); | ||
340 | gigaset_schedule_event(cs); | 334 | gigaset_schedule_event(cs); |
341 | 335 | ||
342 | break; | 336 | break; |
@@ -376,6 +370,7 @@ static int command_from_LL(isdn_ctrl *cntrl) | |||
376 | } | 370 | } |
377 | break; | 371 | break; |
378 | case ISDN_CMD_SETL3: /* Set L3 to given protocol */ | 372 | case ISDN_CMD_SETL3: /* Set L3 to given protocol */ |
373 | gig_dbg(DEBUG_CMD, "ISDN_CMD_SETL3"); | ||
379 | if (ch >= cs->channels) { | 374 | if (ch >= cs->channels) { |
380 | dev_err(cs->dev, | 375 | dev_err(cs->dev, |
381 | "ISDN_CMD_SETL3: invalid channel (%d)\n", ch); | 376 | "ISDN_CMD_SETL3: invalid channel (%d)\n", ch); |
@@ -390,44 +385,9 @@ static int command_from_LL(isdn_ctrl *cntrl) | |||
390 | } | 385 | } |
391 | 386 | ||
392 | break; | 387 | break; |
393 | case ISDN_CMD_PROCEED: | 388 | |
394 | gig_dbg(DEBUG_ANY, "ISDN_CMD_PROCEED"); | ||
395 | break; | ||
396 | case ISDN_CMD_ALERT: | ||
397 | gig_dbg(DEBUG_ANY, "ISDN_CMD_ALERT"); | ||
398 | if (cntrl->arg >= cs->channels) { | ||
399 | dev_err(cs->dev, | ||
400 | "ISDN_CMD_ALERT: invalid channel (%d)\n", | ||
401 | (int) cntrl->arg); | ||
402 | return -EINVAL; | ||
403 | } | ||
404 | break; | ||
405 | case ISDN_CMD_REDIR: | ||
406 | gig_dbg(DEBUG_ANY, "ISDN_CMD_REDIR"); | ||
407 | break; | ||
408 | case ISDN_CMD_PROT_IO: | ||
409 | gig_dbg(DEBUG_ANY, "ISDN_CMD_PROT_IO"); | ||
410 | break; | ||
411 | case ISDN_CMD_FAXCMD: | ||
412 | gig_dbg(DEBUG_ANY, "ISDN_CMD_FAXCMD"); | ||
413 | break; | ||
414 | case ISDN_CMD_GETL2: | ||
415 | gig_dbg(DEBUG_ANY, "ISDN_CMD_GETL2"); | ||
416 | break; | ||
417 | case ISDN_CMD_GETL3: | ||
418 | gig_dbg(DEBUG_ANY, "ISDN_CMD_GETL3"); | ||
419 | break; | ||
420 | case ISDN_CMD_GETEAZ: | ||
421 | gig_dbg(DEBUG_ANY, "ISDN_CMD_GETEAZ"); | ||
422 | break; | ||
423 | case ISDN_CMD_SETSIL: | ||
424 | gig_dbg(DEBUG_ANY, "ISDN_CMD_SETSIL"); | ||
425 | break; | ||
426 | case ISDN_CMD_GETSIL: | ||
427 | gig_dbg(DEBUG_ANY, "ISDN_CMD_GETSIL"); | ||
428 | break; | ||
429 | default: | 389 | default: |
430 | dev_err(cs->dev, "unknown command %d from LL\n", | 390 | gig_dbg(DEBUG_CMD, "unknown command %d from LL", |
431 | cntrl->command); | 391 | cntrl->command); |
432 | return -EINVAL; | 392 | return -EINVAL; |
433 | } | 393 | } |
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index d2260b0055fc..a1bcbc21ff71 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -45,8 +45,6 @@ static int if_lock(struct cardstate *cs, int *arg) | |||
45 | cs->waiting = 0; | 45 | cs->waiting = 0; |
46 | return -ENOMEM; | 46 | return -ENOMEM; |
47 | } | 47 | } |
48 | |||
49 | gig_dbg(DEBUG_CMD, "scheduling IF_LOCK"); | ||
50 | gigaset_schedule_event(cs); | 48 | gigaset_schedule_event(cs); |
51 | 49 | ||
52 | wait_event(cs->waitqueue, !cs->waiting); | 50 | wait_event(cs->waitqueue, !cs->waiting); |
@@ -81,8 +79,6 @@ static int if_version(struct cardstate *cs, unsigned arg[4]) | |||
81 | cs->waiting = 0; | 79 | cs->waiting = 0; |
82 | return -ENOMEM; | 80 | return -ENOMEM; |
83 | } | 81 | } |
84 | |||
85 | gig_dbg(DEBUG_CMD, "scheduling IF_VER"); | ||
86 | gigaset_schedule_event(cs); | 82 | gigaset_schedule_event(cs); |
87 | 83 | ||
88 | wait_event(cs->waitqueue, !cs->waiting); | 84 | wait_event(cs->waitqueue, !cs->waiting); |
@@ -274,7 +270,7 @@ static int if_ioctl(struct tty_struct *tty, struct file *file, | |||
274 | ? -EFAULT : 0; | 270 | ? -EFAULT : 0; |
275 | break; | 271 | break; |
276 | default: | 272 | default: |
277 | gig_dbg(DEBUG_ANY, "%s: arg not supported - 0x%04x", | 273 | gig_dbg(DEBUG_IF, "%s: arg not supported - 0x%04x", |
278 | __func__, cmd); | 274 | __func__, cmd); |
279 | retval = -ENOIOCTLCMD; | 275 | retval = -ENOIOCTLCMD; |
280 | } | 276 | } |
@@ -455,7 +451,7 @@ static void if_throttle(struct tty_struct *tty) | |||
455 | else if (!cs->open_count) | 451 | else if (!cs->open_count) |
456 | dev_warn(cs->dev, "%s: device not opened\n", __func__); | 452 | dev_warn(cs->dev, "%s: device not opened\n", __func__); |
457 | else | 453 | else |
458 | gig_dbg(DEBUG_ANY, "%s: not implemented\n", __func__); | 454 | gig_dbg(DEBUG_IF, "%s: not implemented\n", __func__); |
459 | 455 | ||
460 | mutex_unlock(&cs->mutex); | 456 | mutex_unlock(&cs->mutex); |
461 | } | 457 | } |
@@ -479,7 +475,7 @@ static void if_unthrottle(struct tty_struct *tty) | |||
479 | else if (!cs->open_count) | 475 | else if (!cs->open_count) |
480 | dev_warn(cs->dev, "%s: device not opened\n", __func__); | 476 | dev_warn(cs->dev, "%s: device not opened\n", __func__); |
481 | else | 477 | else |
482 | gig_dbg(DEBUG_ANY, "%s: not implemented\n", __func__); | 478 | gig_dbg(DEBUG_IF, "%s: not implemented\n", __func__); |
483 | 479 | ||
484 | mutex_unlock(&cs->mutex); | 480 | mutex_unlock(&cs->mutex); |
485 | } | 481 | } |
@@ -630,7 +626,7 @@ void gigaset_if_receive(struct cardstate *cs, | |||
630 | spin_lock_irqsave(&cs->lock, flags); | 626 | spin_lock_irqsave(&cs->lock, flags); |
631 | tty = cs->tty; | 627 | tty = cs->tty; |
632 | if (tty == NULL) | 628 | if (tty == NULL) |
633 | gig_dbg(DEBUG_ANY, "receive on closed device"); | 629 | gig_dbg(DEBUG_IF, "receive on closed device"); |
634 | else { | 630 | else { |
635 | tty_buffer_request_room(tty, len); | 631 | tty_buffer_request_room(tty, len); |
636 | tty_insert_flip_string(tty, buffer, len); | 632 | tty_insert_flip_string(tty, buffer, len); |
diff --git a/drivers/isdn/gigaset/proc.c b/drivers/isdn/gigaset/proc.c index 758a00c1d2e2..b69f73a0668f 100644 --- a/drivers/isdn/gigaset/proc.c +++ b/drivers/isdn/gigaset/proc.c | |||
@@ -48,8 +48,6 @@ static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr, | |||
48 | mutex_unlock(&cs->mutex); | 48 | mutex_unlock(&cs->mutex); |
49 | return -ENOMEM; | 49 | return -ENOMEM; |
50 | } | 50 | } |
51 | |||
52 | gig_dbg(DEBUG_CMD, "scheduling PROC_CIDMODE"); | ||
53 | gigaset_schedule_event(cs); | 51 | gigaset_schedule_event(cs); |
54 | 52 | ||
55 | wait_event(cs->waitqueue, !cs->waiting); | 53 | wait_event(cs->waitqueue, !cs->waiting); |
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index 3ab1daeb276b..9430a2bbb523 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c | |||
@@ -628,7 +628,7 @@ static int write_modem(struct cardstate *cs) | |||
628 | struct usb_cardstate *ucs = cs->hw.usb; | 628 | struct usb_cardstate *ucs = cs->hw.usb; |
629 | unsigned long flags; | 629 | unsigned long flags; |
630 | 630 | ||
631 | gig_dbg(DEBUG_WRITE, "len: %d...", bcs->tx_skb->len); | 631 | gig_dbg(DEBUG_OUTPUT, "len: %d...", bcs->tx_skb->len); |
632 | 632 | ||
633 | if (!bcs->tx_skb->len) { | 633 | if (!bcs->tx_skb->len) { |
634 | dev_kfree_skb_any(bcs->tx_skb); | 634 | dev_kfree_skb_any(bcs->tx_skb); |