Commit Graph

25975 Commits (b8a3a5214d7cc115f1ca3a3967b7229d97c46f4a)

Author SHA1 Message Date
Stefan Richter 93f2e0259a ieee1394: first minimal NUMA awareness
Association of a host device with a node on NUMA machines optimizes
allocations of skbs given from the networking stack to eth1394.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:40 +02:00
Stefan Richter 8e4dc400b7 ieee1394: eth1394: revert parent device to that in 2.6.20
After ieee1394 was converted away from class_device like the networking
subsystem was already in 2.6.21, eth1394's device may point to the
fw-host device as its parent again like in 2.6.20.

This affects userspace tools which examine the sysfs representation of
eth1394's device.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:40 +02:00
Stefan Richter a0e857eeff ieee1394: nodemgr: parallelize between several hosts
Remove the global nodemgr_serialize mutex which enclosed most of the
host thread event loop.  This allows for parallelism between several
host adapter cards.

Properly serialize the driver hooks .update(), .suspend(), .resume(),
and .remove() by means of device->sem.  These hooks can be called from
outside the host threads' contexts.

Get() and put() the device.driver when calling its hooks.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:39 +02:00
Kay Sievers dd7f2928d8 ieee1394: convert ieee1394 from "struct class_device" to "struct device"
Here is a straightforward conversion to "struct device". The "struct
class_device" will be removed from the kernel.

It seems to work fine for me with and without CONFIG_SYSFS_DEPRECATED
set.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:39 +02:00
Stefan Richter 59337087cb ieee1394: raw1394: fix a 32/64-bits compat fix
I was told that only i386 aligns 64 bit integers at 4 bytes boundaries
while all other architectures (32 bit architectures with 64 bit
siblings) align it on 8 bytes boundaries.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:39 +02:00
Stefan Richter 19f00e66f8 ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel, amendment
Pointed out by Arnd Bergmann:  PPC32 aligns this at 64bit, IA32 packs
it.  A kernel-wide available __compat_u64 which is 4-byte aligned on
AMD64 and IA64 would be nicer though.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:38 +02:00
Petr Vandrovec 650c12c528 ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel
Add compat_ioctl.  Although all structures are more or less same,
raw1394_iso_packets got pointer inside, and raw1394_cycle_timer got unwanted
padding in the middle.  I did not add any translation for ioctls passing array
of integers around as integers seem to have same size (32 bits) on all
architectures supported by Linux.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Acked-by: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (split into 3 patches)
2007-07-10 00:07:38 +02:00
Petr Vandrovec 883b97eaf2 ieee1394: raw1394: Fix write() for 32bit userland on 64bit kernel
* write(fd, buf, 52) from 32bit app was returning 56.  Most of callers did not
  care, but some (arm registration) did, and anyway it looks bad if request for
  writing 52 bytes returns 56.  And returning sizeof anything in 'int' is not
  good as well.  So all functions now return '0' instead of
  sizeof(struct raw1394_request) on success, and write() itself provides correct
  return value (it just returns value it was asked to write on success as raw1394
  does not do any partial writes at all).

* Related to this was problem that write() could have returned 0 when kernel
  state would become corrupted and moved to different state than
  opened/initialized/connected.  Now it returns -EBADFD which seemed appropriate.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Acked-by: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (split into 3 patches)
2007-07-10 00:07:37 +02:00
Petr Vandrovec ee9be42596 ieee1394: raw1394: Fix read() for 32bit userland on 64bit kernel
read() always failed with -EFAULT.  This was happening due to
raw1394_compat_read copying data to wrong location - access_ok always
failed as 'r' is kernel address, not user.  Whole function just tried to
copy data from 'r' to 'r', which is not good.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Acked-by: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (split into 3 patches)
2007-07-10 00:07:37 +02:00
Stefan Richter 6552731a05 ieee1394: add comments in struct hpsb_packet
to clarify who is supposed to set what

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:36 +02:00
Stefan Richter 17a624869e ieee1394: ohci1394: remove dead CONFIG variable
spotted by Robert P. J. Day <rpjday@mindspring.com>

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:36 +02:00
Adrian Bunk 27a278aa43 drivers/ide/ide-dma.c: unexport ide_set_dma
ide_set_dma no longer has any modular user.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:59 +02:00
Bartlomiej Zolnierkiewicz bdab00b73d via82cxxx: backport short cables support from pata_via.c
Backport short cables support from pata_via.c.

This patch should allow UDMA > 2 modes on Acer Ferrari 3400.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2007-07-09 23:17:58 +02:00
Bartlomiej Zolnierkiewicz f2befd9e80 sis5513: backport short cables support from pata_sis.c
Backport short cables support from pata_sis.c.

This patch allows UDMA > 2 modes on ASUS A6K.

Thanks to testing this patch goes out to Jiri Stavinoha.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2007-07-09 23:17:58 +02:00
Bartlomiej Zolnierkiewicz 95ba8c17bc alim15x3: backport short cables support from pata_ali.c
Backport short cables support from pata_ali.c and while at it cleanup
existing cable detection code.

This patch should allow UDMA > 2 modes on HP Pavilion N5430 and Fujitsu P2000.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2007-07-09 23:17:58 +02:00
Bartlomiej Zolnierkiewicz 7207626f47 piix: backport short cables support from ata_piix.c
Backport short cables support from ata_piix.c.

This patch should allow UDMA > 2 modes on:
- Acer 5602WLMi
- Acer 3682WLMi
- Asus W5F
- Acer Aspire 2023WLMi

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2007-07-09 23:17:58 +02:00
Bartlomiej Zolnierkiewicz 49521f97cc ide: add short cables support
This patch allows users to override both host and device side cable detection
with "ideX=ata66" kernel parameter.  Thanks to this it should be now possible
to use UDMA > 2 modes on systems (laptops mainly) which use short 40-pin cable
instead of 80-pin one.

Next patches add automatic detection of some systems using short cables.

Changes:

* Rename hwif->udma_four to hwif->cbl and make it u8.

* Convert all existing users accordingly (use ATA_CBL_* defines while at it).  

* Add ATA_CBL_PATA40_SHORT support to ide-iops.c:eighty_ninty_three().

* Use ATA_CBL_PATA40_SHORT for "ideX=ata66" kernel parameter.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2007-07-09 23:17:58 +02:00
Bartlomiej Zolnierkiewicz 75b1d97535 ide: convert ide_find_best_mode() users to use ide_max_dma_mode()
ide-timing.h:

* remove handling of DMA modes from ide_find_best_mode() and rename it to
  ide_find_best_pio_mode()

* drop no longer needed "map" argument from ide_find_best_pio_mode()
  and delete needless ->id check

* remove no longer needed XFER_SWDMA and XFER_UDMA* defines

au1xxx-ide.c:

* use ide_max_dma_mode() instead of ide_find_best_mode()

* remove needless CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA #ifdef

amd74xx.c:

* store UDMA masks in amd_ide_chip[] and while at it make "base" field
  to be u8 instead of unsigned long

* convert the driver to use UDMA masks from amd_ide_chip[]

* use ide_max_dma_mode() and ide_find_best_pio_mode() instead
  of ide_find_best_mode()

* delete stale comment from amd74xx_ide_dma_check()

* remove no longer needed AMD_UDMA* defines

via82cxxx.c:

* remove unused DISPLAY_VIA_TIMINGS define

* store UDMA masks in via_isa_bridges[] and while at it make "flags" field
  to be u8 instead of u16

* convert the driver to use UDMA masks from via_isa_bridges[]

* use ide_max_dma_mode() and ide_find_best_pio_mode() instead
  of ide_find_best_mode()

* remove no longer needed VIA_UDMA* defines

pmac.c:

* use ide_max_dma_mode() instead of ide_find_best_mode()

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2007-07-09 23:17:57 +02:00
Bartlomiej Zolnierkiewicz 15a4f943e7 ide: fix pre-EIDE SWDMA support
If the word 62 is not defined use the word 52 to get SWDMA mask
in ide_get_mode_mask().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:57 +02:00
Andi Drebes ecea57309e drivers/ide/legacy/hd.c: Array size calculation using sizeof replaced with ARRAY_SIZE
This patch replaces an array size calculation in drivers/ide/legacy/hd.c
that was done using sizeof with the ARRAY_SIZE macro.

Tested by compilation on an i386 box using "allyesconfig".
Diffed against Linus' git-tree.

Signed-off-by: Andi Drebes <lists-receive@programmierforen.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:57 +02:00
Robert P. J. Day f50f9d8867 ide: remove content related to dead CONFIG_BLK_DEV_MAC_MEDIABAY config variable
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:57 +02:00
Robert P. J. Day e71bc140c0 ide: remove references to the non-existent CONFIG_SCSI_EATA_DMA
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:57 +02:00
Robert P. J. Day 74c8f97a6c ide-cd: replace C code with call to ARRAY_SIZE() macro
Delete the unnecessary macro ARY_LEN and use ARRAY_SIZE directly.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:57 +02:00
Junio C Hamano f3577db0c2 ide_in_drive_list(): "ALL" is not a wildcard anymore
This removes the support to treat "ALL" as a wildcard for
firmware revision.  This is made a separate patch, as it will
break out-of-tree ide drivers that feed its own table that uses
"ALL" as the wildcard to ide_in_drive_list().

