]> Pileus Git - ~andy/linux/log
~andy/linux
16 years agoUSB: Add missing "space" to printk messages
Joe Perches [Tue, 20 Nov 2007 01:53:33 +0000 (17:53 -0800)]
USB: Add missing "space" to printk messages

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: m66592-udc: Add support for SH7722 USBF
Yoshihiro Shimoda [Thu, 22 Nov 2007 12:00:30 +0000 (21:00 +0900)]
USB: m66592-udc: Add support for SH7722 USBF

Add support for SuperH SH7722 USB Function.

M66592 is similar to SH7722 USBF. It can support SH7722 USBF by
changing several M66592 code.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: TI 3410/5052 USB Serial: convert td_open_close_lock to mutex
Matthias Kaehlcke [Wed, 21 Nov 2007 23:13:16 +0000 (15:13 -0800)]
USB: TI 3410/5052 USB Serial: convert td_open_close_lock to mutex

TI 3410/5052 USB Serial: convert semaphore td_open_close_lock to the mutex
API.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: device DMA support on OMAP2
Kyungmin Park [Wed, 21 Nov 2007 23:13:15 +0000 (15:13 -0800)]
USB: device DMA support on OMAP2

The current omap udc dosen't support the DMA mode and it has some problem
at setup time on OMAP2 with previous patch file.  I found that the code
assumes bulk out required the big data transfer.  But MODE SELECT(6) sent
the only 24 bytes.  it makes a problem.  So I implement the small packets
handling for it.

It is tested with both linux and windows.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: usb/mon/mon_bin.c: cleanups
Adrian Bunk [Wed, 21 Nov 2007 23:13:15 +0000 (15:13 -0800)]
USB: usb/mon/mon_bin.c: cleanups

- make the needlessly global struct mon_fops_binary static
- #if 0 the unused mon_bin_mmap() and related code

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: s3c2410_udc: minor irq handler cleanups
Jeff Garzik [Wed, 21 Nov 2007 23:13:10 +0000 (15:13 -0800)]
USB: s3c2410_udc: minor irq handler cleanups

- 'irq' argument is merely used in place of a constant; replace its usage
  with that constant.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: sisusb: *_ioctl32_conversion functions do not exist in recent kernels
Fernando Luis Vázquez Cao [Mon, 5 Nov 2007 07:21:11 +0000 (16:21 +0900)]
USB: sisusb: *_ioctl32_conversion functions do not exist in recent kernels

Remove dead code while at it.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: sis FB driver: *_ioctl32_conversion functions do not exist in recent kernels
Fernando Luis Vazquez Cao [Wed, 21 Nov 2007 23:13:12 +0000 (15:13 -0800)]
USB: sis FB driver: *_ioctl32_conversion functions do not exist in recent kernels

Remove dead code while at it.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Cc: Greg KH <greg@kroah.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: add iuu_phoenix driver
Alain Degreffe [Fri, 26 Oct 2007 11:51:49 +0000 (13:51 +0200)]
USB: add iuu_phoenix driver

Signed-off-by: Alain Degreffe <eczema@ecze.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: isd200: don't include <linux/ide.h>
Bartlomiej Zolnierkiewicz [Sat, 27 Oct 2007 16:01:04 +0000 (18:01 +0200)]
USB: isd200: don't include <linux/ide.h>

Now that commit 3794ade5b286cbd4551009dd341dbe9aeead2bc3 removed
incorrect dependency on CONFIG_IDE we can fix the driver to not
include <linux/ide.h>:

* add ATA_REG_{ERROR,LCYL,HCYL,STATUS}_OFFSET defines and use them
  instead of IDE_{ERROR,LCYL,HCYL,STATUS}_OFFSET from <linux/ide.h>

* remove no longer needed <linux/ide.h> include

* remove incorrect comment added by the last commit:
  - isd200.c is not the only user of struct hd_driveid besides IDE
    (see drivers/block/xsysace.c and arch/um/drivers/ubd_kern.c)

Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: autosuspend for cdc-acm
Oliver Neukum [Fri, 12 Oct 2007 15:24:28 +0000 (17:24 +0200)]
USB: autosuspend for cdc-acm

Here we go. This patch implements suspend/resume and autosuspend
for the CDC ACM driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Remove unnecessary zeroing from ub
Pete Zaitcev [Wed, 24 Oct 2007 01:57:25 +0000 (18:57 -0700)]
USB: Remove unnecessary zeroing from ub

These zeroings were taken from usb-storage long time ago. I examined
the submission paths and usb_fill_bulk_urb and found them unnecessary.

Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Convert from class_device to device for USB core
Tony Jones [Tue, 11 Sep 2007 21:07:31 +0000 (14:07 -0700)]
USB: Convert from class_device to device for USB core

Convert from class_device to device for drivers/usb/core.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: handle idVendor of 0x0000
Greg Kroah-Hartman [Mon, 28 Jan 2008 17:50:12 +0000 (09:50 -0800)]
USB: handle idVendor of 0x0000

