Re: [RFC/PATCH v4 0/3] UAS Gadget Driver.
On Tue, Dec 06, 2011 at 09:09:55AM -0800, Greg KH wrote: On Tue, Dec 06, 2011 at 08:39:58AM -0800, Shimrit Malichi wrote: On Sun, Dec 04, 2011 at 10:18:14PM +0200, Shimrit Malichi wrote: This patch series implements the UAS gadget driver. It has been tested using the following: 1. Linux UAS host driver 2. Internaly developed unittests framework The device is functional. More stress tests are needed. TODO: Further testing De-register the gadget if the main thread dies. What about all of the review comments you seem to be ignoring that have been made for this driver in the past? greg k-h We addressed most of the comments. One of them was indeed to use the target framework, however when we asked an additional information about how to use this framework we didn't get a detailed reply. Sebastian gave an answer on how to use it yesterday. We will study his answer, and come up with a new code. No one is going to normally give you such a detailed answer as he did. You were told to go use that interface, and Sebastian did just that, why couldn't you have done that in the first place, saving you, and everyone else here, time and effort of telling you to go do that again? other than that, it's just waste of time if you go write new code, now that Sebastian already has that almost ready. Save yourself sometime and just help Sebastian finishing what he's already done. Even testing is welcome at this stage. -- balbi signature.asc Description: Digital signature
Re: [PATCH V3] mmc: Kill block requests if card is removed
On 06/12/11 11:00, Sujit Reddy Thumma wrote: Hi Adrian/Per, Any comments on this patch? What about adding the following to the top of mmc_blk_cmd_recovery() if (mmc_card_removed(card)) return ERR_NOMEDIUM; Thanks, Sujit On 12/1/2011 4:00 PM, Sujit Reddy Thumma wrote: Kill block requests when the host realizes that the card is removed from the slot and is sure that subsequent requests are bound to fail. Do this silently so that the block layer doesn't output unnecessary error messages. Signed-off-by: Sujit Reddy Thummasthu...@codeaurora.org --- Changes in v3: - Dropped dependency on Per's patch and is now dependent on [PATCH V4] mmc: allow upper layers to determine immediately if a card has been removed by Adrian Hunter. - Modified commit text slightly as Adrian has implemented his own suggestion in a different patch. Changes in v2: - Changed the implementation with further comments from Adrian - Set the card removed flag in bus notifier callbacks - This patch is now dependent on patch from Per Forlin: http://thread.gmane.org/gmane.linux.kernel.mmc/11128/focus=11211 --- drivers/mmc/card/block.c | 14 +- drivers/mmc/card/queue.c |5 + 2 files changed, 18 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index c80bb6d..20350cb 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -119,6 +119,7 @@ enum mmc_blk_status { MMC_BLK_ABORT, MMC_BLK_DATA_ERR, MMC_BLK_ECC_ERR, +MMC_BLK_NOMEDIUM, }; module_param(perdev_minors, int, 0444); @@ -565,6 +566,7 @@ static int get_card_status(struct mmc_card *card, u32 *status, int retries) return err; } +#define ERR_NOMEDIUM3 #define ERR_RETRY2 #define ERR_ABORT1 #define ERR_CONTINUE0 @@ -648,8 +650,12 @@ static int mmc_blk_cmd_recovery(struct mmc_card *card, struct request *req, } /* We couldn't get a response from the card. Give up. */ -if (err) +if (err) { +/* Check if the card is removed */ +if (mmc_detect_card_removed(card-host)) +return ERR_NOMEDIUM; return ERR_ABORT; +} /* Flag ECC errors */ if ((status R1_CARD_ECC_FAILED) || @@ -922,6 +928,8 @@ static int mmc_blk_err_check(struct mmc_card *card, return MMC_BLK_RETRY; case ERR_ABORT: return MMC_BLK_ABORT; +case ERR_NOMEDIUM: +return MMC_BLK_NOMEDIUM; case ERR_CONTINUE: break; } @@ -1255,6 +1263,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) if (!ret) goto start_new_req; break; +case MMC_BLK_NOMEDIUM: +goto cmd_abort; } if (ret) { @@ -1271,6 +1281,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) cmd_abort: spin_lock_irq(md-lock); +if (mmc_card_removed(card)) +req-cmd_flags |= REQ_QUIET; while (ret) ret = __blk_end_request(req, -EIO, blk_rq_cur_bytes(req)); spin_unlock_irq(md-lock); diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index dcad59c..2517547 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -29,6 +29,8 @@ */ static int mmc_prep_request(struct request_queue *q, struct request *req) { +struct mmc_queue *mq = q-queuedata; + /* * We only like normal block requests and discards. */ @@ -37,6 +39,9 @@ static int mmc_prep_request(struct request_queue *q, struct request *req) return BLKPREP_KILL; } +if (mq mmc_card_removed(mq-card)) +return BLKPREP_KILL; + req-cmd_flags |= REQ_DONTPREP; return BLKPREP_OK; -- To unsubscribe from this list: send the line unsubscribe linux-arm-msm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] iommu/msm: Fix compile error in mach-msm/devices-iommu.c
On Tue, Dec 06, 2011 at 11:25:27AM +0100, Joerg Roedel wrote: I just added a patch to my iommu/fixes branch to fix a compile error with IOMMU enabled. If there is another fix for this already somewhere please let me know the commit-id so that I can add it to my out-of-tree branch. If there is no other fix yet I will push this upstream soon with the next round of iommu-fixes. You can go ahead and push this fix through your tree. I'll enable the iommu in my defconfigs so that I start catching things like this as well. David -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- To unsubscribe from this list: send the line unsubscribe linux-arm-msm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC/PATCH v4 0/3] UAS Gadget Driver.
On Tue, Dec 06, 2011 at 09:09:55AM -0800, Greg KH wrote: On Tue, Dec 06, 2011 at 08:39:58AM -0800, Shimrit Malichi wrote: On Sun, Dec 04, 2011 at 10:18:14PM +0200, Shimrit Malichi wrote: This patch series implements the UAS gadget driver. It has been tested using the following: 1. Linux UAS host driver 2. Internaly developed unittests framework The device is functional. More stress tests are needed. TODO: Further testing De-register the gadget if the main thread dies. What about all of the review comments you seem to be ignoring that have been made for this driver in the past? greg k-h We addressed most of the comments. One of them was indeed to use the target framework, however when we asked an additional information about how to use this framework we didn't get a detailed reply. Sebastian gave an answer on how to use it yesterday. We will study his answer, and come up with a new code. No one is going to normally give you such a detailed answer as he did. You were told to go use that interface, and Sebastian did just that, why couldn't you have done that in the first place, saving you, and everyone else here, time and effort of telling you to go do that again? other than that, it's just waste of time if you go write new code, now that Sebastian already has that almost ready. Save yourself sometime and just help Sebastian finishing what he's already done. Even testing is welcome at this stage. -- balbi Hi guys, Thanks for all your inputs. The good thing is that we now have a better understanding of the UASP implementation that was done offline, and as balbi mentioned, probably avoid duplicate work. We will coordinate with Sebastian regarding the next phases. Shimrit -- Consultant for Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum -- To unsubscribe from this list: send the line unsubscribe linux-arm-msm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] iommu/msm: Fix compile error in mach-msm/devices-iommu.c
On Wed, Dec 07, 2011 at 09:00:24AM -0800, David Brown wrote: On Tue, Dec 06, 2011 at 11:25:27AM +0100, Joerg Roedel wrote: I just added a patch to my iommu/fixes branch to fix a compile error with IOMMU enabled. If there is another fix for this already somewhere please let me know the commit-id so that I can add it to my out-of-tree branch. If there is no other fix yet I will push this upstream soon with the next round of iommu-fixes. You can go ahead and push this fix through your tree. I'll enable the iommu in my defconfigs so that I start catching things like this as well. Great, Thanks. -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo, Andrew Bowd Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632 -- To unsubscribe from this list: send the line unsubscribe linux-arm-msm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] fault_inject: Don't select frame pointer with ARM unwind
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER selects FRAME_POINTER. If ARM_UNWIND is used for backtracing, the FRAME_POINTER should not be selected. Signed-off-by: Laura Abbott lau...@codeaurora.org --- lib/Kconfig.debug |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6a9e368..75b5d6b 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1079,7 +1079,7 @@ config FAULT_INJECTION_STACKTRACE_FILTER depends on FAULT_INJECTION_DEBUG_FS STACKTRACE_SUPPORT depends on !X86_64 select STACKTRACE - select FRAME_POINTER if !PPC !S390 !MICROBLAZE + select FRAME_POINTER if !PPC !S390 !MICROBLAZE !ARM_UNWIND help Provide stacktrace filter for fault-injection capabilities -- 1.7.6 -- To unsubscribe from this list: send the line unsubscribe linux-arm-msm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] spi: QUP based bus driver for Qualcomm MSM chipsets
On Mon, Nov 14, 2011 at 02:58:27PM -0700, Harini Jayaraman wrote: This bus driver supports the QUP SPI hardware controller in the Qualcomm MSM SOCs. The Qualcomm Universal Peripheral Engine (QUP) is a general purpose data path engine with input/output FIFOs and an embedded SPI mini-core. The driver currently supports only FIFO mode. Signed-off-by: Harini Jayaraman hari...@codeaurora.org Wow, this driver is huge. This is a rough review only, mainly to see what can go away. This will make further reviews easier. --- v2: Updated copyright information (addresses comments from Bryan Huntsman). Files renamed. --- drivers/spi/Kconfig | 10 + drivers/spi/Makefile |1 + drivers/spi/spi-qup.c | 1144 + drivers/spi/spi-qup.h | 436 + include/linux/platform_data/msm_spi.h | 19 + 5 files changed, 1610 insertions(+), 0 deletions(-) create mode 100644 drivers/spi/spi-qup.c create mode 100644 drivers/spi/spi-qup.h create mode 100644 include/linux/platform_data/msm_spi.h diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 52e2900..88ea7c5 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -280,6 +280,16 @@ config SPI_PXA2XX config SPI_PXA2XX_PCI def_bool SPI_PXA2XX X86_32 PCI +config SPI_QUP + tristate Qualcomm MSM SPI QUPe Support + depends on ARCH_MSM + help + Support for Serial Peripheral Interface for Qualcomm Universal + Peripheral. + + This driver can also be built as a module. If so, the module + will be called spi-qup. + config SPI_S3C24XX tristate Samsung S3C24XX series SPI depends on ARCH_S3C2410 EXPERIMENTAL diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index 61c3261..4d840ff 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -44,6 +44,7 @@ obj-$(CONFIG_SPI_PL022) += spi-pl022.o obj-$(CONFIG_SPI_PPC4xx) += spi-ppc4xx.o obj-$(CONFIG_SPI_PXA2XX) += spi-pxa2xx.o obj-$(CONFIG_SPI_PXA2XX_PCI) += spi-pxa2xx-pci.o +obj-$(CONFIG_SPI_QUP)+= spi-qup.o obj-$(CONFIG_SPI_S3C24XX)+= spi-s3c24xx-hw.o spi-s3c24xx-hw-y := spi-s3c24xx.o spi-s3c24xx-hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi-s3c24xx-fiq.o diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c new file mode 100644 index 000..4b411d8 --- /dev/null +++ b/drivers/spi/spi-qup.c @@ -0,0 +1,1144 @@ +/* Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/version.h +#include linux/kernel.h +#include linux/init.h +#include linux/spinlock.h +#include linux/list.h +#include linux/irq.h +#include linux/platform_device.h +#include linux/spi/spi.h +#include linux/interrupt.h +#include linux/err.h +#include linux/clk.h +#include linux/delay.h +#include linux/workqueue.h +#include linux/io.h +#include linux/debugfs.h +#include linux/sched.h +#include linux/mutex.h +#include linux/platform_data/msm_spi.h +#include spi-qup.h + +static void msm_spi_clock_set(struct msm_spi *dd, int speed) +{ + int rc; + + rc = clk_set_rate(dd-clk, speed); + if (!rc) + dd-clock_speed = speed; +} + +static int msm_spi_calculate_size(int *fifo_size, + int *block_size, + int block, + int mult) +{ + int words; + + switch (block) { + case 0: + words = 1; /* 4 bytes */ + break; + case 1: + words = 4; /* 16 bytes */ + break; + case 2: + words = 8; /* 32 bytes */ + break; + default: + return -EINVAL; + } + + switch (mult) { + case 0: + *fifo_size = words * 2; + break; + case 1: + *fifo_size = words * 4; + break; + case 2: + *fifo_size = words * 8; + break; + case 3: + *fifo_size = words * 16; + break; + default: + return -EINVAL; + } I think this can be simplified. Example for this switch: if (mult 3) return -EINVAL; *fifo_size = (words * 2) mult; Probably the whole function can be optimized away somehow? + + *block_size = words *
[PATCH 2/2] msm_serial_hs: Fix spinlock recursion in handling CTS
msm_hs_handle_delta_cts tries to acquire port-lock already acquired by the callee function msm_hs_isr. Change function name to follow _locked convention. Signed-off-by: Mayank Rana mr...@codeaurora.org --- drivers/tty/serial/msm_serial_hs.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/msm_serial_hs.c b/drivers/tty/serial/msm_serial_hs.c index f1d5695..ec16037 100644 --- a/drivers/tty/serial/msm_serial_hs.c +++ b/drivers/tty/serial/msm_serial_hs.c @@ -1085,12 +1085,10 @@ static void msm_hs_config_port(struct uart_port *uport, int cfg_flags) } /* Handle CTS changes (Called from interrupt handler) */ -static void msm_hs_handle_delta_cts(struct uart_port *uport) +static void msm_hs_handle_delta_cts_locked(struct uart_port *uport) { - unsigned long flags; struct msm_hs_port *msm_uport = UARTDM_TO_MSM(uport); - spin_lock_irqsave(uport-lock, flags); clk_enable(msm_uport-clk); /* clear interrupt */ @@ -1098,7 +1096,6 @@ static void msm_hs_handle_delta_cts(struct uart_port *uport) uport-icount.cts++; clk_disable(msm_uport-clk); - spin_unlock_irqrestore(uport-lock, flags); /* clear the IOCTL TIOCMIWAIT if called */ wake_up_interruptible(uport-state-port.delta_msr_wait); @@ -1246,7 +1243,7 @@ static irqreturn_t msm_hs_isr(int irq, void *dev) /* Change in CTS interrupt */ if (isr_status UARTDM_ISR_DELTA_CTS_BMSK) - msm_hs_handle_delta_cts(uport); + msm_hs_handle_delta_cts_locked(uport); spin_unlock_irqrestore(uport-lock, flags); -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- To unsubscribe from this list: send the line unsubscribe linux-arm-msm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html