1
0
Fork 0
Commit Graph

61931 Commits (62e5a330dc1354d98f73a82f3d13517805f061f6)

Author SHA1 Message Date
Greg Kroah-Hartman 62e5a330dc USB: storage: onetouch: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:06 -07:00
Greg Kroah-Hartman 18ac301605 USB: class: usblp: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:06 -07:00
Greg Kroah-Hartman 185d40587d USB: class: cdc-acm: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:06 -07:00
Greg Kroah-Hartman 33fea2b2f5 USB: atm: usbatm: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:06 -07:00
Greg Kroah-Hartman 508330ebda USB: atm: ueagle-atm: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:06 -07:00
Greg Kroah-Hartman 9a5a3e95b4 USB: atm: speedtch: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:05 -07:00
Greg Kroah-Hartman c35f68a05d USB: atm: cxacru: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:05 -07:00
Yoshihiro Shimoda 598f22e11b USB: m66592-udc: fixes some problems
This patch incorporates some updates from the review of the
Renesas m66592-udc driver.  Updates include:

 - Fix some locking bugs; and add a few sparse annotations
 - Don't #define __iomem !
 - Lots of whitespace fixes (most of the patch by volume)
 - Some #include file trimmage
 - Other checkpatch.pl and sparse updates
 - Alphabetized and slightly-more-informative Kconfig
 - Don't use the ID which was assigned to the amd5536udc driver.
 - Remove pointless suspend/resume methods updating obsolete field.
 - Some section fixups
 - Fix some leak bugs
 - Fix byteswapping

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:05 -07:00
Alan Stern d8fbba2f59 USB: usb-storage: unusual_devs entry for Nikon D100
This patch (as938) adds an unusual_devs entry for the Nikon DSC D100.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:05 -07:00
Jesper Juhl 0d46c0079a USB: Remove pointless conditional in drivers/usb/serial/io_ti.c::edge_shutdown()
Coverity scan found (CID: 1708) this in
drivers/usb/serial/io_ti.c::edge_shutdown() :

...
2797 		for (i=0; i < serial->num_ports; ++i) {
2798 			edge_port = usb_get_serial_port_data(serial->port[i]);
2799 			edge_remove_sysfs_attrs(edge_port->port);
2800 			if (edge_port) {
2801 				edge_buf_free(edge_port->ep_out_buf);
2802 				kfree(edge_port);
2803 			}
2804 			usb_set_serial_port_data(serial->port[i], NULL);
2805 		}
...