Some crazy devices in the wild have a vendor id of 0x0000.  If we try to
add a module alias with this id, we just can't do it due to a check in
the file2alias.c file.  Change the test to verify that both the vendor
and product ids are 0x0000 to show a real "blank" module alias.

Note, the module-init-tools package also needs to be changed to properly
generate the depmod tables.

Cc: Janusz <janumix@poczta.fm>
Cc: stable <stable@kernel.org>
Cc: Jon Masters <jcm@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: fix usbtest halt check on big endian systems
Jan Andersson [Tue, 8 Jan 2008 15:39:49 +0000 (16:39 +0100)]
usb: fix usbtest halt check on big endian systems

usbtest did not swap the received status information when checking for
a non-zero value and failed to discover halted endpoints on big endian
systems.

Cc: stable <stable@kernel.org>
Signed-off-by: Jan Andersson <jan@gaisler.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: storage: Add unusual_dev for HP r707
Grant Grundler [Thu, 24 Jan 2008 05:31:03 +0000 (21:31 -0800)]
USB: storage: Add unusual_dev for HP r707

Add "FIX_CAPACITY" entry for HP Photosmart r707 Camera in "Disk" mode.
Camera will wedge when /lib/udev/vol_id attempts to access the last sector,
EIO gets reported to dmesg, and block device is marked "offline" (it is).
Reproduced vol_id behavior with:
"dd if=/dev/sda of=/dev/null skip=60800 count=1"

Cc: stable <stable@kernel.org>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Variant of the Dell Wireless 5520 driver
Nate Carlson [Thu, 24 Jan 2008 18:45:07 +0000 (12:45 -0600)]
USB: Variant of the Dell Wireless 5520 driver

I've got a Dell wireless 5520 card with a different USB ID - specifically, 8136
instead of 8137. Attached a small patch to add support, and the output of an
'ati3'.

If we could get this in, that'd be sweet.  ;)  Thanks!

nc@knight:~/tmp/linux-2.6.24-rc8/drivers/usb/serial$ lsusb | grep 8136
Bus 001 Device 005: ID 413c:8136 Dell Computer Corp.
nc@knight:~/tmp/linux-source-2.6.23/drivers/usb/serial$ cu -l ttyUSB0 -s 115200
Connected.
ati3
Manufacturer: Novatel Wireless Incorporated
Model: Expedite EU860D MiniCard
Revision: 10.10.04.01-01  [2007-04-11 14:07:19]
IMEI: 011186000228043
+GCAP: +CGSM,+DS,+ES

From: Nate Carlson <natecars@natecarlson.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: use GFP_NOIO in reset path
Oliver Neukum [Thu, 10 Jan 2008 09:31:48 +0000 (10:31 +0100)]
USB: use GFP_NOIO in reset path

this function will run in the context of the scsi error handler thread.
It must use GFP_NOIO instead of GFP_KERNEL to avoid a possible
deadlock.

Cc: stable <stable@kernel.org>
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ftdi driver - add support for optical probe device
Ed Beroset [Thu, 17 Jan 2008 22:37:46 +0000 (17:37 -0500)]
USB: ftdi driver - add support for optical probe device

Added support for the Elster Unicom III Optical Probe.
The device ID has already been added to the usb.ids file.

Cc: stable <stable@kernel.org>
Signed-off-by: Ed Beroset <beroset@mindspring.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: pl2303: add support for RATOC REX-USB60F
Akira Tsukamoto [Fri, 18 Jan 2008 09:58:28 +0000 (18:58 +0900)]
USB: pl2303: add support for RATOC REX-USB60F

pl2303: add support for RATOC REX-USB60F

This patch adds support for RATOC REX-USB60F Serial Adapters,
which is widely used in Japan recently.

Cc: stable <stable@kernel.org>
Signed-off-by: Akira Tsukamoto <akirat@rd.scei.sony.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: remove duplicate entry in Option driver and Pl2303 driver for Huawei modem
Daniel Kozák [Sat, 12 Jan 2008 10:53:09 +0000 (11:53 +0100)]
USB: remove duplicate entry in Option driver and Pl2303 driver for Huawei modem

Remove entry for Huawei E620 UMTS/HSDPA card (ID: 12d1:1001) in pl2303 driver
Option driver is use instead

Cc: stable <stable@kernel.org>
Signed-off-by: Daniel Kozák <kozzi11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: sierra: add support for Onda H600/Zte MF330 datacard to USB Driver for Sierra...
Bruno Redondi [Fri, 11 Jan 2008 21:00:59 +0000 (22:00 +0100)]
USB: sierra: add support for Onda H600/Zte MF330 datacard to USB Driver for Sierra Wireless

Added support for Onda H600/Zte MF330 GPRS/UMTS/HSDPA datacard

