2004-04-14 17:18:00

by C.L. Tien - 田承禮

[permalink] [raw]
Subject: [PATCH]: cmpci 6.82 released

Hi,

I made several changes for cmpci.6.77, so the version is now 6.82.

The patch is mostly from kernel 2.6, which change to support newer gcc,
fix possible security hole. I also use the same include files for both
kernel versions.

The cmpci-6.82-patch2.4.tar.bz2 is made from official kernel 2.4.25, but should be able to patch other 2.4 kernel.

The cmpci-6.82-patch2.6.tar.bz2 is from official kernel 2.6.5, it will
show error when patch cmpci.c for kernel 2.6.4 or earlier, that's ok.

Sincerely,
ChenLi Tien


Attachments:
cmpci-6.82-patch2.4.tar.bz2 (19.13 kB)
cmpci-6.82-patch2.4.tar.bz2
cmpci-6.82-patch2.6.tar.bz2 (21.78 kB)
cmpci-6.82-patch2.6.tar.bz2
Download all attachments

2004-04-16 20:51:50

by Adrian Bunk

[permalink] [raw]
Subject: Re: [PATCH]: cmpci 6.82 released

On Thu, Apr 15, 2004 at 01:15:31AM +0800, C.L. Tien - ?????? wrote:
> Hi,
>
> I made several changes for cmpci.6.77, so the version is now 6.82.
>
> The patch is mostly from kernel 2.6, which change to support newer gcc,
> fix possible security hole. I also use the same include files for both
> kernel versions.
>
> The cmpci-6.82-patch2.4.tar.bz2 is made from official kernel 2.4.25, but should be able to patch other 2.4 kernel.
>
> The cmpci-6.82-patch2.6.tar.bz2 is from official kernel 2.6.5, it will
> show error when patch cmpci.c for kernel 2.6.4 or earlier, that's ok.

There seem to be some bugs in the __{,dev}{init,exit} changes.

E.g. in the 2.6 patch:

static void __devinit cm_remove(struct pci_dev *dev)
^^^^


> Sincerely,
> ChenLi Tien


cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2004-04-17 02:25:52

by C.L. Tien - 田承禮

[permalink] [raw]
Subject: RE: [PATCH]: cmpci 6.82 released

Did you mean __devinit should be __devexit for cm_remove? Indeed, when I first change it, this question rose. There are still many other driver in kernel 2.4.25 use the same way. But I checked the driver in kernel 2.6 tree use the __devexit already for correct semantic meaning. I made following change, thanks for your correction.

retrieving revision 6.82
retrieving revision 6.83
diff -a -u -r6.82 -r6.83
--- cmpci.c 13 Apr 2004 16:02:58 -0000 6.82
+++ cmpci.c 17 Apr 2004 01:39:20 -0000 6.83
@@ -3275,7 +3275,7 @@
MODULE_DESCRIPTION("CM8x38 Audio Driver");
MODULE_LICENSE("GPL");

-static void __devinit cm_remove(struct pci_dev *dev)
+static void __devexit cm_remove(struct pci_dev *dev)
{
struct cm_state *s = pci_get_drvdata(dev);

@@ -3332,12 +3332,12 @@
.name = "cmpci",
.id_table = id_table,
.probe = cm_probe,
- .remove = cm_remove
+ .remove = __devexit_p(cm_remove),
};

static int __init init_cmpci(void)
{
- printk(KERN_INFO "cmpci: version $Revision: 6.82 $ time " __TIME__ " " __DATE__ "\n");
+ printk(KERN_INFO "cmpci: version $Revision: 6.83 $ time " __TIME__ " " __DATE__ "\n");
return pci_module_init(&cm_driver);
}


-----Original Message-----
From: Adrian Bunk [mailto:[email protected]]
Sent: 2004/4/16 [?P????] ?U?? 04:43
To: C.L. Tien - ?Щ?§
Cc: [email protected]
Subject: Re: [PATCH]: cmpci 6.82 released
On Thu, Apr 15, 2004 at 01:15:31AM +0800, C.L. Tien - ?????? wrote:
> Hi,
>
> I made several changes for cmpci.6.77, so the version is now 6.82.
>
> The patch is mostly from kernel 2.6, which change to support newer gcc,
> fix possible security hole. I also use the same include files for both
> kernel versions.
>
> The cmpci-6.82-patch2.4.tar.bz2 is made from official kernel 2.4.25, but should be able to patch other 2.4 kernel.
>
> The cmpci-6.82-patch2.6.tar.bz2 is from official kernel 2.6.5, it will
> show error when patch cmpci.c for kernel 2.6.4 or earlier, that's ok.

There seem to be some bugs in the __{,dev}{init,exit} changes.

E.g. in the 2.6 patch:

static void __devinit cm_remove(struct pci_dev *dev)
^^^^


> Sincerely,
> ChenLi Tien


cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed





2004-04-17 19:41:08

