summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'upstream-linus' of ↵Linus Torvalds2009-12-195-51/+163
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: sata_mv: remove pointless NULL test pata_hpt3x2n: fix clock turnaround libata: fix reporting of drained bytes when clearing DRQ sata_mv: add power management support for the PCI controllers. sata_mv: store the board_idx into the host private data pata_octeon_cf: use resource_size(), to fix resource sizing bug libata: use the WRITE_SAME_16 define sata_mv: move the PCI bar description initialization code sata_mv: add power management support for the platform driver sata_mv: support clkdev framework sata_mv: increase PIO IORDY timeout Fixed crazy mode-change in merge.
| * sata_mv: remove pointless NULL testJeff Garzik2009-12-171-1/+1
| | | | | | | | | | | | | | | | Remove !ap test, where ap is guaranteed not-NULL. Found by way of automated bug report from Alexander Strakh via "Linux Device Drivers Verification Project (Svace Detector)" Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * pata_hpt3x2n: fix clock turnaroundSergei Shtylyov2009-12-171-29/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clock turnaround code still doesn't work for several reasons: - 'USE_DPLL' flag in 'ap->host->private_data' is never initialized or updated, so the driver can only set the chip to the DPLL clock mode, not the PCI mode; - the driver doesn't serialize access to the channels depending on the current clock mode like the vendor drivers, so the clock turnaround is only executed "optionally", not always as it should be; - the wrong ports are written to when hpt3x2n_set_clock() is called for the secondary channel; - hpt3x2n_set_clock() can inadvertently enable the disabled channels when resetting the channel state machines. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * libata: fix reporting of drained bytes when clearing DRQRobert Hancock2009-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | When we drain data from a device to clear DRQ during error recovery, the number of bytes reported as drained is too low by a factor of 2 because the count is actually reporting the number of words drained, not bytes. Fix this. Signed-off-by: Robert Hancock <hancockrwd@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * sata_mv: add power management support for the PCI controllers.Saeed Bishara2009-12-171-0/+29
| | | | | | | | | | Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * sata_mv: store the board_idx into the host private dataSaeed Bishara2009-12-171-6/+8
| | | | | | | | | | | | | | This information will be used in the resume function. Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * pata_octeon_cf: use resource_size(), to fix resource sizing bugH Hartley Sweeten2009-12-171-1/+1
| | | | | | | | | | | | | | | | It appears the size for cs1 is calculated using the wrong resource. Use the function resource_size to get the correct value. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * libata: use the WRITE_SAME_16 defineChristoph Hellwig2009-12-171-1/+1
| | | | | | | | | | | | | | | | Now that the scsi tree has hit mainline we can use the newly added WRITE_SAME_16 define. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * sata_mv: move the PCI bar description initialization codeSaeed Bishara2009-12-171-9/+10
| | | | | | | | | | | | | | | | | | The mv_init_host will be used to initialize the host hw on resume. The PCI bar description need to be initialized only once when the device probed. Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * sata_mv: add power management support for the platform driverSaeed Bishara2009-12-171-0/+43
| | | | | | | | | | Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * sata_mv: support clkdev frameworkSaeed Bishara2009-12-171-3/+34
| | | | | | | | | | Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * sata_mv: increase PIO IORDY timeoutSaeed Bishara2009-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | The old value (0xbc) in cycles of the IORDY timeout is suitable for devices with core clock of 166 MHz, but some SoC controllers have faster core clocks. The new value will make the IORDY timeout large enough also for all SoC devices. Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6Linus Torvalds2009-12-1920-49/+71
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: [S390] Use strim instead of strstrip to avoid false warnings. [S390] qdio: add counter for input queue full condition [S390] qdio: remove superfluous log entries and WARN_ONs. [S390] ptrace: dont abuse PT_PTRACED [S390] cio: fix channel path vary [S390] drivers: Correct size given to memset [S390] tape: Add pr_fmt() macro to all tape source files [S390] rename NT_PRXSTATUS to NT_S390_HIGHREGS [S390] tty: PTR_ERR return of wrong pointer in fs3270_open() [S390] s390: PTR_ERR return of wrong pointer in fallback_init_cip() [S390] dasd: PTR_ERR return of wrong pointer in [S390] dasd: move dasd-diag kmsg to dasd [S390] cio: fix drvdata usage for the console subchannel [S390] wire up sys_recvmmsg
| * | [S390] Use strim instead of strstrip to avoid false warnings.Heiko Carstens2009-12-181-1/+1
| | | | | | | | | | | | | | | | | | Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | [S390] qdio: add counter for input queue full conditionJan Glauber2009-12-183-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a counter to the qdio performance statistics that indicates that no free buffers were left in the input queue. If the counter gets increased it means that the qdio adapter filled all available buffers and possibly had more buffers ready but could not transmit them. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | [S390] qdio: remove superfluous log entries and WARN_ONs.Jan Glauber2009-12-181-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't write debug feature log entries for sl, slsb and sbal since these elements can be located from the qdio_q pointer which is also logged. * Convert WARN_ON for wrong alignment of sbal to BUG_ON. * Remove WARN_ON's for wrong alignment of q / qib / slib since these alignments should be guaranteed by kmem_cache_alloc alignment / struct aligned attribute / __get_free_page. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | [S390] cio: fix channel path varyPeter Oberparleiter2009-12-183-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Channel path vary is currently broken: channel paths which are varied offline are still used by Linux. The reason for this is that: * the path mask indicating which paths of an I/O device can be used is reset by each internal I/O request * the logic that checks if a path group is already in its designated target state incorrectly interprets the result "is correctly set" as "is correctly set and available" Fix this by resetting the path mask only for internal I/O requests which affect the path mask and by correcting the pgid check logic. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | [S390] drivers: Correct size given to memsetJulia Lawall2009-12-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Memset should be given the size of the structure, not the size of the pointer. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; T *x; expression E; @@ memset(x, E, sizeof( + * x)) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | [S390] tape: Add pr_fmt() macro to all tape source filesMichael Holzheu2009-12-188-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Without defining the pr_fmt() macro, the "tape: " prefix will not be printed when using the pr_xxx printk macros. This patch adds the missing definitions. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | [S390] tty: PTR_ERR return of wrong pointer in fs3270_open()Roel Kluin2009-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | Return the PTR_ERR of the correct pointer. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | [S390] dasd: PTR_ERR return of wrong pointer inRoel Kluin2009-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | Return the PTR_ERR of the correct pointer. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | [S390] dasd: move dasd-diag kmsg to dasdStefan Haberland2009-12-181-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | The DIAG discipline does not have a own driver name. It shows up as dasd-eckd or dasd-fba. So messages for dasd-diag are moved to the generic dasd part. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | [S390] cio: fix drvdata usage for the console subchannelSebastian Ott2009-12-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using dev_set_drvdata prior to device_register will force the driver core to kmalloc its private data. Since we use this for the console subchannel lets set the drvdata before taking the subchannels spinlock. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* | | watchdog: update geodewdt for new MFGPT APIAndres Salomon2009-12-182-22/+20
|/ / | | | | | | | | | | | | | | Update to the new cs5535_mfgpt* API. The geode-specific wording should eventually be dropped from this driver... Signed-off-by: Andres Salomon <dilinger@collabora.co.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'cpumask-cleanups' of ↵Linus Torvalds2009-12-172-7/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * 'cpumask-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: cpumask: rename tsk_cpumask to tsk_cpus_allowed cpumask: don't recommend set_cpus_allowed hack in Documentation/cpu-hotplug.txt cpumask: avoid dereferencing struct cpumask cpumask: convert drivers/idle/i7300_idle.c to cpumask_var_t cpumask: use modern cpumask style in drivers/scsi/fcoe/fcoe.c cpumask: avoid deprecated function in mm/slab.c cpumask: use cpu_online in kernel/perf_event.c
| * | cpumask: convert drivers/idle/i7300_idle.c to cpumask_var_tRusty Russell2009-12-171-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fairly simple transformation: 1) cpumask_t -> cpumask_var_t and alloc_cpumask_var/free_cpumask_var (which are a NOOP unless CONFIG_CPUMASK_OFFSTACK=y). 2) cpu_set -> cpumask_set_cpu 3) cpus_weight -> cpumask_weight 4) cpu_clear -> cpumask_clear_cpu Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> To: Andy Henroid <andrew.d.henroid@intel.com>
| * | cpumask: use modern cpumask style in drivers/scsi/fcoe/fcoe.cRusty Russell2009-12-171-1/+1
| |/ | | | | | | | | | | | | | | Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: "James E.J. Bottomley" <James.Bottomley@suse.de> Cc: Robert Love <robert.w.love@intel.com> Cc: Chris Leech <christopher.leech@intel.com> Cc: linux-scsi@vger.kernel.org
* | Merge branch 'omap-fixes-for-linus' of ↵Linus Torvalds2009-12-176-15/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 * 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: OMAP3: serial - fix bug introduced in mfd: twl: fix twl4030 rename for remaining driver, board files USB ehci: replace mach header with plat omap3: Allow EHCI to be built on OMAP3
| * | mfd: twl: fix twl4030 rename for remaining driver, board filesBalaji T K2009-12-165-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent drivers/mfd/twl4030* renames to twl broke compile for various boards as the series was missing a patch to change the board-*.c files. This patch renames include twl4030.h to include twl.h and also renames twl4030_i2c_ routines. Signed-off-by: Balaji T K <balajitk@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: Felipe Balbi <felipe.balbi@nokia.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | USB ehci: replace mach header with platThomas Weber2009-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the mach/usb.h with plat/usb.h Cc: linux-usb-devel@lists.sourceforge.net Signed-off-by: Thomas Weber <weber@corscience.de> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Tony Lindgren <tony@atomide.com>
* | | Merge branch 'hwmon-for-linus' of ↵Linus Torvalds2009-12-177-30/+706
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (w83627hf) Fix for "No such device" hwmon: (sht15) Off-by-one error in array index + incorrect constants hwmon: Add driver for VIA CPU core temperature hwmon: (smsc47m1) Enable device if needed hwmon: (smsc47m1) Fail module loading on error hwmon: (smsc47m1) Only request I/O ports we really use hwmon: New driver for AMD Family 10h/11h CPUs
| * | | hwmon: (w83627hf) Fix for "No such device"Christian Schulte2009-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit b72656dbc491484765776a16eeb55ef2e90efea6 introduced a bug leading to the w83627hf_find function no longer finding any chips. Signed-off-by: Christian Schulte <cs@schulte.it> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (sht15) Off-by-one error in array index + incorrect constantsJonathan Cameron2009-12-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix an off-by-one error in array index + incorrect constants. Signed-off-by: Christoph Walser <walser@tik.ee.ethz.ch> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: Add driver for VIA CPU core temperatureHarald Welte2009-12-163-0/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a driver for the on-die digital temperature sensor of VIA's recent CPU models. [JD: Misc clean-ups.] Signed-off-by: Harald Welte <HaraldWelte@viatech.com> Cc: Juerg Haefliger <juergh@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Adam Nielsen <a.nielsen@shikadi.net>
| * | | hwmon: (smsc47m1) Enable device if neededJean Delvare2009-12-161-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the address is set but the device isn't enabled, attempt to enable it. If it won't work for any reason (resource conflict, no function enabled) the initial state is restored. The initial state is also restored on module unloading. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Sean Fidler <fidlersean@gmail.com>
| * | | hwmon: (smsc47m1) Fail module loading on errorJean Delvare2009-12-161-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an error occurs during probing, there's no point in keeping the module in memory. Better fail the module loading early to make the problem more visible. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Sean Fidler <fidlersean@gmail.com>
| * | | hwmon: (smsc47m1) Only request I/O ports we really useJean Delvare2009-12-161-10/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The I/O area of the SMSC LPC47M1xx chips which we use, gives access to a lot of registers, some of which are related to fan speed monitoring and control, but many are not. At the moment, the smsc47m1 driver requests the whole I/O port range. This could easily result in resource conflicts with either ACPI or other drivers. Request only the I/O ports we really use, to prevent such conflicts. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Sean Fidler <fidlersean@gmail.com>
| * | | hwmon: New driver for AMD Family 10h/11h CPUsClemens Ladisch2009-12-163-0/+210
| |/ / | | | | | | | | | | | | | | | | | | | | | This adds a driver for the internal temperature sensor of AMD Family 10h and 11h CPUs. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds2009-12-1747-358/+4909
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (40 commits) [SCSI] 3w-9xxx fix bug in sgl loading [SCSI] fcoe, libfc: adds enable/disable for fcoe interface [SCSI] libfc: reduce hold time on SCSI host lock [SCSI] libfc: remote port gets stuck in restart state without really restarting [SCSI] pm8001: misc code cleanup [SCSI] pm8001: enable read HBA SAS address from VPD [SCSI] pm8001: do not reset local sata as it will not be found if reset [SCSI] pm8001: bit set pm8001_ha->flags [SCSI] pm8001:fix potential NULL pointer dereference [SCSI] pm8001: set SSC down-spreading only to get less errors on some 6G device. [SCSI] pm8001: fix endian issues with SAS address [SCSI] pm8001: enhance error handle for IO patch [SCSI] pm8001: Fix for sata io circular lock dependency. [SCSI] hpsa: add driver for HP Smart Array controllers. [SCSI] cxgb3i: always use negative errno in case of error [SCSI] bnx2i: minor code cleanup and update driver version [SCSI] bnx2i: Task management ABORT TASK fixes [SCSI] bnx2i: update CQ arming algorith for 5771x chipsets [SCSI] bnx2i: Adjust sq_size module parametr to power of 2 only if a non-zero value is specified [SCSI] bnx2i: Add 5771E device support to bnx2i driver ...
| * | | [SCSI] 3w-9xxx fix bug in sgl loadingadam radford2009-12-121-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This small patch fixes a bug in the 3w-9xxx driver where it would load an invalid sgl address in the ioctl path even if request length was zero. Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * | | [SCSI] fcoe, libfc: adds enable/disable for fcoe interfaceVasu Dev2009-12-122-3/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to allow fcoemon util to enable or disable a fcoe interface according to DCB link state change. Adds sysfs module param enable and disable for this and also updates existing other module param description to be consistent and more accurate since older description had double "fcoe" word with less meaningful netdev reference to user space. Adds code to ignore redundant fc_lport_enter_reset handling for a already disabled fcoe interface by checking LPORT_ST_DISABLED or LPORT_ST_LOGO states, this also prevents lport state transition on link flap on a disabled interface. Above changes required lport state transition to get out of disabled or logo state on call to fc_fabric_login. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * | | [SCSI] libfc: reduce hold time on SCSI host lockChris Leech2009-12-121-29/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new lock to protect the list of fc_fcp_pkt structs in libfc instead of using the host lock. This reduces the contention of this heavily used lock, and I see up to a 25% performance gain in CPU bound small I/O tests when scaling out across multiple quad-core CPUs. The big win is in removing the host lock from the completion path completely, as it does not need to be held around the call to scsi_done. Signed-off-by: Chris Leech <christopher.leech@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * | | [SCSI] libfc: remote port gets stuck in restart state without really restartingAbhijeet Joglekar2009-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We ran into a scenario where a remote port goes into RESTART state, but never gets added to scsi transport. The running vmcore showed the following: a) Port was in RESTART state b) rdata->event was STOP c) no work gets scheduled for the remote work to fc_rport_work After this point, shut/no-shut of the remote port did not cause the port to get re-discovered. The port would move betwen DELETE and RESTART states, but the event would always be STOP, no work would get scheduled to fc_rport_work and the port would not get added to scsi_transport. The problem is that rdata->event is not set to NONE after a port is restarted. After this point, no more work gets scheduled for the remote port since new work is scheduled only if rdata->event is non-NONE. So, the event and state keep changing, but fc_rport_work does not get scheduled to actually handle the event. Here's a transition of states that explains the above observation: ) Port is first in READY State, event is NONE 2) RSCN on shut, port goes to DELETED, event is stop 3) Before fc_rport_work runs, RSCN on no-shut, port goes to RESTART, event is still STOP 4) fc_rport_work gets scheduled, removes the port from transport, sees state as RESTART, begins the PLOGI state machine, event remains as STOP (event NOT changed to NONE, this is the bug) 5) Plogi state machine completes, port state goes to READY, event goes to READY, but no work is scheduled since event was STOP (non-NONE) before. Fc_rport_work is not scheduled, port remains in READY state, but is not added to transport. Things are broken at this point. Libfc rport is ready, but no transport rport created. 6) now a shut causes port state to change to DELETE, event to change to STOP, no work gets scheduled 7) no-shut causes port state to change to RESTART, event remains at STOP, no work gets scheduled (6) and (7) now get repeated everytime we do shut/no-shut. No way to get out of this state. Fcc reset does not help too. Only way to get out is to load/unload module. Fix is to set rdata->event to NONE while processing the STOP/LOGO/FAILED events, inside the discovery and rport locks. Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * | | [SCSI] pm8001: misc code cleanupjack wang2009-12-103-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add more data to printk's, add some spaces around arithmetic ops and improve comments. Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * | | [SCSI] pm8001: enable read HBA SAS address from VPDjack wang2009-12-103-20/+26
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * | | [SCSI] pm8001: do not reset local sata as it will not be found if resetjack wang2009-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * | | [SCSI] pm8001: bit set pm8001_ha->flagsjack wang2009-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * | | [SCSI] pm8001:fix potential NULL pointer dereferencejack wang2009-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * | | [SCSI] pm8001: set SSC down-spreading only to get less errors on some 6G device.jack wang2009-12-101-44/+21
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * | | [SCSI] pm8001: fix endian issues with SAS addressjack wang2009-12-102-5/+5
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>