Signed-off-by: Junio C Hamano <junkio@cox.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:57 +02:00
Junio C Hamano c2d3ce8c39 ide_in_drive_list(): accept NULL as the wildcard for firmware revision
Earlier, the matching of (model,rev) in ide-dma black/white list
handling was to consider "ALL" in the table to match any
revision.  This makes NULL to be also an accepted wildcard, and
changes the entries of tables in ide-dma.c to use NULL.

The code still accepts "ALL" as the wildcard, in order to keep
any out-of-tree ide driver that feeds its own table that uses
"ALL" as the wildcard to ide_in_drive_list() function from
breaking.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:56 +02:00
Sergei Shtylyov 6d78013bfc aec62xx: kill speedproc() method wrapper (take 2)
There's no reason to have the speedproc() method wrapper for the two quite
different chip families, so just get rid of it.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:56 +02:00
Matthias Kaehlcke f9383c4269 ide: use mutex instead of ide_setting_sem semaphore in IDE driver
The IDE 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: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

--
2007-07-09 23:17:56 +02:00
Sergei Shtylyov 1b9da32a28 aec62xx: remove init_dma() method (take 2)
Get rid of the init_dma() method (which had no particular reason to exist) by
folding it into the init_hwif() method. While at it, also perform some cleanup
in the latter method:

- get rid of the useless clearing of hwif->autodma;

- fold the serialization code into one 'if' statement;

- fold setting the drives' 'autotune' and 'autodma' fields into the single
  statements...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:56 +02:00
Sergei Shtylyov b1d19db4e7 aec62xx: rework init_setup_aec6x80()
Rework init_setup_aec6x80() so that it won't rewrite the constant name strings
anymore -- in order to do this:

- in aec62xx_init_one(), pass a local copy of 'struct pci_device_id' down the
  call chain;

- change the names for in aec62xx_chipsets[] to default to AEC-6280[R];

- override the 'name' field in init_setup_aec6x80() only if bit 4 of the DMA
  status register is set.

While at it, also change the 'udma_mask' field for AEC-6x80R chips in this
function and remove the code doing the same from the init_hwif() method...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:56 +02:00
Sergei Shtylyov 83a6d4ab3b cmd64x: init. code cleanup
Fix two minor issues with PCI0646 chip reporting in the init_chipset() method:
"IRQ workaround enabled" message printed out not only for revision 0x01 and
"CMD646: chipset revision" printed twice (by IDE core and the driver itself).
Also, remove empty/pointless switch cases for the chips other than PCI0646,
duplicate write to the MRDMODE register when enabling interrupts and MEMORY
READ LINE cycles, and needless/misplaced initialization of the timing registers
in this method.
Switch to reading only the PCI revision ID register itself, not the whole 32
bits at its address in init_chipset() and init_hwif() methods; in addition,
get rid of the useless clearing of hwif->autodma and perform some cosmetic
style changes in the latter method.
Refactor ata66_cmd64x() by moving all the code into the 'switch' statement,
renaming/adding variables, and fixing the coding style.
While at it, finally get rid of the meaningless aliasing register #define's...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:55 +02:00
Sergei Shtylyov 2648e5d9a8 hpt366: simplify UltraDMA filtering (take 4)
Simplify UltraDMA mode filtering in the driver:

- make use of the newly introduced 'udma_mask' field of 'ide_pci_device_t' to
  set the correct hwif->ultra_mask, modifying init_setup_hpt366() to select
  the correct mask based on the chip revision;

- replace 'max_mode' field of the 'struct hpt_info' with 'max_ultra' specifying
  the maximum UltraDMA mode allowed;

- rewrite hpt3xx_udma_filter() to differ the filters based on the 'chip_type'
  field, and only use it for HPT366 and HPT370[A] where it's really necessary.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:55 +02:00
Matthias Kaehlcke ef29888ea8 ide: use mutex instead of ide_cfg_sem semaphore in IDE driver
The IDE 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: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:55 +02:00
Sergei Shtylyov c283f5dbe3 ide: make void and rename ide_dma_timeout() method
Since ide_dma_timeout() method's result is discarded, make it return 'void'.
While at it, drop 'ide_' from the method's name, drop the '__' prefix from
the default method's name, and do some cleanups in this method driver-wise:

- in ide-dma.c, au1xxx-ide.c, and pdc202xx_old.c, define/use 'hwif' variable;

- in au1xxx-ide.c, get rid of commented out printk();

- in sl82c105.c, get rid of unnecessary variables.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:54 +02:00
Sergei Shtylyov 841d2a9bf1 ide: make void and rename ide_dma_lostirq() method
Since ide_dma_lostirq() method's result is discarded, make it return 'void'.
While at it, rename the method to dma_lost_irq(), drop the '__' prefix from the
default method's name, and do some cleanups in this method driver-wise:

- in aec62xx.c, rename the method in accordance with other drivers, and get rid
  of unnecessary variables there;

- in pdc202xx_old.c, define/use 'hwif' variable;

- in sgiioc4.c, rearrange the code to call the resetproc() method directly.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:54 +02:00
Bartlomiej Zolnierkiewicz b740d8846e serverworks: always tune CSB6
Switch the driver to always program DMA/PIO timings and set device transfer
mode instead of trusting BIOS on CSB6 controllers (libata pata_serverworks.c
driver is also doing things this way and there were no problems reported so
far).  While doing conversion I noticed that the old code had many issues:

* the code was assuming that hwif->dma_status is always valid
  (which obviously isn't true if hwif->dma_base == NULL)

* value of "(ultra_timing >> (4*unit)) & ~(0xF0)" expression wasn't checked
  to fit into udma_modes[5]

* code validating DMA timings didn't validate corresponding PIO timings

* extra CSB5 PIO register wasn't validated et all

* hwif->ide_dma_off_quietly() is always called before ide_set_dma() (which in
  turn calls hwif->speedproc() method - svwks_tune_chipset() in this case)
  so the code depending on DMA capable bit of DMA status to be set was never
  executed (=> the code was never validating DMA timings despite actually
  enabling DMA if the PIO timings were OK!)

* on resume driver dependend entirely on BIOS to restore timings and set
  transfer mode on the device

While at it:

There is no need to read PIO/MWDMA timings now so don't do it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
2007-07-09 23:17:53 +02:00
Nicolas Ferre ed99c541e0 mmc: at91_mci: fix hanging and rework to match flowcharts
Fixes hanging using multi block operations (seen during CMD25).
Follows closely the datasheet flowcharts.

This piece of code handles better big file writing. I had to take care
of the notbusy signal during write (at91_mci_handle_cmdrdy function) and
to rearrange the AT91_MCI_ENDRX and AT91_MCI_RXBUFF flag usage.

Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09 21:29:07 +02:00
Nicolas Ferre e8d04d3dba mmc: at91_mci typo
Typo fix in at91_mci driver : standardized the typo
(at91_mci everywhere)

Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09 21:29:03 +02:00
Rolf Eike Beer 9d26a5d3f2 sdhci: Fix "Unexpected interrupt" handling
Whenever a power interrupt is signaled it is also reported as an unexpected
one. All other unexpected interrupts get lost. Cause is a not inversed
bitmask to remove power interrupts from the status.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09 21:28:35 +02:00
Pierre Ossman 8c75deae1a mmc: fix silly copy-and-paste error
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09 21:28:09 +02:00
Pierre Ossman ffce2e7e70 mmc: move layer init and workqueue to core file
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09 21:28:06 +02:00
Pierre Ossman b93931a61a mmc: refactor host class handling
Move basic host class device handling to its own file for clarity.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09 21:28:01 +02:00
Pierre Ossman 4101c16a91 mmc: refactor bus operations
Move bus operations to its own file for the sake of clarity. Also
delegate sysfs attributes to bus handlers in preparation for other
more exotic types.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09 21:27:56 +02:00
Milko Krachounov 7de064ebc6 sdhci: add ene controller id
ENE has a very weird design where an SDHCI device (0805) is presented
on the PCI bus, but that device is non-functional, and the real device
is hidden as a more generic device.

Signed-off-by: Milko Krachounov <milko@3mhz.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09 21:23:08 +02:00
Pierre Ossman 98ccf14909 mmc: bounce requests for simple hosts
Some hosts cannot do scatter/gather in hardware. Since not doing sg
is such a big performance hit, we (optionally) bounce the requests
to a simple linear buffer that we hand over to the driver.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09 21:22:53 +02:00
Jeff Garzik c1e4fe711a [libata] sata_mv: print out additional chip info during probe
Indicate whether this is a Generation-I (50xx), Generation-II (60xx),
or Generation-II-E (6042/7042) chip.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:29:31 -04:00
Jeff Garzik bf6263a853 [libata] Use ATA_UDMAx standard masks when filling driver's udma_mask info
The ATA_UDMAx masks are self-documenting, and far better than manually
writing in the hex mask.

Note that pata_it8213 mask differed from the comment.  Added a FIXME there.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:35 -04:00
Jeff Garzik cd70c26617 [libata] AHCI: Add support for Marvell AHCI-like chips (initially 6145)
Add support for the SATA portion of Marvell's AHCI-compatible chips.
The PATA port capability, also available via AHCI, is disabled until
support is completed.

NCQ and PCI MSI are disabled by default.  Marvell says "we use NCQ" in
their drivers but "we do not use PCI MSI."  Theoretically that implies
we need to fix ahci.c to work with Marvell NCQ, but one wonders why
Marvell NCQ is any different from other AHCI chips.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:35 -04:00
Jeff Garzik 469248abf0 [libata] Clean up driver udma_mask initializers
* Use ATA_UDMA*
* Remove FIXME notations that once served to remind us to verify
  that these were indeed the correct UDMA masks.  They are.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:35 -04:00
Alan Cox d26fc9551a libata: Support chips with 64K PRD quirk
Add ata_dumb_qc_prep and supporting logic so that a driver can just
specify it needs to be helped in this area. 64K entries are split
as with drivers/ide.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:35 -04:00
Christian Lamparter c1e6f28cc5 Add a PCI ID for santa rosa's PATA controller.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:34 -04:00
Mikael Pettersson 825cd6dd79 sata_sil24: sil24_interrupt() micro-optimisation
sil24_interrupt() loads host->ports[i] into a local variable,
validates it, and then loads the value again in the call to
sil24_host_intr(). This patch replaces the second load by a
reference to the local variable.

This is safe since no side-effects have occurred since the
initial load. It also improves readability since it makes
it clear that the parameter to sil24_host_intr() is the same
value which was just validated.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:34 -04:00
Sonic Zhang 5f45bc5097 Add irq_flags to struct pata_platform_info
On some embedded platforms, such as blackfin, the gpio interrupt for
IDE interface is designed to be triggered with high voltage. The gpio
port should be configured properly by set_irq_type() when register
the irq. This patch enable the generic pata platform driver to
accept platform irq flags data.

Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:34 -04:00
Mikael Pettersson d0e580316e sata_promise: cleanups
This patch applies some trivial cleanups to sata_promise:
- repair whitespace damage
- correct comment at board_2057x_pata definition
- pull SATAII TX4 support code out to separate functions
- rename ata_nr to ata_no for consistency with libata's port_no
- remove some init-time debug printks (requested by Jeff)

This patch should cause no behavioural changes, except for
the removed printks.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
--
 drivers/ata/sata_promise.c |   56 ++++++++++++++++++---------------------------
 1 files changed, 23 insertions(+), 33 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:34 -04:00
Jeff Garzik 5446b656dd [libata] pata_ixp4xx: kill unused var
Reported by Michael-Luke Jones.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:34 -04:00
Tejun Heo a5bf5f5a37 ata_piix: fix pio/mwdma programming
Fix various bugs in pio/mwdma mode programming.

* Control bits in the timing register wasn't cleared properly while
  programming PIO mode.

* MWDMA mode programming cleared the wrong part of control bits.

* MWDMA mode programming cleared udma_mask even when the controller
  doesn't support UDMA.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Art Haas <ahaas@airmail.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:34 -04:00
Jeff Garzik dab632e8c4 [libata] ahci: minor internal cleanups
Minor cleanups, in preparation for merging Marvell PATA AHCI support in
the future.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:34 -04:00
Jeff Garzik a09060ffe5 [libata] sata_sx4, sata_via: minor documentation updates
sata_sx4:
- describe overall driver theory of operation
- add a few constants that will be used in the future

sata_via:
- remove mention of an old-EH function that is going away

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:33 -04:00
Jeff Garzik df69c9c543 [libata] ahci: minor internal cleanups
Function renaming and factorization.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:33 -04:00
Jeff Garzik 2bcd866be5 [libata] ahci: Factor out SATA port init into a separate function
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:33 -04:00
Jeff Garzik 79b0bde157 [libata] pata_sil680: minor cleanups from benh
Merge unrelated cleanups (__devinit, dev_dbg, hardware constant)
from changeset "pata_sil680: Add MMIO support" authored by
Benjamin Herrenschmidt <benh@kernel.crashing.org>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:33 -04:00
Jeff Garzik b2d46b61bd [libata] sata_sx4: named constant cleanup
* convert tabs to spaces
* convert some hex numbers to (1 << n) preferred format
* document i2c and timer control register bits

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:33 -04:00
Alessandro Zummo 5d4c51f6be [libata] pata_ixp4xx: convert to new EH
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:33 -04:00
Jeff Garzik 49de0ac823 [libata] pdc_adma: Reorder initializers with a couple structs
Make it easier to verify which struct initializers are present, by
presenting them in the order in which they are defined in the API
header.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:32 -04:00
Jeff Garzik 59f998802b [libata] drivers: remove 'void __iomem *' casts from pre-iomap days
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:32 -04:00
Jeff Garzik 1d2808fd3d [libata] PATA drivers: remove ATA_FLAG_SRST
This flag only has meaning in old-EH drivers, and these drivers have
already been converted to the new EH.  Remove.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:32 -04:00
Jeff Garzik 5bcd7a00a4 [libata] sata_sil: register table cleanup
Make the register offset table more maintainable.

From the 'sii-lbt' branch, which enables the LBT chip feature.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:32 -04:00
Jens Axboe be5d82183f use_clustering (sht) bit set to 0 in AHCI ?
ahci: enable sg segment clustering

The specification states that ahci supports segments up to 4MiB in size,
so enable clustering.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:32 -04:00
Tejun Heo a16abc0b5f libata: replace ap->cbl tests with ATA_FLAG_SATA tests
ap->cbl == ATA_CBL_SATA indicates SATA cable while ap->flags &
ATA_FLAG_SATA indicates SATA host port.  Till now they always gave the
same result but SATA/PATA bridge handling will change that.  Switch to
ATA_FLAG_SATA test if we're testing for host port type.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:32 -04:00
Jeff Garzik 1ca972c202 [libata] pata_atiixp: add SB700 PCI ID
From AMD.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:32 -04:00
Tejun Heo 64578a3de7 libata-acpi: implement _GTM/_STM support
Implement _GTM/_STM support.  acpi_gtm is added to ata_port which
stores _GTM parameters over suspend/resume cycle.  A new hook
ata_acpi_on_suspend() is responsible for storing _GTM parameters
during suspend.  _STM is executed in ata_acpi_on_resume().  With this
change, invoking _GTF is safe on IDE hierarchy and acpi_sata check
before _GTF is removed.

ata_acpi_gtm() and ata_acpi_stm() implementation is taken from Alan
Cox's pata_acpi implementation.  ata_acpi_gtm() is fixed such that the
result parameter is not shifted by sizeof(union acpi_object).

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:32 -04:00
Tejun Heo e5fa24dfdb libata-acpi: remove redundant checks
Remove remaining unnecessary feature and status checks.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:31 -04:00
Tejun Heo 6746544c3b libata: reimplement ACPI invocation
This patch reimplements ACPI invocation such that, instead of
exporting ACPI details to the rest of libata, ACPI event handlers -
ata_acpi_on_resume() and ata_acpi_on_devcfg() - are used.  These two
functions are responsible for determining whether specific ACPI method
is used and when.

On resume, _GTF is scheduled by setting ATA_DFLAG_ACPI_PENDING device
flag.  This is done this way to avoid performing the action on wrong
device device (device swapping while suspended).

On every ata_dev_configure(), ata_acpi_on_devcfg() is called, which
performs _SDD and _GTF.  _GTF is performed only after resuming and, if
SATA, hardreset as the ACPI spec specifies.  As _GTF may contain
arbitrary commands, IDENTIFY page is re-read after _GTF taskfiles are
executed.

If one of ACPI methods fails, ata_acpi_on_devcfg() retries on the
first failure.  If it fails again on the second try, ACPI is disabled
on the device.  Note that successful configuration clears ACPI failed
status.

With all feature checks moved to the above two functions,
do_drive_set_taskfiles() is trivial and thus collapsed into
ata_acpi_exec_tfs(), which is now static and converted to return the
number of executed taskfiles to be used by ata_acpi_on_resume().  As
failures are handled properly, ata_acpi_push_id() now returns -errno
on errors instead of unconditional zero.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:31 -04:00
Tejun Heo 69b16a5f4c libata-acpi: miscellaneous cleanups
* Add missing LOCKING: and RETURNS: to function comment.

* Don't conditionalize warning messages with ata_msg_probe().  Print
  directly with KERN_WARNING.

* Drop duplicate debug messages.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:31 -04:00
Tejun Heo 4700c4bc92 libata-acpi: clean up ata_acpi_exec_tfs()
This patch cleans up ata_acpi_exec_tfs() and its friends.

* Rename taskfile_array to ata_acpi_gtf and make it __packed as it's
  used as argument to ACPI method, and use pointer to ata_acpi_gtf and
  number of taskfiles to represent _GTF taskfiles instead of a pointer
  casted into unsigned long and byte count.  This makes argument
  re-checking in do_drive_set_taskfiles() unnecessary.

* Pointer in void * not in unsigned long.

* Clean up do_drive_get_GTF() error handling and make
  do_drive_get_GTF() return number of taskfiles on success, 0 if _GTF
  doesn't exist or doesn't contain valid ata.  -errno on other errors.

* Remove superflous check for acpi->buffer.pointer.

* Update taskfile_load_raw() such that printed messages look similar
  to the messages printed by ata_eh_report().

* s/do_drive_get_GTF/ata_dev_get_GTF/
  s/do_drive_set_taskfiles/ata_dev_set_taskfiles/

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:31 -04:00
Tejun Heo fafbae87db libata-acpi: implement ata_acpi_associate()
* Add acpi_handle to ata_host and ata_port.  Rename
  ata_device->obj_handle to ->acpi_handle and move it above such that
  it doesn't get cleared on reconfiguration.

* Replace ACPI node association which ata_acpi_associate() which is
  called once during host initialization.  Unlike the previous
  implementation, ata_acpi_associate() uses ATA_FLAG_ACPI_SATA to
  choose between IDE or SATA ACPI hierarchy and uses simple child look
  up instead of recursive walk to match the nodes.  This is way safer
  and simpler.  Please read the following message for more info.

  http://article.gmane.org/gmane.linux.ide/17554

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-09 12:17:31 -04:00
Jiri Kosina feb485d401 Merge branches 'debug-module-param' and 'upstream' into for-linus 2007-07-09 14:23:37 +02:00
Jiri Kosina 2c1d8aea2c HID: handle cases of volume knobs generating relative values
There are some devices (for example Dell Multimedia Keyboard SK-8135) that have
a volume control knob which generates relative events instead of absolute.
hid-input maps them to ABS_VOLUME. HUT pages don't restrict volume to absolute
values.

Adding REL_VOLUME doesn't seem feasible, nothing knows how to handle it. This
patch translates relative ABS_VOLUME events into appropriate number of series
of VOLUME_UP or VOLUME_DOWN events respectively, so that userspace sees the
correct values in the end.

kernel.org bugzilla 5233

Reported-by: Jochen Eisinger <jochen@penguin-breeder.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:37 +02:00
Jiri Kosina 3c5f4b25f3 HID: Logitech keyboard 0xc311 needs reset leds quirk
The keyboard 0x046d/0xc311 needs reset leds quirk

Tested-by: Antonino Ingargiola <tritemio@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:36 +02:00
Ryo Dairiki 5f9c464aaa HID: support for logitech cordless desktop LX500 special mapping
This keyboard has wireless mouse which has left, middle, right buttons and
2-dimensional scrolling wheel.  Unfornetuly, this wheel reports side scrolling
events and 11 or 12 button events at the same time.

I've wrote a patch to fix this mapping.  I'm not sure if this mapping is proper
for buttons, because , for example, there is no entry for "burn cd" in input.h.

The patch also supress 11 and 12 button events from mouse when you scroll the
wheel left and right.  With this patch, only side scrolling events are
reported.  (This mouse has only 4 buttons and 2D wheel. There is no such
buttons like 11 and 12.)

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:36 +02:00
Diogo Kastrup 816cbfda8b HID: fix autocentering of PID devices
When setting the autocentering of PID devices, PID_DIRECTION_ENABLE is not
being explicitely set to 1. This results in autocentering working only on the
vertical axis when this field is preset to 0.

Fix that by setting it explicitely to 1 when preparing the set_effect report
for autocentering spring effect.

Signed-off-by: Diogo Kastrup <dk@bighost.com.br>
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:35 +02:00
Jiri Kosina ea9a4a8b0e HID: separate quirks for report descriptor fixup
Lately there have been quite a lot of bug reports against broken devices
which require us to fix their report descriptor in the runtime, before it
is passed to the HID parser. Those devices have eaten quite an amount of
our quirks space, which isn't particularly necessary - the quirks are not
needed after the report descriptor is parsed, and they just consume bits.

Therefore this patch separates the quirks for report descriptor fixup, and
moves their handling into separate code. The quirks are then forgotten as
soon as the report descriptor has been parsed.

Module parameter 'rdesc_quirks' is introduced to be able to modify these
quirks in runtime in a similar way to 'quirks' parameter for ordinary HID
quirks.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:34 +02:00
Jiri Kosina b8e98f1c47 HID: Add NOGET quirk for all NCR devices
Devices manufactured by NCR have userspace hiddev-based drivers,
which do all the necessary device querying by themselves. The devices
must not be queried directly by the generic HID driver, as reported by
NCR engineers.

Cc: Petr Ostadal <postadal@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:33 +02:00
Jiri Kosina 92d9e6e607 HID: support for Petalynx Maxter remote control
Petalynx Maxter remote control [1] 0x18b1/0x0037 emits 0xfa and 0xfc from
consumer page (reserved in HUT 1.12) for back and more keys. It also emits
a few usages from LOGIVENDOR page, which need adding.

Also, this device has broken report descriptor - the reported maximum is too
low - it doesn't contain the range for 'back' and 'more' keys, so we need to
bump it up before the report descriptor is being parsed.

Besides all this, it also requires NOGET quirk.

This patch does so.

[1] http://www.elmak.pl/index.php?option=com_phpshop&page=shop.browse&category_id=14&ext=opis&lang=en

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:33 +02:00
Hans de Goede 5fce620c0c HID: fix mismatch between hid-input HUT find/search mapping and the HUT
When comparing usb vs ps2 / testing the keycodes generated for the easy access
keys on my trust (microsoft compatible) keyboard. I noticed the search key
generated the keycode for find when connected through USB. This lead me to
check the consumer page mappings in hid-input.c . And it turns out the the
mapping for ID 0x221 deviates from the HUT standard document:
http://www.usb.org/developers/devclass_docs/Hut1_12.pdf

Currently it is incorrectly mapped to find, whereas it should be mapped to
search. I also added missing bindings for ID 0x21f, the real find and for
0x222, goto.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:32 +02:00
Julien Eyries 1b3ebe9311 HID: support for Gameron dual psx adaptor
This patch provides support for the Gameron dual psx adaptor.  The
modification  is to add the quirk HID_QUIRK_MULTI_INPUT for this
specific USB device.

Signed-off-by: Julien Eyries <jeyries@yahoo.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:31 +02:00
Alan Stern 2fa45a4cff USB HID: avoid flush_scheduled_work()
This patch (as914) replaces a call to flush_scheduled_work() with
cancel_work_sync(), in order to help avoid potential deadlocks.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:30 +02:00
Jan Engelhardt 3cd709866f HID: Use menuconfig objects
Make a "menuconfig" out of the Kconfig objects "menu, ..., endmenu",
so that the user can disable all the options in that menu at once
instead of having to disable each option separately.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:30 +02:00
Jiri Kosina defd208681 HID: force hid-input for Microsoft SideWinder GameVoice device
Microsoft SideWinder GameVoice driver is a trivial device with a few buttons
(0x09 HID usage) and an audio connector, which just forwards the audio input
into oridinary sound card present in the computer.

Despite this fact, the only interface of this device reports itself as a
Telephony/Headset type of HID device. This is apparently incorrect - the device
itself doesn't provide any audio/telephony functionality. This is achieved in
userland application which only needs to receive the button events from the HID
driver.

This patch establishes a new quirk which forces hid-input to claim a device it
will otherwise leave untouched.

Reported-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:29 +02:00
Jiri Kosina cb1d93c98c HID: input mapping for Chicony KU-0418 tactical pad
Chicony KU-0418 (aka Saitek PZ08AU gaming keyboard) has a separate
"tactical pad" with 11 non-functional buttons - they generate usage
codes from 0xff00 (MSVENDOR) usage page. Special case handling for
this keyboard added, so no later clash with MSVENDOR mappings is going
to occur.

Pointed out in bugzilla #7352

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:13:28 +02:00
Jiri Kosina 58037eb961 HID: make debugging output runtime-configurable
There have been many reports recently about broken HID devices, the
diagnosis of which required users to recompile their kernels in order
to be able to provide debugging output needed for coding a quirk for
a particular device.

This patch makes CONFIG_HID_DEBUG default y if !EMBEDDED and makes it
possible to control debugging output produced by HID code by supplying
'debug=1' module parameter.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-07-09 14:03:35 +02:00
Thomas Bogendoerfer f2ec803008 Ethernet driver for EISA only SNI RM200/RM400 machines
Changes to last version:
- spelling fix
- cleaned up probe code

Thomas.

Ethernet driver for EISA only SNI RM200/RM400 machines

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:46 -04:00
Thomas Bogendoerfer 2187f287e2 Extract chip specific code out of lasi_82596.c
Changes to last version:
- use netdev_alloc_skb
- make init_rx_bufs just fail and not panic, if skb alloc fails
- don/t free_irq, if request_irq failed

Thomas.

Extracted chip specific code out of lasi_82596.c and placed into a lib82596.c
to make it usable for other 82596 drivers

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:45 -04:00
Jan-Bernd Themann d1d25aaba8 ehea: Whitespace cleanup
This patch fixes several whitespace issues.

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:45 -04:00
Olof Johansson 7c00db3d28 pasemi_mac: Fix TX interrupt threshold
It was mistakenly set to interrupt on the second packet instead of first, causing
some interesting latency behaviour.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:45 -04:00
Linas Vepstas e65bbf13dd spidernet: Replace literal with const
Replace literal with const; add bit definitions.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:45 -04:00
Francois Romieu 57a9f236eb r8169: perform RX config change after mac filtering
It does not really make sense to update the RX config register
before the mac filtering registers.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:45 -04:00
Francois Romieu 773d202194 r8169: mac address change support
Merged from Realtek's r8169-6.001 driver.

I have added some locking to protect against the arp monitoring
timer in the bonding driver. Accessing the configuration registers
is otherwise performed under RTNL locking.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:45 -04:00
Francois Romieu 96b9709c9b r8169: display some extra debug information during startup
It does not cost much and it will ease the identification of (so far)
unknown devices.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:45 -04:00
Rolf Eike Beer 6cccd6e7a2 r8169: add endianess annotations to [RT]xDesc
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:45 -04:00
Francois Romieu e9f63f3086 r8169: align the IP header when there is no DMA constraint
Align the IP header when the chipset can DMA at any location (plain 0x8169).
Otherwise (0x8136/0x8168) obey the constraint imposed by the hardware.

This patch complements the previous alignment rework done for copybreak.

Original idea from Philip Craig <philipc@snapgear.com>

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Philip Craig <philipc@snapgear.com>
Cc: Mike Isely <isely@pobox.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:44 -04:00
Francois Romieu 275391a482 r8169: add bit description for the TxPoll register
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:44 -04:00
Francois Romieu 07d3f51feb r8169: cleanup
No functionnal change:
- trim the old history log
- whitespace/indent/case police
- unsigned int where signedness does not matter
- removal of obsolete assert
- needless cast from void * (dev_instance)
- remove dead code once related to power management
- use netdev_alloc_skb.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:44 -04:00
Francois Romieu 901dda2b5f r8169: remove the media option
It has been documented as deprecated:
- in MODULE_PARM_DESC since may 2005 ;
- at the top of the source file and in printk since june 2004.

Good bye.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:44 -04:00
Francois Romieu 0127215c17 r8169: small 8101 comment
Extracted from version 1.001.00 of Realtek's r8101.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:44 -04:00
Francois Romieu 864022344c r8169: confusion between hardware and IP header alignment
The rx copybreak part is straightforward.

The align field in struct rtl_cfg_info is related to the alignment
requirements of the DMA operation. Its value is set at 2 to limit the
scale of possible regression but my old v1.21 8169 datasheet claims a
8 bytes requirements (which never appeared in the driver, of course)
and the 8101/8168 go with a plain 8 bytes alignment.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:44 -04:00
Francois Romieu 0e4851502f r8169: merge with version 8.001.00 of Realtek's r8168 driver
This one includes:

- more tweaks to rtl_hw_start_8168

- a work around for a Rx FiFO overflow issue on the 8168Bb
  - rtl8169_{intr_mask/napi_event} are replaced with per-device fields,
    namely tp->{intr/napi}_event
  - rtl_cfg_info is converted to C99 for readability but the values are
    not changed for the 8169/8110 and the 8101

Includes ChipCmd fix from Bernhard Walle <bwalle@suse.de> (2007/02/24).

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:44 -04:00
Francois Romieu 6dccd16b7c r8169: merge with version 6.001.00 of Realtek's r8169 driver
- new identifier for the 8110SCe

- the PCI latency timer is set unconditionally. This part is identical
  in Realtek's r8168 (8.001.00) and r8101 (1.001.00)

- initialization of the cache line size register is for the 8169s only

- more magic in rtl_hw_start_8169

- it is not possible to factor out the setting of the the irq event mask
  with the 8168 and the 8101 any more. Pushed it into the hw_start handler.

- rtl_set_rx_tx_config_registers() and write to the ChipCmd register are
  issued identically for the whole 8169/8110 family: the 8110SCd/8110SCe
  are handled the same way

- work around for AMD platform.

Some registers definitions in Realtek's driver are let aside for later.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:44 -04:00
Francois Romieu ba6eb6ee85 r8169: prettify mac_version
...still a bit yucky though.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:43 -04:00
Francois Romieu cdf1a608a6 r8169: populate the hw_start handler for the 8110
Same thing as the previous change for rtl_hw_start_8168.

The 8101 related code in rtl_hw_start_8169 (see RTL_GIGA_MAC_VER_13)
goes away.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:43 -04:00
Francois Romieu 2dd99530a2 r8169: populate the hw_start handler for the 8168
rtl_hw_start_8168 inherits the content of rtl_hw_start_8169 minus
the code which depends on RTL_GIGA_MAC_VER_XY (XY != {11/12}).

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:43 -04:00
Francois Romieu 7f796d83ff r8169: add helpers for per-device hw_start handler
They aim to limit the amount of moved code when the hw_start
handler gets more specialized.

No functional change.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:43 -04:00
Francois Romieu 07ce406467 r8169: add hooks for per-device hw_start handler
Rationale: rtl8169_hw_start will not help maintaining an unified
driver for different chipsets but people at Realtek are probably
too polite to say it distinctly.

Let's add the hook and keep hw_start handler unchanged.

As can be seen from the content of rtl8169_pci_tbl, the RTL_CFG_1
entry in rtl_cfg_info was unused. I recycled it for the 0x8168.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:43 -04:00
Stephen Hemminger b449655ff5 r8169: Rx path update
- pci_dma_sync_single_for_cpu is not needed for a single large packet
- remove the function pointer to help gcc optimizing the inline
  pci_dma functions.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:43 -04:00
David S. Miller 278667ba18 r8169: kill eth_copy_and_sum()
It hasn't "summed" anything in over 7 years, and it's
just a straight mempcy ala skb_copy_to_linear_data()
so just get rid of it.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:43 -04:00
Francois Romieu 4ae47c2ddc r8169: de-obfuscate modulo arithmetic
The former style suggests a modulo arithmetic misuse but
the expression should never be < 0. Even if it does, the
driver will simply loop longer than expected (not that
the remaining parts of the system will necessarily
appreciate it...).

Let's warn the user when something goes wrong and try
to go over it.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:43 -04:00
Stephen Hemminger 15d317587e r8169: use netdev_alloc_skb
Use netdev_alloc_skb and remove the useless sk_buff * argument of
rtl8169_alloc_rx_skb.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-07-08 22:16:42 -04:00
Stephen Hemminger a73b629b35 sky2: version 1.15
New version because of new chip support.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:42 -04:00
Stephen Hemminger 6916161102 sky2: Yukon Extreme (88e8071) support.
Enable support for Yukon EX chipset (88e8071).
Most of changes are related to new commands to chip for transmit,
and change in status and checksumming.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:42 -04:00
Stephen Hemminger 8f70920f2f sky2: GPIO register
The General Purpose I/O register is yet another hardware workaround
catchall. Enable workaround that vendor driver does to stay
but for bug compatiable.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:42 -04:00
Stephen Hemminger 451af33552 sky2: enable clocks before probe
Catch-22: On Yukon EX (88E8071) need to have internal clocks enabled
before reading chip id. It is harmless on other chips.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:42 -04:00
Stephen Hemminger f449c7c106 sky2: rename BMU register
This register is more of a test and control register on Yukon2.
So rename it to Q_TEST and give some bit definitions.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:42 -04:00
Stephen Hemminger fc99fe0618 sky2: Add PCI device specfic register 4 & 5
Need to setup more PCI control control registers are on Yukon EX.
Some of these also exist on Yukon EC-U as well.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:42 -04:00
Stephen Hemminger 3ead5db7bc sky2: avoid reserved regions on ethtool reg dump
On Yukon EX reading some of the undocumented places in the
memory space will cause a hang. Since they don't provide useful
information, just skip the reserved areas.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:42 -04:00
Linas Vepstas 5f309b90e2 spidernet: fix misnamed flag
The transmit frame tail bit is stranglely misnamed as
"no checksum". Fix the name to what it should be:
"transmit frame tail". No functional change,
just a name change.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:41 -04:00
Linas Vepstas 59a11f8809 spidernet: move a block of code around
Put the enable and disable routines next to one-another,
as this makes verifying thier symmetry that much easier.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:41 -04:00
Linas Vepstas e1fd907072 spidernet: service TX later.
When entering the netdev poll routine, empty out the RX
chain first, before cleaning up the TX chain. This should
help avoid RX buffer overflows.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:41 -04:00
Linas Vepstas 9e0a6e2598 spidernet: invalidate unused pointer.
Invalidate a pointer as its pci_unmap'ed; this is a bit of
paranoia to make sure hardware doesn't continue trying to
DMA to it.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:41 -04:00
Linas Vepstas 9948357d49 spidernet: enhance the dump routine
Crazy device problems are hard to debug, when one does not have
good trace info. This patch makes a major enhancement to the
device dump routine.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:41 -04:00
Linas Vepstas e6311d855e spidernet: beautify error messages
Use dev_err() to print device error messages.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:41 -04:00
Stephen Hemminger 91e745aa46 qla3xxx: cleanup checksum offload code
The code for checksum is more complex than needed when dealing with VLAN's;
the higher layers already pass down the location of the IP header.

Compile tested only, no hardware available.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:40 -04:00
Yoichi Yuasa 59b34c1260 add return value check of request_irq()
This patch has added return value check of request_irq() to pcmcia net drivers.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:40 -04:00
Jan Engelhardt d1c0a65fb5 Use menuconfig objects II - netdev (general+100mbit)
CONFIG_NETDEVICES, CONFIG_NET_ETHERNET:
Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.

CONFIG_SMC9194:
Move it so that it appears correctly in menuconfig.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:40 -04:00
Geert Uytterhoeven 8f036c04a8 acenic: SET_NETDEV_DEV is always there these days
acenic: SET_NETDEV_DEV is always there these days

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:40 -04:00
Stephen Hemminger bf0dcbd929 b44: use netdev_alloc_skb
Use netdev_alloc_skb rather than dev_alloc_skb when allocating
receive buffers.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:40 -04:00
Stephen Hemminger 72f4861ef9 b44: packet offset is constant
The receive buffer offset is constant in this driver.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:40 -04:00
Stephen Hemminger f65a71775c b44: tx bounce sizing.
No need to grap full size MTU buffer for possibly small transmit
bounce buffers.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:40 -04:00
Stephen Hemminger a72a817973 b44: timer power saving
Make the PHY and statistic timer run on one second boundary
for powersaving.

On resume, the driver should check for link up immediately, to
get online faster (rather than waiting for the next second).

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:39 -04:00
Richard Knutsson eb034a7998 tulip: Convert to generic boolean
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:39 -04:00
Divy Le Ray 480fe1a31c cxgb3 - TP SRAM update
The chip executes microcode present in internal RAM,
whose content is loaded from EEPROM on power cycle.
This patch allows an update of the microcode through PIO
without forcing a power cycle.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:39 -04:00
Divy Le Ray 8a9fab22cf cxgb3 - Firmware update
Update FW to 4.1.
Proceed to subsequent HW tuning to improve RDMA perfs..

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:39 -04:00
Divy Le Ray cf992af561 cxgb3 - sge page management
Streamline sge page management.
Fix dma mappings when buffers are recycled.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:39 -04:00
Bill Nottingham 287aa83dff drivers/net: fix comparisons of unsigned < 0
Recent gcc versions emit warnings when unsigned variables are compared < 0 or >= 0.

Signed-off-by: Bill Nottingham <notting@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:39 -04:00
Komuro 40738f3fcd PCMCIA-NETDEV : add new ID of lan&modem multifunction card
fmvj18x_cs:
      NEC PK-UG-J001
      Panasonic CF-VML201
      Panasonic TO-PDL9610

pcnet_cs:
       MICRO-RESEARCH  MC336LAN

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:39 -04:00
David Brownell 18ab458fb7 usbnet whitespace fixes
Whitespace updates for usbnet core, mostly switching to tab-only indents.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:38 -04:00
Richard Knutsson 2501f843b0 8139cp: Convert to generic boolean
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:38 -04:00
Kapil Juneja 4117b5be4b phylib: m88e1111: enable SGMII mode
If connected via SGMII, initialize with SGMII mode configured.

Signed-off-by: Kapil Juneja <Kapil.Juneja@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:38 -04:00
Kapil Juneja d3c12873c3 gianfar: add support for SGMII
Add code for initialising and configuring TBI interface and
programming it for connecting to on-chip SERDES (Lynx PHY)
in case of SGMII mode selected through HRCW at reset.

also add defines for TBI register configuration. TBI
interface is programmed towards the SERDES.

refactored mdio read/write functions to differentiate
programming local interface MII regs (e.g., for TBI) from
always programming the mdio master (TSEC1, for programming
the PHYs).

Signed-off-by: Kapil Juneja <Kapil.Juneja@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:38 -04:00
Michael Barkowski 0cefeebaf3 phylib: add the ICPlus IP175C PHY driver
The ICPlus IP175C sports a 100Mbit/s 4-port switch in addition
to a dedicated 100Mbit/s WAN port.

Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:38 -04:00
Linas Vepstas 146bd683cc s2io: add PCI error recovery support
s2io cleanup suggestions, per discussion on mailing lists.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:38 -04:00
Linas Vepstas d796fdb708 s2io: add PCI error recovery support
This patch adds PCI error recovery support to the
s2io 10-Gigabit ethernet device driver. Third revision,
blocks interrupts and the watchdog.

Tested, seems to work well.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Acked-by: Ramkrishna Vepa <Ramkrishna.Vepa@neterion.com>
Cc: Raghavendra Koushik <raghavendra.koushik@neterion.com>
Cc: Wen Xiong <wenxiong@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:38 -04:00
Jouni Malinen bd5824f138 [PATCH] hostap: Remove driver version number
The driver version number has not been updated since the driver was
included in the main kernel tree and there is no plan on updating this
in the future either. At this point, the only correct way to refer to
the version is to use the kernel version. The 0.4.4 version is
confusing since there are external version with higher version number
even though they are not actually any newer than the in-tree version.

Let's get rid of the version number in the kernel tree in order to
avoid this kind of confusion.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:38 -04:00
Matthias Kaehlcke c150573137 [PATCH] hostap: Use list_for_each_entry
Use list_for_each_entry() instead of manual iteration and
substitute some list_for_each() loops with list_for_each_entry().

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:37 -04:00
Pavel Roskin b918099030 [PATCH] hostap: Suppress broadcast if no stations are associated
This may be useful in mesh setups when most stations act as repeaters only.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:37 -04:00
Larry Finger 77548f5807 [PATCH] bcm43xx: Fix deviation from specifications in set_baseband_attenuation
A disagreement between the specifications and the bcm43xx code has just
been discovered and is hereby fixed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:37 -04:00
Daniel Drake aaf83d4fc4 [PATCH] zd1211rw: Make CCK gain patching conditional on RF type
The vendor driver code suggests that CR47 patching happens on every channel
change for every RF (depending on bit 8 in POD).

Due to a bug in their driver (upper bits of RF_Mode get zeroed out, then
are examined for 1s when setting some other flags), this isn't actually
what happens, and their generic CCK patching routine never takes effect.

Some of their RF configurations do include explicit (duplicated) code
for CR47 patching though. This patch makes zd1211rw match that
behaviour.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:37 -04:00
Daniel Drake 4481d6093e [PATCH] zd1211rw: Add UW2453 RF support
This patch adds support for another radio appearing in new devices: the
Ubec UW2453. It's more complicated than the other RF's we support, but
Ubec publish full tech specs so we're able to understand the vendor code
relatively well.

Now that we support UW2453, we also support Atheros' new USB chip: the
AR5007UG. From the little info we have, this appears to be just a
rebranded ZD1211B.

This RF code doesn't work very well -- lots more TX/RX errors than the
other RFs. However, the vendor driver doesn't do any better, so this is
all we can do for now.

[kune@deine-taler.de: bug fixes]
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:37 -04:00
Daniel Drake 9c8fc71ddd [PATCH] zd1211rw: Extend RF layer
These changes are needed for UW2453 RF support:

Add pointer which RF drivers can use to store private RF data
Add exit hook so that RF drivers can free private data
Allow RF's to disable the generic TX power integration handling code

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:37 -04:00
Daniel Drake a9eea9ae6e [PATCH] zd1211rw: Add ID for ZyXEL G-200v2
Tested by Guy Gallagher
zd1211 chip 0586:3407 v4721 high 00-13-49 AL2230_RF pa0 g---
FCC ID SI5WUB200Z

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:37 -04:00
John W. Linville 0aec00ae1c [PATCH] rtl8187: add header blocks and indicate origin of magic values
Add top-of-file comment blocks to rtl818x headers and attribute origin
of magic values to original r8187 driver.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:37 -04:00
John W. Linville 7e9400f178 [PATCH] eeprom_93cx6: shorten pulse timing to match spec
93cx6 datasheet available here:

        http://ww1.microchip.com/downloads/en/DeviceDoc/21749F.pdf

Figure 1-1 and Table 1-2 on pages 4-5 indicate that both Clock High
Time and Clock Low Time have largest minimum times of 450ns.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:36 -04:00
Michael Wu 605bebe23b [PATCH] Add rtl8187 wireless driver
This patch adds a mac80211 based wireless driver for the rtl8187 USB
wireless card.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:36 -04:00
Ivo van Doorn 4b914dc049 [PATCH] eeprom_93cx6: Add comment for 1us delay after pulse
This will add a comment for the 1us delay which is taken
after the pulse has been switched. The 1us delay is based
on the specifications so that should be made clear.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:36 -04:00
Ivo van Doorn 9467d64b0e [PATCH] Add 93cx6 eeprom library
This patch adds a library for reading from 93cx6 eeproms.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08 22:16:36 -04:00
Bartlomiej Zolnierkiewicz 4660897e6c qd65xx: fix PIO mode selection
PIO4 is a maximum PIO mode supported by a driver.  Using "255" as a max_mode
argument to ide_get_best_pio_mode() could result in wrong timings being used
by a driver (for "pio" equal to 5) or OOPS (for "pio" values > 5 && < 255).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Reviewed-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
2007-07-08 15:21:58 +02:00
Uwe Koziolek 4c6c914e4c sis5513: adding PCI-ID
The SiS966 has one additional PCI-ID 1180.

If the chipset is using this PCI-ID, the primary channel is connected to the
first PATA-port. The secondary channel is connected to SATA-ports in IDE
emulation mode.  The legacy IO-ports are used.

The including of the PCI-ID into pata_sis is not sufficient, because the legacy
driver in drivers/ide is initialized before pata_sis.

Signed-off-by: Uwe Koziolek <uwe.koziolek@gmx.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-08 15:21:58 +02:00
Yoann Padioleau 0da2f0f164 potential compiler error, irqfunc caller sites update
In 7d12e780e0 David Howells performed
this evolution:
 "IRQ: Maintain regs pointer globally rather than passing to IRQ handlers"

He correctly updated many of the function definitions that were using this
extra regs pointer parameter but forgot to update some caller sites of
those functions.  The reason the modifications was not properly done on all
drivers is that some drivers were rarely compiled because they are for
AMIGA, or that some code sites were inside #ifdefs where the option is not
set or inside #if 0.

Here is the semantic patch that found the occurences
and fixed the problem.

@ rule1 @
identifier fn;
identifier irq, dev_id;
typedef irqreturn_t;
@@

static irqreturn_t fn(int irq, void *dev_id)
{
   ...
}

@@
identifier rule1.fn;
expression E1, E2, E3;
@@

 fn(E1, E2
-   ,E3
   )

Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-06 10:23:43 -07:00
Bjorn Helgaas 41a5311465 PNP SMCf010 quirk: work around Toshiba Portege 4000 ACPI issues
When we enable the SMCf010 IR device, the Toshiba Portege 4000 BIOS claims
the device is working, but it really isn't configured correctly.  The BIOS
*will* configure it, but only if we call _SRS after (1) reversing the order
of the SIR and FIR I/O port regions and (2) changing the IRQ from
active-high to active-low.

This patch addresses the 2.6.22 regression:
    "no irda0 interface (2.6.21 was OK), smsc does not find chip"

I tested this on a Portege 4000.  The smsc-ircc2 driver correctly detects
the device, and "irattach irda0 -s && irdadump" shows transmitted and
received packets.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: "Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-06 10:23:43 -07:00
Linus Torvalds cab8e5c444 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: document some of keycodes
  Input: add a new EV_SW SW_RADIO event, for radio switches on laptops
  Input: serio - take drv_mutex in serio_cleanup()
  Input: atkbd - use printk_ratelimit for spurious ACK messages
  Input: atkbd - throttle LED switching
  Input: i8042 - add HP Pavilion ZT1000 to the MUX blacklist
2007-07-05 15:55:37 -07:00
Linus Torvalds 0dac723e5c Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Update defconfigs
  [POWERPC] Uninline and export virq_to_hw() for the pasemi_mac driver
  [POWERPC] Fix PMI breakage in cbe_cbufreq driver
  [POWERPC] Disable old EMAC driver in arch/powerpc
2007-07-05 15:55:00 -07:00
Linus Torvalds 2bcb1b7de9 Remove the blink driver
Yeah, we could have just disabled it, but there's work on a new one that
isn't as fundamentally broken, so there really doesn't seem to be any
point in keeping it around.

The recent timer cleanup broke the only valid use, and when I say
"valid", I obviously mean "totally broken".  So it's not like it works,
or really even can work in the current format that uses the unsafe
"panic" LED blinking routines..

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-04 15:24:39 -07:00
Linus Torvalds 9d7542f891 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:
  ide: ide_scan_pcibus(): check __pci_register_driver return value
  ide: pdc202xx_new PLL input clock fix
  it821x: fix incorrect SWDMA mask
  amd74xx: resume fix
  hpt366: use correct enablebits for HPT36x
  hpt366: blacklist MAXTOR STM3320620A for UltraDMA/66
  ide: Fix a theoretical Ooops case
  ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy
2007-07-03 13:58:49 -07:00
Andrew Morton d61bcce9c1 ide: ide_scan_pcibus(): check __pci_register_driver return value
drivers/ide/setup-pci.c: In function 'ide_scan_pcibus':
drivers/ide/setup-pci.c:879: warning: ignoring return value of '__pci_register_driver', declared with attribute warn_unused_result

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03 22:28:36 +02:00
Albert Lee 8006bf56e3 ide: pdc202xx_new PLL input clock fix
Recently the PLL input clock of Promise 2027x is sometimes detected
higher than expected (e.g. 20.027 MHz compared to 16.714 MHz).
It seems sometimes the mdelay() function is not as precise as it
used to be. Per Alan's advice, HT or power management might affect
the precision of mdelay().

This patch calls gettimeofday() to measure the time elapsed and
calculate the PLL input clock accordingly.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Bahadir Balban <bahadir.balban@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03 22:28:36 +02:00
Bartlomiej Zolnierkiewicz 52374f890c it821x: fix incorrect SWDMA mask
SWDMA modes are unsupported by it821x.  Attempts to tune SWDMA modes always
fail (due to sanity check in ->speedproc) and result in PIO being tuned.

* Fix incorrect SWDMA mask so core code won't try these modes and will just
  tune PIO if no other DMA modes are available.

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2007-07-03 22:28:35 +02:00
Bartlomiej Zolnierkiewicz 603a0e2c0a amd74xx: resume fix
* Driver can't skip programming transfer mode on the device in amd_set_drive()
  (similar fix has been applied to via82cxxx driver ages ago).

* While at it remove redundant warning (ide_config_drive_speed() already
  produces more valuable one).

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03 22:28:35 +02:00
Sergei Shtylyov 96dcc08b0c hpt366: use correct enablebits for HPT36x
The HPT36x chips finally turned out to have the channel enable bits -- however,
badly implemented.  Make use of them despite it's probably only going to burden
the driver's code -- assuming both channels are always enabled by the HighPoint
BIOS anyway...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Linas Vepstas <linas@austin.ibm.com>
Cc: michal.kepien@poczta.onet.pl
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03 22:28:35 +02:00
Sergei Shtylyov 783353b1d3 hpt366: blacklist MAXTOR STM3320620A for UltraDMA/66
Add the MAXTOR STM3320620A drive into the UltraDMA/66 mode blacklist
for the HPT36x chips.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03 22:28:35 +02:00
Alan Cox 785955752f ide: Fix a theoretical Ooops case
Found by a static analyser. It is in theory possible we dereference
dev->id when it has become invalid. Re-order to avoid this.

Not needed for new-ide as we no longer support the crazy exabyte nest stuff

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03 22:28:35 +02:00
Masatake YAMATO b42fa13311 ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy
Look at wait_drive_not_busy in drivers/ide/ide-taskfile.c:

    static u8 wait_drive_not_busy(ide_drive_t *drive)
    {
            ide_hwif_t *hwif = HWIF(drive);
            int retries = 100;
            u8 stat;

            /*
             * Last sector was transfered, wait until drive is ready.
             * This can take up to 10 usec, but we will wait max 1 ms
             * (drive_cmd_intr() waits that long).
             */
            while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--)
                    udelay(10);

            if (!retries)
                    printk(KERN_ERR "%s: drive still BUSY!\n", drive->name);

            return stat;
    }