It's complaining that we dereference 'edge_port' in line 2799 which
makes the test of that pointer against NULL in 2800 pointless, since if
edge_port was actually NULL we'd have crashed already before reaching
line 2800.
Reading the edge_open() function it seems to me that the pointer
returned by usb_get_serial_port_data(serial->port[i]) and stored in
'edge_port' can never actually be NULL here, so the test is entirely
superfluous (even if it could be NULL it would be pointless here,
ignoring the then possible crash in that case, since both
edge_buf_free() and kfree() can handle being passed NULL pointers.

This patch removes the pointless conditional (and also makes a few
tiny style corrections now that I was in the area anyway).


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:05 -07:00
Thomas Dahlmann 167a675a8c USB: MAINTAINERS entry for amd5536udc
MAINTAINERS entry for amd5536udc driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:05 -07:00
Thomas Dahlmann 55d402d854 USB: amd5536 UDC driver (in GEODE southbridge)
Driver for the AMD5536 UDC, as found in the AMD Geode CS5536 (southbridge).
This is a high speed DMA-capable controller, which can also be used in
OTG configurations (which are not supported by this patch).

Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:05 -07:00
Alan Stern beafef072a USB: documentation update for usb_unlink_urb
This patch (as936) updates the kerneldoc for usb_unlink_urb.  The
explanation of how endpoint queues are meant to work is now clearer
and in better agreement with reality.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:05 -07:00
Alan Stern e7e7c360fb UHCI: short control URBs get a status stage
It has recently been pointed out that short control transfers should
have a status stage, even if they generate an error because
URB_SHORT_NOT_OK was set.  This patch (as935) changes uhci-hcd to
enable the status stage when this happens.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:04 -07:00
Florin Malita e94fa28f13 USB: mos7720, mos7840: remove redundant urb check
Coverity (1709, 1710, 1711, 1712, 1713) actually flagged these as
REVERSE_INULLs (NULL check performed after dereference). But looking at
the other drivers I can't see any similar tests and the USB core already
makes sure urb is non-null - so might as well get rid of the checks.


Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:04 -07:00
Alan Stern 195af2cce5 USB: fix warning caused by autosuspend counter going negative
This patch (as937) fixes a minor bug in the autosuspend usage-counting
code.  Each hub's usage counter keeps track of the number of
unsuspended children.  However the current driver increments the
counter after registering a new child, by which time the child may
already have been suspended and caused the counter to go negative.
The obvious solution is to increment the counter before registering
the child.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:04 -07:00
Alan Stern 69d42a78f9 USB: add "descriptors" binary sysfs attribute
This patch (as934) adds a new readonly binary sysfs attribute file
called "descriptors" for each USB device.  The attribute contains the
device descriptor followed by the raw descriptor entry (config plug
subsidiary descriptors) for the current configuration.

Having this information available in fixed-format binary makes life a
lot easier for user programs by avoiding the need to open, read, and
parse multiple sysfs text files.

The information in this attribute file is much like that in usbfs's
device file, but there are some significant differences:

	The 2-byte fields in the device descriptor are left in
	little-endian byte order, as they appear on the bus and
	in the kernel.

	Only one raw descriptor set is presented, that of the
	current configuration.

	Opening this file will not cause a suspended device to be
	autoresumed.

The last item in particular should be a big selling point for libusb,
which currently forces all USB devices to be resumed as it scans the
device tree.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Dave Mielke <dave@mielke.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:04 -07:00
Alan Stern 1b4cd43bd3 isp116x-hcd: prepare for urb->status
This patch (as931b), adapted from a patch by Olav Kongas, makes a small
set of conservative changes to the isp116x-hcd driver in preparation
for the removal of urb->status.

	finish_request() is moved up in the source and is called
	as soon as the URB is known to have completed, rather than
	after all the active endpoints have been scanned.

	The status of a completed URB is kept in a local variable
	and copied to urb->status only when the URB is about to be
	given back.

	-EREMOTEIO error status for control transfers is set after
	the status stage rather than when the short packet arrives.

	Some unnecessary uses of urb->lock are removed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:04 -07:00
Pete Zaitcev 10e485221e USB: usblp: "Big cleanup" breaks O_NONBLOCK
I found the first regresson in the rewritten ("all dynamic" and "no races")
driver. If application uses O_NONBLOCK, I return -EAGAIN despite the URB
being submitted successfuly. This causes the application to resubmit the
same data erroneously.

The fix is to pretend that the transfer has succeeded even if URB was
merely queued. It is the same behaviour as with the old version.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:03 -07:00
Kevin Lloyd 9454c46a89 USB: sierra: Add new devices
This patch adds new devices to the Sierra Wireless driver. This is being
resubmitted because the dependent patch (patch 01/02) needed to be
resubmitted.

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:03 -07:00
Kevin Lloyd 112225b13c USB: sierra: Add TRU-Install (c) Support
This patch adds compatibility with Sierra Wireless' new TRU-Install
feature. Future devices that use this feature will not work unless this
patch has been applied.

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:03 -07:00
Matthias Kaehlcke eb33caec1e USB: use mutex instead of semaphore in the FTDI ELAN driver
The FTDI ELAN driver uses a semaphore as mutex. Use the mutex API
instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:03 -07:00
Matthias Kaehlcke 8293c568b2 USB: use mutex instead of semaphore in the Adutux driver
The Adutux driver uses a semaphore as mutex. Use the mutex API
instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:03 -07:00
Matthias Kaehlcke d2066eb659 USB: use mutex instead of semaphore in the ELAN U132 adapter driver
The ELAN U132 adapter driver uses the semaphore u132_module_lock
as mutex. Use the mutex API instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:03 -07:00
Matthias Kaehlcke 831c70fc13 USB: use mutex instead of semaphore in the USB gadget serial driver
The USB gadget serial driver uses a semaphore as mutex. Use the
mutex API instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:03 -07:00
Linus Torvalds 64fb98fc40 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: (23 commits)
  ide: add support for SCSI ioctls to ide-floppy
  ide: remove stale changelog from setup-pci.c
  ide: remove stale changelog/comments/TODO from ide.c
  ide-cris: handle PIO auto-tuning in tune_cris_ide()
  ide: add PIO masks
  ide: remove ide_find_best_pio_mode()
  ide: drop "PIO data" argument from ide_get_best_pio_mode()
  ide: ide_find_best_pio_mode() fixes (take 2)
  ide: add ide_pio_cycle_time() helper (take 2)
  sc1200: remove stale Power Management code
  ide: ide_start_power_step() fix WRT disabling DMA
  serverworks: fix DMA
  serverworks: always tune PIO
  ide: add ide_pci_device_t.host_flags (take 2)
  ide: add ide_dev_has_iordy() helper (take 4)
  ide: make ide_get_best_pio_mode() print info if overriding PIO mode
  siimage: PIO mode setup fixes (take 2)
  atiixp: PIO mode setup fixes
  ide: Stop mapping ROMs
  IDE: Remove references to dead ETRAX-related variables.
  ...
2007-07-19 16:31:22 -07:00
Al Viro 5f47c7eac6 coda breakage
a) switch by loff_t == __cmpdi2 use.  Replaced with a couple
of obvious ifs; update of ->f_pos in the first one makes sure that we
do the right thing in all cases.
	b) block_signals() and unblock_signals() are globals on UML.
