Archived
14
0
Fork 0
Commit graph

70562 commits

Author SHA1 Message Date
Jeff Garzik
3f88ce495b [netdrvr] forcedeth: improved probe info; dev_printk() cleanups
main change:
* greatly improve per-NIC probe diagnostic output.  Similar to other
  net drivers, print out MAC address, PHY info, and various hardware and
  software flags that may be relevant.

other changes:
* similar to other net drivers, only print the initial version message
  when we have found at least one board.

* don't bother to print error message when pci_enable_device() fails,
  it will do so for us.

* use dev_printk() rather than printk() in nv_probe().  This gives
  use a standardized output similar to the rest of the kernel, and
  eliminates the need to manually print out PCI bus id.

* use DRV_NAME constant where appropriate

* clean struct pci_driver indentation

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-16 20:50:10 -04:00
Ingo Molnar
bcb5febb24 forcedeth: fix NAPI rx poll function
fix the forcedeth NAPI poll function to not emit this warning:

[  186.635916] WARNING: at net/core/dev.c:2166 net_rx_action()
[  186.641351]  [<c060d9f5>] net_rx_action+0x145/0x1b0
[  186.646191]  [<c011d752>] __do_softirq+0x42/0x90
[  186.650784]  [<c011d7c6>] do_softirq+0x26/0x30
[  186.655202]  [<c011db48>] local_bh_enable+0x48/0xa0
[  186.660055]  [<c06023e0>] lock_sock_nested+0xa0/0xc0
[  186.664995]  [<c065da16>] tcp_recvmsg+0x16/0xbc0
[  186.669588]  [<c013e94b>] __generic_file_aio_write_nolock+0x27b/0x520
[  186.676001]  [<c0601d75>] sock_common_recvmsg+0x45/0x70
[  186.681202]  [<c05ff5df>] sock_aio_read+0x11f/0x140
[  186.686054]  [<c015c086>] do_sync_read+0xc6/0x110
[  186.690735]  [<c012b9b0>] autoremove_wake_function+0x0/0x40
[  186.696280]  [<c060dcfc>] net_tx_action+0x3c/0xe0
[  186.700961]  [<c015c9c2>] vfs_read+0x132/0x140
[  186.705378]  [<c015cd41>] sys_read+0x41/0x70
[  186.709625]  [<c0102b66>] sysenter_past_esp+0x5f/0x89
[  186.714651]  =======================

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-16 20:44:59 -04:00
Linus Torvalds
2b0460b534 Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (33 commits)
  amd74xx: remove /proc/ide/amd74xx
  amd74xx/via82cxxx: don't initialize drive->dn
  sis5513: remove /proc/ide/sis
  ide: remove CONFIG_IDEDMA_ONLYDISK
  ide: add "hdx=nodma" kernel parameter
  ide: remove hwif->autodma and drive->autodma
  ide: remove "idex=dma" kernel parameter
  ide: remove CONFIG_BLK_DEV_IDEDMA_FORCED
  ide: use PCI_VDEVICE() macro
  sis5513: clear prefetch and postwrite for ATAPI devices
  it8213/piix/slc90e66: "de-couple" PIO and UDMA modes
  ide: unexport noautodma
  ide: unexport ide_tune_dma
  ide: remove ->ide_dma_check (take 2)
  ide-pmac: add PIO autotune fallback to ->ide_dma_check
  ide-cris: add PIO autotune fallback to ->ide_dma_check
  sl82c105: add PIO autotune fallback to ->ide_dma_check
  cs5530/sc1200: add PIO autotune fallback to ->ide_dma_check
  ide: remove ide_use_fast_pio()
  ide: remove drive->init_speed zeroing
  ...
2007-10-16 16:56:35 -07:00
Al Viro
d91f5bb69a fix cirrusfb breakage
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16 16:55:21 -07:00
Linus Torvalds
b883a688ce Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  SELinux: kills warnings in Improve SELinux performance when AVC misses
  SELinux: improve performance when AVC misses.
  SELinux: policy selectable handling of unknown classes and perms
  SELinux: Improve read/write performance
  SELinux: tune avtab to reduce memory usage
