Commit 5555dfdc authored by David S. Miller's avatar David S. Miller

Merge branch 'isdn-next'

Tilman Schmidt says:

====================
ISDN patches for net-next

Here's a series of patches for the ISDN CAPI subsystem and the
Gigaset ISDN driver.  Please merge via net-next.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 1e203c1a 7b0c67e4
...@@ -205,11 +205,8 @@ static unsigned command_2_index(unsigned c, unsigned sc) ...@@ -205,11 +205,8 @@ static unsigned command_2_index(unsigned c, unsigned sc)
{ {
if (c & 0x80) if (c & 0x80)
c = 0x9 + (c & 0x0f); c = 0x9 + (c & 0x0f);
else if (c <= 0x0f);
else if (c == 0x41) else if (c == 0x41)
c = 0x9 + 0x1; c = 0x9 + 0x1;
else if (c == 0xff)
c = 0x00;
return (sc & 3) * (0x9 + 0x9) + c; return (sc & 3) * (0x9 + 0x9) + c;
} }
......
...@@ -1243,7 +1243,8 @@ static void do_action(int action, struct cardstate *cs, ...@@ -1243,7 +1243,8 @@ static void do_action(int action, struct cardstate *cs,
break; break;
case ACT_FAILDLE0: case ACT_FAILDLE0:
cs->cur_at_seq = SEQ_NONE; cs->cur_at_seq = SEQ_NONE;
dev_warn(cs->dev, "Could not leave DLE mode.\n"); dev_warn(cs->dev, "Error leaving DLE mode.\n");
cs->dle = 0;
at_state2 = &cs->bcs[cs->curchannel].at_state; at_state2 = &cs->bcs[cs->curchannel].at_state;
disconnect(&at_state2); disconnect(&at_state2);
schedule_init(cs, MS_RECOVER); schedule_init(cs, MS_RECOVER);
......
...@@ -135,14 +135,13 @@ struct usb_cardstate { ...@@ -135,14 +135,13 @@ struct usb_cardstate {
/* Output buffer */ /* Output buffer */
unsigned char *bulk_out_buffer; unsigned char *bulk_out_buffer;
int bulk_out_size; int bulk_out_size;
__u8 bulk_out_endpointAddr; int bulk_out_epnum;
struct urb *bulk_out_urb; struct urb *bulk_out_urb;
/* Input buffer */ /* Input buffer */
unsigned char *rcvbuf; unsigned char *rcvbuf;
int rcvbuf_size; int rcvbuf_size;
struct urb *read_urb; struct urb *read_urb;
__u8 int_in_endpointAddr;
char bchars[6]; /* for request 0x19 */ char bchars[6]; /* for request 0x19 */
}; };
...@@ -466,7 +465,7 @@ static int send_cb(struct cardstate *cs, struct cmdbuf_t *cb) ...@@ -466,7 +465,7 @@ static int send_cb(struct cardstate *cs, struct cmdbuf_t *cb)
usb_fill_bulk_urb(ucs->bulk_out_urb, ucs->udev, usb_fill_bulk_urb(ucs->bulk_out_urb, ucs->udev,
usb_sndbulkpipe(ucs->udev, usb_sndbulkpipe(ucs->udev,
ucs->bulk_out_endpointAddr & 0x0f), ucs->bulk_out_epnum),
cb->buf + cb->offset, count, cb->buf + cb->offset, count,
gigaset_write_bulk_callback, cs); gigaset_write_bulk_callback, cs);
...@@ -628,8 +627,7 @@ static int write_modem(struct cardstate *cs) ...@@ -628,8 +627,7 @@ static int write_modem(struct cardstate *cs)
if (cs->connected) { if (cs->connected) {
usb_fill_bulk_urb(ucs->bulk_out_urb, ucs->udev, usb_fill_bulk_urb(ucs->bulk_out_urb, ucs->udev,
usb_sndbulkpipe(ucs->udev, usb_sndbulkpipe(ucs->udev,
ucs->bulk_out_endpointAddr & ucs->bulk_out_epnum),
0x0f),
ucs->bulk_out_buffer, count, ucs->bulk_out_buffer, count,
gigaset_write_bulk_callback, cs); gigaset_write_bulk_callback, cs);
ret = usb_submit_urb(ucs->bulk_out_urb, GFP_ATOMIC); ret = usb_submit_urb(ucs->bulk_out_urb, GFP_ATOMIC);
...@@ -714,7 +712,7 @@ static int gigaset_probe(struct usb_interface *interface, ...@@ -714,7 +712,7 @@ static int gigaset_probe(struct usb_interface *interface,
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
ucs->bulk_out_size = buffer_size; ucs->bulk_out_size = buffer_size;
ucs->bulk_out_endpointAddr = endpoint->bEndpointAddress; ucs->bulk_out_epnum = usb_endpoint_num(endpoint);
ucs->bulk_out_buffer = kmalloc(buffer_size, GFP_KERNEL); ucs->bulk_out_buffer = kmalloc(buffer_size, GFP_KERNEL);
if (!ucs->bulk_out_buffer) { if (!ucs->bulk_out_buffer) {
dev_err(cs->dev, "Couldn't allocate bulk_out_buffer\n"); dev_err(cs->dev, "Couldn't allocate bulk_out_buffer\n");
...@@ -741,7 +739,6 @@ static int gigaset_probe(struct usb_interface *interface, ...@@ -741,7 +739,6 @@ static int gigaset_probe(struct usb_interface *interface,
} }
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
ucs->rcvbuf_size = buffer_size; ucs->rcvbuf_size = buffer_size;
ucs->int_in_endpointAddr = endpoint->bEndpointAddress;
ucs->rcvbuf = kmalloc(buffer_size, GFP_KERNEL); ucs->rcvbuf = kmalloc(buffer_size, GFP_KERNEL);
if (!ucs->rcvbuf) { if (!ucs->rcvbuf) {
dev_err(cs->dev, "Couldn't allocate rcvbuf\n"); dev_err(cs->dev, "Couldn't allocate rcvbuf\n");
...@@ -750,8 +747,7 @@ static int gigaset_probe(struct usb_interface *interface, ...@@ -750,8 +747,7 @@ static int gigaset_probe(struct usb_interface *interface,
} }
/* Fill the interrupt urb and send it to the core */ /* Fill the interrupt urb and send it to the core */
usb_fill_int_urb(ucs->read_urb, udev, usb_fill_int_urb(ucs->read_urb, udev,
usb_rcvintpipe(udev, usb_rcvintpipe(udev, usb_endpoint_num(endpoint)),
usb_endpoint_num(endpoint)),
ucs->rcvbuf, buffer_size, ucs->rcvbuf, buffer_size,
gigaset_read_int_callback, gigaset_read_int_callback,
cs, endpoint->bInterval); cs, endpoint->bInterval);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment