mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ioan Ionita" <opslynx@gmail.com>
To: "Michael Helmling" <supermihi@web.de>
Cc: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: New, yet unsupported USB-Ethernet adaptor
Date: Tue, 2 May 2006 15:13:21 -0400	[thread overview]
Message-ID: <df47b87a0605021213i7b3de7bck1162ef519a654579@mail.gmail.com> (raw)
In-Reply-To: <200605022002.15845.supermihi@web.de>

On 5/2/06, Michael Helmling <supermihi@web.de> wrote:

> I bought an USB-Ethernet adaptor from delock (www.delock.de) and found it was
> not supported by linux from the vendor. So I played a little with lsusb and
> found it uses a MCS7830 chip from MosChip semiconductor (moschip.com). On
> their homepage I found a driver but it only was a precompiled Fedora4 module.
> So I wrote them an email and they sent me the whole source code for the
> module . Unfortunately it doesn't compile on my machine with a 2.6.16 kernel,
> but in does on a friend's one who uses 2.6.12, so I assume something has
> changed in the kernel interface (I get errors with sk_buff_head not
> containing "list").
> I have no idea of how to correct this but maybe someone else can. I attached
> the sourcecode wich is licensed under the GPL.

Great. below is an UNTESTED patch which should get it to build fine
with more recent kernels. (Builds on 2.6.17-rc3). Give it a try if you
can and let us know.

Signed-off-by: Ioan Ionita <opslynx@yahoo.com>
--

--- old/mcs7830.c	2006-05-02 11:01:22.000000000 -0400
+++ new/mcs7830.c	2006-05-02 11:01:12.000000000 -0400
@@ -1309,9 +1309,9 @@
  * completion callbacks.  2.5 should have fixed those bugs...
  */

-static void defer_bh (struct usbnet *dev, struct sk_buff *skb)
+static void defer_bh (struct usbnet *dev, struct sk_buff *skb, struct
sk_buff_head *list)
 {
-	struct sk_buff_head	*list = skb->list;
+	
 	unsigned long		flags;

 	spin_lock_irqsave (&list->lock, flags);
@@ -1370,7 +1370,7 @@

 	usb_fill_bulk_urb (urb, dev->udev, dev->in,
 		skb->data, size, rx_complete, skb);
-	urb->transfer_flags |= URB_ASYNC_UNLINK;
+	

 	spin_lock_irqsave (&dev->rxq.lock, lockflags);

@@ -1503,7 +1503,7 @@
 		break;
 	}

-	defer_bh (dev, skb);
+	defer_bh (dev, skb, &dev->txq);

 	if (urb) {
 		if (netif_running (dev->net)
@@ -1935,7 +1935,7 @@

 	urb->dev = NULL;
 	entry->state = tx_done;
-	defer_bh (dev, skb);
+	defer_bh (dev, skb, &dev->txq);
 }

 /*-------------------------------------------------------------------------*/
@@ -1997,7 +1997,7 @@

 	usb_fill_bulk_urb (urb, dev->udev, dev->out,
 			skb->data, skb->len, tx_complete, skb);
-	urb->transfer_flags |= URB_ASYNC_UNLINK;
+

 	/* don't assume the hardware handles USB_ZERO_PACKET
 	 * NOTE:  strictly conforming cdc-ether devices should expect
@@ -2044,7 +2044,7 @@
 		}
 		usb_fill_bulk_urb (Zerourb, dev->udev, dev->out,\
 				skb->data, 0, Zero_complete, NULL);
-		Zerourb->transfer_flags |= URB_ASYNC_UNLINK;
+		
 		retval2 = usb_submit_urb (urb, GFP_ATOMIC);
 		if(retval2 !=0)
 		printk("Error sending Zero Length packet in transmission\n");
@@ -2404,8 +2404,10 @@
 MODULE_DEVICE_TABLE (usb, products);

 static struct usb_driver usbnet_driver = {
-	.owner =	THIS_MODULE,
-	.name =		driver_name,
+	.driver = {
+		.owner =	THIS_MODULE,
+		.name =		driver_name,
+	 },
 	.id_table =	products,
 	.probe =	usbnet_probe,
 	.disconnect =	usbnet_disconnect,

  reply	other threads:[~2006-05-02 19:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-02 18:02 Michael Helmling
2006-05-02 19:13 ` Ioan Ionita [this message]
2006-05-02 20:40 ` Ioan Ionita
2006-05-02 21:03   ` Michael Helmling
     [not found]     ` <d9def9db0605050554m7b1e093di85782c1b09ca2636@mail.gmail.com>
2006-05-06 21:05       ` Michael Helmling
2006-05-02 21:25   ` Oliver Neukum
2006-05-02 22:09 ` [linux-usb-devel] " David Brownell
2006-05-03  5:06   ` Michael Helmling
2006-05-03  5:29     ` David Brownell
2006-05-03 13:28       ` Michael Helmling
2006-05-03 14:44         ` David Hollis
2006-05-03 15:31           ` Andrey Panin
2006-05-03 18:14             ` Michael Helmling
2006-05-03 18:33               ` Pavel Machek
2006-05-03 19:10           ` David Brownell
2006-05-03 19:23             ` David Brownell
2006-05-03 18:31   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=df47b87a0605021213i7b3de7bck1162ef519a654579@mail.gmail.com \
    --to=opslynx@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=supermihi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®