Renamed coda ones; in principle UML probably ought to do rename as
well, but that's another story.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19 16:29:55 -07:00
Al Viro c65c5131b3 missed cong_avoid() instance
Removal of rtt argument in ->cong_avoid() had missed tcp_htcp.c
instance.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19 16:29:55 -07:00
Bartlomiej Zolnierkiewicz 89636af25d ide: add support for SCSI ioctls to ide-floppy
Now that ide-floppy supports SG_IO we can add support for SCSI ioctls
(except deprecated SCSI_IOCTL_SEND_COMMAND and legacy CDROM_SEND_PACKET
ones - we can add them later iff really needed).

While at it remove handling of CDROMEJECT and CDROMCLOSETRAY ioctls from
generic_ide_ioctl():

- This prevents ide-{disk,tape,scsi} device drivers from obtaining
  REQ_TYPE_BLOCK_PC type requests which are currently unsupported by
  these drivers and which are potentially harmful (as reported by Andrew).

- There is no functionality loss since aforementioned ioctls will now be
  handled by idefloppy_ioctl()->scsi_cmd_ioctl() (for devices using
  ide-floppy driver) and by idecd_ioctl->cdrom_ioctl()->scsi_cmd_ioctl()
  (for devices using ide-cd driver).

Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:59 +02:00
Bartlomiej Zolnierkiewicz 4bf9fdf7f2 ide: remove stale changelog from setup-pci.c
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:59 +02:00
Bartlomiej Zolnierkiewicz 74565073cb ide: remove stale changelog/comments/TODO from ide.c
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:59 +02:00
Bartlomiej Zolnierkiewicz d281e9ad87 ide-cris: handle PIO auto-tuning in tune_cris_ide()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:59 +02:00
Bartlomiej Zolnierkiewicz 4099d14322 ide: add PIO masks
* Add ATA_PIO[0-6] defines to <linux/ata.h>.

* Add ->pio_mask field to ide_pci_device_t and ide_hwif_t.

* Add PIO masks to host drivers.

<linux/ata.h> change ACK-ed by Jeff Garzik <jeff@garzik.org>.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:59 +02:00
Bartlomiej Zolnierkiewicz 6a824c92db ide: remove ide_find_best_pio_mode()
* Add ->host_flags to ide_hwif_t to store ide_pci_device_t.host_flags,
  assign it in setup-pci.c:ide_pci_setup_ports().

* Add IDE_HFLAG_PIO_NO_{BLACKLIST,DOWNGRADE} to ide_pci_device_t.host_flags
  and teach ide_get_best_pio_mode() about them.  Also remove needless
  !drive->id check while at it (drive->id is always present).

* Convert amd74xx, via82cxxx and ide-timing.h to use ide_get_best_pio_mode()
  and then remove no longer needed ide_find_best_pio_mode().

There should be no functionality changes caused by this patch.

Acked-by: Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:58 +02:00
Bartlomiej Zolnierkiewicz 2134758d2a ide: drop "PIO data" argument from ide_get_best_pio_mode()
* Drop no longer needed "PIO data" argument from ide_get_best_pio_mode()
  and convert all users accordingly.

