From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: linux-kernel@vger.kernel.org, zab@zabbo.net
Subject: Re: Patch: linux-2.4.0-test11/drivers/sound/maestro.c port to new PCI interface
Date: Tue, 21 Nov 2000 18:35:19 -0500 [thread overview]
Message-ID: <3A1B06B7.610AEE5A@mandrakesoft.com> (raw)
In-Reply-To: <20001121150246.A5608@adam.yggdrasil.com>
"Adam J. Richter" wrote:
>
> Here is a patch which ports drivers/sound/maestro.c to the new PCI
> interface, which Zach Brown asked me to post here for comments.
> This patch includes Zach's changes eliminating the ioctl lockups which
> he posted separately, just to make it easier to generate the final
> product from pristine 2.4.0-test11. I could actually divide this
> patch into three phases if need be:
> (a) The ioctl lockup fix which Zach has already submitted for
> (presumably) the next "-pre" release.
> (b) The pci_device_id table declaration and MODULE_DEVICE_TABLE.
> (c) Moving to the new PCI interface. If I were to conform to
> Jeff Garzick's requests on __initdata and __devinitdata, this would
> include changes that would change an __initdata delcaration in
> (b) to __devinitdata.
hmmm. I'm not so sure that the locking is correct... if the intention
was to serialize access to the mixer, there are surely better ways to do
it. Why are interrupts disabled? In any case it will probably change
when maestro goes ac97_codec (tested patches in gkernel CVS)... which it
needs to do <nudge nudge> ;-)
This driver needs __devxxx, I've heard mention of some hotpluggable
audio that is based on the maestro chipset (which chip I don't remember)
The formatting of pci_device_id data is awful. Named initializers
-reduce- the readability of the code here, are highly redundant, and its
usage is totally inconsistent with -all- other PCI drivers in the
kernel.
To make Zab's life a little easier, use pci_{get,set}_drvdata to make it
easier to port the code back to 2.2.x. Since pci_dev::driver_data
doesn't exist on 2.2.x, you have to ugly up the code with ifdefs, or use
a compatibility macro (like, say, pci_xxx_drvdata.. :))
Unrelated to your change: the maestro reboot notifier shouldn't need to
unregister all that stuff. Who cares if the sound devices are freed,
since we are rebooting. free_irq+maestro_power seems sufficient. or
maybe stop_dma+free_irq+poweroff.
Unrelated to your change: Feel free to submit patches to update
Documentation/pci.txt if you feel it is missing information.
Jeff
--
Jeff Garzik |
Building 1024 | The chief enemy of creativity is "good" sense
MandrakeSoft | -- Picasso
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-11-22 0:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-21 23:02 Patch: linux-2.4.0-test11/drivers/sound/maestro.c port to new PCI interface Adam J. Richter
2000-11-21 23:35 ` Jeff Garzik [this message]
2000-11-22 18:59 ` Zach Brown
-- strict thread matches above, loose matches on Subject: below --
2000-11-22 2:23 Adam J. Richter
2000-11-22 19:13 ` Zach Brown
2000-11-23 1:05 ` Pavel Machek
2000-11-23 23:10 ` Jeff Garzik
2000-11-22 2:25 Adam J. Richter
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=3A1B06B7.610AEE5A@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=adam@yggdrasil.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zab@zabbo.net \
/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