Cc: stable <stable@kernel.org>
Signed-off-by: Bruno Redondi <bruno.redondi@altarisoluzione.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ftdi-sio: Patch to add vendor/device id for ATK_16IC CCD
Franco Lanza [Wed, 26 Dec 2007 02:29:33 +0000 (03:29 +0100)]
USB: ftdi-sio: Patch to add vendor/device id for ATK_16IC CCD

little patches only to add vendor/device id of ATK_16IC CCD cam for
astronomy.

From: Franco Lanza <nextime@nexlab.it>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ftdi_sio - enabling multiple ELV devices, adding EM1010PC
Peter Stark [Tue, 25 Dec 2007 17:32:08 +0000 (18:32 +0100)]
USB: ftdi_sio - enabling multiple ELV devices, adding EM1010PC

I work with a group of people on a free home automation tool called
FHEM.  Some of the users own more than one USB-serial device by ELV. The
ftdi_sio driver has most of the ELV devices disabled by default and
needs to be re-enabled every time you get a new kernel. Additionally a
new device (EM 1010 PC - enegry monitor) is missing in the list.
Currently our users have to follow the instructions we provide at
http://www.koeniglich.de/fhem/linux.html ... However, to some users it
is too complicated to compile their own kernel module.

We are aware that you can specify one additional device using the
vendor/product option of the module. But lot's of users own more than
one device.

Cc: stable <stable@kernel.org>
Signed-off-by: Peter Stark <peter.stark@t-online.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB : correct comments in usb/core/notify.c
Manish Katiyar [Sat, 15 Dec 2007 05:31:14 +0000 (11:01 +0530)]
USB : correct comments in usb/core/notify.c

This patch corrects the wrong function name mentioned in the comments
of usb_unregister_notify function.

Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: sierra driver - add devices
Kevin Lloyd [Thu, 10 Jan 2008 19:11:04 +0000 (11:11 -0800)]
USB: sierra driver - add devices

The following improvements were made:
 - Added new product support: MC5725, AC 880 U, MP 3G (UMTS & CDMA)

Cc: stable <stable@kernel.org>
Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Adding YC Cable USB Serial device to pl2303
Damien Stuart [Sun, 6 Jan 2008 18:51:39 +0000 (13:51 -0500)]
USB: Adding YC Cable USB Serial device to pl2303

This simply adds the "YC Cable" as a vendor and its pl2303-based
USB<->Serial adapter as a product.  This particular adapter is sold by
Radio Shack.  I've done limited testing on a few different systems with
no issues.

Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Sierra - Add support for Aircard 881U
Jessica L. Blank [Mon, 31 Dec 2007 02:11:35 +0000 (20:11 -0600)]
USB: Sierra - Add support for Aircard 881U

Adds the appropriate vendor and device IDs for the AirCard 881U to
sierra.c. (This device is often rebadged by AT&T as the USBConnect 881).

Cc: stable <stable@kernel.org>
Signed-off-by: Jessica L Blank <j@twu.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: add support for 4348:5523 WinChipHead USB->RS 232 adapter
Piotr Roszatycki [Wed, 2 Jan 2008 10:16:57 +0000 (11:16 +0100)]
USB: add support for 4348:5523 WinChipHead USB->RS 232 adapter

add support for:

  4348:5523 WinChipHead USB->RS 232 adapter with Prolifec PL 2303 chipset

[ mingo@elte.hu: merged it and nursed it upstream ]

Cc: stable <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: CP2101 New Device IDs
Craig Shelley [Thu, 3 Jan 2008 12:45:59 +0000 (12:45 +0000)]
USB: CP2101 New Device IDs

Six new device IDs for CP2101 driver.

Cc: stable <stable@kernel.org>
Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb gadget: fix fsl_usb2_udc potential OOPS
Li Yang [Thu, 3 Jan 2008 18:04:40 +0000 (10:04 -0800)]
usb gadget: fix fsl_usb2_udc potential OOPS

For fsl_usb2_udc driver, ep0 also has a descriptor.  Current code is
misleading and contains a logical mistake.  Here is the patch to fix it.

 http://bugzilla.kernel.org/show_bug.cgi?id=9595

Cc: stable <stable@kernel.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: keyspan: Fix oops
Alan Cox [Thu, 3 Jan 2008 16:59:04 +0000 (16:59 +0000)]
USB: keyspan: Fix oops

If we get a data URB back from the hardware after we have put the tty to
bed we go kaboom. Fortunately all we need to do is process the URB
without trying to ram its contents down the throat of an ex-tty.

Cc: stable <stable@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoide: move hwif_register() call out of ide_probe_port()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:36 +0000 (23:09 +0100)]
ide: move hwif_register() call out of ide_probe_port()

* Add BUG_ON(hwif->present) at the start of ide_probe_port().

* Move hwif_register() call (along with setting hwif->present) from
  ide_probe_port() to ide_device_add_all().

  As a result the port will be registered with the device tree _after_:
  - probing both devices (if both are present)
  - port reset (if hwif->reset is set)
  - restoring local IRQs state and re-enabling port IRQ

