gigaset: patches for 2.6.34
Subsystems (3)
cover gigaset: patches for 2.6.34
Karsten, David,
following are four patches to the Gigaset driver I'd like you to forward for merging into kernel release 2.6.34.
Thanks,
Tilman
Andy Shevchenko (1):
isdn: remove ishexdigit() in regard to isxdigit()
Tilman Schmidt (3):
gigaset: small documentation improvement
bas_gigaset: collapse CR/LF at end of AT response
gigaset: reduce syslog clutter
Documentation/isdn/README.gigaset | 10 ++--- drivers/isdn/gigaset/asyncdata.c | 6 ++- drivers/isdn/gigaset/bas-gigaset.c | 18 +++------- drivers/isdn/gigaset/capi.c | 31 ++---------------- drivers/isdn/gigaset/common.c | 49 +++++++++++----------------- drivers/isdn/gigaset/ev-layer.c | 63 ++++++++++++++++++------------------- drivers/isdn/gigaset/gigaset.h | 11 ++---- drivers/isdn/gigaset/i4l.c | 52 +++--------------------------- drivers/isdn/gigaset/interface.c | 12 ++----- drivers/isdn/gigaset/isocdata.c | 44 ++++++++++++++++++------- drivers/isdn/gigaset/proc.c | 2 - drivers/isdn/gigaset/usb-gigaset.c | 2 -
PATCH 1/4 gigaset: small documentation improvement
From: Tilman Schmidt <[email protected]>
Subject: [PATCH 1/4] gigaset: small documentation improvement
Clarify the non-support by isdnlog, and propose a better standard debug mask.
Impact: Documentation
--- Documentation/isdn/README.gigaset | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
Documentation/isdn/README.gigaset +5 -5
@@ -292,10 +292,10 @@ GigaSet 307x Device Driver to /etc/modprobe.d/gigaset, /etc/modprobe.conf.local or a similar file. Problem: - Your isdn script aborts with a message about isdnlog. + The isdnlog program emits error messages or just doesn't work. Solution: - Try deactivating (or commenting out) isdnlog. This driver does not - support it. + Isdnlog supports only the HiSax driver. Do not attempt to use it with + other drivers such as Gigaset. Problem: You have two or more DECT data adapters (M101/M105) and only the
@@ -321,8 +321,8 @@ GigaSet 307x Device Driver writing an appropriate value to /sys/module/gigaset/parameters/debug, e.g. echo 0 > /sys/module/gigaset/parameters/debug switches off debugging output completely, - echo 0x10a020 > /sys/module/gigaset/parameters/debug - enables the standard set of debugging output messages. These values are + echo 0x302020 > /sys/module/gigaset/parameters/debug + enables a reasonable set of debugging output messages. These values are bit patterns where every bit controls a certain type of debugging output. See the constants DEBUG_* in the source file gigaset.h for details.
Signature · 1 line
1.6.5.3.298.g39add
PATCH 2/4 bas_gigaset: collapse CR/LF at end of AT response
In reply to Tilman SchmidtFrom: Tilman Schmidt <[email protected]>
Subject: [PATCH 2/4] bas_gigaset: collapse CR/LF at end of AT response
Copy the mechanism from ser_/usb_gigaset to avoid producing spurious empty responses for CR/LF sequences from the device. Add a comment in all drivers documenting that behaviour. Correct an off by one error that might result in a one byte buffer overflow when receiving an unexpectedly long reply.
Impact: minor bugfix
--- drivers/isdn/gigaset/asyncdata.c | 2 + drivers/isdn/gigaset/gigaset.h | 4 +- drivers/isdn/gigaset/isocdata.c | 44 ++++++++++++++++++++++++++----------- 3 files changed, 35 insertions(+), 15 deletions(-)
drivers/isdn/gigaset/asyncdata.c +2 -0
@@ -40,6 +40,8 @@ static inline int muststuff(unsigned char c)* Append received bytes to the command response buffer and forward them * line by line to the response handler. Exit whenever a mode/state change * might have occurred. +* Note: Received lines may be terminated by CR, LF, or CR LF, which will be +* removed before passing the line to the response handler. * Return value: * number of processed bytes */
drivers/isdn/gigaset/gigaset.h +2 -2
@@ -38,7 +38,7 @@#define GIG_COMPAT {0, 4, 0, 0}#define MAX_REC_PARAMS 10/* Max. number of params in response string */ -#define MAX_RESP_SIZE 512/* Max. size of a response string */ +#define MAX_RESP_SIZE 511/* Max. size of a response string */ #define MAX_EVENTS 64/* size of event queue */
@@ -498,7 +498,7 @@ struct cardstate {spinlock_t ev_lock;/* current modem response */ -unsigned char respdata[MAX_RESP_SIZE ]; +unsigned char respdata[MAX_RESP_SIZE +1 ];unsigned cbytes;/* private data of hardware drivers */
drivers/isdn/gigaset/isocdata.c +31 -13
68 lines not on this page · raw message
Signature · 1 line
1.6.5.3.298.g39add
Re: [PATCH 2/4] bas_gigaset: collapse CR/LF at end of AT response
Quoted 73 lines · Tilman Schmidt
From: Tilman Schmidt <[email protected]>
Subject: [PATCH 2/4]bas_gigaset: collapse CR/LF at end of AT responseCopy the mechanism from ser_/usb_gigaset to avoid producing spurious empty responses for CR/LF sequences from the device. Add a comment in all drivers documenting that behaviour. Correct an off by one error that might result in a one byte buffer overflow when receiving an unexpectedly long reply.
Impact: minor bugfix
Signed-off-by Tilman Schmidt <[email protected]>--- drivers/isdn/gigaset/asyncdata.c | 2 + drivers/isdn/gigaset/gigaset.h | 4 +- drivers/isdn/gigaset/isocdata.c | 44 ++++++++++++++++++++++++++----------- 3 files changed, 35 insertions(+), 15 deletions(-)drivers/isdn/gigaset/asyncdata.c +2
-0@@ -40,6 +40,8 @@ static inline int muststuff(unsigned char c)* Append received bytes to the command response buffer and forward them * line by line to the response handler. Exit whenever a mode/state change * might have occurred. +* Note: Received lines may be terminated by CR, LF, or CR LF, which will be +* removed before passing the line to the response handler. * Return value: * number of processed bytes */ drivers/isdn/gigaset/gigaset.h +2
-2@@ -38,7 +38,7 @@#define GIG_COMPAT {0, 4, 0, 0}#define MAX_REC_PARAMS 10/* Max. number of params in response string */ -#define MAX_RESP_SIZE 512/* Max. size of a response string */ +#define MAX_RESP_SIZE 511/* Max. size of a response string */ #define MAX_EVENTS 64/* size of event queue */ @@ -498,7 +498,7 @@ struct cardstate {spinlock_t ev_lock;/* current modem response */ -unsigned char respdata[MAX_RESP_SIZE ]; +unsigned char respdata[MAX_RESP_SIZE +1 ];unsigned cbytes;/* private data of hardware drivers */ drivers/isdn/gigaset/isocdata.c +7
-0@@ -905,29 +905,49 @@ void gigaset_isoc_receive(unsigned char *src, unsigned count,/* == data input =========================================================== */ +/* process a block of received bytes in command mode (mstate != MS_LOCKED) +* Append received bytes to the command response buffer and forward them +* line by line to the response handler. +* Note: Received lines may be terminated by CR, LF, or CR LF, which will be +* removed before passing the line to the response handler. +*/ static void cmd_loop (unsigned char *src,int numbytes,struct inbuf_t *inbuf) {struct cardstate *cs = inbuf->cs;unsigned cbytes = cs->cbytes; +unsigned char c;while (numbytes--) {
drivers/isdn/gigaset/isocdata.c void gigaset_isoc_receive(unsigned char *src, unsigned count, · line 921
Quoted 10 lines
drivers/isdn/gigaset/isocdata.c +2
-7-/* copy next character, check for end of line */ -switch (cs->respdata[cbytes] = *src++) { -case '\r' : + c = *src++; +switch (c) {case '\n' : -/* end of line */ -gig_dbg (DEBUG_TRANSCMD ,"%s: End of Command (%d Bytes)" , - __func__, cbytes); -if (cbytes >=MAX_RESP_SIZE -1 )
I am confused about what the value of MAX_RESP_SIZE means. Is it a hw restriction?
It seems that up to MAX_RESP_SIZE of string-data is permitted if the line is terminated by CR. But only MAX_RESP_SIZE -1 bytes if the line is terminated by LF or CR LF.
Quoted 43 lines
drivers/isdn/gigaset/isocdata.c +22
-6-dev_warn (cs->dev,"response too large\n" ); +if (cbytes ==0 && cs->respdata[0 ] =='\r' ) { +/* collapse LF with preceding CR */ + cs->respdata[0 ] =0 ; +break ; + } +/* --v-- fall through --v-- */ +case '\r' : +/* end of message line, pass to response handler */ +if (cbytes >=MAX_RESP_SIZE ) { +dev_warn (cs->dev,"response too large (%d)\n" , + cbytes); + cbytes =MAX_RESP_SIZE ; + } cs->cbytes = cbytes; +gigaset_dbg_buffer (DEBUG_TRANSCMD ,"received response" , + cbytes, cs->respdata);gigaset_handle_modem_response (cs); cbytes =0 ; + +/* store EOL byte for CRLF collapsing */ + cs->respdata[0 ] = c;break ;default : -/* advance in line buffer, checking for overflow */ -if (cbytes <MAX_RESP_SIZE -1 ) - cbytes++; +/* append to line buffer if possible */ +if (cbytes <MAX_RESP_SIZE ) + cs->respdata[cbytes] = c; + cbytes++; } }@@ -958,8 +978,6 @@ void gigaset_isoc_input(struct inbuf_t *inbuf) numbytes, src);gigaset_if_receive (inbuf->cs, src, numbytes); }else { -gigaset_dbg_buffer (DEBUG_CMD ,"received response" , - numbytes, src);cmd_loop (src, numbytes, inbuf); }
Re: [PATCH 2/4] bas_gigaset: collapse CR/LF at end of AT response
Quoted 2 lines · Simon Horman
I am confused about what the value of
MAX_RESP_SIZEmeans. Is it a hw restriction?
It's an arbitrary limitation in the driver. The hardware specification says nothing about the possible length of AT responses from the device, so we had to draw a line somewhere. 512 bytes have so far proved to be amply sufficient.
In practice, the limit is only hit with the M10x devices (which transmit commands and data over the same channel) when the state machine gets out of sync and tries to interpret received payload data as AT responses.
Quoted 3 lines
It seems that up to
MAX_RESP_SIZEof string-data is permitted if the line is terminated by CR. But onlyMAX_RESP_SIZE-1 bytes if the line is terminated by LF or CR LF.
Note that when storing the CR in cs->respdata[0] for possible collapsing with a subsequent LF, the cbytes counter is left at 0, so the CR gets overwritten by the first character of the next response if there's no intervening LF.
Thanks for reviewing,
Tilman
Re: [PATCH 2/4] bas_gigaset: collapse CR/LF at end of AT response
Quoted 4 lines · Tilman Schmidt
Quoted 2 lines · Simon Horman
I am confused about what the value of
MAX_RESP_SIZEmeans. Is it a hw restriction?
Quoted 8 lines
It's an arbitrary limitation in the driver. The hardware specification says nothing about the possible length of AT responses from the device, so we had to draw a line somewhere. 512 bytes have so far proved to be amply sufficient.
In practice, the limit is only hit with the M10x devices (which transmit commands and data over the same channel) when the state machine gets out of sync and tries to interpret received payload data as AT responses.
Ok, understood. Thanks for the clarification.
Quoted 8 lines
Quoted 3 lines
It seems that up to
MAX_RESP_SIZEof string-data is permitted if the line is terminated by CR. But onlyMAX_RESP_SIZE-1 bytes if the line is terminated by LF or CR LF.Note that when storing the CR in cs->respdata[0] for possible collapsing with a subsequent LF, the cbytes counter is left at 0, so the CR gets overwritten by the first character of the next response if there's no intervening LF.
Yes, I had to look at that for quite a while :-)
PATCH 3/4 gigaset: reduce syslog clutter
In reply to Tilman SchmidtFrom: Tilman Schmidt <[email protected]>
Subject: [PATCH 3/4] gigaset: reduce syslog clutter
Improve readability of the Gigaset driver's kernel messages by removing a few unnecessary messages and limiting the emission of some debug messages more narrowly.
Impact: logging
--- drivers/isdn/gigaset/asyncdata.c | 4 +- drivers/isdn/gigaset/bas-gigaset.c | 18 +++------- drivers/isdn/gigaset/capi.c | 15 ++------ drivers/isdn/gigaset/common.c | 49 +++++++++++---------------- drivers/isdn/gigaset/ev-layer.c | 63 ++++++++++++++++++----------------- drivers/isdn/gigaset/gigaset.h | 7 +--- drivers/isdn/gigaset/i4l.c | 52 +++-------------------------- drivers/isdn/gigaset/interface.c | 12 ++---- drivers/isdn/gigaset/proc.c | 2 - drivers/isdn/gigaset/usb-gigaset.c | 2 +- 10 files changed, 77 insertions(+), 147 deletions(-)
drivers/isdn/gigaset/asyncdata.c +2 -2
@@ -67,14 +67,14 @@ static unsigned cmd_loop(unsigned numbytes, struct inbuf_t *inbuf)/* --v-- fall through --v-- */ case '\r' :/* end of message line, pass to response handler */ -gig_dbg (DEBUG_TRANSCMD ,"%s: End of Message (%d Bytes)" , - __func__, cbytes);if (cbytes >=MAX_RESP_SIZE ) {dev_warn (cs->dev,"response too large (%d)\n" , cbytes); cbytes =MAX_RESP_SIZE ; } cs->cbytes = cbytes; +gigaset_dbg_buffer (DEBUG_TRANSCMD ,"received response" , + cbytes, cs->respdata);gigaset_handle_modem_response (cs); cbytes =0 ;
drivers/isdn/gigaset/bas-gigaset.c +6 -12
@@ -347,12 +347,7 @@ static inline void error_hangup(struct bc_state *bcs) {struct cardstate *cs = bcs->cs; -gig_dbg (DEBUG_ANY ,"%s: scheduling HUP for channel %d" , - __func__, bcs->channel); - -if (!gigaset_add_event (cs, &bcs->at_state,EV_HUP ,NULL ,0 ,NULL )) -dev_err (cs->dev,"event queue full\n" ); - +gigaset_add_event (cs, &bcs->at_state,EV_HUP ,NULL ,0 ,NULL );gigaset_schedule_event (cs); }
@@ -1706,8 +1701,7 @@ static void complete_cb(struct cardstate *cs)/* unqueue completed buffer */ cs->cmdbytes -= cs->curlen; -gig_dbg (DEBUG_TRANSCMD |DEBUG_LOCKCMD , -"write_command: sent %u bytes, %u left" , +gig_dbg (DEBUG_OUTPUT ,"write_command: sent %u bytes, %u left" , cs->curlen, cs->cmdbytes);if (cb->next !=NULL ) { cs->cmdbuf = cb->next;
@@ -1881,13 +1875,13 @@ static int start_cbsend(struct cardstate *cs)/* check if suspend requested */ if (ucs->basstate &BS_SUSPEND ) { -gig_dbg (DEBUG_TRANSCMD |DEBUG_LOCKCMD ,"suspending" ); +gig_dbg (DEBUG_OUTPUT ,"suspending" );return -EHOSTUNREACH ; }/* check if AT channel is open */ if (!(ucs->basstate &BS_ATOPEN )) { -gig_dbg (DEBUG_TRANSCMD |DEBUG_LOCKCMD ,"AT channel not open" ); +gig_dbg (DEBUG_OUTPUT ,"AT channel not open" ); rc =req_submit (cs->bcs,HD_OPEN_ATCHANNEL ,0 ,BAS_TIMEOUT );if (rc <0 ) {/* flush command queue */
@@ -2251,7 +2245,7 @@ static int gigaset_probe(struct usb_interface *interface,int i, j;int rc; -gig_dbg (DEBUG_ANY , +gig_dbg (DEBUG_INIT ,"%s: Check if device matches .. (Vendor: 0x%x, Product: 0x%x)" , __func__,le16_to_cpu (udev->descriptor.idVendor),le16_to_cpu (udev->descriptor.idProduct));
@@ -2259,7 +2253,7 @@ static int gigaset_probe(struct usb_interface *interface,/* set required alternate setting */ hostif = interface->cur_altsetting;if (hostif->desc.bAlternateSetting !=3 ) { -gig_dbg (DEBUG_ANY , +gig_dbg (DEBUG_INIT ,"%s: wrong alternate setting %d - trying to switch" , __func__, hostif->desc.bAlternateSetting); if (usb_set_interface(udev, hostif->desc.bInterfaceNumber, 3)
drivers/isdn/gigaset/capi.c +4 -11
@@ -1427,9 +1427,10 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,/* queue & schedule EV_DIAL event */ if (!gigaset_add_event (cs, &bcs->at_state,EV_DIAL , commands, - bcs->at_state.seq_index,NULL )) - goto oom; -gig_dbg (DEBUG_CMD ,"scheduling DIAL" ); + bcs->at_state.seq_index,NULL )) { + info =CAPI_MSGOSRESOURCEERR ; + goto error; + }gigaset_schedule_event (cs); ap->connected =APCONN_SETUP ;send_conf (iif, ap, skb, CapiSuccess);
@@ -1543,7 +1544,6 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif,if (!gigaset_add_event (cs, &cs->bcs[channel-1 ].at_state,EV_ACCEPT ,NULL ,0 ,NULL ))return ; -gig_dbg (DEBUG_CMD ,"scheduling ACCEPT" );gigaset_schedule_event (cs);return ;
@@ -1584,7 +1584,6 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif,if (!gigaset_add_event (cs, &cs->bcs[channel-1 ].at_state,EV_HUP ,NULL ,0 ,NULL ))return ; -gig_dbg (DEBUG_CMD ,"scheduling HUP" );gigaset_schedule_event (cs);return ; }
@@ -1667,11 +1666,9 @@ static void do_connect_b3_resp(struct gigaset_capi_ctr *iif,/* trigger hangup, causing eventual DISCONNECT_IND */ if (!gigaset_add_event (cs, &bcs->at_state,EV_HUP ,NULL ,0 ,NULL )) { -dev_err (cs->dev,"%s: out of memory\n" , __func__);dev_kfree_skb_any (skb);return ; } -gig_dbg (DEBUG_CMD ,"scheduling HUP" );gigaset_schedule_event (cs);/* emit DISCONNECT_B3_IND */
@@ -1770,11 +1767,9 @@ static void do_disconnect_req(struct gigaset_capi_ctr *iif,/* trigger hangup, causing eventual DISCONNECT_IND */ if (!gigaset_add_event (cs, &bcs->at_state,EV_HUP ,NULL ,0 ,NULL )) { -dev_err (cs->dev,"%s: out of memory\n" , __func__);send_conf (iif, ap, skb,CAPI_MSGOSRESOURCEERR );return ; } -gig_dbg (DEBUG_CMD ,"scheduling HUP" );gigaset_schedule_event (cs);/* emit reply */
@@ -1817,11 +1812,9 @@ static void do_disconnect_b3_req(struct gigaset_capi_ctr *iif,/* trigger hangup, causing eventual DISCONNECT_B3_IND */ if (!gigaset_add_event (cs, &cs->bcs[channel-1 ].at_state,EV_HUP ,NULL ,0 ,NULL )) { -dev_err (cs->dev,"%s: out of memory\n" , __func__);send_conf (iif, ap, skb,CAPI_MSGOSRESOURCEERR );return ; } -gig_dbg (DEBUG_CMD ,"scheduling HUP" );gigaset_schedule_event (cs);/* NCPI parameter: not applicable for B3 Transparent */
drivers/isdn/gigaset/common.c +20 -29
153 lines not on this page · raw message
drivers/isdn/gigaset/ev-layer.c +32 -31
228 lines not on this page · raw message
drivers/isdn/gigaset/gigaset.h +2 -5
@@ -78,9 +78,10 @@ enum debuglevel {DEBUG_STREAM =0x00040 ,/* application data stream I/O events */ DEBUG_STREAM_DUMP =0x00080 ,/* application data stream content */ DEBUG_LLDATA =0x00100 ,/* sent/received LL data */ +DEBUG_EVENT =0x00200 ,/* event processing */ DEBUG_DRIVER =0x00400 ,/* driver structure */ DEBUG_HDLC =0x00800 ,/* M10x HDLC processing */ -DEBUG_WRITE =0x01000 ,/* M105 data write */ +DEBUG_CHANNEL =0x01000 ,/* channel allocation/deallocation */ DEBUG_TRANSCMD =0x02000 ,/* AT-COMMANDS+RESPONSES */ DEBUG_MCMD =0x04000 ,/* COMMANDS THAT ARE SENT VERY OFTEN */ DEBUG_INIT =0x08000 ,/* (de)allocation+initialization of data
@@ -785,8 +786,6 @@ static inline void gigaset_schedule_event(struct cardstate *cs)static inline void gigaset_bchannel_down (struct bc_state *bcs) {gigaset_add_event (bcs->cs, &bcs->at_state,EV_BC_CLOSED ,NULL ,0 ,NULL ); - -gig_dbg (DEBUG_CMD ,"scheduling BC_CLOSED" );gigaset_schedule_event (bcs->cs); }
@@ -795,8 +794,6 @@ static inline void gigaset_bchannel_down(struct bc_state *bcs)static inline void gigaset_bchannel_up (struct bc_state *bcs) {gigaset_add_event (bcs->cs, &bcs->at_state,EV_BC_OPEN ,NULL ,0 ,NULL ); - -gig_dbg (DEBUG_CMD ,"scheduling BC_OPEN" );gigaset_schedule_event (bcs->cs); }
drivers/isdn/gigaset/i4l.c +6 -46
96 lines not on this page · raw message
drivers/isdn/gigaset/interface.c +4 -8
@@ -45,8 +45,6 @@ static int if_lock(struct cardstate *cs, int *arg) cs->waiting =0 ;return -ENOMEM ; } - -gig_dbg (DEBUG_CMD ,"scheduling IF_LOCK" );gigaset_schedule_event (cs);wait_event (cs->waitqueue, !cs->waiting);
@@ -81,8 +79,6 @@ static int if_version(struct cardstate *cs, unsigned arg[4]) cs->waiting =0 ;return -ENOMEM ; } - -gig_dbg (DEBUG_CMD ,"scheduling IF_VER" );gigaset_schedule_event (cs);wait_event (cs->waitqueue, !cs->waiting);
@@ -274,7 +270,7 @@ static int if_ioctl(struct tty_struct *tty, struct file *file, ? -EFAULT :0 ;break ;default : -gig_dbg (DEBUG_ANY ,"%s: arg not supported - 0x%04x" , +gig_dbg (DEBUG_IF ,"%s: arg not supported - 0x%04x" , __func__, cmd); retval = -ENOIOCTLCMD ; }
@@ -455,7 +451,7 @@ static void if_throttle(struct tty_struct *tty)else if (!cs->open_count)dev_warn (cs->dev,"%s: device not opened\n" , __func__);else -gig_dbg (DEBUG_ANY ,"%s: not implemented\n" , __func__); +gig_dbg (DEBUG_IF ,"%s: not implemented\n" , __func__);mutex_unlock (&cs->mutex); }
@@ -479,7 +475,7 @@ static void if_unthrottle(struct tty_struct *tty)else if (!cs->open_count)dev_warn (cs->dev,"%s: device not opened\n" , __func__);else -gig_dbg (DEBUG_ANY ,"%s: not implemented\n" , __func__); +gig_dbg (DEBUG_IF ,"%s: not implemented\n" , __func__);mutex_unlock (&cs->mutex); }
@@ -630,7 +626,7 @@ void gigaset_if_receive(struct cardstate *cs,spin_lock_irqsave (&cs->lock, flags); tty = cs->tty;if (tty ==NULL ) -gig_dbg (DEBUG_ANY ,"receive on closed device" ); +gig_dbg (DEBUG_IF ,"receive on closed device" );else {tty_buffer_request_room (tty, len);tty_insert_flip_string (tty, buffer, len);
drivers/isdn/gigaset/proc.c +0 -2
@@ -48,8 +48,6 @@ static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr,mutex_unlock (&cs->mutex);return -ENOMEM ; } - -gig_dbg (DEBUG_CMD ,"scheduling PROC_CIDMODE" );gigaset_schedule_event (cs);wait_event (cs->waitqueue, !cs->waiting);
drivers/isdn/gigaset/usb-gigaset.c +1 -1
@@ -628,7 +628,7 @@ static int write_modem(struct cardstate *cs)struct usb_cardstate *ucs = cs->hw.usb;unsigned long flags; -gig_dbg (DEBUG_WRITE ,"len: %d..." , bcs->tx_skb->len); +gig_dbg (DEBUG_OUTPUT ,"len: %d..." , bcs->tx_skb->len);if (!bcs->tx_skb->len) {dev_kfree_skb_any (bcs->tx_skb);
Signature · 1 line
1.6.5.3.298.g39add
PATCH 4/4 isdn: remove ishexdigit() in regard to isxdigit()
In reply to Tilman SchmidtFrom: Andy Shevchenko <[email protected]>
Subject: [PATCH 4/4] isdn: remove ishexdigit() in regard to isxdigit()
Samll cleanup in drivers/isdn/gigaset/capi.c where own implementation of isxdigit() has been changed to kernel native one.
--- drivers/isdn/gigaset/capi.c | 16 +--------------- 1 files changed, 1 insertions(+), 15 deletions(-)
drivers/isdn/gigaset/capi.c +1 -15
@@ -171,20 +171,6 @@ static inline void ignore_cstruct_param(struct cardstate *cs, _cstruct param, }/* -* check for legal hex digit -*/ -static inline int ishexdigit (char c) -{ -if (c >='0' && c <='9' ) -return 1 ; -if (c >='A' && c <='F' ) -return 1 ; -if (c >='a' && c <='f' ) -return 1 ; -return 0 ; -} - -/* * convert hex to binary */ static inline u8 hex2bin (char c)
@@ -204,7 +190,7 @@ static int encode_ie(char *in, u8 *out, int maxlen) {int l =0 ;while (*in) { -if (!ishexdigit (in[0 ]) || !ishexdigit (in[1 ]) || l >= maxlen) +if (!isxdigit (in[0 ]) || !isxdigit (in[1 ]) || l >= maxlen)return -1 ; out[++l] = (hex2bin (in[0 ]) <<4 ) +hex2bin (in[1 ]); in +=2 ;
Signature · 1 line
1.6.5.3.298.g39add
David Miller
maintainerFrom: Tilman Schmidt <[email protected]>
Date: Tue, 23 Feb 2010 00:08:21 +0100 (CET)
Quoted 2 lines
following are four patches to the Gigaset driver I'd like you to forward for merging into kernel release 2.6.34.
All applied to net-next-2.6, thanks.