summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* spidernet: fix racy double-free of skbLinas Vepstas2007-02-271-8/+15
| | | | | | | | | | | | It appears that under certain circumstances, a race will result in a double-free of an skb. This patch null's out the skb pointer upon the skb free, avoiding the inadvertent deref of bogus data. The next patch fixes the actual race. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com> Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* spidernet: separate hardware state from driver state.Linas Vepstas2007-02-272-71/+95
| | | | | | | | | | | This patch separates the hardware descriptor state from the driver descriptor state, per (old) suggestion from Ben Herrenschmidt. This compiles and boots and seems to work. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com> Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* spidernet: move medium variable into card structJens Osterkamp2007-02-272-7/+9
| | | | | | | | | This moves the medium variable into the spidernet card structure. It renames the GMII_ variables to BCM54XX specific ones. Signed-off-by: Jens Osterkamp <jens@de.ibm.com> Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* spidernet: remove txram full loggingIshizaki Kou2007-02-271-2/+2
| | | | | | | | | | This patches removes logging for SPIDER_NET_GTMFLLINT interrupts. Since the interrupts are not irregular, and they happen frequently when using 100Mbps network switches. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* spidernet: spidernet: add support for CellebKou Ishizaki2007-02-273-4/+12
| | | | | | | | | This patch adds or changes some HW specific settings for spider_net on Celleb. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* spidernet: load firmware when openKou Ishizaki2007-02-271-124/+123Star
| | | | | | | | | This patch moves calling init_firmware() from spider_net_probe() to spider_net_open() so as to use the driver by built-in. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* spidernet: autoneg support for CellebKou Ishizaki2007-02-272-16/+170
| | | | | | | | Add auto negotiation support for Celleb. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* spidernet: compile break.Linas Vepstas2007-02-271-4/+1Star
| | | | | | | | | | | | As of 2.6.20-git4, the spider_net driver does not compile. This appears to be due to some archaic usage involving kobjects. It also fixes a nasty double-free during ifdown of the interface. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com> Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sungem_phy: support bcm5461 phy, autoneg.Jens Osterkamp2007-02-272-136/+263
| | | | | | | | | | | | | | | | | | | | | | | | This version moves the medium variable to the card specific structure and changes the GMII_* to BCM54XX_* #defines. This patch adds improved version of enable_fiber for both the 5421 and the 5461 phy. It is now possible to specify with these wether you want autonegotiation or not. This is needed for bladecenter switches where some expect autonegotiation and some dont seem to like this at all. Depending on this flag it sets phy->autoneg accordingly for the fiber mode. More importantly it implements proper read_link and poll_link functions for both phys which can handle both copper and fiber mode by determining the medium first and then branching to the required functions. For fiber they all work fine, for copper they are not tested but return the result of the genmii_* function anyway which is supposed to work. The patch moves the genmii_* functions around to avoid foreward declarations. Signed-off-by: Jens Osterkamp <jens@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* forcedeth: fix checksum feature in mcp65Ayaz Abdulla2007-02-271-4/+4
| | | | | | | | | This patch removes checksum offload feature in mcp65 chipsets as they are not supported in hw. Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* forcedeth: disable msixAyaz Abdulla2007-02-271-1/+1
| | | | | | | | | There seems to be an issue when both MSI-X is enabled and NAPI is configured. This patch disables MSI-X until the issue is root caused. Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* forcedeth: fixed missing call in napi pollAyaz Abdulla2007-02-271-3/+7
| | | | | | | | | The napi poll routine was missing the call to the optimized rx process routine. This patch adds the missing call for the optimized path. Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [netdrvr] tc35815: fix obvious bugsJeff Garzik2007-02-271-1/+9
| | | | | | | | * clear_page() use is wrong. We might have multiple pages. Use memset() instead. * Call pci_unregister_driver() in module exit. Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Merge branch 'upstream-linus' of ↵Linus Torvalds2007-02-2651-552/+1985
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (51 commits) [libata] bump versions [libata] Trim trailing whitespace. [libata] sata_mv: Fix 50xx irq mask [libata] sata_mv: don't touch reserved bits in EDMA config register libata: Use new id_to_dma_mode function to tidy reporting in more drivers (minimally tested) pata_pcmcia: Fix oops in 2.6.21-rc1 Add id_to_dma_mode function for printing DMA modes sata_promise: simplify port setup sata_promise: fix 20619 new EH merge error [libata] ACPI: remove needless ->qc_issue hook existence test sata_vsc: refactor vsc_sata_interrupt and hook up error handling sata_sil: ignore and clear spurious IRQs while executing commands by polling sata_mv: fix pci_enable_msi() error handling pata_amd: fix an obvious bug in cable detection [libata] ata_piix: remove duplicate PCI IDs sata_nv: complain on spurious completion notifiers libata: test major version in ata_id_is_sata() sata_nv: kill old private BMDMA helper functions libata: fix remaining ap->id ahci: consider SDB FIS containing spurious NCQ completions HSM violation (regenerated) ...
| * [libata] bump versionsJeff Garzik2007-02-2635-35/+35
| | | | | | | | | | | | Bump versions based on changes submitted during 2.6.21 merge window. Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * [libata] Trim trailing whitespace.Jeff Garzik2007-02-269-18/+18
| | | | | | | | | | | | No code changes. Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * [libata] sata_mv: Fix 50xx irq maskJeff Garzik2007-02-261-1/+10
| | | | | | | | | | | | | | | | | | | | | | IRQ mask bits assumed a 60xx or newer generation chip, which is very wrong for the 50xx series. Luckily both generations shared the per-port interrupt mask bits, leaving only the "misc chip features" bits to be completely mismatched. Fix 50xx by ensuring we only program bits that exist. Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * [libata] sata_mv: don't touch reserved bits in EDMA config registerJeff Garzik2007-02-261-8/+12
| | | | | | | | | | | | | | | | | | | | The code in mv_edma_cfg() reflected its 60xx origins, by doing things [slightly] incorrectly on the older 50xx and newer 6042/7042 chips. Clean up the EDMA configuration setup such that, each chip family carefully initializes its own EDMA setup. Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * libata: Use new id_to_dma_mode function to tidy reporting in more drivers ↵Alan2007-02-252-2/+4
| | | | | | | | | | | | | | (minimally tested) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * pata_pcmcia: Fix oops in 2.6.21-rc1Alan2007-02-251-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Manuel Lass reports: > This bug is also present in 2.6.21-rc1, and this patch > indeed fixes it. The change to the devres layer re-orders the execution of cleanup functions and in turn causes the pcmcia layer to oops as it zaps a pointer now needed later on. We simply leave the pointer alone. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * Add id_to_dma_mode function for printing DMA modesAlan2007-02-251-0/+44
| | | | | | | | | | | | | | | | Also export dev_disable as this is needed by drivers doing slave decode filtering, which will follow shortly Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_promise: simplify port setupMikael Pettersson2007-02-251-19/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each place in pdc_ata_init_one() that initialises a SATA port first calls pdc_ata_setup_port(), and then manually assigns the port's ->scr_addr. Simplify the code by extending pdc_ata_setup_port() to also handle scr_addr initialisation; for PATA ports we pass NULL as scr_addr. The initialisation of the PATA-only 20619 redundantly set up scr_addr for the ports. Remove this. Tested on 20619, 20575, and 20775 chips. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_promise: fix 20619 new EH merge errorMikael Pettersson2007-02-251-0/+1
| | | | | | | | | | | | | | | | | | When I merged my 20619 new EH conversion with #libata-upstream I had to manually resolve a conflict, and inadvertently lost pdc_pata_ops' ->post_internal_cmd binding. Corrected by this patch. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * [libata] ACPI: remove needless ->qc_issue hook existence testJeff Garzik2007-02-251-29/+22Star
| | | | | | | | | | | | | | All drivers must implement this hook, otherwise ATA commands would go nowhere (and a lot of other oopsen would appear as well). Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_vsc: refactor vsc_sata_interrupt and hook up error handlingDan Williams2007-02-251-49/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate sata_vsc interrupt handling into a normal (per-port) path and an error path with the addition of vsc_port_intr and vsc_error_intr respectively. The error path handles interrupt based hotplug events which requires the definition of vsc_freeze and vsc_thaw. Note: vsc_port_intr has a workaround for unexpected interrupts that occur during polled commands. This fixes a regression between 2.6.19 and 2.6.20. Changes in take2: * removed definition of invalid fis bit * let standard ata-error-handling handle the serror register * clear all unhandled interrupts * revert changes to vsc_intr_mask_update (vsc_thaw enables all interrupts) * use unlikely() for the pci-abort and not-our-interrupt cases in vsc_sata_interrupt Changes in take3: * Unify the "add" + "hook-up" patches into this single patch [htejun@gmail.com: clean up comments and suggestions] Cc: Jeremy Higdon <jeremy@sgi.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_sil: ignore and clear spurious IRQs while executing commands by pollingTejun Heo2007-02-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | sata_sil used to trigger HSM error if IRQ occurs during polling command. This didn't matter because polling wasn't used in sata_sil. However, as of 2.6.20, all IDENTIFYs are performed by polling and device detection sometimes fails due to spurious IRQ. This patch makes sata_sil ignore and clear spurious IRQ while executing commands by polling. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_mv: fix pci_enable_msi() error handlingTejun Heo2007-02-251-1/+1
| | | | | | | | | | | | | | | | intx should be turned on when pci_enable_msi() fails not when it succeeds. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * pata_amd: fix an obvious bug in cable detectionTejun Heo2007-02-251-2/+2
| | | | | | | | | | | | | | | | 80c test mask is at bits 18 and 19 of EIDE Controller Configuration not 22 and 23. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * [libata] ata_piix: remove duplicate PCI IDsJeff Garzik2007-02-231-2/+0Star
| | | | | | | | | | | | | | | | | | Duplicate ids noticed by Kay Sievers <kay.sievers@suse.de> Although 100% different, this is based on a patch by Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_nv: complain on spurious completion notifiersRobert Hancock2007-02-231-0/+11
| | | | | | | | | | | | | | | | | | | | | | Recently Tejun wrote a patch to ahci.c to make it raise a HSM violation if the drive attempted to complete a tag that wasn't outstanding. We could run into the same problem with sata_nv ADMA. This adds code to raise a HSM violation error if the controller gives us a notifier tag that isn't outstanding, since the drive may be issuing spurious completions. Signed-off-by: Robert Hancock <hancockr@shaw.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_nv: kill old private BMDMA helper functionsRobert Hancock2007-02-231-74/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | sata_nv implemented its own copies of the BMDMA helper functions for ADMA, since the ADMA BMDMA status registers are PIO while the other registers are MMIO, and this was the only way to handle this previously. Now that we have iomap support, the standard routines should just work, so use them. The only thing we need to override as far as ADMA and BMDMA is the post_internal_cmd callback, where we should only call ata_post_internal_cmd if we are in port-register mode. Signed-off-by: Robert Hancock <hancockr@shaw.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * libata: fix remaining ap->idTejun Heo2007-02-232-14/+10Star
| | | | | | | | | | | | | | | | | | Merge order left libata-acpi and pata_scc with remainling usage of ap->id. Kill superflous id printing and substitute the remaining ones with ap->print_id. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * ahci: consider SDB FIS containing spurious NCQ completions HSM violation ↵Tejun Heo2007-02-231-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (regenerated) SDB FIS containing spurious NCQ completions is a clear protocol violation. Currently, only some Maxtors with early firmware revisions are showing this problem. Those firmwares have other NCQ related problems including buggy NCQ error reporting and occasional lock up after NCQ errors. Consider spurious NCQ completions HSM violation and freeze the port after it. EH will turn off NCQ after this happens several times. Eventually drives which show this behavior should be blacklisted for NCQ. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * pata_sl82c105: remove un-needed code pathsAlan2007-02-211-30/+9Star
| | | | | | | | | | | | | | | | | | Remove the DMA setup function. As pointed out by Sergey we set the actual DMA clock timing in set_dmamode so we don't actually need to do anything with it at set up time, but just leave the PIO timings loaded. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * pata_sil680: Assorted fixesAlan2007-02-211-2/+12
| | | | | | | | | | | | | | Correct iordy handling and DMA bit flag handling. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * pata_oldpiix: Call both PIO and DMA setup functions on switch as they are ↵Alan2007-02-211-3/+2Star
| | | | | | | | | | | | | | | | | | called on set up Keeps the behaviour consistent and easier to understand. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * pata_ixp4xx: Fix up set_mode() function and display Configured for PIO infoAlan2007-02-211-3/+4
| | | | | | | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * pata_cs5520: suspend/resumeAlan2007-02-211-1/+25
| | | | | | | | | | | | | | | | The CS5520 isn't just an ATA controller and we must not pci_disable_device it as it turns into pci_disable_computer. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * pata: Display Configuring .. lines for devices with private set_mode methodsAlan2007-02-212-0/+2
| | | | | | | | | | | | | | | | We can't specify which mode in the cases below but we can at least say PIO and look consistent with the default. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * libata: s/ap->id/ap->print_id/gTejun Heo2007-02-219-48/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ata_port has two different id fields - id and port_no. id is system-wide 1-based unique id for the port while port_no is 0-based host-wide port number. The former is primarily used to identify the ATA port to the user in printk messages while the latter is used in various places in libata core and LLDs to index the port inside the host. The two fields feel quite similar and sometimes ap->id is used in place of ap->port_no, which is very difficult to spot. This patch renames ap->id to ap->print_id to reduce the possibility of such bugs. Some printk messages are adjusted such that id string (ata%u[.%u]) isn't printed twice and/or to use ata_*_printk() instead of hardcoded id format. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_nv: enable hotplug interrupt and fix some readl/readw mismatchesRobert Hancock2007-02-211-8/+10
| | | | | | | | | | | | | | | | | | | | We already have code that handles hotplug interrupt indications in ADMA mode, this turns on the control flag that actually enables these interrupts. Also fixes some cases in the same functions where a 16-bit register was read using a readl instead of a readw. Signed-off-by: Robert Hancock <hancockr@shaw.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_nv: Use notifier for completion checksRobert Hancock2007-02-211-15/+7Star
| | | | | | | | | | | | | | | | | | | | | | The hardware provides us a notifier register that indicates what command tags have completed. Use this to determine which CPBs to check, rather than blindly checking all active CPBs. This should provide a minor performance win, since if the controller has touched some of these incomplete CPBs, accessing them will likely result in a cache miss. Signed-off-by: Robert Hancock <hancockr@shaw.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_nv: Cleanup taskfile setupRobert Hancock2007-02-211-20/+21
| | | | | | | | | | | | | | | | | | This edits the taskfile setup to more closely match the way that libata sends the taskfile for other controllers. This avoids putting taskfile writes into the CPB buffer that are not needed according to the taskfile flags. Signed-off-by: Robert Hancock <hancockr@shaw.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_nv: cleanup CPB and APRD initializationRobert Hancock2007-02-211-6/+10
| | | | | | | | | | | | | | | | | | Clean up the initialization of the CPB and APRD structures so that we strictly follow the rules for ordering of writes to the CPB flags and response flags, and prevent duplicate initialization. Signed-off-by: Robert Hancock <hancockr@shaw.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_nv: Add CPB register info to error_handler outputRobert Hancock2007-02-211-2/+6
| | | | | | | | | | | | | | | | | | When error handling occurs with pending commands, output the contents of the next CPB count and next CPB index registers as well as the others, since these may be useful for debugging. Signed-off-by: Robert Hancock <hancockr@shaw.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * libata: Remove duplicate dma blacklist entryMagnus Damm2007-02-211-1/+0Star
| | | | | | | | | | | | | | | | | | libata: Remove duplicate dma blacklist entry The exact same entry is already present. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * pata_pcmcia: Update device tableMagnus Damm2007-02-211-2/+5
| | | | | | | | | | | | | | | | | | pata_pcmcia: Update device table Add CFA devices from I-O Data, Mitsubishi and Viking. Add SanDisk comment. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * sata_via: fix resource-managed iomap conversionTejun Heo2007-02-211-5/+17
| | | | | | | | | | | | | | | | | | Conversion to resource-managed iomap was buggy causing init failures on both vt6420 and 6421 - BAR5 wasn't mapped for both controllers while on vt6420 sata_via tried to map BAR0-4 twice. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * libata: fix ata_scsi_change_queue_depth()Tejun Heo2007-02-211-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix ata_scsi_change_queue_depth() such that... * NCQ on/off is exactly determined using the same logic as the issue path. * queue depth is adjusted to 1 if NCQ is not enabled. * -EINVAL is returned if requested action is ignored due to limitations. This fixes the bug which allows queue depth to be increased on blacklisted NCQ hosts/devices. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * libata: fix ata_scmd_need_defer()Tejun Heo2007-02-211-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix ata_scmd_need_defer() such that... * whether NCQ is used or not is exactly determined using the same criteria as the issue path. * defer-check is performed in all cases. This fixes race condition where turning off NCQ on the fly causes non-NCQ commands sneak into NCQ phase. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>