While at it:

* Rename hwif_register() to ide_register_port().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: factor out code for tuning devices from ide_probe_port()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:36 +0000 (23:09 +0100)]
ide: factor out code for tuning devices from ide_probe_port()

* Factor out code for tuning devices from ide_probe_port()
  to ide_port_tune_devices().

* Move ide_port_tune_devices() call from ide_probe_port()
  to ide_device_add_all().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move handling of I/O resources out of ide_probe_port()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:36 +0000 (23:09 +0100)]
ide: move handling of I/O resources out of ide_probe_port()

Reserve/release I/O resources in ide_device_add_all() instead of
ide_probe_port().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make probe_hwif() return an error value
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:36 +0000 (23:09 +0100)]
ide: make probe_hwif() return an error value

Make probe_hwif() return an error value.

While at it:

* Remove comment about MAX_DRIVES == 2 limitation (it is not special to
  probe_hwif(), it is a general assumption taken by a lot of IDE code).

* Rename probe_hwif() to ide_probe_port().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use ide_remove_port_from_hwgroup in init_irq()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:36 +0000 (23:09 +0100)]
ide: use ide_remove_port_from_hwgroup in init_irq()

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: prepare init_irq() for using ide_remove_port_from_hwgroup()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:36 +0000 (23:09 +0100)]
ide: prepare init_irq() for using ide_remove_port_from_hwgroup()

* BUG_ON() early if 'hwif->next == hwif' and there is a 'match' hwgroup.

* Remove printk() for impossible condition and add a BUG_ON(hwgroup->drive)
  to match code in ide_unregister().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: factor out code removing port from hwgroup from ide_unregister()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:35 +0000 (23:09 +0100)]
ide: factor out code removing port from hwgroup from ide_unregister()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: I/O resources are released too early in ide_unregister()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:35 +0000 (23:09 +0100)]
ide: I/O resources are released too early in ide_unregister()

Release I/O resources after releasing DMA.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: cleanup ide_system_bus_speed()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:35 +0000 (23:09 +0100)]
ide: cleanup ide_system_bus_speed()

Use the facts that:

* When ide_init() is called 'system_bus_speed' always equals zero.

* system_bus_clock() is never called before ide_init().

and:

* Move printk() from ide_system_bus_speed() to ide_init().

* Don't assign 'system_bus_speed' in ide_system_bus_speed().

* Don't call ide_system_bus_speed() in system_bus_clock().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove needless zeroing of hwgroup fields from init_irq()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:35 +0000 (23:09 +0100)]
ide: remove needless zeroing of hwgroup fields from init_irq()

Since kmalloc_node() is called with __GFP_ZERO flag there is no need to
explicitly zero hwgroup fields.

While at it:

* Use 'hwif' instead of 'hwif->drives[0].hwif' for kmalloc_node() call.

* Fix whitespace damage.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove unused ide_hwgroup_t fields
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:35 +0000 (23:09 +0100)]
ide: remove unused ide_hwgroup_t fields

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide_platform: remove struct hwif_prop
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:35 +0000 (23:09 +0100)]
ide_platform: remove struct hwif_prop

* Remove 'if (hwif != hwif_prop.hwif)' check from plat_ide_remove()
  (pdev->dev.driver_data and hwif_prop.hwif are set at the same time
   in plat_ide_probe() and are identical).

* Use hwif->index for ide_unregister() in plat_ide_remove().

* Use local variables instead of hwif_prop.plat_ide[_alt]_mapbase in
  plat_ide_probe() and remove no longer needed struct hwif_prop.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove hwif->present manipulations from hwif_init()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:34 +0000 (23:09 +0100)]
ide: remove hwif->present manipulations from hwif_init()

* Call hwif_init() only if hwif->present is set.

* If hwif_init() fails clear hwif->present.

* Remove hwif->present manipulations from hwif_init().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move wait_hwif_ready() documentation in the right place
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:34 +0000 (23:09 +0100)]
ide: move wait_hwif_ready() documentation in the right place

* Move wait_hwif_ready() documentation before this function.

* Fix trailing whitespaces.

* s/wait-for-busy/wait-for-non-busy/

* Remove no longer valid comment about the current code behavior.

* Docbook-ize it.

* Rename wait_hwif_ready() to ide_port_wait_ready().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix handling of busy I/O resources in probe_hwif()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:34 +0000 (23:09 +0100)]
ide: fix handling of busy I/O resources in probe_hwif()

It could be that I/O resources are busy because some other host driver
has already claimed them so don't unregister the devices.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years ago<linux/hdsmart.h> is not used by kernel code
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:34 +0000 (23:09 +0100)]
<linux/hdsmart.h> is not used by kernel code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: don't include <linux/hdsmart.h>
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:34 +0000 (23:09 +0100)]
ide: don't include <linux/hdsmart.h>