by Adrian Bunk

[permalink] [raw]
Subject: Re: [PATCH]: cmpci 6.82 released

On Sat, Apr 17, 2004 at 09:52:27AM +0800, C.L. Tien - ?????? wrote:

> Did you mean __devinit should be __devexit for cm_remove? Indeed, when I first change it, this question rose. There are still many other driver in kernel 2.4.25 use the same way. But I checked the driver in kernel 2.6 tree use the __devexit already for correct semantic meaning. I made following change, thanks for your correction.
>...

Yes.

After a quick look over the patches, it seems this was the only problem
regarding __{,dev}{init,exit}.

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2004-04-29 19:45:35

by Marcelo Tosatti

[permalink] [raw]
Subject: Re: [PATCH]: cmpci 6.82 released

On Thu, Apr 15, 2004 at 01:15:31AM +0800, C.L. Tien - ?????? wrote:
> Hi,
>
> I made several changes for cmpci.6.77, so the version is now 6.82.
>
> The patch is mostly from kernel 2.6, which change to support newer gcc,
> fix possible security hole. I also use the same include files for both
> kernel versions.
>
> The cmpci-6.82-patch2.4.tar.bz2 is made from official kernel 2.4.25, but should be able to patch other 2.4 kernel.
>
> The cmpci-6.82-patch2.6.tar.bz2 is from official kernel 2.6.5, it will
> show error when patch cmpci.c for kernel 2.6.4 or earlier, that's ok.

C.L. Tien,

I see your fixes have not yet been merged into v2.6.x mainline.

I dont know the card very well, but the fixes alright.

Andrew, maybe you can merge this in -mm?

2004-04-29 19:56:45

by Marcelo Tosatti

[permalink] [raw]
Subject: Re: [PATCH]: cmpci 6.82 released

On Thu, Apr 29, 2004 at 04:46:35PM -0300, Marcelo Tosatti wrote:
> On Thu, Apr 15, 2004 at 01:15:31AM +0800, C.L. Tien - ?????? wrote:
> > Hi,
> >
> > I made several changes for cmpci.6.77, so the version is now 6.82.
> >
> > The patch is mostly from kernel 2.6, which change to support newer gcc,
> > fix possible security hole. I also use the same include files for both
> > kernel versions.
> >
> > The cmpci-6.82-patch2.4.tar.bz2 is made from official kernel 2.4.25, but should be able to patch other 2.4 kernel.
> >
> > The cmpci-6.82-patch2.6.tar.bz2 is from official kernel 2.6.5, it will
> > show error when patch cmpci.c for kernel 2.6.4 or earlier, that's ok.
>
> C.L. Tien,
>
> I see your fixes have not yet been merged into v2.6.x mainline.
>
> I dont know the card very well, but the fixes alright.
>
> Andrew, maybe you can merge this in -mm?

C.L. Tien,

Forgot to mention that it would be very nice if you could separate the update into
several patches (with a changelog for each).

2004-04-29 20:49:42

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH]: cmpci 6.82 released

On Thu, Apr 29, 2004 at 04:46:35PM -0300, Marcelo Tosatti wrote:
> On Thu, Apr 15, 2004 at 01:15:31AM +0800, C.L. Tien - ?????? wrote:
> > Hi,
> >
> > I made several changes for cmpci.6.77, so the version is now 6.82.
> >
> > The patch is mostly from kernel 2.6, which change to support newer gcc,
> > fix possible security hole. I also use the same include files for both
> > kernel versions.
> >
> > The cmpci-6.82-patch2.4.tar.bz2 is made from official kernel 2.4.25, but should be able to patch other 2.4 kernel.
> >
> > The cmpci-6.82-patch2.6.tar.bz2 is from official kernel 2.6.5, it will
> > show error when patch cmpci.c for kernel 2.6.4 or earlier, that's ok.
>
> C.L. Tien,
>
> I see your fixes have not yet been merged into v2.6.x mainline.
>
> I dont know the card very well, but the fixes alright.
>
> Andrew, maybe you can merge this in -mm?

The patches seemed OK to me when I looked at them earlier.

Just somebody needs to take the time to apply each patch...

Jeff



2004-04-29 21:14:29

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH]: cmpci 6.82 released

Marcelo Tosatti <[email protected]> wrote:
>
> > The cmpci-6.82-patch2.6.tar.bz2 is from official kernel 2.6.5, it will
> > show error when patch cmpci.c for kernel 2.6.4 or earlier, that's ok.
>
> C.L. Tien,
>
> I see your fixes have not yet been merged into v2.6.x mainline.
>
> I dont know the card very well, but the fixes alright.
>
> Andrew, maybe you can merge this in -mm?

It's still sitting in my to-do mailbox. Last time we went through the cmpci
patch it was reverting a number of changes which other developers had
added to the tree, so it needs checking for that.

OK, the 6.82 2.6 patch seems OK from that point of view. Will move it
forward.