`printk' is never called because `retries' never holds zero at the
outside of `while' loop: when `retries' holds zero at the while's loop
condition, `retries' will hold -1 at the if condition.

Signed-off-by: Masatake YAMATO <jet@gyve.org>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: joe@perches.com
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-03 22:28:34 +02:00
Hartmut Birr 1fb4a17f6e V4L/DVB (5822): Fix the return value in ttpci_budget_init()
if the call to budget_register() fails in ttpci_budget_int(),
ttpci_budget_init() returns success. The attached patch will
fix this problem.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-03 15:11:21 -03:00
Oleg Nesterov 1e4597e8f0 V4L/DVB (5818): CinergyT2: fix flush_workqueue() vs work->func() deadlock
Spotted and tested by Thomas Sattler <tsattler@gmx.de>.

cinergyT2.c does cancel_delayed_work() + flush_scheduled_work() while
holding cinergyt2->sem. This leads to deadlock because work->func()
needs the same mutex to complete. Another bug is that this code in fact
can't reliably stop the re-arming delayed_work.

Convert this code to use cancel_rearming_delayed_work() and move it
out of ->sem. Another mutex, ->wq_sem, was added to protect against the
concurrent open/resume.

This patch is a horrible hack to fix the lockup which happens in practice.
As Dmitry Torokhov pointed out this driver has other problems and needs
further changes.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-03 15:11:19 -03:00
Jelle Foks f057131fb6 V4L/DVB (5816): Cx88-blackbird: fix vidioc_g_tuner never ending list of tuners
v4l-info and other programs would loop indefinitely while querying the
tuners for cx88-blackbird cards.

The cause was that vidioc_g_tuner didn't return an error value for
qctrl->id != 0, making the application think there is a never ending
list of tuners...

This patch adds the same index check as done in vidioc_g_tuner() in
cx88-video.

Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-03 15:11:16 -03:00
Trent Piepho 333408f215 V4L/DVB (5808): Bttv: fix v4l1 breaking the driver
If one uses a V4L *one* application, such as vlc or mplayer's v4l driver, as
the first user after the driver is loaded, the driver wedges itself and will
never capture properly.  Even if one uses a V4L2 application later, it still
won't work.

If one uses a V4L *two* application first, such as tvtime or mplayer's v4l2
driver, then the driver will be ok.  One can then run a V4L1 application, and
it will work.

It turns out the problem is with norm changing and the crop support that was
added in 2.6.21.  The driver defaults to PAL, and keeps the last norm it was
set too across opens.  If one changes the norm via V4L1, the cropping
parameters are not reset like they should be, and they'll remain broken across
device opens.

This patch removes the direct setting of btv->tvnorm in the V4L1 ioctl
VIDIOCSCHAN handler.  The norm is set via the existing call to set_input(),
which calls set_tvnorm(), which will reset the cropping values now that it is
able to detect the norm change.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-03 15:11:14 -03:00
Alan Cox 872aad45d6 pata_pcmcia: Switch to ata_sff_port_start
PCMCIA doesn't use DMA and as this driver is used on many platforms we
don't want it to fail on those that define the DMA alloc API as a NULL
return

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-03 11:31:06 -04:00
Alan Cox a0ac38f160 pata_pdc202xx_old: Correct cable detect logic
We got it backwards and now the other detects are fixed it shows up

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-03 10:11:12 -04:00
Alan Cox d6f4d5eafd ata_generic: Check the right register for the DMA enabled flags
Mirrors change in IT821X

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-03 10:09:29 -04:00
Chuck Ebbert ee58150235 pata_ali: fix UDMA settings
This patch was found to fix some of the problems with the
pata_ali driver.

https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=156482

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-03 10:06:45 -04:00
Florian Attenberger d9f9c6bc91 sata_mv: PCI-ID for Adaptec 1430SA SATA Controller
Signed-off-by: Florian Attenberger  <valdyn@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-03 10:06:35 -04:00
Tejun Heo 4031826b3c libata: fix assigned IRQ reporting
host->irq and host->irq2 should be set before ata_host_register() for
IRQ reporting to work.  Move up host->irq assignment in
ata_host_activate() and add it to ata_pci_init_one() native path and
pata_cs5520.

The port info printing in ata_host_register() doesn't fit all the
different controllers.  It should probably be moved out to LLDs with
some helpers in the future.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-03 10:06:35 -04:00
Len Brown aa2e09da2a ACPI: fix acpi_osi=!Linux
Need to check for special case "acpi_osi=!Linux" before handling the
general case "acpi_osi=!*", or it will have no effect.

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-02 21:06:48 -07:00
Linus Torvalds 52c4d73a6c Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IPoIB/cm: Partial error clean up unmaps wrong address
  mlx4_core: Add new Mellanox device IDs
2007-07-02 21:05:35 -07:00
Linus Torvalds c1fa238762 Merge branch 'upstream-linus2' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus2' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] sata_nv: undo merge error
2007-07-02 21:04:36 -07:00
Linus Torvalds b59449bea2 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  3c589_cs: fix local_bh_enable warning
  RESEND [PATCH 3/3] NetXen: Graceful teardown of interface and hardware upon module unload
  drivers/net/ns83820.c: fix a check-after-use
  net/usb/cdc_ether minor sparse cleanup
  RESEND [PATCH 2/3] NetXen: Support per PCI-function interrupt mask registers
  RESEND [PATCH 1/3] NetXen: Fix issue of MSI not working correctly
  dm9601: Return 0 from bind() on success
  Update MAINTAINERS for USB network devices
  usbnet: Zero padding byte if there is tail room in skb
  dm9601: HW header size shouldn't be included in packet length
  starfire list alpha as 64 bit arch
  myri10ge: SET_NETDEV_DEV()
  gianfar: Fix typo bug introduced by move to udp_hdr()
  [PATCH] libertas: remove private ioctls
  [PATCH] libertas: fix WPA associations by handling ENABLE_RSN correctly
  [PATCH] libertas: kill wlan_scan_process_results
  [PATCH] libertas: style fixes
2007-07-02 21:01:38 -07:00
Linus Torvalds fffe566b8f Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: PATA-mode fixes for sis_sata
  libata: add HTS541616J9SA00 to NCQ blacklist
  sata_nv: allow changing queue depth
  sata_inic162x: disable LBA48 devices
  libata: remove reading alt_status from ata_hsm_qc_complete()
  libata: pata_pdc2027x PLL input clock fix
  scsi disk help file is not complete
2007-07-02 21:01:13 -07:00
Linus Torvalds dcf87a2e35 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:
  firewire: add Kconfig help on building both stacks
  firewire: fix async reception on big endian machines
2007-07-02 20:59:54 -07:00
Ralph Campbell 841adfca9c IPoIB/cm: Partial error clean up unmaps wrong address
If a page can't be allocated for the frag list of a skb, the code to
unmap the partially allocated list is off by one.  For exaple, if
'frags' equals one, i == 0, and the alloc_page() fails, then the old
loop would have unmapped mapping[1] which is uninitialized.  The same
would happen if the call to ib_dma_map_page() failed.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Acked-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-07-02 20:48:31 -07:00
Jack Morgenstein 786f238e4f mlx4_core: Add new Mellanox device IDs
Add new IDs for PCIe gen2 devices.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-07-02 20:41:35 -07:00
Jeff Garzik 531e3a61f5 [libata] sata_nv: undo merge error
Only the ADMA entry was supposed to be able to change queue depth.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-02 18:12:19 -04:00
Patrick McHardy 63ac9b9159 3c589_cs: fix local_bh_enable warning
Russell King wrote:
> Having upgraded from 2.6.16 to 2.6.22-rc6, I'm now seeing the following.
>
> Looks like netfilter is calling local_bh_enable() with IRQs disabled,
> which would appear to be illegal.  Thankfully, this is a warn-once
> warning.
>
> WARNING: at /home/rmk/git/linux-2.6-rmk/kernel/softirq.c:138 local_bh_enable()
> [...]
> [<c01447fc>] (nf_conntrack_destroy+0x0/0x2c) from [<c012c05c>] (__kfree_skb+0xd0/0x100)
> [<c012bf8c>] (__kfree_skb+0x0/0x100) from [<c012c0d8>] (kfree_skb+0x4c/0x50)
>  r5:c12a3800 r4:00000300
> [<c012c08c>] (kfree_skb+0x0/0x50) from [<bf03cbb0>] (el3_start_xmit+0xb8/0xd0 [3c589_cs])
> [<bf03caf8>] (el3_start_xmit+0x0/0xd0 [3c589_cs]) from [<c01324dc>] (dev_hard_start_xmit+0x1a8/0x244)
>  r7:c12a3800 r6:c1a9aa00 r5:c1a9aa00 r4:c12a3800
> [<c0132334>] (dev_hard_start_xmit+0x0/0x244) from [<c013fcc0>] (__qdisc_run+0xb0/0x198)

Thats a bug in the 3c589_cs driver. Patch attached.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-02 10:50:46 -04:00
Uwe Koziolek a3cabb271e libata: PATA-mode fixes for sis_sata
Changed PATA handler for PATA-ports used by sata_sis.
This patch was originally submitted by Jeff Garzik.

Added PCI-ID 1180 for SiS966 Controller in pata_sis.
The 1180 mode is fully compatible to other SiS PATA-controller.

The PCI-ID 1183 is SATA in PATA-emulation, but not fully compatible
to SiS5513/5518. sata_sis.c is forwarding this ID to pata_sis.
1183 is not working if simply added to pata_sis.
This handling fixes issues with SiS968.

Signed-off-by: Uwe Koziolek <uwe.koziolek@gmx.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-02 10:17:42 -04:00