IDE doesn't need it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: cleanup header
Borislav Petkov [Fri, 1 Feb 2008 22:09:33 +0000 (23:09 +0100)]
ide-floppy: cleanup header

Move ide-floppy historical changelog to
Documentation/ide/ChangeLog.ide-floppy.1996-2002

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: update/add my Copyrights
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:33 +0000 (23:09 +0100)]
ide: update/add my Copyrights

The last years stuff and a trip down memory lane...

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: delete filenames/versions from comments
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:33 +0000 (23:09 +0100)]
ide: delete filenames/versions from comments

Delete filenames/versions from comments.

I'm leaving decisions about adding DRV_VERSION defines and MODULE_VERSION()-s
to maintainers of the respective drivers.

While at it:

* Remove unused VERSION define from ide.c.

* Remove unused/stale DRV_VERSION define from au1xxx-ide.c.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoau1xxx-ide/rapide: use hwif->index for ide_unregister()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:33 +0000 (23:09 +0100)]
au1xxx-ide/rapide: use hwif->index for ide_unregister()

Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-pmac: macio resource freeing bugfix
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:32 +0000 (23:09 +0100)]
ide-pmac: macio resource freeing bugfix

Release DMA resource before zeroing pmif.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoau1xxx-ide: device tree bugfix
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:32 +0000 (23:09 +0100)]
au1xxx-ide: device tree bugfix

Add missing hw.dev setup (so hwif->gendev.parent will be set by
ide_init_port_hw() to point to the parent device).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use ide_build_sglist() and ide_destroy_dmatable() in non-PCI host drivers
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:32 +0000 (23:09 +0100)]
ide: use ide_build_sglist() and ide_destroy_dmatable() in non-PCI host drivers

* Make ide_build_sglist() and ide_destroy_dmatable() available also when
  CONFIG_BLK_DEV_IDEDMA_PCI=n.

* Use ide_build_sglist() and ide_destroy_dmatable() in {ics,au1xxx-}ide.c
  and remove no longer needed {ics,au}ide_build_sglist().

There should be no functionality changes caused by this patch.

Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: switch to DMA-mapping API
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:32 +0000 (23:09 +0100)]
ide: switch to DMA-mapping API

* pci_map_sg() -> dma_map_sg() in ide_build_sglist().

* pci_unmap_sg() -> dma_unmap_sg() in ide_destroy_dmatable().

There should be no functionality changes caused by this patch except
for blackfin arch whose dma_[un]map_sg() implementation differs from
pci_[un]map_sg() one (on s390 arch there is no PCI, on avr32 and h8300
archs PCI is currently unsupported, on m32r arch PCI support depends
on BROKEN, on m68k arch PCI support depends on HADES which in turn
depends on BROKEN, on all other archs dma_[un]map_sg() functionality
matches with pci_[un]map_sg() one).

blackfin behavior change was ack-ed by Bryan Wu.

Cc: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoicside: use hwif->dev
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:32 +0000 (23:09 +0100)]
icside: use hwif->dev

* Setup hwif->dev in icside_setup().

* Use hwif->dev instead of state->dev in icside_build_sglist(),
  icside_dma_end(), icside_dma_start() and icside_dma_setup().

* Remove no longer needed 'dev' field from struct icside_state.

Cc: Russell King <rmk@arm.linux.org.uk>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoau1xxx-ide: use hwif->dev
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:31 +0000 (23:09 +0100)]
au1xxx-ide: use hwif->dev

* Setup hwif->dev in au_ide_probe().

* Use hwif->dev instead of ahwif->dev in auide_build_sglist(),
  auide_build_dmatable(), auide_dma_end() and auide_ddma_init().

* Remove no longer needed 'dev' field from _auide_hwif type.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: keep pointer to struct device instead of struct pci_dev in ide_hwif_t
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:31 +0000 (23:09 +0100)]
ide: keep pointer to struct device instead of struct pci_dev in ide_hwif_t

Keep pointer to struct device instead of struct pci_dev in ide_hwif_t.

While on it:
* Use *dev->dma_mask instead of pci_dev->dma_mask in ide_toggle_bounce().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use ide_destroy_dmatable() instead of pci_unmap_sg() (take 2)
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:31 +0000 (23:09 +0100)]
ide: use ide_destroy_dmatable() instead of pci_unmap_sg() (take 2)

Use ide_destroy_dmatable() in:
* ide-dma.c::ide_build_dmatable()
* sgiioc4.c::sgiioc4_build_dma_table()
* pmac.c::pmac_ide_{build,destroy}_dmatable()

There should be no functionality changes caused by this patch.

v2:
* pmac.c build fix from Andrew Morton.

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove BUG_ON() from ide_build_sglist()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:31 +0000 (23:09 +0100)]
ide: remove BUG_ON() from ide_build_sglist()

do_rw_taskfile() has been fixed to check the return value
of ->dma_setup method so this BUG_ON() is no longer needed.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix ide_intr() for non-PCI devices and CONFIG_BLK_DEV_IDEPCI=y
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:31 +0000 (23:09 +0100)]
ide: fix ide_intr() for non-PCI devices and CONFIG_BLK_DEV_IDEPCI=y

