Merge branch 'upstream-fixes' into upstream
[safe/jmp/linux-2.6] / drivers / net / wireless / zd1211rw / zd_usb.c
index ce1cb2c..96551da 100644 (file)
@@ -39,9 +39,11 @@ static struct usb_device_id usb_ids[] = {
        { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 },
        { USB_DEVICE(0x0df6, 0x9071), .driver_info = DEVICE_ZD1211 },
        { USB_DEVICE(0x157e, 0x300b), .driver_info = DEVICE_ZD1211 },
+       { USB_DEVICE(0x079b, 0x004a), .driver_info = DEVICE_ZD1211 },
        /* ZD1211B */
        { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B },
        { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B },
+       { USB_DEVICE(0x079b, 0x0062), .driver_info = DEVICE_ZD1211B },
        {}
 };
 
@@ -323,7 +325,6 @@ static void disable_read_regs_int(struct zd_usb *usb)
 {
        struct zd_usb_interrupt *intr = &usb->intr;
 
-       ZD_ASSERT(in_interrupt());
        spin_lock(&intr->lock);
        intr->read_regs_enabled = 0;
        spin_unlock(&intr->lock);
@@ -375,10 +376,8 @@ static void int_urb_complete(struct urb *urb, struct pt_regs *pt_regs)
        case -ENODEV:
        case -ENOENT:
        case -ECONNRESET:
-               goto kfree;
        case -EPIPE:
-               usb_clear_halt(urb->dev, EP_INT_IN);
-               /* FALL-THROUGH */
+               goto kfree;
        default:
                goto resubmit;
        }
@@ -547,11 +546,11 @@ static void handle_rx_packet(struct zd_usb *usb, const u8 *buffer,
         * be padded. Unaligned access might also happen if the length_info
         * structure is not present.
         */
-       if (get_unaligned(&length_info->tag) == RX_LENGTH_INFO_TAG) {
+       if (get_unaligned(&length_info->tag) == cpu_to_le16(RX_LENGTH_INFO_TAG))
+       {
                unsigned int l, k, n;
                for (i = 0, l = 0;; i++) {
-                       k = le16_to_cpu(get_unaligned(
-                               &length_info->length[i]));
+                       k = le16_to_cpu(get_unaligned(&length_info->length[i]));
                        n = l+k;
                        if (n > length)
                                return;
@@ -580,10 +579,8 @@ static void rx_urb_complete(struct urb *urb, struct pt_regs *pt_regs)
        case -ENODEV:
        case -ENOENT:
        case -ECONNRESET:
-               return;
        case -EPIPE:
-               usb_clear_halt(urb->dev, EP_DATA_IN);
-               /* FALL-THROUGH */
+               return;
        default:
                dev_dbg_f(urb_dev(urb), "urb %p error %d\n", urb, urb->status);
                goto resubmit;
@@ -749,11 +746,9 @@ static void tx_urb_complete(struct urb *urb, struct pt_regs *pt_regs)
        case -ENODEV:
        case -ENOENT:
        case -ECONNRESET:
+       case -EPIPE:
                dev_dbg_f(urb_dev(urb), "urb %p error %d\n", urb, urb->status);
                break;
-       case -EPIPE:
-               usb_clear_halt(urb->dev, EP_DATA_OUT);
-               /* FALL-THROUGH */
        default:
                dev_dbg_f(urb_dev(urb), "urb %p error %d\n", urb, urb->status);
                goto resubmit;