* Remove no longer needed ide_pio_data_t.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:58 +02:00
Bartlomiej Zolnierkiewicz e5fa4b2968 ide: ide_find_best_pio_mode() fixes (take 2)
* Check IORDY bit for PIO modes > 2.

* Some devices claim maximum PIO mode > 2 in id->tPIO, they were punished too
  severly for this by being limited to PIO_SLOW.  Limit them to PIO2 instead.

v2:
* Fix PIO number being returned incorrectly instead of PIO mode
  (Noticed by Sergei).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:57 +02:00
Bartlomiej Zolnierkiewicz 7dd00083b1 ide: add ide_pio_cycle_time() helper (take 2)
* Add ide_pio_cycle_time() helper.

* Use it in ali14xx/ht6560b/qd65xx/cmd64{0,x}/sl82c105 and pmac host drivers
  (previously cycle time given by the device was only used for "pio" == 255).

* Remove no longer needed ide_pio_data_t.cycle_time field.

v2:
* Fix "ata_" prefix (Noticed by Jeff).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:56 +02:00
Bartlomiej Zolnierkiewicz 31c4df441c sc1200: remove stale Power Management code
* Nowadays core IDE code handles restoring of PIO and DMA modes
  (ide-io.c:ide_start_power_step() etc) so remove open-coded version
  from sc1200_resume().

  There should be no change in behavior because settings done by
  sc1200_resume() were always overridden by generic_ide_resume()
  and ide_{start,stop}_power_step().

* Bump driver version.