'hwif->pci_dev && !hwif->pci_dev->vendor' condition is never true,
check for 'hwif->chipset != ide_pci' instead.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agopiix: remove stale comments
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:30 +0000 (23:09 +0100)]
piix: remove stale comments

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add IDE_HFLAG_NO_DSC host flag
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:30 +0000 (23:09 +0100)]
ide: add IDE_HFLAG_NO_DSC host flag

* Add IDE_HFLAG_NO_DSC host flag for hosts that doesn't support DSC overlap.

* Set it in aec62xx (for ATP850UF only) and hpt34x host drivers.

* Convert ide-tape device driver to check for IDE_HFLAG_NO_DSC flag.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add IDE_HFLAG_CLEAR_SIMPLEX host flag
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:30 +0000 (23:09 +0100)]
ide: add IDE_HFLAG_CLEAR_SIMPLEX host flag

* Rename 'simplex_stat' variable to 'dma_stat' in ide_get_or_set_dma_base().

* Factor out code for forcing host out of "simplex" mode from
  ide_get_or_set_dma_base() to ide_pci_clear_simplex() helper.

* Add IDE_HFLAG_CLEAR_SIMPLEX host flag and set it in alim15x3 (for M5229),
  amd74xx (for AMD 7409), cmd64x (for CMD643), generic (for Netcell) and
  serverworks (for CSB5) host drivers.

* Make ide_get_or_set_dma_base() test for IDE_HFLAG_CLEAR_SIMPLEX host flag
  instead of checking dev->device (BTW the code was buggy because it didn't
  check for dev->vendor, luckily none of these PCI Device IDs was used by
  some other vendor for PCI IDE controller).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoamd74xx: remove amd_ide_chips table
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:30 +0000 (23:09 +0100)]
amd74xx: remove amd_ide_chips table

* Remove no longer needed assertion from amd74xx_probe().

* Factor out cable detection for AMD7409 to amd7409_cable_detect() and for
  chipsets >= AMD7411 to amd7411_cable_detect().

* Use dev->vendor and dev->device instead of amd_config->udma_mask when
  selecting cable detection method and checking for broken FIFO support in
  init_chipset_amd74xx().

* Remove no longer needed AMD_BAD_FIFO define.

* Add 'swdma' parameter for setting .swdma_mask to DECLARE_AMD_DEV() macro.

* Add 'udma' parameter for setting .udma_mask to DECLARE_{AMD,NV}_DEV() macro.

* Keep a copy of a current amd74xx_chipsets[] entry in amd74xx_probe()
  in order to fix ->swdma_mask on early AMD7409 revisions and ->udma_mask
  on Serenade mainboards.

* Remove no longer needed fixups from init_chipset_amd74xx()
  and AMD_CHECK_{SWDMA,SERENADE} defines.

* Move printing banner message from init_chipset_amd74xx() to amd74xx_probe(),
  also remove incorrect comment while at it.

* Use hwif->ultra_mask instead of amd_config->udma_mask in amd_set_drive().

* Add 'udma_mask' argument to amd_set_speed() and pass UDMA mask from
  amd_set_drive() instead of using amd_config->udma_mask.

* Move amd_config->base from AMD_* defines to users of these defines and add
  0x40 the defined values.  Then add amd_offset() inline helper for selecting
  offset from 0x40 base (needed for nVidia controllers) and finally use it in
  amd_set_speed(), amd7411_cable_detect() and init_chipset_amd74xx() instead
  of amd_config->base.

* Remove no longer needed AMD_BAD_SWDMA define, ->{swdma,ultra}_mask setup
  from init_hwif_amd74xx(), amd_{config,chipset} variables and amd_ide_chips
  table.

* Fix init_chipset_amd74xx() comment.

* Bump driver version.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: ide_setup_dma() assumes 8 ports
Sergei Shtylyov [Fri, 1 Feb 2008 22:09:30 +0000 (23:09 +0100)]
ide: ide_setup_dma() assumes 8 ports

According to http://marc.info/?l=linux-ide&m=114346138611631, the drivers must
always register 8 DMA ports with ide_setup_dma(), so its last argument is not
needed. While at it, kill some useless parens in that function...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agotrm290: cannot call ide_setup_dma()
Sergei Shtylyov [Fri, 1 Feb 2008 22:09:29 +0000 (23:09 +0100)]
trm290: cannot call ide_setup_dma()

The TRM-290 chip is *not* SFF-8038i compatible and therefore can *not* call
ide_setup_dma() -- fix this and also cleanup the code a bit...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: move the remaining cdrom.c ioctl handling code to ide-cd_ioctl.c
Borislav Petkov [Fri, 1 Feb 2008 22:09:29 +0000 (23:09 +0100)]
ide-cd: move the remaining cdrom.c ioctl handling code to ide-cd_ioctl.c