2007-10-16 16:53:20 -07:00
Linus Torvalds
1316ff5d52 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (25 commits)
  firewire: fw-cdev: reorder wakeup vs. spinlock
  firewire: in-code doc updates.
  firewire: a header cleanup
  firewire: adopt read cycle timer ABI from raw1394
  firewire: fw-ohci: check for misconfigured bus (phyID == 63)
  firewire: fw-ohci: missing dma_unmap_single
  firewire: fw-ohci: log posted write errors
  firewire: fw-ohci: reorder includes
  firewire: fw-ohci: fix includes
  firewire: fw-ohci: enforce read order for selfID generation
  firewire: fw-sbp2: use an own workqueue (fix system responsiveness)
  firewire: fw-sbp2: expose module parameter for workarounds
  firewire: fw-sbp2: add support for multiple logical units per target
  firewire: fw-sbp2: always enable IRQs before calling command ORB callback
  firewire: fw-core: local variable shadows a global one
  firewire: optimize fw_core_add_address_handler
  ieee1394: ieee1394_core.c: use DEFINE_SPINLOCK for spinlock definition
  ieee1394: csr1212: proper refcounting
  ieee1394: nodemgr: fix leak of struct csr1212_keyval
  ieee1394: pcilynx: I2C cleanups
  ...
2007-10-16 16:52:21 -07:00
Linus Torvalds
f563d53c30 Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  x86: fix boot error introduced by kbuild
2007-10-16 16:51:11 -07:00
Linus Torvalds
ce4b61f5e2 Merge branch 'release' of ssh://master.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of ssh://master.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Fix build for CONFIG_SMP=n
2007-10-16 16:48:59 -07:00
KaiGai Kohei
087feb9804 SELinux: kills warnings in Improve SELinux performance when AVC misses
This patch kills ugly warnings when the "Improve SELinux performance
when ACV misses" patch.

Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
Signed-off-by: James Morris <jmorris@namei.org>
2007-10-17 08:59:36 +10:00
KaiGai Kohei
9fe79ad1e4 SELinux: improve performance when AVC misses.
* We add ebitmap_for_each_positive_bit() which enables to walk on
  any positive bit on the given ebitmap, to improve its performance
  using common bit-operations defined in linux/bitops.h.
  In the previous version, this logic was implemented using a combination
  of ebitmap_for_each_bit() and ebitmap_node_get_bit(), but is was worse
  in performance aspect.
  This logic is most frequestly used to compute a new AVC entry,
  so this patch can improve SELinux performance when AVC misses are happen.
* struct ebitmap_node is redefined as an array of "unsigned long", to get
  suitable for using find_next_bit() which is fasted than iteration of
  shift and logical operation, and to maximize memory usage allocated
  from general purpose slab.
* Any ebitmap_for_each_bit() are repleced by the new implementation
  in ss/service.c and ss/mls.c. Some of related implementation are
  changed, however, there is no incompatibility with the previous
  version.
* The width of any new line are less or equal than 80-chars.

The following benchmark shows the effect of this patch, when we
access many files which have different security context one after
another. The number is more than /selinux/avc/cache_threshold, so
any access always causes AVC misses.

      selinux-2.6      selinux-2.6-ebitmap
AVG:   22.763 [s]          8.750 [s]
STD:    0.265              0.019
------------------------------------------
1st:   22.558 [s]          8.786 [s]
2nd:   22.458 [s]          8.750 [s]
3rd:   22.478 [s]          8.754 [s]
4th:   22.724 [s]          8.745 [s]
5th:   22.918 [s]          8.748 [s]
6th:   22.905 [s]          8.764 [s]
7th:   23.238 [s]          8.726 [s]
8th:   22.822 [s]          8.729 [s]

Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
2007-10-17 08:59:34 +10:00
Eric Paris
3f12070e27 SELinux: policy selectable handling of unknown classes and perms
Allow policy to select, in much the same way as it selects MLS support, how
the kernel should handle access decisions which contain either unknown
classes or unknown permissions in known classes.  The three choices for the
policy flags are

0 - Deny unknown security access. (default)
2 - reject loading policy if it does not contain all definitions
4 - allow unknown security access

The policy's choice is exported through 2 booleans in
selinuxfs.  /selinux/deny_unknown and /selinux/reject_unknown.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
2007-10-17 08:59:33 +10:00
Yuichi Nakamura
788e7dd4c2 SELinux: Improve read/write performance
It reduces the selinux overhead on read/write by only revalidating
permissions in selinux_file_permission if the task or inode labels have
changed or the policy has changed since the open-time check.  A new LSM
hook, security_dentry_open, is added to capture the necessary state at open
time to allow this optimization.