Cc: Mark Lord <mlord@pobox.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:56 +02:00
Bartlomiej Zolnierkiewicz 8987d21ba6 ide: ide_start_power_step() fix WRT disabling DMA
* Do the same thing as probe_hwif() and always disable DMA so chipset DMA
  enabled bit gets cleared (if the drive doesn't support DMA ide_set_dma()
  won't try to tune it anyway).

* Add TODO comment about respecting ->using_dma setting.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:56 +02:00
Bartlomiej Zolnierkiewicz 1c164acf50 serverworks: fix DMA
The driver used to depend on BIOS settings for deciding whether it is OK
to use DMA.  However it seems that BIOS doesn't always handle all cases
correctly so just let IDE core to decide about this.  It should be a safe
thing to do now, after the driver went through heavy bugfixing.

Thanks for bugreport and testing the patch goes out to Sven Niedner.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:56 +02:00
Bartlomiej Zolnierkiewicz 1880a8d7f2 serverworks: always tune PIO
* Always set ->autotune so PIO gets correctly auto-tuned (previously
  ->autotune was only set when ->dma_base wasn't available, however
  ->ide_dma_check()/->speedproc() was always trying to tune PIO when
  tuning DMA).

* Move code responsible for programming chipset for PIO mode from
  svwks_tune_chipset() to svwks_tune_pio().  Don't tune PIO when tuning
  DMA (this is no longer needed since ->autotune is always set now).

* Handle PIO modes early in svwks_tune_chipset() so DMA configuration
  registers don't get cleared when programming PIO mode.

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:56 +02:00
Bartlomiej Zolnierkiewicz a5d8c5c834 ide: add ide_pci_device_t.host_flags (take 2)
* Rename ide_pci_device_t.flags to ide_pci_device_t.host_flags
  and IDEPCI_FLAG_ISA_PORTS flag to IDE_HFLAG_ISA_PORTS.

* Add IDE_HFLAG_SINGLE flag for single channel devices.

* Convert core code and all IDE PCI drivers to use IDE_HFLAG_SINGLE
  and remove no longer needed ide_pci_device_t.channels field.

v2:
* Fix issues noticed by Sergei:
  - correct code alignment in scc_pata.c
  - s/IDE_HFLAG_SINGLE/~IDE_HFLAG_SINGLE/ in serverworks.c

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:55 +02:00
Bartlomiej Zolnierkiewicz 2229833c13 ide: add ide_dev_has_iordy() helper (take 4)
* Add ide_dev_has_iordy() helper and use it sl82c105 host driver.

* Remove no longer needed ide_pio_data_t.use_iordy field.

v2/v3:
* Fix issues noticed by Sergei:
  - correct patch description
  - fix comment in ide_get_best_pio_mode()

v4:
* Fix "ata_" prefix (Noticed by Jeff).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:55 +02:00
Bartlomiej Zolnierkiewicz 342cdb6d47 ide: make ide_get_best_pio_mode() print info if overriding PIO mode
* Print info about overriding PIO mode in ide_get_best_pio_mode().

* Remove info about overriding PIO mode from cmd64{0,x} host drivers.

* Remove no longer needed ide_pio_data_t.overridden field.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:55 +02:00
Bartlomiej Zolnierkiewicz 328dcbb636 siimage: PIO mode setup fixes (take 2)
* Add sil_tuneproc() wrapper for siimage_tuneproc() which also sets
  PIO mode on the device.

* Add missing ide_get_best_pio_mode() call to sil_tuneproc() so
  "pio" == 255 (autotune) is handled correctly (previously PIO0 was used)
  and "pio" values > 4 && < 255 are filtered to PIO4 (instead of PIO0).

* Add code limiting maximum PIO mode according to the pair device capabilities
  to sil_tuneproc().

* Convert users of config_siimage_chipset_for_pio() to use sil_tune_pio() and
  sil_tuneproc().  This fixes PIO fallback in siimage_config_drive_for_dma() to
  use max PIO mode available instead of PIO4 (config_siimage_chipset_for_pio()
  used wrong arguments for ide_get_best_pio_mode() and as a results always
  tried to set PIO4).

* Remove no longer needed siimage_taskfile_timing()
  and config_siimage_chipset_for_pio().

* Enable ->autotune unconditionally and remove PIO tuning for UDMA/MDMA modes
  from siimage_speedproc()

* Bump driver version.

v2:
* Fix issues noticed by Sergei:
  - correct pair device check
  - trim only taskfile PIO to the slowest of the master/slave
  - enable ->autotune unconditionally and remove PIO tuning for UDMA/MDMA modes
    from siimage_speedproc()
  - add TODO item for IORDY bugs
  - minor cleanups

Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:54 +02:00
Bartlomiej Zolnierkiewicz 485efc6cf5 atiixp: PIO mode setup fixes
* Split off exisiting atiixp_tuneproc() into atiixp_tune_pio()
  and then add setting device PIO mode to atiixp_tuneproc().

* Add missing ide_get_best_pio_mode() call to atiixp_tuneproc() so
  "pio" == 255 (autotune) is handled correctly and "pio" values > 4 && < 255
  are filtered to PIO4 (previously "pio" == 5 could result in wrong timings
  being used and "pio" values > 4 && < 255 in an OOPS).

* Handle PIO modes early in atiixp_speedproc() so save_mdma_mode[]
  doesn't get cleared.

* In atiixp_dma_check():
  - fix max_mode argument for ide_get_best_pio_mode()
  - don't call atiixp_dma_2_pio() so PIO1 doesn't get remapped to PIO0
  - use atiixp_tuneproc() instead of atiixp_speedproc()

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:54 +02:00
Alan Cox 9702b5d5c2 ide: Stop mapping ROMs
Various old IDE drivers go mapping ROM devices for no apparent reason and
without using the ROM mapping API we now have. They don't actually use
the ROM they map and the new libata drivers are happy without it being
mapped so rather than port them lets just junk it for the next -rc1.

Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:54 +02:00
Robert P. J. Day c82d72f5c5 IDE: Remove references to dead ETRAX-related variables.
The two CONFIG variables

        CONFIG_ETRAX_IDE_CSE1_16_RESET
        CONFIG_ETRAX_IDE_CSP0_8_RESET

appear to have been dead since way back in 2.5.xx days:

http://www.linuxhq.com/kernel/v2.5/75/arch/cris/drivers/Kconfig

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: Michael Starvik <starvik@axis.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:54 +02:00
Marcin Juszkiewicz 363f7e428d PCMCIA: Add another MemoryCard to ide-cs/pata_pcmcia
One card submitted by user.

Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:53 +02:00
Kou Ishizaki 4ae41ff887 scc_pata.c: Workaround for errata A308 (take 2)
Workaround for errata A308: turn down the UDMA mode and retry
the DMA command when the data lost condition is detected.

take2:
udma_filter() hook is used to limit ATAPI UDMA mode.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:53 +02:00