There should be no functional changes from this.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-{floppy,tape}: remove debug code for dumping identify data
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:29 +0000 (23:09 +0100)]
ide-{floppy,tape}: remove debug code for dumping identify data

IDE core supports dumping raw identify data in hdparm friendly format now
so verbose identify dumping in ide-{floppy,tape}.c device drivers (done iff
IDE{FLOPPY,TAPE}_DEBUG_INFO is defined to '1' and it is '0' by default)
is no longer nedeed.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_dump_identify() debug helper
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:28 +0000 (23:09 +0100)]
ide: add ide_dump_identify() debug helper

* Add ide_dump_identify() debug helper for dumping raw identify data in
  the hdparm friendly format (== the identify data can be extracted from
  dmesg output and passed to hdparm --Istdin).

* Dump identify data in ide-probe.c::do_identify() if DEBUG is enabled.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: update driver version, comments and copyrights
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:28 +0000 (23:09 +0100)]
ide-cd: update driver version, comments and copyrights

* Bump driver version.

* Remove filename and stale TODO from comments.

* Add my copyrights.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: unify request end exit path in cdrom_decode_status()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:28 +0000 (23:09 +0100)]
ide-cd: unify request end exit path in cdrom_decode_status()

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_write_check_ireason() and cdrom_read_check_ireason()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:28 +0000 (23:09 +0100)]
ide-cd: merge cdrom_write_check_ireason() and cdrom_read_check_ireason()

Add 'rw' parameter to cdrom_read_check_ireason(), make it handle
both read and write checking, rename it to ide_cd_check_ireason(),
finally remove no longer needed cdrom_write_check_ireason().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_rw_intr() and cdrom_newpc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:28 +0000 (23:09 +0100)]
ide-cd: merge cdrom_rw_intr() and cdrom_newpc_intr()

Add handling of fs read/write requests to cdrom_nepwc_intr()
and remove no longer needed cdrom_rw_intr().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: call blk_dump_rq_flags() on "missing data" in cdrom_rw_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:27 +0000 (23:09 +0100)]
ide-cd: call blk_dump_rq_flags() on "missing data" in cdrom_rw_intr()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: prepare cdrom_rw_intr() and cdrom_newpc_intr() to be merged
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:27 +0000 (23:09 +0100)]
ide-cd: prepare cdrom_rw_intr() and cdrom_newpc_intr() to be merged

In cdrom_newpc_intr():
* cleanup variables in the 'transfer data' loop

In cdrom_rw_intr():
* rename 'sectors_to_transfer' to 'thislen'
* rename 'this_transfer' to 'blen'
* keep number of bytes (instead of sectors) in 'thislen' and 'blen'
* call 'xferfunc' only once for 'blen'
* cache 'rq->buffer' in 'ptr' variable
* check for 'rq->bio' before setting 'ptr' and 'blen'
* check for 'ptr' instead of 'rq->current_nr_sectors'

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: unify moving to the next buffer in cdrom_rw_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:27 +0000 (23:09 +0100)]
ide-cd: unify moving to the next buffer in cdrom_rw_intr()

Use the fact that for the first loop rq->current_nr_sectors is always
set and unify moving to the next buffer for read/write requests.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_start_read() and cdrom_start_write()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:27 +0000 (23:09 +0100)]
ide-cd: merge cdrom_start_read() and cdrom_start_write()

Add handling of read requests to cdrom_start_write(), rename it
to cdrom_start_rw() and remove no longer needed cdrom_start_read().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_start_read_continuation() and cdrom_start_rw_cont()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:27 +0000 (23:09 +0100)]
ide-cd: merge cdrom_start_read_continuation() and cdrom_start_rw_cont()

* Add handling of write requests to cdrom_start_read_continuation(),
  rename it to cdrom_start_rw_cont() and remove no longer needed
  cdrom_start_write_cont().

* Remove redundant '(rq->sector & (sectors_per_frame - 1)' check.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_read_intr() and cdrom_write_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:26 +0000 (23:09 +0100)]
ide-cd: merge cdrom_read_intr() and cdrom_write_intr()

Add handling of read requests to cdrom_write_intr(), rename it
to cdrom_rw_intr() and remove no longer needed cdrom_read_intr().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: factor out transfer size checking from cdrom_read_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:26 +0000 (23:09 +0100)]
ide-cd: factor out transfer size checking from cdrom_read_intr()

This is a preparation for cdrom_read_intr() and cdrom_write_intr() merge.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: add ide_cd_drain_data() helper
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:26 +0000 (23:09 +0100)]
ide-cd: add ide_cd_drain_data() helper

Add ide_cd_drain_data() and use it in cdrom_{buffer_sectors,read_intr}()
(as a nice side-effect this cuts 0.5kB of code from ide-cd.o).

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_do_packet_command() and cdrom_do_block_pc()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:26 +0000 (23:09 +0100)]
ide-cd: merge cdrom_do_packet_command() and cdrom_do_block_pc()