(see http://marc.info/?l=selinux&m=118972995207740&w=2)

Signed-off-by: Yuichi Nakamura<ynakam@hitachisoft.jp>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
2007-10-17 08:59:31 +10:00
Yuichi Nakamura
3232c110b5 SELinux: tune avtab to reduce memory usage
This patch reduces memory usage of SELinux by tuning avtab. Number of hash
slots in avtab was 32768. Unused slots used memory when number of rules is
fewer. This patch decides number of hash slots dynamically based on number
of rules. (chain length)^2 is also printed out in avtab_hash_eval to see
standard deviation of avtab hash table.

Signed-off-by: Yuichi Nakamura<ynakam@hitachisoft.jp>
Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
2007-10-17 08:59:30 +10:00
Jay Fenlason
83431cba3d firewire: fw-cdev: reorder wakeup vs. spinlock
Signed-off-by: Jay Fenlason <fenlason@redhat.com>

Prompted by https://bugzilla.redhat.com/show_bug.cgi?id=323411

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-17 00:00:10 +02:00
Yann Dirson
c1b91ce491 firewire: in-code doc updates.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (update)
2007-10-17 00:00:09 +02:00
Stefan Richter
e5f84f82bd firewire: a header cleanup
fw_node() is not used (and not useful) outside fw-topology.c.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-17 00:00:09 +02:00
Stefan Richter
a64408b96b firewire: adopt read cycle timer ABI from raw1394
This duplicates the read cycle timer feature of raw1394 (added in Linux
2.6.21) in firewire-core's userspace ABI.  The argument to the ioctl is
reordered though to ensure 32/64 bit compatibility.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-10-17 00:00:08 +02:00
Stefan Richter
02ff8f8ee1 firewire: fw-ohci: check for misconfigured bus (phyID == 63)
Check NodeID.nodeNumber as per OHCI 1.1 clause 7.2.3.2.  See also IEEE
1394a table 5B-1.

Also, demote the "node ID not valid" message from error to notification
as it is not an error condition.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-17 00:00:08 +02:00
Stefan Richter
ab88ca488b firewire: fw-ohci: missing dma_unmap_single
at_context_queue_packet() didn't clean up in an early exit path.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-10-17 00:00:07 +02:00
Stefan Richter
e524f616f5 firewire: fw-ohci: log posted write errors
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-17 00:00:06 +02:00
Stefan Richter
a7fb60db71 firewire: fw-ohci: reorder includes
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-17 00:00:06 +02:00
Stefan Richter
c26f02340e firewire: fw-ohci: fix includes
Add used includes, remove unused includes.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-17 00:00:05 +02:00
Stefan Richter
ee71c2f9ee firewire: fw-ohci: enforce read order for selfID generation
It seems unlikely, but access to self_id_cpu[0] could at least in theory
be deferred until after the loop over self_id_cpu[1..n] or even after
the subsequent reg_read.  Enforce the desired order by a read barrier.

Also prevent the reg_read from being reordered relative to the for loop.
This isn't necessary if the loop's conditional printk counts as an
implicit barrier, but better make it explicit.

(self_id_cpu[] is a coherent DMA buffer.)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-17 00:00:05 +02:00
Stefan Richter
df8ec2490f firewire: fw-sbp2: use an own workqueue (fix system responsiveness)
Firewire-sbp2 did very uncooperative things in the kernel's shared
workqueue:  Sleeping until reception of management status from the
target for up to 2 seconds, and performing SCSI inquiry and all of the
setup of SCSI command set drivers via scsi_add_device.  If there were
transient or permanent error conditions, this caused long blockage of
the kernel's events process, noticeable e.g. by blocked keyboard input.

We now allocate a workqueue process exclusive to fw-sbp2.  As a side
effect, this also increases parallelism of fw-sbp2's login and reconnect
work versus fw-core's device discovery and device update work which is
performed in the shared workqueue.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-10-17 00:00:04 +02:00
Stefan Richter
2df222b8f8 firewire: fw-sbp2: expose module parameter for workarounds
On rare occasions, the ability to set one of the workaround flags at
runtime may save the day.

People who experience I/O errors with firewire-sbp2 while the old sbp2
driver worked for them should try workarounds=1 and report to the devel
mailinglist whether that improves things.  Firewire-sbp2 defaults to the
SCSI stack's maximum transfer size per command, while sbp2 limits them
to 128 kBytes.  Flag 1 accomplishes just that.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-17 00:00:03 +02:00
Stefan Richter
5a3c2be6c9 firewire: fw-sbp2: add support for multiple logical units per target
Fixes "New firewire stack only recognizing half of a chain of drives",
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242254

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-17 00:00:03 +02:00
Stefan Richter
1b34e97441 firewire: fw-sbp2: always enable IRQs before calling command ORB callback
On IOMMU-less noncoherent architectures, orb->callback will memcpy the
whole SCSI command buffer for READ-like SCSI commands.  It is therefore
friendlier to enable IRQs before the call, like before patch "Add
ref-counting for sbp2 orbs".

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
2007-10-17 00:00:02 +02:00
Stefan Richter
930e4b7fe3 firewire: fw-core: local variable shadows a global one
Sparse warned about it although it was apparently harmless:

drivers/firewire/fw-cdev.c:624:23: warning: symbol 'interrupt' shadows an earlier one
include/asm/hw_irq.h:29:13: originally declared here

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-17 00:00:01 +02:00
Stefan Richter
1415d9189e firewire: optimize fw_core_add_address_handler
Potentially avoids unnecessary loop runs.
Guarantee quadlet-aligned starts of address regions.
Document the return values.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-17 00:00:00 +02:00
Matthias Kaehlcke
002a98f147 ieee1394: ieee1394_core.c: use DEFINE_SPINLOCK for spinlock definition
drivers/ieee1394/ieee1394_core.c: Define spinlock using
DEFINE_SPINLOCK instead of assignment to SPIN_LOCK_UNLOCKED

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16 23:59:59 +02:00
Stefan Richter
17a19b795e ieee1394: csr1212: proper refcounting
At least since nodemgr got rid of coarse global locking, accesses to
struct csr1212_keyval's reference counter should be atomic and coupled
with proper barriers.  Also, calls to csr1212_keep_keyval(kv) should
occur before kv is being used.

(We probably should convert refcnt to struct kref, but how to keep
csr1212_destroy_keyval's implementation non-recursively then?)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16 23:59:59 +02:00
Stefan Richter
638d5bb816 ieee1394: nodemgr: fix leak of struct csr1212_keyval
csr1212_keep_keyval(kv) in nodemgr_process_root_directory was
unbalanced if ne->vendor_name_kv already exists.  This happens for
example if eth1394 or raw1394 modify the local config ROM and it is
parsed again.

As a bonus, the attempt to add the vendor_name_kv sysfs attribute
when it already exists is now fixed for good.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16 23:59:58 +02:00
Jean Delvare
745647e7a2 ieee1394: pcilynx: I2C cleanups
* Delete optional and empty i2c client_register and client_unregister
  callbacks.
* Use the proper i2c adapter ID.
* Don't use a template to initialize the i2c_adapter structure, it's
  inefficient.
* Update a misleading comment on why we use i2c_transfer rather than
  higher level i2c functions.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16 23:59:57 +02:00
Satyam Sharma
69e2b60296 ieee1394: Fix kthread stopping in nodemgr_host_thread
The nodemgr host thread can exit on its own even when kthread_should_stop
is not true, on receiving a signal (might never happen in practice, as
it ignores signals). But considering kthread_stop() must not be mixed with
kthreads that can exit on their own, I think changing the code like this
is clearer. This change means the thread can cut its sleep short when
receive a signal but looking at the code around, that sounds okay (and
again, it might never actually recieve a signal in practice).

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16 23:59:56 +02:00
Stefan Richter
261b5f664c ieee1394: sbp2: fix unsafe iteration over list of devices
sbp2_host_reset and sbp2_handle_status_write are not serialized against
sbp2_alloc_device and sbp2_remove_device.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16 23:59:55 +02:00
Stefan Richter
c4f3d41fed ieee1394: pcilynx: superfluous local variables
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16 23:59:55 +02:00
Stefan Richter
661afcae1b ieee1394: eth1394: fix lock imbalance
bad_proto can be reached from points which did not take priv->lock.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16 23:59:54 +02:00
Stefan Richter
3bd90303f0 ieee1394: eth1394: superfluous local variable
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16 23:59:53 +02:00
Sam Ravnborg
7eebb93486 x86: fix boot error introduced by kbuild
x86 uses target specific assignment of EXTRA_AFLAGS,
EXTRA_CFLAGS - this caused troubles with
introducing asflags-y, ccflags-y.

Fixed the target specific assignments in arch/x86/boot/Makefile
and auditted the rest of the kernel for similar usage.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-16 23:50:33 +02:00
Bartlomiej Zolnierkiewicz
b02fcae007 amd74xx: remove /proc/ide/amd74xx
This belongs to user-space (and only if really needed).

   text    data     bss     dec     hex filename
   6723    2000      28    8751    222f drivers/ide/pci/amd74xx.o.before
   3833    2000      16    5849    16d9 drivers/ide/pci/amd74xx.o.after

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16 22:29:58 +02:00
Bartlomiej Zolnierkiewicz
8fcb2ea822 amd74xx/via82cxxx: don't initialize drive->dn
drive->dn is initialized by ide-probe.c::probe_hwif() so no need to do it
in ->init_hwif method.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16 22:29:58 +02:00
Bartlomiej Zolnierkiewicz
a718122ce8 sis5513: remove /proc/ide/sis
This belongs to user-space (and only if really needed).

   text    data     bss     dec     hex filename
   7129     404       8    7541    1d75 drivers/ide/pci/sis5513.o.before
   3916     404       1    4321    10e1 drivers/ide/pci/sis5513.o.after

Additionaly to being bloat the code contained two bugs:
- wrong cable bit was checked (0x0001 instead of 0x8000) on ATA_133 chipsets
- incorrect UDMA cycle time was reported on ATA_100a/ATA_133 chipsets

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16 22:29:58 +02:00
Bartlomiej Zolnierkiewicz
8c0697cc2c ide: remove CONFIG_IDEDMA_ONLYDISK
ATAPI devices with broken DMA support should be handled by DMA blacklist
and for debugging purposes we have new shiny "hdx=nodma" kernel paremeter.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16 22:29:58 +02:00
Bartlomiej Zolnierkiewicz
c223701cf6 ide: add "hdx=nodma" kernel parameter
* Add "hdx=nodma" option allowing user to disallow DMA for a given device.

* Obsolete "ide=nodma" option.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16 22:29:58 +02:00
Bartlomiej Zolnierkiewicz
9ff6f72f43 ide: remove hwif->autodma and drive->autodma
* hpt34x.c: disable DMA masks for HPT345
  (hwif->autodma is zero so DMA won't be enabled anyway).

* trm290.c: disable IDE_HFLAG_TRUST_BIOS_FOR_DMA flag
  (hwif->autodma is zero so DMA won't be enabled anyway).

* Check noautodma global variable instead of drive->autodma in ide_tune_dma().

  This fixes handling of "ide=nodma" kernel parameter for icside, ide-cris,
  au1xxx-ide, pmac, it821x, jmicron, sgiioc4 and siimage host drivers.

* Remove hwif->autodma (it was not checked by IDE core code anyway) and
  drive->autodma (was set by all host drivers - except HPT345/TRM290 special
  cases - unless "ide=nodma" was used).

While at it:
- remove needless printk() from icside.c
- remove stale FIXME/comment from ide-probe.c
- don't force DMA off if PCI bus-mastering had to be enabled in setup-pci.c
  (this setting was always later over-ridden by host drivers anyway)

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16 22:29:58 +02:00
Bartlomiej Zolnierkiewicz
1b5169405e ide: remove "idex=dma" kernel parameter
It has been obsoleted since 1 Nov 2004, is valid only when used together with
"ide=nodma" kernel parameter (which makes no sense) and only for aec62xx,
cmd64x, cs5220, generic, hpt366, sl82c105, tc86c001 and triflex host drivers.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16 22:29:57 +02:00
Bartlomiej Zolnierkiewicz
c58e79dd44 ide: remove CONFIG_BLK_DEV_IDEDMA_FORCED
This code doesn't use pci_assign_resource() and ide_get_or_set_dma_base() uses
pci_resource_start() to get DMA base address so it has no chance of working.
Moreover this belongs to PCI quirks (in case somebody would like to fix it).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16 22:29:56 +02:00
Bartlomiej Zolnierkiewicz
9cbcc5e3c5 ide: use PCI_VDEVICE() macro
While at it:
- make struct pci_device_id tables const
- use PCI_DEVICE_ID_ITE_8213 define in it8213.c
- fix comment in generic.c

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16 22:29:56 +02:00
Bartlomiej Zolnierkiewicz
d83fca58d3 sis5513: clear prefetch and postwrite for ATAPI devices
Clear prefetch and postwrite for ATAPI devices instead of depending on BIOS.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16 22:29:56 +02:00
Bartlomiej Zolnierkiewicz
1c54a93d4d it8213/piix/slc90e66: "de-couple" PIO and UDMA modes
Don't force PIO4 when programming UDMA mode (suggested by Sergei).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16 22:29:56 +02:00