Add REQ_TYPE_{SENSE,ATA_PC} requests handling to cdrom_do_block_pc()
and remove cdrom_do_packet_command().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove cdrom_do_pc_continuation()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:26 +0000 (23:09 +0100)]
ide-cd: remove cdrom_do_pc_continuation()

cdrom_do_pc_continuation() is now identical to cdrom_do_newpc_cont()
so just always use the latter function.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_pc_intr() and cdrom_newpc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: merge cdrom_pc_intr() and cdrom_newpc_intr()

Add handling of REQ_TYPE_{SENSE,ATA_PC} requests to cdrom_newpc_intr()
(please note that these requests never have 'bio' attached to them
and they never use DMA), then remove no longer needed cdrom_pc_intr().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: unify request end exit path in cdrom_pc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: unify request end exit path in cdrom_pc_intr()

This is a preparation for cdrom_pc_intr() and cdrom_newpc_intr() merge.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: factor out request sense fixup from cdrom_pc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: factor out request sense fixup from cdrom_pc_intr()

This is a preparation for cdrom_pc_intr() and cdrom_newpc_intr() merge.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: call blk_dump_rq_flags() on "missing data" in cdrom_newpc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: call blk_dump_rq_flags() on "missing data" in cdrom_newpc_intr()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove BUG_ON() from cdrom_newpc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: remove BUG_ON() from cdrom_newpc_intr()

There is no need for it anylonger and ide_set_handler() complains
if ->handler is not NULL anyway.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: move code handling cdrom.c IOCTLs to ide-cd_ioctl.c
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: move code handling cdrom.c IOCTLs to ide-cd_ioctl.c

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: rename cdrom_* functions to ide_cd_*
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)]
ide-cd: rename cdrom_* functions to ide_cd_*

* cdrom_prepare_request() -> ide_cd_init_rq()
* cdrom_queue_packet_command() -> ide_cd_queue_pc()
* cdrom_lockdoor() -> ide_cd_lockdoor()
* cdrom_read_toc() -> ide_cd_read_toc()
* cdrom_get_toc_entry() -> ide_cd_get_toc_entry()

This is a preparation to move code handling cdrom.c IOCTLs out of ide-cd.c.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: coding style fixes for cdrom_get_toc_entry()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)]
ide-cd: coding style fixes for cdrom_get_toc_entry()

This is a preparation to move code handling cdrom.c IOCTLs out of ide-cd.c.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: move lba_to_msf() and msf_to_lba() to <linux/cdrom.h>
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)]
ide-cd: move lba_to_msf() and msf_to_lba() to <linux/cdrom.h>

* Move lba_to_msf() and msf_to_lba() to <linux/cdrom.h>
  (use 'u8' type instead of 'byte' while at it).

* Remove msf_to_lba() copy from drivers/cdrom/cdrom.c.

Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_select_speed() into ide_cdrom_select_speed()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)]
ide-cd: merge cdrom_select_speed() into ide_cdrom_select_speed()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_read_subchannel() into ide_cdrom_get_mcn()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)]
ide-cd: merge cdrom_read_subchannel() into ide_cdrom_get_mcn()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_play_audio() into ide_cd_fake_play_trkind()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:23 +0000 (23:09 +0100)]
ide-cd: merge cdrom_play_audio() into ide_cd_fake_play_trkind()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: factor out ioctl handlers from ide_cdrom_audio_ioctl()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:23 +0000 (23:09 +0100)]
ide-cd: factor out ioctl handlers from ide_cdrom_audio_ioctl()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: move VERBOSE_IDE_CD_ERRORS code to ide-cd_verbose.c
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:23 +0000 (23:09 +0100)]
ide-cd: move VERBOSE_IDE_CD_ERRORS code to ide-cd_verbose.c

* Rename ide-cd kernel module to ide-cd_mod in preparation to moving code out
  from ide-cd.[c,h].   Add MODULE_ALIAS("ide-cd") to preserve compatibility.

* Move VERBOSE_IDE_CD_ERRORS code from ide-cd.[c,h] to ide-cd_verbose.c.

  ide-cd_verbose.c is IDE subsystem independent and may be easily converted
  into generic library usable by other drivers (i.e. libata) if needed.

* Add CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS config option to drivers/ide/Kconfig
  replacing VERBOSE_IDE_CD_ERRORS define.  Make this config option enabled by
  default and visible only if CONFIG_EMBEDDED is defined.

before the patch:
   text    data     bss     dec     hex filename
  22841     360    1056   24257    5ec1 drivers/ide/ide-cd.o

after the patch w/ CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y:
   text    data     bss     dec     hex filename
  22857     360    1056   24273    5ed1 drivers/ide/ide-cd_mod.o

after the patch w/ CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=n:
   text    data     bss     dec     hex filename
  15091     360    1056   16507    407b drivers/ide/ide-cd_mod.o

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>